CN108205504B - Terminal USB mapping method, virtual machine USB mapping method and system - Google Patents
Terminal USB mapping method, virtual machine USB mapping method and system Download PDFInfo
- Publication number
- CN108205504B CN108205504B CN201611169789.9A CN201611169789A CN108205504B CN 108205504 B CN108205504 B CN 108205504B CN 201611169789 A CN201611169789 A CN 201611169789A CN 108205504 B CN108205504 B CN 108205504B
- Authority
- CN
- China
- Prior art keywords
- equipment
- usb
- network
- information
- virtual machine
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention relates to a terminal USB mapping method, a virtual machine USB mapping method and a system, wherein the terminal USB mapping method comprises the following steps: acquiring a device identifier of the inserted USB device, and acquiring the type of the USB device according to the device identifier; if the type is the network sharable device, identifying the inserted USB device according to the device identifier; starting a network sharing mode of the identified USB equipment, and acquiring corresponding network equipment information; sending the network equipment information to the virtual machine, and enabling the virtual machine to add network mapping equipment corresponding to the USB equipment according to the network equipment information; if the type is non-network sharing equipment, establishing a data transmission channel between the inserted USB equipment and the virtual machine; and receiving a USB data request sent by the virtual machine through the data transmission channel, and returning storage information corresponding to the USB equipment to the virtual machine according to the USB data request. Therefore, two mapping modes are fused, the performance and the compatibility are considered, and the mapping efficiency is high.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a terminal USB mapping method, a virtual machine USB mapping method and a virtual machine USB mapping system.
Background
With the advent of cloud computing technology, various cloud application products are gradually put into use, such as cloud desktops. The cloud desktop is a personal computer application based on a cloud computing technology, and a user needs to remotely connect a host providing a virtual machine through a local terminal and access the virtual machine through the host to obtain a virtual computer operation interface. The cloud desktop can replace a personal computer for office work or study, and an important part covering the requirements of users is the mapping of USB equipment.
The mapping function of the USB equipment adopted by the traditional cloud desktop is realized based on a remote desktop transmission protocol (ICA protocol, PCoIP protocol, RDP protocol and SPICE protocol), or is realized by a third party based on a Server/Client mode, and the main mechanism is to transparently transmit a bidirectional URB (USB Request Block USB Request Block) in a special transmission channel, communicate the USB equipment with a USB interface of a local terminal, and directly convert the USB equipment into network communication between the USB equipment and the cloud desktop. The method has wide compatibility with USB equipment, but limits the performance of high-performance USB equipment, for example, the read-write performance of a USB flash disk can only reach 10% of the rated performance, and only one terminal can be mapped to one cloud desktop, so that simultaneous access among a plurality of cloud desktops is not supported, and the mapping efficiency is low.
Disclosure of Invention
In view of the above, it is desirable to provide a terminal USB mapping method, a virtual machine USB mapping method and a virtual machine USB mapping system with high mapping efficiency.
A terminal USB mapping method comprises the following steps:
when detecting that the USB equipment is inserted, acquiring an equipment identifier of the inserted USB equipment, and acquiring the type of the inserted USB equipment according to the equipment identifier;
if the type of the inserted USB equipment is the network sharable equipment, identifying the inserted USB equipment according to the equipment identifier;
starting a network sharing mode of the identified USB equipment, and acquiring network equipment information of the identified USB equipment;
sending the identified network equipment information of the USB equipment to a virtual machine, wherein the virtual machine is used for adding network mapping equipment corresponding to the USB equipment according to the identified network equipment information of the USB equipment;
if the type of the inserted USB equipment is non-network sharing equipment, establishing a data transmission channel between the inserted USB equipment and the virtual machine;
and receiving a USB data request sent by the virtual machine through the data transmission channel, and returning storage information corresponding to the USB equipment to the virtual machine according to the USB data request.
A terminal USB mapping system, comprising:
the type acquisition module is used for acquiring the equipment identifier of the inserted USB equipment when the USB equipment is detected to be inserted, and acquiring the type of the inserted USB equipment according to the equipment identifier;
the device identification module is used for identifying the inserted USB device according to the device identifier when the type of the inserted USB device is the network sharable device;
the sharing starting module is used for starting the network sharing mode of the identified USB equipment and acquiring the network equipment information of the identified USB equipment;
the information sending module is used for sending the identified network equipment information of the USB equipment to the virtual machine so that the virtual machine adds the network mapping equipment corresponding to the USB equipment according to the identified network equipment information of the USB equipment;
the channel establishing module is used for establishing a data transmission channel between the inserted USB equipment and the virtual machine when the type of the inserted USB equipment is non-network sharing equipment;
and the request receiving module is used for receiving the USB data request sent by the virtual machine through the data transmission channel and returning the storage information of the corresponding USB equipment to the virtual machine according to the USB data request.
According to the terminal USB mapping method and system, the device identifier of the inserted USB device is obtained, the type of the USB device is obtained according to the device identifier, and the mapping mode adopted by the USB device is judged according to the type; if the type of the inserted USB equipment is the network sharing equipment supporting the network sharing mode, adopting a network mapping mode of starting the network sharing mode; if the type of the inserted USB equipment is non-network sharing equipment which does not support the network sharing mode, a direct mapping mode for carrying out data transmission by establishing a data transmission channel is adopted. Because the reading performance of the equipment in the network sharing mode is greatly improved, the performance of the native USB equipment can be approached under the condition that the network is not limited, the equipment can be shared, and a plurality of virtual machines can be simultaneously accessed, therefore, the efficiency of the USB equipment mapping supporting the network sharing equipment can be improved by adopting a mechanism that two modes of network mapping and direct mapping are combined and adopting different equipment according to different types of USB equipment, the performance bottleneck caused by only adopting direct mapping through a data transmission channel is overcome, the problem that the network mapping cannot give consideration to other types of USB equipment is simultaneously avoided, the performance and compatibility are both considered, and the mapping efficiency is high.
A virtual machine USB mapping method comprises the following steps:
if the network equipment information of the identified USB equipment sent by the terminal is received, acquiring the storage information corresponding to the USB equipment according to the network equipment information of the identified USB equipment;
adding network mapping equipment corresponding to the USB equipment according to the storage information;
if a data transmission channel is established with the USB equipment inserted into the terminal, a USB data request is sent to the terminal;
and receiving the storage information of the corresponding USB equipment returned by the terminal according to the USB data request through the data transmission channel.
A virtual machine USB mapping system, comprising:
the information receiving module is used for acquiring storage information corresponding to the USB equipment according to the identified network equipment information of the USB equipment when the identified network equipment information of the USB equipment sent by the terminal is received;
the device adding module is used for adding network mapping devices corresponding to the USB devices according to the storage information;
the request sending module is used for sending a USB data request to the terminal when a data transmission channel is established between the request sending module and the USB equipment inserted into the terminal;
and the storage information acquisition module is used for receiving the storage information returned by the terminal according to the USB data request and corresponding to the USB equipment through the data transmission channel.
According to the virtual machine USB mapping method and system, when the network equipment information of the identified USB equipment is received, the storage information corresponding to the USB equipment is obtained according to the received network equipment information, and the network mapping equipment corresponding to the USB equipment is added according to the storage information; when detecting that a data transmission channel is established with the USB equipment inserted into the terminal, sending a USB data request to the terminal, and receiving the storage information of the corresponding USB equipment returned by the terminal according to the USB data request through the data transmission channel. Therefore, the mapping of the USB equipment is realized by adopting different modes according to different conditions, two modes of network mapping and direct mapping are adopted in a fusion manner, the performance and compatibility are considered, and the mapping efficiency is high.
Drawings
FIG. 1 is an environmental architecture diagram of a terminal, host and virtual machine;
FIG. 2 is a flow chart of a terminal USB mapping method according to an embodiment;
FIG. 3 is a flowchart of a terminal USB mapping method in another embodiment;
FIG. 4 is a block diagram of a terminal USB mapping system in accordance with an embodiment;
FIG. 5 is a flowchart of a USB mapping method for a virtual machine according to an embodiment;
FIG. 6 is a flowchart of a USB mapping method for a virtual machine according to another embodiment;
FIG. 7 is a block diagram of a virtual machine USB mapping system in accordance with an embodiment.
Detailed Description
In a cloud computing environment providing a cloud desktop, referring to fig. 1, a terminal 10, a host 20, and a virtual machine 30 provided by the host 20 are included. The host 20 is provided with a cloud operating system and provides a virtual machine 30; the virtual machine 30 installs a desktop operating system, such as: a Windows operating system; the Windows operating system supports RDP (Remote Desktop Protocol). During the remote communication between the terminal 10 and the virtual machine 30 through the RDP protocol, the USB device inserted into the terminal 10 may be mapped to the cloud desktop of the virtual machine 30.
Referring to fig. 2, a terminal USB mapping method in an embodiment, which is applicable to a terminal in remote communication with a virtual machine, includes the following steps.
S110: when the insertion of the USB equipment is detected, the equipment identifier of the inserted USB equipment is obtained, and the type of the USB equipment is obtained according to the equipment identifier.
The device identifier refers to a unique identification corresponding to the USB device, and in this embodiment, the device identifier refers to a ClassGUID (type global title code). When the USB device is detected to be inserted, the USB device is connected with the USB interface, and the device identifier of the inserted USB device can be acquired.
Types of USB devices include networkable and non-networkable devices. The network sharing device refers to a device supporting the network sharing mode, and the non-network sharing device refers to a device not supporting the network sharing mode. In one embodiment, the network shareable device includes a USB flash drive, a printer, and a camera.
Acquiring the type of the USB device according to the device identifier, specifically, determining whether the device identifier is consistent with a pre-stored device identifier of the network-sharable device, where the pre-stored device identifier may be one or multiple; if the USB device is consistent with the network sharable device, the inserted USB device is represented as the network sharable device, otherwise, the USB device is represented as the non-network sharable device.
S120: and if the type of the inserted USB equipment is the network sharable equipment, identifying the inserted USB equipment according to the equipment identifier.
The inserted USB device is identified, and attribute information such as the type of the USB device can be obtained.
S130: and starting the network sharing mode of the identified USB equipment, and acquiring the network equipment information of the identified USB equipment.
The network device information indicates information for indicating the USB device found in the network sharing mode, and may be generated after the network sharing mode of the USB device is turned on. In this embodiment, the network device information includes a URL (Uniform Resource Locator) and attribute information of the identified USB device. Wherein the attribute information is available upon identification of the inserted USB device.
S140: and sending the identified network equipment information of the USB equipment to the virtual machine, wherein the virtual machine is used for adding the network mapping equipment corresponding to the USB equipment according to the identified network equipment information of the USB equipment.
And after the identified USB equipment starts the network sharing mode, allowing the network neighbor to find the USB equipment on the network. By sending the network equipment information to the virtual machine, the virtual machine can find the corresponding USB equipment according to the network equipment information and add mapping to obtain the network mapping equipment. Therefore, the mapping of the USB equipment to the virtual machine is realized in a network mapping mode.
For example, the virtual machine finds the storage information of the corresponding USB device according to the URL, and maps the storage information to the information of the network mapping device. In the embodiment where the network device information includes attribute information, the virtual machine further determines a device name corresponding to the USB device according to the attribute information, and determines a name of the network mapping device according to the model. If the device name includes a usb disk, a printer, and a camera, the corresponding network mapping names are "network mapping usb disk", "network mapping printer", and "network mapping camera", respectively.
S150: and if the type of the inserted USB equipment is non-network sharing equipment, establishing a data transmission channel between the inserted USB equipment and the virtual machine.
The type of the inserted USB device is a non-network sharing device, which indicates that the inserted USB device does not support the network sharing mode, and at this time, a data transmission channel between the inserted USB device and the virtual machine is established, so that the mapping of the USB device is completed through the data transmission channel.
S160: and receiving a USB data request sent by the virtual machine through the data transmission channel, and returning storage information corresponding to the USB equipment to the virtual machine according to the USB data request.
The storage information of the USB device refers to information that can be called by the corresponding USB device, such as data stored in the USB disk. And carrying out data transmission through the data transmission channel, thus completing the mapping of the USB equipment to the virtual machine by adopting a direct mapping mode.
The terminal USB mapping method comprises the steps of acquiring the equipment identifier of the inserted USB equipment, acquiring the type of the USB equipment according to the equipment identifier, and judging the mapping mode adopted by the USB equipment according to the type; if the type of the inserted USB equipment is the network sharing equipment supporting the network sharing mode, adopting a network mapping mode of starting the network sharing mode; if the type of the inserted USB equipment is non-network sharing equipment which does not support the network sharing mode, a direct mapping mode for carrying out data transmission by establishing a data transmission channel is adopted. Because the reading performance of the equipment in the network sharing mode is greatly improved, the performance of the native USB equipment can be approached under the condition that the network is not limited, the equipment can be shared, and a plurality of virtual machines can be simultaneously accessed, therefore, the efficiency of the USB equipment mapping supporting the network sharing equipment can be improved by adopting a mechanism that two modes of network mapping and direct mapping are combined and adopting different equipment according to different types of USB equipment, the performance bottleneck caused by only adopting direct mapping through a data transmission channel is overcome, the problem that the network mapping cannot give consideration to other types of USB equipment is simultaneously avoided, the performance and compatibility are both considered, and the mapping efficiency is high.
In an embodiment, referring to fig. 3, before step S110, step S100 is further included.
S100: and establishing remote connection with the virtual machine and entering a cloud desktop.
In this embodiment, the virtual machine is a virtual machine installed with a Windows operating system, and supports an RDP protocol. The virtual machine establishes remote connection and enters a cloud desktop, and the remote connection can be realized through an RDP protocol. Remote connection is established through the virtual machine and the virtual machine enters a cloud desktop, so that USB mapping can be completed subsequently, and meanwhile a user can obtain an operation interface of the virtual machine at a terminal.
In an embodiment, with continued reference to fig. 3, after step S140, step S170 and step S180 are further included.
S170: and when detecting that the USB equipment pops up, acquiring the network equipment information of the popped USB equipment.
And detecting the insertion of the USB equipment, and indicating that the USB equipment is ejected out of the USB interface of the terminal. The USB equipment acquires the network equipment information before popping up, and the corresponding network equipment information can be searched by acquiring the equipment identifier of the popped up USB equipment.
S180: and sending the network equipment information of the popped USB equipment to the virtual machine, wherein the virtual machine is used for deleting the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped USB equipment.
And after the popped network equipment information of the USB equipment is sent to the virtual machine, the virtual machine can search and delete the corresponding network mapping equipment according to the network equipment information. For example, the network device information is a URL, and the virtual machine compares the URL corresponding to the network mapping device with the URL of the popped USB device, and deletes the corresponding network mapping device if the URL matches the URL.
The USB device pops up indicating that the USB device need not be used. When the USB equipment is popped up, the corresponding network equipment information is sent to the virtual machine, so that the virtual machine can delete the corresponding network mapping equipment in time, and the waste of the storage space of the virtual machine can be reduced.
Referring to fig. 4, the terminal USB mapping system in an embodiment, which is applicable to a terminal in remote communication with a virtual machine, includes a type obtaining module 110, a device identification module 120, a sharing start module 130, an information sending module 140, a channel establishing module 150, and a request receiving module 160.
The type obtaining module 110 is configured to, when detecting that a USB device is inserted, obtain a device identifier of the inserted USB device, and obtain a type of the inserted USB device according to the device identifier.
The device identifier refers to a unique identification corresponding to the USB device, and in this embodiment, the device identifier refers to a ClassGUID. Types of USB devices include networkable and non-networkable devices. The network sharing device refers to a device supporting the network sharing mode, and the non-network sharing device refers to a device not supporting the network sharing mode. In one embodiment, the network shareable device includes a USB flash drive, a printer, and a camera.
The device identification module 120 is configured to identify the plugged USB device according to the device identifier when the type of the plugged USB device is a network sharable device.
The inserted USB device is identified, and attribute information such as the type of the USB device can be obtained.
The share starting module 130 is configured to start a network sharing mode of the identified USB device, and acquire network device information of the identified USB device.
In this embodiment, the network device information includes a URL (Uniform Resource Locator) and attribute information of the identified USB device. Wherein the attribute information is available upon identification of the inserted USB device.
The information sending module 140 is configured to send the network device information of the identified USB device to the virtual machine, so that the virtual machine adds the network mapping device corresponding to the USB device according to the network device information of the identified USB device.
By sending the network equipment information to the virtual machine, the virtual machine can find the corresponding USB equipment according to the network equipment information and add mapping to obtain the network mapping equipment. Therefore, the mapping of the USB equipment to the virtual machine is realized in a network mapping mode.
The channel establishing module 150 is configured to establish a data transmission channel between the plugged USB device and the virtual machine when the type of the plugged USB device is a non-network sharing device.
The request receiving module 160 is configured to receive a USB data request sent by the virtual machine through the data transmission channel, and return storage information corresponding to the USB device to the virtual machine according to the USB data request.
And carrying out data transmission through the data transmission channel, thus completing the mapping of the USB equipment to the virtual machine by adopting a direct mapping mode.
In a similar way, the terminal USB mapping system adopts a mechanism that two modes of network mapping and direct mapping are combined, and different devices are adopted according to different types of USB devices, so that the USB device mapping efficiency supporting the network sharing device can be improved, the performance bottleneck caused by only adopting direct mapping through a data transmission channel is overcome, the problem that the network mapping cannot take into account the types of other USB devices is solved, the performance and compatibility are both considered, and the mapping efficiency is high.
In an embodiment, the terminal USB mapping system further includes a network connection module (not shown) configured to establish a remote connection with the virtual machine and enter the cloud desktop. Remote connection is established through the virtual machine and the virtual machine enters a cloud desktop, so that USB mapping can be completed subsequently, and meanwhile a user can obtain an operation interface of the virtual machine at a terminal.
In an embodiment, the terminal USB mapping system further includes an eject detection module (not shown) and an eject notification module (not shown).
The pop-up detection module is used for acquiring the network equipment information of the popped-up USB equipment when the pop-up of the USB equipment is detected. The pop-up notification module is used for sending the network equipment information of the popped-up USB equipment to the virtual machine so that the virtual machine deletes the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped-up USB equipment.
The USB device pops up indicating that the USB device need not be used. When the USB equipment is popped up, the corresponding network equipment information is sent to the virtual machine, so that the virtual machine can delete the corresponding network mapping equipment in time, and the waste of the storage space of the virtual machine can be reduced.
Referring to fig. 5, a USB mapping method for a virtual machine in an embodiment is applicable to a virtual machine in remote communication with a terminal, and includes the following steps.
S210: and if the network equipment information of the identified USB equipment, which is sent by the terminal, is received, acquiring the storage information corresponding to the USB equipment according to the network equipment information of the identified USB equipment.
When detecting that the type of the inserted USB equipment is the network sharable equipment, the terminal identifies the USB equipment and then sends corresponding network equipment information to the virtual machine. And receiving the network equipment information of the identified USB equipment sent by the terminal, wherein the network equipment information indicates that the USB equipment supporting the network sharing mode needs mapping, and at the moment, acquiring the storage information of the corresponding USB equipment according to the network equipment information of the identified USB equipment.
In one embodiment, the network device information includes a URL of the identified USB device. And the virtual machine acquires the equipment information of the USB equipment according to the network address specified by the URL.
S220: and adding the network mapping equipment corresponding to the USB equipment according to the storage information.
After the storage information is obtained, the virtual equipment can be automatically added according to the storage information to obtain the network mapping equipment. For example, the virtual machine maps the storage information to information on the virtual machine. Therefore, the mapping of the USB equipment to the virtual machine is realized in a network mapping mode.
In an embodiment, the network device information further includes attribute information of the USB device, and the virtual machine further determines a device name corresponding to the USB device according to the attribute information and determines a name of the network mapping device according to the model. If the device name includes a usb disk, a printer, and a camera, the corresponding network mapping names are "network mapping usb disk", "network mapping printer", and "network mapping camera", respectively.
S230: and if a data transmission channel is established with the USB equipment inserted into the terminal, sending a USB data request to the terminal.
When detecting that the type of the inserted USB device is the non-network sharing device, the terminal establishes a data transmission channel between the USB device and the virtual machine with the virtual machine. If the data transmission channel established with the USB equipment is detected, the USB equipment which does not support the network sharing mode needs to be mapped, and at the moment, the USB data request is sent to the terminal.
S240: and receiving the storage information of the corresponding USB equipment returned by the terminal according to the USB data request through the data transmission channel.
The USB data request is used for acquiring storage information of the USB device. And the terminal acquires corresponding storage information according to the USB data request and returns the corresponding storage information through the data transmission channel. Thus, the mapping of the USB equipment to the virtual machine is completed in a direct mapping mode.
According to the virtual machine USB mapping method, when network equipment information of identified USB equipment is received, storage information corresponding to the USB equipment is obtained according to the received network equipment information, and network mapping equipment corresponding to the USB equipment is added according to the storage information; when detecting that a data transmission channel is established with the USB equipment inserted into the terminal, sending a USB data request to the terminal, and receiving the storage information of the corresponding USB equipment returned by the terminal according to the USB data request through the data transmission channel. Therefore, the mapping of the USB equipment is realized by adopting different modes according to different conditions, two modes of network mapping and direct mapping are adopted in a fusion manner, the performance and compatibility are considered, and the mapping efficiency is high.
In an embodiment, referring to fig. 6, the virtual machine USB mapping method further includes step S250.
S250: and if the network equipment information of the popped USB equipment sent by the terminal is received, deleting the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped USB equipment.
When detecting that the USB equipment with the type capable of being shared by the network pops up, the terminal sends the network equipment information of the popped up USB equipment to the virtual machine. By deleting the corresponding network mapping equipment when the network equipment information of the popped USB equipment is received, the waste of the storage space of the virtual machine can be reduced.
Referring to fig. 7, the USB mapping system for a virtual machine in an embodiment, which is applicable to a virtual machine in remote communication with a terminal, includes an information receiving module 210, a device adding module 220, a request sending module 230, and a storage information obtaining module 240.
The information receiving module 210 is configured to, when receiving the network device information of the identified USB device sent by the terminal, obtain storage information corresponding to the USB device according to the network device information of the identified USB device.
The device adding module 220 is configured to add a network mapping device corresponding to the USB device according to the storage information. Therefore, the mapping of the USB equipment to the virtual machine is realized in a network mapping mode.
The request sending module 230 is configured to send a USB data request to the terminal when a data transmission channel is established with a USB device inserted into the terminal.
The storage information obtaining module 240 is configured to return the storage information of the corresponding USB device according to the USB data request through the data transmission channel receiving terminal. Thus, the mapping of the USB equipment to the virtual machine is completed in a direct mapping mode.
The virtual machine USB mapping system realizes the mapping of the USB equipment in different modes according to different conditions, integrates two modes of network mapping and direct mapping, can give consideration to both performance and compatibility, and has high mapping efficiency.
In an embodiment, the virtual machine USB mapping system further includes an apparatus deleting module (not shown), configured to delete the network mapping apparatus corresponding to the USB apparatus according to the network apparatus information of the popped USB apparatus when receiving the network apparatus information of the popped USB apparatus sent by the terminal.
By deleting the corresponding network mapping equipment when the network equipment information of the popped USB equipment is received, the waste of the storage space of the virtual machine can be reduced.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A terminal USB mapping method is characterized by comprising the following steps:
when detecting that the USB equipment is inserted, acquiring an equipment identifier of the inserted USB equipment, and acquiring the type of the inserted USB equipment according to the equipment identifier; the types of the USB equipment comprise a network sharable equipment and a non-network shared equipment;
if the type of the inserted USB equipment is the network sharable equipment, identifying the inserted USB equipment according to the equipment identifier;
starting a network sharing mode of the identified USB equipment, and acquiring network equipment information of the identified USB equipment, wherein the network equipment information comprises URL (uniform resource locator) and attribute information of the identified USB equipment;
sending the identified network equipment information of the USB equipment to a virtual machine, wherein the virtual machine is used for adding network mapping equipment corresponding to the USB equipment according to the identified network equipment information of the USB equipment;
if the type of the inserted USB equipment is non-network sharing equipment, establishing a data transmission channel between the inserted USB equipment and the virtual machine;
and receiving a USB data request sent by the virtual machine through the data transmission channel, and returning storage information corresponding to the USB equipment to the virtual machine according to the USB data request.
2. The terminal USB mapping method according to claim 1, wherein after sending the network device information of the identified USB device to the virtual machine, the method further comprises:
when detecting that the USB equipment pops up, acquiring network equipment information of the popped up USB equipment;
and sending the network equipment information of the popped USB equipment to the virtual machine, wherein the network equipment information is used for deleting the network mapping equipment corresponding to the USB equipment by the virtual machine according to the network equipment information of the popped USB equipment.
3. A terminal USB mapping method according to claim 1, wherein before obtaining the device identifier of the inserted USB device when detecting that the USB device is inserted and obtaining the type of the inserted USB device according to the device identifier, the method further comprises:
and establishing remote connection with the virtual machine and entering a cloud desktop.
4. A terminal USB mapping method according to claim 1, wherein the network sharable device includes a USB disk, a printer and a camera.
5. A virtual machine USB mapping method is characterized by comprising the following steps:
if the network equipment information of the identified USB equipment sent by the terminal is received, acquiring the storage information corresponding to the USB equipment according to the network equipment information of the identified USB equipment; the type of the identified USB equipment is network sharable equipment, wherein the network equipment information comprises URL and attribute information of the identified USB equipment;
adding network mapping equipment corresponding to the USB equipment according to the storage information;
if a data transmission channel is established with the USB equipment which is inserted into the terminal and is of the type of the non-network sharing equipment, sending a USB data request to the terminal;
and receiving the storage information of the corresponding USB equipment returned by the terminal according to the USB data request through the data transmission channel.
6. The virtual machine USB mapping method according to claim 5, further comprising:
and if the network equipment information of the popped USB equipment sent by the terminal is received, deleting the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped USB equipment.
7. A terminal USB mapping system, comprising:
the type acquisition module is used for acquiring the equipment identifier of the inserted USB equipment when the USB equipment is detected to be inserted, and acquiring the type of the inserted USB equipment according to the equipment identifier; the types of the USB equipment comprise a network sharable equipment and a non-network shared equipment;
the device identification module is used for identifying the inserted USB device according to the device identifier when the type of the inserted USB device is the network sharable device;
the sharing starting module is used for starting a network sharing mode of the identified USB equipment and acquiring network equipment information of the identified USB equipment, wherein the network equipment information comprises URL (uniform resource locator) and attribute information of the identified USB equipment;
the information sending module is used for sending the identified network equipment information of the USB equipment to the virtual machine so that the virtual machine adds the network mapping equipment corresponding to the USB equipment according to the identified network equipment information of the USB equipment;
the channel establishing module is used for establishing a data transmission channel between the inserted USB equipment and the virtual machine when the type of the inserted USB equipment is non-network sharing equipment;
and the request receiving module is used for receiving the USB data request sent by the virtual machine through the data transmission channel and returning the storage information of the corresponding USB equipment to the virtual machine according to the USB data request.
8. The terminal USB mapping system according to claim 7, further comprising:
the pop-up detection module is used for acquiring network equipment information of the popped-up USB equipment when the pop-up of the USB equipment is detected;
and the pop-up notification module is used for sending the network equipment information of the popped-up USB equipment to the virtual machine so that the virtual machine deletes the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped-up USB equipment.
9. A virtual machine USB mapping system, comprising:
the information receiving module is used for acquiring storage information corresponding to the USB equipment according to the identified network equipment information of the USB equipment when the identified network equipment information of the USB equipment sent by the terminal is received; the type of the identified USB equipment is network sharable equipment;
the device adding module is used for adding network mapping devices corresponding to the USB devices according to the storage information;
the request sending module is used for sending a USB data request to the terminal when a data transmission channel is established between the request sending module and the USB equipment which is inserted into the terminal and is of the type of non-network sharing equipment;
and the storage information acquisition module is used for receiving the storage information returned by the terminal according to the USB data request and corresponding to the USB equipment through the data transmission channel.
10. The virtual machine USB mapping system of claim 9, further comprising:
and the equipment deleting module is used for deleting the network mapping equipment corresponding to the USB equipment according to the network equipment information of the popped USB equipment when the network equipment information of the popped USB equipment sent by the terminal is received.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611169789.9A CN108205504B (en) | 2016-12-16 | 2016-12-16 | Terminal USB mapping method, virtual machine USB mapping method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611169789.9A CN108205504B (en) | 2016-12-16 | 2016-12-16 | Terminal USB mapping method, virtual machine USB mapping method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108205504A CN108205504A (en) | 2018-06-26 |
CN108205504B true CN108205504B (en) | 2021-01-12 |
Family
ID=62602515
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611169789.9A Active CN108205504B (en) | 2016-12-16 | 2016-12-16 | Terminal USB mapping method, virtual machine USB mapping method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108205504B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150863B (en) * | 2018-07-31 | 2020-10-09 | 华为技术有限公司 | Desktop cloud access control method and device and desktop cloud terminal equipment |
CN109144752A (en) * | 2018-09-06 | 2019-01-04 | 郑州云海信息技术有限公司 | Access shared USB device method and apparatus |
CN111045834B (en) * | 2018-10-15 | 2023-08-08 | 中兴通讯股份有限公司 | Method, device and storage medium for accessing USB storage device under cloud desktop |
CN110928644A (en) * | 2019-11-15 | 2020-03-27 | 北京浪潮数据技术有限公司 | USB management method, device, equipment and medium based on cloud platform |
CN115168252B (en) * | 2022-07-05 | 2024-02-09 | 珠海趣印科技有限公司 | Universal debugging method and system for printing terminal |
CN117478719B (en) * | 2023-10-30 | 2024-04-19 | 上海贝锐信息科技股份有限公司 | DWC 3-based universal USB device remote mapping method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101410803A (en) * | 2006-01-24 | 2009-04-15 | 思杰系统有限公司 | Methods and systems for providing access to a computing environment |
KR101239290B1 (en) * | 2012-07-23 | 2013-03-06 | (주)엔텍 | A system and method for setting virtual machines in a virtual server supporting zero clients |
CN104298473A (en) * | 2014-10-12 | 2015-01-21 | 张维加 | Method and device for achieving computing virtualization by nesting virtual disk to virtual machine |
CN105144633A (en) * | 2013-03-15 | 2015-12-09 | 亚马逊科技公司 | Network traffic mapping and performance analysis |
CN105183674A (en) * | 2015-08-26 | 2015-12-23 | 深圳市深信服电子科技有限公司 | USB virtualization network mapping method, USB virtualization network mapping device and USB hub |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100472452C (en) * | 2006-06-23 | 2009-03-25 | 联想(北京)有限公司 | Method for switching a system of virtual machine and hardware devices |
CN102523264B (en) * | 2011-12-06 | 2014-07-02 | 北京航空航天大学 | USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine |
CN103052170B (en) * | 2012-12-21 | 2016-04-13 | Tcl通讯(宁波)有限公司 | A kind of method that network based on cell phone network share service connects and mobile phone |
CN105100157B (en) * | 2014-05-15 | 2019-08-27 | 中兴通讯股份有限公司 | A kind of USB device mapping, exchange method, device, cloud terminal and Cloud Server |
CN105391652B (en) * | 2015-12-03 | 2018-08-31 | 武汉噢易云计算股份有限公司 | The system and method for realizing USB device network share is redirected based on USB |
-
2016
- 2016-12-16 CN CN201611169789.9A patent/CN108205504B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101410803A (en) * | 2006-01-24 | 2009-04-15 | 思杰系统有限公司 | Methods and systems for providing access to a computing environment |
KR101239290B1 (en) * | 2012-07-23 | 2013-03-06 | (주)엔텍 | A system and method for setting virtual machines in a virtual server supporting zero clients |
CN105144633A (en) * | 2013-03-15 | 2015-12-09 | 亚马逊科技公司 | Network traffic mapping and performance analysis |
CN104298473A (en) * | 2014-10-12 | 2015-01-21 | 张维加 | Method and device for achieving computing virtualization by nesting virtual disk to virtual machine |
CN105183674A (en) * | 2015-08-26 | 2015-12-23 | 深圳市深信服电子科技有限公司 | USB virtualization network mapping method, USB virtualization network mapping device and USB hub |
Also Published As
Publication number | Publication date |
---|---|
CN108205504A (en) | 2018-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108205504B (en) | Terminal USB mapping method, virtual machine USB mapping method and system | |
EP2876869B1 (en) | Method and system for installing application | |
US10193971B2 (en) | Method, server and system for application synchronization | |
CN107004032B (en) | Mirror image file conversion method and device | |
US20170192979A1 (en) | Methods and apparatuses for accessing cloud storage service by using traditional file system interface | |
CN111913665A (en) | Mounting method and device of storage volume and electronic equipment | |
US20110258255A1 (en) | Method and Apparatus for Accessing Network File System | |
US20070245134A1 (en) | Testing device and testing method for computer | |
WO2014206054A1 (en) | Systems and methods for pushing applications | |
WO2015070640A1 (en) | Remote accessing method for device, thin client, and virtual machine | |
WO2018188373A1 (en) | Page sharing method and apparatus, server and storage medium | |
CN104378435A (en) | Method for transmitting file between browser of computing device and mobile terminal | |
CN101686165B (en) | Chip device and method of accessing network shared files by using same | |
CN103684926A (en) | Method and device for testing network speed of local area network | |
CN104376090A (en) | Screen synchronization equipment of browser in computing equipment and mobile terminal | |
US20180188990A1 (en) | Method, apparatus and system for inserting disk | |
WO2017052772A1 (en) | System and method for accessing images with a captured query image | |
CN113961520A (en) | Dynamic file mounting method, system, computer equipment and readable storage medium | |
CN105530590A (en) | Method and electronic equipment for realizing resource sharing between equipment | |
CN109246280B (en) | Address book cloud processing method and device, computer equipment and readable storage medium | |
CN108255434B (en) | Label management method, management device and computer readable storage medium | |
CN105144073A (en) | Removable storage device identity and configuration information | |
CN112351420B (en) | Networking identity creation method and equipment of terminal equipment and readable storage medium | |
CN113518107A (en) | File transmission method, computing device and computer storage medium | |
CN104394210A (en) | Direction connection communication method and device |
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 |