A cloud rendering method, device and related equipment

By receiving user and scene identification in the cloud rendering method, determining the target process and creating threads, multi-process and multi-thread concurrent processing is realized, solving the problem of low GPU resource utilization in the existing cloud rendering method, improving rendering efficiency and Cost effective.

CN118037997BActive Publication Date: 2024-09-06北京数原数字化城市研究中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410188530.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2024-09-06
Estimated Expiration
2044-02-20

AI Technical Summary

Technical Problem

When existing cloud rendering methods render multiple scenes to different users, GPU resource utilization is low, resulting in prolonged rendering time and increased time for users to wait for virtual scenes to load.

Method used

By receiving request messages carrying user ID and target scene ID, the target process is determined and GPU resources are allocated, and the target thread associated with the user ID is created. Based on multi-process and multi-thread concurrent processing, GPU resource utilization is improved.

Benefits of technology

It improves the effective utilization of GPU resources, reduces the cost of Metaverse cloud rendering, meets the rendering needs of multiple users for different scenes and perspectives, and reduces rendering time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118037997B
    Figure CN118037997B
Patent Text Reader

Abstract

The present invention provides a cloud rendering method, device and related equipment, which relates to the field of cloud rendering technology. The method includes: receiving a first request message, the first request message is used to request the rendering service of a target scene, the first request message includes a user identifier and an identifier of the target scene; according to the identifier of the target scene, determining a target process associated with the identifier of the target scene, the target process is allocated with at least part of the GPU resources provided by a graphics processor GPU card; creating a target thread associated with the user identifier in the target process; controlling the target thread to render the image of the target scene based on the viewing angle parameters corresponding to the user identifier. It meets the needs of rendering multiple scenes for different users to roam and watch, and at the same time meets the needs of multiple users to roam and watch a certain scene with their own different viewing angle parameters, improves the effective utilization rate of GPU resources, and reduces the cost of metaverse cloud rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud rendering technology, and in particular to a cloud rendering method, device and related equipment. Background Art

[0002] Based on Virtual Reality (VR) technology, the real world can be presented in the metaverse scene through digital virtual rendering. Users can use VR devices to roam in the metaverse scene in real time. However, digital virtual rendering of the real world consumes a lot of resources of the Graphics Processing Unit (GPU), resulting in a long rendering time. Especially when rendering multiple scenes at the same time for different users to roam and watch, the existing cloud rendering solution has a low GPU resource utilization rate during the rendering process, which further increases GPU resource consumption and increases the time users wait for virtual scenes to load.

[0003] It can be seen that the existing cloud rendering methods have the problem of low GPU resource utilization. Summary of the invention

[0004] The embodiments of the present invention provide a cloud rendering method, an apparatus and related equipment to solve the problem of low GPU resource utilization in the existing cloud rendering method.

[0005] To solve the above technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a cloud rendering method, the method comprising:

[0007] receiving a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0008] Determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card;

[0009] Creating a target thread associated with the user identifier in the target process;

[0010] The target thread is controlled to render an image of the target scene based on a viewing angle parameter corresponding to the user identifier.

[0011] Optionally, determining, according to the identifier of the target scenario, a target process associated with the identifier of the target scenario includes:

[0012] In a case where it is determined according to the identifier of the target scenario that there is no associated process for the target scenario, creating a target process associated with the identifier of the target scenario;

[0013] In a case where it is determined according to the identifier of the target scene that the target scene has an associated target process, the target process associated with the identifier of the target scene is acquired.

[0014] Optionally, the creating a target process associated with the identifier of the target scene includes:

[0015] Obtaining GPU resources required to be consumed by the target scene indicated by the identifier of the target scene, and remaining GPU resources of a first GPU card, where the first GPU card is a GPU card to which part of the GPU resources have been allocated;

[0016] When the GPU resources required to be consumed by the target scene are less than or equal to the remaining GPU resources of the first GPU card, at least part of the remaining GPU resources of the first GPU card are called to create a target process associated with the identifier of the target scene, and at least part of the remaining GPU resources of the first GPU card are greater than or equal to the GPU resources required to be consumed by the target scene.

[0017] Optionally, after obtaining the GPU resources required to be consumed by the target scene indicated by the identifier of the target scene and the remaining GPU resources of the first GPU card, the method further includes:

[0018] In a case where the GPU resources required to be consumed by the target scene are greater than the remaining GPU resources of the first GPU card, at least part of the GPU resources of the second GPU card are called to create a target process associated with the identifier of the target scene, at least part of the GPU resources of the second GPU card are greater than or equal to the GPU resources required to be consumed by the target scene, and the second GPU card is an idle GPU card.

[0019] Optionally, before receiving the first request message, the method further includes:

[0020] receiving a second request message, wherein the second request message is used to request generation of the user identifier and to request acquisition of the identifier of the target scene, wherein the target scene is a virtual scene where the user indicated by the user identifier is currently located, and each virtual scene is pre-set with a corresponding identifier;

[0021] The user identification and the identification of the target scene are sent.

[0022] Optionally, at least one perspective thread is created in the target process, the target thread is a perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene.

[0023] In a second aspect, an embodiment of the present invention provides a cloud rendering device, the device comprising:

[0024] A first receiving module, configured to receive a first request message, wherein the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0025] A determination module, configured to determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card;

[0026] A creation module, used for creating a target thread associated with the user identifier in the target process;

[0027] A rendering module is used to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

[0028] In a third aspect, an embodiment of the present invention provides an electronic device, including a transceiver and a processor.

[0029] The transceiver is used to receive a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0030] The processor is used to determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card;

[0031] The processor is further configured to create a target thread associated with the user identifier in the target process;

[0032] The processor is further used to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the cloud rendering method described in the first aspect are implemented.

[0034] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the cloud rendering method as described in the first aspect.

[0035] In an embodiment of the present invention, a first request message carrying a user identifier and an identifier of a target scene is received to determine the user initiating the request and the target scene where the user is currently located, and then the target process is determined according to the identifier of the target scene. By establishing a mapping relationship between the identifier of the target scene and the target process in multiple processes, different scenes enable different processes, and concurrent processing is achieved based on multiple processes, thereby improving the utilization rate of GPU resources. Then, a target thread associated with the user identifier is created in the target process, and by establishing a mapping relationship between the user identifier and the target thread in multiple threads, users with different viewing angle parameters in the same scene enable different threads in the same process. Based on the multi-threaded concurrent processing method, a scene image with corresponding viewing angle parameters can be rendered for each user. Finally, the target thread is controlled to render the image of the target scene based on the viewing angle parameters corresponding to the user identifier. This satisfies the needs of rendering multiple scenes for different users to roam and watch, and at the same time satisfies the needs of multiple users to roam and watch a certain scene with their own different viewing angle parameters, thereby improving the effective utilization rate of GPU resources and reducing the cost of Metaverse cloud rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 It is one of the flow charts of a cloud rendering method provided by an embodiment of the present invention;

[0038] Figure 2 This is the second flowchart of a cloud rendering method provided by an embodiment of the present invention;

[0039] Figure 3 This is a third flowchart of a cloud rendering method provided by an embodiment of the present invention;

[0040] Figure 4 is a structural schematic diagram of a cloud rendering device provided by an embodiment of the present invention;

[0041] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0043] For the VR usage scenario of Metaverse, how to digitally render the real world and perform real-time roaming is an important issue in VR usage scenarios. The implicit volume rendering method based on the Neural Network Radiance Field (NeRF) algorithm has become the focus of attention and a hot topic of research due to its low algorithm complexity and high degree of restoration after rendering. Although the NeRF algorithm has made great improvements in rendering, it still consumes a lot of GPU and computing resources and is relatively time-consuming.

[0044] In view of the need for real-time rendering in the metaverse VR scene, the existing cloud rendering method has a low GPU resource utilization rate. In order to solve the problem of low GPU resource utilization rate during the rendering process, an embodiment of the present invention provides a cloud rendering method. Figure 1 , Figure 1 is a flow chart of a cloud rendering method provided by an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0045] Step 101: receiving a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0046] In the metaverse, multiple scenes (i.e., virtual scenes) constructed by cloud servers can be preset, and each scene is set with a corresponding identifier, i.e., a scene identifier (Identity, ID), and different scenes correspond to different scene IDs. The user sends a first request message to the cloud server through a corresponding terminal, such as a VR device, to request the rendering service of the target scene. Among them, the target scene is the scene in which the user is currently located among multiple scenes; the user identifier, i.e., the user ID, is used to identify the user, and different users correspond to different user IDs. The cloud server receives the first request message sent by the terminal, and based on the first request message containing the user ID and the scene ID, it can further render the image of the target scene in which the user is currently located through subsequent steps.

[0047] Step 102: Determine a target process associated with the target scene identifier according to the target scene identifier, wherein the target process is allocated at least part of GPU resources provided by a graphics processing unit (GPU) card; the GPU resources may include GPU computing resources and video memory resources.

[0048] In one example, a rendering program can be started for each scene according to the scene ID (i.e., the identifier of the scene), that is, each scene occupies a GPU card, that is, all GPU resources provided by a GPU card can be used to render the image of the target scene. At this time, the number of scenes supported by the cloud server is determined by the number of GPU cards. In this way, the needs of rendering multiple scenes at the same time for different users to roam and watch can be met, but the consumption of GPU cards is relatively large. In order to further improve the utilization of GPU resources and reduce the cost of cloud rendering, please refer to the following statement:

[0049] In another example, a corresponding rendering program can be started for a scene through a process according to the scene ID (i.e., the identification of the scene), that is, each scene occupies a process, that is, part of the GPU resources provided by a GPU card are allocated to the target process to render the image of the target scene in the target process. At this time, a GPU card can support image rendering of at least one scene. By establishing a mapping relationship between scene ID and multiple processes, different processes are enabled for different scenes, and independent GPU resources are allocated to the process associated with the identification of each scene. In this way, concurrent processing is achieved based on multiple processes, and GPU resource utilization is improved.

[0050] The cloud server can determine whether there is a target process associated with the target scene identifier according to the target scene identifier. If so, the image of the target scene is further rendered in the target process according to step 103; if not, the target process associated with the target scene identifier is created.

[0051] Step 103: Create a target thread associated with the user identifier in the target process;

[0052] In the use of Metaverse VR, it is necessary to consider the need to render multiple scenes simultaneously for different users to roam and watch, and the need for multiple users to roam and watch a scene from different perspectives. The cloud rendering solution for multiple scenes and multiple perspectives can be mathematically abstracted:

[0053] Exemplarily, the cloud server is configured with L GPU cards, wherein the computing power resources of each GPU card are g1, g2, ..., g L ; The video memory resources of each GPU card are m1, m2, ..., m L , L is a positive integer.

[0054] The cloud server has M scenes, where the computing resources required to render the image of each scene are s1, s2, ..., s M ; The video memory resources consumed when rendering the image of each scene are p1, p2, ..., pM The computing power required to render each scene image is less than or equal to the computing power of each GPU card, that is, g l ≥s m ; The video memory resources required to render each scene's image are less than or equal to the video memory resources of each GPU card, that is, m l ≥p m , 1≤l≤L, 1≤m≤M, M is a positive integer. The computing power resources s required to render the image of each scene m Expressed as a percentage of a single GPU performance usage, i.e. s m ∈(0%,100%).

[0055] Setting the functional relationship The GPU resources (including the computing power and memory resources of the GPU cards) of L GPU cards can support the roaming viewing of N users in M ​​scenes, where N is a positive integer. Expand as follows:

[0056]

[0057] in, Represents the vector matrix of GPU resources (including the computing power resources and video memory resources of the GPU card). Represents the GPU resource consumption vector matrix required to render the scene image. represents the user vector, F XY Represents the scheduling allocation function of GPU resources corresponding to users in different scenarios, represents the scheduling allocation matrix, which should satisfy:

[0058] At the same time, the allocation of GPU resources meets the following conditions:

[0059]

[0060] In other words, for the computing power resource consumption of any GPU card, the total computing power resource consumption of the GPU card in any scenario and by any user is less than or equal to the computing power performance that this GPU card can provide; for the video memory resource usage of any GPU card, the total video memory resource consumption of the GPU card in any scenario and by any user is less than or equal to the amount of video memory installed and configured for this GPU card.

[0061] Therefore, the problem of maximizing the performance of Metaverse multi-scene and multi-view cloud rendering can be converted into the problem of solving the optimal scheduling allocation matrix. At the same time, it is known that repeated GPU loading of the same scene is both a waste of resources and inefficient, so we should try to ensure that a scene is only loaded once in the GPU resources, and support as many users as possible to roam and watch the same scene in one scene.

[0062] In the embodiment of the present invention, a corresponding rendering program is started for a scene through a process according to the scene ID (i.e., the identifier of the scene), that is, each scene is assigned to a separate process, which ensures parallel processing between scenes and also controls the allocation of GPU computing resources and video memory resources in the smallest unit of the process.

[0063] Optionally, at least one perspective thread is created in the target process, the target thread is a perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene.

[0064] In one example, there may be multiple user perspectives roaming in the target scene. After determining the target process associated with the target scene identifier according to the target scene identifier, a target thread associated with the user identifier may be created in the target process, and a scene image corresponding to the perspective parameter may be rendered for each user, that is, an image of the target scene corresponding to the perspective parameter is rendered in the target process for users at different perspectives of the target scene. This improves the effective utilization of resources and reduces the cost of Metaverse cloud rendering.

[0065] Step 104: Control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

[0066] Different users can be users in different scenes, or users in the same scene with different viewing angle parameters. The target thread is a thread created in the target process based on the user identifier (i.e., user ID). Therefore, the rendered image of the target scene truly restores the viewing angle of the user's current environment. The cloud server sends the image of the target scene to the terminal corresponding to the user in response to the first request message. This improves the restoration degree of the rendered image.

[0067] In addition, through multi-threaded concurrent processing, scene images with corresponding viewing parameters can be rendered for each user. This meets the needs of rendering multiple scenes for different users to roam and watch, and at the same time meets the needs of multiple users to roam and watch a scene with different viewing parameters, thus improving the effective utilization of GPU resources.

[0068] In one example, the cloud server builds three metaverse scenes, and can provide three independent processes for these three scenes, and each process is independently allocated with GPU computing resources and video memory resources; at the same time, each scene can have three users roaming and watching, and an independent thread is provided for each user in the corresponding scene process, that is, there are three user perspective threads in the process corresponding to each scene. In this way, there are a total of three processes and nine threads for parallel processing. The cloud server obtains the corresponding perspective parameters of each user to render the corresponding image data according to the perspective parameters of each user.

[0069] The mapping relationship between scenarios, users, processes and threads can be shown in Table 1 below:

[0070] Table 1

[0071]

[0072]

[0073] It should be understood that the number of scenes and the number of users in each scene can also be other. After starting cloud rendering, the scene ID has a one-to-one mapping relationship with the scene process of the started multi-process, and the user ID has a one-to-one mapping relationship with the perspective thread of the started multi-thread after starting cloud rendering. The same technical effect can also be achieved. To avoid repetition, it will not be repeated here.

[0074] After associating the scene ID and user ID with the scene process and view thread respectively, the GPU resource scheduling and allocation strategy is needed to schedule and allocate resources to ensure that each scene can complete the rendering task when the GPU computing power and resources are sufficient, and at the same time, there will be no waste of uneven GPU resource allocation. The following takes two GPU cards as an example for an exemplary explanation:

[0075] There are two GPU cards A and B, each with a maximum computing power resource (i.e., performance) of 100%, and a video memory resource (i.e., total video memory) of 16GB, which are initially idle. There are three metaverse scenes, each with five users roaming and watching. The independent rendering of each scene consumes about 25% of the GPU performance and occupies about 4GB of video memory. If each scene has only one user perspective, the total GPU performance consumption is about 75% (25% + 25% + 25%), and the total video memory usage is about 12GB (4GB + 4GB + 4GB). There are five user perspective threads in each scene process. In the case of concurrent processing, each additional concurrent thread will increase the performance consumption by about 1%, and the video memory usage will increase by about 0.1GB. Therefore, according to the GPU resource scheduling and allocation strategy, the rendering of these three metaverse scenes and 15 user perspectives will be allocated to GPU card A, and card B can be idle and wait to receive and process other rendering requests. In this allocation, the overall GPU performance consumption is close to 90%, and the video memory usage is close to 14GB. When a new scene rendering request is received, a new rendering process is created and GPU card B is allocated to provide rendering services.

[0076] In order to achieve the above-mentioned parallel processing based on scene process and view thread, it is necessary to manage and allocate scene ID and user ID to ensure that there is a mapping relationship between each scene process and scene ID, and each view thread and user ID. For details, please refer to the following description:

[0077] In some optional embodiments, before the step 101 of receiving the first request message, the method further includes:

[0078] receiving a second request message, wherein the second request message is used to request generation of the user identifier and to request acquisition of the identifier of the target scene, wherein the target scene is a virtual scene where the user indicated by the user identifier is currently located, and each virtual scene is pre-set with a corresponding identifier;

[0079] The user identification and the identification of the target scene are sent.

[0080] In one example, if Figure 2 and Figure 3 As shown, the terminal corresponding to the user, i.e., the user end, constitutes the user layer. The cloud server can include a service layer and a device layer. The service layer mainly includes: user management service, scene management service, cloud rendering service, and GPU resource scheduling service (i.e., resource management service). The device layer provides GPU computing resources and video memory resources.

[0081] User management service, which is used to provide user registration and login management, and assign a unique user ID to each user. After cloud rendering is started, the user ID has a one-to-one mapping relationship with the multi-threaded view thread started;

[0082] The scene management service is used to provide operations such as scene creation and uploading and downloading of scene resource models, and to assign a unique scene identifier (i.e., scene ID) to each scene. After cloud rendering is started, the scene ID has a one-to-one mapping relationship with the multi-process scene process started;

[0083] GPU resource scheduling service, which is used to count the status of GPU computing resources and video memory resources provided by the device layer, and schedule and allocate GPU computing resources and video memory resources based on the statistical information;

[0084] The cloud rendering service is used to receive rendering requests (i.e., the first request message) from the user end, first obtain the allocation information of GPU computing resources and video memory resources from the GPU resource scheduling service, then create a scene process and user perspective thread according to the scene ID and user ID, run the rendering task on the allocated GPU resources, and finally send the rendered image data to the user end.

[0085] After receiving the first request message, the cloud rendering service will first request the GPU resource scheduling service to allocate available GPU and computing resources, and then start the scene process and user perspective thread of the rendering service, and specify them to run on the allocated GPU card resources.

[0086] Specifically, the user terminal initiates a registration operation to the user management service through the registration signaling service, and sends a scene creation message notification to the scene management service through the registration signaling service, that is, the terminal corresponding to the user sends a second request message to the cloud server. Among them, the signaling service can call the user management service to create user information, and generate a corresponding user ID for each user. After the user management service completes the registration, the user terminal can log in to the cloud server through the registration information; the signaling service can also call the scene management service to create scene information. The scene management service will manage the created scene models in a unified manner and generate a corresponding scene ID for each scene.

[0087] After receiving the second request message, the cloud server sends the user identifier (user ID) corresponding to the user and the identifier of the target scene (the scene ID of the scene where the user is currently located) to the user terminal. In this way, after the cloud server receives the first request message sent by the user terminal, the user management service obtains the user ID carried in the first request message, and the scene management service obtains the scene ID carried in the first request message. The scene ID and user ID are used to indicate which user initiates the roaming request for which scene. The rendering service of the user in the target scene is thus started based on the scene ID and user ID. The signaling service forwards the first request message to the rendering service, and the rendering service first applies to the resource management service for resource scheduling information. This information is allocated and generated by the low scheduling strategy algorithm of the resource management service, and can effectively allocate and utilize GPU resources.

[0088] Optionally, determining, according to the identifier of the target scenario, a target process associated with the identifier of the target scenario includes:

[0089] In a case where it is determined according to the identifier of the target scenario that there is no associated process for the target scenario, creating a target process associated with the identifier of the target scenario;

[0090] In a case where it is determined according to the identifier of the target scene that the target scene has an associated target process, the target process associated with the identifier of the target scene is acquired.

[0091] Exemplarily, after obtaining the assigned GPU card information, the rendering service determines the target process associated with the target scene identifier according to the target scene identifier. If it is determined according to the target scene identifier that there is an associated target process for the target scene, the target process associated with the target scene identifier is obtained; if it is determined according to the target scene identifier that there is no associated process for the target scene, the target process associated with the target scene identifier is created. Further, it is determined whether there is a target thread associated with the user identifier in the target process. If there is a target thread associated with the user identifier in the target process, the rendering service is provided by this thread; otherwise, a target thread is created for this user.

[0092] The target process associated with the identifier of the target scene is created as follows:

[0093] Obtaining GPU resources required to be consumed by the target scene indicated by the identifier of the target scene, and remaining GPU resources of a first GPU card, where the first GPU card is a GPU card to which part of the GPU resources have been allocated;

[0094] When the GPU resources required to be consumed by the target scene are less than or equal to the remaining GPU resources of the first GPU card, at least part of the remaining GPU resources of the first GPU card are called to create a target process associated with the identifier of the target scene, and at least part of the remaining GPU resources of the first GPU card are greater than or equal to the GPU resources required to be consumed by the target scene.

[0095] The target process corresponding to the target scene is allocated to the first GPU card, and the first GPU card can support image rendering of at least one scene. The rendered scene model to be inferred is downloaded and loaded onto the allocated first GPU card device, and finally a user thread corresponding to this user is created to provide rendering services. In this example, GPU resources are allocated by the scene process, and the scene model is loaded into the GPU algorithm module run by this process. The user perspective thread provides a separate rendering channel for each user, and runs the GPU rendering operation under the same model scene in a multi-threaded concurrent manner, which can effectively schedule and allocate GPU resources, avoid uneven utilization and waste of GPU resources, and improve GPU resource utilization.

[0096] In some other examples, after obtaining the GPU resources required to be consumed by the target scene indicated by the identifier of the target scene and the remaining GPU resources of the first GPU card, the method further includes:

[0097] In a case where the GPU resources required to be consumed by the target scene are greater than the remaining GPU resources of the first GPU card, at least part of the GPU resources of the second GPU card are called to create a target process associated with the identifier of the target scene, at least part of the GPU resources of the second GPU card are greater than or equal to the GPU resources required to be consumed by the target scene, and the second GPU card is an idle GPU card.

[0098] In this way, for the computing power resource consumption of any GPU card, the total computing power resource consumption of any scene and any user using the GPU card is less than or equal to the computing power performance that this GPU card can provide; for the video memory resource usage of any GPU card, the total video memory resource consumption of any scene and any user using the GPU card is less than or equal to the amount of video memory installed and configured on this GPU card. By establishing a mapping relationship between scene ID and multiple processes, different scenes enable different processes, and independent GPU resources are allocated to the processes associated with each scene's identifier, concurrent processing is achieved based on multiple processes, and GPU resource utilization is improved.

[0099] After creating the target thread for the user, the rendering service establishes a streaming media transmission channel to the transmission service, and controls the target thread to render the image of the target scene based on the viewing angle parameters corresponding to the user identifier. And the response message (i.e., the image data of the rendered target scene) of the first request message is returned to the information service, and then the signaling service sends the response message to the user end. After the user end receives the roaming response, it will also establish a transmission channel from the user end to the transmission service. At this point, the entire streaming media channel is successfully established in both directions, and the rendered image data is transmitted. After the user end creates the streaming media channel, it sends the roaming viewing angle information to the signaling service, requesting to watch the rendered image under this viewing angle. The signaling service forwards the roaming viewing angle information to the rendering service. The rendering service receives this viewing angle information and sets it in the rendering inference algorithm. The GPU inference algorithm infers a frame of image data based on this viewing angle information. After the rendering service obtains the rendered image under the corresponding viewing angle, it encodes and sends it to the streaming media channel of the transmission service. Finally, the transmission service forwards the rendered image of the user's viewing angle to the user end, and displays it on the display interface of the user end.

[0100] In an embodiment of the present invention, a first request message carrying a user identifier and an identifier of a target scene is received to determine the user who initiated the request and the target scene where the user is currently located, and then the target process is determined according to the identifier of the target scene, wherein the identifier of the scene (i.e., the scene ID) has a one-to-one mapping relationship with the scene process of the multi-process started after cloud rendering is started, and by establishing a mapping relationship between the identifier of the target scene and the target process in the multi-process, different processes are enabled for different scenes, and concurrent processing is achieved based on the multi-process, thereby improving the GPU resource utilization. Then, a target thread associated with the user identifier is created in the target process, wherein the user identifier (i.e., the user ID) has a one-to-one mapping relationship with the perspective thread of the multi-thread started after cloud rendering is started, and by establishing a mapping relationship between the user identifier and the target thread in the multi-thread, users with different perspective parameters in the same scene enable different threads in the same process, and based on the multi-thread concurrent processing method, a scene image with corresponding perspective parameters can be rendered for each user. Finally, the target thread is controlled to render the image of the target scene based on the perspective parameter corresponding to the user identifier. It meets the needs of rendering multiple scenes for different users to roam and watch, and at the same time meets the needs of multiple users to roam and watch a certain scene with their own different viewing parameters, which improves the effective utilization of GPU resources and reduces the cost of Metaverse cloud rendering.

[0101] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a cloud rendering device provided by an embodiment of the present invention, such as Figure 4 As shown, the cloud rendering device 400 includes:

[0102] A first receiving module 401 is used to receive a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0103] A determination module 402 is used to determine a target process associated with the identifier of the target scene according to the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card;

[0104] A creation module 403, used for creating a target thread associated with the user identifier in the target process;

[0105] The rendering module 404 is used to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

[0106] Optionally, the determining module 402 includes:

[0107] A creation submodule, configured to create a target process associated with the identifier of the target scene when it is determined according to the identifier of the target scene that there is no associated process with the target scene;

[0108] The acquisition submodule is used to acquire the target process associated with the identifier of the target scene when it is determined that the target scene has an associated target process according to the identifier of the target scene.

[0109] Optionally, the creation submodule includes:

[0110] an acquisition unit, configured to acquire GPU resources required to be consumed by the target scene indicated by the identifier of the target scene, and remaining GPU resources of a first GPU card, where the first GPU card is a GPU card to which part of the GPU resources have been allocated;

[0111] The first creation unit is used to call at least part of the remaining GPU resources of the first GPU card to create a target process associated with the identifier of the target scene when the GPU resources required to be consumed by the target scene are less than or equal to the remaining GPU resources of the first GPU card, and at least part of the remaining GPU resources of the first GPU card are greater than or equal to the GPU resources required to be consumed by the target scene.

[0112] Optionally, the creation submodule further includes:

[0113] The second creation unit is used to call at least part of the GPU resources of the second GPU card to create a target process associated with the identifier of the target scene when the GPU resources required to be consumed by the target scene are greater than the remaining GPU resources of the first GPU card, and at least part of the GPU resources of the second GPU card are greater than or equal to the GPU resources required to be consumed by the target scene, and the second GPU card is an idle GPU card.

[0114] Optionally, the cloud rendering device 400 further includes:

[0115] A second receiving module is used to receive a second request message, wherein the second request message is used to request to generate the user identifier and to obtain the identifier of the target scene, wherein the target scene is a virtual scene where the user indicated by the user identifier is currently located, and each virtual scene is pre-set with a corresponding identifier;

[0116] The sending module is used to send the user identification and the identification of the target scene.

[0117] Optionally, at least one perspective thread is created in the target process, the target thread is a perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene.

[0118] The cloud rendering device 400 is capable of implementing each process of each embodiment of the above-mentioned cloud rendering method, and the technical features correspond one to one and can achieve the same technical effect. To avoid repetition, they are not described here.

[0119] An embodiment of the present invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, each process of the above-mentioned fault prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0120] For details, see Figure 5 An embodiment of the present invention further provides an electronic device, including a bus 501, a transceiver 502, an antenna 503, a bus interface 504, a processor 505 and a memory 506.

[0121] The transceiver 502 is used to receive a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene;

[0122] The processor 505 is used to determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card;

[0123] The processor 505 is further configured to create a target thread associated with the user identifier in the target process;

[0124] The processor 505 is further configured to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

[0125] Optionally, determining, according to the identifier of the target scenario, a target process associated with the identifier of the target scenario includes:

[0126] In a case where it is determined according to the identifier of the target scenario that there is no associated process for the target scenario, creating a target process associated with the identifier of the target scenario;

[0127] In a case where it is determined according to the identifier of the target scene that the target scene has an associated target process, the target process associated with the identifier of the target scene is acquired.

[0128] Optionally, the creating a target process associated with the identifier of the target scene includes:

[0129] Obtaining GPU resources required to be consumed by the target scene indicated by the identifier of the target scene, and remaining GPU resources of a first GPU card, where the first GPU card is a GPU card to which part of the GPU resources have been allocated;

[0130] When the GPU resources required to be consumed by the target scene are less than or equal to the remaining GPU resources of the first GPU card, at least part of the remaining GPU resources of the first GPU card are called to create a target process associated with the identifier of the target scene, and at least part of the remaining GPU resources of the first GPU card are greater than or equal to the GPU resources required to be consumed by the target scene.

[0131] Optionally, after obtaining the GPU resources required to be consumed by the target scene indicated by the identifier of the target scene and the remaining GPU resources of the first GPU card, the method further includes:

[0132] In a case where the GPU resources required to be consumed by the target scene are greater than the remaining GPU resources of the first GPU card, at least part of the GPU resources of the second GPU card are called to create a target process associated with the identifier of the target scene, at least part of the GPU resources of the second GPU card are greater than or equal to the GPU resources required to be consumed by the target scene, and the second GPU card is an idle GPU card.

[0133] Optionally, the transceiver 502 is further used to receive a second request message, wherein the second request message is used to request to generate the user identifier and to request to obtain the identifier of the target scene, wherein the target scene is a virtual scene where the user indicated by the user identifier is currently located, and each virtual scene is pre-set with a corresponding identifier;

[0134] The transceiver 502 is further configured to send the user identifier and the identifier of the target scene.

[0135] Optionally, at least one perspective thread is created in the target process, the target thread is a perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene.

[0136] exist Figure 5 In the embodiment, the bus architecture (represented by bus 501) is shown, and bus 501 may include any number of interconnected buses and bridges, and bus 501 links various circuits including one or more processors represented by processor 505 and memory represented by memory 506. Bus 501 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 504 provides an interface between bus 501 and transceiver 502. Transceiver 502 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 505 is transmitted on a wireless medium via antenna 503, and further, antenna 503 also receives data and transmits the data to processor 505.

[0137] The processor 505 is responsible for managing the bus 501 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 506 can be used to store data used by the processor 505 when performing operations.

[0138] Optionally, the processor 505 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD).

[0139] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned cloud rendering method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0140] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned cloud rendering method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0141] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present invention is not limited to performing functions in the order discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0143] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A cloud rendering method, It is characterized in that The method comprises: Receive a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene; the target scene is a scene where the user is currently located among multiple scenes constructed by the cloud server; Determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card; A target thread associated with the user identifier is created in the target process; at least one perspective thread is created in the target process, the target thread is one perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene; The target thread is controlled to render an image of the target scene based on a viewing angle parameter corresponding to the user identifier.

2. The method according to claim 1, It is characterized in that The step of determining, according to the identifier of the target scenario, a target process associated with the identifier of the target scenario includes: In a case where it is determined according to the identifier of the target scenario that there is no associated process for the target scenario, creating a target process associated with the identifier of the target scenario; In a case where it is determined according to the identifier of the target scene that the target scene has an associated target process, the target process associated with the identifier of the target scene is acquired.

3. The method according to claim 2, It is characterized in that The step of creating a target process associated with the identifier of the target scene includes: Obtaining GPU resources required to be consumed by the target scene indicated by the identifier of the target scene, and remaining GPU resources of a first GPU card, where the first GPU card is a GPU card to which part of the GPU resources have been allocated; When the GPU resources required to be consumed by the target scene are less than or equal to the remaining GPU resources of the first GPU card, at least part of the remaining GPU resources of the first GPU card are called to create a target process associated with the identifier of the target scene, and at least part of the remaining GPU resources of the first GPU card are greater than or equal to the GPU resources required to be consumed by the target scene.

4. The method according to claim 3, It is characterized in that After obtaining the GPU resources required to be consumed by the target scene indicated by the identifier of the target scene and the remaining GPU resources of the first GPU card, the method further includes: In a case where the GPU resources required to be consumed by the target scene are greater than the remaining GPU resources of the first GPU card, at least part of the GPU resources of the second GPU card are called to create a target process associated with the identifier of the target scene, at least part of the GPU resources of the second GPU card are greater than or equal to the GPU resources required to be consumed by the target scene, and the second GPU card is an idle GPU card.

5. The method according to claim 1, It is characterized in that Before receiving the first request message, the method further includes: receiving a second request message, wherein the second request message is used to request generation of the user identifier and to request acquisition of the identifier of the target scene, wherein the target scene is a virtual scene where the user indicated by the user identifier is currently located, and each virtual scene is pre-set with a corresponding identifier; The user identification and the identification of the target scene are sent.

6. A cloud rendering device, It is characterized in that The device comprises: A first receiving module is used to receive a first request message, wherein the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene; the target scene is a scene in which the user is currently located among multiple scenes constructed by the cloud server; A determination module, configured to determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card; A creation module, used for creating a target thread associated with the user identifier in the target process; at least one perspective thread is created in the target process, the target thread is one perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene; A rendering module is used to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

7. An electronic device, It is characterized in that Including transceiver and processor, The transceiver is used to receive a first request message, where the first request message is used to request a rendering service of a target scene, and the first request message includes a user identifier and an identifier of the target scene; The target scene is the scene where the user is currently located among the multiple scenes constructed by the cloud server; The processor is used to determine, according to the identifier of the target scene, a target process associated with the identifier of the target scene, wherein the target process is allocated with at least part of GPU resources provided by a graphics processing unit (GPU) card; The processor is further configured to create a target thread associated with the user identifier in the target process; at least one perspective thread is created in the target process, the target thread is one perspective thread in the at least one perspective thread, and users corresponding to different perspective threads in the target process are users with different perspective parameters in the target scene; The processor is further used to control the target thread to render the image of the target scene based on the viewing angle parameter corresponding to the user identifier.

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

9. A computer program product, It is characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the cloud rendering method according to any one of claims 1 to 5.