Cloud application multiple opening method and device
By spoofing session IDs and creating virtual channels within containers, the performance degradation and detection issues of running multiple cloud applications on cloud servers are resolved, enabling efficient and stable multi-instance operation of cloud applications.
Patent Information
- Application Number
- CN202511443304.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing technologies suffer from significant performance degradation and are easily detected by anti-fraud systems when running multiple independent cloud applications simultaneously on x86-based cloud servers.
By registering hook functionality with the system when starting in the container, spoofing the session ID and creating a virtual channel, the RDP service is successfully started, capturing and encoding cloud application screens into video streams for transmission, and then decoding and displaying them on the user's end.
It enables the efficient running of multiple independent cloud applications on the x86 architecture with minimal performance loss and is not easily detected by anti-fraud systems, providing a stable solution for running multiple cloud applications simultaneously.
Smart Images

Figure CN120892139B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud computing, and particularly relates to a cloud application multi-opening method and device. BACKGROUND
[0002] Currently, if multiple independent applications (i.e., cloud application multi-opening) are to be run simultaneously on an X86 architecture cloud server, there are mainly two technologies:
[0003] 1. System virtualization, which uses software such as Microsoft's Hyper-V or VMware's VMware to simulate multiple complete virtual computers (i.e., virtual machines) on a physical cloud server, each virtual machine having its own operating system and CPU, memory, hard disk, and other hardware. Applications run in virtual machines, and the isolation between virtual machines is very good, but since the computer hardware is simulated, a lot of additional computing resources are required, which can cause application performance to decline, especially in game scenarios that require high GPU performance.
[0004] 2. Process virtualization, which uses software such as Sandboxie to create an isolated "sandbox" environment for each application program within the same operating system. The application program runs in the sandbox and believes that it can access all system resources, but in fact it is limited to a "fence". This technology has the advantage of being lightweight, with little performance loss, and is suitable for single-player games, but it is easily detected by network game anti-cheat systems and then prevented from running network games.
[0005] Therefore, how to provide a cloud application multi-opening solution with little performance loss and not easily detected by anti-cheat systems has become a technical problem to be solved. SUMMARY
[0006] To solve the technical problems in the prior art, the embodiments of the present application provide a cloud application multi-opening method and device.
[0007] In a first aspect, the embodiments of the present application provide a cloud application multi-opening method, comprising:
[0008] When the first module starts, a hook function for a query session function, an enumeration session function and a channel establishment function in a termsrv.dll file is registered to the system, so that when the query session function, the enumeration session function and the channel establishment function are called in a process in which the rdp service in the container where the first module is located starts after the first module starts, the execution flow of the program jumps into a first replacement function, a second replacement function and a third replacement function of the first module respectively, wherein the first replacement function is used to return session information, the session information includes a non-0 false session ID, the second replacement function is used to return session list information, the session list information includes the non-0 false session ID returned by the first replacement function and a session ID generated by the rdp service, and the third replacement function is used to create an independent virtual channel for the container where the first module is located.
[0009] After the cloud application in the container where the first module is located starts, the rdp service captures a cloud application picture rendered by the cloud application, encodes the cloud application picture into a video stream, and transmits the video stream to the client of the remote user through the virtual channel.
[0010] In a second aspect, the embodiments of the present application further provide a cloud application multi-opening device, which comprises:
[0011] a first module and an rdp service deployed in each container of a cloud server; wherein
[0012] the first module is configured to register a hook function for a query session function, an enumeration session function and a channel establishment function in a termsrv.dll file to the system when the first module starts, so that when the query session function, the enumeration session function and the channel establishment function are called in a process in which the rdp service in the container where the first module is located starts after the first module starts, the execution flow of the program jumps into a first replacement function, a second replacement function and a third replacement function of the first module respectively, wherein the first replacement function is used to return session information, the session information includes a non-0 false session ID, the second replacement function is used to return session list information, the session list information includes the non-0 false session ID returned by the first replacement function and a session ID generated by the rdp service, and the third replacement function is used to create an independent virtual channel for the container where the first module is located;
[0013] the rdp service is configured to capture a cloud application picture rendered by a cloud application in the container where the first module is located after the cloud application starts, encode the cloud application picture into a video stream, and transmit the video stream to the client of the remote user through the virtual channel.
[0014] The cloud application multi-opening method and device provided by the embodiment of the present application, when the first module in the container is started, the hook function for the query session function and the enumeration session function in the termsrv.dll file is registered to the system, so that the rdp service in the container can smoothly pass through the session ID detection logic in the process of starting, and successfully create a desktop environment supporting graphics, the cloud application runs in this desktop environment, can normally use GPU for picture rendering, finally, the picture rendered by the cloud application is captured by the rdp service, encoded into a video stream, and then transmitted to the client of the remote user through the virtual channel, the client receives the video stream and decodes it, and the user can see the cloud application picture. Compared with the system virtualization technology and the process virtualization technology, the present solution does not have the hardware virtualization overhead of the system virtualization technology, and does not have the large modification of the cloud application logic through the hook API of the process virtualization technology, so the performance loss is smaller, and it is not easy to be detected by the anti-cheating system. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 The flowchart of an embodiment of a cloud application multi-opening method provided by the embodiment of the present application;
[0016] Figure 2 The structure diagram of an embodiment of a cloud application multi-opening device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0017] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to 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 description and illustration, and do not limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportion. The flowchart 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 in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or removed from the flowchart under the guidance of the content of the present application.
[0018] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different 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 claimed present application, but only represents 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 creative labor are within the scope of protection of the present application.
[0019] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features that follow, but not to exclude the presence of other features.
[0020] Session 0 is a system service session, and for security and stability, Microsoft removes the graphics driver and UI support of the Session 0 session (referred to as "Headless" headless mode). The container runs in the Session 0 session, so when the graphical application (hereinafter referred to as "application") runs in the container, the call to the graphics API will fail, so that the application cannot be rendered in the container, and thus cannot run in the container. In order to make the application run successfully in the container, it is necessary to create a graphical environment in the container that can normally run the application, so the present scheme introduces the rdp (Remote Desktop Protocol) service. But because the rdp service starts, its core component (such as termsrv.dll) will perform strict self-checking, and once it detects that it is in the Session 0 session, it will actively refuse to start or cannot correctly create a user interactive session, thus cannot start in the Session 0 session, and the container runs in the Session 0 session, so the rdp service cannot start in the container.
[0021] Therefore, the present application uses hook technology to successfully start the rdp service in the container. After the rdp service is successfully started, it creates a new desktop environment that supports complete graphics display. The application runs in this environment, and all graphics calls are successful, so it can normally use the GPU for picture rendering. Finally, the picture rendered by the application is captured by the rdp service, encoded into a video stream, and transmitted to the client of the remote user. The client receives the video stream and decodes it, and the user can see the application picture. The user's operation (such as operation on the keyboard, mouse, etc.) is transmitted to the application in the container. In this way, a complete interactive cloud application experience is achieved, that is, cloud application multi-opening is achieved on an X86 architecture cloud server.
[0022] Specifically, referring to FIG. 1, a flowchart of a cloud application multi-opening method provided by an embodiment of the present application is shown. The cloud application multi-opening method comprises the following steps. Figure 1
[0023] S10, when the first module is started, register the hook function for the query session function, the enumeration session function and the establish channel function in the termsrv.dll file to the system, so that when the query session function, the enumeration session function and the establish channel function are called in the process of starting the rdp service in the container where the first module is located after the first module is started, the execution flow of the program jumps into the first replacement function, the second replacement function and the third replacement function of the first module respectively, wherein the first replacement function is used to return session information, the session information contains a non-zero false session ID, the second replacement function is used to return session list information, the session list information contains the non-zero false session ID returned by the first replacement function and the session ID generated by the rdp service, and the third replacement function is used to create an independent virtual channel for the container where the first module is located;
[0024] S11, after the cloud application in the container where the first module is located is started, the cloud application picture rendered by the cloud application is captured through the rdp service, the cloud application picture is encoded into a video stream, and the video stream is transmitted to the client of the remote user through the virtual channel.
[0025] It should be noted that the embodiment can deploy multiple containers on the X86 architecture cloud server, and the first module and the rdp service are deployed in each container. The container is started first, then the first module is started, and finally the rdp service is started.
[0026] During the startup of the container, the container engine can be used to limit the CPU resources that the container can use (such as limiting the container to use at most the computing power of 4 CPU cores), so as to avoid the contention of CPU resources by multiple containers, and to realize the isolation and fair distribution of CPU. The container engine can also be used to limit the memory resources that the container can use (such as limiting the container to use at most 6 GB of physical memory), so as to accurately control the memory usage of each container and prevent a cloud application from consuming all the memory and causing the cloud server to crash.
[0027] During the startup of the container, the container engine can be used to bind and mount the pre-installed directory on the cloud server to the container. After the container is started, the OverlayFS file system can be used in the container, so that the same cloud application in different containers of the cloud server shares the cloud application data under the pre-installed directory, thereby saving the storage space of the cloud server, wherein the data generated after the installation of the cloud application is stored in the pre-installed directory.
[0028] In the process of starting the container, the network used by the container can be configured by the container engine. Specifically, at the time of starting the container, a custom virtual network can be created by the container engine, the container can be added to the custom virtual network, and port mapping can be set for the cloud server and the container. In this way, after the user manipulates the data to a specific port of the cloud server, it will be forwarded to a specific port of a specific container. The cloud application picture rendered by the cloud application will be forwarded to a specific port of the cloud server through a specific port of the container, and then transmitted to the user.
[0029] When the first module starts, the hook function for the query session function, the enumeration session function and the channel establishment function in the termsrv.dll file is registered to the system, that is, the entry address of the query session function, the enumeration session function and the channel establishment function is replaced by the address of the first replacement function, the second replacement function and the third replacement function of the first module respectively, so that when any subsequent program (including the rdp service and the cloud application) calls the query session function, the enumeration session function and the channel establishment function, the execution flow of the program jumps into the first replacement function, the second replacement function and the third replacement function respectively. The rdp service calls the query session function and the enumeration session function in turn during the starting process. When the rdp service calls the query session function, the first replacement function intercepts the call and returns session information containing a false session ID of non-0. When the rdp service performs session ID detection using the false session ID, it considers that the current environment is a normal user session environment, and then the subsequent starting process can be performed, that is, the rdp service is still in the environment of Session 0 session in a physical manner. The present scheme deceives the rdp service to make it believe that it is in a non-0 session, thereby successfully passing the session ID detection. Then, when the rdp service calls the enumeration session function, the second replacement function intercepts the call and returns session list information containing the false session ID of non-0 returned by the first replacement function and the session ID generated by the rdp service. The rdp service generates a real session according to the session list information. For example, the cloud server of X86 architecture runs container A, container B and container C. Assuming that the false session IDs returned by the first replacement function jumped into when the rdp services in the container A, the container B and the container C call the query session function are 1, 2 and 3 respectively, and the session IDs of the sessions created by the rdp services in the container A and the container B during the starting process are 4 and 5 respectively, when the rdp service in the container C calls the enumeration session function, the second replacement function intercepting the call returns session list information containing 1, 2, 3, 4 and 5. After receiving the session list information, the rdp service in the container C creates a real session according to the session list information. The session is the session required for the normal running of the cloud application in the container C. After the rdp service creates the session, the rdp service calls the channel establishment function, and the third replacement function intercepts the call, generates the information of the virtual channel, and calls the channel establishment function with the information of the virtual channel as the input parameter, so that the channel establishment function creates a virtual channel according to the input parameter. Finally, the rdp service starts successfully. The information of the virtual channel includes the name of the virtual channel and the port number. The port number is the port number of the port configured for the container when the container uses the network. After that, the cloud application starts. Since the rdp service creates a graphics environment, the cloud application can be normally rendered. The cloud application picture rendered during the running of the cloud application is transmitted to the user through the virtual channel, and the user's operation data is fed back to the cloud application through the virtual channel, thereby realizing the multi-opening and isolation of the cloud application.The false session IDs returned by the first substitute function in different containers can be the same or different, the first substitute function can obtain the false session IDs related to other containers outside the container where the first substitute function is located by communicating with a program running in the cloud server, and the program running in the cloud server can obtain the false session IDs related to each container running in the cloud server. The second substitute function can obtain the session IDs related to other containers outside the container where the second substitute function is located by communicating with a program running in the cloud server, and the program running in the cloud server can obtain the session IDs related to each container running in the cloud server. The rdp service creates a session according to the session list information, which is a logic that the rdp service itself already has, and will not be described here. The port numbers of the virtual channels generated by the third substitute function in different containers can be the same or different, the third substitute function can obtain the port numbers of the virtual channels related to other containers outside the container where the third substitute function is located by communicating with a program running in the cloud server, and the program running in the cloud server can obtain the port numbers of the virtual channels related to each container running in the cloud server. The query session function can include the WTSQuerySessionInformation function, the enumeration session function can include the WTSEnumerateSessions function, and the channel establishment function can include the WTSVirtualChannelOpenEx function.
[0030] The cloud application multi-opening method provided by the embodiments of the present application registers the hook function for the query session function and the enumeration session function in the termsrv.dll file when the first module in the container is started, so that the rdp service in the container can smoothly pass through the session ID detection logic during the starting process and successfully create a desktop environment supporting graphics, the cloud application runs in this desktop environment, can normally use the GPU for picture rendering, finally, the picture rendered by the cloud application is captured by the rdp service, encoded into a video stream, and transmitted to the client of the remote user through the virtual channel, the client receives the video stream and decodes it, and the user can see the cloud application picture. Compared with the system virtualization technology and the process virtualization technology, the present solution does not have the hardware virtualization overhead of the system virtualization technology, and does not have the large modification of the cloud application logic through the hook API of the process virtualization technology, so the performance loss is smaller, and it is not easy to be detected by the anti-cheating system.
[0031] In order to realize precise control of GPU resource usage and GPU resource isolation among multiple containers, a hook function for an exchange buffer function in a graphics API can be registered to the system when the second module is started, so that when the cloud application calls the exchange buffer function, the execution flow of the program jumps to the fourth alternative function, wherein the second module is deployed in the container where the first module is located, the second module is started before the cloud application is started, and the fourth alternative function is used to limit the rendering frame rate of the cloud application to a preset frame rate. It can be understood that the cloud application will call the exchange buffer function every time it renders. In order to control the rendering frame rate of the cloud application, the call of the exchange buffer function is intercepted through the fourth alternative function, and it is determined whether to extend the time for the fourth alternative function to call the exchange buffer function according to the set frame rate (i.e., the preset frame rate). Specifically, after the fourth alternative function intercepts the call of the exchange buffer function, the following logic is executed: the time interval between the current time and the time when the rendering of the last frame of the cloud application picture is completed is calculated; it is determined whether the time interval is greater than or equal to a preset threshold, wherein the preset threshold is the time interval between adjacent frames determined according to the preset frame rate; if the time interval is greater than or equal to the preset threshold, the exchange buffer function is called, otherwise, a waiting time is waited, and after the waiting time arrives, the exchange buffer function is called, wherein the waiting time is the difference between the preset threshold and the time interval. After the call of the exchange buffer function ends, the time when the rendering of the last frame of the cloud application picture is completed is updated to the current time. When the fourth alternative function intercepts the call of the exchange buffer function for the first time, since there is no time when the rendering of the last frame of the cloud application picture is completed, the above logic is not executed, but the exchange buffer function is directly called, and the time when the rendering of the last frame of the cloud application picture is completed is updated to the current time after the call ends. From the second time when the call of the exchange buffer function is intercepted, the above logic is executed. That is, the fourth alternative function controls the calling time of the exchange buffer function according to the preset frame rate, so that the rendering frame rate of the cloud application picture is maintained at a specific frame rate, thereby realizing the control of the use of GPU resources. The exchange buffer function can include a Present function in a graphics application programming interface DirectX and a wglSwapBuffers function in a graphics application programming interface OpenGL.
[0032] In summary, the core innovation of the scheme is to use a lightweight isolation architecture to realize the disguise of Session 0 to a non-0 session layer through a Hook technology, so that the rdp service can be successfully started in the container, thereby creating a session environment required by the cloud application running in the container, and realizing precise control of GPU resources through Hook of the exchange buffer function. Finally, a single host supports multiple independent cloud application instances running simultaneously. The scheme provides an efficient, stable and scalable technical solution for the cloud application industry, and has important commercial value and technical innovation significance.
[0033] Referring toFigure 2 Fig. 1 shows a structural schematic diagram of a cloud application multi-opening device provided by an embodiment of the present application, and the device comprises:
[0034] a first module 20 and an rdp service 21 deployed in each container of a cloud server; wherein,
[0035] the first module 20 is configured to, when the first module 20 is started, register a hook function for a query session function, an enumeration session function and a channel establishment function in a termsrv.dll file to the system, so that when the rdp service 21 in the container where the first module 20 is located is started after the first module 20 is started, the execution flow of the program is jumped to a first replacement function, a second replacement function and a third replacement function of the first module 20 when the query session function, the enumeration session function and the channel establishment function are called, wherein the first replacement function is configured to return session information, the session information comprises a non-zero false session ID, the second replacement function is configured to return session list information, the session list information comprises the non-zero false session ID returned by the first replacement function and a session ID generated by the rdp service 21, and the third replacement function is configured to create an independent virtual channel for the container where the first module 20 is located;
[0036] the rdp service 21 is configured to, after a cloud application in the container where the first module 20 is located is started, capture a cloud application picture rendered by the cloud application, encode the cloud application picture into a video stream, and transmit the video stream to a client of a remote user through the virtual channel.
[0037] The cloud application multi-opening device provided by the embodiment of the present application, when the first module in the container is started, registers a hook function for a query session function and an enumeration session function in a termsrv.dll file to the system, so that the rdp service in the container can smoothly pass through the session ID detection logic and successfully create a desktop environment supporting graphics during the starting process of the rdp service, the cloud application runs in this desktop environment, can normally use GPU for picture rendering, finally, the picture rendered by the cloud application is captured by the rdp service, encoded into a video stream, and then transmitted to the client of the remote user through the virtual channel, the client receives the video stream and decodes it, and the user can see the cloud application picture. Compared with the system virtualization technology and the process virtualization technology, the present solution does not have the hardware virtualization overhead of the system virtualization technology, and does not have the large modification of the cloud application logic through the hook API of the process virtualization technology, so the performance loss is smaller, and it is not easy to be detected by an anti-cheating system.
[0038] On the basis of the foregoing device embodiment, the execution logic of the third replacement function can comprise:
[0039] generating information of the virtual channel, wherein the information of the virtual channel comprises a virtual channel name and a port number;
[0040] The information of the virtual channel is taken as an input parameter to call the channel establishment function, so that the channel establishment function creates the virtual channel according to the input parameter.
[0041] On the basis of the foregoing device embodiment, the device can further include:
[0042] The second module is configured to, when the second module is started, register a hook function for an exchange buffer function in a graphics API to the system, so that when the cloud application calls the exchange buffer function, the execution flow of the program jumps into a fourth substitute function, wherein the second module is deployed in the container where the first module is located, the second module is started before the cloud application is started, and the fourth substitute function is configured to limit the rendering frame rate of the cloud application to a preset frame rate.
[0043] On the basis of the foregoing device embodiment, the execution logic of the fourth substitute function can include:
[0044] calculating a time interval between the current time and the time when the rendering of the previous frame of the cloud application is completed;
[0045] determining whether the time interval is greater than or equal to a preset threshold, wherein the preset threshold is a time interval between adjacent frames determined according to the preset frame rate;
[0046] if the time interval is greater than or equal to the preset threshold, the exchange buffer function is called, otherwise, a waiting time is waited for, and after the waiting time arrives, the exchange buffer function is called, wherein the waiting time is a difference between the preset threshold and the time interval.
[0047] On the basis of the foregoing device embodiment, the device can further include:
[0048] The network configuration module is configured to, when the container where the first module is located is started, create a custom virtual network, add the container where the first module is located to the custom virtual network, and set a port mapping for the cloud server and the container where the first module is located.
[0049] The cloud application multi-opening device provided by the embodiments of the present application has the same implementation process and the same effects as the cloud application multi-opening method provided by the embodiments of the present application, and thus the details are not repeated here.
[0050] The above merely describes specific implementation manners of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A cloud application multi-opening method, applied to a cloud server of an X86 architecture, characterized in that, Comprise: When the first module starts, register a hook function for the query session function, the enumeration session function and the establish channel function in the termsrv.dll file to the system, so that when the first module starts, the process of starting the rdp service in the container where the first module is located calls the query session function, the enumeration session function and the establish channel function, the execution flow of the program jumps into the first replacement function, the second replacement function and the third replacement function of the first module respectively, wherein the first replacement function is used to return session information, the session information contains a non-zero false session ID, the second replacement function is used to return session list information, the session list information contains the non-zero false session ID returned by the first replacement function and the session ID generated by the rdp service, and the third replacement function is used to create an independent virtual channel for the container where the first module is located; After the cloud application in the container where the first module is located starts, the cloud application picture rendered by the cloud application is captured through the rdp service, the cloud application picture is encoded into a video stream, and the video stream is transmitted to the client of the remote user through the virtual channel.
2. The method of claim 1, wherein, The execution logic of the third replacement function comprises: Generating virtual channel information, wherein the virtual channel information comprises a virtual channel name and a port number; Calling the establish channel function with the virtual channel information as an input parameter, so that the establish channel function creates a virtual channel according to the input parameter.
3. The method of claim 1 or 2, wherein, Further comprise: When the second module starts, register a hook function for the swap buffer function in the graphics API to the system, so that when the cloud application calls the swap buffer function, the execution flow of the program jumps into the fourth replacement function, wherein the second module is deployed in the container where the first module is located, the second module starts before the cloud application starts, and the fourth replacement function is used to limit the rendering frame rate of the cloud application to a preset frame rate.
4. The method of claim 3, wherein, The execution logic of the fourth replacement function comprises: Calculating the time interval between the current time and the time when the last frame of the cloud application picture is rendered; Determine whether the time interval is greater than or equal to a preset threshold, wherein the preset threshold is the time interval between adjacent frames determined according to the preset frame rate; If the time interval is greater than or equal to the preset threshold, call the swap buffer function, otherwise, wait for a period of time, and after the waiting time arrives, call the swap buffer function, wherein the waiting time is the difference between the preset threshold and the time interval.
5. The method of claim 1, wherein, Further comprise: When the container where the first module is located starts, create a custom virtual network, add the container where the first module is located to the custom virtual network, and set port mapping for the cloud server and the container where the first module is located.
6. A cloud application multi-opening apparatus, applied to a cloud server of an X86 architecture, characterized in that, Comprise: The first module and the rdp service deployed in each container of the cloud server; wherein, The first module is configured to register a hook function for a query session function, an enumeration session function and a channel establishment function in a termsrv.dll file when the first module is started, so that when the query session function, the enumeration session function and the channel establishment function are called in a process of starting an RDP service in a container where the first module is located after the first module is started, an execution flow of a program is switched to a first replacement function, a second replacement function and a third replacement function of the first module, respectively, wherein the first replacement function is configured to return session information, the session information includes a non-zero false session ID, the second replacement function is configured to return session list information, the session list information includes the non-zero false session ID returned by the first replacement function and a session ID generated by the RDP service, and the third replacement function is configured to create an independent virtual channel for the container where the first module is located. The RDP service is configured to capture a cloud application picture rendered by the cloud application after the cloud application is started in the container where the first module is located, encode the cloud application picture into a video stream, and transmit the video stream to a client of a remote user through the virtual channel.
7. The apparatus of claim 6, wherein, The execution logic of the third replacement function includes: generating information of the virtual channel, wherein the information of the virtual channel includes a virtual channel name and a port number; and calling the channel establishment function with the information of the virtual channel as an input parameter, so that the channel establishment function creates the virtual channel according to the input parameter.
8. The apparatus of claim 6 or 7, wherein, Further comprising: The second module is configured to register a hook function for an exchange buffer function in a graphics API when the second module is started, so that when the cloud application calls the exchange buffer function, the execution flow of the program is switched to a fourth replacement function, wherein the second module is deployed in the container where the first module is located, the second module is started before the cloud application is started, and the fourth replacement function is configured to limit a rendering frame rate of the cloud application to a preset frame rate.
9. The apparatus of claim 8, wherein, The execution logic of the fourth replacement function includes: calculating a time interval between a current time and a time when a last frame of the cloud application picture is rendered; determining whether the time interval is greater than or equal to a preset threshold value, wherein the preset threshold value is a time interval between adjacent frames determined according to the preset frame rate; if the time interval is greater than or equal to the preset threshold value, calling the exchange buffer function, otherwise, waiting for a period of time, and after the waiting time arrives, calling the exchange buffer function, wherein the waiting time is a difference between the preset threshold value and the time interval.
10. The apparatus of claim 6, wherein, Further comprising: The network configuration module is configured to create a custom virtual network when the container where the first module is located is started, add the container where the first module is located to the custom virtual network, and set a port mapping for a cloud server and the container where the first module is located.
Citation Information
Patent Citations
Application multi-starting implementing method and apparatus
CN107273118A
Multi-open detection bypassing method, storage medium, equipment and system
CN112445683A