CN112486609B - Virtual display card implementation method and device based on cloud desktop - Google Patents
Virtual display card implementation method and device based on cloud desktop Download PDFInfo
- Publication number
- CN112486609B CN112486609B CN202011343253.0A CN202011343253A CN112486609B CN 112486609 B CN112486609 B CN 112486609B CN 202011343253 A CN202011343253 A CN 202011343253A CN 112486609 B CN112486609 B CN 112486609B
- Authority
- CN
- China
- Prior art keywords
- virtual
- cloud desktop
- operating system
- memory
- virtual display
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/452—Remote windowing, e.g. X-Window System, desktop virtualisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1454—Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- Digital Computer Display Output (AREA)
Abstract
The invention provides a method and a device for realizing a virtual display card based on a cloud desktop, wherein the method comprises the following steps: the virtual machine acquires a user process memory space provided by a host machine operating system, virtualizes the user process memory space into a virtual video memory of a virtual video card, and simultaneously maps the virtual video memory into a virtual memory space which can be directly accessed by a client machine operating system, stores the mapping relation and then transmits the mapping relation to the cloud desktop transmission protocol module; the client operating system generates a drawing instruction request, the virtual display card draws the image data in the drawing instruction request in a virtual display memory, and other drawing information is added into a drawing instruction buffer queue; the cloud desktop transmission protocol module obtains drawing information in the drawing instruction buffer queue, reads corresponding image data in the virtual video memory according to the mapping relation between the virtual video memory and the virtual memory space, and transmits the image data to the cloud desktop client through the cloud desktop transmission protocol code. The invention can reduce the processing delay and simultaneously reduce the consumption of resources such as a host CPU, a memory and the like.
Description
Technical Field
The invention relates to a virtual display processing technology, in particular to a method and a device for realizing a virtual display card based on a cloud desktop.
Background
In recent years, with the explosive development of cloud computing technology, cloud desktops are also increasingly used as an important cloud computing branch technology. An important feature of cloud desktops, relative to other cloud computing technologies, is the existence of virtualization of graphics. Graphical application programs need to be operated in the virtual machine, and corresponding graphical desktop data of the application programs are transmitted to the client according to a specific protocol through a graphical virtualization technology, so that graphical interaction between the client and the cloud virtual machine desktop environment is achieved.
Although the performance requirements of many current cloud desktop applications on the graphics virtualization technology are higher and higher, the virtual graphics card seems to be unable to meet the requirements, and many virtualization technologies using a host physical graphics card, such as a graphics card penetration technology, a physical graphics card-based virtualization technology, and the like, are also emerging, because the cost of the technologies is relatively high, and the universality of various server architectures is poor. Therefore, the virtual graphics card technology based on the CPU simulation is still widely applied in scenes with low requirements on graphics performance, such as ordinary offices. The simulated virtual display card can enable a client operating system running in the virtual machine to realize graphical drawing, and meanwhile, a program on the host machine can obtain a graphical drawing instruction in the client operating system, and the instruction is processed through a corresponding cloud desktop transmission protocol and provided for a client side to restore and display an image.
In the existing virtual graphics card implementation technology, the drawing instruction transmitted from the client operating system carries original image data, and the display mode of the graphics card set in the general client operating system has a relatively high display resolution and a relatively high refresh rate of the graphics card. In the prior art, the corresponding graphic raw data of a drawing instruction is compressed and encoded in a cloud desktop transmission protocol module, and is decoded and displayed at a client, so that the data volume of network transmission is reduced. Because the original graphic data carried by the drawing instruction at the moment generated from the client operating system is processed by the cloud desktop transmission protocol and is sent to the client, a relatively large processing delay exists, and when the network environment is poor or the load of the host machine is relatively large, the drawing instruction is overstocked in the cloud desktop transmission protocol module, so that the client has a relatively large operation display delay and relatively poor experience. In some existing processing technologies, backlogged drawing instructions are discarded by adopting a frame loss mode in a cloud desktop transmission protocol module, but in order to not affect display, it is necessary to ensure that only repeated drawing instructions in a region can be discarded, and the effect is not obvious in some client operating system application scenes in which refresh regions are not consistent.
For the problem, a processing technology for performing off-screen rendering by a cloud desktop transport protocol server side also exists. The method comprises the steps of restoring a drawing instruction acquired from a client operating system into corresponding image data in a cloud desktop transmission protocol server module of a host machine, and performing corresponding display control according to the actual environment of the host machine, so that the display effect is guaranteed under a poor condition.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the technical problems in the prior art, the invention provides a method and a device for realizing a virtual display card based on a cloud desktop, which can reduce processing delay and reduce the consumption of resources such as a host computer CPU (central processing unit), a memory and the like.
In order to solve the technical problems, the technical scheme provided by the invention is as follows:
a virtual display card implementation method based on a cloud desktop comprises the following steps:
s1), the virtual machine acquires a user process memory space provided by the host machine operating system, virtualizes the user process memory space into a virtual memory of a virtual display card of the virtual machine, and simultaneously maps the virtual memory into a virtual memory space which can be directly accessed by a client machine operating system of the virtual machine, stores the mapping relation and then transmits the mapping relation to the virtual machine or a cloud desktop transmission protocol module of the host machine;
s2), the client operating system generates a drawing instruction request and sends the drawing instruction request to a virtual display card, the virtual display card separates the drawing instruction request into original image data and corresponding other drawing information, the image data is drawn in a virtual display memory, and the other drawing information is added into a drawing instruction buffer queue and then sent to the cloud desktop transmission protocol module;
s3) the cloud desktop transmission protocol module obtains other drawing information in the drawing instruction buffer queue, reads corresponding image data in the virtual video memory according to the mapping relation between the virtual video memory and the virtual memory space, and transmits the image data to the cloud desktop client through the cloud desktop transmission protocol code.
Further, step S1) specifically includes: the virtual machine obtains a user process memory space through an interface provided by a host machine operating system, and then virtualizes the user process memory space into a physical memory which can be identified by a client machine operating system of the virtual machine through a virtual bus technology; when a virtual display card driver in a client operating system is initialized, acquiring physical memory information through an interface provided by a virtual bus driver, and using the physical memory as a virtual display memory of a virtual display card of a virtual machine; the virtual display card driving program in the client operating system maps the virtual display memory of the virtual display card into a virtual memory space which can be directly accessed by the client operating system through a memory mapping interface of the client operating system, stores the mapping relation in a corresponding data structure, and then transmits the memory address field corresponding to the mapping relation and the memory space of the user process to a cloud desktop transmission protocol module of the virtual machine or the host machine.
Further, step S2) specifically includes: a resource manager of a client operating system submits a drawing instruction to a graphical engine, the graphical engine in the client operating system converts the drawing instruction request into a drawing interface call provided by a virtual display card driving program in the client operating system, and processing graphic data generated by the interface call comprises Bitmap data containing original image data, a corresponding drawing type and drawing target area information; a virtual display card driving program in a client operating system separates data of drawing operation of a graphics engine, opens a Bitmap buffer area from a virtual display memory through an interface provided by the graphics engine in the client operating system, and draws original image data into the Bitmap buffer area; and a virtual display card driver in the client operating system encapsulates the corresponding drawing type and the drawing target area information into a simplified drawing instruction, adds the simplified drawing instruction into a drawing instruction buffer queue abstracted from a virtual display memory of the virtual display card and sends the drawing instruction buffer queue to the cloud desktop transmission protocol module.
Further, step S3) specifically includes: the cloud desktop transmission protocol module acquires a simplified drawing instruction and analyzes the drawing type and the drawing target area information; acquiring an address field corresponding to a Bitmap buffer area in a user process memory space of a host according to the mapping relation between the virtual video memory and the virtual memory space; and calculating to obtain a storage area where corresponding original image data is located according to the drawing type and the drawing target area information, and transmitting the image data in the storage area to a cloud desktop client through a cloud desktop transmission protocol code.
The invention also provides a virtual display card device, comprising:
the host machine is used for running a host machine operating system;
a virtual machine for running a guest operating system; the host computer is also used for acquiring a user process memory space provided by the host computer operating system;
the virtual machine comprises a virtual display card, wherein the virtual display card is used for virtualizing a memory space of a user process into a virtual display memory, mapping the virtual display memory into a virtual memory space which can be directly accessed by a client operating system, storing a mapping relation and transmitting the mapping relation to a cloud desktop transmission protocol module; the system is also used for acquiring a drawing instruction request in a client operating system, separating the drawing instruction request into original image data and corresponding other drawing information, drawing the image data in a virtual video memory, adding the other drawing information into a drawing instruction buffer queue and sending the drawing information to a cloud desktop transmission protocol module;
the cloud desktop transmission protocol module is used for acquiring the drawing information in the drawing instruction buffer queue, reading corresponding image data in a virtual video memory of the virtual video card module according to the mapping relation between the virtual video memory and the virtual memory space, and transmitting the image data to the cloud desktop client through a cloud desktop transmission protocol code;
the cloud desktop transmission protocol module runs in a host machine operating system or a client machine operating system.
The invention also provides a virtual display card implementation device based on the cloud desktop, which comprises a computer programmed or configured to execute the virtual display card implementation method based on the cloud desktop.
The present invention also provides a computer-readable storage medium storing a computer program programmed or configured to execute the cloud desktop based virtual graphics card implementation method.
Compared with the prior art, the invention has the advantages that:
the method can realize data separation of the drawing instruction in the client operating system by the virtual display card, the virtual display card directly draws original graphic data in the drawing instruction into the virtual display memory, other information such as instruction type and drawing area size in the drawing instruction is transmitted to the cloud desktop transmission protocol module through the instruction buffer queue, the cloud desktop transmission protocol module acquires corresponding drawing information through a processing method of the buffer queue in the process, reads corresponding image data from the virtual display memory subjected to memory mapping processing according to the type and area information in the drawing information and transmits the image data to the cloud desktop client through the cloud desktop transmission protocol code for display. Therefore, the cloud desktop transmission protocol module does not need to process graphic data in the drawing instruction, the overstock of the drawing instruction is avoided, the processing delay can be reduced, and meanwhile, the consumption of resources such as a host computer CPU (Central processing Unit), a memory and the like is reduced.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
FIG. 3 is a flow chart of an apparatus according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the drawings and specific preferred embodiments of the description, without thereby limiting the scope of protection of the invention.
Example one
As shown in fig. 1, the method for implementing a virtual graphics card based on a cloud desktop according to the present invention includes the following steps:
s1) the virtual machine obtains a user process memory space provided by the host operating system, virtualizes the user process memory space into a virtual memory of a virtual graphics card of the virtual machine, and simultaneously maps the virtual memory into a virtual memory space that can be directly accessed by the client operating system of the virtual machine, stores a mapping relationship, and then transmits the mapping relationship to the cloud desktop transport protocol module of the virtual machine or the host, which specifically includes:
the virtual machine obtains a user process memory space through an interface provided by a host machine operating system, and then virtualizes the user process memory space into a physical memory which can be identified by a client machine operating system of the virtual machine through a virtual bus technology; when a virtual display card driver in a client operating system is initialized, acquiring physical memory information through an interface provided by a virtual bus driver, and using the physical memory as a virtual display memory of a virtual display card of a virtual machine; a virtual display card driver in a client operating system maps a virtual display memory of a virtual display card into a virtual memory space which can be directly accessed by the client operating system through a memory mapping interface of the client operating system, stores a mapping relation in a corresponding data structure, and then transmits a memory address field corresponding to the mapping relation and a user process memory space to a cloud desktop transmission protocol module of a virtual machine or a host machine;
s2), the client operating system generates a drawing instruction request and sends the drawing instruction request to a virtual graphics card, the virtual graphics card separates the drawing instruction request into original image data and corresponding other drawing information, draws the image data in a virtual graphics memory, adds the other drawing information to a drawing instruction buffer queue, and sends the drawing instruction buffer queue to the cloud desktop transport protocol module, which specifically includes:
a resource manager in a client operating system of a virtual machine submits a drawing instruction to a graphical engine, the graphical engine of the client operating system converts the drawing instruction request into a drawing interface call provided by a virtual display card driving program in the client operating system, and processing graphic data generated by the interface call comprises Bitmap data containing original image data and corresponding drawing types and drawing target area information; a virtual display card driving program in a client operating system separates data of the drawing operation of a graphic engine, opens a Bitmap buffer area from a virtual display memory through an interface provided by the graphic engine in the client operating system, and draws Bitmap data of original image data into the Bitmap buffer area; a virtual display card driver in a client operating system encapsulates corresponding drawing types and drawing target area information into simplified drawing instructions, adds the simplified drawing instructions into a drawing instruction buffer queue abstracted from a virtual display memory of a virtual display card and sends the drawing instruction buffer queue to a cloud desktop transmission protocol module of a virtual machine or a host machine;
s3) the cloud desktop transport protocol module obtains other drawing information in the drawing instruction buffer queue, reads corresponding image data in the virtual display memory according to a mapping relationship between the virtual display memory and the virtual memory space, and transports the image data to the cloud desktop client through a cloud desktop transport protocol code, which specifically includes:
a cloud desktop transmission protocol module of a virtual machine or a host machine acquires a simplified drawing instruction and analyzes the drawing type and the drawing target area information; acquiring an address field corresponding to a Bitmap buffer area in a user process memory space of a host according to the mapping relation between the virtual video memory and the virtual memory space; and calculating to obtain a storage area where corresponding original image data is located according to the drawing type and the drawing target area information, and transmitting the image data in the storage area to a cloud desktop client through a cloud desktop transmission protocol code.
Through the above steps, the cloud desktop-based virtual graphics card implementation method of this embodiment can implement data separation of a drawing instruction in a client operating system by using the virtual graphics card, the virtual graphics card directly draws original graphics data in the drawing instruction into a virtual graphics memory, other information such as an instruction type and a drawing area size in the drawing instruction is transmitted to the cloud desktop transmission protocol module through the instruction buffer queue, and the cloud desktop transmission protocol module acquires corresponding drawing information through a processing method of the buffer queue inside a process, reads corresponding image data from the virtual graphics memory subjected to memory mapping processing according to the type and area information in the drawing information, and transmits the corresponding image data to the cloud desktop client through the cloud desktop transmission protocol coding for display. Therefore, the cloud desktop transmission protocol does not need to process original graphic data in the drawing instruction, the overstock of the drawing instruction is avoided, the processing delay can be reduced, and meanwhile, the consumption of resources such as a host computer CPU (Central processing Unit), a memory and the like is reduced.
As shown in fig. 2, the present invention further provides a virtual graphics card apparatus, including:
the host machine is used for operating a host machine operating system;
a virtual machine for running a guest operating system; the host computer is also used for acquiring a user process memory space provided by the host computer operating system;
the virtual machine comprises a virtual display card, wherein the virtual display card is used for virtualizing a memory space of a user process into a virtual display memory, mapping the virtual display memory into a virtual memory space which can be directly accessed by a client operating system, storing a mapping relation and transmitting the mapping relation to a cloud desktop transmission protocol module; the system is also used for acquiring a drawing instruction request in a client operating system, separating the drawing instruction request into original image data and corresponding other drawing information, drawing the image data in a virtual video memory, adding the other drawing information into a drawing instruction buffer queue and sending the drawing information to a cloud desktop transmission protocol module;
the cloud desktop transmission protocol module is used for acquiring the drawing information in the drawing instruction buffer queue, reading corresponding image data in a virtual video memory of the virtual video card module according to the mapping relation between the virtual video memory and the virtual memory space, and transmitting the image data to the cloud desktop client through a cloud desktop transmission protocol code;
the cloud desktop transmission protocol module runs in a host machine operating system or a client machine operating system.
In the virtual display card device of this embodiment, through a virtual bus technology, such as a virtual PCI bus or a virtoi technology, a drawing instruction request of a client operating system running in a virtual machine is sent to the virtual display card in an IO read-write or memory mapped instruction buffer queue manner, and the virtual display card stores the drawing instruction to the virtual display memory, where the virtual display memory is mapped from a user process memory space provided by a host operating system, and the user process memory space provides a memory address segment corresponding to the user process memory space and a corresponding mapping relationship to the cloud desktop transmission protocol module through a process message synchronization method, so that the cloud desktop transmission protocol module accesses the virtual display memory subjected to the memory mapping processing, thereby achieving data synchronization between the virtual display card and the cloud desktop transmission protocol module.
In this embodiment, the virtual machine is a QEMU virtual machine, the virtual graphics card adopts a graphics card virtualization module QXL of QEMU, the client operating system is a windows system, the cloud desktop transmission protocol module runs in the host operating system, and is used as a child thread of the whole virtual machine process, and the step of implementing data synchronization between the virtual graphics card and the cloud desktop transmission protocol module in this embodiment includes:
according to step S1), the QEMU virtual machine process obtains the user process memory space through the interface provided by the host operating system, and virtualizes the user process memory space into a physical memory that can be recognized by the guest operating system, such as a physical memory resource in the Windows system, through the virtual bus technology of graphics card virtualization; when a virtual display card driver in the Windows system is initialized, the physical memory information including information such as a starting address and memory length can be acquired through an interface provided by a virtual bus driver, and the physical memory information is used as a virtual display memory of a virtual display card; the virtual display card driving program calls a mmap (memory mapping file) interface of the Windows system, the virtual display memory of the virtual display card is mapped into a virtual memory space which can be directly accessed and used by the Windows operating system, the virtual display card driving program stores the mapping relation in a corresponding data structure, the mapping relation is transmitted to the display card virtualization module QXL in an IO (input/output) reading and writing mode, and then the display card virtualization module QXL transmits the mapping relation and a memory address segment corresponding to the memory space of the user process to the cloud desktop transmission protocol module through a message mechanism in the process so as to realize the synchronization of the mapping relation.
As shown in fig. 3, the step of separating the rendering instruction generated by the graphics engine in the guest operating system by the virtual graphics card in this embodiment includes: according to the step S2), the resource manager in the Windows operating system needs to submit the information such as the drawing method and the drawing area of the graphical interface to the graphical engine-GDI of Windows, the GDI converts the drawing instruction request into a call to the drawing interface provided by the virtual graphics card driver in the Windows system, and the processed graphics data generated by the interface call carries the Bitmap data including the original image data, and the corresponding drawing type and the drawing target area information; the method comprises the steps that a virtual display card driver in a Windows system acquires processing graphic data generated by current drawing and calling of a GDI engine through a HOOK technology, wherein the data comprises information of original image data, drawing types, drawing target areas and the like in drawing instructions; for information such as a drawing type, a target area and the like in a drawing instruction generated by separating a virtual display card driver, the virtual display card driver can package the information such as the drawing type, the drawing target area and the like corresponding to original image data into a simplified drawing instruction, and transmits the simplified drawing instruction to a display card virtualization module QXL in QEMU through instruction buffer queue resources abstracted from a virtual display memory, and the display card virtualization module QXL directly transmits the simplified drawing instruction to a cloud desktop transmission protocol module in a mode of sharing a storage space corresponding to the instruction buffer queue through a message mechanism in a process.
The processing steps of the cloud desktop transport protocol module in this embodiment include: according to the step S3), after the simplified drawing instruction is obtained by the cloud desktop transport protocol processing module through a processing method of a buffer queue inside the process, information such as a drawing type and a drawing target area is analyzed, according to the information, an address field of a corresponding area is analyzed according to a mapping relation between a virtual display memory and a virtual memory space from the display card virtualization module QXL to a Bitmap buffer area corresponding to the virtual display memory of the cloud desktop transport module, according to information such as a corresponding width and a height of Bitmap data in the drawing target area information and a bit width of each pixel, a storage area for obtaining image data corresponding to the target area in the address field is calculated, and the image data in the storage area is encoded and transmitted to the cloud desktop client.
The invention further provides a virtual display card implementation device based on the cloud desktop, which comprises a computer, wherein the computer is programmed or configured to execute the virtual display card implementation method based on the cloud desktop.
The present invention also provides a computer readable storage medium storing a computer program programmed or configured to execute the cloud desktop based virtual graphics card implementation method.
Example two
The embodiment is basically the same as the first embodiment, and is different in that the cloud desktop transport protocol module runs in the client operating system, the virtual graphics card driver and the cloud desktop transport protocol module realize access to a Bitmap buffer, such as file mapping, Section Object sharing, kernel storage MAP technology and the like, in Windows through a shared memory between the graphics card driver and the user program, and the separation of original image data and other drawing information in the drawing instruction is realized in the same manner.
EXAMPLE III
The present embodiment is substantially the same as the first embodiment, except that the client operating system is Linux, and the virtual graphics driver in Linux can similarly acquire the virtual graphics memory of the graphics virtualization module QXL according to step S1) in the first embodiment, and map this virtual graphics memory into the Linux system. In the Linux system, the UMS drive of a video card virtualization module QXL can be used to directly draw original image data corresponding to a drawing instruction request generated in a graphics engine of the Xorg Server into a Bitmap buffer area corresponding to the virtual video memory through a software interface of the mesa, and the cloud desktop transmission protocol module takes out the image data from the corresponding virtual video memory according to a simplified drawing instruction and a storage space appointed by a target area to perform coding transmission.
Example four
The embodiment is basically the same as the second embodiment, except that the client operating system is replaced by Linux, and the cloud desktop transmission protocol module is also operated in the Linux system, and according to a shared memory access mode between the UMS driver of the Linux and the cloud desktop transmission protocol module, such as file mapping, Section Object sharing, kernel storage MAP technology, and the like, the cloud desktop transmission protocol module accesses a Bitmap buffer area drawn by the UMS driver, and the original image data in the drawing instruction is separated from other drawing information.
The foregoing is considered as illustrative of the preferred embodiments of the invention and is not to be construed as limiting the invention in any way. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical spirit of the present invention should fall within the protection scope of the technical scheme of the present invention, unless the technical spirit of the present invention departs from the content of the technical scheme of the present invention.
Claims (7)
1. A virtual display card implementation method based on a cloud desktop is characterized by comprising the following steps:
s1), the virtual machine acquires a user process memory space provided by the host machine operating system, virtualizes the user process memory space into a virtual memory of a virtual display card of the virtual machine, and simultaneously maps the virtual memory into a virtual memory space which can be directly accessed by a client machine operating system of the virtual machine, stores the mapping relation and then transmits the mapping relation to the virtual machine or a cloud desktop transmission protocol module of the host machine;
s2), the client operating system generates a drawing instruction request and sends the drawing instruction request to a virtual display card, the virtual display card separates the drawing instruction request into original image data and corresponding other drawing information, the image data is drawn in a virtual display memory, and the other drawing information is added into a drawing instruction buffer queue and then sent to the cloud desktop transmission protocol module;
s3), the cloud desktop transmission protocol module obtains other drawing information in the drawing instruction buffer queue, reads corresponding image data in the virtual video memory according to the mapping relation between the virtual video memory and the virtual memory space, and transmits the image data to the cloud desktop client through the cloud desktop transmission protocol code.
2. The cloud desktop-based virtual graphics card implementation method according to claim 1, wherein step S1) specifically includes: the virtual machine obtains a user process memory space through an interface provided by a host machine operating system, and then virtualizes the user process memory space into a physical memory which can be identified by a client machine operating system of the virtual machine through a virtual bus technology; when a virtual display card driver in a client operating system is initialized, acquiring physical memory information through an interface provided by a virtual bus driver, and using the physical memory as a virtual display memory of a virtual display card of a virtual machine; the virtual display card driving program in the client operating system maps the virtual display memory of the virtual display card into a virtual memory space which can be directly accessed by the client operating system through a memory mapping interface of the client operating system, stores the mapping relation in a corresponding data structure, and then transmits the memory address field corresponding to the mapping relation and the memory space of the user process to a cloud desktop transmission protocol module of the virtual machine or the host machine.
3. The cloud desktop-based virtual graphics card implementation method according to claim 1, wherein step S2) specifically includes: a resource manager in a client operating system submits a drawing instruction to a graphical engine, the graphical engine of the client operating system converts the drawing instruction request into a drawing interface call provided by a virtual display card driving program in the client operating system, and the processing graphic data generated by the interface call comprises Bitmap data containing original image data, a corresponding drawing type and drawing target area information; a virtual display card driving program in a client operating system separates data of the drawing operation of a graphic engine, opens a Bitmap buffer area from a virtual display memory through an interface provided by the graphic engine in the client operating system, and draws Bitmap data of original image data into the Bitmap buffer area; and a virtual display card driver in the client operating system encapsulates the corresponding drawing type and the drawing target area information into a simplified drawing instruction, adds the simplified drawing instruction into a drawing instruction buffer queue abstracted from a virtual display memory of the virtual display card and sends the drawing instruction buffer queue to the cloud desktop transmission protocol module.
4. The cloud desktop-based virtual graphics card implementation method according to claim 3, wherein step S3) specifically includes: the cloud desktop transmission protocol module acquires a simplified drawing instruction and analyzes a drawing type and drawing target area information; acquiring an address field corresponding to a Bitmap buffer area in a user process memory space of a host according to the mapping relation between the virtual video memory and the virtual memory space; and calculating to obtain a storage area where corresponding original image data is located according to the drawing type and the drawing target area information, and transmitting the image data in the storage area to a cloud desktop client through a cloud desktop transmission protocol code.
5. A virtual graphics card apparatus, comprising:
the host machine is used for running a host machine operating system;
a virtual machine for running a guest operating system; the host computer is also used for acquiring a user process memory space provided by the host computer operating system;
the virtual machine comprises a virtual display card, the virtual display card is used for virtualizing a memory space of a user process into a virtual display memory, mapping the virtual display memory into a virtual memory space which can be directly accessed by a client operating system, storing a mapping relation and transmitting the mapping relation to the cloud desktop transmission protocol module; the system is also used for acquiring a drawing instruction request in a client operating system, separating the drawing instruction request into original image data and corresponding other drawing information, drawing the image data in a virtual video memory, adding the other drawing information into a drawing instruction buffer queue and sending the drawing information to a cloud desktop transmission protocol module;
the cloud desktop transmission protocol module is used for acquiring other drawing information in the drawing instruction buffer queue, reading corresponding image data in a virtual video memory of the virtual video card module according to the mapping relation between the virtual video memory and the virtual memory space, and transmitting the image data to the cloud desktop client through a cloud desktop transmission protocol code;
the cloud desktop transmission protocol module runs in a host machine operating system or a client machine operating system.
6. A cloud desktop based virtual graphics card implementation device is characterized by comprising a computer, wherein the computer is programmed or configured to execute the cloud desktop based virtual graphics card implementation method of any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program programmed or configured to execute the cloud desktop based virtual graphics card implementation method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011343253.0A CN112486609B (en) | 2020-11-25 | 2020-11-25 | Virtual display card implementation method and device based on cloud desktop |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011343253.0A CN112486609B (en) | 2020-11-25 | 2020-11-25 | Virtual display card implementation method and device based on cloud desktop |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112486609A CN112486609A (en) | 2021-03-12 |
CN112486609B true CN112486609B (en) | 2022-09-16 |
Family
ID=74934740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011343253.0A Active CN112486609B (en) | 2020-11-25 | 2020-11-25 | Virtual display card implementation method and device based on cloud desktop |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112486609B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113286005B (en) * | 2021-05-26 | 2023-01-20 | 北京金山云网络技术有限公司 | Screen capturing method and device, electronic equipment and storage medium |
CN113296865B (en) * | 2021-05-28 | 2022-09-06 | 贵州海誉科技股份有限公司 | Cloud desktop mouse position sensing and mouse operation event management method |
CN113656143B (en) * | 2021-08-16 | 2024-05-31 | 深圳市瑞驰信息技术有限公司 | Method and system for realizing secure Zhuo Rongqi direct-through display card |
CN114035719B (en) * | 2021-10-09 | 2024-04-26 | 湖南麒麟信安科技股份有限公司 | Remote desktop fluency performance evaluation method, system and medium |
CN113885758B (en) * | 2021-12-08 | 2022-02-25 | 统信软件技术有限公司 | Virtual screen generation method, computing device and storage medium |
CN115794294B (en) * | 2023-02-08 | 2023-06-02 | 麒麟软件有限公司 | Remote desktop implementation method and system of vhost-user-gpu virtual machine |
CN117170883B (en) * | 2023-11-02 | 2024-01-30 | 西安芯云半导体技术有限公司 | Method, device, equipment and storage medium for rendering display |
CN117251293B (en) * | 2023-11-14 | 2024-02-27 | 龙思云(北京)科技有限公司 | Method and system for realizing cloud desktop sharing GPU, host machine and virtual machine |
CN117519887B (en) * | 2023-12-13 | 2024-03-12 | 南京云玑信息科技有限公司 | Method and system for improving cloud computer remote operation experience |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101739289A (en) * | 2008-11-13 | 2010-06-16 | 闪联信息技术工程中心有限公司 | Method and device for setting display mode in Linux virtual machine |
CN105844581A (en) * | 2016-04-14 | 2016-08-10 | 北京极维客科技有限公司 | Image drawing method, apparatus and equipment |
CN110601969A (en) * | 2019-09-18 | 2019-12-20 | 神州云端(深圳)科技有限公司 | Universal remote desktop gateway implementation |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7681200B2 (en) * | 2005-07-22 | 2010-03-16 | Microsoft Corporation | Secure hardware desktop buffer composition |
CN102819820B (en) * | 2012-08-14 | 2014-03-12 | 长沙景嘉微电子股份有限公司 | Tiled rendering based implementation method for multi-pipeline rendering in GPU (graphics processing unit) |
-
2020
- 2020-11-25 CN CN202011343253.0A patent/CN112486609B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101739289A (en) * | 2008-11-13 | 2010-06-16 | 闪联信息技术工程中心有限公司 | Method and device for setting display mode in Linux virtual machine |
CN105844581A (en) * | 2016-04-14 | 2016-08-10 | 北京极维客科技有限公司 | Image drawing method, apparatus and equipment |
CN110601969A (en) * | 2019-09-18 | 2019-12-20 | 神州云端(深圳)科技有限公司 | Universal remote desktop gateway implementation |
Also Published As
Publication number | Publication date |
---|---|
CN112486609A (en) | 2021-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112486609B (en) | Virtual display card implementation method and device based on cloud desktop | |
US11397553B2 (en) | Method and system for identifying drawing primitives for selective transmission to a remote display | |
US9189261B2 (en) | Saving, transferring and recreating GPU context information across heterogeneous GPUs during hot migration of a virtual machine | |
US20170323418A1 (en) | Virtualized gpu in a virtual machine environment | |
US8441494B2 (en) | Method and system for copying a framebuffer for transmission to a remote display | |
US8629878B2 (en) | Extension to a hypervisor that utilizes graphics hardware on a host | |
US10002403B2 (en) | Command remoting | |
CN104660687A (en) | Realization method and system for virtual desktop display | |
US11204790B2 (en) | Display method for use in multi-operating systems and electronic device | |
CN111240631A (en) | Method and system for virtually transmitting Linux virtual machine screen picture based on AMD display card | |
JP2008526107A (en) | Using graphics processors in remote computing | |
US20140198112A1 (en) | Method of controlling information processing apparatus and information processing apparatus | |
WO2022068671A1 (en) | Cloud desktop display method and system | |
US20140059114A1 (en) | Application service providing system and method and server apparatus and client apparatus for application service | |
US10929079B2 (en) | Video display method, electronic device and computer program product | |
CN114968152B (en) | Method for reducing VIRTIO-GPU extra performance loss | |
US8860740B2 (en) | Method and apparatus for processing a display driver in virture desktop infrastructure | |
US9460481B2 (en) | Systems and methods for processing desktop graphics for remote display | |
CN113254129B (en) | Cloud desktop GPU direct-connection virtualization redirection management system and method | |
CN113379588A (en) | Rendering system for container applications | |
CN115794294A (en) | Method and system for realizing remote desktop of vhost-user-gpu virtual machine | |
US9064292B1 (en) | System for and method of classifying and translating graphics commands in client-server computing systems | |
US9183663B1 (en) | System for and method of classifying and translating graphics commands in client-server computing systems | |
CN113835816A (en) | Virtual machine desktop display method, device, equipment and readable storage medium | |
US20140237469A1 (en) | Firmware metadata and migration in virtualized systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |