A cloud desktop rendering method, device, equipment and readable storage medium

By building a graphics card resource pool and dynamically dividing graphics card resources, the problems of waste and performance limitation of cloud desktop graphics card resources are solved, and efficient allocation of graphics card resources and improvement of cloud desktop rendering performance are achieved.

CN118860698BActive Publication Date: 2025-03-07TIANJIN ZHUOLANG KUNLUN CLOUD SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411328810.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-03-07
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

In the prior art, cloud desktops have problems such as wasting graphics card resources, low utilization of graphics card resources, and limited rendering performance of cloud desktops when rendering using graphics cards.

Method used

By building a graphics card resource pool, unified management of each graphics card on the server, and dynamically divide the graphics card resources in the graphics card resource pool according to the graphics card resources required by the cloud desktop, achieving efficient allocation and utilization of graphics card resources.

Benefits of technology

It realizes dynamic, reasonable and efficient allocation of graphics card resources, avoids waste of graphics card resources, and improves cloud desktop rendering performance and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860698B_ABST
    Figure CN118860698B_ABST
Patent Text Reader

Abstract

The present application provides a rendering method, device, equipment and readable storage medium for a cloud desktop, which relates to the field of rendering technology, including: receiving a rendering request sent by a target cloud desktop connected to a server when running a target 3D program; sending the rendering request to a target rendering main process corresponding to the target cloud desktop, and allocating graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; controlling the target rendering main process to generate rendering instructions based on a rendering configuration file, and controlling the target rendering main process to execute rendering instructions based on the allocated graphics card resources; obtaining the rendering result obtained by the target rendering main process executing the rendering instruction; and sending the rendering result to the target cloud desktop corresponding to the target rendering main process for display. The present application realizes the dynamic, reasonable, efficient and flexible allocation and utilization of graphics card resources among different cloud desktops.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of rendering technology, and in particular to a rendering method, device, equipment and readable storage medium for a cloud desktop. Background Art

[0002] At present, when using graphics cards for rendering in a cloud desktop environment, the direct rendering method is widely adopted, that is, a one-to-one usage mode, which means that one physical graphics card can only correspond to one cloud desktop; because a cloud desktop will not completely occupy the computing power of a physical graphics card in most cases, the direct rendering method will lead to a waste of graphics card computing power, and the overall graphics card resource utilization is low, and the allocation of graphics card resources cannot be dynamically adjusted to meet the different resource requirements of different cloud desktops; at the same time, in a few cases, the computing power of a physical graphics card cannot meet the needs of a cloud desktop, which results in limited performance of the cloud desktop. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a cloud desktop rendering method, device, equipment and readable storage medium, so as to solve the problems of serious waste of graphics card resources, limited cloud desktop rendering performance and low graphics card resource utilization in the prior art, and to reasonably and efficiently allocate graphics card resources to complete the rendering of the cloud desktop.

[0004] In a first aspect, a method for rendering a cloud desktop is provided, and the method may include:

[0005] Receiving a rendering request sent by a target cloud desktop connected to a server when running a target 3D program; wherein the server sets a rendering main process for the target cloud desktop; the rendering request includes a rendering configuration file of the target 3D program and target resources required for rendering the target 3D program;

[0006] Use the rendering main process corresponding to the target cloud desktop as the target rendering main process;

[0007] Sending the rendering request to the target rendering main process, and allocating graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of each graphics card set on the server;

[0008] Controlling the target rendering main process to generate rendering instructions based on the rendering configuration file, and controlling the target rendering main process to execute the rendering instructions based on the divided graphics card resources;

[0009] Obtaining a rendering result obtained by executing the rendering instruction by the target rendering main process;

[0010] The rendering result is sent to the target cloud desktop corresponding to the target rendering main process for display.

[0011] In an optional implementation, the rendering request further includes: an identifier of the target 3D program;

[0012] Sending the rendering request to the target rendering main process includes:

[0013] The identifier of the target 3D program and the rendering configuration file are sent to the target rendering main process.

[0014] In an optional implementation, the target rendering main process is a 3D program running on the target cloud desktop corresponding to the target rendering main process, and each of them is provided with a corresponding rendering sub-process;

[0015] After controlling the target rendering main process to generate a rendering instruction based on the rendering configuration file, the method further includes:

[0016] According to the identifier of the target 3D program, a rendering subprocess corresponding to the target 3D program is determined as a target rendering subprocess.

[0017] In an optional implementation, controlling the target rendering main process to execute the rendering instruction based on the divided graphics card resources includes:

[0018] Control the target rendering main process to send the generated rendering instructions and the divided graphics card resources to the target rendering sub-process;

[0019] The target rendering subprocess is controlled to execute the rendering instruction based on the graphics card resources.

[0020] In an optional implementation, the target cloud desktop is pre-deployed with a rendering proxy component;

[0021] Before receiving a rendering request sent by a target cloud desktop connected to the server when running a target 3D program, the method further includes:

[0022] When the target cloud desktop runs the target 3D program, the rendering proxy component intercepts an initial rendering request sent by the target 3D program; wherein the initial rendering request includes a rendering configuration file and target resources required for rendering the target 3D program;

[0023] The rendering proxy component generates a rendering request based on the identifier of the target 3D program, the rendering configuration file, and the target resource, and sends the rendering request to the target cloud desktop;

[0024] The target cloud desktop sends the received rendering request to the server to which the target cloud desktop is connected by using a serial port and a shared memory.

[0025] In an optional implementation, sending the rendering result to a target cloud desktop corresponding to the target rendering main process includes:

[0026] The rendering result and the identifier of the target 3D program in the rendering request corresponding to the rendering result are sent to the target cloud desktop corresponding to the target rendering main process through the serial port and the shared memory.

[0027] In an optional implementation, after sending the rendering result to the target cloud desktop corresponding to the target rendering main process, the method further includes:

[0028] The rendering proxy component sends the rendering result to the corresponding target 3D program according to the identifier of the target 3D program, so that the target 3D program displays the rendering result.

[0029] In a second aspect, a rendering device for a cloud desktop is provided, which may include:

[0030] A receiving unit, configured to receive a rendering request sent by a target cloud desktop connected to a server when running a target 3D program; wherein the server sets a rendering master process for the target cloud desktop; the rendering request includes a rendering configuration file of the target 3D program and target resources required for rendering the target 3D program;

[0031] A determination unit, configured to use the rendering main process corresponding to the target cloud desktop as the target rendering main process;

[0032] An allocation unit, configured to send the rendering request to the target rendering main process, and allocate graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of various graphics cards arranged on the server;

[0033] A control unit, configured to control the target rendering main process to generate a rendering instruction based on the rendering configuration file, and control the target rendering main process to execute the rendering instruction based on the divided graphics card resources;

[0034] An acquisition unit, used for acquiring a rendering result obtained by the target rendering main process executing the rendering instruction;

[0035] The forwarding unit is used to send the rendering result to the target cloud desktop corresponding to the target rendering main process for display.

[0036] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0037] Memory, used to store computer programs;

[0038] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0039] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0040] This application uniformly manages the various graphics cards of the server by building a graphics card resource pool, and dynamically divides the graphics card resources in the graphics card resource pool according to the graphics card resources required by the cloud desktop, thereby realizing dynamic, reasonable, efficient and flexible allocation and utilization of graphics card resources among different cloud desktops; it not only avoids the waste of graphics card resources, but also solves the problem of limited cloud desktop performance caused by a physical graphics card being unable to meet the graphics card resources required by the cloud desktop.

[0041] This application uses a rendering proxy component in combination with serial ports and shared memory to send the rendering request of the cloud desktop's 3D program to the server for execution, and returns the rendering result to the 3D program for display, using the server's graphics card to complete the rendering task, and combined with the efficient data transmission of serial ports and shared memory, further optimizes the performance of the cloud desktop and improves the resource utilization efficiency of the cloud desktop. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flowchart of a cloud desktop rendering method provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of the structure of a cloud desktop rendering device provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] The rendering method of the cloud desktop provided in the embodiment of the present application can be applied in a server or in a terminal with strong computing power. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a user equipment (User Equipment, UE) such as a mobile phone, a smart phone, a laptop, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing equipment connected to a wireless modem, a mobile station (Mobile Station, MS), a mobile terminal (Mobile Terminal), etc. The terminal and the server can be directly or indirectly connected by wired or wireless communication, which is not limited in this application.

[0048] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0049] Figure 1 A flowchart of a cloud desktop rendering method provided in an embodiment of the present application is shown below. Figure 1 As shown, the method may include:

[0050] Step S110, receiving a rendering request sent by a target cloud desktop connected to the server when running a target 3D program; and using a rendering main process corresponding to the target cloud desktop as a target rendering main process.

[0051] In an embodiment of the present application, a server can be connected to multiple cloud desktops, and multiple physical graphics cards are arranged on the server; any cloud desktop can run at least one 3D program; the cloud desktop that is running the 3D program is taken as the target cloud desktop, and the 3D program running on the target cloud desktop is taken as the target 3D program; a rendering proxy component is pre-deployed on the target cloud desktop; specifically, the target cloud desktop and the target 3D program can be one or more; the target cloud desktop and the server transmit instructions and data through serial ports and shared memory.

[0052] In an embodiment of the present application, the server sets a rendering main process for the target cloud desktop; each rendering main process sets a rendering sub-process for the target 3D program; the server can simultaneously receive multiple rendering requests sent by multiple target cloud desktops, and can also simultaneously receive multiple rendering requests generated when different target 3D programs sent by a target cloud desktop are running simultaneously.

[0053] In an embodiment of the present application, when the cloud desktop runs a target 3D program, the target 3D program will generate an initial rendering request based on the rendering configuration file and the target resources required for rendering itself.

[0054] In the prior art, one cloud desktop corresponds to an actual physical graphics card. When a 3D program is running, a rendering request is generated based on the rendering configuration file and the required resources, and the device driver interface in the user mode driver (UMD) is called. At the same time, the physical graphics card of the terminal where the 3D program is located is used in conjunction with the kernel mode driver (KMD). At this time, even if the physical graphics card has idle graphics card resources, it can no longer be called by other cloud desktops of the terminal. When all the graphics card resources of the physical graphics card cannot meet the needs of the 3D program, a performance bottleneck will occur in the 3D program.

[0055] In an embodiment of the present application, in order to solve the above-mentioned problems existing in the prior art, a rendering proxy component is pre-deployed for each target cloud desktop; when the target cloud desktop runs the target 3D program, the rendering proxy component intercepts the initial rendering request that the target 3D program expects to send to the physical graphics card of the terminal where the 3D program is located; at the same time, the rendering proxy component generates a rendering request based on the identifier of the target 3D program, the rendering configuration file and the target resources, and sends the rendering request to the target cloud desktop; the target cloud desktop sends the received rendering request to the server connected to the target cloud desktop using the serial port and shared memory.

[0056] This application intercepts the initial rendering request sent by the target 3D program, thereby preventing the target 3D program from calling the physical graphics card of the terminal where it is located for rendering; then uses the rendering proxy component to package the target 3D program's identifier and the initial rendering request to generate a new rendering request, and uses the target cloud desktop to send it to the server, thereby using the server's graphics card to complete the rendering task of the target 3D program, and thus the rendering calculation of the target 3D program is executed on the server side.

[0057] In an embodiment of the present application, the rendering proxy component is implemented by customizing UMD and KMD through OpenGL and DirectX proxy technology; the rendering proxy component is used to completely take over the rendering work of the 3D program running on the cloud desktop through customized umd and kmd, and implement the underlying call of each rendering API; the present application uses the underlying device driver interface (DDI) of the OpenGL and DirectX rendering interface to not only ensure that the application running on the cloud desktop can seamlessly transfer the rendering task to the server for execution, but also ensure compatibility and performance.

[0058] In an embodiment of the present application, an initial rendering request includes a rendering configuration file and target resources required for rendering a target 3D program; the rendering request includes an identifier of a target 3D program, a rendering configuration file of the target 3D program, and target resources required for rendering the target 3D program; wherein the rendering configuration file is used to indicate a process for rendering the target 3D program; and the target resources include target sub-resources required for each process of rendering the target 3D program.

[0059] Step S120: Send the rendering request to the target rendering main process, and allocate graphics card resources with the same size as the target resources from the pre-built graphics card resource pool to the target rendering main process.

[0060] In an embodiment of the present application, since a target cloud desktop may run multiple target 3D programs at the same time, that is, there are multiple parallel target rendering sub-processes under the target rendering main process, the sum of the target resources required by all the target rendering sub-processes of the target cloud desktop is first determined, and the graphics card resources are divided; then the target rendering main process divides the overall graphics card resources to each target rendering sub-process according to the target resources required by each target 3D program.

[0061] In an embodiment of the present application, sending a rendering request to a target rendering main process includes: sending an identifier of a target 3D program and a rendering configuration file of the target 3D program to the target rendering main process.

[0062] In an embodiment of the present application, in order to more efficiently and reasonably manage all graphics card resources of the server, a graphics card resource pool is constructed based on the idle graphics card resources of each graphics card set on the server, which not only realizes the unified management of each graphics card of the server, but also can improve the utilization rate of the graphics card resources of each graphics card.

[0063] In an embodiment of the present application, the overall target resources required by each target cloud desktop are determined based on the target resources required by all target 3D programs running on the target cloud desktop; and based on the overall target resources, a corresponding number of graphics card resources are allocated from the graphics card resource pool to the rendering main process corresponding to the target cloud desktop, so that cloud desktops that require more computing power can obtain more resource support, while cloud desktops with less demand are allocated fewer resources; avoiding the situation where a single cloud desktop occupies the entire graphics card, not only realizes the dynamic allocation of graphics card resources according to the actual example requirements of each target cloud desktop, but also effectively avoids the waste of computing power, and can also cope with peak demand.

[0064] Step S130: Control the target rendering main process to generate rendering instructions based on the rendering configuration file, and control the target rendering main process to execute the rendering instructions based on the divided graphics card resources.

[0065] In an embodiment of the present application, after controlling the target rendering main process to generate rendering instructions based on the rendering configuration file, it is necessary to determine the rendering sub-process corresponding to the target 3D program as the target rendering sub-process according to the identifier of the target 3D program.

[0066] In an embodiment of the present application, controlling the target rendering main process to execute rendering instructions based on the divided graphics card resources includes: controlling the target rendering main process to send the generated rendering instructions and the divided graphics card resources to the target rendering sub-process; controlling the target rendering sub-process to execute rendering instructions based on the graphics card resources.

[0067] In the embodiment of the present application, each target 3D program corresponds to a rendering sub-process, thereby isolating the rendering tasks of different 3D programs and preventing the rendering anomaly of a single 3D program from affecting the normal execution of the rendering tasks of other 3D programs.

[0068] In an embodiment of the present application, the target rendering main process is used to generate corresponding rendering instructions based on the identifier of the target 3D program sent by the server and the rendering configuration file of the target 3D program, and send them to the target rendering sub-process corresponding to the target 3D program, and the target rendering sub-process completes the rendering task.

[0069] In an embodiment of the present application, if the rendering task of the target rendering sub-process becomes more complex, the target rendering sub-process generates a rendering resource request and sends it to the server using the target rendering main process; the server divides the corresponding graphics card resources from the graphics card resource pool according to the target resources required in the rendering resource request and forwards them to the target rendering sub-process that sends the rendering resource request through the corresponding target rendering main process, thereby avoiding performance bottlenecks.

[0070] Step S140, obtaining a rendering result obtained by executing a rendering instruction by a target rendering main process; and sending the rendering result to a target cloud desktop corresponding to the target rendering main process for display.

[0071] In an embodiment of the present application, after the target rendering sub-process executes the corresponding rendering instruction and obtains the rendering result, the identifier of the target 3D program in the rendering request corresponding to the rendering result and the rendering result will be sent to the server through the target rendering main process, and the server will then send it to the target cloud desktop corresponding to the target rendering main process through the serial port and shared memory.

[0072] In an embodiment of the present application, after the target cloud desktop receives the identifier of the target 3D program and the rendering result in the rendering request corresponding to the corresponding rendering result, the rendering proxy component sends the rendering result to the corresponding target 3D program according to the identifier of the target 3D program, so that the target 3D program displays the rendering result.

[0073] In the embodiment of the present application, the cloud desktop is equivalent to a virtual machine, which is equipped with a virtual graphics card (a graphics card device simulated by KMD). The virtual graphics card is used to receive instructions issued by the target 3D program and display the rendering results on a real device.

[0074] In an embodiment of the present application, whether it is a rendering request sent by the target cloud desktop to the server, or a rendering result and a corresponding 3D program identifier sent by the server to the target cloud desktop, they are transmitted simultaneously through the serial port and shared memory; specifically, the seial serial port socket is used as a signaling channel (which can transmit rendering requests, etc.), and the ivshmem shared memory is used as a transmission channel for big data (which can transmit rendering results or rendering configuration files), which are integrated into the communication method between the virtual machine and the Linux project, ensuring efficient communication.

[0075] Corresponding to the above method, the embodiment of the present application also provides a rendering device for a cloud desktop, such as Figure 2 As shown, the rendering device of the cloud desktop includes:

[0076] The receiving unit 210 is used to receive a rendering request sent by a target cloud desktop connected to the server when running a target 3D program; wherein the server sets a rendering main process for the target cloud desktop; the rendering request includes a rendering configuration file of the target 3D program and target resources required for rendering the target 3D program;

[0077] The determination unit 220 is used to use the rendering main process corresponding to the target cloud desktop as the target rendering main process;

[0078] The allocation unit 230 is used to send the rendering request to the target rendering main process, and allocate graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of each graphics card set on the server;

[0079] The control unit 240 is used to control the target rendering main process to generate rendering instructions based on the rendering configuration file, and to control the target rendering main process to execute the rendering instructions based on the divided graphics card resources;

[0080] An acquisition unit 250 is used to acquire a rendering result obtained by executing a rendering instruction by a target rendering main process;

[0081] The forwarding unit 260 is used to send the rendering result to the target cloud desktop corresponding to the target rendering main process for display.

[0082] The functions of each functional unit of the cloud desktop rendering device provided in the above embodiments of the present application can be realized through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the cloud desktop rendering device provided in the embodiments of the present application will not be repeated here.

[0083] The present application also provides an electronic device, such as Figure 3 As shown, it includes a processor 310 , a communication interface 320 , a memory 330 and a communication bus 340 , wherein the processor 310 , the communication interface 320 , and the memory 330 communicate with each other via the communication bus 340 .

[0084] Memory 330, for storing computer programs;

[0085] The processor 310 is used to execute the program stored in the memory 330 to implement the following steps:

[0086] Receiving a rendering request sent by a target cloud desktop connected to the server when running a target 3D program; wherein the server sets a rendering main process for the target cloud desktop; the rendering request includes a rendering configuration file of the target 3D program and target resources required for rendering the target 3D program;

[0087] Use the rendering main process corresponding to the target cloud desktop as the target rendering main process;

[0088] Sending a rendering request to a target rendering main process, and allocating graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of each graphics card set on the server;

[0089] Controlling the target rendering main process to generate rendering instructions based on the rendering configuration file, and controlling the target rendering main process to execute the rendering instructions based on the divided graphics card resources;

[0090] Get the rendering result obtained by executing the rendering instruction of the target rendering main process;

[0091] The rendering result is sent to the target cloud desktop corresponding to the target rendering main process for display.

[0092] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0093] The communication interface is used for communication between the above electronic device and other devices.

[0094] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0095] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0096] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 1 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0097] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the cloud desktop rendering method of any one of the above embodiments.

[0098] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the cloud desktop rendering methods in the above embodiments.

[0099] Those skilled in the art will appreciate that the embodiments in the present application can be provided as methods, systems, or computer program products. Therefore, the embodiments in the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments in the present application can be in the form of a computer program product 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 codes.

[0100] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0103] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0104] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. A cloud desktop rendering method, characterized in that: The method comprises: Receiving a rendering request sent by a target cloud desktop connected to a server when running a target 3D program; wherein the server sets a rendering master process for the target cloud desktop; the rendering request includes an identifier of the target 3D program, a rendering configuration file, and target resources required for rendering the target 3D program; The rendering main process corresponding to the target cloud desktop is used as the target rendering main process; the target rendering main process is a 3D program running on the target cloud desktop corresponding to the target rendering main process, and each of them is provided with a corresponding rendering subprocess; Sending the rendering request to the target rendering main process, and allocating graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of each graphics card set on the server; Controlling the target rendering main process to generate a rendering instruction based on the rendering configuration file, determining the rendering sub-process corresponding to the target 3D program as the target rendering sub-process according to the identifier of the target 3D program, and controlling the target rendering main process to execute the rendering instruction based on the divided graphics card resources; Obtaining a rendering result obtained by executing the rendering instruction by the target rendering main process; Sending the rendering result to the target cloud desktop corresponding to the target rendering main process for display; The controlling the target rendering main process to execute the rendering instruction based on the divided graphics card resources includes: Control the target rendering main process to send the generated rendering instructions and the divided graphics card resources to the target rendering sub-process; The target rendering subprocess is controlled to execute the rendering instruction based on the graphics card resources.

2. The method according to claim 1, characterized in that The rendering request also includes: an identifier of the target 3D program; Sending the rendering request to the target rendering main process includes: The identifier of the target 3D program and the rendering configuration file are sent to the target rendering main process.

3. The method according to claim 2, characterized in that The target cloud desktop is pre-deployed with a rendering proxy component; Before receiving a rendering request sent by a target cloud desktop connected to the server when running a target 3D program, the method further includes: When the target cloud desktop runs the target 3D program, the rendering proxy component intercepts an initial rendering request sent by the target 3D program; wherein the initial rendering request includes a rendering configuration file and target resources required for rendering the target 3D program; The rendering proxy component generates a rendering request based on the identifier of the target 3D program, the rendering configuration file, and the target resource, and sends the rendering request to the target cloud desktop; The target cloud desktop sends the received rendering request to the server to which the target cloud desktop is connected by using a serial port and a shared memory.

4. The method according to claim 2, characterized in that Sending the rendering result to the target cloud desktop corresponding to the target rendering main process includes: The rendering result and the identifier of the target 3D program in the rendering request corresponding to the rendering result are sent to the target cloud desktop corresponding to the target rendering main process through the serial port and the shared memory.

5. The method according to claim 3, characterized in that After sending the rendering result to the target cloud desktop corresponding to the target rendering main process, the method further includes: The rendering proxy component sends the rendering result to the corresponding target 3D program according to the identifier of the target 3D program, so that the target 3D program displays the rendering result.

6. A rendering device for a cloud desktop, characterized in that: The device comprises: A receiving unit, configured to receive a rendering request sent by a target cloud desktop connected to a server when running a target 3D program; wherein the server sets a rendering master process for the target cloud desktop; the rendering request includes an identifier of the target 3D program, a rendering configuration file, and target resources required for rendering the target 3D program; A determination unit is used to use the rendering main process corresponding to the target cloud desktop as the target rendering main process; the target rendering main process is a 3D program running on the target cloud desktop corresponding to the target rendering main process, and each of them is provided with a corresponding rendering sub-process; An allocation unit, configured to send the rendering request to the target rendering main process, and allocate graphics card resources of the same size as the target resources from a pre-built graphics card resource pool to the target rendering main process; wherein the graphics card resource pool is composed of idle graphics card resources of various graphics cards arranged on the server; A control unit, configured to control the target rendering main process to generate a rendering instruction based on the rendering configuration file, determine the rendering sub-process corresponding to the target 3D program as the target rendering sub-process according to the identifier of the target 3D program, and control the target rendering main process to execute the rendering instruction based on the divided graphics card resources; An acquisition unit, used for acquiring a rendering result obtained by the target rendering main process executing the rendering instruction; A forwarding unit, used for sending the rendering result to a target cloud desktop corresponding to the target rendering main process for display; The controlling the target rendering main process to execute the rendering instruction based on the divided graphics card resources includes: Control the target rendering main process to send the generated rendering instructions and the divided graphics card resources to the target rendering sub-process; The target rendering subprocess is controlled to execute the rendering instruction based on the graphics card resources.

7. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-5 when executing a program stored in a memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Video memory allocation method and device

    CN112506646A