Fault repairing method and system of external equipment, electronic equipment and storage medium

Through the combination of fault detection and repair modules, communication abnormalities of external devices are automatically detected and repaired, which solves the problem of manual intervention in plug-in or restart operation inconvenient operation, realizes automatic fault repair of external devices, and improves the convenience of equipment recovery and efficiency.

CN119149320AInactive Publication Date: 2024-12-17SHENZHEN JIFANG IND CONTROL CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411632514.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, external equipment needs to be manually plugged and unplugged or restarted when encountering problems such as electromagnetic interference, insufficient power supply or signal attenuation, resulting in inconvenient operation.

Method used

The external device is read through the fault detection module. After detecting communication abnormalities, the repair module is used to re-connect the target USB connector and the power supply terminal, simulating plug-in or restart operations to achieve automatic fault repair.

Benefits of technology

Without manual intervention, automatic and convenient plug-in or restart of external devices is achieved, improving the convenience and speed of the equipment to restore normal working state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149320A_ABST
    Figure CN119149320A_ABST
Patent Text Reader

Abstract

The invention discloses a fault repairing method and system for external equipment, electronic equipment and a storage medium, and relates to the technical field of data communication, and the method comprises the steps: controlling a fault detection module, and carrying out the reading operation of each external equipment connected to the electronic equipment through a USB port; when the external equipment having the abnormal communication with the electronic equipment is detected based on the reading operation, taking the external equipment having the abnormal communication with the electronic equipment as target external equipment, and determining a target USB connector corresponding to a USB port accessed by the target external equipment; and the control repair module is used for executing re-conduction operation on the connection path between the target USB connector and the power supply end so as to re-power on the target external equipment, so that automatic and convenient plugging operation or restarting operation is performed on the external equipment under the condition that manual intervention is not needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a method and system for repairing a fault of an external device, an electronic device, and a storage medium. Background Art

[0002] USB (Universal Serial Bus) data transmission is currently the most widely used data communication standard in the embedded field. Because external devices corresponding to USB ports are very common, electronic devices on the market are usually equipped with USB ports for connecting external devices.

[0003] However, during the use of external devices, when there are problems such as electromagnetic interference, insufficient power supply, signal attenuation, etc., the external devices may fail abnormally, making it impossible for the electronic equipment to be put into normal use. If the electronic equipment is to be put into use again, it is necessary to manually plug and unplug the external device or restart it to control the external device to re-enter normal working state. However, this manual plug and unplug operation or restart operation requires manual intervention by the user, so it is inconvenient to operate.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a method, system, electronic device and storage medium for repairing a fault of an external device, aiming to solve the technical problem of how to implement the plug-in and unplug operation or restart operation of an external device without manual intervention.

[0006] To achieve the above purpose, the present application proposes a method for repairing a fault of an external device, the method for repairing a fault of an external device comprising: Controlling the fault detection module to respectively perform a read operation on each external device connected to the electronic device through the USB port; When an external device having communication anomaly with the electronic device is detected based on the read operation, the external device having communication anomaly with the electronic device is used as a target external device, and a target USB connector corresponding to the USB port to which the target external device is connected is determined; The control repair module performs a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0007] In one embodiment, before the step of controlling the fault detection module to respectively perform a read operation on each external device connected to the electronic device through the USB port includes: The port correspondence between each external device connected to the electronic device and each USB port and the working status of each external device are obtained through the fault detection module.

[0008] In one embodiment, the step of performing a read operation on each external device connected to the electronic device through a USB port includes: According to the preset interval time, a read command is sent to the USB controller in the fault detection module, and the USB controller is controlled to perform a read operation on the external device in a normal working state based on the read command, so as to obtain the key status code action of the external device in a normal working state based on the read operation.

[0009] In one embodiment, after the step of performing a read operation on each external device connected to the electronic device through a USB port, the method further comprises: Determine whether the key status code actions corresponding to each external device can be obtained based on the read operation; If the key status code action corresponding to the external device can be obtained based on the reading operation, it is determined that the external device and the electronic device can communicate normally; If the key status code action corresponding to the external device cannot be obtained based on the read operation, it is determined that there is a communication abnormality between the external device and the electronic device, and the step of taking the external device with the communication abnormality with the electronic device as the target external device is executed when the external device with the communication abnormality with the electronic device is detected based on the read operation.

[0010] In one embodiment, the step of controlling the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply terminal includes: The control repair module determines the USB connector corresponding to the USB port to which the target external device is connected as the target USB connector according to the port correspondence relationship of the target external device; The connection between the target USB connector and the power supply end is disconnected, and after a preset time, the connection between the target USB connector and the power supply end is reconnected.

[0011] In addition, to achieve the above purpose, the present application also proposes a fault recovery system, which includes: A fault detection module is used to perform a read operation on each external device connected to the electronic device through a USB port; The fault detection module is further used to, when an external device with abnormal communication with the electronic device is detected based on the reading operation, take the external device with abnormal communication with the electronic device as a target external device, and determine a target USB connector corresponding to the USB port to which the target external device is connected; The repair module is used to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0012] In one embodiment, the fault detection module includes a USB controller; The USB controller establishes a connection relationship with each USB port, and the USB controller stores device information of each USB connector corresponding to each USB port.

[0013] In one embodiment, the repair module includes: signal control unit; A plurality of USB drive switch devices are provided, one of which is connected between the USB connector and the power supply terminal. The USB drive switch device is also connected to the signal control unit for communication, and each USB drive switch device is controlled to be on and off by the signal control unit.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the external device fault repair method as described above.

[0015] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the external device fault repair method described above are implemented.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: A method for repairing a fault of an external device is proposed. The method for repairing a fault of an external device is applied to a fault repair system. The fault repair system is provided with a plurality of USB connectors, one end of each USB connector is connected to a power supply end, and the fault repair system is installed in an electronic device provided with a plurality of USB ports, one USB port corresponds to one USB connector, and the fault repair system includes a fault detection module and a repair module. The method for repairing a fault of an external device includes: controlling the fault detection module to perform a read operation on each external device connected to the electronic device through the USB port; when an external device having a communication abnormality with the electronic device is detected based on the read operation, the external device having a communication abnormality with the electronic device is taken as a target external device, and a target USB connector corresponding to the USB port to which the target external device is connected is determined; and controlling the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0017] The present application performs a reading operation on each external device connected to the electronic device through a fault repair system set up, so as to judge whether there is a communication abnormality in the communication connection between each external device and the electronic device according to the reading operation, that is, to judge whether there is a failure phenomenon in the external device connected to the electronic device, to realize automatic detection of the failure of the external device, and when the failure phenomenon of the external device is detected, after determining the target USB connector corresponding to the USB port to which the external device with the failure phenomenon is connected, perform a reconnection operation on the connection path between the target USB connector and the power supply end, so as to re-power on the external device with the failure phenomenon, that is, by controlling the on-off of the connection path between the target USB connector and the power supply end, simulate the plug-in or restart operation of the external device with the failure phenomenon, and realize automatic and convenient plug-in or restart operation of the external device without manual intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A flowchart of an embodiment of a method for repairing a fault of an external device of the present application; Figure 2 This is a module diagram of the fault repair system of this application; Figure 3 This is a schematic diagram of an example structure of the fault repair system of this application; Figure 4 A schematic diagram of a connection between a USB connector and a platform control hub in the fault repair system of the present application; Figure 5 A schematic diagram of a connection between a USB connector and a power supply terminal in the fault repair system of the present application; Figure 6 A schematic diagram of the device structure of the hardware operating environment involved in the external device fault repair method in the embodiment of the present application.

[0021] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0023] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of the embodiment of the present application is: controlling the fault detection module to perform a read operation on each external device connected to the electronic device through the USB port; when an external device with a communication abnormality with the electronic device is detected based on the read operation, the external device with a communication abnormality with the electronic device is used as the target external device, and the target USB connector corresponding to the USB port to which the target external device is connected is determined; and controlling the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0025] During the application of the external devices in the prior art, when there are problems such as electromagnetic interference, insufficient power supply, signal attenuation, etc., the external devices may fail abnormally, making it impossible for the electronic equipment to be put into normal use. If the electronic equipment is to be put into use again, it is necessary to manually plug and unplug the external device or restart it to control the external device to re-enter the normal working state. However, the manual plug and unplug operation or restart operation requires manual intervention by the user, so it is inconvenient to operate.

[0026] The present application provides a solution, by which a fault repair system is set up to perform a reading operation on each external device connected to the electronic device, so as to judge whether there is a communication abnormality in the communication connection between each external device and the electronic device according to the reading operation, that is, to judge whether there is a failure phenomenon in the external device connected to the electronic device, to realize automatic detection of the failure of the external device, and when the failure phenomenon of the external device is detected, after determining the target USB connector corresponding to the USB port to which the external device with the failure phenomenon is connected, a connection path between the target USB connector and the power supply end is reconnected, so as to re-power on the external device with the failure phenomenon, that is, by controlling the on-off of the connection path between the target USB connector and the power supply end, the plug-in and unplug operation or the restart operation of the external device with the failure phenomenon is simulated, so as to realize automatic and convenient plug-in and unplug operation or restart operation of the external device without manual intervention.

[0027] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes an electronic device as an example to illustrate this embodiment and the following embodiments.

[0028] Based on this, the present application embodiment provides a method for repairing a fault of an external device, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for repairing a fault of an external device according to the present invention.

[0029] In this embodiment, the fault repair method of the external device includes steps S10 to S30: Step S10, controlling the fault detection module to perform a read operation on each external device connected to the electronic device through the USB port.

[0030] It should be noted that the fault repair method of the external device implemented in this embodiment is based on the following Figure 2 The proposed fault repair system is implemented. The fault repair system is provided with a plurality of USB connectors, one end of each USB connector is connected to a power supply end, the fault repair system is installed in an electronic device provided with a plurality of USB ports, one USB port corresponds to one USB connector, and the fault repair system includes a fault detection module and a repair module.

[0031] This embodiment controls the fault detection module in the fault repair system to perform communication detection on the external device connected to any USB port of the electronic device to detect whether the external device connected to the electronic device has a failure phenomenon, so as to detect whether the electronic device in the current state is in a normal working state. The detection operation of this embodiment is to control the fault detection module to read each external device connected to the electronic device through the USB port respectively, and obtain the relevant device information on each external device. The relevant device information needs to be transmitted to the fault detection module based on the communication connection between the corresponding external device and the USB port on the electronic device. Therefore, when the external device is in normal operation, it can transmit the relevant device information to the fault detection module based on the communication connection. If the external device fails (i.e., it cannot run), the external device cannot transmit the relevant device information to the fault detection module based on the communication connection. Therefore, based on the fault detection module proposed in this embodiment, it can realize rapid detection and convenient troubleshooting of external devices with failure abnormal state.

[0032] In a feasible implementation manner, step S11 may be further included before step S10: Step S11, obtaining, through the fault detection module, the port correspondence between each of the external devices connected to the electronic device and each of the USB ports and the working status of each of the external devices.

[0033] Before detecting and troubleshooting the abnormal failure status of the external device through the fault detection module, it is necessary to obtain the port correspondence between the external device connected to the electronic device and the USB port on the electronic device, so as to determine the correspondence between the external device and the USB connector in the fault repair system, and determine which USB connector the external device is powered on through, so that the external device can be powered on again by subsequently controlling the conduction status of the path between the USB connector and the power supply end.

[0034] At the same time, it is also necessary to obtain the working status of external devices connected to the electronic device in order to screen out external devices in normal working status. External devices in stopped working status indicate that at the previous moment, whether they are failed has no effect on the operating status of the electronic device, so that external devices in stopped working status can be screened out subsequently to avoid waste of resources due to meaningless detection of external devices in stopped working status.

[0035] It should be noted that the port correspondence and working status in this embodiment can be obtained based on the USB controller in the fault detection module.

[0036] In a feasible implementation, step S10 may include step S12: Step S12, sending a read command to the USB controller in the fault detection module according to a preset interval, controlling the USB controller to perform a read operation on the external device that is in a normal working state based on the read command, so as to obtain a key status code action of the external device that is in a normal working state based on the read operation.

[0037] In this embodiment, in order to improve the timeliness of troubleshooting the operating status of the external device without wasting resources, it is proposed to control the detection module to perform troubleshooting on the external device at a preset interval. It should be noted that the fault detection module in this embodiment is equipped with monitoring software for the external device.

[0038] Specifically: the fault detection module will send a read command to the USB controller in the fault detection module based on the monitoring software at fixed intervals, for example, every 1 second. After receiving the read command, the USB controller will communicate with each external device connected to the electronic device through the USB port to obtain the key status code action corresponding to each external device in the normal working state. At this time, the USB controller will determine whether each external device can return its corresponding key status code action to the USB controller based on the communication with it, and then determine whether the communication connection between the external device and the electronic device is normal.

[0039] In a feasible implementation manner, step S10 may further include steps S13 to S15: Step S13, determining whether the key status code actions corresponding to each of the external devices can be obtained based on the reading operation.

[0040] Communicate with each external device through the USB controller, and judge whether the USB controller can receive the key status code action returned by each external device based on the communication operation, so as to judge whether the communication between each external device and the electronic device is normal, and whether each external device is in a normal operating state. For example, when the external device is a touch screen, the touch screen is connected to the electronic device. At this time, the fault detection module in the electronic device reads the key status code action of the touch screen through the USB controller, and detects whether the key status code action corresponding to the touch screen can be obtained based on the communication relationship between the electronic device and the touch screen, so as to judge whether the communication connection between the touch screen and the electronic device is normal, and whether the touch screen is in a normal operating state.

[0041] Step S14: If the key status code action corresponding to the external device can be obtained based on the reading operation, it is determined that the external device and the electronic device can communicate normally.

[0042] If the USB controller can read the corresponding key status code action from the external device through the read operation, it is considered that the external device and the electronic device can communicate normally. At this time, the external device is in a normal operating state and there is no abnormal failure phenomenon.

[0043] Step S15, if the key status code action corresponding to the external device cannot be obtained based on the read operation, it is determined that there is a communication abnormality between the external device and the electronic device, and the step of taking the external device with the communication abnormality as the target external device is executed when the external device with the communication abnormality is detected based on the read operation.

[0044] If the USB controller cannot read the corresponding key status code action from the external device through the read operation, it is considered that the external device and the electronic device cannot communicate normally. At this time, the external device is in a failed state and needs to be plugged in or restarted to re-power on the external device so that it can release the occupied resources and restore normal performance.

[0045] Step S20, when an external device with abnormal communication with the electronic device is detected based on the read operation, the external device with abnormal communication with the electronic device is used as a target external device, and a target USB connector corresponding to the USB port to which the target external device is connected is determined.

[0046] Based on step S15, when the fault detection module detects that a certain external device cannot return its corresponding key status code action to the USB controller, it is considered that there is a communication abnormality between the external device and the electronic device, and the external device is determined to be in a failed state. Therefore, the external device is determined as a target external device that needs to be powered on again, and the USB port to which the target external device is connected is determined to correspond to the USB connector in the fault repair system, and the corresponding USB connector is determined to be the target USB connector, so that the external device is powered on again by controlling the on-off state of the path between the target USB connector and the power supply end, thereby achieving power-on of the external device that has failed without the need for manual plug-in and unplugging or restarting of the external device.

[0047] Step S30, controlling the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply end, so as to re-power on the target external device.

[0048] In this embodiment, a repair module is provided in the fault repair system to reconnect the connection path between the target USB connector and the power supply end, that is, the connection path is disconnected for a certain period of time and then reopened to achieve the power-on operation of the target external device.

[0049] That is, this embodiment controls the connection path between the USB connector corresponding to the external device in the failed state and the power supply end, and reconnects the connection path, so that the power supply current at the power supply end first stops supplying power to the external device in the failed state and maintains it for a certain period of time, and then re-supplies the external device in the failed state, thereby simulating the plug-in or restart operation of the external device in the failed state without manual intervention, thereby improving the convenience and quickness of the re-powering operation of the external device to a certain extent.

[0050] In a feasible implementation, step S30 may include steps S31-S32: Step S31, controlling the repair module to determine the USB connector corresponding to the USB port to which the target external device is connected as the target USB connector according to the port correspondence of the target external device.

[0051] Step S32, disconnecting the connection between the target USB connector and the power supply end, and connecting the connection between the target USB connector and the power supply end after a preset time.

[0052] Because the external device connected to the electronic device in this embodiment is powered by the electronic device, the specific power supply path is: the power supply end transmits the power supply to the USB connector through the connection path between the power supply end and the USB connector, and the USB connector transmits the connected power supply to the corresponding USB port through the corresponding USB communication connection method. The USB port supplies power to the external device connected to the USB port according to the connected power supply.

[0053] Therefore, based on the above power supply path, the present embodiment proposes that after determining that the target external device is in a failed state, firstly, according to the port correspondence of the target external device, a target USB connector for powering the target external device is obtained, and the connection path between the target USB connector and the power supply end is controlled. First, the connection relationship between the target USB connector and the power supply end is controlled to be disconnected, and the electronic device is controlled to stop the power supply operation to the target external device, thereby simulating the operation of unplugging the connection interface of the target external device from the electronic device, and controlling the target external device to enter a shutdown / standby state. After waiting for a preset period of time, the connection relationship between the target USB connector and the power supply end is reconnected, and the electronic device is controlled to start powering the target external device, thereby simulating the operation of inserting the connection interface of the target external device into the electronic device, and controlling the target external device to enter an on state, so as to achieve plugging and unplugging or restarting the external device with a failed state without manual intervention.

[0054] The preset duration is set based on actual application requirements, and the preset duration in this embodiment is 1 to 3 seconds.

[0055] The present application also provides a fault recovery system, referring to Figure 2 As shown, the fault recovery system is provided with a plurality of USB connectors, one end of each USB connector is connected to a power supply end (i.e. Figure 2The fault recovery system is installed in an electronic device provided with a plurality of USB ports, one USB port corresponds to one USB connector, and the fault recovery system includes: A fault detection module is used to perform a read operation on each external device connected to the electronic device through a USB port; The fault detection module is further used to, when an external device with abnormal communication with the electronic device is detected based on the reading operation, take the external device with abnormal communication with the electronic device as a target external device, and determine a target USB connector corresponding to the USB port to which the target external device is connected; The repair module is used to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0056] As described in steps S10 to S30, the operation steps between the fault detection module and the repair module will not be repeated here.

[0057] It should be noted that the platform control hub (i.e. Figure 2 and Figure 3 The PCH in the platform control hub is a part of the electronic device. The fault detection module and the repair module are respectively arranged on the platform control hub. The fault detection module realizes the detection of the external device through the platform control hub, and the repair module obtains the detection result of the fault detection module through the platform control hub and outputs the corresponding control signal to the connection line between the USB connector and the power supply end.

[0058] Specifically, refer to Figure 3 As shown, the fault detection module includes a USB controller; The USB controller establishes a connection relationship with each USB port, and the USB controller stores device information of each USB connector corresponding to each USB port.

[0059] Figure 3 This is an example of installing a fault repair system on an electronic device proposed in this embodiment. The fault repair system is connected to the electronic device through a platform control hub on the electronic device. Specifically, a USB controller in the fault repair system is set on the platform control hub, and the platform control hub is provided with a plurality of USB ports for connecting to external devices. At the same time, the USB connector on the fault repair system is connected to the platform control hub, so that the USB controller can obtain the corresponding relationship between the USB port and the USB connector.

[0060] In the installation example proposed in this embodiment, the fault recovery system includes three 3.0 standard USB connectors, two 2.0 standard USB connectors and a universal USB connector, wherein the first 3.0 standard USB connector (i.e. Figure 3 USB 3.0 in 1) Establish 3.0 standard USB communication with the platform control hub through the upper and lower ports (i.e. port1~2) (i.e. Figure 3 3.0 standard USB connector (i.e. Figure 3 2) Establish a 3.0 standard USB communication connection with the platform control hub through the upper and lower ports (i.e. port3~4); the third 3.0 standard USB connector (i.e. Figure 3 USB 3.0 3) Establishes a 3.0 specification USB communication connection with the platform control hub through the upper and lower ports (i.e. port5~6); the first 2.0 specification USB connector (i.e. Figure 3 USB 2.0 in 1) Establish 2.0 standard USB communication with the platform control hub through the upper and lower ports (i.e. port1~2) (i.e. Figure 3 USB 2.0) connection; the second 2.0 specification USB connector (i.e. Figure 3 USB 2.0 2) through the upper and lower ports (i.e. port3~4) and through the USB hub (i.e. Figure 3 The USB HUB in the USB port establishes a 2.0 USB communication connection with the platform control hub; the universal USB connector (i.e. Figure 3 The USB port n) in the USB hub establishes a USB communication connection of 2.0 specification with the platform control hub via the USB hub.

[0061] The specific port connection relationship between the USB connector and the platform control hub can be referred to Figure 4 As shown, Figure 4 A schematic diagram showing the connection between the first 2.0 specification USB connector and the platform controller hub.

[0062] The upper end of the USB connector (i.e. Figure 4 UP in the middle) and the lower mouth (i.e. Figure 4 The connection between the DOWN in the upper port and the platform control hub is symmetrical, the D1- pin in the upper port is connected to the USB2_P1_DN in the platform control hub, and the D1+ pin is connected to the USB2_P1_DP in the platform control hub, and an inductor L1 is provided on the two connecting lines, which is the common-mode suppression inductor of the upper USB2.0 communication signal.

[0063] The SSRX1- pin in the upper port is connected to the USB31_P2_RX_DN in the platform control hub, and the SSRX1+ pin is connected to the USB31_P2_RX_DP in the platform control hub; the SSTX1- pin in the upper port is connected to the USB31_P2_TX_DN in the platform control hub, and the SSTX1+ pin is connected to the USB31_P2_TX_DP in the platform control hub, which is used to connect the USB differential signal in the upper USB connector, and a coupling capacitor (i.e. Figure 4 C1 and C2 in the figure are used to isolate external devices and the USB controller to prevent electrical damage and communication failure caused by level mismatch.

[0064] The D0- pin in the lower port is connected to the USB2_P2_DN in the platform control hub, and the D0+ pin is connected to the USB2_P2_DP in the platform control hub. An inductor L2 is provided on the two connecting lines. The inductor L2 is a common-mode suppression inductor for the USB2.0 communication signal of the lower port.

[0065] The SSRX0- pin in the lower port is connected to the USB31_P1_RX_DN in the platform control hub, and the SSRX0+ pin is connected to the USB31_P1_RX_DP in the platform control hub; the SSTX0- pin in the lower port is connected to the USB31_P1_TX_DN in the platform control hub, and the SSTX0+ pin is connected to the USB31_P1_TX_DP in the platform control hub, which is used to connect the USB differential signal in the USB connector, and a coupling capacitor (i.e. Figure 4 C3 and C4 in the figure are used to isolate external devices and the USB controller to prevent electrical damage and communication failure caused by level mismatch.

[0066] in, Figure 3 The power supply terminal in the example shown provides a +5V supply voltage (i.e. Figure 3 +5V_SB in the power supply.

[0067] Furthermore, the repair module includes: A signal control unit; a plurality of USB drive switch devices, one of the USB drive switch devices is connected between the USB connector and the power supply end, and the USB drive switch device is also communicatively connected with the signal control unit, and the signal control unit is used to control the on and off of each of the USB drive switch devices.

[0068] according to Figure 3It can be seen that the signal control unit in the repair module is set on the platform control hub, and each USB connector is connected to the power supply end through a drive switch device. The signal control unit is communicated with each USB drive switch device. After receiving the corresponding control signal, it controls the USB drive switch device between the target USB connector and the power supply end to disconnect based on the control signal, and after a preset time, controls the USB drive switch device to turn on, so as to realize the power-on operation of the target external device.

[0069] There are two ways to connect the USB driver switch device and the signal control unit. The first is to connect directly through the GPIO port on the platform control hub, such as Figure 3 The USB drive switch device 1 shown (i.e. Figure 3 SW1 in), USB driver switch device 2 (i.e. Figure 3 SW2 in), USB driver switch device 3 (i.e. Figure 3 SW3 in), USB driver switch device 4 (i.e. Figure 3 SW4 in the USB driver) and USB driver switch device 5 (i.e. Figure 3 The second method is to connect to the platform control hub through the I / O chip, such as Figure 3 The USB drive switch device 6 (i.e. Figure 3 SW6 in the I / O chip (i.e. Figure 3 The GPIO6 port on the SuperI / O in the I / O chip is connected to the GPIO6 port on the SuperI / O in the I / O chip through the optical fiber connector (i.e. Figure 3 UPC in) or communication bus (i.e. Figure 3 The eSPI in the SPI interface connects to the platform control hub.

[0070] Specifically, Figure 5 for Figure 4 The USB connector in the figure is connected to the power supply end. Figure 5 It can be seen that the USB driver switch device can be a controller (i.e. Figure 5 The two VBus pins in the USB connector are connected to the VOUT1~VOUT3 pins of the controller, which are used to connect the power supply when the controller is turned on (i.e. Figure 5 +5A in the VBus pin), connect the fifth capacitor on the VBus pin (i.e. Figure 5 C5 in), the sixth capacitor (i.e. Figure 5 C6 in the figure) and the seventh capacitor (i.e. Figure 5C7 in the figure is a power supply capacitor, which is used to implement power supply filtering. Among them, the EN pin of the controller is connected to the GPIO port of the platform control hub or the GPIO port of the I / O chip, and is used to perform on-off control according to the control signal transmitted by the signal control unit on the platform control hub. For example, when the control signal connected to the EN pin of the controller is a low-level signal, the EN pin, VIN pin and VIN2 pin are pulled low, and the VIN1 pin and VIN2 pin connected to the power supply end of the controller are not connected to the VOUT1~VOUT3 pins. At this time, the controller cannot output power to the USB connector; when the control signal connected to the EN pin of the controller is a high-level signal, the EN pin, VIN pin and VIN2 pin are pulled high, and the VIN1 pin and VIN2 pin connected to the power supply end of the controller are connected to the VOUT1~VOUT3 pins. At this time, the controller outputs power to the USB connector.

[0071] The driving power of the USB controller is provided by the USB power supply terminal (i.e. Figure 5 USBPWR in the .

[0072] It should be noted that the EN pin, the VIN pin and the VIN2 pin are connected with a first resistor R1, a second resistor R2 and an eighth capacitor C8 for filtering. The model of the USB connector used in this example is A052010220.

[0073] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the external device fault repair method in the above-mentioned embodiment one.

[0074] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0075] like Figure 6 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0076] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0077] The electronic device provided by the present application, using the fault repair method of the external device in the above embodiment, can realize the technical problem of plugging and unplugging or restarting the external device without manual intervention. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the fault repair method of the external device provided in the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0078] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0079] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0080] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the fault repair method for the external device in the above-mentioned embodiment.

[0081] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0082] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0083] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: controls the fault detection module to perform a read operation on each external device connected to the electronic device through a USB port; when an external device with a communication abnormality with the electronic device is detected based on the read operation, the external device with the communication abnormality with the electronic device is used as a target external device, and a target USB connector corresponding to the USB port to which the target external device is connected is determined; and controls the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

[0084] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0086] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0087] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned external device fault repair method, and can solve the technical problem of how to implement the plug-in and unplug operation or restart operation of the external device without manual intervention. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the external device fault repair method provided by the above-mentioned embodiment, and will not be repeated here.

[0088] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for repairing a fault of an external device, characterized in that: The fault repair method of the external device is applied to a fault repair system, wherein the fault repair system is provided with a plurality of USB connectors, one end of each of the USB connectors is connected to a power supply end, the fault repair system is installed in an electronic device provided with a plurality of USB ports, one of the USB ports corresponds to one of the USB connectors, and the fault repair system comprises a fault detection module and a repair module; The fault repair method of the external device includes: Controlling the fault detection module to respectively perform a read operation on each external device connected to the electronic device through the USB port; When an external device having communication abnormality with the electronic device is detected based on the reading operation, the external device having communication abnormality with the electronic device is used as a target external device, and a target USB connector corresponding to the USB port to which the target external device is connected is determined; The repair module is controlled to perform a reconnection operation on the connection path between the target USB connector and the power supply end, so as to re-power on the target external device.

2. The method for repairing a fault of an external device according to claim 1, characterized in that: Before the step of controlling the fault detection module to respectively perform a read operation on each external device connected to the electronic device through the USB port, the step includes: The fault detection module is used to obtain the port correspondence between each of the external devices connected to the electronic device and each of the USB ports and the working status of each of the external devices.

3. The method for repairing a fault of an external device according to claim 2, characterized in that: The step of performing a read operation on each external device connected to the electronic device through the USB port comprises: According to a preset interval, a read command is sent to the USB controller in the fault detection module, and the USB controller is controlled to perform a read operation on the external device whose working status is a normal working status based on the read command, so as to obtain a key status code action of the external device whose working status is a normal working status based on the read operation.

4. The method for repairing a fault of an external device according to claim 3, characterized in that: After the step of performing a read operation on each external device connected to the electronic device through the USB port, the following steps are included: Determine whether the key status code actions corresponding to each of the external devices can be obtained based on the read operation; If the key status code action corresponding to the external device can be obtained based on the reading operation, it is determined that the external device and the electronic device can communicate normally; If the key status code action corresponding to the external device cannot be obtained based on the read operation, it is determined that there is a communication abnormality between the external device and the electronic device, and the step of taking the external device with the communication abnormality with the electronic device as the target external device is executed when the external device with the communication abnormality with the electronic device is detected based on the read operation.

5. The method for repairing a fault of an external device according to claim 4, characterized in that: The step of controlling the repair module to perform a reconnection operation on the connection path between the target USB connector and the power supply end comprises: Controlling the repair module to determine the USB connector corresponding to the USB port to which the target external device is connected as the target USB connector according to the port correspondence relationship of the target external device; The connection between the target USB connector and the power supply end is disconnected, and after a preset time period, the connection between the target USB connector and the power supply end is connected.

6. A fault recovery system, characterized in that: The fault repair system is provided with a plurality of USB connectors, one end of each of the USB connectors is connected to a power supply end, the fault repair system is installed in an electronic device provided with a plurality of USB ports, one of the USB ports corresponds to one of the USB connectors, and the fault repair system comprises: A fault detection module, used to perform a read operation on each external device connected to the electronic device through the USB port; The fault detection module is further configured to, when an external device having communication abnormality with the electronic device is detected based on the reading operation, use the external device having communication abnormality with the electronic device as a target external device, and determine a target USB connector corresponding to a USB port to which the target external device is connected; The repair module is used to perform a reconnection operation on the connection path between the target USB connector and the power supply end to re-power on the target external device.

7. The fault recovery system according to claim 6, characterized in that: The fault detection module includes a USB controller; The USB controller establishes a connection relationship with each of the USB ports, and the USB controller stores device information of each of the USB connectors corresponding to each of the USB ports.

8. The fault recovery system according to claim 7, characterized in that: The repair module comprises: signal control unit; A plurality of USB drive switch devices, one of which is connected between the USB connector and the power supply end, and the USB drive switch device is also in communication connection with the signal control unit, and the signal control unit is used to control the on and off of each of the USB drive switch devices.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the external device fault repair method according to any one of claims 1 to 5.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the external device fault repair method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Device and method for testing recognition reliability of USB equipment

    CN104572364A

  • Hot plug test method, device and equipment

    CN112015609A

  • USB failure recovery method and system applied to industrial information security mainboard

    CN114116315A