Method and device for realizing multiple opening of x86 cloud application desktop
By creating virtual input devices and monitors on the x86 server and injecting proxy modules to achieve process space isolation, the performance bottlenecks and compatibility problems in the parallel operation of multi-user in x86 cloud applications are solved, and an efficient and stable multi-user operating environment and high compatibility are achieved.
Patent Information
- Application Number
- CN202411823550.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-12
AI Technical Summary
When the prior art realizes multi-user parallel operation of x86 cloud applications, there are performance bottlenecks and compatibility issues, which cannot meet high performance and stability requirements.
By creating at least two Windows system users, creating virtual input devices and virtual monitors, and injecting proxy modules into cloud applications to achieve process space isolation, ensuring that each cloud application has an independent operating environment.
It realizes an efficient and stable multi-user parallel operation environment on the same x86 server, ensuring high compatibility and stability of multiple x86 cloud applications.
Smart Images

Figure CN119292792B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud applications, and in particular to a method and device for implementing multiple openings of x86 cloud application desktops. Background Art
[0002] Cloud applications (such as cloud games) are an emerging online application model that places application rendering, processing, and running processes on remote cloud servers and transmits application screens to user devices, allowing users to enjoy high-quality application experience on various devices without the need for high-performance hardware support.
[0003] Currently, cloud applications usually run on ARM platforms or x86 platforms. Cloud applications running on the x86 platform (hereinafter referred to as x86 cloud applications) are host applications, which have the characteristics of exquisite pictures, smooth animations and complex operations. At present, multiple cloud applications can be run on a physical server through traditional GPU multi-opening solutions. There are two main traditional GPU multi-opening solutions: one is based on virtualization technology, such as Hyper-V or VMware, and the other is based on process virtualization technology, such as Sandboxie. The GPU multi-opening solution based on virtualization technology creates multiple virtual machines on a physical server, each of which has independent resources and operating systems, so that x86 cloud applications can run in virtual machines. However, the performance loss caused by virtualization technology and excessive sharing of hardware resources in this solution will limit the application performance and cannot meet the needs of high-performance x86 cloud applications. Although the GPU multi-opening solution based on process virtualization technology can provide lightweight resource isolation by isolating the processes of different applications to avoid mutual interference, it is prone to compatibility issues when processing multiple x86 cloud applications due to process space sharing, and cannot support stable multi-user parallel operations. It can be seen that although these two solutions have their own advantages, there are still certain limitations in performance and compatibility.
[0004] In view of this, how to provide a multi-user environment solution suitable for x86 cloud applications to solve the performance bottleneck and compatibility issues in traditional GPU multi-opening solutions, provide an efficient and stable multi-user parallel operation environment, and ensure the high compatibility and stability of multiple x86 cloud applications has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the technical problems existing in the prior art, the embodiments of the present application provide a method and device for realizing multiple openings of x86 cloud application desktops.
[0006] In a first aspect, an embodiment of the present application provides a method for implementing multiple openings of an x86 cloud application desktop, which is applied to an x86 server, including:
[0007] Creating at least two Windows system users, creating a virtual input device and a virtual display, allocating the virtual input device and the virtual display to the Windows system users, and binding the Windows system users to a designated workstation;
[0008] After a Windows system user logs in, when starting a cloud application, the proxy module is injected into the cloud application, wherein the proxy module is used to isolate the process space of the cloud application.
[0009] In a second aspect, the embodiment of the present application further provides a device for implementing multiple openings of an x86 cloud application desktop, which is applied to an x86 server and includes:
[0010] A creation unit, used to create at least two Windows system users, create a virtual input device and a virtual display, allocate the virtual input device and the virtual display to the Windows system users, and bind the Windows system users to a designated workstation;
[0011] The injection unit is used to inject the proxy module into the cloud application when the cloud application is started after the Windows system user logs in, wherein the proxy module is used to isolate the process space of the cloud application.
[0012] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for implementing multiple openings of x86 cloud application desktops as described in the first aspect are executed.
[0013] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method for implementing multiple openings of x86 cloud application desktops as described in the first aspect.
[0014] In summary, the method and device, electronic device and storage medium for realizing multiple openings of x86 cloud application desktops provided by the embodiments of the present application, first, create at least two Windows system users, create a virtual input device and a virtual display, allocate the virtual input device and the virtual display to the Windows system user, and bind the Windows system user to a designated workstation. In this way, an environment for independent operation on the same x86 server can be provided for multiple Windows system users, providing independent and efficient operation experience for multiple Windows system users; secondly, after the Windows system user logs in, when the cloud application is started, the proxy module is injected into the cloud application. In this way, an independent process space can be provided for each cloud application, ensuring that the cloud application can run independently and stably. Through this solution, an efficient and stable multi-user parallel operation environment can be provided, and the high compatibility and stability of the operation of multiple x86 cloud applications can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of an embodiment of a method for implementing multiple openings of x86 cloud application desktops provided in an embodiment of the present application;
[0016] Figure 2 A structural diagram of an embodiment of a device for implementing multiple openings of x86 cloud application desktops provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0019] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0020] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0021] Reference Figure 1 As shown, an embodiment of the present application provides a flow chart of a method for implementing multiple openings of an x86 cloud application desktop, the method being applied to an x86 server (the server being a cloud server running a cloud application), comprising:
[0022] S10, creating at least two Windows system users, creating a virtual input device and a virtual display, allocating the virtual input device and the virtual display to the Windows system users, and binding the Windows system users to a designated workstation;
[0023] In this embodiment, it should be noted that a virtual input device (including a virtual mouse, a virtual keyboard, a virtual handle, etc.) can be created through a virtual HID (Human Interface Device) driver, a virtual display can be created through an open source display driver IDD (Indirect Display Driver), and virtual input devices and virtual displays can be allocated to Windows system users through MPS (Windows MultiPointServices) technology, as well as Windows system users can be bound to designated workstations. MPS technology is used to provide an independent desktop environment, each desktop represents a session space, and cloud application processes of different Windows system users are allocated in different session spaces, so they can be isolated. By initializing the content of the system multi-user environment in step S10, the isolation of operating system sessions and hardware resources of multiple Windows system users can be achieved, ensuring that each Windows system user can obtain an independent operating experience.
[0024] S11. After a Windows system user logs in and starts a cloud application, a proxy module is injected into the cloud application, wherein the proxy module is used to isolate the process space of the cloud application.
[0025] In this embodiment, it should be noted that the proxy module can be injected into the cloud application through the CreateRemteThread method. Generally, only one cloud application can be started on an x86 server, and the proxy module can be used to isolate the cloud application process, so that the cloud application cannot perceive the existence of other cloud applications, so that multiple processes can be started for a certain cloud application, such as running multiple cloud games XXX on an x86 server at the same time.
[0026] In addition, in order to ensure that multiple users can get a smooth user experience when using cloud applications, you can start the resource monitoring service in the x86 server to continuously track the resource usage (CPU, memory, GPU occupancy) of each cloud application, and use the SetPrcessAffinityMask function to dynamically adjust the number of CPU cores bound to the processes of each cloud application according to the resource usage of each cloud application, so as to ensure that more computing resources are allocated to the tasks of the cloud application first. In addition, you can also adjust the hardware resources of each cloud application in real time by calling the driver interface to set the maximum rendering frame rate threshold of the cloud application, dynamically adjust the video memory allocation and rendering priority of each cloud application, and switch the system's power plan to high-performance mode, etc., to ensure efficient use of resources and optimize the performance of cloud applications.
[0027] The method for realizing multiple openings of x86 cloud application desktops provided in the embodiment of the present application is as follows: first, at least two Windows system users are created, a virtual input device and a virtual display are created, the virtual input device and the virtual display are allocated to the Windows system users, and the Windows system users are bound to a designated workstation. In this way, an environment for independent operation on the same x86 server can be provided for multiple Windows system users, providing independent and efficient operation experience for multiple Windows system users; secondly, after the Windows system user logs in, when the cloud application is started, the proxy module is injected into the cloud application. In this way, an independent process space can be provided for each cloud application, ensuring that the cloud application can run independently and stably. Through this solution, an efficient and stable multi-user parallel operation environment can be provided, and the high compatibility and stability of the operation of multiple x86 cloud applications can be guaranteed.
[0028] Based on the foregoing method embodiment, the method may further include:
[0029] The proxy module intercepts and modifies the global mutex that the cloud application is going to write into the system into a target global mutex, wherein the target global mutex includes a session identifier corresponding to the cloud application; and / or
[0030] The proxy module intercepts and modifies the window information that the cloud application is going to write into the system into target window information, wherein the target window information includes a session identifier corresponding to the cloud application; and / or
[0031] The proxy module intercepts and modifies the pipeline information that the cloud application is going to write into the system into the target pipeline information, wherein the target pipeline information includes the session identifier corresponding to the cloud application; and / or
[0032] The proxy module intercepts and modifies the event information that the cloud application is about to write into the system into target event information, wherein the target event information includes a session identifier corresponding to the cloud application; and / or
[0033] The proxy module intercepts and modifies the job information that the cloud application is going to write into the system into target job information, wherein the target job information includes a session identifier corresponding to the cloud application.
[0034] The processing in this embodiment specifically intercepts and modifies the objects of the cloud application that are not affected by the session space. The objects that are not affected by the session space include at least one of the global mutex, window information, pipe information, event information, and job information. It should be noted that the proxy module intercepts and modifies the global mutex that the cloud application wants to write to the system into a target global mutex, which may include: the proxy module modifies the global mutex passed in when the cloud application calls the system API (Application Programming Interface) into a target global mutex, and the target global mutex contains the session identifier corresponding to the cloud application. In this way, when the same cloud application is started again, the target global mutex is obtained, thereby realizing multi-way startup of the same cloud application. In addition, it should be noted that, assuming that the proxy module intercepts and modifies the global mutex Global\XXX\mutex that the cloud application XXX wants to write to the system to the target global mutex Global\XXX\mutex_session1, then when the cloud application XXX queries the global mutex Global\XXX\mutex again, the proxy module will also modify the global mutex Global\XXX\mutex that the cloud application XXX wants to query to the target global mutex Global\XXX\mutex_session1. In this way, the cloud application XXX can obtain the result that the global mutex Global\XXX\mutex to be queried exists.
[0035] The interception and processing process of the proxy module for the window information / pipeline information / event information / job information that the cloud application wants to write into the system is consistent with the interception and processing process of the proxy module for the global mutex that the cloud application wants to write into the system, which will not be repeated here. By intercepting and processing these information, the process space of the cloud application can be isolated.
[0036] Based on the foregoing method embodiment, the method may further include:
[0037] When the cloud application obtains the specified hardware information, the proxy module modifies the hardware information returned by the system to the cloud application into the corresponding virtual hardware information.
[0038] In this embodiment, it should be noted that during the startup / running process of the cloud application, the specified hardware information of the running device is often obtained. In order to realize multiple cloud applications (i.e., running multiple cloud applications of the same type on an x86 server at the same time), it is necessary to return the corresponding virtual hardware information to the cloud application when the cloud application obtains the specified hardware information. For example, when the cloud application requests to obtain the MAC address (Media Access Control Address), the virtual MAC address is returned to the cloud application; when the cloud application requests to obtain the hard disk serial number, the virtual hard disk serial number is returned to the cloud application. When the same user (referring to the user of the cloud application, not the Windows system user) uses the same cloud application, the corresponding virtual hardware information returned to the cloud application is fixed. For example, when user A uses cloud application W on x86 server S1, when cloud application W requests to obtain the MAC address, the virtual MAC address D is returned to cloud application W. Then, when user A uses cloud application W on x86 server S2, when cloud application W requests to obtain the MAC address, the virtual MAC address D is still returned to cloud application W.
[0039] Based on the foregoing method embodiment, the method may further include:
[0040] The proxy module intercepts and modifies the command for killing the cloud application process into a command for killing the process of the exited cloud application.
[0041] In this embodiment, it should be noted that when a user who uses a cloud application exits a cloud application, the process of the cloud application needs to be killed. In order to avoid killing other processes of the same cloud application that have not been exited, the command to kill the cloud application process needs to be intercepted and modified into a command to kill the exited cloud application process through a proxy module. For example, the command taskkill / f / imgame.exe is intercepted and modified into the command taskkill / f / fi "SESSION eq sessionid" / im game.exe. In this way, only the exited cloud application process will be killed, wherein the command to kill the exited cloud application process includes the session identifier corresponding to the exited cloud application.
[0042] Based on the foregoing method embodiment, the method may further include:
[0043] Isolate the network traffic of different Windows system users through virtual network cards or network namespace technology.
[0044] In this embodiment, it should be noted that different virtual network cards can be created for different Windows system users, and network requests and data of different Windows system users can be forwarded through virtual network cards to achieve network isolation of different Windows system users; or different network environments can be isolated for different Windows system users through network namespace technology to ensure that the network traffic of different Windows system users does not interfere with each other.
[0045] Reference Figure 2 As shown, it is a structural schematic diagram of a device for implementing multiple openings of x86 cloud application desktops provided by an embodiment of the present application, and the device is applied to an x86 server, including:
[0046] A creation unit 20, configured to create at least two Windows system users, create a virtual input device and a virtual display, allocate the virtual input device and the virtual display to the Windows system users, and bind the Windows system users to a designated workstation;
[0047] The injection unit 21 is used to inject the proxy module into the cloud application when the cloud application is started after the Windows system user logs in, wherein the proxy module is used to isolate the process space of the cloud application.
[0048] The device for realizing multiple openings of x86 cloud application desktops provided in the embodiment of the present application firstly creates at least two Windows system users, creates a virtual input device and a virtual display, allocates the virtual input device and the virtual display to the Windows system users, and binds the Windows system users to the designated workstations. In this way, an environment for independent operation on the same x86 server can be provided for multiple Windows system users, providing independent and efficient operation experience for multiple Windows system users. Secondly, after the Windows system user logs in, when the cloud application is started, the proxy module is injected into the cloud application. In this way, an independent process space can be provided for each cloud application, ensuring that the cloud application can run independently and stably. Through this solution, an efficient and stable multi-user parallel operation environment can be provided, and the high compatibility and stability of the operation of multiple x86 cloud applications can be guaranteed.
[0049] Based on the above device embodiment, the proxy module can be used to:
[0050] Intercept and modify the global mutex that the cloud application is going to write into the system into a target global mutex, wherein the target global mutex contains a session identifier corresponding to the cloud application; and / or
[0051] Intercept and modify the window information that the cloud application is about to write into the system into target window information, wherein the target window information includes a session identifier corresponding to the cloud application; and / or
[0052] Intercept and modify the pipeline information that the cloud application is going to write into the system into target pipeline information, wherein the target pipeline information includes a session identifier corresponding to the cloud application; and / or
[0053] Intercept and modify the event information that the cloud application is about to write into the system into target event information, wherein the target event information includes a session identifier corresponding to the cloud application; and / or
[0054] The job information that the cloud application is going to write into the system is intercepted and modified into target job information, wherein the target job information includes a session identifier corresponding to the cloud application.
[0055] Based on the above device embodiment, the proxy module can also be used for:
[0056] When the cloud application obtains the specified hardware information, the hardware information returned by the modification system to the cloud application is the corresponding virtual hardware information.
[0057] Based on the aforementioned device embodiment, when the same user uses the same cloud application, the corresponding virtual hardware information is a fixed value.
[0058] Based on the above device embodiment, the proxy module can also be used for:
[0059] The command to kill the cloud application process is intercepted and modified to a command to kill the process of the exited cloud application.
[0060] The device for implementing multiple openings of x86 cloud application desktops provided in the embodiment of the present application has an implementation process that is consistent with the method for implementing multiple openings of x86 cloud application desktops provided in the embodiment of the present application, and the effect that can be achieved is also the same as the method for implementing multiple openings of x86 cloud application desktops provided in the embodiment of the present application, and will not be repeated here.
[0061] like Figure 3 As shown, an electronic device provided by an embodiment of the present application includes: a processor 30, a memory 31 and a bus 32, wherein the memory 31 stores machine-readable instructions executable by the processor 30, and when the electronic device is running, the processor 30 communicates with the memory 31 through the bus 32, and the processor 30 executes the machine-readable instructions to perform the steps of the method for implementing multiple openings of x86 cloud application desktops as described above.
[0062] Specifically, the above-mentioned memory 31 and processor 30 can be general-purpose memory and processor, which are not specifically limited here. When the processor 30 runs the computer program stored in the memory 31, it can execute the above-mentioned method for realizing multiple openings of x86 cloud application desktops.
[0063] Corresponding to the above-mentioned method for implementing multiple openings of x86 cloud application desktops, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for implementing multiple openings of x86 cloud application desktops are executed.
[0064] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for implementing multiple openings of x86 cloud application desktops, characterized in that: Applicable to x86 servers, including: Creating at least two Windows system users, creating a virtual input device and a virtual display, allocating the virtual input device and the virtual display to the Windows system users, and binding the Windows system users to a designated workstation; After the Windows system user logs in, when the cloud application is started, the proxy module is injected into the cloud application, wherein the proxy module is used to isolate the process space of the cloud application; The proxy module is used to isolate the process space of cloud applications, including: The proxy module intercepts and modifies the global mutex that the cloud application is going to write into the system into a target global mutex, wherein the target global mutex includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the window information that the cloud application is going to write into the system into target window information, wherein the target window information includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the pipeline information that the cloud application is going to write into the system into the target pipeline information, wherein the target pipeline information includes the session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the event information that the cloud application is about to write into the system into target event information, wherein the target event information includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the job information that the cloud application is going to write into the system into target job information, wherein the target job information includes a session identifier corresponding to the cloud application.
2. The method according to claim 1, characterized in that Also includes: When the cloud application obtains the specified hardware information, the proxy module modifies the hardware information returned by the system to the cloud application into the corresponding virtual hardware information.
3. The method according to claim 2, characterized in that When the same user uses the same cloud application, the corresponding virtual hardware information is a fixed value.
4. The method according to claim 1, characterized in that Also includes: The proxy module intercepts and modifies the command for killing the cloud application process into a command for killing the process of the exited cloud application.
5. A device for implementing multiple openings of x86 cloud application desktops, characterized in that: Applicable to x86 servers, including: A creation unit, used to create at least two Windows system users, create a virtual input device and a virtual display, allocate the virtual input device and the virtual display to the Windows system users, and bind the Windows system users to a designated workstation; The injection unit is used to inject the proxy module into the cloud application when the cloud application is started after the Windows system user logs in, wherein the proxy module is used to isolate the process space of the cloud application; The proxy module is used to isolate the process space of cloud applications, including: The proxy module intercepts and modifies the global mutex that the cloud application is going to write into the system into a target global mutex, wherein the target global mutex includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the window information that the cloud application is going to write into the system into target window information, wherein the target window information includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the pipeline information that the cloud application is going to write into the system into the target pipeline information, wherein the target pipeline information includes the session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the event information that the cloud application is about to write into the system into target event information, wherein the target event information includes a session identifier corresponding to the cloud application; and / or The proxy module intercepts and modifies the job information that the cloud application is going to write into the system into target job information, wherein the target job information includes a session identifier corresponding to the cloud application.
6. The device according to claim 5, characterized in that The proxy module is also used to: When the cloud application obtains the specified hardware information, the hardware information returned by the modification system to the cloud application is the corresponding virtual hardware information.
7. The device according to claim 6, characterized in that When the same user uses the same cloud application, the corresponding virtual hardware information is a fixed value.
8. The device according to claim 5, characterized in that The proxy module is also used to: The command to kill the cloud application process is intercepted and modified to a command to kill the process of the exited cloud application.
Citation Information
Patent Citations
Cloud application implementation method and device, electronic equipment and readable storage medium
CN113079216A
Streaming method, system and device for multi-open cloud game and medium
CN114598931A