[go: up one dir, main page]

CN111045834B - Method, device and storage medium for accessing USB storage device under cloud desktop - Google Patents

Method, device and storage medium for accessing USB storage device under cloud desktop Download PDF

Info

Publication number
CN111045834B
CN111045834B CN201811198601.2A CN201811198601A CN111045834B CN 111045834 B CN111045834 B CN 111045834B CN 201811198601 A CN201811198601 A CN 201811198601A CN 111045834 B CN111045834 B CN 111045834B
Authority
CN
China
Prior art keywords
usb storage
storage device
terminal
directory
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
Application number
CN201811198601.2A
Other languages
Chinese (zh)
Other versions
CN111045834A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201811198601.2A priority Critical patent/CN111045834B/en
Publication of CN111045834A publication Critical patent/CN111045834A/en
Application granted granted Critical
Publication of CN111045834B publication Critical patent/CN111045834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, equipment and storage medium for accessing USB storage equipment under a cloud desktop, and belongs to the technical field of cloud desktop management. The method comprises the following steps: actively loading the inserted USB storage device, mounting the USB storage device under a terminal sharing directory, and simultaneously acquiring and transmitting sharing directory parameters of the USB storage device to a remote virtual machine; and the remote virtual machine is accepted to call a system function according to the shared directory parameters so as to access the USB storage equipment under the terminal shared directory. The technical scheme of the invention can support the USB storage equipment of the access terminal in the VPN network environment and simultaneously provide higher mapping access speed and data transmission speed.

Description

Method, device and storage medium for accessing USB storage device under cloud desktop
Technical Field
The present invention relates to the field of cloud desktop management technologies, and in particular, to a method, an apparatus, and a storage medium for accessing a USB storage device under a cloud desktop.
Background
Cloud computing is a computing mode for conveniently accessing a shared resource pool (such as computing facilities, storage equipment, application programs and the like) at any time and any place by utilizing the Internet, the development of the fields such as cloud desktop, cloud terminal and the like is promoted, the construction and maintenance cost of users, particularly large enterprises and public institutions, is greatly reduced by a cloud desktop and cloud terminal system, and data are safer.
In the process that a user uses a cloud desktop on a terminal, the situation that a USB storage device is inserted into the terminal and needs to be accessed through the cloud desktop is avoided, the existing mode of accessing the USB storage device on the cloud desktop is mainly realized by adopting a USB redirection mode, but the mode of accessing the USB storage device through the USB redirection mode is very slow, the user experience is easily affected, and meanwhile, a VPN network environment crossing network segments is not supported by a common network mapping mode.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method, equipment and storage medium for accessing USB storage equipment under a cloud desktop, and aims to solve the technical problems that the existing cloud desktop accesses the USB storage equipment in a USB redirection mode, the speed is too slow, and a common network mapping mode does not support a VPN network environment of a cross-network section.
In order to achieve the above object, an embodiment of the present invention provides a method for accessing a USB storage device under a cloud desktop, including the following steps: actively loading the inserted USB storage equipment, mounting the USB storage equipment under a terminal sharing directory, and simultaneously acquiring and transmitting sharing directory parameters of the USB storage equipment to a remote virtual machine; and the remote virtual machine is accepted to call a system function according to the shared directory parameters so as to access the USB storage device under the terminal shared directory.
In order to achieve the above object, an embodiment of the present invention provides a method for accessing a USB storage device under a cloud desktop, including the following steps: the receiving terminal mounts the inserted USB storage device to the terminal sharing directory, and then obtains and sends the sharing directory parameters of the USB storage device; and calling a system function according to the shared directory parameters to access the USB storage device under the terminal shared directory.
To achieve the above object, an embodiment of the present invention further provides an apparatus for accessing a USB storage device under a cloud desktop, where the apparatus includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, where the program, when executed by the processor, implements the steps of the foregoing method.
To achieve the above object, the present invention provides a storage medium for computer-readable storage, the storage medium storing one or more programs executable by one or more processors to implement the steps of the foregoing method.
According to the method, the device and the storage medium for accessing the USB storage device under the cloud desktop, the inserted USB storage device is actively loaded on the terminal side, the USB storage device is mounted under the terminal sharing directory, and meanwhile, the sharing directory parameters of the USB storage device are obtained and sent to the remote virtual machine. In this way, the remote virtual machine can call the system function according to the shared directory parameters to access the USB storage device under the terminal shared directory, thereby starting the process of quickly accessing the terminal storage device by the cloud desktop (i.e. the remote virtual machine). Compared with the existing USB redirection mode, the method can greatly improve the identification speed and the data transmission speed of the USB storage device. In contrast to the local network mapping approach which only supports local area network access and which must use 445 ports (445 ports are disabled in many systems), the present approach can support a cross-segment vpn access approach and does not require 445 ports. Therefore, the technical scheme can support the USB storage equipment of the access terminal in the VPN network environment, and simultaneously provides higher mapping access speed and data transmission speed.
Drawings
Fig. 1 is a flowchart of a method for accessing a USB storage device under a cloud desktop according to an embodiment of the present invention.
FIG. 2 is a schematic diagram illustrating interaction of USB storage device access under a cloud desktop according to an embodiment of the present invention.
Fig. 3 is a specific flowchart of a method step S110 of accessing a USB storage device under the cloud desktop shown in fig. 1.
Fig. 4 is a specific flowchart of a method step S120 of accessing a USB storage device under the cloud desktop shown in fig. 1.
Fig. 5 is a flowchart of a method for accessing a USB storage device under a cloud desktop according to a second embodiment of the present invention.
Fig. 6 is a specific flowchart of a method step S110 of accessing a USB storage device under the cloud desktop shown in fig. 5.
Fig. 7 is a specific flowchart of a method step S120 of accessing a USB storage device under the cloud desktop shown in fig. 5.
Fig. 8 is a block diagram of a device for accessing a USB storage device under a cloud desktop according to a third embodiment of the present invention.
Fig. 9 is a block diagram of a device for accessing a USB storage device under a cloud desktop according to a fourth embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "part" or "unit" for representing elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
Embodiment one.
As shown in fig. 1, a first embodiment of the present invention provides a method for accessing a USB storage device under a cloud desktop, where the method is mainly based on a terminal side, and includes the following steps:
step S110: actively loading the inserted USB storage device, mounting the USB storage device under a terminal sharing directory, and simultaneously acquiring and transmitting the sharing directory parameters of the USB storage device to a remote virtual machine.
Specifically, as shown in fig. 2, a NatDiskRedirect (Nat) program is added on the local terminal side, and when the program runs, the following operations may be performed: 1. a shared service subroutine S is started for remote directory access. 2. The active mount is inserted into the USB storage device of the terminal, and the mount directory name of the device (as a remote shared directory path), the accessed user name and password information, and the IP address information of the terminal are obtained and stored in the Nat program cache. 3. Upon detection of the USB storage device insertion, a proxy service client subroutine TC and two supervisory threads (including a link connection supervisory thread and a data transfer supervisory thread) are created. 4. And sending the information of the shared directory information, the user name, the password and the like stored in the cache to the remote virtual machine through the TC.
Wherein for the proxy service client sub-program TC, it runs, the following operations may be performed: 1. two TCP connection links are created, one to communicate with the local terminal side shared service sub-program S and one to communicate with the proxy service sub-program PS in the remote virtual machine. 2. Two forwarding threads are created, each of which is responsible for forwarding data in one direction at the same time, for example, content received from a socket with a PS link is sent out through a socket with an S link. Similarly, the content received from the S is sent out through a socket which is linked with the PS, and data interchange is completed.
And for the two monitoring threads, the link connection monitoring thread is used for detecting the connection status and state of the two TCP connection links and is responsible for reconnecting and closing the connection when the link goes wrong and closing the link connection when the data transmission is finished. The data transmission monitoring thread is used for detecting whether transmission and reception are wrong in the data transmission process, closing transmission when the transmission is wrong, and informing the Nat program of retransmitting the new chain and carrying out statistics on the transmission data quantity and average data when the transmission is successful.
As shown in fig. 3, when this step is performed, the specific process includes:
step S111: and acquiring a global type code of the plug-in device, if the plug-in device is a USB storage device, mounting the plug-in device under a terminal sharing directory, and simultaneously acquiring a sharing directory parameter of the plug-in device and storing the sharing directory parameter in a cache.
Step S112: socket communication is carried out with the remote virtual machine, and the shared directory parameters of the plug-in equipment stored in the cache are sent to the remote virtual machine through the socket communication.
The shared directory parameters include remote shared directory path of the device, accessed user name and password information, and IP address information of the terminal. The local terminal side detects the inserted device and acquires the global title of the device type, if the device belongs to the USB storage device, the terminal Nat program stores the USB storage device mount into an X directory of a terminal file system, stores the X directory, an access user name, a password and an IP address into a Nat program cache, and sends the cache to the virtual machine through TC.
Step S120: and the remote virtual machine is accepted to call a system function according to the shared directory parameters to access the USB storage device under the terminal shared directory.
Specifically, as shown in fig. 2, a disk access program V is deployed in a remote virtual machine, which, when running, may perform the following operations: 1. when the disk access program V starts up, a proxy service sub-program PS is created for data forwarding between the disk access program V and the shared service sub-program S. 2. A network card filter subroutine F is created for filtering disk access related data packets. 3. A thread will be created to establish a TCP connection with a particular port of the PS. 4. And calling a system function according to the parameters such as the shared directory information, the user name, the password, the terminal IP and the like received from the terminal, and accessing the shared directory of the terminal.
Wherein, for the proxy service sub-program PS, the following operations may be performed at the time of its execution: 1. the connection of two ports, namely port a connected to the terminal side TC and port B connected to the remote virtual machine side V, is monitored. 2. Two forwarding threads are created, each of which is responsible for forwarding data in one direction at the same time, for example, content received from a socket connected to TC is sent out through a socket connected to V. Similarly, the content received from V is sent out through socket connected with TC, and data interchange is completed.
For the network card filter subroutine F, the following operations may be performed when it runs: the network packets of a particular type are filtered to only let pass packets related to the shared directory of the access terminal.
Thus, as shown in fig. 4, the process of the remote virtual machine calling the system function to access the USB storage device under the terminal shared directory according to the shared directory parameter specifically includes:
step S121: and the remote virtual machine acquires the network packet containing the shared directory parameters through network packet filtering.
Step S122: the remote virtual machine accesses the USB storage device under the terminal shared directory by analyzing the shared directory parameters and calling a system function.
The method is characterized in that the remote virtual machine obtains data sent by the terminal side through PS data interchange, and meanwhile, filters network packets of a specific type through F, and only passes the packet related to the shared directory of the access terminal, namely, obtains the network packet containing the shared directory parameter. Finally, the USB storage device of the terminal is accessed by the V call system function, and the data transmission process starts at the moment, and the user experience is not different from that of using the USB storage device locally in the PC.
Thus, after each time the terminal inserts the USB storage device, the Nat program sends the updated shared directory name, accessed user name, password, and terminal IP to the proxy service sub-program PS of the remote virtual machine via the proxy service client sub-program TC, and then forwards the updated shared directory name, accessed user name, password, and terminal IP to the disk access program V of the remote virtual machine via the PS. Thus, the V can call the system function to access the shared directory corresponding to the USB storage device of the terminal, thereby starting the process of quickly accessing the terminal storage device by the cloud desktop (namely the remote virtual machine). At this time, the cloud desktop can perform access control, such as read-write, read-only, and the like, on the USB storage device according to the setting policy issued by the server. If the access authority of the USB storage device at the local terminal side needs to be changed, a server1 where the remote virtual machine is located sends a command to a Nat program at the local terminal side, the Nat program changes the configuration file of the sharing service subprogram S by calling the command, and the S program is restarted.
Example two
As shown in fig. 5, a second embodiment of the present invention provides a method for accessing a USB storage device under a cloud desktop, based on a remote virtual machine side, including the following steps:
step S210: and after the receiving terminal mounts the inserted USB storage device to the terminal sharing directory, acquiring and transmitting the sharing directory parameters of the USB storage device.
Specifically, as shown in fig. 2, a NatDiskRedirect (Nat) program is added on the local terminal side, and when the program runs, the following operations may be performed: 1. a shared service subroutine S is started for remote directory access. 2. The active mount is inserted into the USB storage device of the terminal, and the mount directory name of the device (as a remote shared directory path), the accessed user name and password information, and the IP address information of the terminal are obtained and stored in the Nat program cache. 3. Upon detection of the USB storage device insertion, a proxy service client subroutine TC and two supervisory threads (including a link connection supervisory thread and a data transfer supervisory thread) are created. 4. And sending the information of the shared directory information, the user name, the password and the like stored in the cache to the remote virtual machine through the TC.
Wherein for the proxy service client sub-program TC, it runs, the following operations may be performed: 1. two TCP connection links are created, one to communicate with the local terminal side shared service sub-program S and one to communicate with the proxy service sub-program PS in the remote virtual machine. 2. Two forwarding threads are created, each of which is responsible for forwarding data in one direction at the same time, for example, content received from a socket with a PS link is sent out through a socket with an S link. Similarly, the content received from the S is sent out through a socket which is linked with the PS, and data interchange is completed.
And for the two monitoring threads, the link connection monitoring thread is used for detecting the connection status and state of the two TCP connection links and is responsible for reconnecting and closing the connection when the link goes wrong and closing the link connection when the data transmission is finished. The data transmission monitoring thread is used for detecting whether transmission and reception are wrong in the data transmission process, closing transmission when the transmission is wrong, and informing the Nat program of retransmitting the new chain and carrying out statistics on the transmission data quantity and average data when the transmission is successful.
As shown in fig. 6, after the terminal mounts the inserted USB storage device to the terminal shared directory, the process of acquiring and transmitting the shared directory parameters of the USB storage device specifically includes:
step S211: the terminal acquires the global type code of the plug-in device, if the plug-in device is a USB storage device, the plug-in device is mounted under the terminal sharing directory, and meanwhile, the sharing directory parameters of the plug-in device are acquired and stored in a cache.
Step S212: and the terminal performs socket communication with the remote virtual machine, and the shared directory parameters of the plug-in equipment stored in the cache are sent to the remote virtual machine through the socket communication.
The shared directory parameters include remote shared directory path of the device, accessed user name and password information, and IP address information of the terminal. The local terminal side detects the inserted device and acquires the global title of the device type, if the device belongs to the USB storage device, the terminal Nat program stores the USB storage device mount into an X directory of a terminal file system, stores the X directory, an access user name, a password and an IP address into a Nat program cache, and sends the cache to the virtual machine through TC.
Step S220: and calling a system function according to the shared directory parameters to access the USB storage device under the terminal shared directory.
Specifically, as shown in fig. 2, a disk access program V is deployed in a remote virtual machine, which, when running, may perform the following operations: 1. when the disk access program V starts up, a proxy service sub-program PS is created for data forwarding between the disk access program V and the shared service sub-program S. 2. A network card filter subroutine F is created for filtering disk access related data packets. 3. A thread will be created to establish a TCP connection with a particular port of the PS. 4. And calling a system function according to the parameters such as the shared directory information, the user name, the password, the terminal IP and the like received from the terminal, and accessing the shared directory of the terminal.
Wherein, for the proxy service sub-program PS, the following operations may be performed at the time of its execution: 1. the connection of two ports, namely port a connected to the terminal side TC and port B connected to the remote virtual machine side V, is monitored. 2. Two forwarding threads are created, each of which is responsible for forwarding data in one direction at the same time, for example, content received from a socket connected to TC is sent out through a socket connected to V. Similarly, the content received from V is sent out through socket connected with TC, and data interchange is completed.
For the network card filter subroutine F, the following operations may be performed when it runs: the network packets of a particular type are filtered to only let pass packets related to the shared directory of the access terminal.
As shown in fig. 7, the implementation process of this step specifically includes:
step S221: and obtaining the network packet containing the shared directory parameters through network packet filtering.
Step S222: analyzing the shared directory parameters, and calling a system function to access the USB storage device under the terminal shared directory.
The method is characterized in that the remote virtual machine obtains data sent by the terminal side through PS data interchange, and meanwhile, filters network packets of a specific type through F, and only passes the packet related to the shared directory of the access terminal, namely, obtains the network packet containing the shared directory parameter. Finally, the USB storage device of the terminal is accessed by the V call system function, and the data transmission process starts at the moment, and the user experience is not different from that of using the USB storage device locally in the PC.
Thus, after each time the terminal inserts the USB storage device, the Nat program sends the updated shared directory name, accessed user name, password, and terminal IP to the proxy service sub-program PS of the remote virtual machine via the proxy service client sub-program TC, and then forwards the updated shared directory name, accessed user name, password, and terminal IP to the disk access program V of the remote virtual machine via the PS. Thus, the V can call the system function to access the shared directory corresponding to the USB storage device of the terminal, thereby starting the process of quickly accessing the terminal storage device by the cloud desktop (namely the remote virtual machine). At this time, the cloud desktop can perform access control, such as read-write, read-only, and the like, on the USB storage device according to the setting policy issued by the server. If the access authority of the USB storage device at the local terminal side needs to be changed, a server1 where the remote virtual machine is located sends a command to a Nat program at the local terminal side, the Nat program changes the configuration file of the sharing service subprogram S by calling the command, and the S program is restarted.
Example III
As shown in fig. 8, a third embodiment of the present invention provides a device 20 for accessing a USB storage device under a cloud desktop, where the device 20 includes a memory 22, a processor 21, a program stored on the memory and executable on the processor, and a data bus 23 for implementing connection communication between the processor 21 and the memory 22, where the program is executed by the processor 21 to implement the steps of the method for accessing a USB storage device under a cloud desktop in the above embodiment.
It should be noted that the embodiment and the method embodiment of the device 20 for accessing the USB storage device under the cloud desktop in the embodiment of the present invention belong to the same concept, the detailed implementation process of the method embodiment one is shown in the method embodiment one, and the technical features in the method embodiment one are correspondingly applicable to the embodiment of the device 20 for accessing the USB storage device under the cloud desktop, which is not described herein again.
Example IV
As shown in fig. 9, a fourth embodiment of the present invention proposes an apparatus 30 for accessing a USB storage device under a cloud desktop, where the apparatus 30 includes a processor 31, a memory 32, a program stored on the memory and executable on the processor, and a data bus 33 for implementing connection communication between the processor 31 and the memory 32, where the program, when executed by the processor 31, implements the steps of the method for accessing a USB storage device under a cloud desktop in the second embodiment.
It should be noted that the embodiment of the device 30 and the embodiment of the method for accessing the USB storage device under the cloud desktop in the embodiment of the present invention belong to the same concept, the detailed implementation process of the embodiment of the method is shown in the second embodiment of the method, and the technical features in the second embodiment of the method are correspondingly applicable to the embodiment of the device 30 for accessing the USB storage device under the cloud desktop, which is not described herein again.
Example five
The fifth embodiment of the present invention provides a computer readable storage medium, where one or more programs are stored, and the one or more programs may be executed by one or more processors, so as to implement the specific steps of the method for accessing a USB storage device under a cloud desktop in the first embodiment.
It should be noted that the computer readable storage medium and the method embodiment belong to the same concept, the specific implementation process is detailed in the method embodiment one, and the technical features in the method embodiment one are correspondingly applicable in the computer readable storage medium embodiment, and are not repeated herein.
Example six
The sixth embodiment of the present invention proposes a computer readable storage medium, where one or more programs are stored, and the one or more programs may be executed by one or more processors, so as to implement the specific steps of the method for accessing a USB storage device under a cloud desktop in the second embodiment.
It should be noted that the foregoing computer readable storage medium and the method embodiment belong to the same concept, the specific implementation process is detailed in the second method embodiment, and the technical features in the second method embodiment are correspondingly applicable to the computer readable storage medium embodiment, which is not described herein.
According to the method, the device and the storage medium for accessing the USB storage device under the cloud desktop, which are provided by the embodiment of the invention, the inserted USB storage device is actively loaded on the terminal side, the USB storage device is mounted under the terminal sharing directory, and meanwhile, the sharing directory parameters of the USB storage device are acquired and sent to the remote virtual machine. In this way, the remote virtual machine can call the system function according to the shared directory parameters to access the USB storage device under the terminal shared directory, thereby starting the process of quickly accessing the terminal storage device by the cloud desktop (i.e. the remote virtual machine). Compared with the existing USB redirection mode, the method can greatly improve the identification speed and the data transmission speed of the USB storage device. In contrast to the local network mapping approach which only supports local area network access and which must use 445 ports (445 ports are disabled in many systems), the present approach can support a cross-segment vpn access approach and does not require 445 ports. Therefore, the technical scheme can support the USB storage equipment of the access terminal in the VPN network environment, and simultaneously provides higher mapping access speed and data transmission speed.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present invention shall fall within the scope of the appended claims.

Claims (8)

1. A method for accessing a USB storage device under a cloud desktop, the method comprising the steps of:
actively loading the inserted USB storage equipment, mounting the USB storage equipment under a terminal sharing directory, and simultaneously acquiring and transmitting sharing directory parameters of the USB storage equipment to a remote virtual machine;
when a disk access program in a remote virtual machine is started, creating a proxy service subprogram for data forwarding between the disk access program and a shared service subprogram and a network card filtering subprogram for filtering related data packets of the disk access, so that the remote virtual machine performs network packet filtering to obtain a network packet containing the shared directory parameters;
and the remote virtual machine accesses the USB storage device under the terminal shared directory by analyzing the shared directory parameters and calling a system function through the disk access program.
2. The method for accessing a USB storage device under a cloud desktop according to claim 1, wherein the steps of actively loading the inserted USB storage device, mounting the USB storage device under a terminal sharing directory, and simultaneously obtaining and sending a sharing directory parameter of the USB storage device to a remote virtual machine specifically include:
acquiring a global type code of an insertion device, if the insertion device is a USB storage device, mounting the insertion device under a terminal sharing directory, and simultaneously acquiring a sharing directory parameter of the insertion device and storing the sharing directory parameter into a cache;
socket communication is carried out with the remote virtual machine, and the shared directory parameters of the plug-in equipment stored in the cache are sent to the remote virtual machine through the socket communication.
3. The method of claim 1 or 2, wherein the shared directory parameters include remote shared directory paths of the devices, accessed user name and password information, and IP address information of the terminals.
4. A method for accessing a USB storage device under a cloud desktop, the method comprising the steps of:
the receiving terminal mounts the inserted USB storage device to the terminal sharing directory, and then obtains and sends the sharing directory parameters of the USB storage device;
when a disk access program in a remote virtual machine is started, creating a proxy service subprogram for data forwarding between the disk access program and a shared service subprogram and a network card filtering subprogram for filtering related data packets of the disk access so as to filter network packets and acquire the network packets containing the shared directory parameters;
analyzing the shared directory parameters, and calling a system function through the disk access program to access the USB storage device under the terminal shared directory.
5. The method for accessing a USB storage device under a cloud desktop according to claim 4, wherein the process of obtaining and sending the shared directory parameters of the USB storage device after the terminal mounts the inserted USB storage device to the terminal shared directory specifically includes:
the terminal acquires a global type code of the insertion equipment, if the insertion equipment is USB storage equipment, the insertion equipment is mounted under a terminal sharing directory, and meanwhile, shared directory parameters of the insertion equipment are acquired and stored in a cache;
and the terminal performs socket communication with the remote virtual machine, and sends the shared directory parameters of the plug-in equipment stored in the cache to the remote virtual machine through the socket communication.
6. The method of claim 4 or 5, wherein the shared directory parameters include remote shared directory paths of the devices, accessed user name and password information, and IP address information of the terminals.
7. A device for USB storage device access under a cloud desktop, the device comprising a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for enabling a connection communication between the processor and the memory, the program when executed by the processor implementing the steps of the method for USB storage device access under a cloud desktop as claimed in any one of claims 1-3, or the steps of the method for USB storage device access under a cloud desktop as claimed in any one of claims 4-6.
8. A storage medium for computer readable storage, wherein the storage medium stores one or more programs executable by one or more processors to implement the steps of the method of cloud desktop USB storage device access as claimed in any one of claims 1-3 or the steps of the method of cloud desktop USB storage device access as claimed in any one of claims 4-6.
CN201811198601.2A 2018-10-15 2018-10-15 Method, device and storage medium for accessing USB storage device under cloud desktop Active CN111045834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811198601.2A CN111045834B (en) 2018-10-15 2018-10-15 Method, device and storage medium for accessing USB storage device under cloud desktop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811198601.2A CN111045834B (en) 2018-10-15 2018-10-15 Method, device and storage medium for accessing USB storage device under cloud desktop

Publications (2)

Publication Number Publication Date
CN111045834A CN111045834A (en) 2020-04-21
CN111045834B true CN111045834B (en) 2023-08-08

Family

ID=70230593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811198601.2A Active CN111045834B (en) 2018-10-15 2018-10-15 Method, device and storage medium for accessing USB storage device under cloud desktop

Country Status (1)

Country Link
CN (1) CN111045834B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111939562B (en) * 2020-07-15 2024-04-19 着迷科技(深圳)有限公司 Shared storage method, electronic device, and computer-readable storage medium
CN112558877A (en) * 2020-12-16 2021-03-26 福建极存数据科技有限公司 Desktop-level super-high-speed shared storage system
CN113242322B (en) * 2021-07-12 2021-10-08 广东睿江云计算股份有限公司 Mapping method and system of mobile storage device
CN113687910B (en) * 2021-07-29 2025-09-19 广东浪潮智慧计算技术有限公司 Method, device, equipment and storage medium for managing USB equipment in cluster
CN115701569A (en) * 2021-08-02 2023-02-10 中兴通讯股份有限公司 Information processing method, terminal device, cloud server, and storage medium
CN117349850A (en) * 2022-06-28 2024-01-05 中兴通讯股份有限公司 USB device management and control method, cloud device, terminal device and storage medium
CN115348308B (en) * 2022-08-15 2024-01-23 西安万像电子科技有限公司 Sharing method and device for USB storage device files under multi-session scene
CN117478719B (en) * 2023-10-30 2024-04-19 上海贝锐信息科技股份有限公司 DWC 3-based universal USB device remote mapping method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332575A1 (en) * 2012-06-11 2013-12-12 Zerodesktop, Inc. Efficient data transfer for cloud storage by centralized management of access tokens
CN104954451A (en) * 2015-06-02 2015-09-30 华中科技大学 Access control method of USB (universal serial bus) device in virtualized environment
CN105589657A (en) * 2014-10-23 2016-05-18 中兴通讯股份有限公司 Method and device for realizing mounting of mobile storage
CN108205504A (en) * 2016-12-16 2018-06-26 广州杰赛科技股份有限公司 Terminal USB mapping methods, virtual machine USB mapping methods and system
CN108205623A (en) * 2016-12-16 2018-06-26 杭州华为数字技术有限公司 For the method and apparatus of share directory
CN108390927A (en) * 2018-02-09 2018-08-10 山东乾云启创信息科技股份有限公司 A kind of method and device of the transmitted in both directions file between client computer and virtual machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332575A1 (en) * 2012-06-11 2013-12-12 Zerodesktop, Inc. Efficient data transfer for cloud storage by centralized management of access tokens
CN105589657A (en) * 2014-10-23 2016-05-18 中兴通讯股份有限公司 Method and device for realizing mounting of mobile storage
CN104954451A (en) * 2015-06-02 2015-09-30 华中科技大学 Access control method of USB (universal serial bus) device in virtualized environment
CN108205504A (en) * 2016-12-16 2018-06-26 广州杰赛科技股份有限公司 Terminal USB mapping methods, virtual machine USB mapping methods and system
CN108205623A (en) * 2016-12-16 2018-06-26 杭州华为数字技术有限公司 For the method and apparatus of share directory
CN108390927A (en) * 2018-02-09 2018-08-10 山东乾云启创信息科技股份有限公司 A kind of method and device of the transmitted in both directions file between client computer and virtual machine

Also Published As

Publication number Publication date
CN111045834A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN111045834B (en) Method, device and storage medium for accessing USB storage device under cloud desktop
US12382264B2 (en) Cross-resource subscription for M2M service layer
US10187459B2 (en) Distributed load balancing system, health check method, and service node
CN108965203B (en) Resource access method and server
CN106844137B (en) Server monitoring method and device
US20170093917A1 (en) Centralized management and enforcement of online behavioral tracking policies
WO2019100605A1 (en) Platform-as-a-service paas container platform construction method, server, system, and storage medium
CN109639701B (en) Access control method, device and equipment based on OPC protocol and storage medium
CN110611723A (en) A method and device for scheduling service resources
CN112187903B (en) Message pushing method and device and message service system
CN104219200A (en) Device and method for protection from DNS cache attack
CN112738095A (en) Method, device, system, storage medium and equipment for detecting illegal external connection
EP3313022B1 (en) Resending method and device for hypertext transfer request, and client
CN110278192A (en) Method, apparatus, computer equipment and the readable storage medium storing program for executing of extranet access Intranet
CN116962260A (en) Cluster security inspection method, device, equipment and storage medium
CN113709247A (en) Resource acquisition method, device, system, electronic equipment and storage medium
US8526938B1 (en) Testing mobile phone maintenance channel
US10705945B1 (en) Computing system testing service
CN115022278B (en) CDN processing method and system
CN116302346A (en) Fault handling method and device for a sidecar container
CN114745185B (en) Cluster access method and device
CN112104698A (en) Method for accessing vehicle-mounted terminal to gateway, related equipment and medium
US20050132237A1 (en) Method, apparatus and program storage device for providing a remote power reset at a remote server through a network connection
CN110809004A (en) Safety protection method and device, electronic equipment and storage medium
CN117632219A (en) Cluster service port management method, system and storage medium

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