Method and device for solving ufcs bus conflict, electronic equipment and storage medium

CN119603096BActive Publication Date: 2026-08-07GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-09-11
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

但是D+和D-数据通道上存在同时传输数据的问题,造成总线冲突,从而导致通信失败

Benefits of technology

[0016]在本申请实施例中,在充电设备外接的供电设备为新一代融合快速充电协议UFCS供电设备的情况下,若所述充电设备和所述供电设备存在总线冲突,则目标电子设备释放总线权限,延时预设时长后重新获取所述总线权限,发送目标操作的命令,所述目标电子设备包括所述充电设备或所述供电设备。用于在使用UFCS协议的供电设备和充电设备存在总线冲突的情况下,可以有序协调充电设备和供电设备的消息重发机制,延时预设时长后重新发送目标操作的命令,解决总线冲突,避免UFCS通信失败。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603096B_ABST
    Figure CN119603096B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method and device for solving UFCS bus conflict, electronic equipment and storage medium, which can orderly coordinate the message retransmission mechanism of the charging device and the power supply device, solve the bus conflict and avoid UFCS communication failure in the case that the power supply device and the charging device using UFCS protocol exist bus conflict. The method comprises the following steps: in the case that the power supply device externally connected to the charging device is a new generation UFCS power supply device, if the charging device and the power supply device exist bus conflict, the target electronic equipment releases the bus authority, reacquires the bus authority after a preset time delay, and sends a command of target operation, wherein the target electronic equipment comprises the charging device or the power supply device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging, and more particularly to a method, apparatus, electronic device, and storage medium for resolving UFCS bus conflicts. Background Technology

[0002] The next-generation Universal Fast Charging Specification (UFCS) uses D+ (data plus, DP, positive) and D- (data minus, DM, negative) data channels for communication. However, simultaneous data transmission on the D+ and D- data channels can cause bus conflicts, leading to communication failures. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and storage medium for resolving UFCS bus conflicts. When bus conflicts occur between power supply devices and charging devices using the UFCS protocol, the method can coordinate message retransmission mechanisms between the charging devices and power supply devices in an orderly manner to resolve bus conflicts and avoid UFCS communication failures.

[0004] The first aspect of this application provides a method for resolving UFCS bus conflicts, which may include: when the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, reacquires the bus permission after a preset delay, and sends a command for the target operation, wherein the target electronic device includes the charging device or the power supply device.

[0005] A second aspect of this application provides an apparatus for resolving UFCS bus conflicts, the apparatus being applied to a target electronic device, the apparatus comprising:

[0006] The processing module is used to release bus permissions and reacquire bus permissions after a preset delay when the external power supply device of the charging device is a new generation converged fast charging protocol UFCS power supply device.

[0007] A sending module is used to send commands for a target operation, wherein the target electronic device includes the charging device or the power supply device.

[0008] A third aspect of this application provides an electronic device that may include:

[0009] Memory containing executable program code;

[0010] A processor and a transceiver coupled to the memory;

[0011] The processor and the transceiver are configured to perform the method described in the first aspect of this application.

[0012] In another aspect, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a processor, cause the processor to perform the method described in the first aspect of this application.

[0013] Another aspect of this application discloses a computer program product that, when run on a computer, causes the computer to execute the method described in the first aspect of this application.

[0014] Another aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the method described in the first aspect of this application.

[0015] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0016] In this embodiment, when the power supply device connected to the charging device is a next-generation Unified Fast Charging Protocol (UFCS) power supply device, if a bus conflict exists between the charging device and the power supply device, the target electronic device releases bus permissions, reacquires bus permissions after a preset delay, and sends a command for the target operation. The target electronic device includes either the charging device or the power supply device. This mechanism allows for orderly coordination of message retransmission between the charging device and the power supply device when a bus conflict occurs between the power supply device and the charging device using the UFCS protocol. After a preset delay, the command for the target operation is retransmitted, resolving the bus conflict and preventing UFCS communication failure. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments and the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and other drawings can be obtained based on these drawings.

[0018] Figure 1A A typical hardware diagram for UFCS to communicate using a D positive D negative data channel;

[0019] Figure 1B A schematic diagram of the data frame structure for a charging device to send communication packets to a power supply device;

[0020] Figure 1C A schematic diagram illustrating the simultaneous data transmission on the D+ and D- data channels for both charging and power supply devices.

[0021] Figure 2A This is a schematic diagram of one embodiment of the method for resolving UFCS bus conflicts in this application.

[0022] Figure 2B This is a flowchart illustrating a method for resolving UFCS bus conflicts in an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of one embodiment of the device for resolving UFCS bus conflicts in this application.

[0024] Figure 4 This is a schematic diagram of one embodiment of the electronic device described in this application;

[0025] Figure 5 This is a schematic diagram of one embodiment of the charging device in this application;

[0026] Figure 6 This is a schematic diagram of one embodiment of the power supply equipment in this application. Detailed Implementation

[0027] This application provides a method, apparatus, electronic device, and storage medium for resolving UFCS bus conflicts. When bus conflicts occur between power supply devices and charging devices using the UFCS protocol, the method can coordinate message retransmission mechanisms between the charging devices and power supply devices in an orderly manner to resolve bus conflicts and avoid UFCS communication failures.

[0028] To enable those skilled in the art to better understand the present application, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. All embodiments based on the present application should fall within the scope of protection of the present application.

[0029] The following is a brief explanation of some of the terms used in this application:

[0030] 1. Short circuit: This occurs when the neutral and live wires in a circuit are accidentally connected together during electrical work, causing a partial short circuit (a short circuit means the effective resistance in the circuit is zero. This will trip the circuit breaker or blow the fuse). If not handled promptly or properly, it can lead to damage to the circuit (including electronic components), or even electric shock, fire, or personal injury.

[0031] 2. BC1.1 defines more power sources for charging. There are three main types of power sources, categorized as follows for Universal Serial Bus (USB) ports:

[0032] 1) Standard Downstream Port (SDP)

[0033] This is a typical port commonly found on desktop and laptop computers. The D+ and D- data lines of this port have 15kΩ pull-down resistors. The current limiting values ​​are: 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power. It's essentially a standard USB mode; when in this mode, the USB can charge external devices (phone chargers, power banks) and also serve as a data connection (USB flash drive, phone upload / download).

[0034] 2) Charging Downstream Port (CDP)

[0035] This port supports both high-current charging and full USB 2.0 data transfer compatibility. It features 15kΩ pull-down resistors necessary for D+ and D- communication, as well as internal circuitry for charger detection switching. This internal circuitry allows portable devices to distinguish the CDP from other port types. Essentially, it's a USB interface with fast charging (1.5A) capability; when in this mode, it can perform both fast charging and data transfer.

[0036] 3) Dedicated Charging Port (DCP)

[0037] This port does not support any data transfer but can provide a current of over 1.5A. The D+ and D- data lines of the port are short-circuited. This type of port supports wall chargers and car chargers with high charging capabilities, without needing to be enumerated. It is essentially a simple charger; when the USB is in this mode, it can only charge and cannot perform data connections.

[0038] 3. The BC1.2 protocol uses the D+ and D- pins, which do not affect each other's functions. As the most basic charging protocol, BC1.2 uses the USB 2.0 data cable's D+ (DP) and D- (DM) pins as the protocol identification handshake lines.

[0039] 4. High and low levels refer to two different voltage states used in digital circuits. In digital circuits, electrical signals can only be divided into two states: high and low, corresponding to high and low voltages, respectively. For example, in a 5V system, a high level is typically a voltage between 3.3V and 5V, and a low level is typically a voltage between 0V and 1.6V. It's important to note that high and low levels are not specific voltage values ​​but rather voltage values ​​within a particular system. Therefore, the specific voltage values ​​corresponding to high and low levels may differ in different systems.

[0040] In electronics and automation control, signals are divided into analog signals and digital signals. In digital circuits, digital signals are binary, meaning they only contain 0 and 1 signals. High and low voltage levels are used to represent different data, and their functions are as follows:

[0041] A high voltage level represents "1", which is the highest bit of binary. The high voltage level is generally defined as 3.5 to 5V.

[0042] A low level represents "0", which is the other bits in binary. Generally, the low level is defined as 0 to 0.25V.

[0043] By transmitting data in the form of high or low levels, logical operations and data transmission in digital circuits can be achieved.

[0044] With the rapid development of fast charging technology for terminal devices in recent years, especially in terms of charging speed, charging safety, and intelligent charging management, fast charging has gained widespread recognition from users and has become a standard feature of mobile phones and other smart terminal devices.

[0045] However, the fast charging industry has long suffered from protocol incompatibility: different brands of terminal devices and adapters cannot effectively recognize each other, resulting in only low-power charging. On the one hand, this greatly restricts and limits the user's fast charging experience, with incompatibility becoming a major pain point; on the other hand, the lack of unified charging standards leads to relatively high risks and costs for manufacturers across the industry chain to develop universal fast charging power supply chips and accessories. The lack of unified technical standards will also hinder the long-term development of green energy and the circular economy in terminal devices. Therefore, it is necessary to formulate a unified fast charging standard for terminal devices to solve the incompatibility problem and serve as the foundation for the long-term evolution of fast charging technology. This will promote the interoperability of fast charging technology in existing terminal devices within the industry, while guiding and standardizing product development and production by equipment manufacturers (upstream and downstream industry chains), creating a fast, safe, and compatible charging experience for terminal device users. The next-generation Universal FastCharging Specification (UFCS) protocol has emerged to address this need. UFCS uses D+D- data channels for communication. Figure 1A The diagram shown is a typical hardware schematic of UFCS using a D positive and D negative data channel for communication.

[0046] On the power supply side, the D+ data line is the data sender, and the D- data line is the data receiver; on the charging side, the D+ data line is the data receiver, and the D- data line is the data sender; both the D+ and D- data lines on the cable side support data sending and receiving, and their initial state is data receiving.

[0047] Communication with the cable only occurs during the initial cable insertion and identification process. The cable is largely uninvolved in subsequent UFCS communication. It can be understood as the D+ and D- data lines directly connecting the power supply device (e.g., the adapter) and the charging device (e.g., the phone). The UFCS fast charging setup process is as follows: the charging device sends a high / low sequence of levels to the power supply device via the D- data line and then pulls D- low. Upon receiving the high / low sequence, the power supply device pulls D+ high and releases the resistor shorting D+ and D-. Since D+ and D- remain connected, the charging device can detect that D+ is high and therefore considers the adapter a UFCS adapter. Subsequent communication between the charging device and the power supply device involves sending communication packets. Figure 1B The diagram shows the data frame structure for a charging device to send a communication packet to a power supply device.

[0048] Whether it's the adapter or the phone sending a data packet, the receiving device must at least reply with an acknowledgment (ack) data packet. Some commands may require multiple data packet operations to complete a process. For example, the phone sends a request data packet requesting charging voltage and current from the adapter. The adapter replies with an ack data packet, then the adapter sends an accept data packet to the phone, which replies with an ack data packet. Once the adapter's voltage and current are adjusted (OK), it sends a power-ready data packet to the phone, which replies with an ack data packet. This series of operations constitutes a complete operation, meaning the operation cannot be interrupted (unless under exceptional circumstances, such as a hardware reset mechanism). In other words, the UFCS protocol uses D+D- for half-duplex communication, and commands are sequential. Both the phone and the adapter can send data packets to each other, which can lead to bus conflicts and communication failures. (In most cases, the phone sends data packets to the adapter to interact, but sometimes the adapter will also proactively send its current status information data packets, such as when the adapter adjusts its voltage and current output mode, it will proactively send a power change data packet to the phone).

[0049] like Figure 1C The diagram illustrates the simultaneous data transmission of a charging device and a power supply device on the D+ and D- data channels. The simultaneous transmission of data on the D+ and D- data channels causes bus conflicts, leading to communication failures.

[0050] In this application embodiment, the charging device is a terminal device, which can be a mobile phone, tablet computer, computer with wireless transceiver function, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal device in industrial control, wireless terminal device in self-driving, wireless terminal device in remote medical care, wireless terminal device in smart grid, wireless terminal device in transportation safety, wireless terminal device in smart city, or wireless terminal device in smart home, etc.

[0051] By way of example and not limitation, in this embodiment, the terminal device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0052] In this embodiment of the application, when the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, reacquires the bus permission after a preset delay, and sends a command for the target operation. The target electronic device includes the charging device or the power supply device.

[0053] For example, a mobile phone is used as the charging device and an adapter as the power supply device. When the adapter connected to the mobile phone is a UFCS protocol adapter, if a bus conflict is detected between the mobile phone and the adapter, either the mobile phone or the adapter releases bus permissions. After a preset delay, it can regain bus permissions and send the command for the target operation. This mechanism allows for orderly coordination of message retransmission between the charging and charging devices when a bus conflict occurs, retransmitting the command for the target operation after a preset delay to resolve the bus conflict and prevent UFCS communication failure.

[0054] In one optional implementation, when the external power supply device of the charging device is a next-generation converged fast charging protocol (UFCS) power supply device, if a bus conflict exists between the charging device and the power supply device, the target electronic device releases bus permissions, delays for a preset time, and then reacquires bus permissions, sending a command for the target operation. The target electronic device includes either the charging device or the power supply device, and may include, for example, Figure 2A Steps 201 and 202 are shown in the diagram. (As shown...) Figure 2A The diagram shown is a schematic representation of an embodiment of a method for resolving UFCS bus conflicts in this application, which may include:

[0055] 201. When the power supply device connected to the charging device is a UFCS power supply device, when the target electronic device sends the target operation command by obtaining bus permissions, it is determined whether there is a bus conflict between the charging device and the power supply device.

[0056] In one optional implementation, when the external power supply device connected to the charging device is a UFCS power supply device, and the target electronic device obtains bus access and sends the command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device may include: when the external power supply device connected to the charging device is a Dedicated Charging Port (DCP) power supply device, the charging device determines whether the power supply device is a UFCS power supply device; and when the power supply device is a UFCS power supply device, when the target electronic device obtains bus access and sends the command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device.

[0057] In one optional implementation, when the external power supply device connected to the charging device is a dedicated charging port (DCP) power supply device, the charging device determines whether the power supply device is a UFCS power supply device. If the power supply device is a UFCS power supply device, when the target electronic device obtains bus access and sends a command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device can include: when the external power supply device connected to the charging device is a DCP power supply device, after the charging device sends a high-low level pulse sequence to the power supply device on the D negative data channel, the charging device sets the level of the D negative data channel to a low level, so that the level of the D positive data channel becomes low; when the charging device detects that the level of the D positive data channel changes from low to high, it determines that the power supply device is a UFCS power supply device, and when the target electronic device obtains bus access and sends a command for the target operation, it determines whether there is a bus conflict between the charging device and the power supply device.

[0058] For example, when a mobile phone is connected to an external adapter, it first identifies the DCP adapter via the BC1.2 protocol. The UFCS adapter is identified again based on the DCP adapter. The DCP adapter's D+ and D- channels are shorted. The mobile phone sends a high-low pulse sequence on the D- data channel, and then sets the D- data channel level low. Since D+ and D- are shorted, the D+ data channel level is also pulled low. After receiving the high-low pulse sequence, the adapter releases the D+- short circuit and pulls the D+ data channel level high. If the mobile phone detects that the D+ data channel level is pulled high, it considers the adapter to be a UFCS adapter; if it does not detect that the D+ data channel level is pulled high, it considers the adapter not to be a UFCS adapter and tries other fast charging protocols.

[0059] When the adapter is a UFCS adapter, the UFCS fast charging protocol is used. To avoid UFCS bus conflicts, bus privileges are defined, and the smallest unit to obtain bus privileges is a specific UFCS protocol operation. That is, a specific UFCS protocol operation is considered the smallest unit (i.e., basic unit) to occupy the bus. For example, a ping operation and an operation to obtain device information are both considered as the smallest unit to occupy the bus. For instance, a ping operation consists of two commands: the ping command and the ack command; an operation to obtain device information consists of four commands: the getDeviceInfo command + the ack command + the deviceInfo command + the ack command. Once an operation obtains bus privileges, it retains bus privileges for its entire lifecycle until the last command is executed (except in special hardware reset cases).

[0060] 202. If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, delays for a preset time, and then reacquires the bus permission and sends the target operation command.

[0061] In one optional implementation, when the power supply device connected to the charging device is a UFCS (Unified Fast Charging Protocol) power supply device, when the target electronic device obtains bus access and sends the command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device may include: when the power supply device connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus access and sends the command for the target operation, determining whether there is a bus conflict based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously;

[0062] If a bus conflict exists between the charging device and the power supply device, the target electronic device releases the bus permission. This can include: if data is transmitted simultaneously on the D positive data channel and the D negative data channel, a bus conflict exists between the charging device and the power supply device. The target electronic device releases the bus permission, delays for a preset time, and then reacquires the bus permission and sends a command for the target operation.

[0063] In one optional implementation, when the power supply device connected to the charging device is a UFCS (Unified Fast Charging Protocol) power supply device, and the target electronic device obtains bus access and sends the command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device may include: when the power supply device connected to the charging device is a UFCS power supply device, and the target electronic device obtains bus access and sends the command for the target operation, reading the UFCS chip register flag, and determining whether there is a bus conflict based on the UFCS chip register flag;

[0064] If a bus conflict exists between the charging device and the power supply device, the target electronic device may release bus access. This may include: if the UFCS chip register is marked with a specific flag, and a bus conflict exists between the charging device and the power supply device, the target electronic device releases the bus access, reacquires the bus access after a preset delay, and sends a command for the target operation. The specific flag is used to indicate that data is being transmitted simultaneously on both the D positive data channel and the D negative data channel.

[0065] In one alternative implementation, the preset duration is longer than the hardware reset duration.

[0066] It should be noted that regardless of which command in the target operation was sent previously, after a preset delay, each command in the target operation will be resent.

[0067] For example, taking the target electronic device as an adapter, the specific anti-collision mechanism is described. The adapter's operation of the UFCS protocol includes receive data control and transmit data control. If UFCS data reception is interrupted, the receive data control logic is triggered; if the UFCS state changes and data needs to be actively transmitted, the transmit data control logic is entered. When the adapter detects a UFCS data reception interruption, it reads the UFCS chip register flags to determine if a bus conflict exists (the chip sets the register flags based on whether data is simultaneously transmitted on the D+D- data channel; for example, if data is simultaneously transmitted on the D+D- data channel, the register flag is set to 1). If a bus conflict exists, bus privileges are released and a preset delay of, for example, 2ms, is performed before retransmitting UFCS data. It's understandable that 2ms is set here because hardware reset takes 1ms; this time is sufficient. Therefore, the preset delay can also be set to 3ms, 4ms, etc.

[0068] For example, let's take a mobile phone as the target electronic device to illustrate the specific anti-collision mechanism. When the mobile phone detects a UFCS data reception interruption, it reads the UFCS chip register flag to determine if a bus conflict exists (the chip sets the register flag based on whether data is being transmitted simultaneously on the D+D- data channel; for example, if data is being transmitted simultaneously on the D+D- data channel, the register flag is set to 1). If a bus conflict exists, bus access is released and a preset delay of, for example, 10ms, is performed before retransmitting the UFCS data. It's understandable that the 10ms setting is due to the 1ms hardware reset time; this time is sufficient. However, since in most cases the mobile phone actively sends data to the adapter, a bus conflict usually occurs when the adapter suddenly initiates data transmission to the mobile phone. Therefore, the adapter retransmission time needs to be set shorter. The mobile phone's preset time of 10ms allows 8ms for processing the data sent by the adapter.

[0069] In one optional implementation, the step of releasing bus permissions, re-acquiring bus permissions after a preset delay, and sending a command for the target operation if a bus conflict exists between the charging device and the power supply device, may include: releasing bus permissions, re-acquiring bus permissions after a preset delay, and sending a command for the target operation through the UFCS chip.

[0070] It is understood that the target electronic device software in this application does not handle bus conflicts, but detects bus conflicts through the UFCS chip, and the UFCS chip firmware performs the operation including a command retransmission mechanism.

[0071] 203. If there is no bus conflict between the charging device and the power supply device, the target electronic device can communicate normally.

[0072] In one optional implementation, the step of allowing the target electronic device to communicate normally if there is no bus conflict between the charging device and the power supply device may include: if there is no bus conflict between the charging device and the power supply device, the target electronic device determines whether the bus is locked based on the first received data bit; if the bus is not locked, the target electronic device, after acquiring bus access, determines whether the command in the current data packet is the last command of the target operation; if the bus is locked, the target electronic device determines whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, the target electronic device determines that the target operation is completed and releases the bus access; if it is not the last command of the target operation, the target electronic device continues to hold the bus access.

[0073] For example, if there is no bus conflict between the phone and the adapter, and the UFCS receives the first data bit, it needs to determine whether the bus on the adapter side is locked (lock means locked by the operation, i.e., acquiring bus access; unlock means releasing bus access). If the received first data bit indicates that the bus is not locked, it belongs to a new operation, and therefore bus access needs to be acquired. If a complete communication packet is received and parsed to determine which command it belongs to, it is then determined whether that command is the last command of the target operation. If so, it indicates that the basic unit of the target operation has been completed, and bus access needs to be released; otherwise, the basic unit of the operation is maintained, and bus operation access is retained.

[0074] In an optional implementation, the method may further include: when the UFCS state changes, the target electronic device determines whether the power supply device needs a hardware reset; if the power supply device needs a hardware reset, the target electronic device performs a hardware reset and releases bus permissions; if the power supply device does not need a hardware reset, the target electronic device determines whether the command in the current data packet is the first command of the target operation; if so, the target electronic device determines whether the bus is in an idle state; if the bus is not in an idle state, the target electronic device waits until the bus is in the idle state and acquires bus permissions; if the bus is in an idle state, the target electronic device determines whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, the target electronic device releases bus permissions; if the command in the current data packet is not the last command of the target operation, the target electronic device continues to hold the bus permissions.

[0075] For example, if the adapter actively sends UFCS data, it determines whether a hardware reset is needed. If a hardware reset is needed, it can actively pull D+ low (or the phone pulls D- low) for 1ms to perform a hardware reset, releasing bus permissions regardless of the previous bus state. If a hardware reset is not needed, it determines whether the command in the current data packet is the first command of an operation. If so, it determines whether the bus is in an idle state (i.e., whether the bus is unlocked). If it is not in an idle state, it waits until the bus is idle again and then performs the process of acquiring bus permissions. Then it determines whether it is the last command of an operation. If so, it needs to release bus permissions. If it is between the first and last commands, it continues to maintain the basic unit of the operation and continues to hold bus permissions.

[0076] like Figure 2B The diagram shown is a flowchart illustrating a method for resolving UFCS bus conflicts in an embodiment of this application. This application presents a UFCS-based bus conflict resolution method. This method addresses the problem of bus conflicts caused by simultaneous data transmission between power supply and charging devices during D+ and D- operations in the UFCS protocol. Specifically, it establishes an orderly message retransmission mechanism between the charging and power supply devices after a bus conflict occurs, preventing UFCS communication failures and ensuring the normal operation of the UFCS fast charging protocol on both the adapter and mobile phone sides.

[0077] In this embodiment, when the power supply device connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus access and sends the command for the target operation, it determines whether there is a bus conflict between the charging device and the power supply device. If there is a bus conflict, the target electronic device releases the bus access, delays for a preset time, and then re-obtains the bus access before sending the command for the target operation. This mechanism, used in the UFCS protocol, allows for orderly coordination of the message retransmission mechanism between the charging device and the power supply device when a bus conflict exists. After a preset delay, the command for the target operation is retransmitted, resolving the bus conflict and preventing UFCS communication failure. If there is no bus conflict between the charging device and the power supply device, the target electronic device communicates normally.

[0078] Under normal circumstances, the charging device initiates data packets to the power supply device. During testing, the interaction between the charging device and the power supply device allows the power supply device to enter the UFCS test mode. Then, the power supply device will actively initiate data packets to the charging device. At this time, the charging device also actively sends communication packets to the adapter. Use an oscilloscope to check whether the order of the interaction frames between the power supply device and the charging device and whether bus conflicts occur meet the requirements of this application.

[0079] like Figure 3 The diagram shown is an embodiment of a device for resolving UFCS bus conflicts in this application. The device is applied to a target electronic device and may include:

[0080] The processing module 301 is used to release bus permissions and reacquire bus permissions after a preset delay when the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device.

[0081] The sending module 302 is used to send a command for a target operation, wherein the target electronic device includes the charging device or the power supply device.

[0082] In one optional implementation, the processing module 301 is specifically used to determine whether there is a bus conflict between the charging device and the power supply device when the power supply device connected to the charging device is a UFCS power supply device, by obtaining bus permissions and sending the command for the target operation; if there is a bus conflict between the charging device and the power supply device, then the bus permissions are released.

[0083] In one optional implementation, the processing module 301 is specifically used to determine whether there is a bus conflict when the power supply device connected to the charging device is a UFCS power supply device, by obtaining bus permission and sending the command for the target operation, based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously; if the D positive data channel and the D negative data channel are transmitting data simultaneously, then there is a bus conflict between the charging device and the power supply device, and the bus permission is released.

[0084] In one optional implementation, the processing module 301 is specifically used to, when the power supply device connected to the charging device is a UFCS power supply device, read the UFCS chip register flag when sending the command for the target operation by obtaining bus permission, and determine whether there is a bus conflict based on the UFCS chip register flag; if the UFCS chip register flag is a specific flag, there is a bus conflict between the charging device and the power supply device, and the bus permission is released, wherein the specific flag is used to indicate that the D positive data channel and the D negative data channel are transmitting data simultaneously.

[0085] In one optional implementation, the processing module 301 is specifically used to determine whether the power supply device is a UFCS power supply device when the power supply device connected to the charging device is a dedicated charging port (DCP) power supply device; and when the power supply device is a UFCS power supply device, to determine whether there is a bus conflict between the charging device and the power supply device when the command for the target operation is sent by obtaining bus permissions.

[0086] In one optional implementation, the processing module 301 is further configured to: if there is no bus conflict between the charging device and the power supply device, determine whether the bus is locked based on the first received data bit; if the bus is not locked, acquire bus access and determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus access; if it is not the last command of the target operation, continue to hold the bus access.

[0087] In an optional implementation, the processing module 301 is further configured to, when the UFCS state changes, determine whether the power supply device needs a hardware reset; if the power supply device needs a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation; if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and acquire bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.

[0088] In one optional implementation, the processing module 301 is specifically used to, if there is a bus conflict between the charging device and the power supply device, release the bus permission of the target electronic device, delay for a preset time, and then reacquire the bus permission.

[0089] The sending module 302 is specifically used to send the command for the target operation through the UFCS chip.

[0090] In one alternative implementation, the preset duration is longer than the hardware reset duration.

[0091] like Figure 4 The diagram shown is a schematic representation of an embodiment of an electronic device according to this application, which may include, for example: Figure 3 The device shown is for resolving UFCS bus conflicts.

[0092] like Figure 5 The diagram shown is a schematic representation of one embodiment of the charging device described in this application. The charging device is a terminal device and may include:

[0093] The following is combined with Figure 5 A detailed introduction to the various components of a mobile phone in a terminal device:

[0094] RF circuit 510 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 580; additionally, it transmits uplink data to the base station. Typically, RF circuit 510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 510 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0095] The memory 520 can be used to store software programs and modules. The processor 580 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 520. The memory 520 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 520 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, or other volatile solid-state storage device.

[0096] The input unit 530 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 531), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 531 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 580, and can also receive and execute commands sent by the processor 580. In addition, the touch panel 531 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 531, the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0097] Display unit 540 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. Display unit 540 may include display panel 541, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 541. Further, touch panel 531 may cover display panel 541. When touch panel 531 detects a touch operation on or near it, it transmits the information to processor 580 to determine the type of touch event. Subsequently, processor 580 provides corresponding visual output on display panel 541 based on the type of touch event. Although in Figure 5 In this embodiment, the touch panel 531 and the display panel 541 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 531 and the display panel 541 can be integrated to realize the input and output functions of the mobile phone.

[0098] The mobile phone may also include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 541 according to the ambient light level, and the proximity sensor can turn off the display panel 541 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0099] Audio circuit 560, speaker 561, and microphone 562 provide an audio interface between the user and the mobile phone. Audio circuit 560 converts received audio data into electrical signals and transmits them to speaker 561, where speaker 561 converts them into sound signals for output. On the other hand, microphone 562 converts collected sound signals into electrical signals, which are received by audio circuit 560, converted into audio data, and then output to processor 580 for processing. The audio data is then transmitted via RF circuit 510 to, for example, another mobile phone, or output to memory 520 for further processing.

[0100] Wi-Fi is a short-range wireless transmission technology. Through the Wi-Fi module 570, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 5 Wi-Fi module 570 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the nature of the invention.

[0101] The processor 580 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 520, and calls data stored in the memory 520 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 580.

[0102] The mobile phone also includes a power supply 590 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 580 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0103] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0104] In this embodiment of the application, the processor 580 is configured to release bus permissions and reacquire bus permissions after a preset delay if there is a bus conflict between the charging device and the power supply device when the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device.

[0105] RF circuit 510 is used to send commands for target operation, the target electronic device including the charging device or the power supply device.

[0106] In one optional implementation, the processor 580 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, determine whether there is a bus conflict between the charging device and the power supply device when sending the command for the target operation by acquiring bus permissions; if there is a bus conflict between the charging device and the power supply device, then release the bus permissions.

[0107] In one optional implementation, the processor 580 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, determine whether there is a bus conflict when sending the command for the target operation by obtaining bus permission, based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously; if the D positive data channel and the D negative data channel are transmitting data simultaneously, then there is a bus conflict between the charging device and the power supply device, and the bus permission is released.

[0108] In one optional implementation, the processor 580 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, read the UFCS chip register flag when sending the command for the target operation by obtaining bus permission, and determine whether there is a bus conflict based on the UFCS chip register flag; if the UFCS chip register flag is a specific flag, there is a bus conflict between the charging device and the power supply device, and the bus permission is released, wherein the specific flag is used to indicate that the D positive data channel and the D negative data channel are transmitting data simultaneously.

[0109] In one optional implementation, the processor 580 is specifically configured to determine whether the power supply device connected to the charging device is a UFCS power supply device when the power supply device is a dedicated charging port (DCP) power supply device; and when the power supply device is a UFCS power supply device, determine whether there is a bus conflict between the charging device and the power supply device when the command for the target operation is sent by obtaining bus privileges.

[0110] In one optional implementation, the processor 580 is further configured to: if there is no bus conflict between the charging device and the power supply device, determine whether the bus is locked based on the first received data bit; if the bus is not locked, acquire bus access and determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus access; if it is not the last command of the target operation, continue to hold the bus access.

[0111] In one optional implementation, the processor 580 is further configured to, when the UFCS state changes, determine whether the power supply device needs a hardware reset; if the power supply device needs a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation; if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and acquire bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.

[0112] In one optional implementation, the processor 580 is specifically configured to, if there is a bus conflict between the charging device and the power supply device, release the bus permission of the target electronic device, delay for a preset time, and then reacquire the bus permission.

[0113] RF circuit 510 is specifically used to send commands for the target operation via the UFCS chip.

[0114] In one alternative implementation, the preset duration is longer than the hardware reset duration.

[0115] like Figure 6 The diagram shown is a schematic representation of one embodiment of the power supply device in this application, which may include:

[0116] Memory 601 storing executable program code;

[0117] A processor 602 and a transceiver 603 are coupled to the memory 601;

[0118] In this embodiment of the application, the processor 602 is configured to release bus permissions and reacquire bus permissions after a preset delay if there is a bus conflict between the charging device and the power supply device when the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device.

[0119] Transceiver 603 is used to send commands for a target operation, the target electronic device including the charging device or the power supply device.

[0120] In one optional implementation, the processor 602 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, determine whether there is a bus conflict between the charging device and the power supply device when sending the command for the target operation by acquiring bus permissions; if there is a bus conflict between the charging device and the power supply device, then release the bus permissions.

[0121] In one optional implementation, the processor 602 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, determine whether there is a bus conflict when sending the command for the target operation by obtaining bus permission, based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously; if the D positive data channel and the D negative data channel are transmitting data simultaneously, then there is a bus conflict between the charging device and the power supply device, and the bus permission is released.

[0122] In one optional implementation, the processor 602 is specifically configured to, when the power supply device connected to the charging device is a UFCS power supply device, read the UFCS chip register flag when sending the command for the target operation by acquiring bus privileges, and determine whether there is a bus conflict based on the UFCS chip register flag; if the UFCS chip register flag is a specific flag, there is a bus conflict between the charging device and the power supply device, and the bus privileges are released, wherein the specific flag is used to indicate that data transmission is occurring simultaneously on the D positive data channel and the D negative data channel.

[0123] In one optional implementation, the processor 602 is specifically configured to determine whether the power supply device is a UFCS power supply device when the power supply device connected to the charging device is a dedicated charging port (DCP) power supply device; and when the power supply device is a UFCS power supply device, determine whether there is a bus conflict between the charging device and the power supply device when the command for the target operation is sent by obtaining bus privileges.

[0124] In one optional implementation, the processor 602 is further configured to: if there is no bus conflict between the charging device and the power supply device, determine whether the bus is locked based on the first received data bit; if the bus is not locked, acquire bus access and determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus access; if it is not the last command of the target operation, continue to hold the bus access.

[0125] In one optional implementation, the processor 602 is further configured to, when the UFCS state changes, determine whether the power supply device needs a hardware reset; if the power supply device needs a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation; if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and acquire bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.

[0126] In one optional implementation, the processor 602 is specifically configured to, if there is a bus conflict between the charging device and the power supply device, release the bus permission of the target electronic device, delay for a preset time, and then reacquire the bus permission.

[0127] Transceiver 603 is specifically used to send commands for the target operation via the UFCS chip.

[0128] In one alternative implementation, the preset duration is longer than the hardware reset duration.

[0129] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0130] Those skilled in the art will clearly 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.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0132] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0133] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0134] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or 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.

[0135] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for resolving UFCS bus conflicts, characterized in that, include: When the power supply device connected to the charging device is a new generation converged fast charging protocol UFCS power supply device, when the target electronic device obtains bus permissions and sends a command for target operation, it is determined whether there is a bus conflict between the charging device and the power supply device. If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, delays for a preset time, and then reacquires the bus permission and sends the command for the target operation. The target electronic device includes the charging device or the power supply device. The target electronic device determines whether the bus conflict exists based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously, or the target electronic device determines whether the bus conflict exists based on the UFCS chip register flags.

2. The method according to claim 1, characterized in that, When the power supply device connected to the charging device is a next-generation converged fast charging protocol (UFCS) power supply device, and the target electronic device obtains bus access and sends the command for the target operation, it determines whether there is a bus conflict between the charging device and the power supply device, including: When the external power supply device of the charging device is a UFCS power supply device, when the target electronic device sends the command of the target operation by obtaining bus permission, it determines whether there is a bus conflict based on whether the D positive data channel and the D negative data channel are transmitting data at the same time. If a bus conflict exists between the charging device and the power supply device, the target electronic device releases the bus access, including: If both the positive data channel (D) and the negative data channel (D) are transmitting data simultaneously, a bus conflict exists between the charging device and the power supply device, and the target electronic device releases the bus access.

3. The method according to claim 1, characterized in that, When the power supply device connected to the charging device is a next-generation converged fast charging protocol (UFCS) power supply device, and the target electronic device sends the target operation command by obtaining bus access, it determines whether there is a bus conflict between the charging device and the power supply device, including: When the external power supply device of the charging device is a UFCS power supply device, when the target electronic device obtains bus access and sends the command for the target operation, it reads the UFCS chip register flag and determines whether there is a bus conflict based on the UFCS chip register flag. If a bus conflict exists between the charging device and the power supply device, the target electronic device releases bus permissions, including: When the UFCS chip register is marked with a specific flag, a bus conflict occurs between the charging device and the power supply device, and the target electronic device releases the bus privileges. The specific flag is used to indicate that data is being transmitted simultaneously on both the D positive data channel and the D negative data channel.

4. The method according to claim 2 or 3, characterized in that, When the power supply device connected to the charging device is a UFCS power supply device, and the target electronic device sends the command for the target operation by obtaining bus access, it determines whether there is a bus conflict between the charging device and the power supply device, including: When the power supply device connected to the charging device is a dedicated charging port DCP power supply device, the target electronic device determines whether the power supply device is a UFCS power supply device. When the power supply device is a UFCS power supply device, when the target electronic device obtains bus access and sends a command for the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.

5. The method according to any one of claims 1-3, characterized in that, The method further includes: If there is no bus conflict between the charging device and the power supply device, the target electronic device determines whether the bus is locked based on the first data bit received. If the bus is not locked, after the target electronic device obtains bus access, it determines whether the command in the current data packet is the last command of the target operation; If the bus is locked, the target electronic device determines whether the command in the current data packet is the last command of the target operation; If this is the last command of the target operation, the target electronic device determines that the target operation is complete and releases the bus permission; If it is not the last command of the target operation, the target electronic device continues to hold the bus privileges.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: When the UFCS state changes, the target electronic device determines whether the power supply device needs a hardware reset; If the power supply device requires a hardware reset, the target electronic device performs a hardware reset to release bus permissions. If the power supply device does not require a hardware reset, the target electronic device determines whether the command in the current data packet is the first command of the target operation. If so, the target electronic device determines whether the bus is in an idle state. If the bus is not in an idle state, the target electronic device waits until the bus is in an idle state and then acquires bus access. If the bus is in an idle state, the target electronic device determines whether the command in the current data packet is the last command of the target operation; If the command in the current data packet is the last command of the target operation, then the target electronic device releases bus permissions; If the command in the current data packet is not the last command of the target operation, the target electronic device continues to hold the bus privileges.

7. The method according to any one of claims 1-3, characterized in that, If a bus conflict exists between the charging device and the power supply device, the target electronic device releases bus permissions, re-acquires bus permissions after a preset delay, and sends a command for the target operation, including: If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, delays for a preset time, and then reacquires the bus permission, sending the target operation command through the UFCS chip.

8. The method according to any one of claims 1-3, characterized in that, The preset duration is greater than the hardware reset duration.

9. A device for resolving UFCS bus conflicts, characterized in that, The device is applied to a target electronic device, and the device includes: The processing module is used to determine whether there is a bus conflict between the charging device and the power supply device when the external power supply device of the charging device is a new generation converged fast charging protocol (UFCS) power supply device, and when sending a command for the target operation by acquiring bus permissions; if there is a bus conflict between the charging device and the power supply device, the bus permissions are released, and the bus permissions are reacquired after a preset delay; wherein, the processing module determines whether there is a bus conflict based on whether the D positive data channel and the D negative data channel are transmitting data simultaneously, or the processing module determines whether there is a bus conflict based on the UFCS chip register flags; A sending module is used to send commands for the target operation, wherein the target electronic device includes the charging device or the power supply device.

10. An electronic device, characterized in that, include: Memory containing executable program code; A processor and a transceiver coupled to the memory; The processor and the transceiver are used to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium comprising instructions that, when executed on a processor, cause the processor to perform the method as described in any one of claims 1-8.