A cloud desktop graphics processing method, an acceleration service component, and a computer device
The cloud desktop graphics processing method and acceleration service component address compatibility and stability issues by intercepting and rewriting graphics requests to align with virtual graphics cards, ensuring seamless performance even without physical graphics cards.
Patent Information
- Application Number
- CN202411593522.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-11-08
AI Technical Summary
Due to the lack of graphics cards, cloud desktops have limited graphics processing capabilities, especially poor performance when running 3D software, and the difference between virtualization environment and physical machines leads to incompatible virtual graphics cards and application software.
The acceleration service component intercepts the application's graphical acceleration processing request, rewritten it into an interface adapted to a virtual graphics card, and sends it to the physical graphics card through the virtual graphics card driver layer for acceleration processing, and returns the processing results to the application.
Improves the compatibility and system stability of cloud desktop virtual graphics cards, ensures the normal operation of applications, and avoids system failures caused by errors in virtual graphics cards.
Smart Images

Figure CN119473482B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to a cloud desktop graphics processing method, an acceleration service component, a computer device, and a computer-readable storage medium. Background Art
[0002] A cloud desktop, also known as desktop virtualization or cloud computer, is a new type of desktop service based on cloud computing technology. It stores the desktop operating system, application programs, and data on a remote cloud server. Users can access these resources through a network connection using various terminal devices (such as thin clients, laptops, smartphones, tablets, etc.), thus achieving a usage experience similar to that of a traditional PC.
[0003] Cloud desktops usually do not have a graphics card and use the CPU to process graphics display requests, lacking advanced hardware graphics acceleration capabilities. Therefore, their graphics processing capabilities are limited, especially when running 3D software, the performance is very poor.
[0004] To address such requirements, technologies such as GPU slicing virtualization, GPU passthrough, and GPU time-sharing have emerged to provide the ability to install a graphics card for cloud desktops. However, due to the differences between the virtualized environment and the physical machine, the virtual graphics cards on cloud desktops always show various incompatibilities with application software. Summary of the Invention
[0005] Embodiments of this application provide a cloud desktop graphics processing method, an acceleration service component, a computer device, and a computer-readable storage medium, which can improve the compatibility of the virtual graphics card of a cloud desktop. The technical solutions are as follows:
[0006] According to one aspect of the embodiments of this application, a cloud desktop graphics processing method is provided. The method is applied to an acceleration service component installed on a cloud desktop and includes the steps of: intercepting a first graphics acceleration processing request initiated by an application program in the cloud desktop, where the first graphics acceleration processing request is generated based on a first virtual graphics card; determining a rewriting method for the first graphics acceleration processing request based on a driver interface mapping rule, and rewriting the first graphics acceleration processing request based on the rewriting method to obtain a second graphics acceleration processing request, where the second graphics acceleration processing request is adapted to the acceleration interface of a second virtual graphics card; sending the second graphics acceleration processing request to a virtual graphics card driver layer through the acceleration interface, so that the virtual graphics card driver layer sends the second graphics acceleration processing request to a physical graphics card on a host for acceleration processing and receives a first processing result returned by the physical graphics card, where the virtual graphics card driver layer is constructed based on the graphics card virtualization technology category of the cloud desktop application; receiving the first processing result returned by the virtual graphics card driver layer, and returning the first processing result to the application program.
[0007] Based on the above technical solution, the acceleration service component rewrites the first graphics acceleration processing request to ensure that the acceleration interface of the virtual graphics card actually used in the cloud desktop can be correctly called, so as to ensure the normal execution of hardware acceleration, respond to the application program normally, and thus improve compatibility.
[0008] In one implementation, the rewriting method includes rewriting parameters or rewriting methods.
[0009] In one implementation, intercepting the first graphics acceleration processing request initiated by an application program in the cloud desktop includes: intercepting the first graphics acceleration processing request in which the application program calls the acceleration interface of the first virtual graphics card based on the Hook mechanism.
[0010] In one implementation, the information of the first virtual graphics card is provided to the application program by the acceleration service component when it is determined that the cloud desktop has a physical graphics card normally connected.
[0011] Based on the above technical solution, to a certain extent, it can avoid the situation where, when the cloud desktop does not have a physical graphics card normally connected, the request of the application program to call the acceleration interface cannot be normally responded due to the system erroneously displaying the virtual graphics card information.
[0012] In one implementation, when the acceleration service component determines that the cloud desktop does not have a physical graphics card normally connected, it sends the first graphics acceleration processing request to the virtual CPU for processing.
[0013] Based on the above technical solution, when the cloud desktop cannot be accelerated by the physical graphics card, it is still possible to process and respond to the first graphics acceleration request, which can not only ensure the normal operation of the application program to a certain extent, but also avoid the cloud desktop system from having a running failure due to this.
[0014] In one implementation, the method for determining whether the cloud desktop has a physical graphics card normally connected includes: constructing a fourth graphics acceleration processing request based on the driver interface mapping rule, sending the fourth graphics acceleration processing request to the virtual graphics card driver layer by calling the acceleration interface, so that the virtual graphics card driver layer sends the fourth graphics acceleration processing request to the physical graphics card on the host for acceleration processing and receives the second processing result returned by the physical graphics card, and judging whether the second processing result is normal; if the second processing result is normal, it is determined that the cloud desktop has a physical graphics card normally connected; otherwise, it is determined that the cloud desktop does not have a physical graphics card normally connected.
[0015] Based on the above technical solution, the physical graphics card access situation of the cloud desktop is detected by constructing a fourth graphics acceleration request, so as to obtain correct physical graphics card access information, enabling the acceleration service component to correctly process the request according to the actual access situation and improving the stability of the system.
[0016] In one implementation, the returning the first processing result to the application program includes: converting the first processing result into a target processing result according to a result conversion rule, and returning the target processing result to the application program, where the target processing result is the same as the processing result of the first graphics acceleration processing request based on the first virtual graphics card.
[0017] Based on the above technical solution, it can be ensured that the processing result returned to the application program can be correctly recognized by the application program, thereby ensuring the normal operation of the application program.
[0018] According to another aspect of the embodiments of the present application, an acceleration service component is provided. The acceleration service component is installed in the cloud desktop system and is used to implement the above method.
[0019] In addition, according to one aspect of the embodiments of the present application, a computer device is provided. The computer device includes a processor and a memory. A computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above method.
[0020] According to one aspect of the embodiments of the present application, a computer-readable storage medium is provided. A computer program is stored in the readable storage medium, and the computer program is loaded and executed by the processor to implement the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application.
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 Show a schematic structural diagram of the cloud desktop management system provided by the embodiments of the present application.
[0024] Figure 2 Show a flowchart of the cloud desktop graphics processing method provided by an embodiment of the present application.
[0025] Figure 3 The flowchart of the cloud desktop graphics processing method provided by another embodiment of the present application is shown.
[0026] Figure 4 The flowchart of the detection method for the access situation of the physical graphics card of the cloud desktop provided by the embodiment of the present application is shown. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present application.
[0028] In the description of the embodiments of the present application, unless otherwise specified, "a plurality of" means two or more, and "first", "second", and various numerical numbers are only for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0029] The features, structures, or characteristics in the present application can be combined in one or more embodiments in any suitable manner. In various embodiments of the present application, the order numbers of the various processes do not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0030] Some optional features in the embodiments of the present application, in some scenarios, can be implemented independently without relying on other features, solve the corresponding technical problems, and achieve the corresponding effects. In some scenarios, they can also be combined with other features according to requirements.
[0031] In the present application, unless otherwise specified, the same or similar parts between the various embodiments can be referred to each other. In the various embodiments of the present application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referred to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships. The implementation manners of the present application do not constitute a limitation to the protection scope of the present application.
[0032] The embodiments of the present application will be described in detail below with reference to the drawings.
[0033] The cloud desktop is implemented based on virtual machines created on the host. Please refer to Figure 1As shown in the figure, in the cloud desktop management system provided by the embodiments of the present application, it includes a host 11, a physical graphics card 12 installed on the host, a virtual graphics card 121 created based on the physical graphics card 12, a cloud desktop 13, an acceleration service component 14 installed in the cloud desktop, and a virtual graphics card driver layer 15. Among them, the virtual graphics card 121 serves the cloud desktop 13 and is created based on one of the technologies such as GPU slicing virtualization, GPU passthrough, and GPU time-sharing; the virtual graphics card driver layer 15 is used to implement data interaction between the cloud desktop 13 and the physical graphics card 12, and is specifically constructed based on the graphics card virtualization technology category applied by the cloud desktop 13.
[0034] Please refer to Figure 2 , the cloud desktop graphics processing method provided by the embodiments of the present application can be used to process the graphic data of the application programs in the cloud desktop. It is implemented based on the acceleration service component 14 and specifically includes the following steps.
[0035] S201, intercept the first graphic acceleration processing request initiated by the application program in the cloud desktop.
[0036] Specifically, the application program is an application software installed on the cloud desktop system, which can be a specific graphic processing program, such as SolidWorks, Photoshop, etc., or any software that needs to process graphic data.
[0037] Generally speaking, the application program can construct a corresponding first graphic acceleration processing request by reading information such as the graphics card model and driver version provided by the cloud desktop system, so as to call acceleration interfaces such as OpenGL or DirectX to achieve graphic hardware acceleration.
[0038] However, since the graphics card virtualization technology is in the stage of rapid development, in actual applications, there may be problems such as the cloud desktop system cannot provide the correct graphics card model and driver version or the application program cannot correctly identify the virtualized graphics card model and driver version, resulting in the failure of the acceleration interface call and the inability to normally process the first graphic acceleration processing request.
[0039] Based on this, in the embodiments of the present application, the acceleration service component provides unified virtual graphics card information, that is, the information of the first virtual graphics card, to the application program by modifying the system display parameters, so that each application program can directly generate the first graphic acceleration processing request based on the first virtual graphics card. Preferably, the first virtual graphics card information can use relatively mature and highly general graphics card models and driver versions on the market to improve the compatibility of application software.
[0040] In one implementation, when the acceleration service component starts up or periodically detects the connection status of the physical graphics card of the cloud desktop, and determines that the cloud desktop has a properly connected physical graphics card, it modifies the system display parameters to the information of the first virtual graphics card, so as to provide information such as the graphics card model and driver version of the first virtual graphics card to the application program. In this way, it can be ensured that all the first graphics acceleration processing requests intercepted by the acceleration service component are issued based on the first virtual graphics card, thus facilitating the recognition and processing of the first graphics acceleration processing requests by the acceleration service component.
[0041] In one example, the acceleration service component can intercept the request of the application program to call the acceleration interface of the first virtual graphics card, that is, the first graphics acceleration processing request, based on the Hook mechanism. It should be noted that intercepting the first graphics acceleration processing request means capturing and intercepting the first graphics acceleration processing request, so that the first graphics acceleration processing request does not call the acceleration interface of the first virtual graphics card.
[0042] S202, determine the rewriting method of the first graphics acceleration processing request based on the driver interface mapping rule, and rewrite the first graphics acceleration processing request based on the rewriting method to obtain the second graphics acceleration processing request.
[0043] Specifically, the driver interface mapping rule is pre-constructed. In one example, by analyzing all the call instructions of the acceleration interfaces of the first virtual graphics card and the second virtual graphics card, the mapping relationship between the two can be established, so as to obtain the driver interface mapping rule. The driver interface mapping rule is used to record the mapping relationship between the parameters and methods of each call instruction of the first virtual graphics card and the call instructions of the second virtual graphics card that implement the same function. Please refer to Table 1, which provides an example of the driver interface mapping rule.
[0044]
[0045] Table 1
[0046] It can be seen from the example in Table 1 that the mapping rules corresponding to different instruction types include parameter adjustment, method adjustment, and synchronous adjustment of parameters and methods. Based on this, the rewriting method in this step includes rewriting parameters or methods. The rewritten second graphics acceleration processing request can be adapted to the acceleration interface of the second virtual graphics card, that is, it can correctly call the relevant acceleration interface.
[0047] The second virtual graphics card is the virtual graphics card currently accessed by the cloud desktop, which is related to the model and driver of the physical graphics card on the host computer and the graphics card virtualization technology used. In one example, the information of the second virtual graphics card can be set in advance. In another example, the second virtual graphics card is obtained by the acceleration service component detecting the graphics card access situation of the cloud desktop. In this way, technicians can write the mapping rules corresponding to multiple virtual graphics cards in advance, so that the cloud desktop system can flexibly adjust the accessed virtual graphics card according to actual needs, and the acceleration service component can automatically identify the second virtual graphics card currently used by the cloud desktop.
[0048] S203, send a second graphics acceleration processing request to the virtual graphics card driver layer through the acceleration interface.
[0049] The acceleration service component can call the acceleration interface of the second virtual graphics card through the second graphics acceleration processing request to send the second graphics processing request to the virtual graphics card driver layer.
[0050] In one example, after receiving the second graphics processing request, the virtual graphics card driver layer sends the second graphics acceleration processing request to the physical graphics card on the host computer. The physical graphics card accelerates the second graphics acceleration processing request based on the virtual graphics card corresponding to the cloud desktop and returns the processing result to the virtual graphics card driver layer. In another example, after receiving the second graphics processing request, the virtual graphics card driver layer can send the second graphics acceleration processing request to the corresponding second virtual graphics card, and the hardware resources (i.e., the physical graphics card) corresponding to the second virtual graphics card accelerate the request. It can be understood that the embodiments of the present application do not involve improvements to the graphics card virtualization technology. Therefore, the interaction process between the virtual graphics card driver layer and the physical graphics card can be implemented according to the technical type of specific applications.
[0051] The virtual graphics card driver layer receives the first processing result returned by the physical graphics card and sends the first processing result to the acceleration service component.
[0052] S204, receive the first processing result returned by the virtual graphics card driver layer and return the first processing result to the application program.
[0053] In one example, the acceleration service component can directly return the first processing result to the application program to implement the response to the first graphics acceleration processing request.
[0054] In another example, in order to ensure that the response content is adapted to the request content, the acceleration service component needs to first convert the first processing result into a target processing result according to the result conversion rule and return the target processing result to the application program, where the target processing result is the same as the processing result of the first graphics acceleration processing request based on the first virtual graphics card.
[0055] Specifically, the result conversion rule is pre-built. In practical applications, for different types of virtual graphics cards, the content forms returned for the same acceleration processing request may vary, including but not limited to data storage paths, presentation forms, etc. Therefore, in order for the application to correctly identify the processing result, the acceleration service component needs to convert the first processing result into a target processing result recognizable by the application according to the result conversion rule, that is, the target processing result is the same as the processing result after processing the first graphics acceleration processing request based on the first virtual graphics card. It should be noted that the same processing result means that the return form of the result can be correctly recognized by the application, and does not include the consistency of data content.
[0056] In this way, for the application, it only needs to ensure normal interaction with the first virtual graphics card to obtain the acceleration processing result. By setting the first virtual graphics card as a common graphics card on the market, the compatibility between the application and the first virtual graphics card can be ensured, and there is no need for the application developer to specifically adapt and upgrade for the new graphics card technology.
[0057] Based on the above technical solution, the acceleration service component intercepts and rewrites the graphics acceleration request of the application to ensure that the acceleration interface can be correctly called, improving the compatibility of the cloud desktop virtual graphics card; at the same time, by providing a unified and common first virtual graphics card for the application, the application only needs to have the ability to call the first virtual graphics card, and there is no need to adapt to the actual virtual graphics card of the cloud desktop, so the generality of the cloud desktop is further improved.
[0058] In the actual application process, due to various reasons, the cloud desktop may not be able to normally access the physical graphics card, but the system still displays the virtual graphics card information as usual, resulting in the application calling the acceleration interface of the virtual graphics card as usual, but unable to obtain a normal response. For this situation, another embodiment of the present application proposes a cloud desktop graphics processing method. Please refer to Figure 3 , and the method specifically includes the following steps.
[0059] S301, intercept the first graphics acceleration processing request initiated by the application in the cloud desktop.
[0060] S302, determine whether the cloud desktop is normally accessing the physical graphics card.
[0061] If it is determined that the cloud desktop is not normally accessing the physical graphics card, then execute step S303; if it is determined that the cloud desktop is normally accessing the physical graphics card, then execute step S304.
[0062] S303, send the first graphics acceleration processing request to the virtual CPU for processing.
[0063] Specifically, when the acceleration service component determines that the cloud desktop fails to access the physical graphics card normally, it can first parse and encapsulate the first graphics acceleration processing request to obtain a third graphics acceleration processing request that can be correctly processed by the CPU, and send the third graphics acceleration processing request to the virtual CPU of the cloud desktop for processing. Among them, the parsing and encapsulation rules are pre-set.
[0064] The virtual CPU returns the processing result of the third graphics acceleration processing request to the acceleration service component. The acceleration service component converts the processing result into a target processing result according to the result conversion rule and returns the target processing result to the application program. Among them, the target processing result is the same as the processing result of the first graphics acceleration processing request based on the first virtual graphics card.
[0065] S304. Determine the rewriting method of the first graphics acceleration processing request based on the driver interface mapping rule, and rewrite the first graphics acceleration processing request based on the rewriting method to obtain a second graphics acceleration processing request.
[0066] S305. Send the second graphics acceleration processing request to the virtual graphics card driver layer through the acceleration interface.
[0067] S306. Receive the first processing result returned by the virtual graphics card driver layer and return the first processing result to the application program.
[0068] Among them, the specific implementation manners of steps S301, S304, S305, and S306 can refer to the descriptions of S201, S202, S203, and S204 respectively, and will not be elaborated here.
[0069] In the above step S302, the acceleration service component can determine whether the current cloud desktop has accessed the physical graphics card normally according to the latest detection result. Among them, the latest detection result can be obtained by the acceleration service component when the cloud desktop starts up, or can be obtained periodically or in real time.
[0070] Please refer to Figure 4 , the method for the acceleration service component to detect the physical graphics card access situation of the cloud desktop specifically includes the following steps.
[0071] S401. Construct a fourth graphics acceleration processing request based on the driver interface mapping rule.
[0072] In implementation, according to each type of instruction in the driver interface mapping rule, a fourth graphics acceleration processing request for calling the second virtual graphics card acceleration interface can be constructed in sequence.
[0073] S402, send the fourth graphics acceleration processing request to the virtual graphics card driver layer by calling the acceleration interface of the second virtual graphics card, so as to send the fourth graphics acceleration processing request to the physical graphics card on the host through the virtual graphics card driver layer for acceleration processing and receive the second processing result returned by the physical graphics card.
[0074] S403, determine whether the second processing result is normal.
[0075] Specifically, when the acceleration service component determines that the second processing result is normal, it is necessary to ensure that all the second processing results corresponding to the fourth graphics acceleration processing requests constructed for the second virtual graphics card are normal.
[0076] In one implementation, when the acceleration service component obtains a second processing result, it can determine whether it is normal. If it is normal, it constructs a new fourth graphics acceleration processing request and determines whether the corresponding second processing result is normal. If there is an abnormal result during the process, it determines that the second processing result is abnormal based on this result; if all the second processing results corresponding to the fourth graphics acceleration processing requests corresponding to all instructions are normal, it determines that the second processing result is normal.
[0077] In another implementation, the acceleration service component can first construct the fourth graphics acceleration processing requests corresponding to all instructions, and determine whether each second processing result is normal according to the number and content of the returned second processing results. If the number of the returned second processing results is the same as the number of the fourth graphics acceleration processing requests and the content is legal, it determines that each second processing result is normal.
[0078] When it is determined that the second processing result is normal, execute step S404; if the second processing result is abnormal, execute step S405.
[0079] S404, determine that the cloud desktop has a normal access to the physical graphics card.
[0080] S405, determine that the cloud desktop does not have a normal access to the physical graphics card.
[0081] It should be noted that in some implementations, the virtual graphics cards actually accessed by the cloud desktop may be updated or adjusted. That is to say, the physical graphics cards or graphics virtualization technologies corresponding to the second virtual graphics cards will be adjusted, which means that the corresponding interface call requests may change. In response to this situation, technicians can record in advance in the driver interface mapping rules the driver interface mapping relationships between the second virtual graphics cards and the first virtual graphics cards corresponding to various virtual graphics technologies that may be used. In this way, the acceleration service component can sequentially construct the fourth graphics acceleration processing request based on the interface call requirements of each second virtual graphics card and perform detections sequentially, and then determine whether the cloud desktop has a physical graphics card normally accessed, as well as the version and model corresponding to the second virtual graphics card, and then can correctly match the driver interface mapping rules in the subsequent request processing.
[0082] Based on this, the on-demand update of the cloud desktop graphics virtualization technology can be realized, and during the update process, only the technical implementation of the graphics card part needs to be concerned about, and the acceleration service component can automatically assist in completing the docking with the application program, so as to improve the update efficiency of the cloud desktop.
[0083] An embodiment of the present application also provides a computer device. The computer device can be any electronic device with data calculation, processing, and storage functions, and the computer device can be implemented as Figure 1 the host computer in the implementation environment of the shown solution.
[0084] In one example, the computer device includes a central processing unit (such as CPU (Central Processing Unit, central processor), GPU (Graphics Processing Unit, graphics processor), and FPGA (Field Programmable Gate Array, field programmable logic gate array), etc.) 1001, a system memory including RAM (Random-Access Memory, random access memory) and ROM (Read-Only Memory, read-only memory), and a system bus connecting the system memory and the central processing unit. The computer device also includes a basic input / output system (Input Output System, I / O system) for facilitating the transmission of information between various components in the server, and a large-capacity storage device for storing the operating system, application programs, and other program modules.
[0085] The basic input / output system may include a display for displaying information and input devices such as a mouse, keyboard, etc. for user input of information. Among them, both the display and the input devices are connected to the central processing unit through an input / output controller connected to the system bus. The basic input / output system may also include an input / output controller for receiving and processing inputs from multiple other devices such as a keyboard, mouse, or electronic stylus, etc. Similarly, the input / output controller also provides outputs to a display screen, printer, or other types of output devices.
[0086] The mass storage device is connected to the central processing unit through a mass storage controller (not shown) connected to the system bus. The mass storage device and its associated computer-readable medium provide non-volatile storage for the computer device. That is to say, the mass storage device may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0087] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc), or other optical storage, magnetic tape cartridges, tapes, disk storage, or other magnetic storage devices. Of course, those skilled in the art know that the computer storage media is not limited to the above several. The above system memory and mass storage device can be collectively referred to as memory.
[0088] According to an embodiment of the present application, the computer device may also run by connecting to a remote computer on a network such as the Internet. That is, the computer device may be connected to the network through a network interface unit connected to the system bus, or rather, may also use the network interface unit to connect to other types of networks or remote computer systems (not shown).
[0089] The memory further includes a computer program, which is stored in the memory and configured to be executed by one or more processors to implement the above cloud desktop graphics processing method.
[0090] In some embodiments, a computer-readable storage medium is also provided. A computer program is stored in the storage medium and, when executed by a processor, is configured to implement the above method.
[0091] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical discs, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0092] The above are all preferred embodiments of the present application. The protection scope of the present application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A cloud desktop graphics processing method, characterized in that, The method is applied to an acceleration service component installed on a cloud desktop, and includes the steps: Intercept a first graphics acceleration processing request initiated by an application in the cloud desktop, where the first graphics acceleration processing request is generated based on a first virtual graphics card; Determine a rewriting method for the first graphics acceleration processing request based on a driver interface mapping rule, and rewrite the first graphics acceleration processing request based on the rewriting method to obtain a second graphics acceleration processing request, where the second graphics acceleration processing request is adapted to an acceleration interface of a second virtual graphics card; the second virtual graphics card is the virtual graphics card currently accessed by the cloud desktop; Send the second graphics acceleration processing request to a virtual graphics card driver layer through the acceleration interface, so as to send the second graphics acceleration processing request to a physical graphics card on a host for acceleration processing through the virtual graphics card driver layer and receive a first processing result returned by the physical graphics card, where the virtual graphics card driver layer is constructed based on a graphics card virtualization technology category applied by the cloud desktop; Receive the first processing result returned by the virtual graphics card driver layer, and return the first processing result to the application; where the method further includes modifying system display parameters to provide information about the first virtual graphics card to the application, so that the application generates the first graphics acceleration processing request based on the first virtual graphics card.
2. The method according to claim 1, wherein The rewriting method includes rewriting parameters or rewriting methods.
3. The method according to claim 1, characterized in that The intercepting a first graphics acceleration processing request initiated by an application in the cloud desktop includes: Intercept the first graphics acceleration processing request in which the application calls the acceleration interface of the first virtual graphics card based on a Hook mechanism.
4. The method according to claim 1, wherein The information about the first virtual graphics card is provided to the application by the acceleration service component when it is determined that the cloud desktop has a physically connected graphics card normally.
5. The method according to claim 1, wherein When the acceleration service component determines that the cloud desktop does not have a physically connected graphics card normally, it sends the first graphics acceleration processing request to a virtual CPU for processing.
6. The method according to claim 4 or 5, characterized in that, The method for determining whether the cloud desktop has a physically connected graphics card normally includes: Construct a fourth graphics acceleration processing request based on the driver interface mapping rule, send the fourth graphics acceleration processing request to the virtual graphics card driver layer by calling the acceleration interface, so as to send the fourth graphics acceleration processing request to the physical graphics card on the host for acceleration processing through the virtual graphics card driver layer and receive a second processing result returned by the physical graphics card, and determine whether the second processing result is normal; If the second processing result is normal, it is determined that the cloud desktop has a physically connected graphics card normally; otherwise, it is determined that the cloud desktop does not have a physically connected graphics card normally.
7. The method according to claim 1, characterized in that, The returning the first processing result to the application includes: converting the first processing result into a target processing result according to a result conversion rule, and returning the target processing result to the application, where the target processing result is the same as the processing result of the first graphics acceleration processing request based on the first virtual graphics card.
8. An acceleration service component, characterized in that, The acceleration service component is installed in the cloud desktop system and is used to implement the method described in any one of claims 1 to 7.
9. A computer device, characterized in that, The computer device includes a processor and a memory. A computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual display card implementation method and device based on cloud desktop
CN112486609A
Image rendering method and device, storage medium and electronic equipment
CN118037923A