WO2012163059A1 - Method, device and system for device redirection data transmission - Google Patents

Method, device and system for device redirection data transmission Download PDF

Info

Publication number
WO2012163059A1
WO2012163059A1 PCT/CN2011/082557 CN2011082557W WO2012163059A1 WO 2012163059 A1 WO2012163059 A1 WO 2012163059A1 CN 2011082557 W CN2011082557 W CN 2011082557W WO 2012163059 A1 WO2012163059 A1 WO 2012163059A1
Authority
WO
WIPO (PCT)
Prior art keywords
compression
information
server
external device
client
Prior art date
Application number
PCT/CN2011/082557
Other languages
French (fr)
Chinese (zh)
Inventor
刘健
陈普
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/082557 priority Critical patent/WO2012163059A1/en
Priority to CN201180002856.7A priority patent/CN103503381B/en
Publication of WO2012163059A1 publication Critical patent/WO2012163059A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Definitions

  • the present invention relates to the field of remote control, and in particular, to a method, device and system for data transmission of device redirection.
  • USB Universal Serial Bus, Universa l Ser ia l Bus
  • the implementation of the USB device redirection is as follows: The USB device module is separately set on the client computer and the remote server computer, and the data written to the USB device or the data read from the USB device are transmitted to each other through the USB device module.
  • Embodiments of the present invention provide a method, an apparatus, and a system for data transmission of device redirection, which reduce network bandwidth occupied by device redirection and save network resources.
  • a method for data transmission of device redirection includes:
  • the client When detecting the access of the external device, the client acquires the device type of the external device; the client acquires a compression and decompression algorithm corresponding to the external device according to the device type, and the compression and decompression algorithm is The identification information and the device type are sent to the server; the client compresses the first data information acquired from the external device according to a compression algorithm, Generating the first compressed data information, and sending the first compressed data information to the server, so that the server obtains the identifier according to the received identification information of the compression and decompression algorithm and the device type. a decompression algorithm corresponding to the information, and decompressing the first compressed data information according to the decompression algorithm.
  • a client device including:
  • An obtaining module configured to acquire a device type of the external device when detecting that an external device is accessed
  • Obtaining a sending module configured to acquire a compression and decompression algorithm corresponding to the external device according to the device type, and send the identification information of the compression and decompression algorithm and the device type to a server;
  • a compression module configured to compress, according to a compression algorithm, first data information acquired from the external device, generate first compressed data information, and send the first compressed data information to the server, so that the service is
  • the terminal obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
  • a system for device redirection data transmission comprising:
  • the client is configured to acquire a device type of the external device when detecting the access of the external device, acquire a compression and decompression algorithm corresponding to the external device according to the device type, and obtain the compression and solution
  • the identification information of the compression algorithm and the device type are sent to the server; the first data information acquired from the external device is compressed according to a compression algorithm, the first compressed data information is generated, and the first compressed data information is sent.
  • the server To the server;
  • the server is configured to obtain, according to the received identification information of the compression and decompression algorithm, the decompression algorithm corresponding to the identifier information, and the first compressed data according to the decompression algorithm.
  • the information is decompressed to obtain the first data information.
  • the method, device and system for data transmission of device redirection provided by the embodiment of the present invention, when the data is transmitted between the client and the server, the client identifies the type of the accessed external device, thereby determining the appropriate compression according to the device type. And decompression algorithm, compressing data information at one end, The compressed data is transmitted to the other end, and then the compressed data is received at the other end, and the compressed data is decompressed, and the data information is generated for use, which reduces data traffic between the server and the client, reduces transmission bandwidth, and saves Network resources.
  • FIG. 1 is a flowchart of a method for data redirection of device redirection according to Embodiment 1 of the present invention
  • FIG. 2 is a block diagram of a system for redirection of a device according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of a method for data transmission of device redirection according to Embodiment 2 of the present invention
  • FIG. 4 is a flowchart of a method for data transmission of device redirection according to Embodiment 2 of the present invention
  • a block diagram of a client device
  • FIG. 6 is a block diagram showing the composition of another client device in Embodiment 3 of the present invention.
  • FIG. 7 is a structural block diagram of a system for data transmission of device redirection in 3 according to an embodiment of the present invention. detailed description
  • a method for data transmission of device redirection is provided in the embodiment of the present invention. As shown in FIG. 1 , the method is a method on the client side, specifically:
  • the client acquires a device type of the external device.
  • the external device may include a USB storage device connected to the client through a USB interface,
  • the USB camera is connected to other external devices of the client through an interface such as a FireWire interface or a thunderbolt interface, and the like.
  • the device type may be an audio/video device, a memory, or the like, which is not limited in this embodiment of the present invention.
  • the device type of the external device is obtained by the following manners, and the device information of the external device is obtained when the external device is detected to be accessed.
  • the device information includes a device type code of the external device; determining a type of the external device according to the device type code.
  • the device information may include, but is not limited to, a device type code, a device name, and the like.
  • the client obtains a compression algorithm and a decompression algorithm corresponding to the external device according to the device type, and sends the identification information of the compression and decompression algorithm and the device type to the server.
  • the pre-set compression algorithm and decompression algorithm may include, but are not limited to, H. 264, MPEG (Moving Pictures Exper ts Group/Mot in Pictures Exper ts Group), Ogg Theora, etc. lossy compression.
  • Algorithms or lossless compression algorithms such as Shanno-Fano coding, Huffman coding, arithmetic coding, run-length coding, LZW coding, etc., users can add other compression algorithms as needed.
  • the identifier information may be the name of the compression and decompression algorithm or the sequence number set by the client for the compression and decompression algorithm, which is not limited by the embodiment of the present invention.
  • step 102 may be an independent device, or may be implemented on other hardware devices.
  • the embodiment of the present invention is not limited, and the user may set it according to requirements.
  • the client compresses the first data information acquired from the external device according to the compression algorithm, generates first compressed data information, and sends the first compressed data information to the server, so that the The server obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
  • the functional entity that implements the compression of the first data information to generate the first compressed data information may be an independent device or integrated on other hardware, and the present invention does not. Restrictions can be set by the user as needed.
  • the above steps can be implemented in the system architecture as shown in FIG. 2.
  • the system architecture includes a server, a client, and an external device.
  • the server includes a camera application software, a server USB device module (a server USB device sub-module includes a USB device driver and a virtual host controller driver), and a data compression module.
  • the client includes a client USB device module (the client USB device module includes a virtual USB device driver, a host controller driver, a USB core driver, a device type identification module, a compression algorithm, and a decompression algorithm).
  • Select module data compression module, data decompression module, remote desktop protocol stack.
  • the external device is a USB camera
  • the embodiment of the present invention describes the above steps by taking the data of the USB camera from the client through the client. As shown in FIG. 3, the specific steps are as follows:
  • Step 301 The main controller driver detects that there is a USB device access.
  • Step 302 The main controller driver sends the obtained USB device information to the USB core driver.
  • Step 303 The USB core driver acquires the corresponding USB device according to the USB device information.
  • USB device type code and the USB device type code is sent to the device type identification module.
  • Step 304 The device type identification module determines, by using the USB device type code, that the accessed device type is a USB camera.
  • the device type of all external devices that access the client through the USB interface, the FireWire interface, and the lightning interface has a corresponding device type code
  • the device type identification module can directly directly according to the device type code.
  • the specific implementation process is obtained by a person skilled in the art, and is not described in detail in the embodiments of the present invention.
  • Step 305 The device type identification module sends the device type to the compression algorithm and the decompression algorithm selection module.
  • Step 306 The compression and decompression algorithm selection module acquires the most suitable compression and decompression algorithm when receiving the device type, and sends the device type and the identification information of the compression and decompression algorithm to the server.
  • the compression and decompression algorithm selection module selects the most suitable pressure when receiving the device type
  • the shrink and decompression algorithm can be implemented in the following manner. For example, when the device type is a USB camera, the H.264 lossy compression algorithm is selected to minimize the USB camera video information without affecting the display of the USB camera video information. Bandwidth is transmitted. Other device types are also provided with a compression and decompression algorithm.
  • the specific setting mode can be set according to actual needs, which is not limited by the embodiment of the present invention.
  • the sending the identifier information of the device type and the compression and decompression algorithm to the server may be implemented by using a remote desktop protocol, and specifically: the client encapsulates the identification information of the compression and decompression algorithm by using a remote desktop protocol.
  • the device type sends the encapsulated information to the server through a remote desktop protocol.
  • Step 307 After receiving the device type sent by the client and the identification information of the compression and decompression algorithm, the server detects that the client has a USB camera access according to the device type sent by the client, and sends the message according to the client.
  • the identification information of the compression and decompression algorithm finds the corresponding compression and decompression algorithm.
  • Step 308 Use the camera application software on the server to send a command to read video data to the USB device driver.
  • Step 309 The USB device driver sends a read command to the virtual host controller driver.
  • Step 31 0 The virtual host controller driver sends the read command to the remote desktop protocol stack on the server.
  • Step 31 1 The Remote Desktop Stack sends a read command to the client's Remote Desktop Stack.
  • Step 31 2 The client's Remote Desktop Stack sends a read command to the virtual USB device driver.
  • Step 31 3 The virtual USB device driver sends a read command to the host controller driver.
  • Step 314 The main controller driver sends a read command to the USB camera.
  • Step 315 After receiving the read command, the USB camera generates video data and returns the data to the main controller driver.
  • Step 316 The main controller driver returns the data to the virtual USB device driver.
  • Step 317 The virtual USB device driver sends data to the data compression module of the client.
  • Step 318 The client data compression module compresses the data using a determined compression algorithm corresponding to the video transmission of the USB camera.
  • Step 319 The client data compression module returns the compressed data to the virtual USB device driver.
  • Step 320 The virtual USB device driver returns the compressed data to the client's remote desktop protocol stack.
  • Step 321 The client's remote desktop protocol stack returns the compressed data to the server's remote desktop protocol stack.
  • the remote desktop protocol stack of the client returns the compressed data to the remote desktop protocol stack of the server.
  • the method includes: the remote desktop protocol stack of the client encapsulates the compressed data according to the remote desktop protocol. And sending the encapsulated compressed data to the remote desktop protocol stack of the server; the remote desktop protocol stack of the server decapsulates the encapsulated compressed data.
  • Step 322 The server's remote desktop protocol stack returns the compressed data to the virtual host controller driver.
  • Step 323 The virtual host controller driver sends the compressed data to the data decompression module of the server.
  • Step 324 The server-side data decompression module decompresses the data by using a decompression algorithm corresponding to the video information transmission of the USB camera, and the decompression algorithm corresponding to the video information transmission of the USB camera is a server-side The corresponding decompression algorithm found by the identification information of the compression and decompression algorithm sent by the client.
  • Step 325 The server data decompression module returns the decompressed data to the virtual host controller driver.
  • Step 326 The virtual host controller driver returns the decompressed data to the USB device driver.
  • Step 327 The USB device driver returns the decompressed data to the camera application software, at which time the user can view the video generated by the USB camera.
  • the device redirection method provided by the embodiment of the present invention, by transmitting the number between the client and the server According to the time, the client identifies the type of the external device to be accessed, thereby determining an appropriate compression and decompression algorithm according to the device type, compressing the data information at one end, generating compressed data for transmission to the other end, and then receiving the compressed data at the other end. Decompressing the compressed data, generating the data information for use, reducing data traffic between the server and the client, reducing transmission bandwidth, and saving network resources.
  • the embodiment of the present invention provides a method for data transmission of device redirection, which is applied to the system architecture shown in FIG. 2, and if the external device is a USB memory, the embodiment of the present invention uses the server to pass the client to the USB storage device.
  • the data is written as an example. As shown in FIG. 4, the steps are as follows: Step 401: The USB host device is detected by the client host controller.
  • Step 402 The main controller driver sends the obtained USB device information to the USB core driver.
  • Step 403 The USB core driver acquires a USB device type code corresponding to the USB device according to the USB device information, and sends the USB device type code to the device type identification module.
  • Step 404 The device type identification module determines, by using the USB device type code, that the accessed device type is a USB memory.
  • the implementation of the device type identification module to determine the type of the device to be accessed by using the USB device type code is the same as the description in the step 304, which is not described in detail in the embodiment of the present invention.
  • Step 405 The device type identification module sends the device type to the compression algorithm and the decompression algorithm selection module.
  • Step 406 The compression and decompression algorithm selection module acquires the most suitable compression algorithm and decompression algorithm when receiving the device type, and sends the device type and the identification information of the compression and decompression algorithm to the server.
  • the implementation of the compression and decompression algorithm selection module to select the most suitable compression and decompression algorithm when receiving the device type is the same as the description in the step 306, and details are not described herein.
  • Step 407 Receive the device type sent by the client and the identification information of the compression and decompression algorithm. Then, the server detects that the client has USB memory access according to the device type sent by the client, and searches for a corresponding compression and decompression algorithm according to the identification information of the compression and decompression algorithm sent by the client.
  • Step 408 The server writes data to the USB memory through the application, and first sends the data to the USB device driver.
  • Step 409 The USB device driver sends the data to the virtual host controller driver.
  • Step 41 0 The virtual host controller driver sends the data to the data compression module.
  • Step 41 The server data compression module compresses the data by using a compression algorithm corresponding to the USB memory data, where the compression algorithm corresponding to the USB memory data is a compression and solution sent by the server according to the client.
  • the corresponding compression algorithm found by the identification information of the compression algorithm.
  • Step 412 After the server data compression module compresses the data, the compressed data is sent back to the virtual host controller driver.
  • Step 41 3 The virtual host controller driver sends the compressed data to the remote desktop protocol stack.
  • Step 414 The server-side remote desktop protocol stack sends the compressed data to the client's remote desktop protocol stack.
  • Step 415 The client's Remote Desktop Stack sends the compressed data to the virtual USB device driver.
  • Step 416 The virtual USB device driver sends the compressed data to the data decompression module of the client.
  • Step 417 The client data decompression module decompresses the data using the determined decompression algorithm corresponding to the USB memory data.
  • Step 418 The client data decompression module sends the decompressed data back to the virtual USB device driver.
  • Step 419 The virtual USB device driver sends the decompressed data to the main controller driver.
  • the device redirection data transmission method provided by the embodiment of the present invention, when the client and the server transmit data, identify the type of the accessed external device on the client, and determine an appropriate compression and decompression algorithm according to the device type, The data information is compressed at one end, the compressed data is transmitted to the other end, and then the compressed data is received at the other end, and the compressed data is decompressed to generate the data information for use, thereby reducing data traffic between the server and the client. , reducing transmission bandwidth and saving network resources.
  • the embodiment of the present invention provides a client device.
  • the client device includes: an obtaining module 41, an obtaining sending module 42, and a compressing module 43.
  • the obtaining module 41 is configured to acquire a device type of the external device when detecting that an external device is accessed.
  • the acquiring module is specifically configured to: when detecting that an external device is accessed, acquiring device information of the external device, where the device information includes a device type code of the external device; determining, according to the device type code The type of external device.
  • the obtaining and sending module 42 is configured to acquire a compression and decompression algorithm corresponding to the external device according to the device type, and send the identification information of the compression and decompression algorithm and the device type to the server.
  • the compression module 43 is configured to compress the first data information acquired from the external device according to a compression algorithm, generate first compressed data information, and send the first compressed data information to the server, so that the The server obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
  • the compression module further includes a remote desktop protocol stack, and the remote desktop protocol stack is configured to encapsulate the identification information of the compression and decompression algorithm and the device type by using a remote desktop protocol, and pass the encapsulated information to a remote desktop protocol. Sent to the server.
  • the apparatus further includes: a decompression module 44.
  • the decompression module 44 is configured to: when the external device type is a USB storage device, according to compression The algorithm compresses the second compressed data information generated by the second data information that needs to be written into the external device, acquires the second data information, and writes the second data information to the USB storage device.
  • the embodiment of the invention provides a system for data transmission of device redirection. As shown in FIG. 7, the system includes: a client 51 and a server 52.
  • a client 51 configured to acquire a device type of the external device when detecting an external device access, acquire a compression and decompression algorithm corresponding to the external device according to the device type, and compress and decompress the compressed device
  • the identification information of the algorithm and the device type are sent to the server 52; compressing the first data information acquired from the external device according to a compression algorithm, generating first compressed data information, and transmitting the first compressed data information To the server 52.
  • the server 52 is configured to acquire, according to the received identification information of the compression and decompression algorithm, the decompression algorithm corresponding to the identifier information, and the first compressed data information according to the decompression algorithm. Decompress to obtain the first data information.
  • the apparatus and system for data transmission of device redirection when transmitting data by the client and the server, identify the type of the external device accessed by the client, thereby determining appropriate compression and decompression according to the device type.
  • the algorithm compresses the data information at one end, generates compressed data to be transmitted to the other end, and then receives the compressed data at the other end, and decompresses the compressed data to generate the data information for use, thereby reducing the relationship between the server and the client.
  • Data traffic reduces transmission bandwidth and saves network resources.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Abstract

Disclosed and relating to the field of remote control technologies are a method, device and system for data transmission in device redirection which reduces network bandwidth used therefor, and conserves network resources. The present invention comprises: when access by an external device is detected, the client obtains the device type thereof; on the basis of the device type, the client obtains the compression and decompression algorithms corresponding thereto, and sends the identification information of said algorithms, and the device type, to the server; using the compression algorithm, the client compresses the first piece of data information obtained from the external device, thus generating the first piece of compressed data information, then sends same to the server. The present invention is primarily used during data transmission processes in device redirection.

Description

设备重定向的数据传输的方法、 装置及系统 技术领域 本发明涉及远程控制领域, 尤其涉及一种设备重定向的数据传输的方法、 装置及系统。  The present invention relates to the field of remote control, and in particular, to a method, device and system for data transmission of device redirection.
背景技术 Background technique
远程桌面技术是目前企业办公环境的一种流行技术, 在此技术支持下, 用户可以在客户端计算机上使用特定的远程登陆系统通过 IP网络登陆到远程 服务器计算机上, 并正常使用远程服务器计算机。 当用户在客户端计算机上 插入设备后, 用户要在远程服务端计算机也可以正常使用该设备就需要通过 设备重定向实现, 一种常见的场景是 USB (通用串行总线, Universa l Ser ia l Bus )设备重定向。 USB设备重定向的实现方式为: 客户端计算机和远程服务 器计算机上分别设置 USB设备模块, 通过所述 USB设备模块将写入 USB设备 的数据或从 USB设备中读出的数据进行相互传输。  Remote desktop technology is a popular technology in the current corporate office environment. With this technical support, users can log in to the remote server computer through the IP network using a specific remote login system on the client computer, and use the remote server computer normally. When a user inserts a device on a client computer, the user needs to use the device redirection on the remote server computer. A common scenario is USB (Universal Serial Bus, Universa l Ser ia l Bus) device redirection. The implementation of the USB device redirection is as follows: The USB device module is separately set on the client computer and the remote server computer, and the data written to the USB device or the data read from the USB device are transmitted to each other through the USB device module.
在实现上述 USB设备重定向的过程中, 发明人发现现有技术中至少存在 如下问题: 目前, 随着 USB视频、 语音等设备的高清化, 传输 USB设备数据 时需要的网络带宽也越来越高, 当用户操作多个 USB设备时, 需要传输大量 的数据, 占用了很高的网络带宽。  In the process of implementing the above-mentioned redirection of the USB device, the inventor has found that at least the following problems exist in the prior art: At present, with the high-definition of devices such as USB video and voice, the network bandwidth required for transmitting USB device data is also increasing. High, when users operate multiple USB devices, they need to transfer a large amount of data, which occupies a very high network bandwidth.
发明内容 Summary of the invention
本发明的实施例提供一种设备重定向的数据传输的方法、 装置及系统, 降低了设备重定向占用的网络带宽, 节省了网络资源。  Embodiments of the present invention provide a method, an apparatus, and a system for data transmission of device redirection, which reduce network bandwidth occupied by device redirection and save network resources.
为达到上述目的, 本发明的实施例釆用如下技术方案:  In order to achieve the above object, embodiments of the present invention use the following technical solutions:
一种设备重定向的数据传输的方法, 包括:  A method for data transmission of device redirection includes:
当检测到有外部设备接入时, 客户端获取所述外部设备的设备类型; 客户端根据所述设备类型获取与所述外部设备对应的压缩和解压缩算 法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端; 客户端根据压缩算法对从所述外部设备获取的第一数据信息进行压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服务端, 使 得所述服务端根据收到的所述压缩和解压缩算法的标识信息及所述设备类型 获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所述第一压 缩数据信息进行解压缩。 When detecting the access of the external device, the client acquires the device type of the external device; the client acquires a compression and decompression algorithm corresponding to the external device according to the device type, and the compression and decompression algorithm is The identification information and the device type are sent to the server; the client compresses the first data information acquired from the external device according to a compression algorithm, Generating the first compressed data information, and sending the first compressed data information to the server, so that the server obtains the identifier according to the received identification information of the compression and decompression algorithm and the device type. a decompression algorithm corresponding to the information, and decompressing the first compressed data information according to the decompression algorithm.
一种客户端设备, 包括:  A client device, including:
获取模块, 用于当检测到有外部设备接入时, 获取所述外部设备的设备 类型;  An obtaining module, configured to acquire a device type of the external device when detecting that an external device is accessed;
获取发送模块, 用于根据所述设备类型获取与所述外部设备对应的压缩 和解压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送 给服务端;  Obtaining a sending module, configured to acquire a compression and decompression algorithm corresponding to the external device according to the device type, and send the identification information of the compression and decompression algorithm and the device type to a server;
压缩模块, 用于根据压缩算法对从所述外部设备获取的第一数据信息进 行压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服 务端, 使得所述服务端根据收到的所述压缩和解压缩算法的标识信息及所述 设备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所 述第一压缩数据信息进行解压缩。  a compression module, configured to compress, according to a compression algorithm, first data information acquired from the external device, generate first compressed data information, and send the first compressed data information to the server, so that the service is The terminal obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
一种设备重定向的数据传输的系统, 包括:  A system for device redirection data transmission, comprising:
所述客户端, 用于当检测到有外部设备接入时, 获取所述外部设备的设 备类型; 根据所述设备类型获取与所述外部设备对应的压缩和解压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端; 根据 压缩算法对从所述外部设备获取的第一数据信息进行压缩, 生成第一压缩数 据信息, 并将所述第一压缩数据信息发送给所述服务端;  The client is configured to acquire a device type of the external device when detecting the access of the external device, acquire a compression and decompression algorithm corresponding to the external device according to the device type, and obtain the compression and solution The identification information of the compression algorithm and the device type are sent to the server; the first data information acquired from the external device is compressed according to a compression algorithm, the first compressed data information is generated, and the first compressed data information is sent. To the server;
所述服务端, 用于根据收到的所述压缩和解压缩算法的标识信息及所述 设备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所 述第一压缩数据信息进行解压缩, 获取第一数据信息。  The server is configured to obtain, according to the received identification information of the compression and decompression algorithm, the decompression algorithm corresponding to the identifier information, and the first compressed data according to the decompression algorithm. The information is decompressed to obtain the first data information.
本发明实施例提供的设备重定向的数据传输的方法、 装置及系统, 通过 在客户端与服务端传输数据时, 在客户端识别接入的外部设备的类型, 从而 根据设备类型确定合适的压缩和解压缩算法, 将数据信息在一端进行压缩, 生成压缩数据传输到另一端, 然后在另一端接收压缩数据, 并将压缩数据解 压缩, 生成所述数据信息进行使用, 减少了服务端与客户端之间的数据流量, 降低了传输带宽, 节省了网络资源。 The method, device and system for data transmission of device redirection provided by the embodiment of the present invention, when the data is transmitted between the client and the server, the client identifies the type of the accessed external device, thereby determining the appropriate compression according to the device type. And decompression algorithm, compressing data information at one end, The compressed data is transmitted to the other end, and then the compressed data is received at the other end, and the compressed data is decompressed, and the data information is generated for use, which reduces data traffic between the server and the client, reduces transmission bandwidth, and saves Network resources.
附图说明 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set forth in the description of the claims Other drawings may also be obtained from these drawings without the use of creative labor.
图 1为本发明实施例 1中的一种设备重定向的数据传输的方法流程图; 图 2为本发明实施例 1中的一种设备重定向的系统的组成框图; 图 3为本发明实施例 1中的另一种设备重定向的数据传输的方法流程图; 图 4为本发明实施例 2中的一种设备重定向的数据传输的方法流程图; 图 5为本发明实施例 3中的一种客户端设备的组成框图;  1 is a flowchart of a method for data redirection of device redirection according to Embodiment 1 of the present invention; FIG. 2 is a block diagram of a system for redirection of a device according to Embodiment 1 of the present invention; FIG. 4 is a flowchart of a method for data transmission of device redirection according to Embodiment 2 of the present invention; FIG. 4 is a flowchart of a method for data transmission of device redirection according to Embodiment 2 of the present invention; a block diagram of a client device;
图 6为本发明实施例 3中的另一种客户端设备的组成框图;  6 is a block diagram showing the composition of another client device in Embodiment 3 of the present invention;
图 7为本发明实施例中 3中的设备重定向的数据传输的系统的组成框图。 具体实施方式  FIG. 7 is a structural block diagram of a system for data transmission of device redirection in 3 according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作 出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
实施例 1  Example 1
本发明实施例中提供了一种设备重定向的数据传输的方法, 如图 1所示, 该方法为客户端侧的方法, 具体为:  A method for data transmission of device redirection is provided in the embodiment of the present invention. As shown in FIG. 1 , the method is a method on the client side, specifically:
101、当检测到有外部设备接入时,客户端获取所述外部设备的设备类型。 其中, 所述外部设备可以包括通过 USB接口连接到客户端的 USB存储器、 101. When detecting that an external device is accessed, the client acquires a device type of the external device. The external device may include a USB storage device connected to the client through a USB interface,
USB摄像头, 通过火线接口、 雷电 (thunderbol t )接口等接口连接到客户端 的其他外部设备等, 本发明实施例对此不进行限制。 其中, 所述设备类型可以为音视频装置、 存储器等, 本发明实施例对此 不进行限制。 The USB camera is connected to other external devices of the client through an interface such as a FireWire interface or a thunderbolt interface, and the like. The device type may be an audio/video device, a memory, or the like, which is not limited in this embodiment of the present invention.
其中, 当检测到有外部设备接入时, 获取所述外部设备的设备类型可以 通过以下方式实现, 具体为: 当检测到有外部设备接入时, 获取所述外部设 备的设备信息, 所述设备信息包括所述外部设备的设备类型码; 根据所述设 备类型码确定所述外部设备的类型。  The device type of the external device is obtained by the following manners, and the device information of the external device is obtained when the external device is detected to be accessed. The device information includes a device type code of the external device; determining a type of the external device according to the device type code.
其中, 所述设备信息可以但不局限于包括设备类型码, 设备名称等。 The device information may include, but is not limited to, a device type code, a device name, and the like.
102、 客户端根据所述设备类型获取与所述外部设备对应的压缩算法和解 压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送给服 务端。 The client obtains a compression algorithm and a decompression algorithm corresponding to the external device according to the device type, and sends the identification information of the compression and decompression algorithm and the device type to the server.
其中, 所述预先设置的压缩算法和解压缩算法可以但不局限于包括: H. 264、 MPEG ( Moving Pictures Exper t s Group/Mot in Pictures Exper t s Group, 动态图像专家组)、 Ogg Theora等有损压缩算法或者 Shanno-Fano编 码、 Huffman编码、 算术编码、 游程编码、 LZW编码等无损压缩算法, 用户可 根据需要自行添加其他压缩算法。  The pre-set compression algorithm and decompression algorithm may include, but are not limited to, H. 264, MPEG (Moving Pictures Exper ts Group/Mot in Pictures Exper ts Group), Ogg Theora, etc. lossy compression. Algorithms or lossless compression algorithms such as Shanno-Fano coding, Huffman coding, arithmetic coding, run-length coding, LZW coding, etc., users can add other compression algorithms as needed.
其中, 所述标识信息可以为压缩和解压缩算法的名称或者是客户端为压 缩和解压缩算法设置的序列号, 本发明实施例对此不进行限制。  The identifier information may be the name of the compression and decompression algorithm or the sequence number set by the client for the compression and decompression algorithm, which is not limited by the embodiment of the present invention.
需要说明的是, 实现步骤 102 的功能实体可以是独立的设备, 也可以集 成在其他硬件设备上实现, 本发明实施例不进行限制, 用户可按照需要自行 设置。  It should be noted that the functional entity implementing the step 102 may be an independent device, or may be implemented on other hardware devices. The embodiment of the present invention is not limited, and the user may set it according to requirements.
103、 客户端根据所述压缩算法对从所述外部设备获取的第一数据信息进 行压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服 务端, 使得所述服务端根据收到的所述压缩和解压缩算法的标识信息及所述 设备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所 述第一压缩数据信息进行解压缩。  The client compresses the first data information acquired from the external device according to the compression algorithm, generates first compressed data information, and sends the first compressed data information to the server, so that the The server obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
需要说明的是, 实现对第一数据信息进行压缩, 生成第一压缩数据信息 的功能实体, 可以是独立的设备, 也可以集成在其他硬件上实现, 本发明不 进行限制, 用户可按照需要自行设置。 It should be noted that the functional entity that implements the compression of the first data information to generate the first compressed data information may be an independent device or integrated on other hardware, and the present invention does not. Restrictions can be set by the user as needed.
上述步骤可在如图 2所示的系统架构中实现。 所述系统架构包括服务端、 客户端及外部设备; 其中, 服务端包括摄像头应用软件、 服务端 USB设备模 块 (服务端 USB设备子模块包括 USB设备驱动及虚拟主控制器驱动)、 数据压 缩模块、 数据解压缩模块、 远程桌面协议栈; 客户端包括客户端 USB设备模 块(客户端 USB设备模块包括虚拟 USB设备驱动、 主控制器驱动、 USB核心驱 动、 设备类型识别模块、 压缩算法和解压缩算法选择模块)、 数据压缩模块、 数据解压缩模块、 远程桌面协议栈。 若外部设备为 USB摄像头, 则本发明实 施例以服务端通过客户端读取 USB摄像头的数据为例描述上述步骤, 如图 3 所示, 具体步骤如下:  The above steps can be implemented in the system architecture as shown in FIG. 2. The system architecture includes a server, a client, and an external device. The server includes a camera application software, a server USB device module (a server USB device sub-module includes a USB device driver and a virtual host controller driver), and a data compression module. The data decompression module and the remote desktop protocol stack; the client includes a client USB device module (the client USB device module includes a virtual USB device driver, a host controller driver, a USB core driver, a device type identification module, a compression algorithm, and a decompression algorithm). Select module), data compression module, data decompression module, remote desktop protocol stack. If the external device is a USB camera, the embodiment of the present invention describes the above steps by taking the data of the USB camera from the client through the client. As shown in FIG. 3, the specific steps are as follows:
步骤 301: 主控制器驱动检测到有 USB设备接入。  Step 301: The main controller driver detects that there is a USB device access.
步骤 302 : 主控制器驱动将获取到的 USB设备信息发送到 USB核心驱动。 步骤 303 : USB核心驱动根据所述 USB设备信息获取所述 USB设备对应的 Step 302: The main controller driver sends the obtained USB device information to the USB core driver. Step 303: The USB core driver acquires the corresponding USB device according to the USB device information.
USB设备类型码, 并将 USB设备类型码发送到设备类型识别模块。 The USB device type code, and the USB device type code is sent to the device type identification module.
步骤 304 :设备类型识别模块通过所述 USB设备类型码确定接入的设备类 型为 USB摄像头。  Step 304: The device type identification module determines, by using the USB device type code, that the accessed device type is a USB camera.
其中, 需要说明的是, 通过 USB接口、 火线接口及雷电接口接入客户端 的所有外部设备的设备类型都存在有对应的设备类型码, 所述设备类型识别 模块根据所述设备类型码就可以直接获取到对应的外部设备类型, 具体的实 现过程为本领域技术人员公知的技术, 本发明实施例对此不再进行详细描述。  It should be noted that the device type of all external devices that access the client through the USB interface, the FireWire interface, and the lightning interface has a corresponding device type code, and the device type identification module can directly directly according to the device type code. The specific implementation process is obtained by a person skilled in the art, and is not described in detail in the embodiments of the present invention.
步骤 305 :设备类型识别模块将设备类型发送到压缩算法和解压缩算法选 择模块。  Step 305: The device type identification module sends the device type to the compression algorithm and the decompression algorithm selection module.
步骤 306 :压缩和解压缩算法选择模块在接收到设备类型时获取最合适的 压缩和解压缩算法, 并将所述设备类型及压缩和解压缩算法的标识信息发送 到服务器端。  Step 306: The compression and decompression algorithm selection module acquires the most suitable compression and decompression algorithm when receiving the device type, and sends the device type and the identification information of the compression and decompression algorithm to the server.
其中, 压缩和解压缩算法选择模块在接收到设备类型时选择最合适的压 缩和解压缩算法可以通过以下方式实现, 例如, 当设备类型为 USB摄像头时, 选择 H. 264有损压缩算法, 以实现在不影响 USB摄像头视频信息的显示时, 使 USB摄像头视频信息以最小的带宽进行传输。 其他的设备类型也对应设置 有压缩和解压缩算法, 具体设置方式可以根据实际需要进行设置, 本发明实 施例对此不进行限制。 Wherein, the compression and decompression algorithm selection module selects the most suitable pressure when receiving the device type The shrink and decompression algorithm can be implemented in the following manner. For example, when the device type is a USB camera, the H.264 lossy compression algorithm is selected to minimize the USB camera video information without affecting the display of the USB camera video information. Bandwidth is transmitted. Other device types are also provided with a compression and decompression algorithm. The specific setting mode can be set according to actual needs, which is not limited by the embodiment of the present invention.
其中, 所述将所述设备类型及压缩和解压缩算法的标识信息发送到服务 器端可以通过远程桌面协议实现, 具体包括: 客户端通过远程桌面协议封装 所述所述压缩和解压缩算法的标识信息及所述设备类型, 将封装后的信息通 过远程桌面协议发送给服务端。  The sending the identifier information of the device type and the compression and decompression algorithm to the server may be implemented by using a remote desktop protocol, and specifically: the client encapsulates the identification information of the compression and decompression algorithm by using a remote desktop protocol. The device type sends the encapsulated information to the server through a remote desktop protocol.
步骤 307 :接收到客户端发送的设备类型及压缩和解压缩算法的标识信息 之后, 服务器端根据所述客户端发送的设备类型检测到客户端有 USB摄像头 接入, 并根据所述客户端发送的压缩和解压缩算法的标识信息查找对应压缩 和解压缩算法。  Step 307: After receiving the device type sent by the client and the identification information of the compression and decompression algorithm, the server detects that the client has a USB camera access according to the device type sent by the client, and sends the message according to the client. The identification information of the compression and decompression algorithm finds the corresponding compression and decompression algorithm.
步骤 308 : 在服务端使用摄像头应用软件, 发送读取视频数据命令, 到 USB设备驱动。  Step 308: Use the camera application software on the server to send a command to read video data to the USB device driver.
步骤 309 : USB设备驱动将读取命令发送到虚拟主控制器驱动。  Step 309: The USB device driver sends a read command to the virtual host controller driver.
步骤 31 0 : 虚拟主控制器驱动将读取命令发送到服务端的远程桌面协议 栈。  Step 31 0: The virtual host controller driver sends the read command to the remote desktop protocol stack on the server.
步骤 31 1 : 远程桌面协议栈将读取命令发送到客户端的远程桌面协议栈。 步骤 31 2 :客户端的远程桌面协议栈将读取命令发送到虚拟 USB设备驱动。 步骤 31 3 : 虚拟 USB设备驱动将读取命令发送到主控制器驱动。  Step 31 1: The Remote Desktop Stack sends a read command to the client's Remote Desktop Stack. Step 31 2: The client's Remote Desktop Stack sends a read command to the virtual USB device driver. Step 31 3: The virtual USB device driver sends a read command to the host controller driver.
步骤 314 : 主控制器驱动将读取命令发送到 USB摄像头。  Step 314: The main controller driver sends a read command to the USB camera.
步骤 315 : USB摄像头接收到读取命令后, 产生视频数据, 将数据返回到 主控制器驱动。  Step 315: After receiving the read command, the USB camera generates video data and returns the data to the main controller driver.
步骤 316 : 主控制器驱动将数据返回到虚拟 USB设备驱动。  Step 316: The main controller driver returns the data to the virtual USB device driver.
步骤 317 : 虚拟 USB设备驱动将数据发送到客户端的数据压缩模块。 步骤 318:客户端数据压缩模块使用已确定的对应于所述 USB摄像头视频 信息传输的压缩算法, 对数据进行压缩。 Step 317: The virtual USB device driver sends data to the data compression module of the client. Step 318: The client data compression module compresses the data using a determined compression algorithm corresponding to the video transmission of the USB camera.
步骤 319:客户端数据压缩模块将压缩后的数据返回给虚拟 USB设备驱动。 步骤 320:虚拟 USB设备驱动将压缩后的数据返回到客户端的远程桌面协 议栈。  Step 319: The client data compression module returns the compressed data to the virtual USB device driver. Step 320: The virtual USB device driver returns the compressed data to the client's remote desktop protocol stack.
步骤 321: 客户端的远程桌面协议栈将压缩后的数据返回给服务端的远程 桌面协议栈。  Step 321: The client's remote desktop protocol stack returns the compressed data to the server's remote desktop protocol stack.
其中, 所述客户端的远程桌面协议栈将压缩后的数据返回给服务端的远 程桌面协议栈可以通过以下方式实现, 包括: 所述客户端的远程桌面协议栈根据远程桌面协议封装所述压缩后的数 据, 将封装后的所述压缩后的数据发送给所述服务器端的远程桌面协议栈; 所述服务器端的远程桌面协议栈解封装封装后的所述压缩后的数据。  The remote desktop protocol stack of the client returns the compressed data to the remote desktop protocol stack of the server. The method includes: the remote desktop protocol stack of the client encapsulates the compressed data according to the remote desktop protocol. And sending the encapsulated compressed data to the remote desktop protocol stack of the server; the remote desktop protocol stack of the server decapsulates the encapsulated compressed data.
步骤 322:服务端的远程桌面协议栈将压缩后的数据返回到虚拟主控制器 驱动。  Step 322: The server's remote desktop protocol stack returns the compressed data to the virtual host controller driver.
步骤 323:虚拟主控制器驱动将压缩后的数据发送到服务端的数据解压缩 模块,  Step 323: The virtual host controller driver sends the compressed data to the data decompression module of the server.
步骤 324:服务端数据解压缩模块使用对应于所述 USB摄像头视频信息传 输的解压缩算法, 对数据进行解压缩, 所述对应于所述 USB摄像头视频信息 传输的解压缩算法为服务器端根据所述客户端发送的压缩和解压缩算法的标 识信息查找到的对应的解压缩算法。  Step 324: The server-side data decompression module decompresses the data by using a decompression algorithm corresponding to the video information transmission of the USB camera, and the decompression algorithm corresponding to the video information transmission of the USB camera is a server-side The corresponding decompression algorithm found by the identification information of the compression and decompression algorithm sent by the client.
步骤 325:服务端数据解压缩模块将解压后的数据返回给虚拟主控制器驱 动。  Step 325: The server data decompression module returns the decompressed data to the virtual host controller driver.
步骤 326: 虚拟主控制器驱动将解压后的数据返回到 USB设备驱动。  Step 326: The virtual host controller driver returns the decompressed data to the USB device driver.
步骤 327: USB设备驱动将解压后的数据返回到摄像头应用软件, 这时, 用户可以查看 USB摄像头所产生的视频。 本发明实施例提供的设备重定向的方法, 通过在客户端与服务端传输数 据时, 在客户端识别接入的外部设备的类型, 从而根据设备类型确定合适的 压缩和解压缩算法, 将数据信息在一端进行压缩, 生成压缩数据传输到另一 端, 然后在另一端接收压缩数据, 并将压缩数据解压缩, 生成所述数据信息 进行使用, 减少了服务端与客户端之间的数据流量, 降低了传输带宽, 节省 了网络资源。 Step 327: The USB device driver returns the decompressed data to the camera application software, at which time the user can view the video generated by the USB camera. The device redirection method provided by the embodiment of the present invention, by transmitting the number between the client and the server According to the time, the client identifies the type of the external device to be accessed, thereby determining an appropriate compression and decompression algorithm according to the device type, compressing the data information at one end, generating compressed data for transmission to the other end, and then receiving the compressed data at the other end. Decompressing the compressed data, generating the data information for use, reducing data traffic between the server and the client, reducing transmission bandwidth, and saving network resources.
实施例 2  Example 2
本发明实施例提供了一种设备重定向的数据传输的方法, 应用在如图 2 所示的系统架构中, 若外部设备为 USB存储器, 则本发明实施例以服务端通 过客户端向 USB存储器写入数据为例具体描述, 如图 4所示, 步骤如下: 步骤 401 : 由客户端主控制器驱动检测到有 USB设备接入。  The embodiment of the present invention provides a method for data transmission of device redirection, which is applied to the system architecture shown in FIG. 2, and if the external device is a USB memory, the embodiment of the present invention uses the server to pass the client to the USB storage device. The data is written as an example. As shown in FIG. 4, the steps are as follows: Step 401: The USB host device is detected by the client host controller.
步骤 402: 主控制器驱动将获取到的 USB设备信息发送到 USB核心驱动。 步骤 403: USB核心驱动根据所述 USB设备信息获取所述 USB设备对应的 USB设备类型码, 并将 USB设备类型码发送到设备类型识别模块。  Step 402: The main controller driver sends the obtained USB device information to the USB core driver. Step 403: The USB core driver acquires a USB device type code corresponding to the USB device according to the USB device information, and sends the USB device type code to the device type identification module.
步骤 404:设备类型识别模块通过所述 USB设备类型码确定接入的设备类 型为 USB存储器。  Step 404: The device type identification module determines, by using the USB device type code, that the accessed device type is a USB memory.
其中, 所述设备类型识别模块通过所述 USB设备类型码确定接入的设备 类型的实现方式与所述步骤 304 中的有关描述相同, 本发明实施例对此不再 赘述。  The implementation of the device type identification module to determine the type of the device to be accessed by using the USB device type code is the same as the description in the step 304, which is not described in detail in the embodiment of the present invention.
步骤 405:设备类型识别模块将设备类型发送到压缩算法和解压缩算法选 择模块。  Step 405: The device type identification module sends the device type to the compression algorithm and the decompression algorithm selection module.
步骤 406:压缩和解压缩算法选择模块在接收到设备类型时获取最合适的 压缩算法和解压缩算法, 并将所述设备类型及压缩和解压缩算法的标识信息 发送到服务器端。  Step 406: The compression and decompression algorithm selection module acquires the most suitable compression algorithm and decompression algorithm when receiving the device type, and sends the device type and the identification information of the compression and decompression algorithm to the server.
其中, 所述压缩和解压缩算法选择模块在接收到设备类型时选择最合适 的压缩和解压缩算法的实现方式与所述步骤 306 中的有关描述相同, 本发明 实施例对此不再赘述。  The implementation of the compression and decompression algorithm selection module to select the most suitable compression and decompression algorithm when receiving the device type is the same as the description in the step 306, and details are not described herein.
步骤 407:接收到客户端发送的设备类型及压缩和解压缩算法的标识信息 之后, 服务器端根据所述客户端发送的设备类型检测到客户端有 USB存储器 接入, 并根据所述客户端发送的压缩和解压缩算法的标识信息查找对应压缩 和解压缩算法。 Step 407: Receive the device type sent by the client and the identification information of the compression and decompression algorithm. Then, the server detects that the client has USB memory access according to the device type sent by the client, and searches for a corresponding compression and decompression algorithm according to the identification information of the compression and decompression algorithm sent by the client.
步骤 408 : 服务端通过应用程序向 USB存储器写入数据, 首先将数据发送 到 USB设备驱动。  Step 408: The server writes data to the USB memory through the application, and first sends the data to the USB device driver.
步骤 409 : USB设备驱动将数据发送到虚拟主控制器驱动。  Step 409: The USB device driver sends the data to the virtual host controller driver.
步骤 41 0: 虚拟主控制器驱动将数据发送到数据压缩模块。  Step 41 0: The virtual host controller driver sends the data to the data compression module.
步骤 41 1 :服务端数据压缩模块使用对应于所述 USB存储器数据的压缩算 法, 对数据进行压缩, 所述对应于所述 USB存储器数据的压缩算法为服务器 端根据所述客户端发送的压缩和解压缩算法的标识信息查找到的对应的压缩 算法。  Step 41: The server data compression module compresses the data by using a compression algorithm corresponding to the USB memory data, where the compression algorithm corresponding to the USB memory data is a compression and solution sent by the server according to the client. The corresponding compression algorithm found by the identification information of the compression algorithm.
步骤 412 : 服务端数据压缩模块对数据压缩好后, 将压缩后的数据发送回 虚拟主控制器驱动。  Step 412: After the server data compression module compresses the data, the compressed data is sent back to the virtual host controller driver.
步骤 41 3 : 虚拟主控制器驱动将压缩后数据发送到远程桌面协议栈。 步骤 414 :服务器端的远程桌面协议栈将压缩后的数据发送到客户端的远 程桌面协议栈。  Step 41 3: The virtual host controller driver sends the compressed data to the remote desktop protocol stack. Step 414: The server-side remote desktop protocol stack sends the compressed data to the client's remote desktop protocol stack.
步骤 415 :客户端的远程桌面协议栈将压缩后的数据发送到虚拟 USB设备 驱动。  Step 415: The client's Remote Desktop Stack sends the compressed data to the virtual USB device driver.
步骤 416 :虚拟 USB设备驱动将压缩后的数据发送到客户端的数据解压缩 模块。  Step 416: The virtual USB device driver sends the compressed data to the data decompression module of the client.
步骤 417 :客户端数据解压缩模块使用已确定的对应于所述 USB存储器数 据的解压缩算法, 对数据进行解压缩。  Step 417: The client data decompression module decompresses the data using the determined decompression algorithm corresponding to the USB memory data.
步骤 418 :客户端数据解压缩模块将解压后的数据发送回虚拟 USB设备驱 动。  Step 418: The client data decompression module sends the decompressed data back to the virtual USB device driver.
步骤 419 : 虚拟 USB设备驱动将解压后的数据发送到主控制器驱动。 步骤 420: 主控制器驱动将解压后的数据写入 USB存储器。 本发明实施例提供的设备重定向的数据传输方法, 通过在客户端与服务 端传输数据时, 在客户端识别接入的外部设备的类型, 从而根据设备类型确 定合适的压缩和解压缩算法, 将数据信息在一端进行压缩, 生成压缩数据传 输到另一端, 然后在另一端接收压缩数据, 并将压缩数据解压缩, 生成所述 数据信息进行使用, 减少了服务端与客户端之间的数据流量, 降低了传输带 宽, 节省了网络资源。 Step 419: The virtual USB device driver sends the decompressed data to the main controller driver. Step 420: The main controller driver writes the decompressed data into the USB memory. The device redirection data transmission method provided by the embodiment of the present invention, when the client and the server transmit data, identify the type of the accessed external device on the client, and determine an appropriate compression and decompression algorithm according to the device type, The data information is compressed at one end, the compressed data is transmitted to the other end, and then the compressed data is received at the other end, and the compressed data is decompressed to generate the data information for use, thereby reducing data traffic between the server and the client. , reducing transmission bandwidth and saving network resources.
实施例 3  Example 3
本发明实施例提供了一种客户端设备, 如图 5所示, 该客户端设备包括: 获取模块 41、 获取发送模块 42、 压缩模块 43。  The embodiment of the present invention provides a client device. As shown in FIG. 5, the client device includes: an obtaining module 41, an obtaining sending module 42, and a compressing module 43.
获取模块 41 , 用于当检测到有外部设备接入时, 获取所述外部设备的设 备类型。  The obtaining module 41 is configured to acquire a device type of the external device when detecting that an external device is accessed.
其中, 所述获取模块具体用于当检测到有外部设备接入时, 获取所述外 部设备的设备信息, 所述设备信息包括所述外部设备的设备类型码; 根据所 述设备类型码确定所述外部设备的类型。  The acquiring module is specifically configured to: when detecting that an external device is accessed, acquiring device information of the external device, where the device information includes a device type code of the external device; determining, according to the device type code The type of external device.
获取发送模块 42 , 用于根据所述设备类型获取与所述外部设备对应的压 缩和解压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发 送给服务端。  The obtaining and sending module 42 is configured to acquire a compression and decompression algorithm corresponding to the external device according to the device type, and send the identification information of the compression and decompression algorithm and the device type to the server.
压缩模块 43 , 用于根据压缩算法对从所述外部设备获取的第一数据信息 进行压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述 服务端, 使得所述服务端根据收到的所述压缩和解压缩算法的标识信息及所 述设备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对 所述第一压缩数据信息进行解压缩。  The compression module 43 is configured to compress the first data information acquired from the external device according to a compression algorithm, generate first compressed data information, and send the first compressed data information to the server, so that the The server obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
其中, 所述压缩模块还包括远程桌面协议栈, 所述远程桌面协议栈用于 通过远程桌面协议封装所述压缩和解压缩算法的标识信息及所述设备类型, 将封装后的信息通过远程桌面协议发送给服务端。  The compression module further includes a remote desktop protocol stack, and the remote desktop protocol stack is configured to encapsulate the identification information of the compression and decompression algorithm and the device type by using a remote desktop protocol, and pass the encapsulated information to a remote desktop protocol. Sent to the server.
进一步的, 如图 6所示, 该装置还包括: 解压缩模块 44。  Further, as shown in FIG. 6, the apparatus further includes: a decompression module 44.
解压缩模块 44 , 用于当所述外部设备类型为 USB存储设备时, 根据压缩 算法对需要写入所述外部设备的第二数据信息压缩生成的第二压缩数据信 息, 获取第二数据信息并写入所述 USB存储设备。 The decompression module 44 is configured to: when the external device type is a USB storage device, according to compression The algorithm compresses the second compressed data information generated by the second data information that needs to be written into the external device, acquires the second data information, and writes the second data information to the USB storage device.
本发明实施例提供了一种设备重定向的数据传输的系统, 如图 7 所示, 该系统包括: 客户端 51、 服务端 52。  The embodiment of the invention provides a system for data transmission of device redirection. As shown in FIG. 7, the system includes: a client 51 and a server 52.
客户端 51 , 用于当检测到有外部设备接入时, 获取所述外部设备的设备 类型; 根据所述设备类型获取与所述外部设备对应的压缩和解压缩算法, 并 将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端 52; 根据 压缩算法对从所述外部设备获取的第一数据信息进行压缩, 生成第一压缩数 据信息, 并将所述第一压缩数据信息发送给所述服务端 52。  a client 51, configured to acquire a device type of the external device when detecting an external device access, acquire a compression and decompression algorithm corresponding to the external device according to the device type, and compress and decompress the compressed device The identification information of the algorithm and the device type are sent to the server 52; compressing the first data information acquired from the external device according to a compression algorithm, generating first compressed data information, and transmitting the first compressed data information To the server 52.
服务端 52 , 用于根据收到的所述压缩和解压缩算法的标识信息及所述设 备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所述 第一压缩数据信息进行解压缩, 获取第一数据信息。  The server 52 is configured to acquire, according to the received identification information of the compression and decompression algorithm, the decompression algorithm corresponding to the identifier information, and the first compressed data information according to the decompression algorithm. Decompress to obtain the first data information.
本发明实施例提供的设备重定向的数据传输的装置及系统, 通过在客户 端与服务端传输数据时, 在客户端识别接入的外部设备的类型, 从而根据设 备类型确定合适的压缩和解压缩算法, 将数据信息在一端进行压缩, 生成压 缩数据传输到另一端, 然后在另一端接收压缩数据, 并将压缩数据解压缩, 生成所述数据信息进行使用, 减少了服务端与客户端之间的数据流量, 降低 了传输带宽, 节省了网络资源。  The apparatus and system for data transmission of device redirection provided by the embodiment of the present invention, when transmitting data by the client and the server, identify the type of the external device accessed by the client, thereby determining appropriate compression and decompression according to the device type. The algorithm compresses the data information at one end, generates compressed data to be transmitted to the other end, and then receives the compressed data at the other end, and decompresses the compressed data to generate the data information for use, thereby reducing the relationship between the server and the client. Data traffic reduces transmission bandwidth and saves network resources.
通过以上的实施方式的描述, 所属领域的技术人员可以清楚地了解到本 发明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬件, 但 很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本 质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该 计算机软件产品存储在可读取的存储介质中, 如计算机的软盘, 硬盘或光盘 等, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. . Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. A hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, and any person skilled in the art can easily within the technical scope disclosed by the present invention. Any changes or substitutions are contemplated as being within the scope of the invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims

权利 要 求 书 Claim
1、 一种设备重定向的数据传输方法, 其特征在于, 包括: A data transmission method for device redirection, comprising:
当检测到有外部设备接入时, 客户端获取所述外部设备的设备类型; 客户端根据所述设备类型获取与所述外部设备对应的压缩和解压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端;  When detecting the access of the external device, the client acquires the device type of the external device; the client acquires a compression and decompression algorithm corresponding to the external device according to the device type, and the compression and decompression algorithm is The identification information and the device type are sent to the server;
客户端根据压缩算法对从所述外部设备获取的第一数据信息进行压缩, 生 成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服务端, 使得所 述服务端根据收到的所述压缩和解压缩算法的标识信息及所述设备类型获取所 述标识信息对应的解压缩算法, 并根据所述解压缩算法对所述第一压缩数据信 息进行解压缩。  The client compresses the first data information acquired from the external device according to a compression algorithm, generates first compressed data information, and sends the first compressed data information to the server, so that the server receives the data according to the receiving end. The identification information of the compression and decompression algorithm and the device type obtain the decompression algorithm corresponding to the identification information, and decompress the first compressed data information according to the decompression algorithm.
2、 根据权利要求 1所述的设备重定向的数据传输的方法, 其特征在于, 所 述当检测到有外部设备接入时, 获取所述外部设备的设备类型包括:  The method for data transmission of the device redirection according to claim 1, wherein when the external device is detected to be accessed, the device type of the external device is:
当检测到有外部设备接入时, 获取所述外部设备的设备信息, 所述设备信 息包括所述外部设备的设备类型码;  Obtaining device information of the external device when the external device is detected to be accessed, where the device information includes a device type code of the external device;
根据所述设备类型码确定所述外部设备的类型。  The type of the external device is determined according to the device type code.
3、 根据权利要求 1所述的设备重定向的数据传输的方法, 其特征在于, 所 述将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端包括: 客户端通过远程桌面协议封装所述压缩和解压缩算法的标识信息及所述设 备类型, 将封装后的信息通过远程桌面协议发送给服务端。  The method for data transmission of the device redirection according to claim 1, wherein the sending the identification information of the compression and decompression algorithm and the device type to the server comprises: the client passing the remote desktop The protocol encapsulates the identification information of the compression and decompression algorithm and the device type, and sends the encapsulated information to the server through a remote desktop protocol.
4、 根据权利要求 1所述的设备重定向的数据传输的方法, 其特征在于, 所 述将所述第一压缩数据信息发送给所述服务端包括:  The method for data transmission of the device redirection according to claim 1, wherein the transmitting the first compressed data information to the server comprises:
若所述外部设备为通用串行总线 USB设备, 则客户端的数据压缩模块将第 一压缩数据信息发送到客户端的虚拟 USB设备驱动;  If the external device is a universal serial bus USB device, the data compression module of the client sends the first compressed data information to the virtual USB device driver of the client;
所述虚拟 USB设备驱动将所述第一压缩数据信息发送给客户端的远程桌面 协议栈;  The virtual USB device driver sends the first compressed data information to a remote desktop protocol stack of the client;
所述客户端的远程桌面协议栈根据远程桌面协议封装所述第一压缩数据信 息, 将封装后的第一压缩数据信息发送给所述服务器端的远程桌面协议栈; 所述服务器端的远程桌面协议栈解封装所述封装后的第一压缩数据信息, 将所述第一压缩数据信息通过服务器端的虚拟主控制器驱动发送到数据解压缩 模块。 The remote desktop protocol stack of the client encapsulates the first compressed data information according to the remote desktop protocol, and sends the encapsulated first compressed data information to the remote desktop protocol stack of the server; The remote desktop protocol stack of the server decapsulates the encapsulated first compressed data information, and sends the first compressed data information to the data decompression module through a virtual host controller driver of the server.
5、 根据权利要求 1所述的设备重定向的数据传输的方法, 其特征在于, 在 将所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端之后, 还包 括:  The method for data transmission of the device redirection according to claim 1, wherein after the identification information of the compression and decompression algorithm and the device type are sent to the server, the method further includes:
服务端接收客户端发送的外部设备的设备类型及压缩和解压缩算法的标识 信息, 并根据所述压缩和解压缩算法的标识信息获取对应的压缩算法;  The server receives the device type of the external device and the identification information of the compression and decompression algorithm, and obtains a corresponding compression algorithm according to the identification information of the compression and decompression algorithm;
当所述外部设备类型为 USB存储设备时, 服务端根据压缩算法对需要写入 所述外部设备的第二数据信息进行压缩, 生成第二压缩数据信息, 并将所述第 二压缩数据信息发送给所述客户端, 以使得所述客户端根据解压缩算法对接收 到的第二压缩数据信息进行解压缩, 获得第二数据信息并写入到所述 USB存储 设备中。  When the external device type is a USB storage device, the server compresses the second data information that needs to be written into the external device according to a compression algorithm, generates second compressed data information, and sends the second compressed data information. Giving the client, so that the client decompresses the received second compressed data information according to the decompression algorithm, obtains the second data information, and writes the information to the USB storage device.
6、 一种客户端设备, 其特征在于, 包括:  6. A client device, comprising:
获取模块, 用于当检测到有外部设备接入时, 获取所述外部设备的设备类 型;  An obtaining module, configured to acquire a device type of the external device when an external device is detected to be accessed;
获取发送模块, 用于根据所述设备类型获取与所述外部设备对应的压缩和 解压缩算法, 并将所述压缩和解压缩算法的标识信息及所述设备类型发送给服 务端;  Obtaining a sending module, configured to acquire a compression and decompression algorithm corresponding to the external device according to the device type, and send the identification information of the compression and decompression algorithm and the device type to the server;
压缩模块, 用于根据压缩算法对从所述外部设备获取的第一数据信息进行 压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服务端, 使得所述服务端根据收到的所述压缩和解压缩算法的标识信息及所述设备类型 获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所述第一压缩 数据信息进行解压缩。  a compression module, configured to compress, according to a compression algorithm, first data information acquired from the external device, generate first compressed data information, and send the first compressed data information to the server, so that the service is The terminal obtains the decompression algorithm corresponding to the identifier information according to the identifier information of the compression and decompression algorithm and the device type, and decompresses the first compressed data information according to the decompression algorithm.
7、 根据权利要求 6所述的设备重定向的装置, 其特征在于,  7. Apparatus for device redirection according to claim 6 wherein:
所述获取模块具体用于当检测到有外部设备接入时, 获取所述外部设备的 设备信息, 所述设备信息包括所述外部设备的设备类型码; 根据所述设备类型 码确定所述外部设备的类型。 The acquiring module is specifically configured to: when detecting that an external device is accessed, acquiring device information of the external device, where the device information includes a device type code of the external device; The code determines the type of the external device.
8、 根据权利要求 6所述的设备重定向的装置, 其特征在于, 所述压缩模块 还包括:  The apparatus for redirection of the device according to claim 6, wherein the compression module further comprises:
远程桌面协议栈, 用于通过远程桌面协议封装所述压缩和解压缩算法的标 识信息及所述设备类型, 将封装后的信息通过远程桌面协议发送给服务端。  The remote desktop protocol stack is configured to encapsulate the identification information of the compression and decompression algorithm and the device type by using a remote desktop protocol, and send the encapsulated information to the server through a remote desktop protocol.
9、 根据权利要求 6所述的设备重定向的装置, 其特征在于, 还包括: 解压缩模块, 用于当所述外部设备类型为 USB存储设备时, 根据压缩算法 对需要写入所述外部设备的第二数据信息压缩生成的第二压缩数据信息, 获取 第二数据信息并写入所述 USB存储设备。  The apparatus for redirection of the device according to claim 6, further comprising: a decompression module, configured to: when the external device type is a USB storage device, write to the external The second data information of the device compresses the generated second compressed data information, acquires the second data information, and writes the information to the USB storage device.
1 0、 一种设备重定向的数据传输的系统, 其特征在于, 包括客户端和服务 端 ,  A system for data transmission of device redirection, characterized in that it comprises a client and a server,
所述客户端, 用于当检测到有外部设备接入时, 获取所述外部设备的设备 类型; 根据所述设备类型获取与所述外部设备对应的压缩和解压缩算法, 并将 所述压缩和解压缩算法的标识信息及所述设备类型发送给服务端; 根据压缩算 法对从所述外部设备获取的第一数据信息进行压缩, 生成第一压缩数据信息, 并将所述第一压缩数据信息发送给所述服务端;  The client is configured to acquire a device type of the external device when detecting the access of the external device, acquire a compression and decompression algorithm corresponding to the external device according to the device type, and obtain the compression and solution The identification information of the compression algorithm and the device type are sent to the server; the first data information acquired from the external device is compressed according to a compression algorithm, the first compressed data information is generated, and the first compressed data information is sent. To the server;
所述服务端, 用于根据收到的所述压缩和解压缩算法的标识信息及所述设 备类型获取所述标识信息对应的解压缩算法, 并根据所述解压缩算法对所述第 一压缩数据信息进行解压缩, 获取第一数据信息。  The server is configured to obtain, according to the received identification information of the compression and decompression algorithm, the decompression algorithm corresponding to the identifier information, and the first compressed data according to the decompression algorithm. The information is decompressed to obtain the first data information.
PCT/CN2011/082557 2011-11-21 2011-11-21 Method, device and system for device redirection data transmission WO2012163059A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/082557 WO2012163059A1 (en) 2011-11-21 2011-11-21 Method, device and system for device redirection data transmission
CN201180002856.7A CN103503381B (en) 2011-11-21 2011-11-21 The method of data transmission of device redirection, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/082557 WO2012163059A1 (en) 2011-11-21 2011-11-21 Method, device and system for device redirection data transmission

Publications (1)

Publication Number Publication Date
WO2012163059A1 true WO2012163059A1 (en) 2012-12-06

Family

ID=47258338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/082557 WO2012163059A1 (en) 2011-11-21 2011-11-21 Method, device and system for device redirection data transmission

Country Status (2)

Country Link
CN (1) CN103503381B (en)
WO (1) WO2012163059A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914525B (en) * 2014-03-25 2017-02-08 深圳市深信服电子科技有限公司 FAT32-formatted data reading method and system for use after USB equipment redirection
CN109783014B (en) * 2016-02-03 2022-04-05 华为技术有限公司 Data storage method and device
CN109246435B (en) * 2017-07-10 2022-03-15 中兴通讯股份有限公司 Method and device for transmitting redirected data of USB (universal serial bus) equipment, local device and remote server
CN110555120B (en) * 2019-08-14 2023-09-08 项宇 Picture compression control method, device, computer equipment and storage medium
CN117555829B (en) * 2024-01-12 2024-03-22 中诚华隆计算机技术有限公司 USB redirection system and method for realizing network sharing of USB equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009824A (en) * 2006-01-24 2007-08-01 成都索贝数码科技股份有限公司 A network transfer method for audio/video data
CN101035039A (en) * 2007-04-20 2007-09-12 福建升腾资讯有限公司 USB mapping method
CN101253489A (en) * 2005-09-09 2008-08-27 微软公司 Plug and play device redirection for remote systems
US20090150550A1 (en) * 2007-12-06 2009-06-11 Wyse Technology Inc. Local device redirection

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463463B1 (en) * 1998-05-29 2002-10-08 Research In Motion Limited System and method for pushing calendar event messages from a host system to a mobile data communication device
CN101373436B (en) * 2008-09-05 2012-12-05 四川和芯微电子股份有限公司 Method for automatically compressing and de-compressing data on U disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101253489A (en) * 2005-09-09 2008-08-27 微软公司 Plug and play device redirection for remote systems
CN101009824A (en) * 2006-01-24 2007-08-01 成都索贝数码科技股份有限公司 A network transfer method for audio/video data
CN101035039A (en) * 2007-04-20 2007-09-12 福建升腾资讯有限公司 USB mapping method
US20090150550A1 (en) * 2007-12-06 2009-06-11 Wyse Technology Inc. Local device redirection

Also Published As

Publication number Publication date
CN103503381A (en) 2014-01-08
CN103503381B (en) 2016-06-22

Similar Documents

Publication Publication Date Title
JP5148505B2 (en) Display system and method
EP1832971B1 (en) System and method for transmitting documents over network
US20140082052A1 (en) Data redirection system and method for providing data redirection service
JP2005521280A5 (en)
CN109040786B (en) Camera data transmission method, device and system and storage medium
WO2012163059A1 (en) Method, device and system for device redirection data transmission
TW201441825A (en) System and method for USB redirection
WO2017084309A1 (en) Device for wirelessly transmitting video, video playing device, method, and system
JP2002342192A (en) Device and method for processing information, network system, recording medium and program
WO2015168840A1 (en) Data processing method and apparatus
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
US20150086184A1 (en) Reception apparatus and reception method
CN112948151A (en) Program interface image transmission method, substrate management controller and remote control equipment
CN104639501B (en) A kind of method of data stream transmitting, equipment and system
EP3070951A1 (en) Video code stream obtaining method and apparatus
WO2014174763A1 (en) Processing device, integrated circuit, processing method, and program
CN106921634B (en) Multimedia stream multicast method and device
WO2013078614A1 (en) Audio compression algorithm selection method, device and communication system in scenario of virtual desktop
US20190182304A1 (en) Universal messaging protocol for limited payload size
US9838463B2 (en) System and method for encoding control commands
JP2008539614A (en) Integrated wireless multimedia transmission system
JP5135147B2 (en) Video file transmission server and operation control method thereof
CN113704206B (en) Metadata processing method and device, electronic equipment and storage medium
CN104219537A (en) Video data processing method, device and system
JP6175681B2 (en) USB device server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11866575

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11866575

Country of ref document: EP

Kind code of ref document: A1