Peripheral redirection method of cloud terminal, cloud terminal, electronic device and medium
Patent Information
- Application Number
- CN202210699916.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-06-20
AI Technical Summary
现有技术无论“端口重定向”还是“设备重定向”,主要针对的是单独的云桌面系统,解决了外设拉远的问题
[0050]本公开提供的云终端的外设重定向方法、云终端、电子设备以及计算机可读存储介质,针对为用户将不同系统的应用封装在不同的容器中,用户需要使用不同的应用时会进行容器切换的场景,可以同步将用户的输入和输出外设重定向到将要使用的不同系统的应用,解决多外设对多容器、多应用的情况下,用户外设的重新定向问题,并在容器切换时仍保证服务质量。
Smart Images

Figure CN117290003B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, specifically to a peripheral redirection method for a cloud terminal, a cloud terminal, an electronic device, and a computer-readable storage medium. Background Technology
[0002] A cloud terminal is a terminal device that runs in the cloud. It connects to the cloud-based system desktop via specific communication protocols and displays it on the front end, then redirects local input and output data to the virtual terminal on the cloud side. Cloud terminals concentrate the main computing resources on cloud servers, thus enabling centralized management and convenient deployment.
[0003] "Cloud desktop" is a primary manifestation of cloud terminals, referring to a mode of accessing a cloud desktop through a client or other network-connected device. It consists of desktop virtualization software, virtual desktop transmission protocols, virtual desktop connection proxies, and terminals (including thin, thick, and mobile terminals). When using a cloud desktop, peripherals are connected to the local thin client or PC. The cloud desktop communicates with the cloud virtual machine through a cloud desktop client installed on the thin client, making the cloud desktop operating system recognize the peripherals as if they were actually connected to the cloud virtual machine. To address peripheral compatibility issues, cloud desktops employ two operating modes: one operates at the USB driver layer: the cloud desktop implements a low-level virtual driver, and the cloud desktop client on the thin client intercepts the underlying device information, then transmits it to the cloud virtual machine via the cloud desktop protocol, where the low-level driver implemented by the cloud virtual machine retrieves and parses the messages; the other operates at the application layer, providing a mapping from the thin client to the cloud virtual machine for a specific type of device and offering a dedicated channel for business data transmission, such as cameras, printers, scanners, and smart card devices.
[0004] Currently, most peripherals use USB interfaces. The first type operates at the USB driver layer, corresponding to USB port redirection; the second type operates at the application layer, corresponding to device redirection. Existing technologies, whether "port redirection" or "device redirection," primarily target standalone cloud desktop systems, solving the problem of remote peripheral access. However, in standalone cloud desktop systems, all applications are installed on virtual machines in the cloud, tightly coupled to the local thin client or PC, making it impossible to use applications not installed on cloud virtual machines. When users want to use applications installed on different cloud virtual machines, if different protocols are used, they need to change their local thin client or open different clients on their local PC, which is cumbersome and inconvenient. Summary of the Invention
[0005] To address the aforementioned problems in the prior art, this disclosure provides a method for redirecting peripherals in a cloud terminal. The cloud terminal, electronic device, and computer-readable storage medium can synchronously redirect a user's input and output peripherals to applications in different systems to be used, solving the problem of redirecting user peripherals in the case of multiple peripherals to multiple containers and multiple applications, while ensuring service quality during container switching.
[0006] In a first aspect, this disclosure provides a peripheral redirection method for a cloud terminal, applied to a cloud terminal, the method comprising:
[0007] When a user has already used an application within the first application container and selects to use an application within the second application container, the identifier of the second application container is obtained, and the second application container is launched based on the obtained identifier of the second application container.
[0008] The user's input peripheral is identified based on the device information of the input peripheral;
[0009] Redirect the user's input peripheral operation commands to the second application container;
[0010] The user's output peripheral is identified based on the device information of the output peripheral;
[0011] The device information of the user's output peripheral is sent to the second application container, and the output content of the second application container is sent to the user's output peripheral.
[0012] Furthermore, the method also includes:
[0013] Receive access registration information from input peripherals and output peripherals, and record the device information of input peripherals and output peripherals;
[0014] Before the user uses the application within the first application container, the first application container containing the application to be used is launched for the user, the input operation commands of the user's input peripheral are input into the first application container, and the output content of the first application container is sent to the user's output peripheral.
[0015] Furthermore, identifying the user's input peripheral based on the device information of the input peripheral includes:
[0016] Obtain the device information of the currently used input peripheral, and identify the user's input peripheral based on the recorded device information;
[0017] The step of identifying the user's output peripheral based on the device information of the output peripheral includes:
[0018] Obtain the device information of the currently used output peripheral, and identify the user's input peripheral based on the recorded device information of the output peripheral.
[0019] Furthermore, the device information includes:
[0020] Peripheral type, peripheral identifier, and peripheral address.
[0021] Furthermore, the method also includes:
[0022] Retrieve the peripheral device list for each user, which includes device information and user identification information for each peripheral device.
[0023] After input and output peripherals are registered, a correspondence between peripherals and users is established based on each user's peripheral list.
[0024] The step of identifying the user's input peripheral based on the device information of the user's input peripheral includes:
[0025] Obtain device information for all currently connected input peripherals, and query the input peripherals corresponding to the user based on the correspondence between peripherals and users, and use the queried input peripherals corresponding to the user as the identified input peripherals for the user;
[0026] The step of identifying the user's output peripheral based on the device information of the user's output peripheral includes:
[0027] Obtain device information for all currently connected output peripherals, and query the output peripherals corresponding to the user based on the correspondence between peripherals and users. Use the queried output peripherals corresponding to the user as the output peripherals of the identified user.
[0028] Furthermore, the method also includes:
[0029] Establish the correspondence between applications and peripherals;
[0030] After starting the second application container, determine the list of input peripherals and the list of output peripherals required by the application within the second application container based on the correspondence between the application and the peripherals;
[0031] The step of redirecting the user's input peripheral device operation commands to the second application container includes:
[0032] Based on the list of input peripherals required by the application within the second application container, the operation instructions of the user's input peripherals that are in the list of input peripherals are redirected to the second application container;
[0033] Sending the device information of the user's output peripheral to the second application container includes:
[0034] Based on the list of output peripherals required by the application within the second application container, the device information of the user's output peripherals that are in the list of output peripherals is sent to the second application container.
[0035] Furthermore, obtaining the identifier of the second application container includes:
[0036] The system receives an application switching command transmitted by the user through an input peripheral device. The application switching command includes information about the application in the second application container that the user wants to use. The application switching command is generated by the user through a dedicated key, a specific key combination, or a specific key sequence combination on the input peripheral device.
[0037] The application switching command is identified to determine the identifier of the second application container corresponding to the application that the user wants to use.
[0038] Furthermore, obtaining the identifier of the second application container includes:
[0039] Get the list of applications in other containers displayed on the display interface of each application container;
[0040] When the user selects an application located in the second application container on the first application container via an input peripheral, the identifier of the second application container is obtained according to the user's selection.
[0041] Secondly, this disclosure provides a cloud terminal, the cloud terminal comprising:
[0042] The container control module is configured to obtain the identifier of the second application container when the user has already used an application in the first application container and selects to use an application in the second application container, and to start the second application container according to the obtained identifier of the second application container.
[0043] The input peripheral management module is configured to identify the user's input peripheral based on the device information of the input peripheral.
[0044] The container control module is also configured to redirect the user's input peripheral operation commands to the second application container;
[0045] The output peripheral management module is configured to identify the user's output peripheral based on the device information of the output peripheral;
[0046] The container control module is also configured to send the device information of the user's output peripheral to the second application container, and send the content output by the second application container to the user's output peripheral.
[0047] Thirdly, this disclosure provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes a peripheral redirection method for a cloud terminal as described in any of the first aspects.
[0048] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the peripheral redirection method for a cloud terminal as described in any of the first aspects above.
[0049] Beneficial effects:
[0050] The cloud terminal peripheral redirection method, cloud terminal, electronic device, and computer-readable storage medium disclosed herein are designed for scenarios where users encapsulate applications of different systems in different containers, and the user needs to switch containers when using different applications. They can synchronously redirect the user's input and output peripherals to the applications of different systems to be used, solving the problem of user peripheral redirection in the case of multiple peripherals to multiple containers and multiple applications, and ensuring service quality during container switching. Attached Figure Description
[0051] Figure 1 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 1 of this disclosure;
[0052] Figure 2 This is a general architecture diagram of a cloud terminal provided in Embodiment 1 of this disclosure;
[0053] Figure 3 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 2 of this disclosure;
[0054] Figure 4 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 3 of this disclosure;
[0055] Figure 5 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 4 of this disclosure;
[0056] Figure 6 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 5 of this disclosure;
[0057] Figure 7 This is an architecture diagram of a cloud terminal provided in Embodiment Six of this disclosure;
[0058] Figure 8 This is an architectural diagram of an electronic device provided in Embodiment Seven of this disclosure. Detailed Implementation
[0059] To enable those skilled in the art to better understand the technical solutions of this disclosure, the disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments and drawings described herein are merely for explaining the invention and are not intended to limit the invention.
[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence; furthermore, in the absence of conflict, the embodiments and features in the embodiments of this disclosure can be arbitrarily combined with each other.
[0061] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0062] In the following description, the use of suffixes such as “module,” “part,” or “unit” to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, “module,” “part,” or “unit” may be used interchangeably.
[0063] Cloud terminals centralize major computing resources (CPU, memory, hard drive, network, etc.) on cloud servers, resulting in centralized management, convenient deployment, simple use, reduced maintenance, and lower operating costs. Local devices, on the other hand, have lower hardware configurations, reducing purchase costs. Virtualization is a fundamental technology of cloud computing and cloud terminals. Virtualization provides centralized physical computing resources on the server side, which are then broken down into smaller units to independently serve different users, while ensuring isolation and security. Virtualization technology can be broadly divided into virtual machines and containers. Virtual machines, with their complete system environment and good independence, are widely used in cloud computing; however, virtual machine technology is bulky and consumes too many resources, encountering bottlenecks when the number of terminals is large. In contrast, containers provide lightweight virtualization to isolate processes and resources, without the need for instruction interpretation mechanisms or the other complexities of full virtualization. Containers effectively divide resources managed by a single operating system into isolated groups, better balancing conflicting resource usage demands among these isolated groups.
[0064] Cloud desktops, as a primary manifestation of cloud terminals, employ two distinct operating modes. A single device can only utilize either USB port redirection or device redirection; both modes cannot be used simultaneously. USB port redirection can be visualized as extending the USB cable, connecting the local machine to the cloud virtual host via the network. No peripheral driver needs to be installed on the thin client, but the corresponding device driver is required on the cloud desktop. Port redirection is suitable for scenarios insensitive to latency and bandwidth, offering good compatibility due to the driver requirement on the thin client. Device redirection, operating at the peripheral device's driver layer, requires driver installation on both the thin client and the cloud desktop. It is suitable for latency- and bandwidth-sensitive scenarios, such as document scanners, cameras, and other devices. Because device redirection requires device drivers on the thin client, Android and Linux thin clients may be unable to use this mode due to the lack of corresponding peripheral drivers.
[0065] Both "port redirection" and "device redirection" primarily target systems with dedicated cloud desktops where all applications are installed on virtual machines in the cloud, making it impossible to use applications not installed on cloud virtual machines. When users want to use applications installed on different cloud virtual machines, they may need to switch to a local thin client or open different clients on their local PC, resulting in inconvenience.
[0066] The technical solutions of this disclosure and how they solve the above-mentioned problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0067] Figure 1 This is a flowchart illustrating a peripheral redirection method for a cloud terminal provided in Embodiment 1 of this disclosure, applied to a cloud terminal, such as... Figure 1 As shown, the method includes:
[0068] Step S101: When the user has already used the application in the first application container and selects to use the application in the second application container, obtain the identifier of the second application container and start the second application container according to the obtained identifier of the second application container;
[0069] Step S102: Identify the user's input peripheral based on the device information of the input peripheral;
[0070] Step S103: Redirect the user's input peripheral operation instructions to the second application container;
[0071] Step S104: Identify the user's output peripheral based on the device information of the output peripheral;
[0072] Step S105: Send the device information of the user's output peripheral to the second application container, and send the output content of the second application container to the user's output peripheral.
[0073] This disclosure discloses a method for redirecting peripheral devices in a cloud terminal. The application scenario involves encapsulating different applications in different containers. When a user needs to use different applications, it leads to container switching. For example, container 1 contains Linux-based drawing software, while container 2 contains Android-based video playback software. After completing a work using the drawing software, the user needs to switch to the Android system to view the real-time playback effect. Therefore, through software and hardware design, the user's input and output peripherals are synchronously redirected to the currently running container.
[0074] The overall technical architecture of the embodiments of this disclosure is as follows: Figure 2 As shown. The cloud server is a hardware device with a CPU based on an x86 / ARM architecture. This device can be one or more physical hardware units. If multiple physical hardware units are used, data communication links need to be established between them. A base operating system (OS) is installed on the server, providing peripheral drivers, container runtime environments, etc. Different applications and their respective OSes are loaded onto the base OS in a containerized manner, with each container operating independently. User input peripherals (including keyboard, mouse, camera, microphone, etc.) and output peripherals (including monitor, projector, etc.) are redirected to the container where the user application resides when the application container is created. Interaction with the application is achieved within the container through simulated peripheral drivers.
[0075] If the application currently being used by the user is located in the first application container (referred to as application container 1), the cloud terminal starts application container 1 and activates the container monitoring function, including the running container status and container startup requests, and redirects peripheral devices to application container 1. When the user selects to use an application located in the second application container (referred to as application container 2) at this time, the cloud terminal obtains the identifier of application container 2, starts container 2 based on the application identifier, and needs to redirect the user's peripheral devices to application container 2. To do this, the cloud terminal identifies the user's input peripheral device based on the device information of all connected input peripheral devices. When there is only a single user... When an input peripheral in application container 1 is directly redirected to application container 2, or the user-owned input peripherals reported when the peripheral is connected are identified, and their input operations are redirected to application container 2. In this case, application container 2 receives the user's input peripheral operation instructions. For output peripherals, the user's output peripherals are identified in the same way, and the output peripheral information is sent to application container 2. Application container 2 then sends the output content to these output peripherals. At this time, the user can operate the application in application container 2 through the input peripherals, and the operation results are displayed to the user through the output peripherals.
[0076] The embodiments disclosed herein can simultaneously redirect a user's input and output peripherals to applications on different systems to be used, solving the problem of redirecting user peripherals in the case of multiple peripherals to multiple containers and multiple applications, and ensuring service quality during container switching.
[0077] Furthermore, the method also includes:
[0078] Receive access registration information from input peripherals and output peripherals, and record the device information of input peripherals and output peripherals;
[0079] Before the user uses the application within the first application container, the first application container containing the application to be used is launched for the user, the input operation commands of the user's input peripheral are input into the first application container, and the output content of the first application container is sent to the user's output peripheral.
[0080] When connecting to the cloud terminal, both input and output peripherals register with the cloud terminal. Upon receiving the registration message, the cloud terminal registers the peripherals and loads the corresponding drivers on the cloud server's underlying OS. Furthermore, the cloud terminal records peripheral information to facilitate peripheral identification and scheduling during application switching.
[0081] When a peripheral device is directed to application container 1, the input peripheral will by default direct input operation commands such as mouse operations, keyboard key values, and audio / video streams to application container 1, while application container 1 will by default output output results such as video and text to the output peripheral. Thus, the user can begin using the applications within application container 1.
[0082] Furthermore, identifying the user's input peripheral based on the device information of the input peripheral includes:
[0083] Obtain the device information of the currently used input peripheral, and identify the user's input peripheral based on the recorded device information;
[0084] The step of identifying the user's output peripheral based on the device information of the output peripheral includes:
[0085] Obtain the device information of the currently used output peripheral, and identify the user's input peripheral based on the recorded device information of the output peripheral.
[0086] When switching containers, it's necessary to determine which peripheral devices should be redirected to the new container. This requires identifying the user's input peripherals. By obtaining the device information of the currently used input peripherals and using the device information recorded when the peripherals were connected, the user's input peripherals are identified and redirected to application container 2. Similarly, output peripherals can be processed in the same way. Of course, if the application is a single user's single peripheral, all peripherals in container 1 can be directly redirected to container 2. This ensures a seamless switch of peripherals to the desired application without affecting the user experience.
[0087] Furthermore, the device information includes:
[0088] Peripheral type, peripheral identifier, and peripheral address.
[0089] Device information for input and output peripherals allows users to locate and schedule peripherals. Peripheral information includes peripheral type, peripheral identifier, and peripheral address. The peripheral type determines its function (e.g., keyboard, mouse, camera, microphone, monitor, projector), the peripheral identifier uniquely identifies the peripheral, and the peripheral address is used to connect to the peripheral. This peripheral information allows for effective identification of each peripheral and better direction of input from input peripherals to a specific container, or output from a container to an output peripheral.
[0090] Furthermore, the method also includes:
[0091] Retrieve the peripheral device list for each user, which includes device information and user identification information for each peripheral device.
[0092] After input and output peripherals are registered, a correspondence between peripherals and users is established based on each user's peripheral list.
[0093] The step of identifying the user's input peripheral based on the device information of the user's input peripheral includes:
[0094] Obtain device information for all currently connected input peripherals, and query the input peripherals corresponding to the user based on the correspondence between peripherals and users, and use the queried input peripherals corresponding to the user as the identified input peripherals for the user;
[0095] The step of identifying the user's output peripheral based on the device information of the user's output peripheral includes:
[0096] Obtain device information for all currently connected output peripherals, and query the output peripherals corresponding to the user based on the correspondence between peripherals and users. Use the queried output peripherals corresponding to the user as the output peripherals of the identified user.
[0097] In cloud terminals, multiple input / output peripherals may be connected simultaneously in the underlying OS. When multiple peripherals are online at the same time, the first step is to determine the correspondence between the peripherals and users. This correspondence can be one peripheral to one user, or multiple peripherals to one user. For example, to simplify deployment, the same application may be deployed on the same underlying OS. When different users use the application, a separate application container is created for each user. When users A and B simultaneously use a video playback application on the same underlying OS, both users' input peripherals (such as keyboards) will appear on the underlying OS. When user A needs to switch to another application, only user A's keyboard needs to be switched to the new application. Therefore, when user A switches containers, it is necessary to query the user's list of all peripherals and synchronously switch the peripherals in the list to the new container. User B's peripherals are not processed. Therefore, it is necessary to obtain the current user's peripheral list, which includes information such as peripheral type, peripheral identifier, peripheral address, and user identifier. After input and output peripherals are registered, a correspondence between peripherals and users is established based on each user's peripheral list. At this time, all peripherals in the list are those already connected to the cloud terminal. When the user's input peripheral is identified, the device information of all currently connected input peripherals is obtained, and the corresponding input peripheral is queried according to the correspondence between peripherals and users. The queried input peripheral corresponding to the user is used as the identified user's input peripheral; then, the user's input peripheral is redirected to application container 2. The same process can be performed for output peripherals.
[0098] Furthermore, the method also includes:
[0099] Establish the correspondence between applications and peripherals;
[0100] After starting the second application container, determine the list of input peripherals and the list of output peripherals required by the application within the second application container based on the correspondence between the application and the peripherals;
[0101] The step of redirecting the user's input peripheral device operation commands to the second application container includes:
[0102] Based on the list of input peripherals required by the application within the second application container, the operation instructions of the user's input peripherals that are in the list of input peripherals are redirected to the second application container;
[0103] Sending the device information of the user's output peripheral to the second application container includes:
[0104] Based on the list of output peripherals required by the application within the second application container, the device information of the user's output peripherals that are in the list of output peripherals is sent to the second application container.
[0105] Given the varying types of peripheral devices required by different applications, the application switching process first needs to determine the correspondence between peripherals and applications. This correspondence can be one peripheral per application, or multiple peripherals per application. For example, a video conferencing application might require both a keyboard and a camera as input peripherals, while web browsing only requires a keyboard. When a user switches from the container hosting the video conferencing application to the container hosting the web browsing application, the system needs to query the list of all peripherals for that application and simultaneously switch the keyboards listed to the container hosting the web browsing application. Cameras not used by that application are not processed.
[0106] Therefore, when registering peripheral access, a correspondence between peripherals and applications can be established, namely the type, identifier (not mandatory), address (not mandatory), and quantity of necessary peripherals required by the application. When performing peripheral redirection, the peripherals corresponding to the user in the currently registered peripherals can be determined in advance based on the correspondence between peripherals and users. Among the peripherals corresponding to the user, the peripherals belonging to the application peripheral list (input peripheral list and output peripheral list) in application container 2 can be determined, and these peripherals can be redirected to application container 2.
[0107] Furthermore, obtaining the identifier of the second application container includes:
[0108] The system receives an application switching command transmitted by the user through an input peripheral device. The application switching command includes information about the application in the second application container that the user wants to use. The application switching command is generated by the user through a dedicated key, a specific key combination, or a specific key sequence combination on the input peripheral device.
[0109] The application switching command is identified to determine the identifier of the second application container corresponding to the application that the user wants to use.
[0110] When switching applications on an input peripheral, users can switch containers by inputting dedicated keys, specific key combinations, or specific key sequences. For example, an application might correspond to a specific key, or be selected from a list, such as adding a switch key to a game controller or using the Ctrl+P key combination on the keyboard. After the switch command is issued, a specific module on the cloud terminal recognizes it and performs the container switch operation. This method achieves peripheral redirection through hardware operations, even without a thin client or PC locally.
[0111] Furthermore, obtaining the identifier of the second application container includes:
[0112] Get the list of other applications displayed on the display interface of each application container;
[0113] When the user selects an application located in the second application container on the first application container via an input peripheral, the identifier of the second application container is obtained according to the user's selection.
[0114] The user selects an application located in application container 2 by inputting a peripheral device on application container 1. Application container 1 then sends information such as the identifier of the application container 2 that the user needs to use to the cloud terminal.
[0115] This disclosure addresses scenarios where users encapsulate applications from different systems within different containers, and container switching occurs when users need to use different applications. It synchronously redirects the user's input and output peripherals to the applications of the different systems to be used. In cases where multiple different user peripherals can be detected, peripherals not belonging to that user will not be switched to the new container. Similarly, in cases where different applications correspond to different peripherals, peripherals not belonging to that application will not be switched to the new container. If the user uses a dedicated peripheral key combination for redirection, it can be combined with the peripheral identification function required for the newly opened application container, redirecting only the necessary peripherals required by the new application to the new container. This solves the problem of redirecting user peripherals in situations involving multiple peripherals, multiple containers, and multiple applications, while maintaining service quality during container switching.
[0116] To more clearly and completely describe the technical solution of this disclosure, the following different embodiments are provided for different application scenarios; in the scenario where the following situations occur simultaneously, the different redirection methods of each embodiment can be used in combination.
[0117] Example 2
[0118] For scenarios involving the redirection of a single peripheral device across different containers, a cloud-based approach is adopted to control the redirection switching. The cloud terminal includes an input peripheral management module, an output peripheral management module, and a container control module. The process is as follows: Figure 3 As shown.
[0119] S201: Input and output peripherals register with the input and output peripheral management modules respectively, and the drivers are loaded on the base OS of the cloud server. Simultaneously, the peripheral management module records peripheral type, identifier, address, and other information for scheduling during application switching.
[0120] S202. The application currently used by the user is located in application container 1. The container control module starts application container 1 and starts the container listening function, including the status of the running container, container start requests, etc.
[0121] S203, The input peripheral points the input operation command data such as mouse operation, keyboard key value, audio and video stream to the application container 1, and the application container 1 outputs the output results such as video and text to the output peripheral.
[0122] S204. The user selects an application located in application container 2 by inputting an external device on application container 1;
[0123] S205. Application container 1 sends information such as the identifier of the application container 2 that the user needs to use to the container control module.
[0124] S206. The container control module starts container 2 based on the received application identifier;
[0125] S207, The container control module sends information such as the application container 2 identifier to the input peripheral management module;
[0126] S208. The input peripheral management module identifies the input peripherals based on their type, identifier, and address, and redirects the peripheral input operations to the application container 2.
[0127] S209. The container control module obtains information such as the output peripheral identifier and address from the output module;
[0128] S210, The output peripheral management module sends the identifier, address, and other information of the output peripheral to the container control module;
[0129] S211, The container control module sends the output peripheral information to application container 2;
[0130] S212, Application container 2 sends the output content to the output peripheral. At this time, the user can operate the application in application container 2 through the input peripheral, and the operation result is displayed to the user through the output peripheral.
[0131] Example 3
[0132] This example, like Example 2, uses a cloud-based application switching method. The difference lies in that this example is based on a scenario where multiple input / output peripherals are simultaneously connected to the base OS. When multiple peripherals are online simultaneously, the mapping between peripherals and users is first determined. This mapping can be one peripheral per user, or multiple peripherals per user. For example, to simplify deployment, the same application might be deployed on the same base OS. When different users use the application, a separate application container is created for each user. When users A and B simultaneously use a video playback application on the same base OS, both users' keyboards will appear on the base OS. When user A needs to switch to another application, only user A's keyboard can be switched to the new application. Therefore, when user A switches containers, it's necessary to query the user's list of all peripherals and synchronously switch the peripherals in the list to the new container. User B's peripherals are not processed. Therefore, a user management module needs to be added to the cloud terminal based on Example 1. The process is as follows... Figure 4 As shown
[0133] S301. The peripheral management module obtains the current user's peripheral list from the user management module. The list includes information such as the type of peripheral, peripheral identifier, and user identifier.
[0134] S302. Input and output peripherals register with the input and output peripheral management modules respectively, and the drivers are loaded on the basic OS of the cloud server. At the same time, the peripheral management module records information such as peripheral type, identifier, and address for scheduling when switching applications.
[0135] S303. The peripheral management module establishes a correspondence between peripherals and users within the module;
[0136] S304. The application currently used by the user is located in application container 1. The container control module starts application container 1.
[0137] S305. The container management module starts the container listening function, including the status of running containers, container start requests, etc.
[0138] S306. The input peripheral applies input operation command data such as mouse operation, keyboard key value, audio and video stream to container 1. By default, container 1 sends the output video, text and other output results to the output peripheral.
[0139] S307. The user selects an application located in application container 2 by inputting an external device on application container 1;
[0140] S308, Application container 1 sends information such as the identifier of the application container 2 that the user needs to use to the container control module;
[0141] S309. The container control module starts container 2 based on the received application identifier;
[0142] S310, the container control module sends information such as the application container 2 identifier to the input peripheral management module;
[0143] S311. The input peripheral management module identifies the input peripherals based on their type, identifier, and address, queries the user's input peripheral list, and directs the input operations of the peripherals in the list to the application container 2.
[0144] S312, The container control module obtains information such as the output peripheral identifier and address from the output peripheral management module;
[0145] S313, The output peripheral management module queries the user's output peripheral list and sends information such as the peripheral identifier and address in the output list to the container control module;
[0146] S314, The container control module sends the output peripheral information to application container 2;
[0147] S315, Application container 2 sends the output content to the output peripheral; at this time, the user can operate the application in application container 2 through the input peripheral, and the operation result is displayed to the user through the output peripheral.
[0148] Example 4
[0149] This example, like Example 2, uses a cloud-based application switching method. The difference lies in that this example addresses the scenario where different applications require different types of peripheral devices. During application initialization, the mapping between peripherals and applications is first determined. This mapping can be one peripheral per application or multiple peripherals per application. For example, a video conferencing application might require both a keyboard and a camera as input peripherals, while web browsing only requires a keyboard. When a user switches from the container hosting the video conferencing application to the container hosting the web browsing application, the system needs to query the list of all peripherals for that application and synchronously switch the keyboards in that list to the container hosting the web browsing application. Cameras not used by that application are not processed. Therefore, an application management module needs to be added to the cloud terminal based on Example 1. The process is as follows: Figure 5 As shown.
[0150] S401. The peripheral management module obtains the current user's peripheral list from the application management module. The list includes information such as the type of peripheral, peripheral identifier, and user identifier (not shown in the figure).
[0151] S402: Input and output peripherals register with the input and output peripheral management modules respectively, and the drivers are loaded on the basic OS of the cloud server. At the same time, the peripheral management module records information such as peripheral type, identifier, and address for scheduling when applications switch.
[0152] S403. The application management module establishes the correspondence between peripherals and applications, that is, the type, identifier, address, quantity, etc. of the necessary peripherals required by the application;
[0153] S404. The application currently used by the user is located in application container 1. The container control module starts application container 1.
[0154] S405. The container management module starts the container listening function, including the status of running containers, container start requests, etc.
[0155] S406. Input peripherals point input operation command data such as mouse operation, keyboard key value, audio and video stream to application container 1. By default, application container 1 sends the output video, text and other output results to the output peripherals.
[0156] S407. The user selects an application located in application container 2 by inputting an external device on application container 1;
[0157] S408, Application container 1 sends information such as the identifier of the application container 2 that the user needs to use to the container control module;
[0158] S409. The container control module starts container 2 based on the received application identifier;
[0159] S4010, The container control module sends the application information and container information in application container 2 to the input application management module;
[0160] S411, The application management module queries the list of input and output peripherals required by the application in application container 2;
[0161] S412, The application management module sends the list of input peripherals and the container information of application container 2 to the input device management module;
[0162] S413. The input peripheral management module identifies the input peripherals based on their type, identifier, and address, and redirects the input operations of the peripherals in the list to the application container 2.
[0163] S414. The application management module sends the list of input peripherals currently used by the user and the container information of application container 2 to the output device management module.
[0164] S415. The container control module obtains information such as the output peripheral identifier and address from the output peripheral management module.
[0165] S416. The output peripheral management module sends information such as peripheral identifiers and addressing addresses from the output list to the container control module.
[0166] S417, The container control module sends the output peripheral information to application container 2;
[0167] S418, Application container 2 sends the output content to the output peripheral. At this time, the user can operate on the application in application container 2 through the input peripheral, and the operation result is displayed to the user through the output peripheral.
[0168] Example 5
[0169] This example demonstrates container switching via user input peripherals. This can be achieved through dedicated keys, specific key combinations, or specific key sequence combinations on the input peripheral. For example, a toggle button can be added to a game controller, or the Ctrl+P key combination can be used as the toggle button. After the switching command is issued, the input peripheral management module recognizes it and notifies the container management module to perform the switching operation. This method achieves peripheral redirection through hardware operations, even without thin clients or a PC locally. The process is as follows: Figure 6 As shown.
[0170] S501: Input and output peripherals register with the input and output peripheral management modules respectively, and the drivers are loaded on the cloud server's underlying OS. Simultaneously, the peripheral management module records peripheral type, identifier, address, and other information for scheduling during application switching.
[0171] S502: The application currently used by the user is located in application container 1. The container control module starts application container 1.
[0172] S503, The container management module starts the container listening function, including the status of running containers, container start requests, etc.
[0173] S504, The input peripheral redirects input operation command data such as mouse operation, keyboard key value, audio and video stream to application container 1, and application container 1 redirects the output results such as video and text to the output peripheral.
[0174] S505. Users can switch application containers on input peripherals by using dedicated keys, specific key combinations, or specific key timing combinations. The switching command is recognized by the input device management module.
[0175] S506, The input device management module sends the instruction to switch application container 2 to the container control module;
[0176] S507, The container control module starts application container 2;
[0177] S508, The input peripheral management module redirects peripheral input operations to application container 2;
[0178] S509, The container control module obtains information such as the output peripheral identifier and address from the output peripheral management module.
[0179] S510: The output peripheral sends information such as the output peripheral identifier and address to the container control module;
[0180] S511, The container control module sends the output peripheral information to the application container 2;
[0181] S512, Application container 2 sends the output content to the output peripheral. At this time, the user can operate on the application in application container 2 through the input peripheral, and the operation result is displayed to the user through the output peripheral.
[0182] Figure 7 This is an architecture diagram of a cloud terminal provided in Embodiment Six of this disclosure, as follows: Figure 7 As shown, the cloud terminal includes:
[0183] The container control module 11 is configured to obtain the identifier of the second application container when the user has already used an application in the first application container and selects to use an application in the second application container, and to start the second application container according to the obtained identifier of the second application container.
[0184] The input peripheral management module 12 is configured to identify the user's input peripheral based on the device information of the input peripheral.
[0185] The container control module 11 is also configured to redirect the user's input peripheral operation commands to the second application container;
[0186] The output peripheral management module 13 is configured to identify the user's output peripheral based on the device information of the output peripheral;
[0187] The container control module 11 is further configured to send the device information of the user's output peripheral to the second application container, and send the content output by the second application container to the user's output peripheral.
[0188] Furthermore, the cloud terminal also includes a receiving module 14;
[0189] The receiving module 14 is configured to receive access registration information of input peripherals and output peripherals, and record device information of input peripherals and output peripherals;
[0190] The container control module 11 is further configured to start the first application container containing the application to be used by the user before the user uses the application in the first application container, input the input operation instructions of the user's input peripheral to the first application container, and send the output content of the first application container to the user's output peripheral.
[0191] Furthermore, the input peripheral management module 12 is specifically configured as follows:
[0192] Obtain the device information of the currently used input peripheral, and identify the user's input peripheral based on the recorded device information;
[0193] The output peripheral management module 12 is specifically configured as follows:
[0194] Obtain the device information of the currently used output peripheral, and identify the user's input peripheral based on the recorded device information of the output peripheral.
[0195] Furthermore, the device information includes:
[0196] Peripheral type, peripheral identifier, and peripheral address.
[0197] Furthermore, the cloud terminal also includes a user management module 15;
[0198] The user management module 15 is configured to obtain a peripheral device list for each user, the peripheral device list including device information and user identification information of the peripheral devices; and...
[0199] After receiving the input peripherals and output peripherals for registration, the receiving module 14 establishes a correspondence between peripherals and users based on each user's peripheral list;
[0200] The input peripheral management module 12 is specifically configured as follows:
[0201] Obtain device information for all currently connected input peripherals, and query the input peripherals corresponding to the user based on the correspondence between peripherals and users, and use the queried input peripherals corresponding to the user as the identified input peripherals for the user;
[0202] The output peripheral management module 13 is specifically configured as follows:
[0203] Obtain device information for all currently connected output peripherals, and query the output peripherals corresponding to the user based on the correspondence between peripherals and users. Use the queried output peripherals corresponding to the user as the output peripherals of the identified user.
[0204] Furthermore, the cloud terminal also includes an application management module 16;
[0205] The application management module 16 is configured to establish a correspondence between applications and peripherals; and...
[0206] After the container control module 11 starts the second application container, it determines the list of input peripherals and the list of output peripherals required by the application in the second application container according to the correspondence between the application and the peripherals.
[0207] The container control module 11 is specifically configured as follows:
[0208] Based on the list of input peripherals required by the application within the second application container, the operation commands of the user's input peripherals listed in the input peripherals list are redirected to the second application container; and...
[0209] Based on the list of output peripherals required by the application within the second application container, the device information of the user's output peripherals that are in the list of output peripherals is sent to the second application container.
[0210] Furthermore, the container control module 11 is specifically configured as follows:
[0211] The receiving module 14 receives an application switching command transmitted by the user via an input peripheral device. The application switching command includes information about the application within the second application container that the user wants to use. The application switching command is generated by the user inputting a dedicated key, a specific key combination, or a specific key sequence combination on the peripheral device.
[0212] The application switching command is identified to determine the identifier of the second application container corresponding to the application that the user wants to use.
[0213] Furthermore, the container control module 11 is specifically configured as follows:
[0214] Get the list of applications in other containers displayed on the display interface of each application container;
[0215] When the user selects an application located in the second application container on the first application container via an input peripheral, the identifier of the second application container is obtained according to the user's selection.
[0216] The cloud terminal in this disclosure is used to implement the peripheral redirection method of the cloud terminal in embodiments one to five, so the description is relatively simple. For details, please refer to the relevant descriptions in the preceding embodiments one to five, which will not be repeated here.
[0217] In addition, such as Figure 8 As shown, Embodiment Seven of this disclosure also provides an electronic device, including a memory 10 and a processor 20. The memory 10 stores a computer program. When the processor 20 runs the computer program stored in the memory 10, the processor 20 executes the various possible methods described above.
[0218] The memory 10 is connected to the processor 20. The memory 10 can be a flash memory, a read-only memory, or another type of memory. The processor 20 can be a central processing unit or a microcontroller.
[0219] Furthermore, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, which is executed by a processor using the various possible methods described above.
[0220] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0221] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.
Claims
1. A method for redirecting peripheral devices in a cloud terminal, characterized in that, Applied to cloud terminals, the method includes: If the application the user wants to use is located in the first application container, start the first application container and direct the peripheral device to the first application container; when the user has already used an application in the first application container and selects to use an application in the second application container, obtain the identifier of the second application container and start the second application container according to the obtained identifier; wherein, different applications are encapsulated in different containers, and the container switching occurs when the user needs to use different applications; The user's input peripheral is identified based on the device information of the input peripheral; The operation commands of the user's input peripheral are redirected to the second application container, which receives the operation commands of the user's input peripheral; wherein, based on the user to which the input peripheral belongs when it is connected, the connected input peripheral belonging to that user is identified; The user's output peripheral is identified based on the device information of the output peripheral; The device information of the user's output peripheral is sent to the second application container, and the output content of the second application container is sent to the user's output peripheral; The method further includes: Receive access registration information from input peripherals and output peripherals, and record the device information of input peripherals and output peripherals; Retrieve the peripheral device list for each user, which includes device information and user identification information for each peripheral device. After input and output peripherals are registered, a correspondence between peripherals and users is established based on each user's peripheral list.
2. The method according to claim 1, characterized in that, The method further includes: Before the user uses the application within the first application container, the first application container containing the application to be used is started for the user, the input operation instructions of the user's input peripheral are input into the first application container, and the output content of the first application container is sent to the user's output peripheral.
3. The method according to claim 2, characterized in that, The step of identifying the user's input peripheral based on the device information of the input peripheral includes: Obtain the device information of the currently used input peripheral, and identify the user's input peripheral based on the recorded device information; The step of identifying the user's output peripheral based on the device information of the output peripheral includes: Obtain the device information of the currently used output peripheral, and identify the user's input peripheral based on the recorded device information of the output peripheral.
4. The method according to any one of claims 1-3, characterized in that, The device information includes: Peripheral type, peripheral identifier, and peripheral address.
5. The method according to claim 2, characterized in that, The step of identifying the user's input peripheral based on the device information of the user's input peripheral includes: Obtain device information for all currently connected input peripherals, and query the input peripherals corresponding to the user based on the correspondence between peripherals and users, and use the queried input peripherals corresponding to the user as the identified input peripherals for the user; The step of identifying the user's output peripheral based on the device information of the user's output peripheral includes: Obtain device information for all currently connected output peripherals, and query the output peripherals corresponding to the user based on the correspondence between peripherals and users. Use the queried output peripherals corresponding to the user as the identified output peripherals for the user.
6. The method according to claim 2 or 5, characterized in that, The method further includes: Establish the correspondence between applications and peripherals; After starting the second application container, determine the list of input peripherals and the list of output peripherals required by the application within the second application container based on the correspondence between the application and the peripherals; The step of redirecting the user's input peripheral device operation commands to the second application container includes: Based on the list of input peripherals required by the application within the second application container, the operation instructions of the user's input peripherals that are in the list of input peripherals are redirected to the second application container; Sending the device information of the user's output peripheral to the second application container includes: Based on the list of output peripherals required by the application within the second application container, the device information of the user's output peripherals that are in the list of output peripherals is sent to the second application container.
7. The method according to any one of claims 2, 3, and 5, characterized in that, The step of obtaining the identifier of the second application container includes: The system receives an application switching command transmitted by the user through an input peripheral device. The application switching command includes information about the application in the second application container that the user wants to use. The application switching command is generated by the user through a dedicated key, a specific key combination, or a specific key sequence combination on the input peripheral device. The application switching command is identified to determine the identifier of the second application container corresponding to the application that the user wants to use.
8. The method according to any one of claims 2, 3, and 5, characterized in that, The step of obtaining the identifier of the second application container includes: Get the list of applications in other containers displayed on the display interface of each application container; When the user selects an application located in the second application container on the first application container via an input peripheral, the identifier of the second application container is obtained according to the user's selection.
9. A cloud terminal, characterized in that, The cloud terminal includes: The container control module is configured to start the first application container and direct the peripheral device to the first application container if the application to be used by the user is located in the first application container; when the user has already used an application in the first application container and selects to use an application in the second application container, the module obtains the identifier of the second application container and starts the second application container according to the obtained identifier; wherein, different applications are encapsulated in different containers, and container switching occurs when the user needs to use different applications; The input peripheral management module is configured to identify the user's input peripheral based on the device information of the input peripheral. The container control module is further configured to redirect the user's input peripheral operation commands to the second application container, whereby the second application container receives the user's input peripheral operation commands; wherein, based on the user to which the input peripheral belongs when it is connected, the connected input peripheral belonging to that user is identified; The output peripheral management module is configured to identify the user's output peripheral based on the device information of the output peripheral; The container control module is also configured to send the device information of the user's output peripheral to the second application container, and send the content output by the second application container to the user's output peripheral; The receiving module is configured to receive access registration information from input peripherals and output peripherals, and to record device information of input peripherals and output peripherals; The user management module is configured to retrieve the peripheral device list for each user, which includes device information and user identification information for the peripheral devices. The receiving module is further configured to receive the correspondence between peripherals and users established based on the peripheral list of each user after the input peripherals and output peripherals have been registered.
10. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the peripheral redirection method of the cloud terminal as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the peripheral redirection method for a cloud terminal as described in any one of claims 1-8.
Citation Information
Patent Citations
Container remote access method and system, server and access auxiliary component
CN111510444A
