Method and device for supporting multi-session scene under cloud desktop, medium and equipment

By obtaining and synchronizing the keyboard light status in the remote end in the cloud desktop system and responding to the local key and mouse operations, the problem of mutual injection of cloud desktop system in multi-session scenarios is solved, and effective support for multi-session scenarios is achieved.

CN119728714APending Publication Date: 2025-03-28XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752451.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing cloud desktop system cannot effectively inject source-side reverse control in multi-session scenarios, especially when multiple users share a pipeline file, which can easily cause the injections to fight each other.

Method used

The remote end obtains the state of the keyboard light according to the preset time period and sends it to the local end to make the local end synchronize the state of the keyboard light; at the same time, the remote end receives the user's key operation and the mouse position movement operation sent by the local end, and responds to these operations.

Benefits of technology

It realizes remote desktop control that supports multi-session scenarios in the cloud desktop system, ensuring that the keys, mouse positions and keyboard light status of users of different sessions can be correctly injected and synchronized, avoiding the problem of injections fighting each other.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728714A_ABST
    Figure CN119728714A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for supporting a multi-session scene under a cloud desktop, a medium and equipment. The method comprises the steps that a remote end obtains the state of a keyboard lamp according to a preset time period and sends the state to a local end, so that the local end synchronizes the state of the keyboard lamp; and the remote end receives the key operation of the user and the movement operation of the mouse position sent by the local end, responds to the key operation and responds to the movement operation of the mouse position. According to the method and the device, the states of the keyboard lamps are obtained at the far end, and the key operation and the mouse position moving operation sent by the local end user are received, so that the purposes of injecting the corresponding key and mouse positions and obtaining the states of the corresponding keyboard lamps for different session users can be achieved, and the remote desktop is compatible with multiple session scenes at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The application of cloud desktop systems is becoming more and more widespread, and the common environments on the source side are also divided into two categories: one is the Windows operating system, and the other is the Linux operating system. When the source side is a Linux system, there are two scenarios, one is bare metal (physical machine) and the other is a virtual machine. Regardless of the scenario, under the existing technology, most Linux systems inject reverse control of the source side (keys, mouse coordinates, and real-time acquisition of the source side LED light status) by injecting pipeline files. This method cannot be applied in multi-session scenarios. This is because: when multiple users share a pipeline file (pipeline device for buttons and mouse coordinates), it is easy to cause injection conflicts.

[0003] Therefore, it is necessary to provide a new technical solution to improve one or more problems existing in the above solutions.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of this application is to provide a method, apparatus, medium and device for supporting multi-session scenarios under a cloud desktop, thereby overcoming one or more problems caused by limitations and defects of related technologies at least to a certain extent.

[0006] According to a first aspect of an embodiment of the present application, a method for supporting a multi-session scenario under a cloud desktop is provided, the method comprising:

[0007] The remote end obtains the status of the keyboard lights according to a preset time period and sends it to the local end, so that the local end synchronizes the status of the keyboard lights; wherein the keyboard lights include a caps lock key light, a number lock key light, and a scroll lock key light;

[0008] The remote end receives the user's key operation and the mouse position movement operation sent by the local end, and responds to the key operation and the mouse position movement operation.

[0009] In an embodiment of the present application, the step of the remote end acquiring the state of the keyboard light according to a preset time period and sending it to the local end so that the local end synchronizes the state of the keyboard light includes:

[0010] The remote end calls a preset interface according to the preset time period, and determines the state of the keyboard light through the preset interface.

[0011] In an embodiment of the present application, the step of the remote end calling a preset interface according to the preset time period and determining the state of the keyboard light through the preset interface includes:

[0012] The remote end creates an xcb connection object;

[0013] The xcb interface is called according to the preset time period through the xcb connection object to obtain the integer type value of the keyboard light, and a bitwise operation is performed to obtain the state of the keyboard light.

[0014] In an embodiment of the present application, the remote end receives the user's key operation and the mouse position movement operation sent by the local end, and responds to the key operation, and the step of responding to the mouse position movement operation includes:

[0015] When the remote end receives the movement operation of the mouse position, the remote end performs pixel conversion on the mouse position according to the resolution of the current display to obtain the converted mouse position; wherein the mouse position includes the mouse coordinates in the X direction and the mouse coordinates in the Y direction;

[0016] The xcb interface is called through the xcb connection object, the converted mouse position is injected into the current Xrog, and xcb_flush is refreshed.

[0017] In an embodiment of the present application, the remote end receives the user's key operation and the mouse position movement operation sent by the local end, and responds to the key operation, and the step of responding to the mouse position movement operation includes:

[0018] When the remote end receives the key operation, the remote end determines the type of the key operation according to the keyConstant value of the key operation; wherein the type of the key operation includes a mouse button and a keyboard button, and the keyConstant value includes a first keyConstant value and a second keyConstant value;

[0019] When the keyConstant value is the first keyConstant value, it is determined that the type of the key operation is a mouse button, and the first keyConstant value corresponding to the mouse button is injected into the mouse button and the mouse button state.

[0020] In an embodiment of the present application, when the keyConstant value is the first keyConstant value, determining that the type of the key operation is a mouse button, and injecting the first keyConstant value corresponding to the mouse button into the step of mouse button and mouse button state includes:

[0021] Create a DISPLAY object and call XOpenDisplay() to get the current DISPLAY pointer object;

[0022] Convert the first keyConstant value corresponding to the mouse button into a first KeySystem type value;

[0023] The interface XTestFakeButtonEvent() is called through the DISPLAY pointer object, and the mouse button and the mouse button status are injected according to the first KeySystem type value.

[0024] In an embodiment of the present application, when the remote end receives the key operation, the step of the remote end determining the type of the key operation according to the keyConstant value of the key operation includes:

[0025] When the keyConstant value is the second keyConstant value, determine that the type of the key operation is the keyboard key, and convert the second keyConstant value corresponding to the keyboard key into a second KeySystem type value, and then convert the second KeySystem type value into a KeyCode type value;

[0026] The interface XTestFakeKeyEvent() is called through the DISPLAY pointer object, and the keyboard key and keyboard key status are injected according to the KeyCode type value.

[0027] According to a second aspect of an embodiment of the present application, a device for supporting a multi-session scenario under a cloud desktop is provided, the device comprising:

[0028] An acquisition and sending module is used for the remote end to acquire the status of the keyboard lights according to a preset time period and send it to the local end so that the local end synchronizes the status of the keyboard lights; wherein the keyboard lights include a caps lock key light, a number lock key light, and a scroll lock key light;

[0029] The receiving response module is used for the remote end to receive the user's key operation and mouse position movement operation sent by the local end, and respond to the key operation and the mouse position movement operation.

[0030] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the method for supporting multi-session scenarios under a cloud desktop described in any of the above embodiments are implemented.

[0031] According to a fourth aspect of an embodiment of the present application, there is provided an electronic device, including:

[0032] Processor; and

[0033] A memory, configured to store executable instructions of the processor;

[0034] The processor is configured to execute the steps of the method for supporting multi-session scenarios under a cloud desktop in any of the above embodiments by executing the executable instructions.

[0035] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0036] In one embodiment of the present application, through the above method, by obtaining the status of the keyboard light at the remote end and receiving the key operations and mouse position movement operations sent by the local user, it is possible to achieve the purpose of injecting corresponding keys, mouse positions and obtaining the status of the corresponding keyboard lights for different session users, thereby achieving compatibility with multiple session scenarios on the remote desktop.

[0037] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 A flowchart schematically illustrates a method for supporting a multi-session scenario under a cloud desktop in an exemplary embodiment of the present application;

[0040] Figure 2 A block diagram schematically shows a device for supporting multi-session scenarios under a cloud desktop in an exemplary embodiment of the present application;

[0041] Figure 3 A schematic diagram of a program product in an exemplary embodiment of the present application is schematically shown;

[0042] Figure 4 A schematic diagram of an electronic device in an exemplary embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0044] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0045] This example implementation first provides a method for supporting multi-session scenarios in a cloud desktop. Figure 1 As shown in , the method includes: step S101 to step S102.

[0046] Wherein, step S101: the remote end obtains the status of the keyboard lights according to a preset time period and sends it to the local end so that the local end synchronizes the status of the keyboard lights; wherein the keyboard lights include the Caps Lock key light, the Number Lock key light and the Scroll Lock key light.

[0047] Step S102: the remote end receives the key operation and mouse movement operation of the user sent by the local end, and responds to the key operation and the mouse movement operation.

[0048] In one embodiment of the present application, through the above method, by obtaining the status of the keyboard light at the remote end and receiving the key operations and mouse position movement operations sent by the local user, it is possible to achieve the purpose of injecting corresponding keys, mouse positions and obtaining the status of the corresponding keyboard lights for different session users, thereby achieving compatibility with multiple session scenarios on the remote desktop.

[0049] Next, we will refer to Figure 1 Each step of the above method in this example implementation is described in more detail.

[0050] In step S101, the remote end is the S end, which is the image sending end, and is also the injection end of the key and mouse positions and the acquisition end of the keyboard light status. The local end is the R end, which is the image receiving end, and is also the sending end of the key and mouse positions and the receiving end of the keyboard light status.

[0051] Because the keyboard includes a CapLock key, a NumLock key, and a ScrollLock key. Correspondingly, the CapLock key corresponds to a CapLock key light, the NumLock key corresponds to a NumLock key light, and the ScrollLock key corresponds to a ScrollLock key light. Therefore, when the S end obtains the status of the keyboard lights, it can obtain the status of the CapLock key light, the NumLock key light, and the ScrollLock key light.

[0052] Furthermore, because the state of the Caps Lock key light includes two states: light off and light on, the state of the keypad lock key light includes two states: light off and light on, and the state of the scroll lock key light includes two states: light off and light on. Therefore, when obtaining the state of the Caps Lock key light, you can obtain light off or light on according to the actual situation; when obtaining the state of the keypad lock key light, you can obtain light off or light on according to the actual situation; when obtaining the state of the scroll lock key light, you can obtain light off or light on according to the actual situation. Whether the obtained state of the Caps Lock key light is light off or light on, whether the obtained state of the keypad lock key light is light off or light on, and whether the obtained state of the scroll lock key light is light off or light on, can all depend on their respective actual situations, and this application will not elaborate on this.

[0053] It should be understood that when the remote end obtains the status of the keyboard light, it can obtain the status of the keyboard light according to a preset time period, which can be 100ms. That is, the remote end can periodically obtain the status of the keyboard light at an interval of 100ms, and send the obtained status of the keyboard light to the R end, so that the R end synchronizes the status of the local keyboard light.

[0054] Further, the remote end obtains the status of the keyboard light according to a preset time period and sends it to the local end so that the local end synchronizes the status of the keyboard light, including:

[0055] The remote end calls the preset interface according to the preset time period and determines the state of the keyboard light through the preset interface.

[0056] Specifically, the step of remotely calling a preset interface according to a preset time period and determining the state of the keyboard light through the preset interface includes:

[0057] Create an xcb connection object remotely;

[0058] Call the xcb interface according to the preset time period through the xcb connection object, obtain the integer type value of the keyboard light, and perform bitwise operations to obtain the status of the keyboard light.

[0059] It can be understood that an xcb connection object is created at the remote end, recorded as xcb_connection_t*mConn. Secondly, a child thread is created at the remote end, which can be used to periodically obtain the status of the keyboard (CapLock, NumLock, ScrollLock) lights at the S end. During the periodic acquisition of the status of the keyboard lights, the status can be obtained every 100ms. Then, when the xcb interface is called through the xcb connection object, the xcb interface includes the interface xcb_xkb_get_indicator_state() and the interface xcb_xkb_get_indicator_state_reply(). Therefore, the interface xcb_xkb_get_indicator_state() and the interface xcb_xkb_get_indicator_state_reply() can be called through the xcb connection object to obtain the integer state value of the keyboard light (i.e., integer type value), and then through bitwise operations, the states of the lights corresponding to the three keys CapLock, NumLock, and ScrollLock are obtained respectively, and then reported and transmitted to the R end. After the R end receives the corresponding keyboard light state, it is used to synchronously update the local keyboard of the R end. Among them, the integer type value is the state type value of the integer type.

[0060] It should be noted that bitwise operation is a method of operating on binary bits. It directly operates on the binary representation of integers. In computer science, bitwise operation is a basic and efficient form of operation, because all data inside the computer is stored and processed in binary form. Bitwise operations include bitwise AND (&), bitwise OR (|), bitwise XOR (^), bitwise negation (~), left shift (<<) and right shift (>>) and other operations.

[0061] In step S102, the user of the R end can operate the remote end by key operation or mouse position movement operation. Specifically, the R end sends the user's key operation to the S end, and the S end responds based on the key operation, so that the S end performs the key operation, and the R end sends the user's mouse position movement operation to the S end, and the S end responds based on the mouse position movement operation, and sends the mouse position movement operation to the S end, so that the S end performs the mouse position movement operation.

[0062] Furthermore, the steps of the remote end receiving the user's key operation and the mouse position movement operation sent by the local end, and responding to the key operation, and responding to the mouse position movement operation include:

[0063] When the remote end receives the mouse position movement operation, the remote end performs pixel conversion on the mouse position according to the current display resolution to obtain the converted mouse position; wherein the mouse position includes the mouse coordinates in the X direction and the mouse coordinates in the Y direction;

[0064] Call the xcb interface through the xcb connection object, inject the converted mouse position into the current Xrog, and refresh xcb_flush.

[0065] It can be understood that since the mouse position includes the mouse coordinates in the X direction and the mouse coordinates in the Y direction, when the S end receives the movement operation of the mouse position, it also receives the mouse coordinates in the X direction and the mouse coordinates in the Y direction sent by the R end. The S end performs pixel conversion on the mouse coordinates in the X direction and the mouse coordinates in the Y direction sent by the R end according to the current resolution of the display, and obtains the converted mouse position (mouse coordinates in the X direction and mouse coordinates in the Y direction) to adapt to the resolution of the display. The mouse coordinates in the X direction are marked as PosX, the converted mouse coordinates in the X direction are marked as PosX', the mouse coordinates in the Y direction are marked as PosY, and the converted mouse coordinates in the Y direction are marked as PosY'. PosX'=PosX×current resolution width / 65535.

[0066] After the mouse position is converted, the interface xcb_warp_pointer_checked() and interface xcb_request_check() are called through the xcb connection object to inject the converted mouse position into the current Xrog and refresh xcb_flush.

[0067] Furthermore, the steps of the remote end receiving the user's key operation and the mouse position movement operation sent by the local end, and responding to the key operation, and responding to the mouse position movement operation include:

[0068] When the remote end receives a key operation, the remote end determines the type of the key operation according to the keyConstant value of the key operation; wherein the type of the key operation includes a mouse button and a keyboard button, and the keyConstant value includes a first keyConstant value and a second keyConstant value;

[0069] When the keyConstant value is the first keyConstant value, the type of the key operation is determined to be a mouse button, and the first keyConstant value corresponding to the mouse button is injected into the mouse button and the mouse button state.

[0070] Specifically, when the keyConstant value is the first keyConstant value, determining the type of the key operation is a mouse button, and injecting the first keyConstant value corresponding to the mouse button into the steps of the mouse button and the mouse button state include:

[0071] Create a DISPLAY object and call XOpenDisplay() to get the current DISPLAY pointer object;

[0072] Convert the first keyConstant value corresponding to the mouse button into the first KeySystem type value;

[0073] The interface XTestFakeButtonEvent() is called through the DISPLAY pointer object, and the mouse button and mouse button status are injected according to the first KeySystem type value.

[0074] It can be understood that a DISPLAY object is created at the remote end, recorded as DISPLAY*dpy, and the current DISPLAY number (for example, DISPLAY=:0) is obtained through logic, and XOpenDisplay() is called to obtain the current DISPLAY pointer object.

[0075] After the DISPLAY object is created, when the S side receives the key operation sent by the R side, the key code value code is the keyConstant type value, Press pressed / Release lifted, Type button or scroll wheel. By judging the keyConstant value, it is determined whether it is a mouse button or a keyboard button.

[0076] If the key operation type is a mouse button, convert the first keyConstant value corresponding to the mouse button into the first KeySystem type value, and call the interface XTestFakeButtonEvent() through the DISPLAY pointer object to inject the mouse button and mouse button status. Among them, the mouse button includes the left mouse button, the right mouse button and the scroll wheel, and the mouse button status includes the mouse pressed Press and the mouse released Release.

[0077] It should be noted that if the type of key operation is the scroll wheel in the mouse button, the scroll wheel lift Release is sent after 5ms, otherwise it will keep sliding and cannot stop.

[0078] Further, when the remote end receives a key operation, the step of determining the type of the key operation according to the keyConstant value of the key operation comprises:

[0079] When the keyConstant value is the second keyConstant value, determine that the type of the key operation is a keyboard key, and convert the second keyConstant value corresponding to the keyboard key into a second KeySystem type value, and then convert the second KeySystem type value into a KeyCode type value;

[0080] Call the XTestFakeKeyEvent() interface through the DISPLAY pointer object, and inject keyboard keys and keyboard key states according to the KeyCode type value.

[0081] It can be understood that if the key operation type is a keyboard key, the second keyConstant value corresponding to the keyboard key is converted into a second KeySystem type value, and then the KeySystem type value is converted into a KeyCode type value. Then XTestFakeKeyEvent() is called through the DISPLAY pointer object to inject the keyboard key and the keyboard key state, wherein the keyboard key state includes the keyboard press Press and the keyboard release Release.

[0082] This application aims at the method of obtaining the keyboard light on the S side, as well as the method of injecting the keyboard keys and mouse positions on the S side, and modifies the injection of keyboard keys and mouse positions to be bound to Xorg. Xorg itself is a desktop service, which is compatible with multi-session and multi-user scenarios under remote desktops, and abandons the original injection of pipeline devices. Because pipeline devices are shared by all XorgServers, the created XorgServer will automatically load all devices.

[0083] It should be noted that, although the steps of the method in the present application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc. In addition, it is also easy to understand that these steps may be, for example, executed synchronously or asynchronously in multiple modules / processes / threads.

[0084] Furthermore, in this example implementation, a device for supporting multi-session scenarios under a cloud desktop is also provided. Figure 2As shown in , the device 200 may include an acquisition and transmission module 210 and a receiving and responding module 220. Among them: the acquisition and transmission module 210 is used for the remote end to obtain the status of the keyboard light according to the preset time period and send it to the local end, so that the local end synchronizes the status of the keyboard light; wherein the keyboard light includes the caps lock key light, the number lock key light and the scroll lock key light. The receiving and responding module 220 is used for the remote end to receive the user's key operation and mouse position movement operation sent by the local end, and respond to the key operation, and respond to the mouse position movement operation.

[0085] In one embodiment, it further includes:

[0086] The acquisition module is used to remotely call the preset interface according to the preset time period and determine the status of the keyboard light through the preset interface.

[0087] In one embodiment, it further includes:

[0088] The first creation module is used to remotely create an xcb connection object;

[0089] The first calling module is used to call the xcb interface according to a preset time period through the xcb connection object, obtain the integer type value of the keyboard light, and perform bitwise operation to obtain the state of the keyboard light.

[0090] In one embodiment, it further includes:

[0091] A first conversion module, configured to convert the mouse position into pixels according to the current display resolution when the remote end receives a mouse position movement operation, so as to obtain a converted mouse position; wherein the mouse position includes the mouse coordinates in the X direction and the mouse coordinates in the Y direction;

[0092] The second calling module is used to call the xcb interface through the xcb connection object, inject the converted mouse position into the current Xrog, and refresh xcb_flush.

[0093] In one embodiment, it further includes:

[0094] A judgment module, configured to judge the type of the key operation according to the keyConstant value of the key operation when the remote end receives the key operation; wherein the type of the key operation includes a mouse button and a keyboard button, and the keyConstant value includes a first keyConstant value and a second keyConstant value;

[0095] The first judgment submodule is used to judge that the type of the key operation is a mouse button when the keyConstant value is a first keyConstant value, and inject the first keyConstant value corresponding to the mouse button into the mouse button and the mouse button state.

[0096] In one embodiment, it further includes:

[0097] The second creation module is used to create a DISPLAY object and call XOpenDisplay() to get the current DISPLAY pointer object;

[0098] A second conversion module, used for converting a first keyConstant value corresponding to a mouse button into a first KeySystem type value;

[0099] The first injection module is used to call the interface XTestFakeButtonEvent() through the DISPLAY pointer object, and inject the mouse button and the mouse button state according to the first KeySystem type value.

[0100] In one embodiment, it further includes:

[0101] The second judgment submodule is used to judge that the type of the key operation is a keyboard key when the keyConstant value is a second keyConstant value, and convert the second keyConstant value corresponding to the keyboard key into a second KeySystem type value, and then convert the second KeySystem type value into a KeyCode type value;

[0102] The second injection module is used to call the interface XTestFakeKeyEvent() through the DISPLAY pointer object, and inject keyboard keys and keyboard key states according to the KeyCode type value.

[0103] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0104] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the implementation mode of the present application, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units for concretization. The components displayed as modules or units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. Those of ordinary skill in the art can understand and implement it without paying creative work.

[0105] In an exemplary embodiment of the present application, a computer-readable storage medium is also provided, on which a computer program is stored, and when the program is included in the processor and executed, the steps of the method for supporting multi-session scenarios under the cloud desktop described in any of the above embodiments can be implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the method for supporting multi-session scenarios under the cloud desktop described in the above-mentioned part of this specification.

[0106] refer to Figure 3 As shown, a program product 300 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0107] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0108] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0109] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0110] In an exemplary embodiment of the present application, an electronic device is also provided, which may include a processor and a memory for storing executable instructions of the processor. The processor is configured to execute the steps of the method for supporting multi-session scenarios under a cloud desktop in any of the above embodiments by executing the executable instructions.

[0111] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0112] Refer to the following Figure 4 The electronic device 600 according to this embodiment of the present invention is described. Figure 4 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0113] like Figure 4 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0114] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps of various exemplary embodiments of the present invention described in the method section of supporting multi-session scenarios under the cloud desktop above. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .

[0115] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0116] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0117] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0118] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0119] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server or a network device, etc.) to execute the method of supporting multi-session scenarios under the above-mentioned cloud desktop according to the implementation method of the present application.

[0120] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

Claims

1. A method for supporting multi-session scenarios under a cloud desktop, characterized in that: The method includes: The remote end obtains the status of the keyboard light according to a preset time period and sends it to the local end so that the local end synchronizes the status of the keyboard light; The remote end receives the user's key operation and the mouse position movement operation sent by the local end, and responds to the key operation and the mouse position movement operation.

2. The method for supporting multi-session scenarios under a cloud desktop according to claim 1, characterized in that: The step of the remote end acquiring the state of the keyboard light according to a preset time period and sending it to the local end so that the local end synchronizes the state of the keyboard light includes: The remote end calls a preset interface according to the preset time period, and determines the state of the keyboard light through the preset interface.

3. The method for supporting multi-session scenarios under a cloud desktop according to claim 2, characterized in that: The step of the remote end calling the preset interface according to the preset time period and determining the state of the keyboard light through the preset interface includes: The remote end creates an xcb connection object; The xcb interface is called according to the preset time period through the xcb connection object to obtain the integer type value of the keyboard light, and a bitwise operation is performed to obtain the state of the keyboard light.

4. The method for supporting multi-session scenarios under cloud desktop according to claim 3, characterized in that: The steps of the remote end receiving the user's key operation and the mouse position movement operation sent by the local end, and responding to the key operation, and responding to the mouse position movement operation include: When the remote end receives the movement operation of the mouse position, the remote end performs pixel conversion on the mouse position according to the resolution of the current display to obtain the converted mouse position; wherein the mouse position includes the mouse coordinates in the X direction and the mouse coordinates in the Y direction; The xcb interface is called through the xcb connection object, the converted mouse position is injected into the current Xrog, and xcb_flush is refreshed.

5. The method for supporting multi-session scenarios under a cloud desktop according to claim 1, characterized in that: The steps of the remote end receiving the user's key operation and the mouse position movement operation sent by the local end, and responding to the key operation, and responding to the mouse position movement operation include: When the remote end receives the key operation, the remote end determines the type of the key operation according to the keyConstant value of the key operation; wherein the type of the key operation includes a mouse button and a keyboard button, and the keyConstant value includes a first keyConstant value and a second keyConstant value; When the keyConstant value is the first keyConstant value, it is determined that the type of the key operation is a mouse button, and the first keyConstant value corresponding to the mouse button is injected into the mouse button and the mouse button state.

6. The method for supporting multi-session scenarios under a cloud desktop according to claim 5, characterized in that: The step of determining, when the keyConstant value is the first keyConstant value, the type of the key operation is a mouse button, and injecting the first keyConstant value corresponding to the mouse button into the mouse button and the mouse button state includes: Create a DISPLAY object and call XOpenDisplay() to get the current DISPLAY pointer object; Convert the first keyConstant value corresponding to the mouse button into a first KeySystem type value; The interface XTestFakeButtonEvent() is called through the DISPLAY pointer object, and the mouse button and the mouse button status are injected according to the first KeySystem type value.

7. The method for supporting multi-session scenarios under a cloud desktop according to claim 5 or 6, characterized in that: When the remote end receives the key operation, the step of determining the type of the key operation according to the keyConstant value of the key operation comprises: When the keyConstant value is the second keyConstant value, determine that the type of the key operation is the keyboard key, and convert the second keyConstant value corresponding to the keyboard key into a second KeySystem type value, and then convert the second KeySystem type value into a KeyCode type value; The interface XTestFakeKeyEvent() is called through the DISPLAY pointer object, and the keyboard key and keyboard key status are injected according to the KeyCode type value.

8. A device supporting multi-session scenarios under a cloud desktop, characterized in that: The device includes: An acquisition and sending module is used for the remote end to acquire the status of the keyboard lights according to a preset time period and send it to the local end so that the local end can synchronize the status of the keyboard lights; wherein the keyboard lights include a caps lock key light, a number lock key light and a scroll lock key light; The receiving response module is used for the remote end to receive the user's key operation and mouse position movement operation sent by the local end, and respond to the key operation and the mouse position movement operation.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for supporting multi-session scenarios under a cloud desktop as described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the steps of the method for supporting multi-session scenarios under a cloud desktop according to any one of claims 1 to 7 by executing the executable instructions.