Control methods and devices for expansion docks, expansion docks and storage media

By obtaining the uplink and downlink port connection status of the expansion dock, determining the insertion order, and performing reset operations and power supply control, the abnormal disk reading problem of the expansion dock when the external power supply and host device insertion order are different is resolved, ensuring the normal use and stability of the expansion dock.

CN122309430APending Publication Date: 2026-06-30SHENZHEN BASEUS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN BASEUS TECH CO LTD
Filing Date
2024-12-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing docking stations are prone to disk reading errors and affect normal use if the external power supply and host device are inserted in different orders.

Method used

By acquiring the connection status of the uplink and downlink ports, the insertion order of the host device and external power supply is determined, and corresponding reset operations and power supply control are performed according to the connection status to ensure orderly communication between the data port and the uplink port.

Benefits of technology

This avoids disk reading abnormalities caused by disordered power-on, ensuring the normal use and stability of the docking station, and improving user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309430A_ABST
    Figure CN122309430A_ABST
Patent Text Reader

Abstract

This disclosure provides a control method, apparatus, docking station, and storage medium for an expansion dock. The expansion dock includes an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power supply. The control method includes: acquiring the connection status of the uplink port and the downlink port, and determining the insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port; if the current insertion order indicates that the external power supply is inserted into the downlink port first, determining a first connection result based on the connection status of the uplink port; if the first connection result indicates that the uplink port is electrically connected to the host device, performing a reset operation, and after the reset operation is successful, supplying power to the data port to enable communication between the data port and the uplink port, thereby avoiding disk reading errors after the host device is inserted into the expansion dock and ensuring the normal use of the expansion dock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of docking station technology, and in particular to control methods, devices, docking stations, and storage media for docking stations. Background Technology

[0002] A hub (or docking station), also known as a HUB expansion dock, is a multi-functional expansion device that provides various ports for different electronic devices to connect and achieve corresponding expansion functions. With technological advancements, expansion docks have added downstream ports, also called adapter ports, for connecting to an external power source to charge the host device or power the expansion dock itself.

[0003] In related technologies, if the order in which the external power supply and the host device are inserted into the expansion dock is different, it will affect the expansion dock's ability to read electronic devices. This can easily lead to disk reading errors after the host device is inserted into the expansion dock, thus affecting the normal use of the expansion dock. Summary of the Invention

[0004] The main objective of this disclosure is to provide a control method, device, docking station, and storage medium for an expansion dock, which can prevent disk reading errors after the host device is inserted into the expansion dock, thereby ensuring the normal use of the expansion dock.

[0005] To achieve the above objectives, a first aspect of this disclosure provides a control method for a docking station, the docking station including an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power supply, the control method of the docking station including:

[0006] Obtain the connection status of the uplink port and the downlink port, and determine the current insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port;

[0007] If the current insertion order indicates that the external power supply is inserted into the downlink port first, the first connection result is determined according to the connection status of the uplink port;

[0008] If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

[0009] In some embodiments, after powering the data port to enable communication between the data port and the uplink port, the control method of the docking station further includes:

[0010] If the connection status of the uplink port indicates that the uplink port is disconnected from the host device, power supply to the data port is stopped.

[0011] If the connection status of the uplink port indicates that the uplink port is reconnected to the host device, the reset operation is re-executed, and after the reset operation is successful, the data port is powered again so that the data port and the uplink port can communicate again.

[0012] In some embodiments, after powering the data port to enable communication between the data port and the uplink port, the control method of the docking station further includes:

[0013] If the connection status of the uplink port and the downlink port indicates that the uplink port and the downlink port are both disconnected from the host device and the external power supply respectively, power supply to the data port is stopped, and the next insertion order between the host device and the external power supply is determined again based on the connection status of the uplink port and the downlink port.

[0014] If the next insertion sequence indicates that the host power supply is inserted into the uplink port first, the reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

[0015] In some embodiments, after determining the insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port, the control method of the expansion dock further includes:

[0016] If the current insertion order indicates that the host device is inserted into the uplink port first, it supplies power to the data port so that the data port and the uplink port can communicate.

[0017] In some embodiments, after powering the data port to enable communication between the data port and the uplink port, the control method of the docking station further includes:

[0018] The second connection result is determined based on the connection status of the downlink port;

[0019] If the second connection result indicates that the downlink port is electrically connected to the external power supply, a power supply switching operation is performed to power the data port through the external power supply and to power the host device connected to the uplink port through the external power supply.

[0020] In some embodiments, the control method for the expansion dock further includes:

[0021] The host device receives a reset control signal, wherein the reset control signal is generated by the host device after an abnormality occurs during the reading or writing operation of the electronic device on the data port;

[0022] In response to the reset control signal, the reset operation is performed, and after the reset operation is successful, the data port is powered back on so that communication between the data port and the uplink port can be resumed.

[0023] In some embodiments, obtaining the connection status of the uplink port and the downlink port includes:

[0024] Obtain the first port voltage of the uplink port and the second port voltage of the downlink port;

[0025] The connection status of the uplink port and the downlink port is determined based on the first port voltage and the second port voltage.

[0026] To achieve the above objectives, a second aspect of this disclosure provides a control device for a docking station, the docking station including an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power supply, the control device for the docking station including:

[0027] The port detection module is used to obtain the connection status of the uplink port and the downlink port, and determine the current insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port;

[0028] The host detection and judgment module is used to determine the first connection result based on the connection status of the uplink port if the current insertion order indicates that the external power supply is inserted into the downlink port first.

[0029] The reset control module is configured to perform a reset operation if the first connection result indicates that the uplink port is electrically connected to the host device, and to supply power to the data port after the reset operation is successful, so that the data port and the uplink port can communicate.

[0030] To achieve the above objectives, a third aspect of this disclosure provides an expansion dock, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect of the embodiments.

[0031] To achieve the above objectives, a fourth aspect of the present disclosure provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect of the present disclosure.

[0032] The beneficial effects of the embodiments disclosed herein include:

[0033] The expansion dock of this disclosure includes an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power supply. By executing the control method of the expansion dock, the connection status of the uplink port and the downlink port can be obtained, and the insertion order between the host device and the external power supply can be determined according to the connection status of the uplink port and the downlink port. If the current insertion order indicates that the external power supply is inserted into the downlink port first, a first connection result is determined according to the connection status of the uplink port. If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port to enable communication between the data port and the uplink port. Therefore, by clearly defining the timing relationship between the reset operation and the power supply to the data port in this embodiment, the power supply can be delayed after the external power supply is plugged into the dock, and the system can wait for the host device to be plugged in. After confirming the insertion of the host device, the reset operation is performed, and the data port is powered on after the reset operation. Therefore, compared with the solutions in related technologies, this embodiment avoids the situation of disk reading abnormality caused by disordered power supply after the host device is plugged into the dock by clearly defining the power-on timing, thereby ensuring the normal use of the dock. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the implementation environment provided in the embodiments of this disclosure;

[0035] Figure 2 This is a schematic diagram of the structure of the expansion dock provided in the embodiments of this disclosure;

[0036] Figure 3 This is a schematic diagram of the overcurrent protection module provided in the embodiments of this disclosure;

[0037] Figure 4 This is a schematic diagram of the power supply detection circuit provided in an embodiment of this disclosure;

[0038] Figure 5 This is a schematic diagram of the use scenario of the expansion dock provided in the embodiments of this disclosure;

[0039] Figure 6 This is a flowchart illustrating the control method for the expansion dock provided in an embodiment of this disclosure;

[0040] Figure 7 yes Figure 6 A flowchart following step S103;

[0041] Figure 8 yes Figure 6 Another flowchart following step S103;

[0042] Figure 9 yes Figure 6 A flowchart following step S101;

[0043] Figure 10 yes Figure 9 A flowchart following step S401;

[0044] Figure 11 This is another schematic flowchart of the control method for the expansion dock provided in this embodiment;

[0045] Figure 12 yes Figure 6 Step S101 further includes a flowchart;

[0046] Figure 13 This is a schematic diagram of the functional modules of the control device for the expansion dock provided in this embodiment of the present disclosure;

[0047] Figure 14 This is a schematic diagram of the hardware structure of the expansion dock provided in this embodiment. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of this disclosure only and is not intended to be limiting of this disclosure.

[0050] like Figure 1 As shown, Figure 1 This is a schematic diagram of the implementation environment provided in this embodiment, including: a docking station 101 and a host device 102, wherein the docking station 101 can be connected to the host device 102 through an interface (such as a USB interface or other interfaces).

[0051] For example, the expansion dock 101 includes an uplink port for electrical connection to a host device 102, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power supply. The expansion dock 101 can obtain the connection status of the uplink port and the downlink port, and determine the current insertion order between the host device 102 and the external power supply based on the connection status of the uplink port and the downlink port; if the current insertion order indicates that the external power supply is inserted into the downlink port first, a first connection result is determined based on the connection status of the uplink port; if the first connection result indicates that the uplink port is electrically connected to the host device 102, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port to enable communication between the data port and the uplink port.

[0052] The host device 102 can be a mobile phone, computer, smart voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., but is not limited to these.

[0053] It should be noted that, Figure 1 The schematic diagram of the implementation environment shown is merely an example. The scenarios described in this disclosure are intended to more clearly illustrate the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided in this disclosure. As those skilled in the art will know, with the evolution of actual scenarios and the emergence of new business scenarios, the technical solutions provided in this disclosure are also applicable to similar technical problems.

[0054] The expansion dock in this embodiment is described below.

[0055] like Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of the expansion dock provided in an embodiment of this disclosure. The expansion dock includes:

[0056] Uplink port, used for electrical connection to host device;

[0057] At least one data port for electrical connection to an electronic device;

[0058] Downlink port, used for electrical connection to an external power supply;

[0059] The Power Delivery (PD) protocol module is electrically connected to the uplink and downlink ports.

[0060] A HUB module is used at least to manage electronic devices connected to a data port, and to manage data transmission between the host device and the electronic devices. The host device communicates with the electronic devices through the HUB module.

[0061] The power module, which is electrically connected to the HUB module, is used to manage the voltage of the external input expansion dock and to provide the power required by each module of the expansion dock using the power of the external input expansion dock.

[0062] The overcurrent protection module is electrically connected to the HUB module. The overcurrent protection module can also be connected to the data port and the power module.

[0063] It should be noted that the term "electrical connection" in this disclosure embodiment is also called "electrical link," which is a connection relationship used to illustrate this characteristic of the circuit when describing the circuit structure of a product. It can be understood as a form of connection between different components in the circuit structure through physical lines that can transmit electrical signals, such as PCB copper foil or wires. It is understood that the two electronic components in an "electrical connection" can be directly connected, or they can be indirectly connected by other electronic components in between.

[0064] In this embodiment, the docking station connects to the host device via an uplink port. Therefore, the uplink port can also be named the host device port. In practical applications, the uplink port can also be named other names, and this embodiment does not impose specific limitations on this. The host device can be a computer, tablet, smartphone, vehicle-mounted system, etc. In practical applications, it can also be other host devices, and this embodiment does not impose specific limitations on this.

[0065] In this embodiment of the disclosure, the data port type includes one or more of the following: USB Type-A, USB Type-C, High-Definition Multimedia Interface (HDMI), DisplayPort, RJ45 interface (Registered Jack-45, RJ45), SD card slot, etc., to meet the access requirements of electronic devices such as network ports, card readers, video interface cables, audio cables, PD fast charging cables, USB flash drives, hard drives, and large-capacity solid-state drives. This embodiment of the disclosure does not impose specific limitations on this.

[0066] In this embodiment of the disclosure, the downlink port is used for electrical connection with an external power source. The downlink port can also be called an adapter port. It is connected to an external power source through a PD adapter. The external power source can charge the host device or power the expansion dock through the expansion dock.

[0067] In this embodiment, the expansion dock is powered in two ways: the first is that the host device supplies power to the expansion dock, and the second is that an external power source supplies power to the expansion dock. The first power supply method is used when the expansion dock is connected to the host device but not to an external power source; the second power supply method is used when the expansion dock is connected to an external power source but not to the host device; or the expansion dock is connected to both the host device and an external power source. In related technologies, as long as the expansion dock detects a power source, it supplies power to the data port, establishing communication between the expansion dock and the electronic device. If the expansion dock is not connected to the host device at this time, and the electronic device and the host device do not communicate immediately, subsequent connection of the host device to the expansion dock may lead to disk reading errors, including missing disk reads or disk read failures.

[0068] In this embodiment of the disclosure, the HUB module is at least used to manage data transmission between the electronic device and the host device connected to the data port. The host device communicates with the electronic device through the HUB module. In order to ensure normal communication between the host device and the electronic device, when the host device is connected to the expansion dock, the HUB module performs a reset operation, clears the cached data, initializes the status of each data port, and then allows power to be supplied to each data port to establish communication between the host device and the electronic device.

[0069] In this embodiment of the disclosure, the PD protocol module is connected to the uplink port and the downlink port. The PD protocol module can also be connected to the delay module, and the delay module is connected to the PD protocol module and the HUB module. The power module in the expansion dock manages the voltage input to the external expansion dock, providing the necessary power to each module. The PD protocol module acts as a communication bridge between the host device and the adapter, allowing the host device to request the required charging voltage from the adapter. Furthermore, the PD protocol module detects the port information of the uplink and downlink ports and determines whether to control the delay module to send a reset signal to the HUB module based on this information. Since the HUB module reset requires a certain amount of time, the reset signal needs to remain active during this period. Therefore, this embodiment includes a delay module between the PD protocol module and the HUB module to extend the duration of the reset signal. The duration is determined by the reset operation time; it can be the same as or longer than the reset operation time, and this embodiment does not impose specific limitations on this. The overcurrent protection module connects the data port and the power module, providing overcurrent protection for the expansion dock and electronic devices. It also acts as a switch, turning the data port and power module on or off according to the control of the HUB module.

[0070] like Figure 3 As shown, Figure 3 This is a schematic diagram of the overcurrent protection module provided in the embodiments of this disclosure, as shown below. Figure 3 As shown, in this embodiment, the overcurrent protection module includes: chip U9, fuse F1, resistors R187, R190, R193, R189, R195, and R197. Port 1 of U9 is connected to the data port corresponding to the overcurrent protection module, port 2 of U9 is grounded, port 5 of U9 is connected to the power module, ports 1 and 5 of U9 are connected through fuse F1, and port 4 of U9 corresponds to the enable terminal and is connected to the HUB module.

[0071] In this embodiment of the disclosure, the expansion dock also includes a power supply detection circuit, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of the power supply detection circuit provided in this embodiment. The power supply detection circuit includes resistors R167, R171, and R170. One end of R167, one end of R171, and one end of R170 are connected, and the other end of R171 is grounded. When the power supply detection circuit is used to detect the voltage of the uplink port, the other end of R167 can be electrically connected to the uplink port, and the other end of R170 can be electrically connected to the PD protocol module to transmit the voltage signal from the uplink port to the PD protocol module. When the power supply detection circuit is used to detect the voltage of the downlink port, the other end of R167 can be electrically connected to the downlink port, and the other end of R170 can be electrically connected to the PD protocol module to transmit the voltage signal from the downlink port to the PD protocol module. When the power supply detection circuit is used to detect the voltage of the power module, the other end of R167 can be electrically connected to the power module, and the other end of R170 can be electrically connected to the HUB module to transmit the voltage signal from the power module to the HUB module.

[0072] In this embodiment, the PD protocol module and the HUB module can be used as control modules. The PD protocol module can determine whether to send a reset signal to the HUB module based on the voltage levels of the uplink and downlink ports. The HUB module performs a reset operation based on the received reset signal and supplies power to the data port through the HUB module.

[0073] like Figure 5 As shown, Figure 5This is a schematic diagram of a docking station usage scenario provided in this disclosure embodiment, including a host device, a PD adapter (hereinafter referred to as the adapter, used to provide external power), a docking station, and electronic devices. The electronic devices include device A, device B, device C, and device D. These three parts can form many different scenarios. For example, the host device can be connected first, then the adapter, and finally the electronic devices; the adapter can be connected first, then the host device, and finally the electronic devices; or the electronic devices can be connected first, then the adapter, and finally the host device; or the electronic devices can be connected first, then the host device, and finally the adapter; or the adapter can be connected first, then the electronic devices, and finally the host device; or the adapter can be connected first, then the electronic devices, and finally the host device.

[0074] The following describes the control method of the expansion dock in the embodiments of this disclosure.

[0075] like Figure 6 As shown, Figure 6 This is a flowchart illustrating a control method for an expansion dock provided in an embodiment of this disclosure. This expansion dock-based control method can be applied to the expansion dock in the above embodiments, and the method includes at least:

[0076] Step S101: Obtain the connection status of the uplink port and the downlink port, and determine the insertion order between the current host device and the external power supply based on the connection status of the uplink port and the downlink port.

[0077] Step S102: If the current insertion order indicates that the external power supply is inserted into the downlink port first, determine the first connection result based on the connection status of the uplink port.

[0078] Step S103: If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

[0079] Regarding step S101 above, the uplink port is used for electrical connection with the host device, and the downlink port is used for electrical connection with an external power supply. By detecting the connection status of these two ports, the current connection status between the host device and the external power supply can be determined. If a connection signal is detected on the downlink port first, while the uplink port has not yet received a connection signal, it can be determined that the external power supply was plugged into the downlink port first; conversely, if a connection signal is detected on the uplink port first, it indicates that the host device was plugged into the docking station first. Determining this insertion order is crucial for subsequent operation procedures, as different insertion orders may lead to different device states and potential problems, especially when it comes to reading functions of electronic devices.

[0080] Regarding step S102 above, if the current insertion order indicates that the external power supply was inserted into the downlink port first, this embodiment of the disclosure also needs to continue detecting the connection status of the uplink port and determine the first connection result based on the connection status of the uplink port. It should be noted that although it is known that the external power supply was inserted first, if the host device is not inserted into the uplink port, the reading operation on the electronic device on the data port still cannot be achieved. Therefore, this embodiment of the disclosure also needs to pay attention to whether the host device has been inserted or is in the process of being inserted. The first connection result actually reflects whether an electrical connection has been established between the uplink port and the host device.

[0081] It should be noted that, in this embodiment of the present disclosure, after determining that the current insertion order indicates that the external power supply is inserted into the downlink port first, it is still necessary to obtain the connection status of the downlink port to confirm whether the external power supply has been unplugged. Therefore, in this embodiment of the present disclosure, while ensuring that the connection status of the downlink port remains unchanged, that is, while ensuring that the external power supply is still connected to the downlink port, the first connection result is determined based on the connection status of the uplink port.

[0082] Regarding step S103 above, if the first connection result indicates that the uplink port is electrically connected to the host device, that is, confirming that the host device has been inserted into the expansion dock and successfully established an electrical connection with the uplink port, then in this embodiment of the disclosure, the expansion dock will be controlled to perform a reset operation, including sending a reset signal to the HUB module to perform the reset operation. A reset operation is a system operation used to perform initialization, the purpose of which is to restore some or all components of the expansion dock to their initial state to clear any possible erroneous or abnormal states. Furthermore, the reset operation may also involve resetting some internal circuits, chips, or software modules to return them to a stable and known initial state; this embodiment of the disclosure does not impose specific limitations on this.

[0083] After the reset operation is successfully completed, this embodiment of the disclosure begins to power the data port and simultaneously enables communication between the data port and the uplink port. The data port is a port used for electrical connection to electronic devices. These ports may be connected to various external electronic devices in the docking station, such as USB flash drives and hard drives. The purpose of powering the data port is to enable communication between the data port and the uplink port, thus ensuring that the host device can normally interact with the electronic devices connected to the data port.

[0084] It should be noted that the embodiments of this disclosure form an orderly control flow through the coordinated operation of these multiple steps, avoiding disordered power-on. Specifically, the embodiments of this disclosure first determine the connection order between the host device and the external power supply, providing a basis for subsequent operations. If the external power supply is connected first, the connection status of the host device is further determined. After the host device is connected later, a reset and correct power supply timing ensure that the docking station can interact with the host device and data port in the correct state when the external power supply is plugged in first. This avoids disk reading abnormalities caused by disordered power-on, ultimately ensuring the normal use of the docking station. This orderly control flow makes the operation of the docking station more reliable and stable, improving user experience and system performance.

[0085] In summary, through steps S101 to S103, the docking station of this embodiment can obtain the connection status of the uplink and downlink ports, and determine the insertion order between the current host device and the external power supply based on the connection status of the uplink and downlink ports. If the current insertion order indicates that the external power supply is inserted into the downlink port first, a first connection result is determined based on the connection status of the uplink port. If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that communication can occur between the data port and the uplink port. Thus, by clearly defining the timing relationship between the reset operation and the power supply to the data port in this embodiment, the power supply operation can be delayed after the external power supply is inserted into the docking station, and the host device can be inserted first. After confirming the insertion of the host device, a reset operation is performed, and power is supplied to the data port after the reset operation. Therefore, compared with the solutions in related technologies, this embodiment avoids the situation of abnormal disk reading after the host device is inserted into the docking station due to disordered power supply by clearly defining the power-on timing, thereby ensuring the normal use of the docking station.

[0086] like Figure 7 As shown, in some embodiments, after step S103 above, the following step may also be included:

[0087] Step S201: If the connection status of the uplink port indicates that the uplink port is disconnected from the host device, stop supplying power to the data port;

[0088] Step S202: If the connection status of the uplink port indicates that the uplink port has been reconnected to the host device, the reset operation is re-executed. After the reset operation is successful, the data port is powered on again so that the data port and the uplink port can communicate again.

[0089] It should be noted that after the host device can communicate with the electronic devices on the data port, it is necessary to continue monitoring the connection status of the uplink and downlink ports. When the docking station detects the connection status of the uplink port and indicates that it is disconnected from the host device, the docking station will stop supplying power to the data port.

[0090] It should be noted that in this embodiment, stopping the power supply to the data port after the uplink port is disconnected from the host device is a protective mechanism. When the host device is disconnected from the uplink port, the source of data transmission is interrupted. Continuing to supply power to the data port could cause a series of problems. For example, continuous power supply to the data port might lead to unnecessary energy consumption, especially for some devices connected to the data port, which might be in an abnormal power supply state, affecting their lifespan or causing potential damage. Secondly, without a host device, communication between the data port and the uplink port is meaningless; continuing to supply power might cause some electronic devices to behave abnormally, such as storage devices experiencing data read / write errors because there is no host device to control and manage these operations. Furthermore, stopping the power supply can avoid electrical problems such as current surges that might occur due to a sudden disconnection of the host device, maintaining the stability of the docking station's internal circuitry.

[0091] Subsequently, while continuing to monitor the connection status of the uplink and downlink ports, when the uplink port shows that it has reconnected electrically to the host device, it means that the host device has reconnected to the docking station. At this point, to ensure the normal operation of the system, a reset operation needs to be performed again. The purpose of the reset operation is to restore the docking station to a stable initial state where it can communicate and transmit data normally with the host device. This is because the internal state of the docking station may have changed during the host device's disconnection and reconnection process, or some uncertain state information may have been left over from previous operations. The reset operation can clear these uncertainties, bringing the docking station back to a predictable state.

[0092] After a successful reset, power is restored to the data port, allowing communication between the data port and the uplink port to resume. Re-powering the data port ensures that electronic devices connected to it can communicate normally with the host device and restart data transmission. The docking station can restore data transmission functionality in optimal condition, avoiding disk read errors or other data transmission problems caused by previous disconnections and reconnections.

[0093] It should be noted that if power is directly supplied to the data port after the host device is reconnected without performing a reset operation, problems such as communication protocol incompatibility and data transmission errors may occur. Resetting reinitializes the internal state of the expansion dock, ensuring that the communication protocol and electrical characteristics between the data port and the host device are in normal condition, thereby guaranteeing the reliability of data transmission and the normal operation of the expansion dock. Therefore, the embodiments of this disclosure can ensure the stability of the internal state of the expansion dock under different host device connection states, avoiding various abnormal situations caused by changes in the host device's connection state, improving the reliability and stability of the expansion dock, and guaranteeing its normal operation in various usage scenarios.

[0094] like Figure 8 As shown, in some embodiments, after step S103 above, the following step may also be included:

[0095] Step S301: If the connection status of the uplink port and the downlink port indicates that the uplink port and the downlink port are disconnected from the host device and the external power supply respectively, stop supplying power to the data port, and re-determine the insertion order between the host device and the external power supply according to the connection status of the uplink port and the downlink port.

[0096] In step S302, if the next insertion order indicates that the host power supply is inserted into the uplink port first, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

[0097] It's important to note that after the host device can communicate with the electronic devices on the data port, it's necessary to continue monitoring the connection status of the uplink and downlink ports. When the docking station detects that the connection status of the uplink and downlink ports indicates they are disconnected from both the host device and the external power supply, it will take appropriate action. First, the docking station will stop supplying power to the data port, as power is interrupted when both the host device and external power supply are disconnected. Then, the docking station will re-determine the next insertion order between the host device and the external power supply based on the connection status of the uplink and downlink ports. This ensures the docking station is ready to handle the next insertion operation. By continuously monitoring the port connection status, the docking station can clearly understand whether the host device or the external power supply should be inserted first, allowing it to perform corresponding operations based on the different insertion orders, ensuring system continuity and reliability.

[0098] When the expansion dock determines that the next insertion order is for the host power supply to be inserted into the uplink port first, it will perform a reset operation. The reason for re-performing the reset is that even if the host device is inserted first, after the previous disconnection and re-insertion process, some abnormal states or error messages may remain inside the expansion dock. These messages could interfere with normal communication and data transmission between the host device and the expansion dock. The reset operation restores the expansion dock's internal state to a stable, normally functioning initial state, providing a good foundation for subsequent operations.

[0099] After a successful reset, the docking station can re-power the data port, enabling communication between the data port and the uplink port. This ensures that the host device can normally exchange data with the electronic devices connected to the data port, avoiding disk reading errors or other communication problems that may have occurred during the previous disconnection and re-insertion process, thus guaranteeing the normal use of the docking station.

[0100] like Figure 9 As shown, in some embodiments, after step S101 above, the following step may also be included:

[0101] Step S401: If the current insertion order indicates that the host device is inserted into the uplink port first, power is supplied to the data port so that the data port and the uplink port can communicate.

[0102] It should be noted that when the insertion order determined by step S101 indicates that the host device is inserted into the uplink port first, it means that the host device is in place before the external power supply. This is different from the disordered power-on situation that may occur in related technologies. In this case, directly powering the data port can relatively easily enable the data transmission function.

[0103] For example, when a user inserts the host device into the docking station's uplink port first, the docking station can be considered to be in a relatively stable initial state. This is because the host device is the core of data transmission and processing, and its insertion first means that subsequent operations can revolve around it. Powering the data ports activates the electronic devices connected to them. This direct power supply operation is relatively safe when the host device is inserted first, avoiding uncertainties that might arise from external power supply insertion first, such as disk read errors that might occur if power is supplied to the data ports before the host device is inserted. This orderly operation ensures that the docking station can quickly and stably activate its expansion functions when the host device is inserted first, enabling normal use of the docking station and improving user experience and system performance.

[0104] like Figure 10 As shown, in some embodiments, after step S401 above, the following step may also be included:

[0105] Step S501: Determine the second connection result based on the connection status of the downlink port;

[0106] Step S502: If the second connection result indicates that the downlink port is electrically connected to the external power supply, perform a power supply switching operation to supply power to the data port through the external power supply, and to supply power to the host device connected to the uplink port through the external power supply.

[0107] It should be noted that after step S401, i.e., after the host device has been inserted into the uplink port and the data port has started communicating with the uplink port, the expansion dock will continue to determine the second connection result based on the connection status of the downlink port. The second connection result reflects whether the downlink port has been successfully connected to an external power source, and determines whether the expansion dock can subsequently obtain additional power support from the external power source.

[0108] When the second connection result indicates that the downlink port is electrically connected to an external power source, the docking station will perform a power switching operation. The purpose of the power switching operation is to switch the power source of the data port from the previous power supply method to external power supply, thereby enabling the electronic devices connected to the data port to be powered. In addition, the power switching operation can also power the host device connected to the uplink port through external power supply, that is, to charge the host device. The power switching operation may involve some circuit switching and power management module adjustment to switch the power supply to external power.

[0109] For example, when using a laptop as the host device, and the laptop is plugged into the docking station first, the data port starts working. At this time, the docking station is powered by the host device. When an external power source is detected connected to the downlink port, the power supply to the data port is switched to the external power source through a power switching operation. This can provide sufficient power support for more high-power electronic devices connected to the data port, ensuring the stable operation and data transmission of these devices. Furthermore, the external power source can charge the laptop connected to the uplink port, ultimately improving the overall performance and reliability of the docking station.

[0110] like Figure 11 As shown, in some embodiments, the control method for the expansion dock may further include the following steps:

[0111] Step S601: Receive a reset control signal sent by the host device;

[0112] The reset control signal is generated by the host device after an abnormality occurs during the reading or writing operation of the electronic device on the data port.

[0113] In step S602, in response to the reset control signal, a reset operation is performed, and after the reset operation is successful, power is restored to the data port so that communication between the data port and the uplink port can be resumed.

[0114] It should be noted that the expansion dock in this embodiment can also receive a reset control signal sent by the host device. During the use of the expansion dock, when the host device performs read or write operations on the electronic device connected to the data port, abnormal situations may occur. These abnormal situations may be caused by various reasons, such as data transmission errors, communication protocol incompatibility, equipment failure, or electrical interference. When such an abnormality occurs, the host device can actively generate a reset control signal. The reset control signal is a way for the host device to notify the expansion dock that a reset operation is required.

[0115] Furthermore, the expansion dock is equipped with a corresponding receiving mechanism capable of detecting reset control signals from the host device. For example, the expansion dock can receive reset control signals through specific communication lines or interface protocols.

[0116] When the docking station receives a reset control signal from the host device, it will execute a response operation. First, the docking station will perform a reset operation, which aims to restore some or all of the docking station's components to their initial state. After the reset operation is successfully completed, the docking station will re-power the data port and re-establish communication between the data port and the uplink port, so that the host device can re-attempt normal data operations on the electronic devices on the data port.

[0117] For example, when the host device attempts to read data from an external hard drive connected to the docking station's data port, and the read operation fails due to interference or a problem with the hard drive itself, the host device sends a reset control signal. Upon receiving this signal, the docking station performs a reset operation, resetting its own state, clearing any errors that might affect communication, and then re-energizing the data port. This allows the host device to retry the read operation from the external hard drive, hoping to restore normal data transmission and operation, preventing the docking station's use from being affected by previous anomalies, and ensuring that the docking station continues to function normally.

[0118] like Figure 12 As shown, in some embodiments, step S101 may further include the following steps:

[0119] Step S701: Obtain the first port voltage of the uplink port and the second port voltage of the downlink port;

[0120] Step S702: Determine the connection status of the uplink port and the downlink port based on the first port voltage and the second port voltage.

[0121] It should be noted that for the uplink port, the docking station uses a corresponding voltage detection circuit or sensor to measure the voltage of its first port. The first port voltage reflects the current electrical status of the uplink port, including information such as whether a host device is connected and the power supply status of the host device. For example, if no host device is connected to the uplink port, its voltage may be at a default value (such as low voltage or zero voltage); when a host device is connected, a corresponding voltage change will occur, and the specific voltage value depends on the power supply characteristics of the host device and the connection method between the docking station and the host device.

[0122] Similarly, for the downstream port, the docking station will detect the voltage of the second port. The downstream port is mainly used to connect to an external power source. When an external power source is connected, the voltage of the second port will show a corresponding voltage value, which will depend on the output voltage of the external power source, and will not be elaborated further here.

[0123] Based on the acquired first and second port voltages, the docking station determines the connection status of the uplink and downlink ports. When the first port voltage falls within a specific range, the connection status of the uplink port can be inferred. Specifically, if the first port voltage is zero or in a low range, it may indicate that no host device is connected to the uplink port; conversely, if it is within the normal operating voltage range, it indicates that a host device is connected to the uplink port. Similarly, for the second port voltage, its measured value determines the connection status of the downlink port. The magnitude of the second port voltage indicates whether an external power source is connected to the downlink port, which will not be elaborated further here.

[0124] Furthermore, by comparing the changes in the voltage at the first port and the voltage at the second port, some complex connection situations can be further analyzed. For example, if the voltage at the first port changes after the host device is inserted, but the voltage at the second port remains zero, it may indicate that the host device was inserted first, but the external power supply has not yet been connected; conversely, if the voltage at the second port has a value while the voltage at the first port is zero, it may indicate that the external power supply was inserted first, but the host device has not yet been connected.

[0125] Therefore, the voltage at the first port and the voltage at the second port can help the docking station more accurately determine the connection status of the ports, thereby providing basic information for subsequent operations. This allows the docking station to perform reset, power supply, or other control operations based on different insertion sequences and connection statuses, in order to avoid problems such as disk reading abnormalities caused by disordered power-on and ensure the normal use and functionality of the docking station.

[0126] For example, in Figures 2 to 5 In the embodiments shown, if the control method of the expansion dock in the embodiments of this disclosure is not used, and no application is used... Figures 2 to 5Before the circuitry is complete, when the user connects the PD adapter to the downstream port of the expansion dock, the expansion dock starts supplying power, and the HUB module immediately resets and starts automatically. If the user then connects several electronic devices to the data port and then connects the upstream port to a host device, such as a computer, the HUB module, having already completed its power-on detection and resetting without timing control, will not communicate with the host device, resulting in no data on the data port. Furthermore, when the computer is powered off or restarted, the lack of flow control causes the entire system to power on directly. Since the HUB module's reset cannot control the power-on sequence, it cannot control the power supply to the data port, leading to various abnormalities such as failure to read disks, missing disk reads, powering on the device before or after connecting the electronic device, etc.

[0127] After adopting the docking station control method and circuit structure in this embodiment, when the user first connects the PD adapter to the downlink port, the PD protocol module detects the voltage at the second port of the downlink port as VBUS_DET2 = 5V*(R2 / R1+R2) = 5V*(1 / 9.09+1) = 0.5V, while the voltage at the first port of the uplink port as VBUS_DET1 is 0V. This indicates that only the adapter is connected and not the host device. Therefore, the PD protocol module will not reset the HUB module and will not supply power to the data port. Since connected electronic devices will not receive power, this has no impact on the docking station.

[0128] When the host device connects to the uplink port, it acts as a power receiver, requesting 20V voltage from the adapter via the PD protocol module. By acquiring two voltage samples, the voltage at the first port (VBUS_DET1) is calculated as 20V * (R2 / R1 + R2) = 20V * (1 / 9.09 + 1) = 2V, and the voltage at the second port (VBUS_DET2) is also calculated as 20V * (R2 / R1 + R2) = 20V * (1 / 9.09 + 1) = 2V. Therefore, the PD protocol module recognizes that both the host device and the adapter are connected and outputs a high-level signal to control the HUB module to perform a reset. After a successful power-on reset, the HUB module starts up and begins data communication with the host device while simultaneously powering the data port. At this point, power supply and communication at the data port are synchronized.

[0129] After the host device is unplugged during normal operation in the above embodiment, the expansion dock detects that there is no host device, the PD protocol output is 5V, the voltage of the first port VBUS_DET1 is detected as 0V, and the voltage of the second port VBUS_DET2 is detected as 0.5V. Therefore, the HUB module and the host do not communicate via protocol. When the user unplugs the PD adapter at this time, the voltage of the first port VBUS_DET1 is detected as 0V, the voltage of the second port VBUS_DET2 is detected as 0V, and finally the entire expansion dock is powered off. When the electronic device is directly connected to the data port again without being powered by the PD adapter, the host device detects the voltage at the first port as VBUS_DET1 = 5V*(R2 / R1+R2) = 20V*(1 / 9.09+1) = 0.5V, and the voltage at the second port as VBUS_DET2 = 0V*(R2 / R1+R2) = 20V*(1 / 9.09+1) = 0V. This indicates that the host device has been connected. At this time, the PD protocol module sends a reset signal to the HUB module to perform a reset operation. After the HUB module completes the reset, it powers the data port and communicates with the host device.

[0130] Ultimately, this embodiment of the present disclosure ensures that electronic devices on the data port can communicate with host devices on the uplink port regardless of the access sequence, without affecting the docking station's ability to read electronic devices. No disk reading errors will occur after the host device is inserted into the docking station, thus ensuring the normal use of the docking station.

[0131] Please see Figure 13 , Figure 13 This is a functional module diagram of the control device for the expansion dock provided in the embodiments of this disclosure. It can be applied to the expansion dock in the above embodiments. The control device includes:

[0132] The port detection module 1301 is used to obtain the connection status of the uplink port and the downlink port, and determine the insertion order between the current host device and the external power supply based on the connection status of the uplink port and the downlink port.

[0133] The host detection and judgment module 1302 is used to determine the first connection result based on the connection status of the uplink port if the current insertion order indicates that the external power supply is inserted into the downlink port first.

[0134] The reset control module 1303 is used to perform a reset operation if the first connection result indicates that the uplink port is electrically connected to the host device, and to supply power to the data port after the reset operation is successful so that the data port and the uplink port can communicate.

[0135] It should be noted that the control device of the expansion dock in this embodiment can execute the control method of the expansion dock in the above embodiment. The expansion dock can obtain the connection status of the uplink port and the downlink port, and determine the insertion order between the current host device and the external power supply based on the connection status of the uplink port and the downlink port. If the current insertion order indicates that the external power supply is inserted into the downlink port first, the first connection result is determined based on the connection status of the uplink port. If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that communication can be established between the data port and the uplink port. Thus, by clarifying the timing relationship between the reset operation and the power supply to the data port in this embodiment, the power supply operation can be delayed after the external power supply is inserted into the expansion dock, and the host device can be inserted first. After confirming the insertion of the host device, the reset operation is performed, and power is supplied to the data port after the reset operation. Therefore, compared with the solutions in related technologies, this embodiment avoids the situation of abnormal disk reading after the host device is inserted into the expansion dock due to disordered power supply by clarifying the power-on timing, thereby ensuring the normal use of the expansion dock.

[0136] The specific implementation of the control device for the expansion dock is basically the same as the specific embodiment of the control method for the expansion dock described above, and will not be repeated here. Subject to meeting the requirements of the embodiments of this disclosure, the control device for the expansion dock may also be equipped with other functional modules to implement the control method for the expansion dock in the above embodiments.

[0137] This disclosure also provides a docking station, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the control method of the docking station described above. The docking station can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0138] Please see Figure 14 , Figure 14 The hardware structure of an expansion dock, according to another embodiment, is illustrated. The expansion dock includes:

[0139] The processor 1401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.

[0140] The memory 1402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1402 and is called by the processor 1401 to execute the control method of the expansion dock of the embodiments of this disclosure.

[0141] The input / output interface 1403 is used to implement information input and output;

[0142] The communication interface 1404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0143] Bus 1405 transmits information between various components of the device (e.g., processor 1401, memory 1402, input / output interface 1403, and communication interface 1404);

[0144] The processor 1401, memory 1402, input / output interface 1403 and communication interface 1404 are connected to each other within the device via bus 1405.

[0145] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned control method for the expansion dock.

[0146] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0147] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.

[0148] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0150] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0151] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0152] It should be understood that in this disclosure, "at least one item" and "several" refer to one or more, and "multiple" 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 three cases: only A exists, only B exists, and both A and B exist simultaneously, where 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" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or 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.

[0153] In the embodiments provided in this disclosure, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units described above 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 through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0154] The units described above 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.

[0155] Furthermore, the functional units in the various embodiments of this disclosure 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.

[0156] 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 disclosure, 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 multiple 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 of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0157] The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present disclosure. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present disclosure shall be within the scope of the claims of the present disclosure.

Claims

1. A control method for an expansion dock, characterized in that, The expansion dock includes an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power source. The control method for the expansion dock includes: Obtain the connection status of the uplink port and the downlink port, and determine the current insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port; If the current insertion order indicates that the external power supply is inserted into the downlink port first, the first connection result is determined according to the connection status of the uplink port; If the first connection result indicates that the uplink port is electrically connected to the host device, a reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

2. The control method for the expansion dock according to claim 1, characterized in that, After powering the data port to enable communication between the data port and the uplink port, the control method for the expansion dock further includes: If the connection status of the uplink port indicates that the uplink port is disconnected from the host device, power supply to the data port is stopped. If the connection status of the uplink port indicates that the uplink port is reconnected to the host device, the reset operation is re-executed, and after the reset operation is successful, the data port is powered again so that the data port and the uplink port can communicate again.

3. The control method for the expansion dock according to claim 1, characterized in that, After powering the data port to enable communication between the data port and the uplink port, the control method for the expansion dock further includes: If the connection status of the uplink port and the downlink port indicates that the uplink port and the downlink port are both disconnected from the host device and the external power supply respectively, power supply to the data port is stopped, and the next insertion order between the host device and the external power supply is determined again based on the connection status of the uplink port and the downlink port. If the next insertion sequence indicates that the host power supply is inserted into the uplink port first, the reset operation is performed, and after the reset operation is successful, power is supplied to the data port so that the data port and the uplink port can communicate.

4. The control method for the expansion dock according to claim 1, characterized in that, After determining the insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port, the control method of the expansion dock further includes: If the current insertion order indicates that the host device is inserted into the uplink port first, it supplies power to the data port so that the data port and the uplink port can communicate.

5. The control method for the expansion dock according to claim 4, characterized in that, After powering the data port to enable communication between the data port and the uplink port, the control method for the expansion dock further includes: The second connection result is determined based on the connection status of the downlink port; If the second connection result indicates that the downlink port is electrically connected to the external power supply, a power supply switching operation is performed to power the data port through the external power supply and to power the host device connected to the uplink port through the external power supply.

6. The control method for the expansion dock according to claim 1, characterized in that, The control method for the expansion dock also includes: The host device receives a reset control signal, wherein the reset control signal is generated by the host device after an abnormality occurs during the reading or writing operation of the electronic device on the data port; In response to the reset control signal, the reset operation is performed, and after the reset operation is successful, the data port is powered back on so that communication between the data port and the uplink port can be resumed.

7. The control method for the expansion dock according to claim 1, characterized in that, The step of obtaining the connection status of the uplink port and the downlink port includes: Obtain the first port voltage of the uplink port and the second port voltage of the downlink port; The connection status of the uplink port and the downlink port is determined based on the first port voltage and the second port voltage.

8. A control device for an expansion dock, characterized in that, The expansion dock includes an uplink port for electrical connection to a host device, at least one data port for electrical connection to an electronic device, and a downlink port for electrical connection to an external power source. The control device for the expansion dock includes: The port detection module is used to obtain the connection status of the uplink port and the downlink port, and determine the current insertion order between the host device and the external power supply based on the connection status of the uplink port and the downlink port; The host detection and judgment module is used to determine the first connection result based on the connection status of the uplink port if the current insertion order indicates that the external power supply is inserted into the downlink port first. The reset control module is configured to perform a reset operation if the first connection result indicates that the uplink port is electrically connected to the host device, and to supply power to the data port after the reset operation is successful, so that the data port and the uplink port can communicate.

9. An expansion dock, characterized in that, The expansion dock includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the control method of the expansion dock according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the control method of the expansion dock as described in any one of claims 1 to 7.