CN112596793B - Redirection method and device for composite equipment - Google Patents

Redirection method and device for composite equipment Download PDF

Info

Publication number
CN112596793B
CN112596793B CN202011350390.7A CN202011350390A CN112596793B CN 112596793 B CN112596793 B CN 112596793B CN 202011350390 A CN202011350390 A CN 202011350390A CN 112596793 B CN112596793 B CN 112596793B
Authority
CN
China
Prior art keywords
configuration descriptor
usb device
cloud desktop
desktop system
redirection
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
CN202011350390.7A
Other languages
Chinese (zh)
Other versions
CN112596793A (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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011350390.7A priority Critical patent/CN112596793B/en
Publication of CN112596793A publication Critical patent/CN112596793A/en
Application granted granted Critical
Publication of CN112596793B publication Critical patent/CN112596793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a redirection method and a redirection device of composite equipment, wherein the method is applied to a terminal and comprises the following steps: receiving a configuration descriptor acquisition request sent by a cloud desktop system, wherein the configuration descriptor acquisition request comprises an identifier of a virtual USB device, the virtual USB device is created by the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device; acquiring a first configuration descriptor of the USB equipment corresponding to the virtual USB equipment according to the identifier of the virtual USB equipment; acquiring a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system from the first configuration descriptor according to the configured functional unit redirection strategy; and sending a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises a second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.

Description

Redirection method and device for composite equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a redirection method and apparatus for a composite device.
Background
With the development of the USB protocol and the virtualization technology, in an office or teaching environment, a scenario in which the USB composite device is redirected to a cloud desktop system often occurs. The composite device is used as a USB device with a plurality of independent function interfaces, and the system environment or the safety level suitable for each function is different.
In one example, for a USB camera with a microphone function, the camera function needs to be used in a cloud desktop system, but the microphone function needs to be used on a local terminal, so as to encode and compress audio data through an audio redirection technology, thereby optimizing transmission delay.
In another example, for a UKey device with a storage function, the function of the encryption authentication module needs to be used in the cloud desktop system, but the function of the storage device cannot be used in the cloud desktop system.
In summary, the existing USB redirection technology cannot meet the requirement that part of functions of the USB composite device need to be used in the local terminal and part of functions need to be used in the cloud desktop system. Therefore, it is an urgent problem to provide a technology for redirecting a function interface of a USB composite device.
Disclosure of Invention
In view of this, the present application provides a redirection method and apparatus for a composite device, so as to provide a technology for redirecting a function interface of a USB composite device.
In a first aspect, the present application provides a redirection method for a composite device, where the method is applied to a terminal, and the terminal accesses a USB device, and the method includes:
receiving a configuration descriptor acquisition request sent by a cloud desktop system, wherein the configuration descriptor acquisition request comprises an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device;
acquiring a first configuration descriptor of the USB device corresponding to the virtual USB device according to the identifier of the virtual USB device, wherein the first configuration descriptor comprises configuration descriptors of all functional units in the USB device;
acquiring a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system from the first configuration descriptor according to the configured functional unit redirection strategy;
sending a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
In a second aspect, the present application provides a redirection apparatus for a composite device, where the apparatus is applied to a terminal, and the terminal accesses a USB device, and the apparatus includes:
a receiving unit, configured to receive a request for obtaining a configuration descriptor sent by a cloud desktop system, where the request for obtaining the configuration descriptor includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device;
a first obtaining unit, configured to obtain, according to an identifier of the virtual USB device, a first configuration descriptor of the USB device corresponding to the virtual USB device, where the first configuration descriptor includes configuration descriptors of all functional units in the USB device;
a second obtaining unit, configured to obtain, from the first configuration descriptor, a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system according to the configured functional unit redirection policy;
a sending unit, configured to send a configuration descriptor obtaining response to the cloud desktop system, where the configuration descriptor obtaining response includes the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
In a third aspect, the present application provides a terminal comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the first aspect of the present application.
Therefore, by applying the redirection method and device for the composite device provided by the application, the terminal receives a configuration descriptor acquisition request sent by the cloud desktop system, the configuration descriptor acquisition request includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to the received redirection instruction, and the virtual USB device corresponds to a USB device of the access terminal. According to the identification of the virtual USB device, the terminal acquires a first configuration descriptor of the USB device corresponding to the virtual USB device, wherein the first configuration descriptor comprises configuration descriptors of all functional units in the USB device. And according to the configured function unit redirection strategy, the terminal acquires a second configuration descriptor corresponding to the first function unit to be redirected to the cloud desktop system from the first configuration descriptor. And the terminal sends a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises a second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
Therefore, the requirements that part of functions of the USB composite equipment need to be used in the local terminal and part of functions need to be used in the cloud desktop system are met, and the defects of the prior art are overcome.
Drawings
Fig. 1 is a flowchart of a redirection method for a composite device according to an embodiment of the present application;
fig. 2 is a redirection networking structure diagram of a composite device according to an embodiment of the present application;
fig. 3 is a structural diagram of a redirection device of a composite apparatus according to an embodiment of the present application;
fig. 4 is a diagram of a terminal hardware structure according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The redirection method of the composite device provided in the embodiments of the present application is described in detail below. Referring to fig. 1, fig. 1 is a flowchart of a redirection method for a composite device according to an embodiment of the present application. The method is applied to a terminal, and the redirection method of the composite device provided by the embodiment of the application can comprise the following steps.
Step 110, receiving a configuration descriptor obtaining request sent by a cloud desktop system, where the configuration descriptor obtaining request includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device.
Specifically, the terminal accesses a USB device. The USB device is a composite device. For example a USB camera with microphone functionality.
When a USB device is accessed to a terminal, the terminal determines a plurality of functional units that constitute the device functions of the USB device. In the embodiment of the present application, the functional unit specifically includes a functional Interface or an Interface Association Descriptor (IAD). In one example, a USB camera with microphone functionality. The terminal can determine that the device functions that make up the USB device include two functional units, a microphone function and a camera function, respectively.
And according to the configured function unit redirection strategy, the terminal selects a first function unit to be redirected to the cloud desktop system from the plurality of function units. According to the foregoing example, in the configured functional unit redirection strategy, the microphone function does not need to be redirected into the cloud desktop system, and the camera function needs to be redirected into the cloud desktop system. The terminal selects the camera function as a first function unit to be redirected to the cloud desktop system.
In the embodiment of the application, the functional unit redirection policy is configured in advance, and may be a functional unit that is selected by a user in advance and needs to be redirected to the cloud desktop system, or a functional unit that is selected by a manager in advance and needs to be redirected to the cloud desktop system. For example, the functional units such as a mouse, a keyboard, a microphone, a speaker, a sound and the like do not need to be redirected into the cloud desktop system; the functional units such as the camera, the USB flash disk and the printer are redirected to the cloud desktop system as required.
The terminal generates and redirects an instruction to the cloud desktop system, where the redirection instruction includes the identifier of the selected first functional unit, that is, the redirection instruction includes an identifier of the camera function. And the terminal sends a redirection instruction to the cloud desktop system.
After the cloud desktop system receives the redirection instruction, the identification of the first functional unit is obtained from the redirection instruction, and the cloud desktop system creates a virtual USB device in a virtual machine in the kernel. The virtual USB device corresponds to a USB device accessed by the terminal and also comprises a first functional unit. That is, the virtual USB device has the same device-related content such as the name, ID, and partial functional unit as the USB device accessed by the terminal.
In the embodiment of the application, the virtual USB device created by the cloud desktop system is a virtual USB camera, and the virtual USB camera includes a camera function.
After the cloud desktop system creates the virtual USB camera, the configuration descriptor of the virtual USB camera needs to be acquired so as to further perform function configuration on the camera function, but the configuration descriptor of the camera function is not stored in the cloud desktop system. The cloud desktop system generates a get configuration descriptor request that includes an identification of the virtual USB device, that is, the get configuration descriptor request includes an identification of the virtual USB camera.
The terminal receives a configuration descriptor acquisition request sent by the cloud desktop system, and the identifier of the virtual USB device is obtained from the configuration descriptor acquisition request, namely the identifier of the virtual USB camera is obtained by the terminal.
Step 120, obtaining a first configuration descriptor of the USB device corresponding to the virtual USB device according to the identifier of the virtual USB device, where the first configuration descriptor includes configuration descriptors of all functional units in the USB device.
Specifically, according to the description in step 110, after the terminal acquires the identifier of the virtual USB device, the terminal accesses the accessed USB device, and acquires the first configuration descriptor of the USB device from the USB device. The first configuration descriptor includes configuration descriptors of all functional units in the USB device.
Further, according to the foregoing example, after the terminal acquires the identifier of the virtual USB camera, the terminal accesses the accessed USB camera and acquires the first configuration descriptor of the USB camera from the USB camera. The first configuration descriptor includes configuration descriptors of all functional units in the USB camera. That is, the first configuration descriptor includes a configuration descriptor of a microphone function and a configuration descriptor of a camera function.
Step 130, according to the configured function unit redirection strategy, obtaining a second configuration descriptor corresponding to the first function unit to be redirected to the cloud desktop system from the first configuration descriptor.
Specifically, after acquiring the first configuration descriptor according to the descriptions in step 110 and step 120, the terminal acquires the second configuration descriptor from the first configuration descriptor again according to the functional unit redirection policy. The second configuration descriptor is a configuration descriptor corresponding to the first functional unit.
Further, the terminal determines, according to the function unit redirection policy, a configuration descriptor (e.g., a second configuration descriptor) of a function unit (e.g., a first function unit, that is, a camera function) to be redirected to the cloud desktop system and a configuration descriptor (e.g., a third configuration descriptor) corresponding to a function unit (e.g., a second function unit, that is, a microphone function) that is not redirected to the cloud desktop system from the first configuration descriptor.
And the terminal deletes the third configuration descriptor from the first configuration descriptor to obtain a second configuration descriptor.
It can be understood that, in the embodiment of the present application, for the microphone function that is not redirected to the cloud desktop system, the configuration of the microphone function in the terminal remains unchanged, that is, the microphone function is not configured to be redirected.
Step 140, sending a configuration descriptor obtaining response to the cloud desktop system, where the configuration descriptor obtaining response includes the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
Specifically, according to the description in step 130, after the terminal acquires the second configuration descriptor, the terminal generates a response for acquiring the configuration descriptor. The get configuration descriptor response includes a second configuration descriptor. And the terminal sends a configuration descriptor acquisition response to the cloud desktop system.
And after receiving the configuration descriptor acquisition response, the cloud desktop system acquires a second configuration descriptor from the configuration descriptor acquisition response. And the cloud desktop system configures the first functional unit in the virtual USB device by using the second configuration descriptor.
Further, the second configuration descriptor includes an interface that includes an endpoint (endpoint) below the interface. When the cloud desktop system configures the first functional unit, the port is also reset.
Further, in this embodiment of the application, after the cloud desktop system obtains the second configuration descriptor, the camera function is configured in the virtual USB camera by using the second configuration descriptor.
Therefore, by applying the redirection method for the composite device provided by the application, the terminal receives a request for obtaining the configuration descriptor sent by the cloud desktop system, the request for obtaining the configuration descriptor includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to the received redirection instruction, and the virtual USB device corresponds to a USB device of the access terminal. According to the identification of the virtual USB device, the terminal acquires a first configuration descriptor of the USB device corresponding to the virtual USB device, wherein the first configuration descriptor comprises configuration descriptors of all functional units in the USB device. And according to the configured function unit redirection strategy, the terminal acquires a second configuration descriptor corresponding to the first function unit to be redirected to the cloud desktop system from the first configuration descriptor. And the terminal sends a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises a second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
Therefore, the requirements that part of functions of the USB composite equipment need to be used in the local terminal and part of functions need to be used in the cloud desktop system are met, and the defects of the prior art are overcome.
The redirection method of the composite device provided in the embodiments of the present application is described in detail below. Referring to fig. 2, fig. 2 is a block diagram of a redirection networking of a composite device according to an embodiment of the present application.
As shown in fig. 2, the terminal includes a first USB driver, a client, and a first USB redirection service. The cloud desktop system comprises a second USB redirection service, the created virtual USB device, a second USB driver and an application program.
The terminal is connected with a USB device. The USB device is a composite device. For example a USB camera with microphone functionality.
When the USB equipment is accessed to the terminal, the first USB driver senses that the USB equipment is accessed. The first USB driver feeds back to the operating system of the terminal (which may be referred to as the first operating system) that there is currently a USB device access. The first operating system traverses the USB equipment of the access terminal and analyzes the function of the USB equipment. The first operating system determines a plurality of functional units that constitute device functions of the USB device. In one example, a USB camera with microphone functionality. The first operating system may determine that the device functions that make up the USB device include two functional units, a microphone function and a camera function, respectively.
The client queries the USB equipment of the current access terminal from the first operating system. The first operating system feeds back the USB equipment of the current access terminal and a plurality of functional units of each USB equipment to the client.
And after receiving the feedback of the first operating system, the client displays the relevant information of each USB device in the external setting list. The related information of the USB device comprises: name of the USB device, location, number of functional units, interface fields of each functional unit, etc.
The current access to a USB camera with a microphone function is taken as an example for explanation. In the configured function unit redirection strategy, the microphone function does not need to be redirected to the cloud desktop system, and the camera function needs to be redirected to the cloud desktop system. The client selects the camera function as a first functional unit to be redirected to the cloud desktop system.
In the embodiment of the application, the functional unit redirection policy is configured in advance, and may be a functional unit that is selected by a user in advance and needs to be redirected to the cloud desktop system, or a functional unit that is selected by a manager in advance and needs to be redirected to the cloud desktop system. For example, the functional units such as a mouse, a keyboard, a microphone, a speaker, a sound and the like do not need to be redirected into the cloud desktop system; the functional units such as the camera, the USB flash disk and the printer are redirected to the cloud desktop system as required.
And the client sends a control instruction to the first USB redirection service, wherein the control instruction comprises an identifier of the camera function. In embodiments of the present application, a USB device, such as 1-1, 1-2, is typically identified using a device access path. The identification of the functional unit is used, for example, the 1-1:2 identification is used for identifying the 2 nd interface of the USB device 1-1 after the device identification.
And after receiving the control instruction, the first USB redirection service acquires the identification of the camera function from the control instruction. The first USB redirection service determines that the camera function needs to be redirected to the cloud desktop system. The first USB redirection service generates a redirection instruction that includes an identification of a camera function. The first USB redirection service sends a redirection instruction to the second USB redirection service.
After receiving the redirection instruction, the second USB redirection service transmits the redirection instruction to an operating system (which may be referred to as a second operating system) of the cloud desktop system. And after receiving the redirection instruction, the second operating system acquires the identifier of the first functional unit, namely the identifier of the camera function, from the redirection instruction. The second operating system creates a virtual camera device in a virtual machine included in the kernel, and creates a camera function in the virtual camera device, wherein the virtual camera device is a virtual USB device. The virtual camera device corresponds to a USB camera with a microphone function accessed by the terminal and also comprises a first functional unit. That is, the virtual camera device has the same device-related contents of name, ID, partial functional unit, and the like as the USB camera having the microphone function.
After the second operating system creates the virtual camera device, the configuration descriptor of the virtual camera device needs to be acquired, so as to further perform function configuration on the camera function. The second operating system requests the second USB driver for the configuration descriptor of the camera function, but the second USB driver does not store the configuration descriptor of the camera function, and the second USB driver responds to the second operating system for storing the configuration descriptor of the camera function.
The second operating system generates a get configuration descriptor request that includes the identification of the virtual camera device, i.e., the get configuration descriptor request includes the identification of the virtual camera device.
The second operating system sends the get configuration descriptor request to a second USB redirection service. And after receiving the configuration descriptor acquiring request, the second USB redirection service sends the configuration descriptor acquiring request to the first USB redirection service.
After the first USB redirection service receives the configuration descriptor acquisition request, the first USB redirection service transmits the configuration descriptor acquisition request to the first operating system through the first USB driver. The first operating system obtains the identifier of the virtual camera device from the request for obtaining the configuration descriptor, that is, the first operating system obtains the identifier of the virtual camera device.
The first operating system accesses a USB camera corresponding to the identifier of the virtual camera device through the first USB driver, and acquires a first configuration descriptor of the USB camera from the USB camera. The first configuration descriptor includes configuration descriptors of all functional units in the USB camera. That is, the first configuration descriptor includes a configuration descriptor of a microphone function and a configuration descriptor of a camera function.
And after the first operating system acquires the first configuration descriptor, acquiring a second configuration descriptor from the first configuration descriptor again according to the functional unit redirection strategy. The second configuration descriptor is a configuration descriptor corresponding to a camera function.
Further, the first operating system determines, according to the function unit redirection policy, a second configuration descriptor of the camera function unit to be redirected to the cloud desktop system and a third configuration descriptor corresponding to a microphone function that is not redirected to the cloud desktop system from the first configuration descriptor.
And the first operating system deletes the third configuration descriptor from the first configuration descriptor so as to obtain a second configuration descriptor.
It can be understood that, in the embodiment of the present application, for the microphone function that is not redirected to the cloud desktop system, the configuration of the microphone function in the terminal remains unchanged, that is, the microphone function is not configured to be redirected.
And after the first operating system acquires the second configuration descriptor, the first operating system generates a configuration descriptor acquisition response. The get configuration descriptor response includes a second configuration descriptor. The first operating system sends the get configuration descriptor response to the first USB redirection service through the first USB driver.
And after receiving the configuration descriptor acquisition response, the first USB redirection service sends the configuration descriptor acquisition response to the second USB redirection service.
And after receiving the acquisition configuration descriptor, the second USB redirection service sends an acquisition configuration descriptor response to the second operating system. And after receiving the acquisition configuration descriptor, the second operating system acquires a second configuration descriptor from the acquisition configuration descriptor. And the second operating system configures the camera function in the virtual camera equipment by using the second configuration descriptor.
Further, the second configuration descriptor includes an interface that includes an endpoint (endpoint) below the interface. When the second operating system configures the camera function, the port is reset.
After the second operating system completes the function configuration of the camera, the second configuration descriptor may be stored in the USB function driver.
Therefore, through the description of the embodiment of the application, the requirements that part of functions of the USB composite equipment are used in the terminal and part of functions are used in the cloud desktop system in an oriented mode can be met, and the office experience of a user when the user uses the peripheral equipment in the cloud desktop system is enhanced.
Based on the same inventive concept, the embodiment of the application also provides a redirection device of the composite device, which corresponds to the redirection method of the composite device. Referring to fig. 3, fig. 3 is a structural diagram of a redirection apparatus for a composite device according to an embodiment of the present application, where the apparatus is applied to a terminal, and the terminal accesses a USB device, and the apparatus includes:
a receiving unit 310, configured to receive a request for obtaining a configuration descriptor sent by a cloud desktop system, where the request for obtaining the configuration descriptor includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device;
a first obtaining unit 320, configured to obtain, according to an identifier of the virtual USB device, a first configuration descriptor of the USB device corresponding to the virtual USB device, where the first configuration descriptor includes configuration descriptors of all functional units in the USB device;
a second obtaining unit 330, configured to obtain, according to a configured functional unit redirection policy, a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system from the first configuration descriptor;
a sending unit 340, configured to send a configuration descriptor obtaining response to the cloud desktop system, where the configuration descriptor obtaining response includes the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
Optionally, the apparatus further comprises: a determining unit (not shown in the figure) configured to determine, after the USB device is connected to the terminal, a plurality of function units that constitute device functions of the USB device;
a selecting unit (not shown in the figure), configured to select, according to a configured functional unit redirection policy, the first functional unit to be redirected to the cloud desktop system from the plurality of functional units;
the sending unit 340 is further configured to send a redirection instruction to the cloud desktop system, where the redirection instruction includes an identifier of the first functional unit, so that the cloud desktop system constructs, according to the redirection instruction, a virtual USB device corresponding to the USB device in the cloud desktop system, where the virtual USB device includes the first functional unit.
Optionally, the second obtaining unit 330 is specifically configured to delete a third configuration descriptor corresponding to a second functional unit that is not redirected to the cloud desktop system from the first configuration descriptor, so as to obtain the second configuration descriptor.
Optionally, the apparatus further comprises: a maintaining unit (not shown in the figure) for maintaining the configuration of the second functional unit of the non-redirected to cloud desktop system in the terminal.
Optionally, the functional unit specifically includes a functional interface or an interface association descriptor IAD.
Therefore, by applying the redirection device of the composite device provided by the application, the device receives a configuration descriptor acquisition request sent by the cloud desktop system, wherein the configuration descriptor acquisition request includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to the received redirection instruction, and the virtual USB device corresponds to a USB device of the access terminal. According to the identification of the virtual USB device, the device acquires a first configuration descriptor of the USB device corresponding to the virtual USB device, wherein the first configuration descriptor comprises configuration descriptors of all functional units in the USB device. And according to the configured function unit redirection strategy, the device acquires a second configuration descriptor corresponding to the first function unit to be redirected to the cloud desktop system from the first configuration descriptor. The device sends a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises a second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB equipment according to the second configuration descriptor.
Therefore, the requirements that part of functions of the USB composite equipment need to be used in the local terminal and part of functions need to be used in the cloud desktop system are met, and the defects of the prior art are overcome.
Based on the same inventive concept, the present application further provides a terminal, as shown in fig. 4, including a processor 410, a transceiver 420, and a machine-readable storage medium 430, where the machine-readable storage medium 430 stores machine-executable instructions capable of being executed by the processor 410, and the processor 410 is caused by the machine-executable instructions to perform the redirection method for a composite device provided in the present application. The redirection device of the composite device shown in fig. 3 can be implemented by using a terminal hardware structure shown in fig. 4.
The computer-readable storage medium 430 may include a Random Access Memory (RAM) or a Non-volatile Memory (NVM), such as at least one disk Memory. Alternatively, the computer-readable storage medium 430 may also be at least one memory device located remotely from the processor 410.
The Processor 410 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; the Integrated Circuit can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the embodiment of the present application, the processor 410 is caused by machine executable instructions, by reading the machine executable instructions stored in the machine readable storage medium 430, to implement the processor 410 itself and the call transceiver 420 to perform the redirection method of the composite device described in the embodiment of the present application.
Additionally, embodiments of the present application provide a machine-readable storage medium 430, the machine-readable storage medium 430 storing machine-executable instructions that, when invoked and executed by the processor 410, cause the processor 410 itself and the invoking transceiver 420 to perform the aforementioned redirection methods of the composite device described in embodiments of the present application.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As for the redirection device of the composite device and the machine-readable storage medium embodiment, since the contents of the related method are substantially similar to those of the foregoing method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A redirection method for a composite device is applied to a terminal, wherein the terminal is accessed to a USB device, and the method comprises the following steps:
receiving a configuration descriptor acquisition request sent by a cloud desktop system, wherein the configuration descriptor acquisition request comprises an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device;
acquiring a first configuration descriptor of the USB device corresponding to the virtual USB device according to the identifier of the virtual USB device, wherein the first configuration descriptor comprises configuration descriptors of all functional units in the USB device;
acquiring a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system from the first configuration descriptor according to the configured functional unit redirection strategy;
sending a configuration descriptor obtaining response to the cloud desktop system, wherein the configuration descriptor obtaining response comprises the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
2. The method of claim 1, wherein before receiving the request to obtain the configuration descriptor sent by the cloud desktop system, the method further comprises:
after the USB equipment is accessed to the terminal, determining a plurality of functional units forming the equipment functions of the USB equipment;
selecting a first functional unit to be redirected to a cloud desktop system from the plurality of functional units according to a configured functional unit redirection strategy;
sending a redirection instruction to the cloud desktop system, where the redirection instruction includes an identifier of the first functional unit, so that the cloud desktop system constructs a virtual USB device corresponding to the USB device in the cloud desktop system according to the redirection instruction, where the virtual USB device includes the first functional unit.
3. The method according to claim 1, wherein the obtaining a second configuration descriptor corresponding to a first functional unit to be redirected to a cloud desktop system from the first configuration descriptor specifically includes:
and deleting a third configuration descriptor corresponding to a second functional unit which is not redirected to the cloud desktop system from the first configuration descriptor to obtain a second configuration descriptor.
4. The method of claim 3, further comprising:
the configuration of the second functional unit of the non-redirected to cloud desktop system in the terminal is kept unchanged.
5. Method according to any of claims 1-4, wherein the functional unit comprises in particular a functional interface or an interface association descriptor IAD.
6. The redirection device for the composite equipment is characterized in that the redirection device is applied to a terminal, the terminal is accessed to a USB device, and the redirection device comprises:
a receiving unit, configured to receive a request for obtaining a configuration descriptor sent by a cloud desktop system, where the request for obtaining the configuration descriptor includes an identifier of a virtual USB device, the virtual USB device is created for the cloud desktop system according to a received redirection instruction, and the virtual USB device corresponds to the USB device;
a first obtaining unit, configured to obtain, according to an identifier of the virtual USB device, a first configuration descriptor of the USB device corresponding to the virtual USB device, where the first configuration descriptor includes configuration descriptors of all functional units in the USB device;
a second obtaining unit, configured to obtain, from the first configuration descriptor, a second configuration descriptor corresponding to a first functional unit to be redirected to the cloud desktop system according to the configured functional unit redirection policy;
a sending unit, configured to send a configuration descriptor obtaining response to the cloud desktop system, where the configuration descriptor obtaining response includes the second configuration descriptor, so that the cloud desktop system configures the first functional unit in the virtual USB device according to the second configuration descriptor.
7. The apparatus of claim 6, further comprising:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a plurality of functional units forming the device functions of the USB device after the USB device is accessed to the terminal;
the selecting unit is used for selecting the first functional unit to be redirected to the cloud desktop system from the plurality of functional units according to the configured functional unit redirection strategy;
the sending unit is further configured to send a redirection instruction to the cloud desktop system, where the redirection instruction includes an identifier of the first functional unit, so that the cloud desktop system constructs, according to the redirection instruction, a virtual USB device corresponding to the USB device in the cloud desktop system, where the virtual USB device includes the first functional unit.
8. The apparatus according to claim 6, wherein the second obtaining unit is specifically configured to delete a third configuration descriptor corresponding to a second functional unit that is not redirected to the cloud desktop system from the first configuration descriptor to obtain the second configuration descriptor.
9. The apparatus of claim 8, further comprising:
and the holding unit is used for keeping the configuration of the second functional unit of the non-redirected cloud desktop system in the terminal unchanged.
10. The apparatus according to any of claims 6-9, wherein the functional unit specifically comprises a functional interface or an interface association descriptor IAD.
CN202011350390.7A 2020-11-26 2020-11-26 Redirection method and device for composite equipment Active CN112596793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011350390.7A CN112596793B (en) 2020-11-26 2020-11-26 Redirection method and device for composite equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011350390.7A CN112596793B (en) 2020-11-26 2020-11-26 Redirection method and device for composite equipment

Publications (2)

Publication Number Publication Date
CN112596793A CN112596793A (en) 2021-04-02
CN112596793B true CN112596793B (en) 2022-04-01

Family

ID=75184507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011350390.7A Active CN112596793B (en) 2020-11-26 2020-11-26 Redirection method and device for composite equipment

Country Status (1)

Country Link
CN (1) CN112596793B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9495012B2 (en) * 2011-09-27 2016-11-15 Z124 Secondary single screen mode activation through user interface activation
CN102567074B (en) * 2011-11-29 2015-01-21 中标软件有限公司 USB (universal serial bus) device redirecting method facing virtual machines
CN104063335B (en) * 2013-03-20 2017-06-27 华为技术有限公司 USB device reorientation method, equipment and system
CN104539685B (en) * 2014-12-19 2018-06-22 华南理工大学 The USB flash disk identifying system and method for a kind of OpenStack clouds desktop
CN105391652B (en) * 2015-12-03 2018-08-31 武汉噢易云计算股份有限公司 The system and method for realizing USB device network share is redirected based on USB
CN107203408B (en) * 2016-03-17 2021-02-23 华为技术有限公司 Redirection method, device and system
CN109857465A (en) * 2018-11-23 2019-06-07 广东微云科技股份有限公司 A kind of automatic installation method and system of cloud desktop usb driving
CN109582425B (en) * 2018-12-04 2020-04-14 中山大学 GPU service redirection system and method based on cloud and terminal GPU fusion
CN109587566A (en) * 2018-12-12 2019-04-05 四川九州电子科技股份有限公司 The realization system and implementation method of cloud desktop terminal based on top box of digital machine
CN110334037A (en) * 2019-04-15 2019-10-15 长飞光纤光缆股份有限公司 The method that USB based on cloud desktop redirects filtering
CN110191158A (en) * 2019-05-09 2019-08-30 厦门网宿有限公司 A kind of cloud desktop services method and system

Also Published As

Publication number Publication date
CN112596793A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN110363026B (en) File operation method, device, equipment, system and computer readable storage medium
US10579442B2 (en) Inversion-of-control component service models for virtual environments
US20170102935A1 (en) Mobile application processing
CN113748685A (en) Network-based media processing control
CN108881228A (en) Cloud registration activation method, device, equipment and storage medium
CN106557288B (en) Method and device for acquiring printing data
CN112165482B (en) Data processing method, data processing device, computer equipment and medium
US11575689B2 (en) System, method, and computer program product for dynamically configuring a virtual environment for identifying unwanted data
US20170171301A1 (en) Method, device and system for load balancing configuration
US10506400B2 (en) Data download method and apparatus
US11882154B2 (en) Template representation of security resources
US20150113033A1 (en) Emulating test distibuted application on server
US10536559B2 (en) Blocking an interface of a redirected USB composite device
CN105763545A (en) BYOD method and device
US8793326B2 (en) System, method and computer program product for reconstructing data received by a computer in a manner that is independent of the computer
WO2018068655A1 (en) License management method and system
CN112596793B (en) Redirection method and device for composite equipment
CN109218371B (en) Method and equipment for calling data
US10742802B2 (en) Methods and devices for verifying a communication number
KR102622252B1 (en) Apparatus and method for transmitting contents
US11853560B2 (en) Conditional role decision based on source environments
US11641331B2 (en) System and method for blocking distribution of non-acceptable attachments
CN110035091B (en) Method, device and server for modifying session information in network information system
CN113535429A (en) Data processing method, apparatus, device, medium, and program product
KR101330434B1 (en) Method and system for accessing to server of terminal device

Legal Events

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