Cloud desktop graphic processing method, acceleration service component and computer equipment
By installing the acceleration service component in the cloud desktop, rewrite and intercept the graphics and accelerate the processing request, and send it to the physical graphics card for processing, the problem of insufficient graphics processing capabilities and poor compatibility of the virtual graphics card is solved, and higher graphics are achieved Handle compatibility and system stability.
Patent Information
- Application Number
- CN202411593522.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-08
AI Technical Summary
Due to the lack of graphics cards, cloud desktop has limited graphics processing capabilities, especially when running 3D software, and the virtual graphics card is incompatible with the application software, resulting in the failure of calling the acceleration interface.
By installing the acceleration service component in the cloud desktop, the application's graphical acceleration processing request is intercepted, and the driver interface mapping rules override the request is ensured to adapt to the acceleration interface of the virtual graphics card, and the request is sent to the physical graphics card through the virtual graphics card driver layer Perform accelerated processing.
Improves the compatibility of cloud desktop virtual graphics cards, ensures normal hardware acceleration, and improves application response capabilities and system stability.
Smart Images

Figure CN119473482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a cloud desktop graphics processing method, an acceleration service component, a computer device, and a computer-readable storage medium. Background Art
[0002] Cloud desktop, also known as desktop virtualization or cloud computer, is a new desktop service based on cloud computing technology. It stores desktop operating systems, applications and data on remote cloud servers. Users can access these resources through network connections and various terminal devices (such as thin clients, laptops, smartphones, tablets, etc.), thus achieving a similar user experience to traditional PCs.
[0003] Cloud desktops usually do not have graphics cards and use the CPU to process graphics display requests. They do not have advanced hardware graphics acceleration capabilities, so their graphics processing capabilities are limited, especially their performance in running 3D software is very poor.
[0004] In response to such needs, technologies such as GPU split virtualization, GPU direct pass-through, and GPU time-sharing were born to provide cloud desktops with the ability to install graphics cards. However, due to the differences between the virtualized environment and the physical machine, the virtual graphics card on the cloud desktop will always show various incompatibilities with application software. Summary of the invention
[0005] The embodiment of the present application provides a cloud desktop graphics processing method, an acceleration service component, and a computer device-level computer-readable storage medium, which can improve the compatibility of cloud desktop virtual graphics cards. The technical solution is as follows: According to one aspect of an embodiment of the present application, a cloud desktop graphics processing method is provided, which is applied to an acceleration service component installed in a cloud desktop, and includes the steps of: intercepting a first graphics acceleration processing request initiated by an application in the cloud desktop, wherein 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, wherein the second graphics acceleration processing request is adapted to an acceleration interface of the second virtual graphics card; sending 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 machine through the virtual graphics card driver layer for acceleration processing and receiving a first processing result returned by the physical graphics card, wherein 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.
[0006] Based on the above technical solution, the first graphics acceleration processing request is rewritten through the acceleration service component to ensure that the acceleration interface of the virtual graphics card actually applied by the cloud desktop can be correctly called, thereby ensuring the normal execution of hardware acceleration and responding normally to the application program, thereby improving compatibility.
[0007] In one implementation, the rewriting method includes rewriting parameters or rewriting methods.
[0008] In one implementation, intercepting the first graphics acceleration processing request initiated by an application in the cloud desktop includes: intercepting the first graphics acceleration processing request of the application calling an acceleration interface of the first virtual graphics card based on a Hook mechanism.
[0009] In one implementation, the information of the first virtual graphics card is provided to the application by the acceleration service component when it is determined that the cloud desktop has normal access to a physical graphics card.
[0010] Based on the above technical solution, it can be avoided to a certain extent that when the cloud desktop is not properly connected to the physical graphics card, the application's request to call the acceleration interface cannot be responded to normally due to the system's incorrect display of virtual graphics card information.
[0011] In one implementation, when the acceleration service component determines that the cloud desktop is not normally connected to the physical graphics card, the acceleration service component sends the first graphics acceleration processing request to the virtual CPU for processing.
[0012] Based on the above technical solution, when the cloud desktop cannot be accelerated by the physical graphics card, the first graphics acceleration request can still be processed and responded to, which can not only ensure the normal operation of the application to a certain extent, but also avoid operational failures of the cloud desktop system.
[0013] In one implementation, the method for determining whether the cloud desktop has normal access to the physical graphics card 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 as to send the fourth graphics acceleration processing request to the physical graphics card on the host machine through the virtual graphics card driver layer for acceleration processing and receiving a 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, determining that the cloud desktop has normal access to the physical graphics card; otherwise, determining that the cloud desktop has not normal access to the physical graphics card.
[0014] Based on the above technical solution, the physical graphics card access status of the cloud desktop is detected by constructing a fourth graphics acceleration request, so as to obtain the correct physical graphics card access information, so that the acceleration service component can correctly process the request according to the actual access situation, thereby improving the stability of the system.
[0015] In one implementation, 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, wherein the target processing result is the same as a processing result of the first graphics acceleration processing request based on the first virtual graphics card.
[0016] Based on the above technical solution, it can be ensured that the processing result returned to the application can be correctly identified by the application, thereby ensuring the normal operation of the application.
[0017] According to another aspect of an embodiment of the present application, an acceleration service component is provided, which is installed in a cloud desktop system to implement the above method.
[0018] In addition, according to one aspect of an embodiment of the present application, a computer device is provided, the computer device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above method.
[0019] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of the present application are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of the structure of a cloud desktop management system provided in an embodiment of the present application is shown.
[0023] Figure 2 A flow chart of a cloud desktop graphics processing method provided by an embodiment of the present application is shown.
[0024] Figure 3 A flow chart of a cloud desktop graphics processing method provided by another embodiment of the present application is shown.
[0025] Figure 4 A flow chart of a method for detecting the physical graphics card access status of a cloud desktop provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, and "first", "second" and various digital numbers are only distinguished for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0028] The features, structures or characteristics in this application may be combined in one or more embodiments in any suitable manner. In various embodiments of this application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0029] Some optional features in the embodiments of the present application may be implemented independently in some scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They may also be combined with other features in some scenarios as needed.
[0030] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In the various embodiments of this application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0031] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0032] The cloud desktop is implemented based on the virtual machine created by the host machine. Please refer to Figure 1As shown, in the cloud desktop management system provided in the embodiment of the present application, it includes a host machine 11, a physical graphics card 12 installed on the host machine, 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, wherein the virtual graphics card 121 serves the cloud desktop 13, and is created based on one of the technologies such as GPU split virtualization, GPU pass-through, and GPU time-sharing; the virtual graphics card driver layer 15 is used to realize 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.
[0033] Please refer to Figure 2 The cloud desktop graphics processing method provided in the embodiment of the present application can be used to process the graphics data of the application in the cloud desktop, which is implemented based on the acceleration service component 14 and specifically includes the following steps.
[0034] S201, intercepting a first graphics acceleration processing request initiated by an application in a cloud desktop.
[0035] Specifically, the application is the application software installed on the cloud desktop system, which can be a specific graphics processing program, such as SolidWorks, Photoshop, etc., or any software that requires graphics data processing.
[0036] Generally speaking, the application can construct a corresponding first graphics 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 an acceleration interface such as OpenGL or DirectX to implement graphics hardware acceleration.
[0037] However, since graphics card virtualization technology is in a rapid development stage, in actual applications, the cloud desktop system may be unable to provide the correct graphics card model and driver version, or the application may be unable to 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 graphics acceleration processing request.
[0038] Based on this, in an embodiment of the present application, the acceleration service component modifies the system display parameters to provide unified virtual graphics card information, namely, the information of the first virtual graphics card, to the application, so that each application can directly generate a first graphics acceleration processing request based on the first virtual graphics card. Preferably, the first virtual graphics card information can use a relatively mature and versatile graphics card model and driver version on the market to improve the compatibility of application software.
[0039] In one implementation, the acceleration service component detects the access status of the graphics card of the cloud desktop at startup or periodically, and when it is determined that the cloud desktop has normal access to the physical graphics card, the system display parameters are modified to the information of the first virtual graphics card, so as to provide the application with information such as the graphics card model and driver version of the first virtual graphics card. In this way, it can be ensured that the first graphics acceleration processing requests intercepted by the acceleration service component are all issued based on the first virtual graphics card, so as to facilitate the recognition and processing of the first graphics acceleration processing requests by the acceleration service component.
[0040] In one example, the acceleration service component can intercept the application's request to call the acceleration interface of the first virtual graphics card based on the Hook mechanism, that is, the first graphics acceleration processing request. It is worth noting 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.
[0041] S202: Determine a 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.
[0042] Specifically, the driver interface mapping rules are pre-constructed. In one example, all calling instructions of the acceleration interface of the first virtual graphics card and the second virtual graphics card can be analyzed to establish a mapping relationship between the two, thereby obtaining the driver interface mapping rules. The driver interface mapping rules are used to record the mapping relationship between the parameters and methods of each calling instruction of the first virtual graphics card and the calling instructions of the second virtual graphics card that implement the same function. Please refer to Table 1. Table 1 provides an example of the driver interface mapping rules.
[0043] Table 1 Based on the example in Table 1, it can be seen 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 rewriting methods, and the rewritten second graphics acceleration processing request can be adapted to the acceleration interface of the second virtual graphics card, so that the relevant acceleration interface can be correctly called.
[0044] The second virtual graphics card is the virtual graphics card currently connected to the cloud desktop, which is related to the model and driver of the physical graphics card on the host machine and the graphics card virtualization technology used. In one example, the information of the second virtual graphics card can be pre-set. In another example, the second virtual graphics card is obtained by the acceleration service component through detection of the graphics card access status of the cloud desktop. In this way, the technician can write the mapping rules corresponding to multiple virtual graphics cards in advance, so that the cloud desktop system can flexibly adjust the connected 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.
[0045] S203: Send a second graphics acceleration processing request to the virtual graphics card driver layer through the acceleration interface.
[0046] The acceleration service component may 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.
[0047] 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 machine. 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 may send the second graphics acceleration processing request to the corresponding second virtual graphics card, and the hardware resources corresponding to the second virtual graphics card (i.e., the physical 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, and 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 the specific application.
[0048] 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.
[0049] S204, receiving a first processing result returned by the virtual graphics card driver layer, and returning the first processing result to the application program.
[0050] In one example, the acceleration service component may directly return the first processing result to the application program to implement a response to the first graphics acceleration processing request.
[0051] In another example, in order to ensure that the response content is adapted to the request content, the acceleration service component must 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, wherein 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.
[0052] Specifically, the result conversion rules are pre-built. In actual applications, different virtual graphics card types may have different content formats returned for the same acceleration processing request, including but not limited to data storage path, presentation format, etc. Therefore, in order to enable the application to normally identify the processing results, the acceleration service component needs to convert the first processing result into a target processing result that can be recognized by the application according to the result conversion rules, that is, 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. It is worth noting that the same processing result means that the return form of the result can be correctly recognized by the application, and does not include consistency in data content.
[0053] In this way, for the application, it is only necessary to ensure normal interaction with the first virtual graphics card to obtain accelerated processing results. By setting the first virtual graphics card to a general graphics card on the market, the compatibility of the application and the first virtual graphics card can be guaranteed, and the application developer does not need to specifically adapt and upgrade to the new graphics card technology.
[0054] Based on the above technical solution, the graphics acceleration request of the application is intercepted and rewritten through the acceleration service component to ensure that the acceleration interface can be called correctly, thereby improving the compatibility of the cloud desktop virtual graphics card; at the same time, by providing a unified, universal first virtual graphics card to 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, thereby further improving the versatility of the cloud desktop.
[0055] In actual application, the cloud desktop may not be able to access the physical graphics card normally due to various reasons, but the system still displays the virtual graphics card information as usual, causing the application to call the acceleration interface of the virtual graphics card as usual, but unable to obtain a normal response. In view of this situation, another embodiment of the present application proposes a cloud desktop graphics processing method, please refer to Figure 3 , the method specifically includes the following steps.
[0056] S301, intercepting a first graphics acceleration processing request initiated by an application in a cloud desktop.
[0057] S302: Determine whether the cloud desktop is normally connected to the physical graphics card.
[0058] If it is determined that the cloud desktop is not normally connected to the physical graphics card, step S303 is executed; if it is determined that the cloud desktop is normally connected to the physical graphics card, step S304 is executed.
[0059] S303: Send the first graphics acceleration processing request to the virtual CPU for processing.
[0060] Specifically, when the acceleration service component determines that the cloud desktop is not properly connected to the physical graphics card, 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 cloud desktop virtual CPU for processing. The parsing and encapsulation rules are pre-set.
[0061] The virtual CPU returns the processing result of the third graphics acceleration processing request to the acceleration service component, which converts the processing result into a target processing result according to the result conversion rule, and returns the target processing result to the application, wherein 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.
[0062] S304: Determine a 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.
[0063] S305: Send a second graphics acceleration processing request to the virtual graphics card driver layer through the acceleration interface.
[0064] S306, receiving a first processing result returned by the virtual graphics card driver layer, and returning the first processing result to the application.
[0065] The specific implementation of steps S301 , S304 , S305 and S306 may refer to the description of S201 , S202 , S203 and S204 , and will not be described in detail again.
[0066] In the above step S302, the acceleration service component can determine whether the current cloud desktop has normal access to the physical graphics card based on the latest detection result, wherein the latest detection result can be obtained by the acceleration service component when the cloud desktop is started, or it can be obtained by periodic or real-time detection.
[0067] Please refer to Figure 4 The method for the acceleration service component to detect the physical graphics card access status of the cloud desktop specifically includes the following steps.
[0068] S401: Construct a fourth graphics acceleration processing request based on a driver interface mapping rule.
[0069] In implementation, the fourth graphics acceleration processing request for calling the second virtual graphics card acceleration interface may be constructed in sequence according to each type of instruction in the driver interface mapping rule.
[0070] S402, sending a 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 machine through the virtual graphics card driver layer for acceleration processing and receive a second processing result returned by the physical graphics card.
[0071] S403, determining whether the second processing result is normal.
[0072] Specifically, when determining that the second processing result is normal, the acceleration service component needs to ensure that the second processing results corresponding to all fourth graphics acceleration processing requests constructed for the second virtual graphics card are all normal.
[0073] In one implementation, the acceleration service component may determine whether a second processing result is normal when it is obtained. If normal, it may construct a new fourth graphics acceleration processing request and determine whether the corresponding second processing result is normal. If an abnormal result is found during the process, the second processing result is determined to be abnormal based on the result. If the second processing results corresponding to the fourth graphics acceleration processing request of all instructions are normal, the second processing result is determined to be normal.
[0074] In another implementation, the acceleration service component may first construct a fourth graphics acceleration processing request corresponding to all instructions, and determine whether each second processing result is normal based on 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 request and the content is legal, then each second processing result is determined to be normal.
[0075] When it is determined that the second processing result is normal, step S404 is executed; if the second processing result is abnormal, step S405 is executed.
[0076] S404, confirm that the cloud desktop is normally connected to the physical graphics card.
[0077] S405: Determine that the cloud desktop is not normally connected to the physical graphics card.
[0078] It is worth noting that in some implementations, the virtual graphics card actually connected to the cloud desktop may be updated or adjusted, that is, the physical graphics card or graphics card virtual technology corresponding to the second virtual graphics card may be adjusted, which means that the corresponding interface call request may change. In this case, the technician can record in advance in the driver interface mapping rules the driver interface mapping relationship between the second virtual graphics card and the first virtual graphics card corresponding to various virtual graphics card technologies that may be used. In this way, the acceleration service component can construct a fourth graphics acceleration processing request based on the interface call requirements of each second virtual graphics card in turn, and perform tests in turn, and then determine whether the cloud desktop has normally connected to the physical graphics card, as well as the version and model corresponding to the second virtual graphics card based on the test results, and then correctly match the driver interface mapping rules in subsequent request processing.
[0079] Based on this, the cloud desktop graphics card virtualization technology can be updated on demand. During the update process, you only need to focus on the technical implementation of the graphics card part. The acceleration service component can automatically assist in completing the docking with the application, thus improving the cloud desktop update efficiency.
[0080] One 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. The computer device can be implemented as Figure 1 The host machine in the implementation environment of the solution shown.
[0081] In one example, the computer device includes a central processing unit (such as a CPU (Central Processing Unit, central processing unit), a GPU (Graphics Processing Unit, graphics processing unit) and an FPGA (Field Programmable Gate Array, field programmable logic gate array)) 1001, a system memory including a RAM (Random-Access Memory, random access memory) and a 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) that helps transmit information between various devices in the server, and a large-capacity storage device for storing an operating system, application programs and other program modules.
[0082] The basic input / output system may include a display for displaying information and an input device such as a mouse, a keyboard, etc. for a user to input information. The display and the input device 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 a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller also provides output to a display screen, a printer, or other types of output devices.
[0083] The mass storage device is connected to the central processing unit via 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, the mass storage device may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0084] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include 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 include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technology, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory and mass storage devices can be collectively referred to as memory.
[0085] According to an embodiment of the present application, the computer device can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device can be connected to the network through a network interface unit connected to the system bus, or the network interface unit can be used to connect to other types of networks or remote computer systems (not shown).
[0086] The memory also includes a computer program, which is stored in the memory and configured to be executed by one or more processors to implement the above-mentioned cloud desktop graphics processing method.
[0087] In some embodiments, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium, and the computer program implements the above method when executed by a processor.
[0088] Optionally, the computer readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0089] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in 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 comprises the steps of: Intercepting a first graphics acceleration processing request initiated by an application in the cloud desktop, wherein the first graphics acceleration processing request is generated based on a first virtual graphics card; Determine a rewriting method of 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, wherein the second graphics acceleration processing request is adapted to an acceleration interface of a second virtual graphics card; Sending the second graphics acceleration processing request to the virtual graphics card driver layer through the acceleration interface, so as to send the second graphics acceleration processing request to the physical graphics card on the host machine through the virtual graphics card driver layer for acceleration processing and receive the first processing result returned by the physical graphics card, wherein the virtual graphics card driver layer is constructed based on the graphics card virtualization technology category of the cloud desktop application; The first processing result returned by the virtual graphics card driver layer is received, and the first processing result is returned to the application.
2. The method according to claim 1, characterized in that The rewriting method includes rewriting parameters or rewriting methods.
3. The method according to claim 1, characterized in that The intercepting of the first graphics acceleration processing request initiated by the application in the cloud desktop includes: The first graphics acceleration processing request of the application program calling the acceleration interface of the first virtual graphics card is intercepted based on a Hook mechanism.
4. The method according to claim 1, characterized in that: The information of the first virtual graphics card is provided to the application by the acceleration service component when it is determined that the cloud desktop has normal access to a physical graphics card.
5. The method according to claim 1, characterized in that When the acceleration service component determines that the cloud desktop is not normally connected to the physical graphics card, the acceleration service component sends the first graphics acceleration processing request to the virtual CPU for processing.
6. The method according to claim 4 or 5, characterized in that: The method for determining whether the cloud desktop is normally connected to a physical graphics card 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 as to send the fourth graphics acceleration processing request to the physical graphics card on the host machine through the virtual graphics card driver layer for acceleration processing and receiving a second processing result returned by the physical graphics card, and determining whether the second processing result is normal; If the second processing result is normal, it is determined that the cloud desktop is normally connected to the physical graphics card; otherwise, it is determined that the cloud desktop is not normally connected to the physical graphics card.
7. The method according to claim 1, characterized in that 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, wherein the target processing result is the same as a 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 as described in any one of claims 1 to 7.
9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A GPU service redirection system and method based on cloud and terminal GPU fusion
CN109582425A
Method for sharing and using GPU in multi-desktop environment
CN110442389A
Method and system for realizing 3D capability of cloud desktop virtual machine
CN111381914A
Virtual display card implementation method and device based on cloud desktop
CN112486609A
Resource management method, system-on-chip, electronic component and electronic equipment
CN115904634A