Virtual machine sending and displaying method and device, electronic equipment and storage medium
By combining semi-virtualized and pure virtualized graphics processors in a virtual machine and switching rendering modes according to the graphics service status, the problems of large workload, poor robustness, and performance limitations in virtual machine display are solved, achieving efficient and stable image display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2025-11-27
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies suffer from problems such as high workload, poor robustness, limited scenarios, and limited performance in virtual machine display processes. In particular, when the graphics service is running in an unstable state, the reliability and efficiency of the image/video stream capture program are difficult to guarantee.
A combination of semi-virtualized and pure virtualized graphics processors is adopted, and the rendering mode is switched according to the running status of the graphics service: when the graphics service is on, the semi-virtualized and pure virtualized graphics processors jointly render and generate rendered image data; when the graphics service is off, the pure virtualized graphics processor renders alone. Data interaction and synchronization are achieved through a shared buffer, which simplifies the display process and improves robustness.
It simplifies the display process, improves the robustness of virtual machine image display, takes into account the performance requirements of different scenarios, solves the problems of large workload, limited scenarios and poor robustness, and achieves efficient image display.
Smart Images

Figure CN121879882A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud desktop technology, and in particular to a virtual machine display delivery method, a virtual machine display delivery device, an electronic device, and a storage medium. Background Technology
[0002] Graphics rendering is often performed using a graphics processor with corresponding performance based on performance requirements. The guest operating system of the virtual machine is responsible for capturing image / video streams and then sending them to the client for display via desktop protocols. However, this method suffers from problems such as high workload, poor robustness, limited scene selection, and performance limitations. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a virtual machine display method, a virtual machine display device, an electronic device, and a storage medium that overcome or at least partially solve the above problems.
[0004] To address the aforementioned problems, in a first aspect of the present invention, an embodiment of the present invention discloses a virtual machine display method, wherein the virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor, the method comprising: In response to received graphics processing data, detect the running status of the graphics service; When the graphics service is running, the semi-virtualized graphics processor and the pure virtualized graphics processor are controlled to jointly render the graphics processing data and generate rendered image data. When the graphics service is in a closed state, the pure virtualized graphics processor is controlled to render the graphics processing data and generate rendered image data. Display the rendered image data.
[0005] Optionally, the semi-virtualized graphics processor and the pure virtualized graphics processor interact through a shared buffer. The step of controlling the semi-virtualized and pure virtualized graphics processors to render the graphics processing data and generate rendered image data when the graphics service is running includes: When the graphics service is running, the semi-virtualized graphics processor is controlled to render the graphics processing data and generate initial rendering data. The initial rendering data is stored in the shared buffer; The pure virtualized graphics processor is controlled to read the initial rendering data from the shared buffer and generate the rendered image data.
[0006] Optionally, the method includes: Receive driver memory setting parameters for the pure virtualized graphics processor; The pure virtualized graphics processor is updated based on the driver memory settings parameters to enable the pure virtualized graphics processor to communicate with the shared buffer.
[0007] Optionally, the method includes: Receive frame rate setting parameters for the purely virtualized graphics processor; The pure virtualized graphics processor is updated based on the frame rate setting parameters to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
[0008] Optionally, the method includes: Receive graphics service configuration instructions; Based on the graphics service configuration instructions, the semi-virtualized graphics processor is determined to be the primary virtualized graphics processor; the pure virtualized graphics processor is determined to be the backup virtualized graphics processor.
[0009] Optionally, the step of detecting the running status of the graphics service includes: Obtain the identifier feature value corresponding to the running status of the graphics service; The operating status of the graphics service is determined based on the identified feature values.
[0010] Optionally, the semi-virtualized graphics processor is an xGPU, and the fully virtualized graphics processor is a VirtGPU.
[0011] In a second aspect, embodiments of the present invention disclose a virtual machine display device, wherein the virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor, and the device includes: The detection module is used to detect the running status of the graphics service in response to the received graphics processing data; The first rendering module is used to control the semi-virtualized graphics processor and the pure virtualized graphics processor to jointly render the graphics processing data and generate rendered image data when the graphics service is running. The second rendering module is used to control the pure virtualized graphics processor to render the graphics processing data and generate rendered image data when the graphics service is in a closed state. The display module is used to display the rendered image data.
[0012] Optionally, the semi-virtualized graphics processor and the fully virtualized graphics processor interact via a shared buffer, and the first rendering module includes: The first rendering submodule is used to control the semi-virtualized graphics processor to render the graphics processing data and generate initial rendering data when the graphics service is running. A caching submodule is used to store the initial rendering data in the shared buffer; The display module is used to control the pure virtualized graphics processor to read the initial rendering data from the shared buffer and generate the rendered image data.
[0013] Optionally, the device further includes: The first receiving module is used to receive the driver memory setting parameters for the pure virtualized graphics processor; The first update module is used to update the pure virtualized graphics processor based on the driver memory setting parameters, so that the pure virtualized graphics processor can communicate with the shared buffer.
[0014] Optionally, the device further includes: The second receiving module is used to receive frame rate setting parameters for the pure virtualized graphics processor; The second update module is used to update the pure virtualized graphics processor based on the frame rate setting parameters, so as to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
[0015] Optionally, the device further includes: The third receiving module is used to receive graphics service configuration instructions; The configuration module is used to determine, based on the graphics service configuration instructions, the semi-virtualized graphics processor as the primary virtualized graphics processor and the pure virtualized graphics processor as the backup virtualized graphics processor.
[0016] Optionally, the detection module includes: The acquisition submodule is used to obtain the identifier feature value corresponding to the running status of the graphics service; The matching submodule is used to determine the running status of the graphics service based on the identifier feature value.
[0017] Optionally, the semi-virtualized graphics processor is an xGPU, and the fully virtualized graphics processor is a VirtGPU.
[0018] In a third aspect, an embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the virtual machine display method described above.
[0019] In a fourth aspect, embodiments of the present invention disclose a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the virtual machine display method described above.
[0020] The embodiments of the present invention have the following advantages: This invention, in response to received graphics processing data, detects the running status of the graphics service. When the graphics service is running, it controls both a semi-virtualized graphics processor and a pure virtualized graphics processor to jointly render the graphics processing data, generating rendered image data. When the graphics service is running, it controls the pure virtualized graphics processor to render the graphics processing data, generating rendered image data. The rendered image data is then displayed. The pure virtualized graphics processor can directly share the rendering results with the semi-virtualized graphics processor for display, eliminating the need for additional image / video stream capture programs, simplifying the display process while improving robustness. Furthermore, when the graphics service is off, the image of the virtual machine can be directly displayed through the pure virtualized graphics processor; while when the graphics service is on, rendering acceleration can be achieved through the semi-virtualized graphics processor. By using different rendering and display methods in different situations, both performance and scene diversity are considered. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the steps of an embodiment of the virtual machine display method of the present invention; Figure 2 This is a flowchart of another embodiment of the virtual machine display method of the present invention; Figure 3 This is an example of a virtual machine display sending method according to the present invention, where the graphics service is in the enabled state and the display sending intention is as follows; Figure 4 This is an example of a virtual machine display sending method according to the present invention, where the graphics service is in a closed state. Figure 5 This is a structural block diagram of an embodiment of the virtual machine display device of the present invention; Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present invention; Figure 7 This is a structural block diagram of a storage medium provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] The approach of having the virtual machine client's operating system capture image / video streams and then send them to the client for display via desktop protocols has the following drawbacks: The workload is significant: it requires redesigning and implementing dedicated image / video stream capture programs (for example, image capture methods vary depending on the graphics service (X11 / Wayland), while video stream capture methods vary depending on the GPU (Graphics Processing Unit) manufacturer), failing to maximize the reuse of existing display technologies, which not only increases the costs of development, debugging, and maintenance.
[0024] Limited Scenario: Image / video stream capture programs typically reside within the virtual machine client's operating system. Therefore, the image / video stream capture process can only begin after the virtual machine client boots up and initializes its graphics service. Consequently, many scenarios cannot be captured (e.g., system installation processes, BIOS / UEFI interfaces, system boot screens, power-on / shutdown animations, etc.). Furthermore, since logging out / switching users synchronously switches the graphics service, the image / video stream capture program also needs to dynamically switch the captured objects, inevitably resulting in the loss of some footage. This not only impacts the user experience for ordinary users but also increases the development, installation, debugging, and maintenance difficulty for developers and operations personnel.
[0025] Poor robustness: The image / video stream acquisition process is located within the virtual machine client operating system, which is easily affected by the stability, load, and running applications of the virtual machine client operating system. The image / video stream acquisition process is prone to problems such as slow operation, freezing, and crashing (which manifests as screen stuttering, freezing, and black screen on the client).
[0026] Performance limitations: Video streams are captured and encoded directly through the GPU SDK, which often results in high performance (depending on GPU performance). However, image capture is usually performed through the graphics service APIs of the virtual machine client operating system (such as XGetImage in the X11 system). Its capture, copying, and transmission performance decreases as the resolution increases, making it difficult to meet the requirements of high resolution and high frame rate.
[0027] The present invention addresses the aforementioned technical problems.
[0028] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of a virtual machine display submission method according to the present invention. The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor. The virtual machine display submission method may specifically include the following steps: Step 101: In response to the received graphics processing data, detect the running status of the graphics service; When an image needs to be displayed, the virtual machine can receive the graphics processing data that needs to be rendered. In response to the received graphics processing data, it can detect the running status of the graphics service in the current operating system.
[0029] Step 102: With the graphics service running in the enabled state, control the semi-virtualized graphics processor and the pure virtualized graphics processor to jointly render the graphics processing data and generate rendered image data. When the graphics service is running and high-precision graphics processing is required, the semi-virtualized graphics processor can be controlled to perform image rendering, while the pure virtualized graphics processor can be used to render the graphics processing data and generate rendered image data, which is then sent to the cloud desktop of the virtual machine.
[0030] Step 103: When the graphics service is in the off state, control the pure virtualized graphics processor to render the graphics processing data and generate rendered image data. When the graphics service is off, low-precision rendering of graphics is sufficient. The graphics processing data can be rendered by controlling the pure virtualized graphics processor to generate rendered image data and send it to the cloud desktop of the virtual machine.
[0031] Step 104: Display the rendered image data.
[0032] The rendered image data sent to the display panel is displayed to provide display services to users.
[0033] This invention, in response to received graphics processing data, detects the running status of the graphics service. When the graphics service is running, it controls both a semi-virtualized graphics processor and a pure virtualized graphics processor to jointly render the graphics processing data, generating rendered image data. When the graphics service is running, it controls the pure virtualized graphics processor to render the graphics processing data, generating rendered image data. The rendered image data is then displayed. The pure virtualized graphics processor can directly share the rendering results with the semi-virtualized graphics processor for display, eliminating the need for additional image / video stream capture programs, simplifying the display process while improving robustness. Furthermore, when the graphics service is off, the image of the virtual machine can be directly displayed through the pure virtualized graphics processor; while when the graphics service is on, rendering acceleration can be achieved through the semi-virtualized graphics processor. By using different rendering and display methods in different situations, both performance and scene diversity are considered.
[0034] Reference Figure 2This document illustrates a flowchart of another embodiment of the virtual machine display delivery method of the present invention. The virtual machine has a semi-virtualized graphics processor and a pure virtualized graphics processor. The semi-virtualized graphics processor includes an xGPU, and the pure virtualized graphics processor includes a VirtGPU. In this embodiment, the semi-virtualized graphics processor includes an xGPU. The "x" in xGPU generally refers to GPU virtualization technologies such as "passthrough" and "virtual," and combined with "GPU" represents various virtualized GPUs (except for VirtIO-GPU), such as vGPU. vGPUs are created by dividing the physical GPU into several vGPUs using software / hardware technologies such as time slicing and SR-IOV, and allocating them to different Guests (virtual machine guests) to achieve multi-Guest sharing of the Host's (virtual machine's) physical GPU. VirtGPU is a GPU virtualized under the VirtIO framework's GPU semi-virtualization technology. VirtIO is a Linux I / O semi-virtualization framework.
[0035] The virtual machine display method may specifically include the following steps: Step 201: Receive driver memory setting parameters for the pure virtualized graphics processor; Before processing the display output, the paravirtualized and pure virtualized graphics processors (GPUs) can be selected and configured to enable them to work together. First, the driver services for the pure virtualized GPU can be configured to allow data exchange between the pure and paravirtualized GPUs at the driver level. Driver memory settings parameters for the pure virtualized GPU can be received. These parameters are used to adjust the memory services at the driver level of the pure virtualized GPU.
[0036] Step 202: Update the pure virtualized graphics processor based on the driver memory setting parameters to enable the pure virtualized graphics processor to connect with the shared buffer; The driver services of a purely virtualized graphics processor (GPU) can be adjusted using driver memory settings, thereby updating the GPU's driver services and enabling it to communicate with the shared buffer. The purely virtualized GPU can then read data output by the semi-virtualized GPU through the shared buffer. For example, by adding code to the VirtGPU driver code that accesses the DMA-BUF (shared buffer name) cache as a driver memory setting parameter, the purely virtualized GPU can implement the DMA-BUF import function. The xGPU driver in this embodiment supports DMA-BUF export functionality. Therefore, VirtGPU can read data output by xGPU from the DMA-BUF. DMA-BUF refers to a cross-device / subsystem memory buffer sharing framework within the Linux kernel, which can be used to share buffers between different GPUs.
[0037] Step 203: Receive frame rate setting parameters for the pure virtualized graphics processor; Correspondingly, the frame rate of the pure virtualized graphics processor can be adjusted so that both the pure virtualized and semi-virtualized graphics processors use the same frame rate for data processing, ensuring operational reliability. Frame rate setting parameters for the pure virtualized graphics processor can be received. These parameters are used to adjust the data processing frequency of the pure virtualized graphics processor.
[0038] Step 204: Update the pure virtualized graphics processor based on the frame rate setting parameters to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor. The frame rate of a purely virtualized graphics processor (GPU) can be adjusted using frame rate settings, thereby synchronizing the frame rates of the GPU and the semi-virtualized GPU. Both GPUs can then process data synchronously at the same frame rate. For example, adding code to the VirtGPU driver that incorporates BVBLANK (Vertical Blanking Period, a feature used by the Linux kernel to achieve vertical frame synchronization) as a frame rate setting parameter enables the purely virtualized GPU to implement BVBLANK functionality. By synchronizing VirtGPU and xGPU using BVBLANK, they can work in a synchronized and coordinated manner.
[0039] Step 205: Receive graphics service configuration instructions; It also allows configuration of the functions of the two graphics processors to ensure they operate in an orderly manner. It can receive graphics service configuration commands, which can be entered and confirmed by the user.
[0040] Step 206: Based on the graphics service configuration instructions, determine the semi-virtualized graphics processor as the primary virtualized graphics processor; determine the pure virtualized graphics processor as the backup virtualized graphics processor; Upon receiving the graphics service configuration command, the two graphics processors are configured accordingly. The semi-virtualized graphics processor is configured as the primary virtualized graphics processor, and the pure virtualized graphics processor is configured as the backup virtualized graphics processor. This allows the semi-virtualized graphics processor to be used for image rendering, while the pure virtualized graphics processor is used for image display.
[0041] Step 207: In response to the received graphics processing data, detect the running status of the graphics service; After completing the above configuration, you can receive graphics processing data that needs to be processed. In response to the received graphics processing data, check the running status of the graphics service.
[0042] In an optional embodiment of the present invention, the step of detecting the operating status of the graphics service includes: Sub-step S2071: Obtain the identifier feature value corresponding to the running status of the graphics service; It can obtain the identifier feature value corresponding to the running status of the graphics service in the log.
[0043] Sub-step S2072: Determine the operating status of the graphics service based on the identified feature value.
[0044] The operating status of a graphics service is determined by the specific numerical value of its identifier. For example, a first specific identifier might represent the graphics service as "on," while a second specific identifier might represent it as "off." The identifier value recorded in the log corresponding to the graphics service's operating status can be retrieved. If the identifier value is the first specific identifier value, the graphics service is determined to be on; if the identifier value is the second specific identifier value, the graphics service is determined to be off.
[0045] Step 208: With the graphics service running in the enabled state, control the semi-virtualized graphics processor and the pure virtualized graphics processor to jointly render the graphics processing data and generate rendered image data. When the graphics service is running, both semi-virtualized and pure virtualized graphics processors can be used simultaneously for processing. The semi-virtualized and pure virtualized graphics processors can be controlled to jointly render the graphics processing data, generate rendered image data, and send it for display.
[0046] In an optional embodiment of the present invention, the semi-virtualized graphics processor and the pure virtualized graphics processor interact through a shared buffer. The step of controlling the semi-virtualized graphics processor and the pure virtualized graphics processor to render the graphics processing data and generate rendered image data when the graphics service is running includes: Sub-step S2081: When the graphics service is running in the enabled state, control the semi-virtualized graphics processor to render the graphics processing data and generate initial rendering data. With the graphics service running, the semi-virtualized graphics processor can be controlled to render the graphics processing data. The processing performance of the semi-virtualized graphics processor is used to process the graphics processing data with high quality and generate the initial rendering data.
[0047] Sub-step S2082: Store the initial rendering data in the shared buffer; Then, the initial rendering data processed by the semi-virtualized graphics processor is exported and stored in a shared buffer.
[0048] Sub-step S2083: Control the pure virtualized graphics processor to read the initial rendering data from the shared buffer and generate the rendered image data.
[0049] Finally, the pure virtualized graphics processor reads the initial rendering data from the shared buffer. By reading the initial rendering data from the driver layer, robustness can be improved. The read initial rendering data is then processed to generate rendered image data, which is then sent to the display.
[0050] For example, you can refer to Figure 3 After the graphics service starts up and before it shuts down, xGPU is responsible for graphics rendering, while VirtGPU obtains the rendering results through DMA-BUF and sends them to the display. The graphics server coordinates the synchronous work of VirtGPU and xGPU through the VBLANK signal to avoid screen tearing.
[0051] Step 209: When the graphics service is in a closed state, control the pure virtualized graphics processor to render the graphics processing data and generate rendered image data. When the graphics service is off, a single graphics processor can be used to meet the needs of low-performance scenarios. The purely virtualized graphics processor can be controlled to render graphics data, generate rendered image data, and send it to the display. For example, refer to... Figure 4Before or after the graphics service starts (e.g., during the power-on / power-off process), xGPU is not used; instead, VirtGPU is used to display the system installation process, BIOS / UEFI interface, system boot menu, power-on / power-off animations, etc.
[0052] Step 210: Display the rendered image data.
[0053] The rendered image data is displayed, allowing users to perform corresponding operations through the cloud desktop corresponding to the image data.
[0054] This invention, by using xGPU while retaining VirtGPU, compensates for the shortcomings of a pure xGPU solution. When graphics services are disabled: VirtGPU operates as a single graphics card, displaying system installation processes, BIOS / UEFI interfaces, system boot interfaces, and boot animations, thus overcoming the limited scenarios of a pure xGPU solution. When graphics services are enabled, a dual-graphics card approach (VirtGPU + xGPU) is used. VirtGPU accesses and displays the image rendering results of xGPU at the kernel level through shared caching technologies such as DMA-BUF, eliminating the need to redesign and implement dedicated image / video stream capture programs. By reusing PRIME technology, the high workload of a pure xGPU solution is mitigated. Furthermore, since it is implemented at the kernel level, it overcomes the poor robustness of a pure xGPU solution. Accessing xGPU-rendered images through shared caching technologies like DMA-BUF eliminates reliance on specific graphics service APIs, thus overcoming the performance limitations of a pure xGPU solution.
[0055] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0056] Reference Figure 5 The diagram illustrates a structural block diagram of an embodiment of a virtual machine display device according to the present invention. The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor. The virtual machine display device may specifically include the following modules: The detection module 501 is used to detect the running status of the graphics service in response to the received graphics processing data; The first rendering module 502 is used to control the semi-virtualized graphics processor and the pure virtualized graphics processor to jointly render the graphics processing data and generate rendered image data when the graphics service is running in the enabled state. The second rendering module 503 is used to control the pure virtualized graphics processor to render the graphics processing data and generate rendered image data when the graphics service is in a closed state. Display module 504 is used to display the rendered image data.
[0057] In an optional embodiment of the present invention, the semi-virtualized graphics processor and the fully virtualized graphics processor interact via a shared buffer, and the first rendering module 502 includes: The first rendering submodule is used to control the semi-virtualized graphics processor to render the graphics processing data and generate initial rendering data when the graphics service is running. A caching submodule is used to store the initial rendering data in the shared buffer; The display module is used to control the pure virtualized graphics processor to read the initial rendering data from the shared buffer and generate the rendered image data.
[0058] In an optional embodiment of the present invention, the apparatus further includes: The first receiving module is used to receive the driver memory setting parameters for the pure virtualized graphics processor; The first update module is used to update the pure virtualized graphics processor based on the driver memory setting parameters, so that the pure virtualized graphics processor can communicate with the shared buffer.
[0059] In an optional embodiment of the present invention, the apparatus further includes: The second receiving module is used to receive frame rate setting parameters for the pure virtualized graphics processor; The second update module is used to update the pure virtualized graphics processor based on the frame rate setting parameters, so as to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
[0060] In an optional embodiment of the present invention, the apparatus further includes: The third receiving module is used to receive graphics service configuration instructions; The configuration module is used to determine, based on the graphics service configuration instructions, the semi-virtualized graphics processor as the primary virtualized graphics processor and the pure virtualized graphics processor as the backup virtualized graphics processor.
[0061] In an optional embodiment of the present invention, the detection module 501 includes: The acquisition submodule is used to obtain the identifier feature value corresponding to the running status of the graphics service; The matching submodule is used to determine the running status of the graphics service based on the identifier feature value.
[0062] In an optional embodiment of the present invention, the semi-virtualized graphics processor is an xGPU, and the fully virtualized graphics processor is a VirtGPU.
[0063] This invention, in response to received graphics processing data, detects the running status of the graphics service. When the graphics service is running, it controls both a semi-virtualized graphics processor and a pure virtualized graphics processor to jointly render the graphics processing data, generating rendered image data. When the graphics service is running, it controls the pure virtualized graphics processor to render the graphics processing data, generating rendered image data. The rendered image data is then displayed. The pure virtualized graphics processor can directly share the rendering results with the semi-virtualized graphics processor for display, eliminating the need for additional image / video stream capture programs, simplifying the display process while improving robustness. Furthermore, when the graphics service is off, the image of the virtual machine can be directly displayed through the pure virtualized graphics processor; while when the graphics service is on, rendering acceleration can be achieved through the semi-virtualized graphics processor. By using different rendering and display methods in different situations, both performance and scene diversity are considered.
[0064] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0065] Reference Figure 6 The present invention also provides an electronic device, comprising: A processor 601 and a memory 602 are provided. The memory 602 stores a computer program executable by the processor 601. When the electronic device is controlled to run, the processor 601 executes the computer program to implement the virtual machine display method as described in any embodiment of the present invention. The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor. The virtual machine display method includes: In response to received graphics processing data, detect the running status of the graphics service; When the graphics service is running, the semi-virtualized graphics processor and the pure virtualized graphics processor are controlled to jointly render the graphics processing data and generate rendered image data. When the graphics service is in a closed state, the pure virtualized graphics processor is controlled to render the graphics processing data and generate rendered image data. Display the rendered image data.
[0066] Optionally, the semi-virtualized graphics processor and the pure virtualized graphics processor interact through a shared buffer. The step of controlling the semi-virtualized and pure virtualized graphics processors to render the graphics processing data and generate rendered image data when the graphics service is running includes: When the graphics service is running, the semi-virtualized graphics processor is controlled to render the graphics processing data and generate initial rendering data. The initial rendering data is stored in the shared buffer; The pure virtualized graphics processor is controlled to read the initial rendering data from the shared buffer and generate the rendered image data.
[0067] Optionally, the method includes: Receive driver memory setting parameters for the pure virtualized graphics processor; The pure virtualized graphics processor is updated based on the driver memory settings parameters to enable the pure virtualized graphics processor to communicate with the shared buffer.
[0068] Optionally, the method includes: Receive frame rate setting parameters for the purely virtualized graphics processor; The pure virtualized graphics processor is updated based on the frame rate setting parameters to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
[0069] Optionally, the method includes: Receive graphics service configuration instructions; Based on the graphics service configuration instructions, the semi-virtualized graphics processor is determined to be the primary virtualized graphics processor; the pure virtualized graphics processor is determined to be the backup virtualized graphics processor.
[0070] Optionally, the step of detecting the running status of the graphics service includes: Obtain the identifier feature value corresponding to the running status of the graphics service; The operating status of the graphics service is determined based on the identified feature values.
[0071] Optionally, the semi-virtualized graphics processor is an xGPU, and the fully virtualized graphics processor is a VirtGPU.
[0072] This invention, in response to received graphics processing data, detects the running status of the graphics service. When the graphics service is running, it controls both a semi-virtualized graphics processor and a pure virtualized graphics processor to jointly render the graphics processing data, generating rendered image data. When the graphics service is running, it controls the pure virtualized graphics processor to render the graphics processing data, generating rendered image data. The rendered image data is then displayed. The pure virtualized graphics processor can directly share the rendering results with the semi-virtualized graphics processor for display, eliminating the need for additional image / video stream capture programs, simplifying the display process while improving robustness. Furthermore, when the graphics service is off, the image of the virtual machine can be directly displayed through the pure virtualized graphics processor; while when the graphics service is on, rendering acceleration can be achieved through the semi-virtualized graphics processor. By using different rendering and display methods in different situations, both performance and scene diversity are considered.
[0073] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0074] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0075] Reference Figure 7 This invention also provides a computer-readable storage medium 701, on which a computer program is stored. When a processor executes the computer program, it performs the virtual machine display delivery method as described in any one of the embodiments of this invention. The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor. The virtual machine display delivery method includes: In response to received graphics processing data, detect the running status of the graphics service; When the graphics service is running, the semi-virtualized graphics processor and the pure virtualized graphics processor are controlled to jointly render the graphics processing data and generate rendered image data. When the graphics service is in a closed state, the pure virtualized graphics processor is controlled to render the graphics processing data and generate rendered image data. Display the rendered image data.
[0076] Optionally, the semi-virtualized graphics processor and the pure virtualized graphics processor interact through a shared buffer. The step of controlling the semi-virtualized and pure virtualized graphics processors to render the graphics processing data and generate rendered image data when the graphics service is running includes: When the graphics service is running, the semi-virtualized graphics processor is controlled to render the graphics processing data and generate initial rendering data. The initial rendering data is stored in the shared buffer; The pure virtualized graphics processor is controlled to read the initial rendering data from the shared buffer and generate the rendered image data.
[0077] Optionally, the method includes: Receive driver memory setting parameters for the pure virtualized graphics processor; The pure virtualized graphics processor is updated based on the driver memory settings parameters to enable the pure virtualized graphics processor to communicate with the shared buffer.
[0078] Optionally, the method includes: Receive frame rate setting parameters for the purely virtualized graphics processor; The pure virtualized graphics processor is updated based on the frame rate setting parameters to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
[0079] Optionally, the method includes: Receive graphics service configuration instructions; Based on the graphics service configuration instructions, the semi-virtualized graphics processor is determined to be the primary virtualized graphics processor; the pure virtualized graphics processor is determined to be the backup virtualized graphics processor.
[0080] Optionally, the step of detecting the running status of the graphics service includes: Obtain the identifier feature value corresponding to the running status of the graphics service; The operating status of the graphics service is determined based on the identified feature values.
[0081] Optionally, the semi-virtualized graphics processor is an xGPU, and the fully virtualized graphics processor is a VirtGPU.
[0082] This invention, in response to received graphics processing data, detects the running status of the graphics service. When the graphics service is running, it controls both a semi-virtualized graphics processor and a pure virtualized graphics processor to jointly render the graphics processing data, generating rendered image data. When the graphics service is running, it controls the pure virtualized graphics processor to render the graphics processing data, generating rendered image data. The rendered image data is then displayed. The pure virtualized graphics processor can directly share the rendering results with the semi-virtualized graphics processor for display, eliminating the need for additional image / video stream capture programs, simplifying the display process while improving robustness. Furthermore, when the graphics service is off, the image of the virtual machine can be directly displayed through the pure virtualized graphics processor; while when the graphics service is on, rendering acceleration can be achieved through the semi-virtualized graphics processor. By using different rendering and display methods in different situations, both performance and scene diversity are considered.
[0083] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0088] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0089] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0090] The present invention has provided a detailed description of a virtual machine display sending method, a virtual machine display sending device, an electronic device, and a storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for virtual machine rendering, the method comprising: The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor, and the method includes: In response to received graphics processing data, detect the running status of the graphics service; When the graphics service is running, the semi-virtualized graphics processor and the pure virtualized graphics processor are controlled to jointly render the graphics processing data and generate rendered image data. When the graphics service is in a closed state, the pure virtualized graphics processor is controlled to render the graphics processing data and generate rendered image data. Display the rendered image data.
2. The method of claim 1, wherein, The semi-virtualized graphics processor and the pure virtualized graphics processor interact through a shared buffer. The step of controlling the semi-virtualized and pure virtualized graphics processors to render the graphics processing data and generate rendered image data, when the graphics service is enabled, includes: When the graphics service is running, the semi-virtualized graphics processor is controlled to render the graphics processing data and generate initial rendering data. The initial rendering data is stored in the shared buffer; The pure virtualized graphics processor is controlled to read the initial rendering data from the shared buffer and generate the rendered image data.
3. The method of claim 1, wherein, The method includes: Receive driver memory setting parameters for the pure virtualized graphics processor; The pure virtualized graphics processor is updated based on the driver memory settings parameters to enable the pure virtualized graphics processor to communicate with the shared buffer.
4. The method of claim 1, wherein, The method includes: Receive frame rate setting parameters for the purely virtualized graphics processor; The pure virtualized graphics processor is updated based on the frame rate setting parameters to synchronize the frame rate of the pure virtualized graphics processor with that of the semi-virtualized graphics processor.
5. The method of claim 1, wherein, The method includes: Receive graphics service configuration instructions; Based on the graphics service configuration instructions, the semi-virtualized graphics processor is determined to be the primary virtualized graphics processor; the pure virtualized graphics processor is determined to be the backup virtualized graphics processor.
6. The method of claim 1, wherein, The steps for detecting the running status of the graphics service include: Obtain the identifier feature value corresponding to the running status of the graphics service; The operating status of the graphics service is determined based on the identified feature values.
7. The method according to any one of claims 1 to 6, characterized in that, The semi-virtualized graphics processor is xGPU, and the fully virtualized graphics processor is VirtGPU.
8. A virtual machine display apparatus characterized by comprising: The virtual machine has a semi-virtualized graphics processor and a fully virtualized graphics processor, and the device includes: The detection module is used to detect the running status of the graphics service in response to the received graphics processing data; The first rendering module is used to control the semi-virtualized graphics processor and the pure virtualized graphics processor to jointly render the graphics processing data and generate rendered image data when the graphics service is running. The second rendering module is used to control the pure virtualized graphics processor to render the graphics processing data and generate rendered image data when the graphics service is in a closed state. The display module is used to display the rendered image data.
9. An electronic device, comprising: It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the virtual machine display method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the virtual machine display method as described in any one of claims 1 to 7.