Connecting device supporting hot plug, hot plug method, test method and medium

By designing a hot-swappable connection device, and using a gating module and a control module to connect or disconnect the physical link of the device, the hot-swappable problem under the power-on operation of the computer system is solved, and the disaster recovery capability and flexibility of the system are improved.

CN122019440APending Publication Date: 2026-05-12SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

How to achieve hot-swapping of devices or components while the computer system is powered on, so as to avoid economic losses caused by downtime.

Method used

A hot-swappable connection device is designed, including a gating module and a control module. The insertion or removal of the target device is achieved by connecting or disconnecting the physical link in the gating module, and the control module determines the hot-swappable strategy according to the control signal of the computer system.

Benefits of technology

It enables hot-swapping of devices while the computer system is powered on, improving the disaster recovery capability and flexibility of the computer system, and supporting a fast and efficient hot-swapping process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019440A_ABST
    Figure CN122019440A_ABST
Patent Text Reader

Abstract

The invention discloses a connecting device supporting hot plugging, a hot plugging method, a testing method and a medium, and relates to the technical field of hot plugging. A fixed end of a gating module is connected with target equipment, and a gating end is connected with a computer system; the control module can control connection or disconnection of physical links between different fixed ends and different gating ends in the gating module; when a certain target device needs to be inserted into a computer system, the control module can be realized by controlling the connection of a physical link between the corresponding fixed end and the gating end; when a certain target device needs to be pulled out of the computer system, the control module can be realized by controlling the physical link between the corresponding fixed end and the gating end to be disconnected; therefore, the hot plug of the target device is effectively realized, and the complete pull-out of the target device is realized through the disconnection of the physical link. The control module can dynamically control any target device to perform hot plugging according to requirements, and a rapid and efficient hot plugging process is automatically realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hot-swappable technology, and in particular to a connection device, hot-swappable method, testing method and medium that support hot-swappability. Background Technology

[0002] With the continuous development of computer technology, the demand for hot-plugging functionality is becoming increasingly widespread. In critical fields such as military, telecommunications, and finance, once computer systems are put into operation, they must run day and night. When disassembling, repairing, maintaining, or expanding devices or components connected to the computer system, the computer system cannot be shut down; downtime would mean significant economic losses. This necessitates that devices or components connected to the computer system can be connected or removed while the computer system is powered on, i.e., possess hot-plugging capabilities. Hot-plugging allows users to remove or replace damaged hard drives or expansion cards without shutting down the computer system or cutting off the power, thereby improving the computer system's timely recovery capability, scalability, and flexibility in the face of disasters. For example, some disk mirroring systems for high-end applications currently offer hot-plugging functionality for disks.

[0003] It is evident that how to achieve hot-swapping of devices or components connected to a computer system is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a hot-swappable connection device, hot-swappable method, testing method, and medium, which can solve the technical problem of how to achieve hot-swappable devices or components connected to a computer system.

[0005] To address the aforementioned technical problems, embodiments of the present invention provide a hot-swappable connection device, comprising: The gating module consists of N gating terminals and M fixed terminals, where N is a positive integer and M is a positive integer. The fixed terminals are used to establish connections with the target device, and the gating terminals are used to establish connections with the computer system. The control module, whose output is connected to the control terminal of the gating module, is used to control the connection of the physical link between the target fixed end and its corresponding gating end, so as to insert the target device connected to the target fixed end into the corresponding computer system; and to control the disconnection of the physical link between the target fixed end and its corresponding gating end, so as to unplug the target device connected to the target fixed end from the corresponding computer system. Among them, the target fixed end is the fixed end connected to the target device that needs to be hot-swapped in the gating module.

[0006] Optionally, hot-swappable connectivity devices also include: N first physical ports are corresponding one-to-one with N strobe terminals. The first physical ports are set at the corresponding strobe terminals and are used to establish connections with the computer system. M second physical ports are corresponding one-to-one with the M fixed terminals. The second physical ports are set on the corresponding fixed terminals and are used to establish a connection with the target device.

[0007] Optionally, the target device is a USB device, and both the first physical port and the second physical port are USB interfaces.

[0008] Optionally, the target device is an SD card, and both the first physical port and the second physical port are SD card slots.

[0009] Optionally, the input terminal of the control module is connected to the output terminal of the computer system; The control module is also used to receive control signals output by the computer system and determine the hot-plug strategy for the target device based on the control signals. The hot-swap strategy includes the target device that needs to be hot-swapped and the hot-swap action that needs to be performed.

[0010] Optionally, at least one of the M fixed terminals of the gating module is in a floating state, where M is a positive integer greater than 1; Disconnecting the physical link between the target fixed end and its corresponding gate end, so as to unplug the target device connected to the target fixed end from the corresponding computer system, including: If the target fixed end and the suspended fixed end are fixed ends supported by the same gating end, control the physical link between the gating end corresponding to the target fixed end and the suspended fixed end to be connected, so as to disconnect the physical link between the target fixed end and its corresponding gating end. or, If there is another target device that needs to be inserted into the computer system corresponding to the target device connected to the target fixed end, control the physical link between the gating end corresponding to the target fixed end and the fixed end connected to the other target device to be connected, so as to disconnect the physical link between the target fixed end and its corresponding gating end. Among them, the other target device is another target device that is supported by the gating terminal corresponding to the target fixed terminal, in addition to the target device connected to the target fixed terminal.

[0011] To address the aforementioned technical problems, embodiments of the present invention also provide a hot-swappable method, applied to the aforementioned hot-swappable connection device; the hot-swappable method includes: Determine the target fixed end connected to the target device that needs to be hot-swapped and the hot-swapping action that needs to be performed. If the hot-plug action to be performed is insertion, the physical link between the target fixed end and its corresponding strobe end is connected to insert the target device connected to the target fixed end into the corresponding computer system. If the hot-plug action to be performed is to remove the device, the physical link between the target fixed end and its corresponding strobe end is disconnected, so that the target device connected to the target fixed end is removed from the corresponding computer system.

[0012] To address the aforementioned technical problems, embodiments of the present invention also provide a hot-swap testing method, applied to a test controller in a hot-swap testing system. The hot-swap testing system further includes a computer system, a target device, and the aforementioned hot-swap-enabled connection device. The hot-swap testing method includes: Establish connections between each fixed end of the hot-swappable connection device and its corresponding target device, and establish connections between each selected end of the hot-swappable connection device and its corresponding computer system. Determine the target fixed terminal to which the target device whose hot-swap function needs to be tested is connected; The target device connected to the target fixed end is inserted into the corresponding computer system through a hot-swappable connection device. The availability of the inserted target device is tested using a computer system. After completing the availability test of the target device, the target device connected to the fixed end is unplugged from the corresponding computer system through a hot-swappable connection device.

[0013] Optionally, the availability of the inserted target device may be tested via a computer system, including: Determine whether the computer system can recognize the inserted target device; If the computer system can recognize the inserted target device, control the computer system to perform preset read and write operations through the inserted target device; If the computer system can complete the preset read and write operations through the inserted target device, then the inserted target device is deemed to have passed the availability test; If the computer system fails to recognize the inserted target device or fails to complete the preset read / write operation through the inserted target device, the inserted target device is deemed to have failed the availability test.

[0014] To address the aforementioned technical problems, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned hot-plugging method or the steps of the aforementioned hot-plugging test method.

[0015] As can be seen from the above technical solution, the fixed end of the gating module is connected to the target device, and the gating end is connected to the computer system. The control module can control the connection or disconnection of the physical links between different fixed ends and different gating ends within the gating module. When a target device needs to be inserted into the computer system, the control module can achieve this by controlling the connection of the physical link between the corresponding fixed end and the gating end; when a target device needs to be removed from the computer system, the control module can achieve this by controlling the disconnection of the physical link between the corresponding fixed end and the gating end; thus effectively realizing the hot-swapping of the target device. The beneficial effect of this invention is that the complete removal of the target device is achieved by disconnecting the physical link. The control module can dynamically control any target device to perform hot-swapping according to needs, automatically realizing a fast and efficient hot-swapping process. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram of a hot-swappable connection device provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of another hot-swappable connection device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a hot-plug testing system when the first target device is a USB device, as provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of a hot-plug testing system when the second target device is a USB device, as provided in an embodiment of the present invention. Figure 5 This invention provides a schematic diagram of a hot-swap testing system for an SD card as the target device. Figure 6 A schematic flowchart of a hot-plugging method provided in an embodiment of the present invention; Figure 7 This is a flowchart illustrating a hot-plug testing method provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0019] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.

[0020] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] Next, a hot-swappable connection device provided by an embodiment of the present invention will be described in detail. See also Figure 1 As shown, Figure 1 This is a schematic diagram of a hot-swappable connection device provided in an embodiment of the present invention; the hot-swappable connection device 1 includes: The gating module 11 includes N gating terminals and M fixed terminals, where N is a positive integer and M is a positive integer; the fixed terminals are used to establish a connection with the target device 2, and the gating terminals are used to establish a connection with the computer system 3. The control module 12, whose output is connected to the control terminal of the gating module 11, is used to control the connection of the physical link between the target fixed end and its corresponding gating end, so as to insert the target device 2 connected to the target fixed end into the corresponding computer system 3; and to control the disconnection of the physical link between the target fixed end and its corresponding gating end, so as to remove the target device 2 connected to the target fixed end from the corresponding computer system 3. Among them, the target fixed end is the fixed end connected to the target device 2 that needs to be hot-swapped in the gating module 11.

[0022] It is easy to understand that, in order to achieve the hot-swappable function of the target device 2, the hot-swappable connection device 1 provided by the present invention is equipped with a gating module 11 that can be controllably gated under the control of the control module 12. The gating module 11 includes a first side and a second side. The first side is provided with a gating end, through which the gating module 11 establishes a connection with the computer system 3. The second side is provided with a fixed end, through which the gating module 11 establishes a connection with the target device 2. Inside the gating module 11, a selectable physical link is provided between the fixed end and the corresponding gating end. Selectability means that the physical link can be selectively connected or disconnected. When the physical link between a fixed end and a gating end is selectively connected, the target device 2 connected to the fixed end will establish a physical connection with the computer system 3 connected to the gating end through the connected physical link, thereby enabling the computer system 3 to establish a communication connection with the target device 2 based on this physical connection, thus realizing the hot-swapping of the target device 2 connected to the fixed end. When the physical link between a fixed terminal and a selected terminal switches from a selected connected state to a selected disconnected state, the physical connection established between the target device 2 connected to the fixed terminal and the computer system 3 connected to the selected terminal is broken, thus effectively realizing the hot-plugging of the target device 2 connected to the fixed terminal. The hot-plugging of the target device 2 is effectively achieved by connecting or disconnecting the physical link within the selected module that connects the target device 2 and the computer system 3. This physical link is the only path for establishing a connection between the target device 2 and the computer system 3, including establishing an electrical connection and establishing a signal connection.

[0023] It should be noted that the gating terminal corresponding to a fixed terminal refers to the gating terminal with which there is a physical link that can be connected. Only one corresponding gating terminal is required for the M fixed terminals of the gating module 11. When the gating module 11 has only one gating terminal, there will be a physical link that can be connected to all M fixed terminals. However, when the gating module 11 has multiple gating terminals, one gating terminal may not necessarily have a physical link that can be connected to all M fixed terminals. For example, when the gating module 11 has two gating terminals, one gating terminal may correspond to the first to the M / 2th fixed terminals, and the other gating terminal may correspond to the M / 2+1th to the Mth fixed terminals. This application does not impose any special limitations on the number of fixed terminals and gating terminals in the gating module 11, or the correspondence between them. These can be selected and configured according to the actual hot-swappable requirements of the device.

[0024] Specifically, the number of gating terminals can be configured based on the number of computer systems 3 that need to support hot-swapping. Each gating terminal corresponds one-to-one with a computer system 3. The number of fixed terminals and their correspondence with the gating terminals can be configured based on the specific number of devices or components that each computer system 3 needs to use and that require hot-swapping functionality. For example, if there are two computer systems 3 that need to support hot-swapping, then N is 2. The gating module 11 sets a first gating terminal to connect to the first computer system 3 and a second gating terminal to connect to the second computer system 3. At the same time, the first computer system 3 needs to use i devices, and all i devices need to have hot-swapping functionality. The second computer system 3 needs to use j devices, and all j devices need to have hot-swapping functionality. Therefore, the gating module 11 needs to set i fixed terminals corresponding to the first gating terminal and j fixed terminals corresponding to the second gating terminal; that is, M = i + j.

[0025] Furthermore, this application does not impose any special limitations on the specific type and implementation method of the gating module 11. Existing devices can be selected directly according to actual application requirements, such as different models of multiplexers (MUX) or different types of switching switches. Alternatively, the circuit can be built independently to implement the design of the gating module 11, and the gating function can be implemented through programming logic. Specifically, the gating module 11 can be set and selected according to the signal conditions used for communication between the target device 2 and the computer system 3 when the target device 2 is inserted into the computer system 3. When the signal frequency used for communication between the target device 2 and the computer system 3 is high, the gating module 11 can be implemented using a MUX or other methods with strong anti-interference capabilities. When the signal frequency used for communication between the target device 2 and the computer system 3 is low, the gating module 11 can be implemented using a single-pole multi-throw switch or other methods with weaker anti-interference capabilities. This application does not impose any special limitations on the specific implementation method of the physical link in the gating module 11; it can be set according to the actual situation of the target device 2 and the computer system 3. Computer system 3 refers to a complete computing system that organically combines hardware and software systems to work collaboratively and complete data acquisition, storage, processing, transmission, and interaction. Target device 2 refers to a device or component that needs to be connected to computer system 3 and has hot-swappable functionality. This application does not impose specific limitations on the specific types and implementation methods of computer system 3 and target device 2. For example, computer system 3 can be a single computer or server, and target device 2 can be a USB (Universal Serial Bus) device, such as a USB flash drive, mouse, or keyboard, or an SD card (Secure Digital Card), PCIe (Peripheral Component Interconnect Express) device, or a computer device such as a laptop computer.

[0026] In practical applications, the control module 12 can determine the target device 2 that needs to be hot-swapped based on current application requirements. Specifically, it determines which fixed-end connection of the target device 2 needs to be hot-swapped, thus identifying the target fixed end. Then, it selects the physical link corresponding to the target fixed end from among several physical links within the gating module 11. Based on the required hot-swapping action (hot-insertion or hot-out), it controls the corresponding physical connection in the gating module 11 to be connected or disconnected. This application does not impose specific limitations on the specific type and implementation method of the control module 12; it can be various types of processors, controllers, etc., and can be implemented using methods such as CPLD (Complex Programmable Logic Device). The control module 12 also has multiple options for controlling the gating module 11, which this application does not specifically limit.

[0027] Furthermore, if a computer system 3 has several target devices 2 that can be simultaneously hot-plugged and hot-plugged, the hot-pluggable connection device 1 can be further equipped with an expansion device. This expansion device includes an uplink terminal and several downlink terminals. The uplink terminal is connected to a fixed terminal of the gating module 11 corresponding to the computer system 3, and the several downlink terminals are connected one-to-one with each of the target devices 2. In this case, the control module 12 can achieve simultaneous hot-plugging of several target devices 2 into the computer system 3 by connecting the physical link between the fixed terminal and the corresponding gating terminal; and simultaneously hot-plugging of several target devices 2 from the computer system 3 by disconnecting the physical link between the fixed terminal and the corresponding gating terminal. For example, when several target devices 2 are all USB devices, a USB hub can be used to connect several target devices 2 to a fixed terminal, thereby simultaneously achieving hot-plugging of several target devices 2.

[0028] This invention provides a hot-swappable connection device 1. It enables hot-swapping between different target devices 2 and corresponding computer systems 3 through the setting of a gating module 11 and the design of internal physical links. Furthermore, during hot-swapping, the physical link is disconnected to achieve a true hardware link disconnection. The entire hot-swapping process can be automatically controlled by a control module 12 to open and close the corresponding physical link in the gating module 11. By integrating corresponding control logic into the control module 12, dynamic software control of the hot-swapping action of the target device 2 is effectively achieved, further improving the automation of the device's hot-swapping action and the hot-swapping test process, and realizing a fast and efficient hot-swapping action and hot-swapping function testing process.

[0029] See Figure 2 As shown, Figure 2A schematic diagram of another hot-swappable connection device provided in an embodiment of the present invention; as an optional embodiment, the hot-swappable connection device 1 further includes: N first physical ports are corresponding one-to-one with N gating terminals. The first physical ports are set at the corresponding gating terminals and are used to establish a connection with computer system 3. M second physical ports are corresponding one-to-one with M fixed terminals. The second physical ports are set on the corresponding fixed terminals and are used to establish a connection with the target device 2.

[0030] Understandably, to facilitate the connection between the connecting device 1 and the target device 2 and the computer system 3, the connecting device 1 can be further equipped with a first physical port to cooperate with the selection terminal to achieve the connection between the connecting device 1 and the computer system 3, and can also be further equipped with a second physical port to cooperate with the fixed terminal to achieve the connection between the connecting device 1 and the target device 2. When the connecting device 1 needs to be used, it can be directly connected to the corresponding computer system 3 through the first physical port and to the corresponding target device 2 through the second physical port to start the application. Figure 2 As shown, the first physical port is located at the selection end of the selection module 11. Internally, the first physical port connects to the selection end of the selection module 11, and externally it can connect to the computer system 3, allowing the computer system 3 to directly connect to the corresponding selection end in the selection module 11 through the first physical port. The second physical port is located at the fixed end of the selection module 11. Internally, the second physical port connects to the fixed end of the selection module 11, and externally it can connect to the target device 2, allowing the target device 2 to directly connect to the corresponding fixed end in the selection module 11 through the second physical port. The actual connection link between the computer system 3 or the target device 2 and the corresponding physical port will specifically include multiple hardware links (e.g., a USB link includes power lines and signal lines, etc.). In the accompanying drawings of this application, the multiple hardware links corresponding to a single physical port are simplified to a single connection line for illustration.

[0031] It should be noted that this application does not impose any special restrictions on the specific types and implementation methods of the first and second physical ports, which need to be selected and set according to the specific type of the target device 2. For example, when the target device 2 is a USB device, the first and second physical ports can be implemented using various types of USB interfaces such as Type-A, Type-B, Type-C, Mini-A, Mini-B, Micro-A, and Micro-B, and the specific implementation method can be male or female, etc. The first and second physical ports can be adaptively adjusted according to the interface type and male / female implementation method actually configured in the computer system 3. For example, when the target device 2 is an SD card, the first and second physical ports can be implemented using SD card type interfaces, such as an SD card slot, and the specific implementation method can be an SD card slot or dock.

[0032] Specifically, by adding a first physical port and a second physical port, the gating end and the fixed end can quickly access the computer system 3 and the target device 2 through the corresponding physical ports. The design of the physical ports provides a point-to-point electrical connection channel, which improves the stability and reliability of the connection when the gating module 11 establishes a connection with the computer system 3 and the target device 2, and further improves the connection security.

[0033] See Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a hot-plug testing system for a USB device, as provided in an embodiment of the present invention; see also Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a hot-plug test system when the target device is a USB device, as provided in an embodiment of the present invention. As an optional embodiment, the target device 2 is a USB device, and both the first physical port and the second physical port are USB interfaces.

[0034] It is easy to understand that target device 2 can specifically be a USB device. A USB device refers to a hardware device that conforms to the USB protocol standard to realize data interaction, power supply, or both. The USB protocol standard is a serial bus standard for connecting computer system 3 and external devices, which can effectively regulate the connection and communication between computer system 3 and external devices, and has advantages such as high cost performance and ease of connection. If target device 2 is a USB device, the USB device needs to establish a physical connection with computer system 3 through a USB interface. Therefore, the first physical port and the second physical port in connection device 1 both need to use USB interfaces. The physical link in gating module 11 that connects to the USB device can specifically be implemented using a USB link corresponding to the USB device. The USB link specifically includes power supply lines and signal lines, etc.

[0035] It should be noted that if target device 2 is a USB device, then computer system 3 can be any system capable of loading USB drivers. The first and second physical ports can be adaptively adjusted according to the actual interface type and male / female implementation of computer system 3; taking a Type-A USB interface as an example, such as... Figure 3 As shown, if computer system 3 itself has a reserved Type-A male connector for connecting external USB devices, then the first physical port of connection device 1 is implemented using the corresponding Type-A female connector, and the second physical port can be implemented using a Type-A male connector. For example... Figure 4 As shown, if the computer system 3 itself has a reserved Type-A female connector for connecting external USB devices, the first physical port of the connection device 1 is specifically implemented using the corresponding Type-A male connector, and the second physical port can be implemented using a Type-A female connector.

[0036] Specifically, target device 2 can be implemented using a USB device, and the corresponding physical interface is implemented using a USB interface. USB devices are compatible with various computer systems 3, have strong versatility, and are widely adaptable.

[0037] See Figure 5 As shown, Figure 5 This is a schematic diagram of a hot-swap test system for a target device that is an SD card, provided as an embodiment of the present invention. As an optional embodiment, the target device 2 is an SD card, and both the first physical port and the second physical port are SD card slots.

[0038] It is understandable that target device 2 can specifically be an SD card. An SD card is a storage device based on semiconductor flash memory. By enabling hot-swapping of SD cards, the data storage needs of computer system 3 can be effectively met. If target device 2 is an SD card, the SD card needs to be implemented using a physical port that conforms to the SD standard. In practical applications, it is mainly implemented using an SD card slot. Therefore, both the first physical port and the second physical port in connection device 1 need to be implemented using SD card slots. An SD card slot is a physical slot specifically for SD standard memory cards. The physical link connecting the SD card in the gating module 11 can specifically be implemented using an SD bus link corresponding to the SD card. The SD bus link specifically includes power supply lines and signal lines, etc.

[0039] It should be noted that if the target device 2 is an SD card, then the computer system 3 can be any system capable of loading SD card drivers. The first physical port and the second physical port can be adaptively adjusted according to the actual interface type configured in the computer system 3; taking an SD card slot assembly including a base and a slot as an example, such as... Figure 5As shown, if the computer system 3 itself has a reserved SD card slot for connecting an external SD card, the first physical port of the connection device 1 is specifically implemented by the corresponding SD card slot, and the second physical port can be implemented by the SD card slot.

[0040] Specifically, the target device 2 can be implemented using an SD card, so that the computer system 3 can hot-swap external SD cards through the connection device 1, thereby flexibly meeting its own storage needs.

[0041] As an optional embodiment, the input terminal of the control module 12 is connected to the output terminal of the computer system 3; The control module 12 is also used to receive control signals output by the computer system 3 and determine the hot-plug strategy for the target device 2 based on the control signals. The hot-swap strategy includes the target device 2 that needs to be hot-swap and the hot-swap action that needs to be performed.

[0042] It is easy to understand that, in order to cooperate with the computer system 3 to realize the hot-plugging of the target device 2, the control module 12 can further establish a communication connection with the computer system 3. The control module 12 obtains the control signals of the computer system 3 through the communication connection, thereby determining the hot-plugging strategy that the computer system 3 needs to execute, that is, specifically determining which target device 2 the computer system 3 needs to hot-plug or hot-plug. This allows the control module 12 to control the gating module 11 to perform the corresponding hot-plugging operation through the received control signals. This application does not specifically limit the specific type and implementation method of the control signals; various signal implementation methods can be used. The implementation method of the control signals mainly depends on the communication connection method between the control module 12 and the computer system 3, and the signal form supported by the communication connection method must be used as the control signal.

[0043] As a specific embodiment, such as Figure 2 As shown, considering that most control modules 12 integrate I / O pins, the control module 12 can be connected to the computer system 3 through its integrated I / O pins. In this case, the control signal can be implemented using GPIO (General Purpose Input / Output) signals. GPIO signals are a type of digital signal based on I / O pins. The computer system 3 can output different GPIO signals by setting the input and output states of the GPIO interface, thereby indicating the corresponding hot-plug strategy of the control module 12.

[0044] Furthermore, if a computer system 3 corresponds to more than one selectable target device 2, that is, if a computer system 3 has multiple corresponding fixed terminals connected to the selector, and these fixed terminals are connected to different target devices 2 respectively, then in order to distinguish different target devices 2 and achieve accurate hot-plugging, the control signal can be implemented using multiple GPIO signals. For example, when a computer system 3 has k selectable target devices 2, the control module 12 and the computer system 3 are connected through k independent I / O pins. Each I / O pin corresponds to one target device 2. When an I / O pin is configured as an input state (or output state), it indicates that the target device 2 corresponding to that I / O pin needs to be hot-plugged. When an I / O pin is configured as an output state (or input state), it indicates that the target device 2 corresponding to that I / O pin needs to be hot-plugged. The control module 12 can also be connected to the computer system 3 through other communication methods, such as using bus communication methods such as I2C (Inter-Integrated Circuit) to establish a communication connection with the computer system 3. In this case, a multi-bit binary encoding form, such as a byte (8 bits), can be used to form an encoded digital signal to distinguish different target devices 2. One bit corresponds to one target device 2, and the 0 / 1 state of a certain bit corresponds to the hot-plugging or hot-plugging action.

[0045] Specifically, through communication between the control module 12 and the computer system 3, the control module 12 can control the connection and disconnection of all physical links in the gating module 11. Therefore, the control module 12 can effectively cooperate with the real-time application of the computer system 3 to control the gating module 11 to realize the connection and disconnection of hardware physical links between the computer system 3 and different target devices 2. The whole control process is simple, reliable and efficient, and can meet the real-time application needs of the computer system 3 in a timely and effective manner.

[0046] As an optional embodiment, at least one of the M fixed ends of the selection module 11 is in a floating state, where M is a positive integer greater than 1; Disconnecting the physical link between the target fixed end and its corresponding gate end to remove the target device 2 connected to the target fixed end from the corresponding computer system 3 includes: If the target fixed end and the suspended fixed end are fixed ends supported by the same gating end, control the physical link between the gating end corresponding to the target fixed end and the suspended fixed end to be connected, so as to disconnect the physical link between the target fixed end and its corresponding gating end. or, If there is another target device 2 that needs to be inserted into the computer system 3 corresponding to the target device 2 connected to the target fixed end, control the physical link between the selection terminal corresponding to the target fixed end and the fixed end connected to the other target device 2 to be connected, so as to disconnect the physical link between the target fixed end and its corresponding selection terminal. Among them, the other target device 2 is another target device 2 that is supported by the gating end corresponding to the target fixed end, and is not the target device 2 connected to the target fixed end.

[0047] Understandably, the gating module 11 used in practical applications is typically a one-to-many gating architecture (one gating terminal corresponds to multiple fixed terminals). That is, for a gating terminal, it can only be connected to one corresponding fixed terminal at any given time, and the physical links corresponding to the other fixed terminals will be disconnected from the gating terminal. Therefore, in order to achieve simultaneous hot-unplugging of all target devices 2, at least one of the M fixed terminals of the gating module 11 is in a floating state. For any gating terminal, when the physical link between the gating terminal and the fixed terminal in the floating state is connected, the target devices 2 connected to each fixed terminal corresponding to that gating terminal will be in a hot-unplugged state. In a preferred embodiment, among the M fixed terminals of the gating module 11, N fixed terminals corresponding one-to-one with the N gating terminals are in a floating state. That is, each gating terminal will have a corresponding fixed terminal in a floating state. Apart from the fixed terminal in a floating state, the other fixed terminals are used to connect to the target device 2. Alternatively, for a computer system 3, at least one corresponding fixed terminal in a floating state is present among one or more gating terminals connected to it.

[0048] Furthermore, when the gating module 11 is implemented using a one-to-many gating architecture, the connection of the physical link between a gating terminal and a fixed terminal indicates that the physical link between the gating terminal and other fixed terminals (other fixed terminals besides those connected by the physical link) is disconnected. Therefore, for any target device 2 connected to multiple fixed terminals corresponding to a gating terminal, if it is necessary to unplug the target device 2 connected to the first fixed terminal and plug in the target device 2 connected to the second fixed terminal at the same time, the gating terminal can be directly switched from the state connected through the first physical link to the state connected through the second physical link. The first physical link is the physical link between the first fixed terminal and the connected terminal, and the second physical link is the physical link between the second fixed terminal and the connected terminal. Switching the gating terminal to connect with a floating fixed terminal or to connect with other target devices 2 (target devices 2 connected to fixed terminals supported by the gating terminal besides those target devices 2) can both achieve hot-plugging of a target device 2, and can be flexibly selected according to the actual application requirements of the computer system 3.

[0049] It should be noted that the fixed end supported by a certain gated end refers to a fixed end with a physical link that can be used for gated connection. In this embodiment, the gated module 11 is specifically implemented using a one-to-many gated architecture. At this time, the target devices 2 corresponding to the multiple fixed ends are multiple target devices 2 that need to be time-division multiplexed by the computer system 3 connected to the gated end. These multiple target devices 2 are inserted into the computer system 3 in a time-division manner, and only one target device 2 is in the state of being inserted into the computer system 3 at any given time. Based on this gated architecture, the connection between multiple computer systems 3 or a computer system 3 that needs to insert multiple target devices 2 at the same time can be achieved by increasing the number of gated ends. The entire gated module 11 is implemented through multiple one-to-many gated architectures. For example, if a computer system 3 has the need to use the first device and the second device at the same time, the first device is connected to the computer system 3 through a one-to-many gated architecture using the first gated end, and the second device is connected to the computer system 3 through another one-to-many gated architecture using the second gated end. At this time, there can be one fixed end in the floating state in both one-to-many gated architectures. The specific implementation of the selection module 11 needs to be flexibly set according to the number of computer systems 3 and the usage requirements of computer systems 3 for target device 2. This application does not make any special limitations here, and is not limited to the implementation method described above in this embodiment.

[0050] Specifically, by designing a fixed end in a suspended state, the target device 2 can be hot-plugged by connecting the physical link corresponding to the fixed end in a suspended state; or the hot-plugging of one target device 2 and the hot-plugging of another target device 2 can be achieved simultaneously by switching the connected physical link to the physical link corresponding to another target device 2; the implementation methods are flexible and diverse, and the scope of application is wide.

[0051] See Figure 6 As shown, Figure 6 This is a flowchart illustrating a hot-plugging method provided by an embodiment of the present invention; to solve the above-mentioned technical problems, an embodiment of the present invention also provides a hot-plugging method applied to the aforementioned hot-pluggable connection device; the hot-plugging method includes: S11: Determine the target fixed end connected to the target device that needs to be hot-swapped and the hot-swapping action that needs to be performed. S12: If the hot-plug action to be performed is insertion, control the physical link between the target fixed end and its corresponding gate end to be connected so as to insert the target device connected to the target fixed end into the corresponding computer system. S13: If the hot-plug action to be performed is to remove, the physical link between the target fixed end and its corresponding strobe end is disconnected so that the target device connected to the target fixed end is removed from the corresponding computer system.

[0052] It is easy to understand that the hot-swappable connection device provided by the present invention can be connected to a computer system and a target device to realize hot-swapping between the target device and the computer system. The control module in the connection device can flexibly control the corresponding target device to perform hot insertion or hot removal according to the actual application requirements. The connection device effectively helps the target device to achieve hot-swapping.

[0053] For a description of the hot-plugging method provided in the embodiments of the present invention, please refer to the relevant description of the embodiments of the hot-plugging connection device, which will not be repeated here.

[0054] See Figure 7 As shown, Figure 7 This is a flowchart illustrating a hot-swap testing method provided by an embodiment of the present invention. To address the aforementioned technical problems, this embodiment also provides a hot-swap testing method applied to a test controller in a hot-swap testing system. The hot-swap testing system further includes a computer system, a target device, and the aforementioned hot-swap-enabled connection device. The hot-swap testing method includes: S21: Establish the connection between each fixed end in the hot-swappable connection device and the corresponding target device, and establish the connection between each selected end in the hot-swappable connection device and the corresponding computer system. S22: Determine the target fixed terminal connected to the target device for which the hot-swap function needs to be tested; S23: Control the insertion of the target device connected to the target fixed end into the corresponding computer system via a hot-swappable connection device; S24: Test the availability of the inserted target device using a computer system; S25: After completing the availability test of the target device, control the target device connected to the fixed end to unplug the corresponding computer system through a hot-swappable connection device.

[0055] It is understood that the hot-swappable connection device provided by this invention is particularly applicable to hot-swappable function testing scenarios. A hot-swappable connection device is set up in the hot-swappable testing system, and the test controller establishes a communication connection with the control module in the hot-swappable connection device to realize an automated hot-swappable function testing process. For any target device requiring hot-swappable function testing, after determining the corresponding target fixed end for connection, the hot-swappable connection device can be used to perform hot-insertion of the target device. Then, a usability test of the target device is performed in conjunction with a computer system to determine whether the target device is accurately and effectively inserted into the computer system. After completing the usability test, the hot-swappable connection device is used to perform hot-unplugging of the target device, completing the hot-swappable function testing process for the target device. This application does not specifically limit the specific type and implementation method of the test controller.

[0056] For a description of the hot-plug testing method provided in the embodiments of the present invention, please refer to the relevant description of the embodiments of the hot-plug connection device, which will not be repeated here.

[0057] As an optional embodiment, testing the availability of the inserted target device via a computer system includes: Determine whether the computer system can recognize the inserted target device; If the computer system can recognize the inserted target device, control the computer system to perform preset read and write operations through the inserted target device; If the computer system can complete the preset read and write operations through the inserted target device, then the inserted target device is deemed to have passed the availability test; If the computer system fails to recognize the inserted target device or fails to complete the preset read / write operation through the inserted target device, the inserted target device is deemed to have failed the availability test.

[0058] It's easy to understand that usability testing can specifically include two parts: identification and software operation testing. Software operation testing can include read and write operations, etc. Through software operation testing, it can be determined whether the computer system can utilize the currently inserted target device to perform the functions supported by the target device, such as data storage or retrieval via an SD card. Only when the computer system can recognize the target device and accurately perform the corresponding functional operations through the target device can it be said that the target device has achieved reliable and effective hot-swapping. Multi-faceted testing of the target device's hot-swapping functionality ensures the accurate and reliable implementation of the target device's hot-swapping function.

[0059] Specifically, the hot-swappable connection device provided by this invention can effectively simulate or realize the hot-swappable process of the target device by controlling the connection or disconnection of the physical link, thereby achieving a more realistic hot-swappable process and completing a reliable test of the hot-swappable function of the target device.

[0060] As a specific embodiment, taking a USB device as the target device, the specific testing process for hot-plugging functionality of a USB device is as follows. First, prepare the test environment. The computer system loads the USB driver and completes the connection between the USB device, the hot-pluggable connection device, and the computer system. The fixed terminal of the gating module in the hot-pluggable connection device is connected to the USB device under test, and the gating terminal is connected to the computer system under test. Initially, the gating terminal of the multiplexer is connected to the floating fixed terminal, and no USB device under test is connected. Taking the hot-plugging test of a USB device as an example, after the test begins, the computer system first sends a high-level GPIO signal to the control module in the hot-pluggable connection device, notifying the control module that the USB device needs to be hot-plugged. After receiving the high-level GPIO signal, the control module controls the gating module to connect the physical link between the fixed terminal connected to the USB device and the corresponding gating terminal, thus performing the hot-plugging of the USB device. After a USB device is hot-plugged in, the computer system identifies and enumerates the device. If the device is successfully identified, software tests such as read / write operations are performed to test its usability. Once the test is complete, the USB device needs to be hot-plugged. At this point, the computer system adjusts the GPIO signal output to the control module to a low level, notifying the control module that the USB device needs to be hot-plugged. Upon receiving this low-level GPIO signal, the control module disconnects the physical link between the fixed terminal connected to the USB device and the corresponding select terminal, thus hot-plugging the USB device. These steps are repeated to perform multiple hot-plug function tests on a single device or multiple different devices.

[0061] As another specific embodiment, taking an SD card as the target device, the specific test process for hot-swapping functionality of a certain SD card is as follows. First, prepare the test environment. The computer system loads the SD card driver and completes the connection between the SD card, the hot-swappable connection device, and the computer system. The fixed terminal of the gating module in the hot-swappable connection device is connected to the SD card under test, and the gating terminal is connected to the computer system under test. Initially, the gating terminal of the multiplexer is connected to the floating fixed terminal, and no SD card under test is connected. Taking the hot-swapping test of a certain SD card as an example, after the test begins, the computer system first sends a high-level GPIO signal to the control module in the hot-swappable connection device, notifying the control module that the SD card needs to be hot-swapped. After receiving the high-level GPIO signal, the control module controls the gating module to connect the physical link between the fixed terminal connected to the SD card and the corresponding gating terminal, thus performing the hot-swapping of the SD card. After the SD card is hot-inserted, the computer system recognizes and initializes the SD card. If the SD card is successfully recognized, software tests such as read and write operations are performed to test its usability. After the test is complete, the SD card needs to be hot-removed. At this time, the computer system adjusts the GPIO signal output to the control module to a low level, notifying the control module that the SD card needs to be hot-removed. After receiving the low-level GPIO signal, the control module controls the gating module to disconnect the physical link between the fixed terminal connected to the SD card and the corresponding gating terminal, thus hot-removing the SD card. The above steps are repeated to perform hot-plug function tests on a single device multiple times, or on multiple different devices.

[0062] It is understood that if the hot-plugging method or hot-plugging test method in the above embodiments 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 the present invention, in essence, or the part that contributes to the current technology, 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 executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.

[0063] To address the aforementioned technical problems, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned hot-plugging method or the steps of the aforementioned hot-plugging test method.

[0064] For a description of the computer-readable storage medium provided in the embodiments of the present invention, please refer to the relevant description of the embodiments of the hot-swappable connection device, which will not be repeated here.

[0065] To address the aforementioned technical problems, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the aforementioned hot-plugging method or the steps of the aforementioned hot-plugging test method.

[0066] For a description of the features in the computer program product provided in the embodiments of the present invention, please refer to the relevant description of the embodiments of the hot-swappable connection device, which will not be repeated here.

[0067] The foregoing has provided a detailed description of a hot-swappable connection device, hot-swappable method, testing method, and medium provided by embodiments of the present invention. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section.

[0068] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0069] The foregoing has provided a detailed description of the hot-swappable connection device, hot-swappable method, testing method, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A hot-swappable connection device, characterized in that, include: A gating module, comprising N gating terminals and M fixed terminals, where N is a positive integer and M is a positive integer; the fixed terminals are used to establish a connection with the target device, and the gating terminals are used to establish a connection with the computer system; The control module, with its output end connected to the control end of the gating module, is used to control the connection of the physical link between the target fixed end and its corresponding gating end, so as to insert the target device connected to the target fixed end into the corresponding computer system; and to control the disconnection of the physical link between the target fixed end and its corresponding gating end, so as to unplug the target device connected to the target fixed end from the corresponding computer system. The target fixed end is the fixed end to which the target device that needs to be hot-swapped in the gating module is connected.

2. The hot-swappable connection device according to claim 1, characterized in that, Also includes: N first physical ports are corresponding one-to-one with the N gating terminals. The first physical ports are set at the corresponding gating terminals and are used to establish a connection with the computer system. M second physical ports, each corresponding to one of the M fixed terminals, are located on the corresponding fixed terminals and are used to establish a connection with the target device.

3. The hot-swappable connection device according to claim 2, characterized in that, The target device is a USB device, and both the first physical port and the second physical port are USB interfaces.

4. The hot-swappable connection device according to claim 2, characterized in that, The target device is an SD card, and both the first physical port and the second physical port are SD card slots.

5. The hot-swappable connection device according to claim 1, characterized in that, The input terminal of the control module is connected to the output terminal of the computer system; The control module is also used to receive control signals output by the computer system and determine a hot-plug strategy for the target device based on the control signals. The hot-plug strategy includes the target device that needs to be hot-plugged and the hot-plug action that needs to be performed.

6. The hot-swappable connection device according to any one of claims 1 to 5, characterized in that, At least one of the M fixed ends of the selection module is in a floating state, where M is a positive integer greater than 1. Disconnecting the physical link between the target fixed terminal and its corresponding gate terminal to unplug the target device connected to the target fixed terminal from the corresponding computer system includes: If the target fixed end and the fixed end in the suspended state are fixed ends supported by the same gating end, control the physical link between the gating end corresponding to the target fixed end and the fixed end in the suspended state to connect, so as to disconnect the physical link between the target fixed end and its corresponding gating end. or, If there is another target device that needs to be inserted into the computer system corresponding to the target device connected to the target fixed end, control the physical link between the selection terminal corresponding to the target fixed end and the fixed end connected to the other target device to be connected, so as to disconnect the physical link between the target fixed end and its corresponding selection terminal. The other target device is a target device other than the target device connected to the target fixed end, which is supported by the gating end corresponding to the target fixed end.

7. A hot-swap method, characterized in that, Applied to a hot-swappable connection device as described in any one of claims 1-6; the hot-swappable method includes: Determine the target fixed end connected to the target device that needs to be hot-swapped and the hot-swapping action that needs to be performed. If the hot-plug action to be performed is insertion, control the physical link between the target fixed end and its corresponding gate end to be connected so as to insert the target device connected to the target fixed end into the corresponding computer system; If the hot-plug action to be performed is to remove the device, the physical link between the target fixed end and its corresponding strobe end is disconnected, so as to remove the target device connected to the target fixed end from the corresponding computer system.

8. A hot-plug testing method, characterized in that, A test controller is used in a hot-swap test system, the hot-swap test system further comprising a computer system, a target device, and a hot-swap-enabled connection device as described in any one of claims 1-6; the hot-swap test method includes: Establish connections between each fixed end of the hot-swappable connection device and the corresponding target device, and establish connections between each selected end of the hot-swappable connection device and the corresponding computer system. Determine the target fixed terminal to which the target device whose hot-swap function needs to be tested is connected; The hot-swappable connection device controls the insertion of the target device connected to the target fixed end into the corresponding computer system. The availability of the inserted target device is tested using the computer system; After completing the availability test of the target device, the target device connected to the target fixed end is unplugged from the corresponding computer system through the hot-swappable connection device.

9. The hot-plug testing method according to claim 8, characterized in that, Testing the usability of the inserted target device through the computer system includes: Determine whether the computer system can recognize the inserted target device; If the computer system can recognize the inserted target device, it controls the computer system to perform a preset read / write operation through the inserted target device; If the computer system is able to complete the preset read / write operation through the inserted target device, then the inserted target device is determined to have passed the availability test; If the computer system fails to recognize the inserted target device or fails to complete the preset read / write operation through the inserted target device, then the inserted target device is determined to have failed the availability test.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the hot-plugging method as described in claim 7 or the steps of the hot-plugging test method as described in any one of claims 8-9.