CN109918320A - A kind of control method of USB device, device and KVM control system - Google Patents

A kind of control method of USB device, device and KVM control system Download PDF

Info

Publication number
CN109918320A
CN109918320A CN201910190151.0A CN201910190151A CN109918320A CN 109918320 A CN109918320 A CN 109918320A CN 201910190151 A CN201910190151 A CN 201910190151A CN 109918320 A CN109918320 A CN 109918320A
Authority
CN
China
Prior art keywords
usb
host
usb host
target
kvm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910190151.0A
Other languages
Chinese (zh)
Other versions
CN109918320B (en
Inventor
关文杰
王志涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING TRICOLOR TECHNOLOGY Co Ltd
Original Assignee
BEIJING TRICOLOR TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING TRICOLOR TECHNOLOGY Co Ltd filed Critical BEIJING TRICOLOR TECHNOLOGY Co Ltd
Priority to CN201910190151.0A priority Critical patent/CN109918320B/en
Publication of CN109918320A publication Critical patent/CN109918320A/en
Application granted granted Critical
Publication of CN109918320B publication Critical patent/CN109918320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

This application provides a kind of control method of USB device, device and KVM control systems, wherein this method comprises: judging whether target general-purpose serial bus USB host is in abnormality;If so, generating enabled switching command;Start spare usb host according to enabled switching command to drive USB device.The embodiment of the present application is determining that target usb host is when in an abnormal state, can start spare usb host according to the enabled switching command of generation, so that spare usb host substitution target usb host drives USB device, to further realize human-computer interaction.

Description

A kind of control method of USB device, device and KVM control system
Technical field
This application involves fields of communication technology, control in particular to a kind of control method of USB device, device and KVM System processed.
Background technique
Universal serial bus (Universal Serial Bus, USB) equipment is as a kind of human-computer interaction device (Human Interface Device, HID), have the characteristics that pluggable, data transmission is reliable, extension is convenient, low cost, it has also become when The peripheral hardware of preceding electronic equipment indispensability.Such as mouse, keyboard, game paddle etc. are common USB devices.
In order to realize human-computer interaction, USB device needs to establish data chain by USB packet handing module and usb host It after being successfully driven USB device, is monitored so that usb host can drive USB device by the data transmission link of foundation on road Terminal can respond user by the data transmission link that above-mentioned USB packet handing module and USB device are established and pass through the USB The operational order that equipment issues.
Once the data transmission link between USB device and usb host will be among however, usb host is abnormal It is disconnected, lead to not drive USB device, to influence human-computer interaction.
Summary of the invention
In view of this, a kind of control method for being designed to provide USB device of the embodiment of the present application, device and KVM control System processed, it can be ensured that USB device is driven normally, and realizes human-computer interaction.
In a first aspect, the embodiment of the present application provides a kind of control method of USB device, wherein include:
Judge whether target general-purpose serial bus USB host is in abnormality;
If so, generating enabled switching command;
Start spare usb host according to the enabled switching command to drive USB device.
With reference to first aspect, the embodiment of the present application provides the first possible embodiment of first aspect, wherein institute It states and USB device is driven according to the enabled switching command starting spare usb host, comprising:
The enumeration request that the spare usb host is sent according to the enabled switching command is received, and described enumerate is asked It asks and is sent to the USB device;
It receives the USB device and responds the device attribute information that the enumeration request of the spare usb host returns;
The device attribute information is sent to the spare usb host, so that the spare usb host is to the USB Equipment is driven.
The possible embodiment of with reference to first aspect the first, the embodiment of the present application provide second of first aspect Possible embodiment, wherein judge whether target usb host is in abnormality, comprising:
After determining that the target usb host executes initialization operation, enumerating for the target usb host transmission is received Request, and the enumeration request is transmitted to the USB device;
It receives the USB device and responds the device attribute information that the enumeration request returns, and the device attribute is believed Breath is back to the target usb host;
Judge whether the number of the device attribute information matches with predetermined number;
If it is not, judging whether receive the enumeration request that the target usb host is sent again in preset duration;
If it is not, then the determining target usb host is in abnormality.
With reference to first aspect, the embodiment of the present application provides the third possible embodiment of first aspect, wherein sentences Whether disconnected target usb host is in abnormality, comprising:
Judge whether receive the timing data packet that the target usb host is sent in preset time point;
If not, it is determined that the target usb host is in abnormality.
With reference to first aspect, the embodiment of the present application provides the 4th kind of possible embodiment of first aspect, wherein institute Stating spare usb host includes virtual USB host and other usb hosts in addition to the target usb host;Make according to Before the spare usb host of energy switching command starting drives USB device, further includes:
Obtain the priority of the virtual USB host and other usb hosts in addition to the target usb host;
It is described that USB device is driven according to the enabled switching command starting spare usb host, comprising:
Start the virtual USB host and other in addition to the target usb host according to the enabled switching command The host of the highest priority of usb host drives USB device.
With reference to first aspect, the embodiment of the present application provides the 5th kind of possible embodiment of first aspect, wherein also Include:
Receive the reset signal that the target usb host is sent;
According to the reset signal, enabled reset instruction is generated;
Start target usb host according to the enabled reset instruction, to drive USB device by target usb host.
Second aspect, the embodiment of the present application also provides a kind of control devices of USB device, wherein includes:
Judgment module, for judging whether target general-purpose serial bus USB host is in abnormality;
Generation module generates enabled switching command if being in abnormality for the target usb host;
Control module drives USB device for starting spare usb host according to the enabled switching command.
In conjunction with second aspect, the embodiment of the present application provides the first possible embodiment of second aspect, wherein institute Control module is stated, is specifically used for:
The enumeration request that the spare usb host is sent according to the enabled switching command is received, and described enumerate is asked It asks and is sent to USB device;
It receives the USB device and responds the device attribute information that the enumeration request of the spare usb host returns;
The device attribute information is sent to the spare usb host, so that the spare usb host is to the USB Equipment is driven.
The third aspect, the embodiment of the present application also provides a kind of centralization KVM control systems, wherein including multiple main frames, KVM signal switching apparatus, KVM attend a banquet end, USB device, wherein the multiple host is connected with the KVM signal switching apparatus It connects, the KVM signal switching apparatus and the USB device end of attending a banquet with the KVM are connected;
The KVM, which attends a banquet, holds judgement currently to drive whether the host of the USB device is in abnormality, and should determining It currently drives the host of the USB device when in an abnormal state, generates enabled switching command, and by the enabled switching command It is transmitted to the KVM signal switching apparatus;
The multiple host is carried out enabled switching according to the enabled switching command by the KVM signal switching apparatus, with So that the USB device is driven.
Fourth aspect, the embodiment of the present application also provides a kind of distribution KVM control systems, wherein including multiple main frames, The corresponding KVM signalling terminals of each host, KVM reception signal terminal, USB device, wherein each host is corresponding KVM signalling terminals are connected with the KVM reception signal terminal, the KVM reception signal terminal and the USB device phase Connection;
KVM reception signal terminal judgement currently drives the host of the USB device whether to be in abnormality, and The determining host for deserving the preceding driving USB device is when in an abnormal state, generates enabled switching command, and enable to cut by described It changes instruction and is transmitted to the corresponding KVM signalling terminals of each host;
The corresponding KVM signalling terminals of each host according to the enabled switching command by the multiple host into Enforcement can switch, so that the USB device is driven.
Control method, device and the KVM control system of a kind of USB device provided by the embodiments of the present application, wherein this method It include: to judge whether target general-purpose serial bus USB host is in abnormality;If so, generating enabled switching command;According to Enabled switching command starts spare usb host and drives to USB device.The embodiment of the present application is determining at target usb host When abnormality, spare usb host can be started according to the enabled switching command of generation, so that spare usb host substitutes Target usb host drives USB device, to further realize human-computer interaction.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow chart of the control method of USB device provided by the embodiment of the present application one;
Fig. 2 shows the flow charts of the control method of another kind USB device provided by the embodiment of the present application one;
Fig. 3 shows the flow chart of the control method of another kind USB device provided by the embodiment of the present application one;
Fig. 4 shows the flow chart of the control method of another kind USB device provided by the embodiment of the present application one;
Fig. 5 shows the flow chart of the control method of another kind USB device provided by the embodiment of the present application one;
Fig. 6 shows a kind of structural schematic diagram of centralization KVM control system provided by the embodiment of the present application two;
Fig. 7 shows a kind of structural schematic diagram of distribution KVM control system provided by the embodiment of the present application three;
Fig. 8 shows a kind of structural schematic diagram of the control device of USB device provided by the embodiment of the present application four;
Fig. 9 shows the structural schematic diagram of electronic equipment provided by the embodiment of the present application five.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application Middle attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only It is some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is real The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, below to the application's provided in the accompanying drawings The detailed description of embodiment is not intended to limit claimed scope of the present application, but is merely representative of the selected reality of the application Apply example.Based on embodiments herein, those skilled in the art institute obtained without making creative work There are other embodiments, shall fall in the protection scope of this application.
Currently, USB device needs to establish data transmission link by USB packet handing module and target usb host, so that mesh Mark usb host can drive USB device that can utilize structure after being successfully driven USB device by the data transmission link of foundation The data transmission link built executes richer control program, such as to the business datum that USB device is formed in interactive operation Execute transparent transmission function.Once the data between USB device and target usb host are transmitted however, target usb host is abnormal Link will interrupt therewith, lead to not drive USB device, to influence human-computer interaction.In view of the above-mentioned problems, the embodiment of the present application Control method, device and the KVM control system of a kind of USB device provided, it can be ensured that USB device is driven normally, and is realized Human-computer interaction.
For convenient for understanding the embodiment of the present application, first to a kind of USB device disclosed in the embodiment of the present application Control method describes in detail.Specifically, embodiment one is introduced using USB packet handing module as executing subject.
Embodiment one
As shown in Figure 1, being the embodiment of the present application using USB packet handing module as the control method of the USB device of executing subject Flow chart, the specific steps are as follows:
S101, judge whether target general-purpose serial bus USB host is in abnormality.
In specific implementation, in target universal serial bus (Universal Serial Bus, USB) host normal driving In the case where USB device, user can be transmitted to monitoring eventually by the operational order that USB device issues by USB packet handing module End, so that monitor terminal responds the operational order.
Here, USB packet handing module can be with the working condition of real-time judge target usb host, and is determining target USB Host is when in an abnormal state, ensures that USB can be driven normally, using method provided by the embodiments of the present application to realize people Machine interaction, avoids USB device from losing because of the abnormal state of target usb host.
Specifically judge whether target usb host is in the method and step that abnormal method is referred to Fig. 2 and Fig. 3.
If S102, target usb host are in abnormality, enabled switching command is generated.
Here, it determines that target usb host is when in an abnormal state in USB packet handing module, enabled switching can be generated and refer to It enables.Wherein, which can indicate that host and USB device in addition to target usb host form data chain Road.
S103, USB device is driven according to enabled switching command starting spare usb host.
In specific implementation, spare usb host can be the virtual USB host constructed using fpga chip, can also be Other usb hosts in addition to target usb host.
Enabled switching command is transmitted to spare usb host by USB packet handing module, and spare usb host is according to receiving Enabled switching command is started, to realize the purpose for replacing target usb host driving USB device.
In keyboard-video-mouse (Keyboard Video Mouse, KVM) system, there can be virtual USB host and more A entity usb host is attached simultaneously, according to before enabling the spare usb host of switching command starting, can be obtained in advance The priority of virtual USB host and other usb hosts in addition to target usb host, then it is empty according to switching command starting is enabled Quasi- usb host and and other usb hosts in addition to target usb host in the highest host of priority level.Wherein, in advance to void Quasi- usb host and other usb hosts in addition to target usb host are provided with priority level, and priority level is highest as excellent The host first selected drives USB device to replace target usb host.
Here, the priority level of virtual USB host and other usb hosts in addition to target usb host can be user It is configured according to the device attribute information of virtual USB host and other usb hosts in addition to target usb host, may be used also Being configured according to use demand.
The highest host of priority level in starting virtual USB host and other usb hosts in addition to target usb host Later, if judging, the host is also at abnormality, starts the host that priority level is taken second place, and so on.
In specific implementation, the information that target usb host is in abnormality can also be transmitted to by USB packet handing module Monitor terminal, monitor terminal generate enabled switching command, this can be enabled switching command according to the user's choice and be transmitted to use The host of family selection, the host of starting user's selection.
Specifically, can come to start spare usb host to USB according to enabled switching command according to method as shown in Figure 2 Equipment is driven, the specific steps are as follows:
S201, the enumeration request that spare usb host is sent according to enabled switching command is received, and enumeration request is sent to USB device.
In specific implementation, when each host and USB device establish data link for the first time, business datum biography is being carried out Before defeated, host enumerates USB device.
In the embodiment of the present application, after enabled switching command is sent to spare usb host by USB packet handing module, After determining that spare usb host executes initialization operation, receives spare usb host and enumerated according to what enabled switching command was sent Request, and enumeration request is sent to USB device.
S202, the device attribute information that USB device responds the enumeration request return of spare usb host is received;
S203, device attribute information is sent to spare usb host, so that spare usb host drives USB device It is dynamic.
In specific implementation, USB device is responded according to the enumeration request received, extracts asking in the enumeration request Information is sought, and corresponding device attribute information is back to by USB packet handing module according to the solicited message in the enumeration request.Example Such as, the solicited message in enumeration request may include request USB device feedback device type, out business men etc..
USB packet handing module receives the corresponding device attribute information of enumeration request of USB device return, and by the equipment Attribute information is back to spare usb host.
Wherein, device attribute information may include descriptor, device type, the correlations such as transport-type for going out business men, support Information.
In the case where USB device is driven normally, USB packet handing module can make according to the practical interaction of USB device With situation, the business data packet comprising operational order is pass-through to usb host or any spare usb host, so that its response should Operational order executes corresponding operation, realizes human-computer interaction.
It is locating after being completed when sending enumeration request to USB device and to USB device enumeration due to target usb host State it is different, therefore, can respectively to target usb host when USB device sends enumeration request with it is complete to USB device enumeration Judged at target usb host later.In the embodiment of the present application, target USB master can be judged by following two method Whether machine is in abnormality, next, being illustrated respectively to above two method.
The first:
As shown in figure 3, judging whether target usb host is in abnormal shape when executing initialization operation for target usb host The method of state, wherein specific step is as follows:
S301, after determining that target usb host executes initialization operation, receive that target usb host sends enumerates and asks It asks, and enumeration request is transmitted to USB device;
S302, the device attribute information that USB device response enumeration request returns is received, and device attribute information is back to Target usb host;
S303, judge whether the number of device attribute information matches with predetermined number;
If the number and predetermined number of S304, device attribute information mismatch, judge whether receive in preset duration The enumeration request that target usb host is sent again;
If S305, not receiving the enumeration request that target usb host is sent again in preset duration, it is determined that target Usb host is in abnormality.
In specific implementation, after determining that target usb host executes initialization operation, USB packet handing module receives mesh The enumeration request that usb host is sent is marked, and enumeration request is transmitted to USB device.And USB device response enumeration request is returned Device attribute information be back to target usb host.
Here, target usb host realizes human-computer interaction according to the device attribute information of equipment come driving equipment.Wherein, The predetermined number that the corresponding device attribute information of each USB device can be preset in USB packet handing module, in each USB When device attribute information is back to USB packet handing module by equipment, equipment category that USB packet handing module can will have been received The number of property information is matched with above-mentioned predetermined number, to judge whether target usb host sends enumeration request again.
When the number and predetermined number for determining device attribute information mismatch, it is determined that target usb host will be sent out again Send enumeration request.USB packet handing module will judge whether to receive that target usb host sends again enumerates in preset duration Request, if not receiving the enumeration request that target usb host is sent again in preset duration, it is determined that at target usb host In abnormality.
Wherein, target usb host can send enumeration request at least once to USB device, and what is sent again enumerates It requests the content of request and the content of the enumeration request request sent for the first time can be identical, is also possible to different.
Second:
As shown in figure 4, to judge the method whether target usb host is in abnormality, wherein specific step is as follows:
S401, judge whether receive the timing data packet of target usb host transmission in preset time point;
If S402, the timing data packet for not receiving the transmission of target usb host in preset time point, it is determined that target USB Host is in abnormality.
In specific implementation, in target usb host execution initialization operation and during normal driving USB device, Target usb host can be according to preset time point to USB packet handing module transmission timing data packet, to characterize target usb host In normal condition.
Whether USB packet handing module real-time judge receives the timing data of target usb host transmission in preset time point Packet, and when preset time point does not receive the timing data packet of target usb host transmission, determine that target usb host is in Abnormality.
It is worth noting that during target usb host executes initialization operation, it both can be according to shown in Fig. 2 Method judges whether target usb host is in abnormality, can also judge target USB master according to method shown in Fig. 3 Whether machine is in abnormality.
In specific implementation, the factor for causing target usb host to be in abnormality includes the power-off of target usb host, even Wiring interruption etc., user can help to repair, for example, powering on to target usb host, so that target usb host restores just Normal state.
After target usb host restores normal condition, target usb host can be made according to method as shown in Figure 5 Continue normal driving USB device, wherein specific step is as follows:
S501, the reset signal that target usb host is sent is received;
S502, according to reset signal, generate enabled reset instruction;
S503, target usb host is started according to enabled reset instruction, to drive USB device by target usb host.
In the embodiment of the present application, after target usb host restores normal condition, reset signal can be generated, and should Reset signal is sent to USB packet handing module, and USB packet handing module makes to be capable of resetting finger according to the reset signal generation received It enables, and this is enabled into reset instruction and is transmitted to target usb host.
Target usb host is sent after receiving the enabled reset instruction, through USB packet handing module to USB device Enumeration request, and then USB device is driven, and then interrupted driving of the spare usb host to usb host equipment.
It is worth noting that after target usb host restores normal condition, if the working condition of USB device is in low Fast mode or Full-Speed mode, then target usb host directly can send enumeration request to USB device by USB packet handing module; If the working condition of USB device is in high-speed mode, need to detect usb bus, detection device end etc., and usb bus is cut It shifts to after high-speed mode, just enumeration request can be sent to USB device by USB packet handing module.
The embodiment of the present application generates enabled switching command after determining that target usb host is in abnormality, and starts Spare usb host avoids target usb host in the prior art and is abnormal so that spare usb host drives USB device, Data transmission link between USB device and usb host will interrupt therewith, lead to not drive USB device, to influence man-machine Interactive problem can ensure that USB device is driven normally according to the method for the embodiment of the present application, realize human-computer interaction.
Embodiment two
The embodiment of the present application two provides a kind of centralization KVM control system, referring to Fig. 6, centralization KVM control system System, including multiple main frames, KVM signal switching apparatus, KVM attend a banquet end, USB device, and plurality of host and KVM signal, which switch, to be set Standby to be connected, KVM signal switching apparatus and USB device end of attending a banquet with KVM are connected;
KVM, which attends a banquet, holds whether the host of the current driving USB device of judgement is in abnormality, and deserves preceding driving in determination The host of USB device is when in an abnormal state, generates enabled switching command, and enabled switching command is transmitted to KVM signal and is cut Exchange device;
Multiple main frames are carried out enabled switching according to enabled switching command by KVM signal switching apparatus, so that USB device quilt Driving.
It will be appreciated from fig. 6 that further including other in the centralization kvm system in addition to target usb host and virtual USB host Usb host 1, other usb hosts 2 and other usb hosts 3.Target usb host, virtual USB host, other usb hosts 1, other Usb host 2 and other usb hosts 3 are attached with KVM signal switching apparatus simultaneously, realize the operational order for receiving user, and By the purpose of video signal transmission to display.In practical applications, it can be set according to actual needs in the centralization kvm system The number of other usb hosts is set, the embodiment of the present application is not specifically limited in this embodiment.
KVM seat end namely USB packet handing module, the enumeration request that can be sent target usb host by hub It is transmitted to USB mouse and USB storage device (USB mouse and USB storage device be one of USB device), and by USB The device attribute information returned after mouse and USB storage device response enumeration request is back to target usb host, and then drives USB mouse and USB storage device.
In specific implementation, after target usb host normal driving USB mouse and USB storage device, monitor terminal is It can receive user and operational order sent by USB mouse, for example, vision signal is shown on display etc., and respond The operational order.
Whether KVM seat end can be in abnormality with real-time judge target usb host, and determine target usb host It is when in an abnormal state, according to the preferential of virtual USB host, other usb hosts 1, other usb hosts 2 and other usb hosts 3 Rank starts the highest host of priority level, and USB mouse and USB storage device are driven normally, and then monitors Terminal can receive user and send operational order by USB mouse, realize the purpose of human-computer interaction.
Embodiment three
The embodiment of the present application three provides a kind of distribution KVM control system, referring to Fig. 7, distribution KVM control system Including multiple main frames, the corresponding KVM signalling terminals of each host, KVM reception signal terminal, USB device, wherein each master The corresponding KVM signalling terminals of machine are connected with KVM reception signal terminal, and KVM reception signal terminal is connected with USB device It connects;
Whether the host of the current driving USB device of KVM reception signal terminal judgement is in abnormality, and deserves in determination The host of preceding driving USB device is when in an abnormal state, generates enabled switching command, and enabled switching command is transmitted to each The corresponding KVM signalling terminals of host;
Multiple main frames are carried out enabled switching according to enabled switching command by the corresponding KVM signalling terminals of each host, So that USB device is driven.
In specific implementation, in distributed KVM control system, since host side and KVM seat end will usually be based on net Network environment is distributed in strange land, therefore needs to arrange two USB packet processing on the data transmission link between each host and USB device Module, for realizing by the conversion between data and light/network data, to meet the requirement of corresponding transport protocol.
As shown in Figure 7, specifically included in the distribution KVM control system target usb host and virtual USB host, other Usb host 1 and other usb hosts 2, and target usb host is corresponding with KVM signalling terminals 1, other usb hosts 1 are corresponding with KVM signalling terminals 2, other usb hosts 2 are corresponding with KVM signalling terminals 3, KVM signalling terminals 1, KVM signal Terminal 2, KVM signalling terminals 3 are sent to communicate to connect by network-bus and KVM reception signal terminal.KVM signal receives Terminal is connected with monitor terminal, USB device.It in practical applications, can be according to practical need in distribution KVM control system The number that other usb hosts are set is sought, the embodiment of the present application is not specifically limited in this embodiment.
Here, KVM reception signal terminal namely namely USB packet handing module, can be by usb bus by target USB master The enumeration request that machine is sent is transmitted to USB device, and USB device is responded to the device attribute information returned after enumeration request and is returned To target usb host, and then drive USB device.
Whether KVM reception signal terminal can be in abnormality with real-time judge target usb host, and determine target Usb host is when in an abnormal state, opens according to the priority level of virtual USB host, other usb hosts 1, other usb hosts 2 The dynamic highest host of priority level, is driven normally USB device, and then monitor terminal can receive user and pass through USB device sends operational order, realizes the purpose of human-computer interaction.
Example IV
Based on the same inventive concept, the embodiment of the present application three additionally provides USB corresponding with the control method of USB device and sets Standby control device, the principle solved the problems, such as due to the device in the embodiment of the present application and the above-mentioned USB device of the embodiment of the present application Control method it is similar, therefore the implementation of device may refer to the implementation of method, and overlaps will not be repeated.
As shown in figure 8, the control device of USB device provided by a kind of embodiment of the application includes:
Judgment module 801, for judging whether target general-purpose serial bus USB host is in abnormality;
Generation module 802 generates enabled switching command if being in abnormality for target usb host;
Control module 803 drives USB device for starting spare usb host according to the enabled switching command.
In one embodiment, above-mentioned control module 803, is specifically used for:
After starting spare usb host according to the enabled switching command, the spare usb host is received according to The enumeration request that enabled switching command is sent, and the enumeration request is sent to USB device;
It receives the USB device and responds the device attribute information that the enumeration request of the spare usb host returns;
The device attribute information is sent to the spare usb host, so that spare usb host carries out USB device Driving.
In another embodiment, above-mentioned judgment module 801 is specifically used for:
After determining that target usb host executes initialization operation, the enumeration request that target usb host is sent is received, and Enumeration request is transmitted to USB device;
The device attribute information that USB device response enumeration request returns is received, and device attribute information is back to target Usb host;
Judge whether the number of device attribute information matches with predetermined number;
If it is not, judging whether receive the enumeration request that target usb host is sent again in preset duration;
If not, it is determined that target usb host is in abnormality.
In yet another embodiment, judgment module 801 is specifically used for:
Judge whether receive the timing data packet of target usb host transmission in preset time point;
If not, it is determined that target usb host is in abnormality.
In another embodiment, above-mentioned control module 803 is also used to:
Obtain the priority of the virtual USB host and other usb hosts in addition to the target usb host;
Start the virtual USB host and other in addition to the target usb host according to the enabled switching command The host of the highest priority of usb host drives USB device.
In another embodiment, the control device of above-mentioned USB device further include:
Reseting module 804, the reset signal sent for receiving the target usb host;
According to the reset signal, enabled reset instruction is generated;
Start target usb host according to the enabled reset instruction, to drive USB device by target usb host.
Embodiment five
As shown in figure 9, being the structural schematic diagram of electronic equipment provided by the embodiments of the present application, comprising: processor 901 is deposited Reservoir 902 and bus 903, the storage of memory 902 execute instruction, when electronic equipment operation, processor 901 and memory 902 Between communicated by bus 903, following processing is executed when machine readable instructions are executed by processor 901:
Judge whether target general-purpose serial bus USB host is in abnormality;
If so, generating enabled switching command;
Start spare usb host according to the enabled switching command to drive USB device.
Optionally, in the method that processor 901 executes, spare usb host pair is being started according to the enabled switching command After USB device is driven, further includes:
The enumeration request that spare usb host is sent according to enabled switching command is received, and enumeration request is sent to USB and is set It is standby;
It receives USB device and responds the device attribute information that the enumeration request of spare usb host returns;
Device attribute information is sent to spare usb host.
Optionally, in the method that processor 901 executes, judge whether target usb host is in abnormality, comprising:
After determining that target usb host executes initialization operation, the enumeration request that target usb host is sent is received, and Enumeration request is transmitted to USB device;
The device attribute information that USB device response enumeration request returns is received, and device attribute information is back to target Usb host;
Judge whether the number of device attribute information matches with predetermined number;
If it is not, judging whether receive the enumeration request that target usb host is sent again in preset duration;
If not, it is determined that target usb host is in abnormality.
Optionally, in the method that processor 901 executes, judge whether target usb host is in abnormality, comprising:
Judge whether receive the timing data packet of target usb host transmission in preset time point;
If not, it is determined that target usb host is in abnormality.
Optionally, in the method that processor 901 executes, the spare usb host includes virtual USB host and except the mesh Mark other usb hosts except usb host;USB device is carried out starting spare usb host according to the enabled switching command Before driving, further includes:
Obtain the priority of the virtual USB host and other usb hosts in addition to the target usb host;
It is described that USB device is driven according to the enabled switching command starting spare usb host, comprising:
Start the virtual USB host and other in addition to the target usb host according to the enabled switching command The host of the highest priority of usb host drives USB device.
Optionally, the method that processor 901 executes further include:
Receive the reset signal that target usb host is sent;
According to reset signal, enabled reset instruction is generated;
Start target usb host according to enabled reset instruction, to drive USB device by target usb host.
The computer journey of a kind of control method of USB device, device provided by the embodiment of the present application and KVM control system Sequence product, the computer readable storage medium including storing program code, before the instruction that program code includes can be used for execution Method in the embodiment of the method for face, specific implementation can be found in embodiment of the method, and details are not described herein.
Specifically, which can be general storage medium, such as mobile disk, hard disk, on the storage medium Computer program when being run, the control method of above-mentioned USB device is able to carry out, so as to determine target usb host It is when in an abnormal state, spare usb host can be started according to the enabled switching command of generation, so that spare usb host replaces USB device is driven for target usb host, to further realize human-computer interaction.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in the executable non-volatile computer-readable storage medium of a processor.Based on this understanding, the application Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words The form of product embodies, which is stored in a storage medium, including some instructions use so that One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment institute of the application State all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
Finally, it should be noted that embodiment described above, the only specific embodiment of the application, to illustrate the application Technical solution, rather than its limitations, the protection scope of the application is not limited thereto, although with reference to the foregoing embodiments to this Shen It please be described in detail, those skilled in the art should understand that: anyone skilled in the art Within the technical scope of the present application, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of the embodiment of the present application technical solution, should all cover the protection in the application Within the scope of.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.

Claims (10)

1. a kind of control method of USB device characterized by comprising
Judge whether target general-purpose serial bus USB host is in abnormality;
If so, generating enabled switching command;
Start spare usb host according to the enabled switching command to drive USB device.
2. the method according to claim 1, wherein described start spare USB according to the enabled switching command Host drives USB device, comprising:
The enumeration request that the spare usb host is sent according to the enabled switching command is received, and the enumeration request is sent out It send to the USB device;
It receives the USB device and responds the device attribute information that the enumeration request of the spare usb host returns;
The device attribute information is sent to the spare usb host, so that the spare usb host is to the USB device It is driven.
3. being wrapped the method according to claim 1, wherein judging whether target usb host is in abnormality It includes:
After determining that the target usb host executes initialization operation, receives the enumerating for target usb host transmission and ask It asks, and the enumeration request is transmitted to the USB device;
It receives the USB device and responds the device attribute information that the enumeration request returns, and the device attribute information is returned It is back to the target usb host;
Judge whether the number of the device attribute information matches with predetermined number;
If it is not, judging whether receive the enumeration request that the target usb host is sent again in preset duration;
If not, it is determined that the target usb host is in abnormality.
4. being wrapped the method according to claim 1, wherein judging whether target usb host is in abnormality It includes:
Judge whether receive the timing data packet that the target usb host is sent in preset time point;
If not, it is determined that the target usb host is in abnormality.
5. the method according to claim 1, wherein the spare usb host includes virtual USB host and except institute State other usb hosts except target usb host;Starting spare usb host to USB device according to the enabled switching command Before being driven, further includes:
Obtain the priority of the virtual USB host and other usb hosts in addition to the target usb host;
It is described that USB device is driven according to the enabled switching command starting spare usb host, comprising:
Start the virtual USB host and other USB masters in addition to the target usb host according to the enabled switching command The host of the highest priority of machine drives USB device.
6. the method according to claim 1, wherein further include:
Receive the reset signal that the target usb host is sent;
According to the reset signal, enabled reset instruction is generated;
Start target usb host according to the enabled reset instruction, to drive USB device by target usb host.
7. a kind of control device of USB device characterized by comprising
Judgment module, for judging whether target general-purpose serial bus USB host is in abnormality;
Generation module generates enabled switching command if being in abnormality for the target usb host;
Control module drives USB device for starting spare usb host according to the enabled switching command.
8. device according to claim 7, which is characterized in that the control module is specifically used for:
The enumeration request that the spare usb host is sent according to the enabled switching command is received, and the enumeration request is sent out It send to USB device;
It receives the USB device and responds the device attribute information that the enumeration request of the spare usb host returns;
The device attribute information is sent to the spare usb host, so that the spare usb host is to the USB device It is driven.
9. a kind of centralization KVM control system, which is characterized in that attend a banquet including multiple main frames, KVM signal switching apparatus, KVM End, USB device, wherein the multiple host is connected with the KVM signal switching apparatus, the KVM signal switching apparatus with USB device end of attending a banquet with the KVM is connected;
The KVM, which attends a banquet, holds judgement currently to drive whether the host of the USB device is in abnormality, and is determining that this is current It drives the host of the USB device when in an abnormal state, generates enabled switching command, and the enabled switching command is transmitted To the KVM signal switching apparatus;
The multiple host is carried out enabled switching according to the enabled switching command by the KVM signal switching apparatus, so that The USB device is driven.
10. a kind of distribution KVM control system, which is characterized in that including multiple main frames, the corresponding KVM signal hair of each host It makes arrangements for his funeral end, KVM reception signal terminal, USB device, wherein the corresponding KVM signalling terminals of each host and the KVM Reception signal terminal is connected, and the KVM reception signal terminal is connected with the USB device;
The KVM reception signal terminal judgement currently drives whether the host of the USB device is in abnormality, and in determination The host of the driving USB device is when in an abnormal state before deserving, and generates enabled switching command, and the enabled switching is referred to Order is transmitted to the corresponding KVM signalling terminals of each host;
The corresponding KVM signalling terminals of each host make the multiple host according to the enabled switching command It can switch, so that the USB device is driven.
CN201910190151.0A 2019-03-13 2019-03-13 Control method and device of USB equipment and KVM control system Active CN109918320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910190151.0A CN109918320B (en) 2019-03-13 2019-03-13 Control method and device of USB equipment and KVM control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910190151.0A CN109918320B (en) 2019-03-13 2019-03-13 Control method and device of USB equipment and KVM control system

Publications (2)

Publication Number Publication Date
CN109918320A true CN109918320A (en) 2019-06-21
CN109918320B CN109918320B (en) 2021-05-11

Family

ID=66964668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910190151.0A Active CN109918320B (en) 2019-03-13 2019-03-13 Control method and device of USB equipment and KVM control system

Country Status (1)

Country Link
CN (1) CN109918320B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782442A (en) * 2020-06-23 2020-10-16 深圳威尔视觉传媒有限公司 Equipment exception handling method and system, electronic equipment and storage medium
CN112596859A (en) * 2020-12-25 2021-04-02 创新科技术有限公司 USB transparent transmission method and device
CN112783701A (en) * 2020-12-30 2021-05-11 威创集团股份有限公司 USB function test method, device and equipment of KVM system
CN113660450A (en) * 2021-07-27 2021-11-16 深圳市拔超科技有限公司 Method and device for automatically switching video conference peripherals among multiple hosts
CN113835946A (en) * 2021-10-26 2021-12-24 北京淳中科技股份有限公司 Pressure testing method for data exchange

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930411A (en) * 2009-06-24 2010-12-29 佳能株式会社 Messaging device and control method thereof
CN101989248A (en) * 2009-07-31 2011-03-23 比亚迪股份有限公司 Universal serial bus (USB) equipment and method for restarting USB equipment
CN102339259A (en) * 2010-07-27 2012-02-01 董建飞 Device and method for operating USB (universal serial bus) interface equipment
CN102594605A (en) * 2012-03-05 2012-07-18 深圳市迈昂科技有限公司 Dual-host port universal serial bus (USB) hub and working method thereof
CN106656299A (en) * 2016-12-12 2017-05-10 上海拆名晃信息科技有限公司 Method and device for data transmission between virtual reality device and computer mainframe
CN106850715A (en) * 2015-12-04 2017-06-13 大唐移动通信设备有限公司 A kind of primary main frame dynamic selection method of Intrusion Detection based on host state and priority
CN106843527A (en) * 2017-01-20 2017-06-13 广州魅视电子科技有限公司 Distributed KVM attends a banquet cooperation management system
US20180239728A1 (en) * 2017-02-17 2018-08-23 Hewlett Packard Enterprise Development Lp Management controller including virtual usb host controller
CN108521467A (en) * 2018-04-24 2018-09-11 上海晨驭信息科技有限公司 Collection fraction KVM remotely attends a banquet cooperative system
CN109213530A (en) * 2018-08-13 2019-01-15 百富计算机技术(深圳)有限公司 A kind of communication connecting method based on USB, mobile terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930411A (en) * 2009-06-24 2010-12-29 佳能株式会社 Messaging device and control method thereof
CN101989248A (en) * 2009-07-31 2011-03-23 比亚迪股份有限公司 Universal serial bus (USB) equipment and method for restarting USB equipment
CN102339259A (en) * 2010-07-27 2012-02-01 董建飞 Device and method for operating USB (universal serial bus) interface equipment
CN102594605A (en) * 2012-03-05 2012-07-18 深圳市迈昂科技有限公司 Dual-host port universal serial bus (USB) hub and working method thereof
CN106850715A (en) * 2015-12-04 2017-06-13 大唐移动通信设备有限公司 A kind of primary main frame dynamic selection method of Intrusion Detection based on host state and priority
CN106656299A (en) * 2016-12-12 2017-05-10 上海拆名晃信息科技有限公司 Method and device for data transmission between virtual reality device and computer mainframe
CN106843527A (en) * 2017-01-20 2017-06-13 广州魅视电子科技有限公司 Distributed KVM attends a banquet cooperation management system
US20180239728A1 (en) * 2017-02-17 2018-08-23 Hewlett Packard Enterprise Development Lp Management controller including virtual usb host controller
CN108521467A (en) * 2018-04-24 2018-09-11 上海晨驭信息科技有限公司 Collection fraction KVM remotely attends a banquet cooperative system
CN109213530A (en) * 2018-08-13 2019-01-15 百富计算机技术(深圳)有限公司 A kind of communication connecting method based on USB, mobile terminal and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782442A (en) * 2020-06-23 2020-10-16 深圳威尔视觉传媒有限公司 Equipment exception handling method and system, electronic equipment and storage medium
CN111782442B (en) * 2020-06-23 2024-01-12 深圳威尔视觉传媒有限公司 Device exception handling method, system, electronic device and storage medium
CN112596859A (en) * 2020-12-25 2021-04-02 创新科技术有限公司 USB transparent transmission method and device
CN112783701A (en) * 2020-12-30 2021-05-11 威创集团股份有限公司 USB function test method, device and equipment of KVM system
CN113660450A (en) * 2021-07-27 2021-11-16 深圳市拔超科技有限公司 Method and device for automatically switching video conference peripherals among multiple hosts
CN113835946A (en) * 2021-10-26 2021-12-24 北京淳中科技股份有限公司 Pressure testing method for data exchange
CN113835946B (en) * 2021-10-26 2023-12-12 北京淳中科技股份有限公司 Pressure test method for data exchange

Also Published As

Publication number Publication date
CN109918320B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN109918320A (en) A kind of control method of USB device, device and KVM control system
US8745238B2 (en) Virtual hot inserting functions in a shared I/O environment
CN105786405B (en) A kind of online upgrading method, apparatus and system
US8407347B2 (en) Method of operating multiple input and output devices through a single computer
US7657688B2 (en) Dynamically allocating lanes to a plurality of PCI express connectors
CN106534281B (en) A kind of response method of request of data, apparatus and system
CN102314372A (en) The configuration of virtual machine I/O multipath
CN107193763B (en) Information processing method and electronic equipment
CN106254170A (en) Server online state-detection and the method and system of notice
US8819779B2 (en) Methods and systems for managing multiple information handling systems with a virtual keyboard-video-mouse interface
CN104424145A (en) Electronic device and data transmission method
CN109471779A (en) Board state monitoring method, micro-control unit, server and storage medium
CN103176913B (en) Hard disk method for mapping dynamically and the server applying it
US8725998B1 (en) Managing host computing devices with a host control component
CN107665141B (en) Database configuration method and equipment thereof
CN112416248A (en) Method and device for realizing disk array and electronic equipment
CN112181942A (en) Time sequence database system and data processing method and device
CN115658301A (en) Storage resource scheduling method, device, storage medium and electronic equipment
CN107908481A (en) A kind of method of data synchronization, device and system
US9081912B2 (en) Method and apparatus for node hot-swapping
CN106576068B (en) A kind of software security verification method, equipment and system
CN105677589A (en) Access control method, access control device and access control system
CN109408281A (en) Technology for headless server manageability and autonomous log recording
CN110069377A (en) A kind of monitoring method of multi-core processor, terminal and computer storage medium
CN106790453B (en) A kind of execution method and device of operation requests

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant