Method and device for sharing host based on multiple input devices and electronic device

By creating a second seat in the computer system with the same number of new input devices and configuring application window permissions for it, the problems of chaotic window management and complex configuration in multi-user sharing in traditional computer systems are solved, realizing secure and reliable device sharing and efficient management for multiple users.

CN121008733APending Publication Date: 2025-11-25UNIONTECH SOFTWARE TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511133917.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Traditional computer systems only support a single input device, leading to chaotic window management and complex configuration in multi-user collaborative work scenarios. In particular, when multiple users use the application at the same time, the problems of window focus contention and switching are serious, and the configuration process is cumbersome.

Method used

The multi-seat configuration tool creates a second seat equal to the number of new input devices according to Udev rules, binds it to each new input device, configures application window permissions, and sends the binding relationship and permissions to the window manager to optimize the relationship between devices and users and ensure that multiple users can securely and reliably share a host.

Benefits of technology

It enables secure and reliable operation of shared devices among multiple users, simplifies the configuration process, provides a flexible and efficient device management experience, and allows multiple users to operate application windows simultaneously without interfering with each other, thus improving learning and work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008733A_ABST
    Figure CN121008733A_ABST
Patent Text Reader

Abstract

The invention discloses a method for sharing a host based on multiple input devices, and belongs to the technical field of computers, and the method comprises the following steps: after a management user logs in a multi-seat configuration tool, creating second seats with the same number as new input devices according to a Udev rule, and enabling the management user to be a user operating the input device corresponding to a first seat of the host; according to a binding instruction sent by the management user, the second seats and the new input devices are bound one by one, and operation users of the input devices corresponding to the second seats are common users; according to a permission configuration instruction sent by the management user, configuring an application window permission for each common user; and sending the binding relationship between the second seat and the new input device and the application window authority to a window manager, so that the window manager manages the application window according to the binding relationship and the application window authority. According to the invention, the problems of disordered management and complex configuration when multiple users share one host window are solved, and more flexible and efficient equipment management experience is provided for the users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and electronic device based on multiple input devices sharing a host. Background Technology

[0002] With the continuous development of computer technology, people's needs for computer systems are becoming increasingly diverse. Traditional computer systems typically only support a single input device, which is particularly inconvenient in many scenarios requiring collaborative work. Currently, there are two main solutions for Linux multi-seat systems: software-based and hardware-based. Software-based solutions mainly achieve the effect of multiple users sharing a single computer by configuring udev appropriately to assign an independent input device to each seat. This approach can improve the utilization of computer resources and facilitate management and operation in a multi-user environment. Hardware-based solutions use specific hardware devices, such as multi-monitor graphics cards and USB splitters, to connect multiple monitors, keyboards, and mice, allowing each user to independently operate their own monitor, keyboard, and mouse, thus achieving the effect of multiple users sharing a single computer.

[0003] While software-based solutions can enable multiple users to share a single computer, they also have some drawbacks, primarily: chaotic window management. Each user can open multiple windows and applications, leading to chaotic window management, especially when multiple users are using the same application simultaneously, causing window focus conflicts and confusion when switching windows; and configuration complexity. Configuring Linux multi-seat technology is relatively complex, requiring certain technical knowledge and experience. udev configuration needs to be tailored to each user's keyboard, mouse, and other input device information, which can make the configuration process complex and tedious.

[0004] Therefore, a method based on multiple input devices sharing a host is needed to solve the problems existing in the above technical solutions. Summary of the Invention

[0005] The present invention provides a method, apparatus and electronic device for sharing a host based on multiple input devices, in an attempt to solve or at least alleviate the problems mentioned above.

[0006] According to one aspect of the present invention, a method for sharing a host based on multiple input devices is provided. The method is applied to a multi-seat configuration tool. The method includes: after an administrator logs into the multi-seat configuration tool, creating a second seat equal in number to the number of new input devices according to Udev rules, wherein the administrator is a user operating the input devices corresponding to the first seat on the host; binding the second seat to each of the new input devices one-to-one according to a binding instruction sent by the administrator, wherein the user operating the input devices corresponding to the second seat is a regular user; configuring application window permissions for each regular user according to a permission configuration instruction sent by the administrator; and sending the binding relationship between the second seat and the new input devices and the application window permissions to a window manager, so that the window manager manages application windows according to the binding relationship and the application window permissions.

[0007] Optionally, according to the permission configuration instruction sent by the management user, configuring application window permissions for each of the ordinary users includes: in response to the window manager creating the same number of cursors as the second seat, and configuring application window permissions for the ordinary users corresponding to the second seat according to the permission configuration instruction sent by the management user.

[0008] Optionally, the method further includes: dynamically detecting changes in application window permissions configured for the ordinary user; and when a change in the application window permissions of the ordinary user is detected, sending the changed application window permissions to the window manager.

[0009] According to another aspect of the present invention, a method for sharing a host based on multiple input devices is provided. The method is applied to a window manager and includes: receiving a binding relationship between a second seat and a new input device, and application window permissions, sent by a multi-seat configuration tool. The new input device is a newly connected input device based on the input device corresponding to the first seat on the operating host. The second seat is a number of seats created by the multi-seat configuration tool according to Udev rules after a management user logs in. The application window permissions are permissions configured by the multi-seat configuration tool, based on permission configuration instructions sent by the management user, for each second seat to operate a specific application window. The management user is the user of the input device corresponding to the first seat on the operating host. The method also includes managing application windows according to the binding relationship and the application window permissions.

[0010] Optionally, receiving the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool includes: receiving the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool; creating the same number of cursors as the second seat according to the binding relationship; and receiving the application window permissions sent by the multi-seat configuration tool after the multi-seat configuration tool determines that the window manager has created cursors for the second seat.

[0011] Optionally, managing the application window according to the binding relationship and the application window permissions includes: receiving an input event from a new input device corresponding to the second seat, the input event including a target seat identifier, a target application window identifier, and input content; determining, according to the binding relationship and the application window permissions, whether the second seat represented by the target seat identifier has permission to operate the target application window corresponding to the target application window identifier; when it is determined that permission is granted, forwarding the input content to the target application window; when it is determined that permission is not granted, not forwarding the input content to the target application window.

[0012] Optionally, forwarding the input content to the target application window includes: forwarding the input content to a graphics frame, and then forwarding the input content to the target application window through the graphics frame.

[0013] Optionally, the method further includes: when the multi-seat configuration tool dynamically detects a change in the application window permissions of the second seat, receiving the changed application window permissions sent by the multi-seat configuration tool.

[0014] According to another aspect of the present invention, an apparatus for sharing a host with multiple input devices is provided. The apparatus is applied to a multi-seat configuration tool. The apparatus includes: a seat creation module, configured to create a second seat equal in number to the number of new input devices according to Udev rules after an administrator logs into the multi-seat configuration tool, wherein the administrator is a user operating the input device corresponding to a first seat on the host; a seat binding module, configured to bind the second seat to each of the new input devices one-to-one according to a binding instruction sent by the administrator, wherein the user operating the input device corresponding to the second seat is a regular user; a permission configuration module, configured to configure application window permissions for each regular user according to a permission configuration instruction sent by the administrator; and a sending module, configured to send the binding relationship between the second seat and the new input device and the application window permissions to a window manager, so that the window manager manages application windows according to the binding relationship and the application window permissions.

[0015] Optionally, the permission configuration module is used to respond to the window manager creating the same number of cursors as the second seat, and to configure application window permissions for the ordinary user corresponding to the second seat according to the permission configuration instruction sent by the management user.

[0016] Optionally, the device further includes: a dynamic update module, used to dynamically detect changes in the application window permissions configured for the ordinary user; when a change in the application window permissions of the ordinary user is detected, the changed application window permissions are sent to the window manager.

[0017] According to another aspect of the present invention, an apparatus for sharing a host based on multiple input devices is provided. The apparatus is applied to a window manager and includes: a receiving module for receiving a binding relationship between a second seat and a new input device and application window permissions sent by a multi-seat configuration tool. The new input device is a newly connected input device based on the input device corresponding to the first seat on the operating host. The second seat is a number of seats created by the multi-seat configuration tool according to Udev rules after a management user logs in. The application window permissions are permissions configured by the multi-seat configuration tool, based on permission configuration instructions sent by the management user, for each second seat to operate a specific application window. The management user is the user of the input device corresponding to the first seat on the operating host. A management module is used to manage application windows according to the binding relationship and the application permissions.

[0018] Optionally, the receiving module includes: a first receiving submodule, configured to receive the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool; a cursor creation submodule, configured to create the same number of cursors as the second seat according to the binding relationship; and a second receiving submodule, configured to receive application window permissions sent by the multi-seat configuration tool after the multi-seat configuration tool determines that the window manager has created cursors for the second seat.

[0019] Optionally, the management module includes: an input event receiving submodule, configured to receive input events occurring on a new input device corresponding to the second seat, the input event including a target seat identifier, a target application window identifier, and input content; and a judgment submodule, configured to determine, based on the binding relationship and the application window permissions, whether the second seat represented by the target seat identifier has permission to operate the target application window corresponding to the target application window identifier; the judgment module includes: a first processing submodule, configured to forward the input content to the target application window when it is determined that permission is granted; and a second processing submodule, configured to not forward the input content to the target application window when it is determined that permission is not granted.

[0020] Optionally, the first processing submodule is used to forward the input content to the graphics frame, and then forward the input content to the target application window through the graphics frame.

[0021] Optionally, the receiving module is further configured to receive the changed application window permissions sent by the multi-seat configuration tool when the multi-seat configuration tool dynamically detects that the application window permissions of the second seat have changed.

[0022] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; at least one memory storing computer-executable instructions, wherein, when executed by the at least one processor, the computer-executable instructions cause the at least one processor to perform the method of sharing a host based on multiple input devices as described above.

[0023] According to one aspect of the present invention, a computer-readable storage medium is provided, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the method described above based on a shared host of multiple input devices.

[0024] According to another aspect of the present invention, a computer program product is provided, comprising computer instructions that, when executed by at least one processor, cause the at least one processor to perform the method described above based on a shared host of multiple input devices.

[0025] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:

[0026] In this disclosure, a multi-seat configuration tool creates a second seat with the same number of new input devices according to Udev rules. The second seat is then bound to each new input device, and application window permissions are configured for the second seat. The binding relationship between the second seat and the new input devices, along with the configured application window permissions, are sent to the window manager. The window manager then manages the application windows based on the binding relationship and the application window permissions. By redefining and optimizing the relationship between devices and users, device sharing among users is ensured to operate more securely and reliably. This achieves the technical effect of multiple seats sharing a single host, providing users with a more flexible and efficient device management experience.

[0027] In addition, in terms of simplifying configuration, managing users does not require much technical knowledge. Users can simply be created based on their mouse and keyboard names, which greatly reduces the complexity of configuration and provides users with a more comfortable experience. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0029] Figure 1 This is a flowchart illustrating a method for sharing a host based on multiple input devices according to an exemplary embodiment of the present disclosure;

[0030] Figure 2 This is a flowchart illustrating another method for sharing a host based on multiple input devices according to an exemplary embodiment of the present disclosure;

[0031] Figure 3 This is a block diagram illustrating an apparatus based on a shared host for multiple input devices according to an exemplary embodiment of the present disclosure;

[0032] Figure 4 This is a block diagram illustrating another apparatus based on multiple input devices sharing a host according to an exemplary embodiment of the present disclosure;

[0033] Figure 5 This is a schematic diagram illustrating a multi-seat collaborative text editor according to a specific embodiment of the present disclosure;

[0034] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0035] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0036] It should be noted that the terms "first," "second," etc., used 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. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following examples do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0037] Figure 1 This is a flowchart illustrating a method for sharing a host based on multiple input devices according to an exemplary embodiment of the present disclosure.

[0038] Step 102: After the management user logs in to the multi-seat configuration tool, a second seat is created according to the Udev rules, with the number of new input devices being the same. The management user is the user of the input device corresponding to the first seat of the operating host.

[0039] It should be noted that Udev is a subsystem in the Linux operating system used to manage devices and drivers. It can dynamically identify newly added or removed devices in the system and assign them corresponding device files. Udev rules are configuration files in the Linux system used to dynamically manage device nodes. By defining the behavior (such as naming, permission settings, script execution, etc.) triggered by device events (such as insertion and removal), it can achieve automated management of device nodes.

[0040] The first seat is the default seat (seat0) for the input device connected to the host. The user corresponding to the default seat is the management user, who has full operating permissions. The user corresponding to the second seat is the ordinary user, who can only operate the already configured application windows.

[0041] In some embodiments, after an administrator logs into the multi-seat configuration tool, the multi-seat configuration tool creates new seats (i.e., second seats) seat1, seat2, ..., seatX based on the input devices configured by the hardware mount. Here, X equals the number of new input devices. Input devices include, but are not limited to, keyboards, mice, and touch devices. After a new input device is connected to the host, it is bound to the first seat by default before any configuration is performed.

[0042] Step 104: Bind the second seat to the new input device one by one according to the binding instruction sent by the management user.

[0043] The multi-seat configuration tool receives the binding command sent by the management user and binds the second seat created in step 102 to the new input devices one by one. At this time, the new input devices are configured from the first seat to the second seat. Normally, a new input device will have a seat identifier after it is connected to the host. After the multi-seat configuration tool creates the seat, the management user can change the seat binding operation for each newly connected input device in the multi-seat configuration tool interface. For example, change the binding seat of input device 1 to seat1, and change the binding seat of input device 2 to seat2, thereby completing the binding of the second seat to the new input device.

[0044] Step 106: Configure application window permissions for each ordinary user according to the permission configuration instructions sent by the management user.

[0045] In some embodiments, after the second user seat is bound to the new input device, the window manager listens for the binding event and creates the same number of cursors as the second user seat. Simultaneously, the multi-user binding configuration tool configures the application window permissions for the ordinary users corresponding to the second user seat based on the permission binding instructions sent by the managing user. This is achieved by adding a configuration interface to the multi-user configuration tool, allowing the managing user to configure application window permissions for ordinary users. Each ordinary user can be configured with different application window permissions than other users, and multiple ordinary users can be configured to operate on the same application window simultaneously. For example, ordinary users 1-3 have permission for application window 1, only ordinary user 4 has permission for application window 2, and ordinary users 5-6 have permission for application window 3, etc. Application window permissions specifically refer to the permissions configured for the ordinary users corresponding to the second user seat to access application windows, including but not limited to read permissions and edit permissions. For example, in the aforementioned example, ordinary users 5-6 are all configured to operate on window 3, but ordinary user 5 is only configured to read application window 3, while ordinary user 6 is configured to edit window 3.

[0046] It's important to note that the Window Manager (WM) is a core component in the Linux graphical interface that controls the appearance and behavior of windows. It manages window creation, layout, decoration, and interaction logic. As a key component of the X Window System (X11) or Wayland protocol, it runs independently of the desktop environment, focusing on window-level control. In modern operating systems, the need for multi-user, multi-tasking is increasingly common, and the Window Manager can support scenarios where multiple users simultaneously use a single computer. To achieve this, the Window Manager collaborates with Udev to correctly identify and manage input devices.

[0047] X Window System (X11) is a standardized graphical user interface protocol for UNIX / Linux systems, employing a client-server model. It primarily consists of an X Server and an X client. Wayland, on the other hand, is a modern display server protocol designed specifically for Linux and other Unix-like systems, aiming to replace the traditional X Window System (X11). Its core definition is a set of protocols that standardize communication between the client (application) and the compositor (display server), rendering the interface directly through a shared memory buffer, eliminating the intermediate transmission overhead of X11.

[0048] Step 108: Send the binding relationship between the second seat and the new input device and the application window permissions to the window manager.

[0049] It should be noted that the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool to the window manager are actually adding a seat identifier and an application window identifier to each input event of the second seat. When the multi-seat configuration tool detects that the application window permissions of the second seat have changed, it sends the changed application window permissions of the second seat to the window manager.

[0050] This disclosure provides a method for sharing a host based on multiple input devices. A multi-seat configuration tool creates a second seat with the same number of new input devices according to Udev rules. The second seat is then bound to each new input device, and application window permissions are configured for each second seat. The binding relationship between the second seat and the new input devices, along with the configured application window permissions, are sent to a window manager. The window manager manages the application windows based on the binding relationship and the application window permissions. By redefining and optimizing the relationship between devices and users, device sharing among users is ensured to operate more securely and reliably, thus achieving the technical effect of multiple seats sharing a single host and providing users with a more flexible and efficient device management experience. Furthermore, user management in this disclosure does not require complex operations; only simple seat creation, seat binding, and application window permission configuration for each ordinary user are needed to achieve the technical effect of multiple users jointly operating a single host. Multiple users can operate application windows simultaneously without interference. This functionality can be widely applied in many scenarios such as education, multimedia, and gaming, and can greatly improve the efficiency of learning and office work.

[0051] Figure 2 This is a flowchart illustrating another method for sharing a host based on multiple input devices according to an exemplary embodiment of the present disclosure.

[0052] It should be noted that the new input device is a newly connected input device based on the input device corresponding to the first seat of the operating host. The first seat is the default seat of the host input device, and the user operating the first seat is the management user. The second seat is the same number of seats created by the multi-seat configuration tool according to Udev rules after the management user logs in. The application window permissions are the permissions configured by the multi-seat configuration tool according to the permission configuration instructions sent by the management user for each second seat, which allow the user to operate specific application windows.

[0053] In some embodiments, the window manager receives the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool, and manages the application window according to the binding relationship between the second seat and the new input device and the application window permissions. See [link to documentation]. Figure 2In step 202, the multi-seat configuration tool first receives the binding relationship between the second seat and the new input device. After confirming that the second seat and the new input device are bound, the window manager creates the same number of cursors as the second seat based on the binding relationship. At this time, each ordinary user corresponding to the second seat is automatically bound to a cursor, and each ordinary user corresponding to a cursor has full application operation permissions. Then, the multi-seat configuration tool configures application window permissions for each second seat and sends the application window permissions of the second seat to the window manager. After receiving the application window permissions sent by the multi-seat configuration tool, the window manager manages the application windows according to the binding relationship and application window permissions. In step 204, when the second seat is received... When an input event occurs on a new input device, the window manager judges the input event. Specifically, the input event is a set of data containing a target seat identifier, a target application window identifier, and input content. Based on the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool and the application window permissions, the window manager judges whether the second seat represented by the target seat identifier has the permission to operate the application window corresponding to the target application window identifier. If it is determined that the second seat represented by the target seat identifier has the permission to operate the target application window corresponding to the target application window identifier, the input content is forwarded to the target application window. If it is determined that the second seat does not have the permission, the input content is not forwarded to the target application window. Here, the target seat identifier is when the new input device is operated by the corresponding ordinary user. Based on the binding relationship between the second seat and the new input device, the input content will carry the seat identifier corresponding to the new input device. The target application window identifier is when the new input device is operated by the corresponding ordinary user to access the application window. The input content will also carry the application window identifier. For example, if ordinary user 1 operates the corresponding input device 1 to access application window 1, then the input event includes the seat identifier (seat1) corresponding to ordinary user 1, the application window 1 identifier, and the access to application window 1 (corresponding input content).

[0054] In some embodiments, when the multi-seat configuration tool dynamically detects a change in the application window permissions of the second seat, it receives the changed application window permissions sent by the multi-seat configuration tool and manages the application window according to the binding relationship between the second seat and the new input device and the changed application window permissions.

[0055] In some embodiments, when the window manager determines whether the second seat has permission to operate the application window based on the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool and the application window permissions, if it is determined that the second seat has permission, the input content is forwarded to the graphics frame, and the input content is forwarded to the target application window through the graphics frame.

[0056] It's important to note that a graphics framework is a software architecture used to manage and visualize graphical elements, providing core functionalities to support graphics rendering, interaction, and animation effects. Common graphics frameworks on Linux systems include Qt (The C++ Application Framework, usually simply called "Qt") and GTK (GIMP Toolkit), both designed and developed for the X or Wayland protocols. They also provide rich graphical interface support for Linux systems, allowing users to easily perform graphical interactions. In the above embodiments, the graphics framework acts as an intermediary layer between the application and the window manager, responsible for converting input events into protocol messages recognizable by the target application window, and then forwarding the input content to the target application window. For example, in the X11 framework, input events are converted into XKeyEvent or XButtonEvent structures and sent to the target window through the XSendEvent() function. In the Wayland framework, the keyboard / pointer module of the wl_seat interface constructs wl_keyboard_key or wl_pointer_button events, which are forwarded to the target application window via the Compositor. During the forwarding process, the target seat identifier is carried so that the application can distinguish the input content of different seats. For example, QT obtains the seat ID through the QInputEvent::seat() interface.

[0057] The embodiments of this disclosure create a second seat with the same number of new input devices by using a multi-seat configuration tool. After binding the second seat to each new input device, each second seat is configured with operable application window permissions. The window manager judges the input events of each seat and manages the application windows, thereby realizing the technical effect of multiple users sharing a single host. This provides a more flexible and efficient solution for device management in a multi-user environment. In terms of configuration, users can be created based on mouse and keyboard names, without requiring users to have extensive technical knowledge and experience in managing users.

[0058] Figure 3 This is a block diagram illustrating an apparatus based on a shared host for multiple input devices according to an exemplary embodiment of the present disclosure;

[0059] Reference Figure 3 The device based on multiple input devices sharing a host includes a seat creation module 302, a seat binding module 304, a permission configuration module 306, and a sending module 308.

[0060] The creation of a seat module 302 is used to create a second seat with the same number of new input devices according to Udev rules after the management user logs in to the multi-seat configuration tool. The management user is the user of the input device corresponding to the first seat of the operating host.

[0061] The seat binding module 304 is used to bind the second seat to the new input device one by one according to the binding instruction sent by the management user, wherein the user operating the input device corresponding to the second seat is a regular user;

[0062] The permission configuration module 306 is used to configure application window permissions for each ordinary user according to the permission configuration instructions sent by the management user;

[0063] The sending module 308 is used to send the binding relationship between the second seat and the new input device and the application window permissions to the window manager, so that the window manager can manage the application window according to the binding relationship and the application window permissions.

[0064] Optionally, the permission configuration module 306 includes: in response to the window manager creating the same number of cursors as the second seat, and configuring application window permissions for the ordinary user corresponding to the second seat according to the permission configuration instruction sent by the management user.

[0065] Optionally, the device further includes a dynamic update module, used to dynamically detect changes in the application window permissions configured for the ordinary user; when a change in the application window permissions of the ordinary user is detected, the changed application window permissions are sent to the window manager.

[0066] This disclosure provides an apparatus for sharing a host across multiple input devices. A multi-seat configuration tool creates a second seat equal to the number of new input devices according to Udev rules. The second seat is then bound to each new input device, and application window permissions are configured for each second seat. The binding relationship between the second seat and the new input devices, along with the configured application window permissions, are sent to a window manager. The window manager manages the application windows based on these binding relationships and permissions. By redefining and optimizing the relationship between devices and users, device sharing among users is ensured to operate more securely and reliably, achieving the technical effect of multiple seats sharing a single host and providing users with a more flexible and efficient device management experience. Furthermore, by using the multi-seat configuration tool to create and bind seats for each newly connected input device and configure application window permissions for the corresponding ordinary user, multiple users can operate the host simultaneously without interference. This functionality can be widely applied in many scenarios such as education, multimedia, and gaming, and can significantly improve work efficiency in learning and office work.

[0067] Figure 4 This is a block diagram illustrating another apparatus based on a shared host for multiple input devices according to an exemplary embodiment of the present disclosure.

[0068] See Figure 4 The device based on multiple input devices sharing a host includes a receiving module 402 and a management module 404.

[0069] The receiving module 402 is used to receive the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool. The new input device is a newly connected input device based on the input device corresponding to the first seat of the operating host. The second seat is the same number of seats created by the multi-seat configuration tool according to Udev rules after the management user logs in. The application window permissions are the permissions configured by the multi-seat configuration tool to operate specific application windows for each second seat according to the permission configuration instructions sent by the management user. The management user is the user of the input device corresponding to the first seat of the operating host.

[0070] Management module 404 is used to manage application windows based on the binding relationship and the application permissions.

[0071] Optionally, the receiving module 402 includes: a first receiving submodule, used to receive the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool; a cursor creation submodule, used to create the same number of cursors as the second seat according to the binding relationship; and a second receiving submodule, used to receive application window permissions sent by the multi-seat configuration tool after the multi-seat configuration tool determines that the window manager has created cursors for the second seat.

[0072] Optionally, the management module 404 includes: an input event receiving submodule, configured to receive an input event occurring on a new input device corresponding to the second seat, the input event including a target seat identifier, a target application window identifier, and input content; and a judgment submodule, configured to determine, based on the binding relationship and the application window permissions, whether the second seat represented by the target seat identifier has permission to operate the target application window corresponding to the target application window identifier; the judgment module includes: a first processing submodule, configured to forward the input content to the target application window when it is determined that permission is granted; and a second processing submodule, configured to not forward the input content to the target application window when it is determined that permission is not granted.

[0073] Optionally, the first processing submodule is further configured to forward the input content to a graphics frame, and then forward the input content to the target application window through the graphics frame.

[0074] Optionally, the receiving module 402 is further configured to receive the changed application window permissions sent by the multi-seat configuration tool when the multi-seat configuration tool dynamically detects that the application window permissions of the second seat have changed.

[0075] Figure 5 This is a schematic diagram illustrating a multi-seat collaborative text editor according to a specific embodiment of the present disclosure.

[0076] See Figure 5 Text editors allow multiple users to edit simultaneously from any location within the same document. Using Qt as an example, the user manager configures the text editor's application window permissions for users 1 and 2 (corresponding to the second user) using a multi-user configuration tool. The text editor receives the user's user binding relationship from Qt and obtains the keyboard and mouse bindings based on the second user's application window permissions. It then creates a corresponding number of input cursors based on the number of user bindings to the text editor (in this case, two input cursors are created) and binds them to the user's user with the configured text editor application window permissions. This allows each user to manipulate the input cursor to the desired text input location, enabling multiple users to input simultaneously without interference.

[0077] This disclosure primarily addresses the technical effect of enabling multiple users to simultaneously edit a text editor by differentiating specific input device information in scenarios where multiple users are bound to a single application window. This functionality can be applied in many scenarios, including education, multimedia, and gaming. For example, in schools or training institutions, teachers can use this function to allow students to use the same computer simultaneously for learning and practice. Each student can have their own keyboard and mouse for input, without interference, effectively improving student learning efficiency and engagement. Furthermore, teachers can use this method to better manage the classroom and monitor students' learning progress.

[0078] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.

[0079] Reference Figure 6 The electronic device 600 includes at least one memory 602 and at least one processor 604. The at least one memory 602 stores instructions that, when executed by the at least one processor 604, perform a method based on a shared host of multiple input devices according to an exemplary embodiment of the present disclosure.

[0080] As an example, electronic device 600 may be a PC, tablet, personal digital assistant, smartphone, or other device capable of executing the aforementioned instructions. Here, electronic device 600 is not necessarily a single electronic device, but may be a collection of any devices or circuits capable of executing the aforementioned instructions (or instruction sets) individually or in combination. Electronic device 600 may also be part of an integrated control system or system manager, or may be configured to interconnect with a portable electronic device locally or remotely (e.g., via wireless transmission) through an interface.

[0081] In electronic device 600, processor 604 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, processor may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, etc.

[0082] The processor 604 can execute instructions or code stored in the memory 602, which can also store data. Instructions and data can also be sent and received over a network via a network interface device, which can employ any known transmission protocol.

[0083] The memory 602 may be integrated with the processor 604, for example, by placing RAM or flash memory within an integrated circuit microprocessor. Alternatively, the memory 602 may include a separate device, such as an external disk drive, a storage array, or other storage device that can be used by any database system. The memory 602 and the processor 604 may be operatively coupled, or may communicate with each other, for example, via I / O ports, network connections, etc., enabling the processor 604 to read files stored in the memory.

[0084] In addition, the electronic device 600 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device 600 can be interconnected via a bus and / or network.

[0085] According to exemplary embodiments of this disclosure, a computer-readable storage medium may also be provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the aforementioned method based on multiple input devices sharing a host. Examples of computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc storage, hard disk drive (HDD), solid-state drive (SSD), card storage (such as multimedia cards, secure digital (SD) cards, or ultra-fast digital (XD) cards), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid-state drive, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and to provide the computer program and any associated data, data files, and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the aforementioned computer-readable storage medium can run in an environment deployed in computer devices such as clients, hosts, agent devices, servers, etc. Furthermore, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system, such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner through one or more processors or computers.

[0086] According to exemplary embodiments of the present disclosure, a computer program product may also be provided, including a computer program that, when executed by a processor, implements the method of sharing a host based on multiple input devices according to the present disclosure.

[0087] While some exemplary embodiments of this disclosure have been shown and described, those skilled in the art will understand that modifications may be made to these embodiments without departing from the scope and spirit of this disclosure as defined by the claims and their equivalents.

[0088] The above-described apparatus embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The apparatus embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0089] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for sharing a host based on multiple input devices, characterized in that, The method is applied to a multi-seat configuration tool, and the method includes: After the management user logs into the multi-seat configuration tool, a second seat is created according to the Udev rules, with the same number of new input devices as the management user. The management user is the user whose input device corresponds to the first seat of the operating host. According to the binding instruction sent by the management user, the second seat is bound to the new input device one by one, wherein the user operating the input device corresponding to the second seat is a regular user; Configure application window permissions for each ordinary user according to the permission configuration instructions sent by the management user; The binding relationship between the second seat and the new input device, along with the application window permissions, are sent to the window manager so that the window manager can manage the application window based on the binding relationship and the application window permissions.

2. The method according to claim 1, characterized in that, Based on the permission configuration instructions sent by the management user, configure application window permissions for each of the ordinary users, including: In response to the window manager creating the same number of cursors as the second seat, and according to the permission configuration instruction sent by the management user, the application window permissions are configured for the ordinary user corresponding to the second seat.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Dynamically detect changes in application window permissions configured for the ordinary user; When a change in the application window permissions of a regular user is detected, the changed application window permissions are sent to the window manager.

4. A method for sharing a host based on multiple input devices, characterized in that, The method is applied to a window manager, and the method includes: The system receives the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool. The new input device is a newly connected input device based on the input device corresponding to the first seat of the operating host. The second seat is the same number of seats created by the multi-seat configuration tool according to Udev rules after the management user logs in. The application window permissions are the permissions configured by the multi-seat configuration tool to operate specific application windows for each second seat according to the permission configuration instructions sent by the management user. The management user is the user of the input device corresponding to the first seat of the operating host. Manage application windows based on the binding relationship and application window permissions.

5. The method according to claim 4, characterized in that, Receive the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool, including: Receive the binding relationship between the second seat and the new input device sent by the multi-seat configuration tool; Create the same number of cursors as the second seat based on the binding relationship; After the multi-seat configuration tool determines that the window manager has created a cursor for the second seat, it receives the application window permissions sent by the multi-seat configuration tool.

6. The method according to claim 4, characterized in that, Managing application windows based on the binding relationship and application window permissions includes: Receive an input event from the new input device corresponding to the second seat, the input event including the target seat identifier, the target application window identifier, and the input content; Based on the binding relationship and the application window permissions, determine whether the second seat represented by the target seat identifier has the permission to operate the target application window corresponding to the target application window identifier; When permission is granted, the input content is forwarded to the target application window; If it is determined that there is no permission, the input content will not be forwarded to the target application window.

7. The method according to claim 6, characterized in that, Forwarding the input content to the target application window includes: The input content is forwarded to the graphics frame, and then forwarded to the target application window through the graphics frame.

8. The method according to any one of claims 4-7, characterized in that, The method further includes: When the multi-seat configuration tool dynamically detects a change in the application window permissions of the second seat, it receives the changed application window permissions sent by the multi-seat configuration tool.

9. A device for sharing a host computer based on multiple input devices, characterized in that, The device is used in a multi-seat configuration tool, and the device includes: The create seat module is used to create a second seat with the same number of new input devices according to Udev rules after the management user logs in to the multi-seat configuration tool. The management user is the user of the input device corresponding to the first seat of the operating host. The seat binding module is used to bind the second seat to the new input device one by one according to the binding instruction sent by the management user, wherein the user operating the input device corresponding to the second seat is a regular user; The permission configuration module is used to configure application window permissions for each ordinary user according to the permission configuration instructions sent by the management user; The sending module is used to send the binding relationship between the second seat and the new input device and the application window permissions to the window manager, so that the window manager can manage the application window according to the binding relationship and the application window permissions.

10. An apparatus for sharing a host based on multiple input devices, characterized in that, The device is used in a window manager, and the device includes: The receiving module is used to receive the binding relationship between the second seat and the new input device and the application window permissions sent by the multi-seat configuration tool. The new input device is a newly connected input device based on the input device corresponding to the first seat of the operating host. The second seat is the number of seats created by the multi-seat configuration tool according to Udev rules after the management user logs in. The application window permissions are the permissions configured by the multi-seat configuration tool to operate specific application windows for each second seat according to the permission configuration instructions sent by the management user. The management user is the user of the input device corresponding to the first seat of the operating host. The management module is used to manage application windows based on the binding relationship and the application permissions.

11. An electronic device, characterized in that, include: At least one processor; At least one memory that stores computer-executable instructions. The computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the method based on a shared host of multiple input devices as described in any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor causes the at least one processor to perform the method based on a shared host of multiple input devices as described in any one of claims 1 to 8.

13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by at least one processor, they cause the at least one processor to perform the method based on a shared host of multiple input devices as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Method, system and equipment for limiting mouse operation in multi-seat desktop environment

    CN121300665A

  • Mouse operation limiting method, system and device under multi-seat desktop environment

    CN121300665B

  • Seat event filtering method, system and equipment in multi-seat desktop environment

    CN121300960A

  • Seat event filtering method, system and device under multi-seat desktop environment

    CN121300960B