CN115253299A - Rendering method and device, computer equipment and storage medium - Google Patents

Rendering method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115253299A
CN115253299A CN202110482646.8A CN202110482646A CN115253299A CN 115253299 A CN115253299 A CN 115253299A CN 202110482646 A CN202110482646 A CN 202110482646A CN 115253299 A CN115253299 A CN 115253299A
Authority
CN
China
Prior art keywords
rendering
node
client
task
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110482646.8A
Other languages
Chinese (zh)
Inventor
陈普
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to CN202110482646.8A priority Critical patent/CN115253299A/en
Priority to PCT/CN2022/089931 priority patent/WO2022228521A1/en
Publication of CN115253299A publication Critical patent/CN115253299A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Image Generation (AREA)

Abstract

The application discloses a rendering method and a device thereof, computer equipment and a storage medium, and belongs to the technical field of image rendering. The rendering method comprises the following steps: a first rendering node receives an instruction instructing execution of a rendering task generated by a client; the method comprises the steps that a first rendering node obtains state parameters of a rendering task, and the state parameters of the rendering task are generated by a second rendering node executing the rendering task; the first rendering node continues to execute the rendering task based on the state parameter to obtain a rendering image of the rendering task; the first rendering node sends the rendered image to the client. The method and the device improve the rendering efficiency.

Description

Rendering method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image rendering technologies, and in particular, to a rendering method and apparatus, a computer device, and a storage medium.
Background
Currently, it has become a trend to render an interface of an application running in a client by using cloud rendering resources. And the cloud rendering refers to rendering an interface of the application program, which is displayed by the terminal according to the operation requirement, by using the cloud rendering resources according to the operation of the terminal by the user when the application program is operated in the terminal.
In the related art, after receiving a rendering requirement sent by a client, a management node on the cloud may allocate, to the client, a rendering node that executes a rendering task of the client in rendering resources on the cloud according to the rendering requirement of the client, so that the rendering node renders an interface of an application program running in the client, and sends a rendering image to the client.
However, in the process of executing the rendering task by the rendering node, if the management node reallocates the rendering node to the client, the reallocated rendering node needs to execute the rendering operation again according to the rendering requirement of the client, which results in low rendering efficiency.
Disclosure of Invention
The application provides a rendering method and a device thereof, computer equipment and a storage medium, the application can improve rendering efficiency, and the technical scheme provided by the application is as follows:
in a first aspect, the present application provides a rendering method, including: a first rendering node receives an instruction instructing execution of a rendering task generated by a client; the method comprises the steps that a first rendering node obtains state parameters of a rendering task, and the state parameters of the rendering task are generated by a second rendering node executing the rendering task; the first rendering node continues to execute the rendering task based on the state parameter to obtain a rendering image of the rendering task; the first rendering node sends the rendered image to the client.
As can be seen from the above, in the rendering method, after receiving an instruction instructing execution of a rendering task generated by a client, a first rendering node obtains a state parameter generated when a second rendering node executes the rendering task, continues to execute the rendering task based on the state parameter, obtains a rendering image of the rendering task, and sends the rendering image to the client. In the rendering method, the state parameter is obtained by the second rendering node executing the rendering task in advance, so that on one hand, the first rendering node can directly execute the subsequent rendering operation according to the state parameter, and the first rendering node does not need to re-render according to the rendering instruction sent by the client to obtain the state parameter, the consumption of rendering resources of the first rendering node is reduced, the rendering efficiency is improved, on the other hand, the client does not need to send the rendering instruction to the first rendering node again, so that the client does not sense the scheduling of the rendering node for executing the rendering task of the client, and the user experience is ensured.
In an implementation manner, the obtaining, by the first rendering node, the state parameter of the rendering task specifically includes: the first rendering node acquires the state parameters from the state storage node, the state parameters are stored in the state storage node by the second rendering node, the first rendering node and the state storage node are deployed on different hosts, and the second rendering node and the state storage node are deployed on different hosts.
In another implementation manner, when the first rendering node and the second rendering node are deployed on the same host, the obtaining, by the first rendering node, the state parameter of the rendering task specifically includes: the first rendering node acquires the state parameters from the storage medium of the host where the first rendering node is located.
In another implementation manner, when the first rendering node and the second rendering node are deployed on different hosts, the obtaining, by the first rendering node, the state parameter of the rendering task specifically includes: and the first rendering node acquires the state parameters from the storage medium of the host where the second rendering node is located.
The state parameter may be considered an intermediate product of the second rendering node from the execution of the stream of rendering instructions to the time the rendered image is obtained. In one implementation, the state parameter includes a rendering scene configuration parameter, and the rendering scene configuration parameter includes: and one or any combination of the position, the material information, the texture map information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task.
And, the state parameters further include rendering model parameters, the rendering model parameters including: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
When the state parameter includes the rendering model parameter, although the storage pressure and the implementation cost of the state parameter may be increased, the efficiency of obtaining the rendering model parameter from the state parameter is effectively improved compared to an implementation manner in which the rendering model parameter is obtained from the original storage location of the rendering model parameter when the state parameter does not include the rendering model parameter.
In a second aspect, the present application provides a rendering method, including: the method comprises the steps that a management node obtains description information of a rendering target in a rendering task generated by a client; the management node acquires the similarity between a rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node; and the management node indicates the rendering nodes with the similarity larger than the specified similarity threshold value, and the rendering task of the client is executed.
When the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by a certain rendering node is greater than the execution similarity threshold, the same data required to be rendered by the rendering target and the rendering target is more, the rendering node with the similarity greater than the specified similarity threshold is indicated to execute the rendering task of the client, so that at least two rendering tasks with the greater similarity can share rendering resources, at least part of rendering operations in different rendering tasks can be realized by using the same resource, repeated rendering operations are reduced, the consumption of the rendering resources is reduced, the service is provided for more users by using the limited rendering resources, and the utilization rate of the rendering resources is improved.
Optionally, the acquiring, by the management node, a similarity between the rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node includes: the management node respectively acquires the rendering targets of the rendering tasks executed by the rendering nodes managed by the management node and the total number of the same rendering models included in the rendering targets described by the description information; the management node determines the similarity based on the total number.
Or, in order to improve the accuracy of the obtained similarity, the management node may further process the total number of the same rendering models corresponding to any rendering node according to the features of the rendering models included in the rendering target, so as to more accurately evaluate the similarity between the rendering target of the rendering task executed by the any rendering node and the rendering target described by the description information.
As an implementation manner, the method for acquiring, by a management node, a similarity between a rendering target described by description information and a rendering target of a rendering task executed by each rendering node managed by the management node further includes: the management node acquires at least one parameter of the total number of vertexes, the total number of triangular patches and the size of occupied storage space of each same rendering model. Correspondingly, the management node determines the similarity based on the total number, and specifically includes: the management node determines a similarity based on the total number and at least one parameter.
Moreover, when the rendering nodes are allocated, the load state of the rendering nodes also needs to be considered, for example, the management node indicates the rendering nodes with similarity greater than a specified similarity threshold, and the performing of the rendering task of the client includes: the management node acquires the load state of the rendering node with the similarity larger than a specified similarity threshold; and when the load state of the rendering node with the similarity larger than the specified similarity threshold meets the specified load condition, the management node indicates the rendering node with the similarity larger than the specified similarity threshold to execute the rendering task of the client.
Optionally, the description information includes any one of: the information is used for describing the browsing type file which needs to be accessed by the rendering task of the client, and the information is used for describing the rendering target obtained by the rendering node executing the rendering operation based on the rendering instruction of the client.
In a third aspect, the present application provides a rendering apparatus, where a first rendering node is deployed in the rendering apparatus, and the rendering apparatus includes: a receiving module for receiving an instruction instructing execution of a rendering task generated by a client; the first obtaining module is used for obtaining the state parameters of the rendering tasks, and the state parameters of the rendering tasks are generated by the second rendering nodes executing the rendering tasks; the first processing module is used for continuously executing the rendering task based on the state parameters to obtain a rendering image of the rendering task; and the sending module is used for sending the rendering image to the client.
Optionally, the first obtaining module is specifically configured to: and acquiring the state parameters from the state storage nodes, wherein the state parameters are stored in the state storage nodes by a second rendering node, the first rendering node and the state storage nodes are deployed on different hosts, and the second rendering node and the state storage nodes are deployed on different hosts.
Optionally, when the first rendering node and the second rendering node are deployed on the same host, the first obtaining module is specifically configured to: and acquiring the state parameters from the storage medium of the host where the first rendering node is located.
Optionally, when the first rendering node and the second rendering node are deployed on different hosts, the first obtaining module is specifically configured to: and acquiring the state parameters from the storage medium of the host where the second rendering node is located.
Optionally, the state parameter includes a rendering scene configuration parameter, and the rendering scene configuration parameter includes: and rendering the position, the material information, the texture mapping information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task, or any combination thereof.
Optionally, the state parameters further include rendering model parameters, and the rendering model parameters include: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
In a fourth aspect, the present application provides a rendering apparatus, where a management node is deployed in the rendering apparatus, and the rendering apparatus includes: the second acquisition module is used for acquiring the description information of the rendering target in the rendering task generated by the client; the second obtaining module is further used for obtaining the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by each rendering node managed by the management node; and the second processing module is used for indicating the rendering nodes with the similarity larger than the specified similarity threshold value and executing the rendering task of the client.
Optionally, the second obtaining module is specifically configured to: respectively acquiring the total number of the same rendering model included in the rendering target of the rendering task executed by each rendering node managed by the management node and the rendering target described by the description information; the similarity is determined based on the total number.
Optionally, the second obtaining module is specifically configured to: acquiring at least one parameter of the total number of vertexes, the total number of triangular patches and the size of occupied storage space of each same rendering model; based on the total number and at least one parameter, a similarity is determined.
Optionally, the processing module is specifically configured to: acquiring the load state of a rendering node with the similarity greater than a specified similarity threshold; and when the load state of the rendering node with the similarity larger than the specified similarity threshold value meets the specified load condition, indicating the rendering node with the similarity larger than the specified similarity threshold value, and executing the rendering task of the client.
Optionally, the description information includes any one of: the information is used for describing the browsing type file which needs to be accessed by the rendering task of the client, and the information is used for describing the rendering target obtained by the rendering node executing the rendering operation based on the rendering instruction of the client.
In a fifth aspect, the present application provides a computer device comprising a processor and a memory; the memory stores a computer program; when the processor executes the computer program, the computer device implements the rendering method provided in the first aspect or the second aspect of the present application.
In a sixth aspect, the present application provides a storage medium which is a non-volatile computer readable storage medium, and when executed by a processor, implements the rendering method as provided in the first or second aspect of the present application.
In a seventh aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the rendering method provided in the first or second aspect of the present application.
Drawings
Fig. 1 is a schematic view of an implementation scenario related to a rendering method provided in an embodiment of the present application;
fig. 2 is a schematic view of an implementation scene related to another rendering method provided in an embodiment of the present application;
fig. 3 is a schematic view of an implementation scenario related to another rendering method provided in an embodiment of the present application;
fig. 4 is a flowchart of a method of a rendering method according to an embodiment of the present application;
FIG. 5 is a diagram of a rendered screen according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another rendered screen provided in an embodiment of the present application;
fig. 7 is a schematic diagram of an application scenario of a client according to an embodiment of the present application;
FIG. 8 is a flowchart of a method of another rendering method provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another rendering apparatus provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application provides a rendering method. In the rendering method, after receiving an instruction for instructing execution of a rendering task generated by a client, a first rendering node acquires a state parameter generated by a second rendering node for executing the rendering task, continues to execute the rendering task based on the state parameter, obtains a rendering image of the rendering task, and sends the rendering image to the client. In the rendering method, the state parameter is obtained by the second rendering node executing the rendering task in advance, so that on one hand, the first rendering node can directly execute the subsequent rendering operation according to the state parameter, and the first rendering node does not need to re-render according to the rendering instruction sent by the client to obtain the state parameter, the consumption of rendering resources of the first rendering node is reduced, the rendering efficiency is improved, on the other hand, the client does not need to send the rendering instruction to the first rendering node again, so that the client does not sense the scheduling of the rendering node for executing the rendering task of the client, and the user experience is ensured.
The rendering node is specifically a node used for rendering, and is generally provided with a Graphics Processing Unit (GPU), and the rendering node is configured to receive a rendering task sent by a client, process the rendering task according to the GPU, generate a rendering image, and send the rendering image to the client.
Fig. 1 is a schematic diagram of an implementation scenario related to a rendering method provided in an embodiment of the present application. As shown in fig. 1, the application scenario includes: a client 01 and at least two rendering nodes 02. A communication connection is established between the client 01 and each rendering node 02. The overall system in which the at least two rendering nodes 02 are located may be referred to as a rendering system.
The client 01 may be a mobile phone, a tablet computer, a personal computer, a virtual machine, a container, a laptop computer, a mobile phone, a multimedia player, an intelligent appliance, an artificial intelligence device, an intelligent wearable device, an electronic reader, an intelligent vehicle-mounted device, or an internet of things device. Rendering node 02 may be implemented by a physical device such as a physical server, a virtual machine or a virtual instance such as a container.
The user may use an application program on the client 01, and a display screen of the application program may be rendered by performing a rendering operation. When a user operates an application program, the client 01 may send a rendering instruction stream to the rendering node according to the operation, where the rendering instruction stream is used to instruct the client to display a picture according to the operation requirement of the user. The rendering node 02 may execute a corresponding rendering operation according to the rendering instruction stream, and provide a rendered screen obtained by rendering to the client, so that the client displays the rendered screen.
Moreover, the same rendering task of the client may be executed by different rendering nodes 02 in sequence, and after the rendering node 02 (e.g., the second rendering node) that executes the rendering task first, the state parameter obtained by executing the rendering task may be stored. After receiving the instruction indicating to execute the rendering task, the rendering node 02 (e.g., the first rendering node) that executes the rendering task later may obtain the state parameter, and continue to execute the rendering task according to the state parameter, so as to obtain a rendered image of the rendering task.
Alternatively, the implementation of storing the state parameters may be various. The following several realizations are exemplified below:
in a first implementation manner, different rendering nodes 02 that execute the same rendering task of the client in sequence may be deployed on the same host, and at this time, the state parameter may be stored in a storage medium of the host. The storage medium may be a hard disk or a memory.
In a second implementation manner, different rendering nodes 02 that execute the same rendering task of the client in sequence are deployed on different hosts, and at this time, the state parameter may be stored in a storage medium of the host where the rendering node 02 that executes the rendering task before is located, or the state parameter may also be stored in a storage medium of the host where the rendering node 02 that executes the rendering task after is located. The storage medium may be a hard disk or a memory.
In a third implementation manner, the state storage node for storing the state parameter may be deployed on a different host from the rendering node 02 that executes the rendering task first, and may be deployed on a different host from the rendering node 02 that executes the rendering task later. For example, the state storage node may be deployed on a host or cluster of hosts in the rendering system that do not have rendering node 02 deployed.
Corresponding to a third implementable manner of the state storage node, as shown in fig. 2, the rendering system further includes: state storage node 03. The state storage node 03 establishes a communication connection with each rendering node 02. The state storage node 03 may be implemented by a physical server.
Alternatively, the scheduling of rendering node 02 may be implemented by a management node. Accordingly, as shown in fig. 2, the rendering system further includes: and a management node 04. The management node 04 establishes a communication connection with each rendering node 02 and each client 01. The management node 04 may be implemented by a physical device such as a physical server, a virtual machine, a virtual instance such as a container, or the like.
The management node 04 may receive a rendering session request sent by the client 01, where the rendering session request is used to request the management node 04 to allocate, to the client 01, a rendering node 02 for executing a rendering task generated by the client 01. The management node 04 may indicate, to the client 01, a rendering node 02 for performing a rendering task of the client 01 according to the rendering session request. The client 01 may establish a network connection with the rendering node 02 indicated by the management node 04 according to the instruction of the management node 04, and send a rendering instruction stream to the rendering node 02 indicated by the management node 04 through the network connection, so that the rendering node 02 indicated by the management node 04 executes the rendering task of the client 01 according to the rendering instruction stream.
Further, as shown in fig. 2, the rendering system may further include: a gateway node 05, the gateway node 05 being connectable with the client 01, each rendering node 02 and the management node 04. The gateway node 05 may be implemented by an entity device such as a switch or a network address translation gateway, or a virtual instance such as a virtual machine or a container.
The network connection between rendering node 02 and client 01 may be implemented through the gateway node 05. At this time, after the management node 04 determines that the rendering node 02 for executing the rendering task of the client 01 is allocated to the client 01, the management node 04 needs to notify the gateway node of the allocated rendering node 02. Correspondingly, the indication sent by the management node 04 to the client 01 may indicate a gateway node to which the client 01 needs to connect, the client 01 may send a connection request to the indicated gateway node 05 according to the indication of the management node 04, and the gateway node 05 receives the connection request, and may connect the rendering node 02 allocated to the client by the management node 04 according to the notification of the management node 04, so as to implement network connection between the client 01 and the rendering node 02 allocated thereto.
Also, the gateway node 05 can provide a port mapping service. For example, the gateway node 05 may map a port of an Internet Protocol (IP) address of the gateway node 05 accessed by the external network to a port of an IP address of the subnet where the rendering node 02 is located, so as to improve the security of access.
Optionally, in the embodiment of the present application, the rendering system may have multiple deployment manners. For example, the rendering system may be deployed on a public network. Alternatively, the rendering system may be deployed in a cloud platform. Moreover, the cloud platform may be a cloud platform of a central cloud, a cloud platform of an edge cloud, or a cloud platform including a central cloud and an edge cloud, which is not specifically limited in the embodiments of the present application. And when the cloud platform is a cloud platform including a central cloud and an edge cloud, the rendering system may be partially deployed in the cloud platform of the edge cloud and partially deployed in the cloud platform of the central cloud.
When the rendering system is deployed in a cloud platform, the rendering node 02, the state storage node 03, the management node 04, and the gateway node 05 may be implemented by resources in the cloud platform, where the resources in the cloud platform include computing resources, storage resources, network resources, and the like. At this time, as shown in fig. 3, the rendering function provided by the rendering system to the client 01 can be abstracted into a rendering cloud service on the cloud platform by the cloud service provider and provided to the user. After a user purchases a rendering cloud service on the cloud platform, the cloud platform can execute a rendering task of a client used by the user by using resources in the cloud computing center.
The implementation procedure of the rendering method provided by the embodiment of the present application is described below with reference to an implementation scenario shown in fig. 2. For implementation processes of the rendering method in other implementation scenarios, please refer to the implementation process in the implementation scenario shown in fig. 2. Fig. 4 is a flowchart of a method of a rendering method provided in an embodiment of the present application, and as shown in fig. 4, an implementation process of the rendering method may include the following steps:
step 401, the client sends a first rendering session request to the management node.
The user can use an application program on the client, and a display screen of the application program can be rendered by executing a rendering operation. When a client uses a rendering system to render a display screen for the client, and a user generates an operation on an application program, the client may send a first rendering session request to a management node in the rendering system according to the operation, so as to request the management node to allocate, to the client, a rendering node for executing a rendering task generated by the client. Optionally, in order to facilitate the management node to allocate a more appropriate rendering node to the client, the first rendering session request may carry information about a screen that needs to be displayed by the application program. The operation of the user on the application program may trigger the first rendering session request through an Application Program Interface (API) or a User Interface (UI). The rendering task generated by the client refers to a rendering task generated by the client by running an application program or accessing a browser.
Step 402, the management node instructs the second rendering node to execute the client-generated rendering task based on the first rendering session request, and notifies the client of the execution of the client-generated rendering task by the second rendering node.
After receiving the first rendering session request sent by the client, the management node may obtain information such as load states of the multiple rendering nodes managed by the management node, and select a rendering node allocated to the client from the multiple rendering nodes according to the information such as the load states, for example, the rendering node allocated to the client by the management node is a second rendering node. And when the first rendering session request carries relevant information of a picture required to be displayed by the application program, the management node can also allocate a proper rendering node to the client according to the relevant information. After determining to allocate the second rendering node to the client, the management node notifies the second rendering node so that the second rendering node starts a related rendering program, and also notifies the client of the allocation result so that the client establishes network connection with the second rendering node. After receiving the first rendering session request sent by the client, the management node may authenticate the client according to the first rendering session request, and when the client passes the authentication, allocate a rendering node for the client.
Alternatively, the management node may allocate a rendering node for performing a rendering task generated by the client to the client according to a specified scheduling policy. For example, rendering nodes may be assigned to clients according to a load balancing policy and/or a similarity policy. For ease of understanding, the implementation process of assigning rendering nodes based on the similarity policy is described later.
And when the rendering node is implemented by a virtual instance such as a virtual machine or a container, if the management node determines that there is no virtual instance suitable for being allocated to the client in the existing virtual instance according to the first rendering session request, the management node may create the virtual instance and allocate the created virtual instance to the client.
After the management node notifies the client of the rendering task generated by the client executed by the second rendering node, the client may establish a connection request with the second rendering node to request to establish a network connection with the second rendering node. After the second rendering node establishes network connection with the client, a related rendering program of the second rendering node may be started. Or after the second rendering node receives the instruction of the management node to execute the rendering task generated by the client, the second rendering node starts a related rendering program of the second rendering node. The rendering program is generally applicable to a process executing a rendering operation, and the same process may use one Graphics Processing Unit (GPU) or multiple GPUs.
When the rendering system does not include a gateway node, the client may send a connection request to a second rendering node, which may establish a network connection with the client according to the connection request. When the rendering system comprises a gateway node, the client can send a connection request to the gateway node, after receiving the connection request, the gateway node can establish network connection with the client, determine the rendering node allocated to the client, and then establish network connection between the gateway node and the rendering node allocated to the client. The connection request may carry a connection identifier (e.g., a token), where the connection identifier is used to identify the identity of the client, and even the connection identifier is also used to identify a rendering session between the client and a rendering node to which the management node is assigned. After receiving the connection request, the gateway node verifies the client according to the connection identifier, and acquires the address of the rendering node allocated to the client, so as to establish network connection with the rendering node according to the address. Optionally, the gateway node may determine the address of the rendering node according to the information of the rendering node carried in the connection identifier. Alternatively, after determining to allocate a rendering node to a client, the management node may notify the gateway node of an address of the rendering node allocated to the client.
And step 403, the client sends a rendering instruction stream to the second rendering node.
If the client generates the rendering instruction stream according to the operation of the user, the client can send the rendering instruction stream to the second rendering node, so that the second rendering node executes corresponding rendering operation based on the rendering instruction stream. The rendering instruction stream carries relevant parameters for instructing to change the scene displayed in the client, for example, relevant parameters for instructing to change one or more of the following: modifying the spatial position and angle of the visual angle camera, setting the position of an object, loading a new object, adding a light source, changing the spatial position of the light source and the like.
And step 404, the second rendering node executes the rendering task generated by the client based on the rendering instruction stream, stores the state parameter of the rendering task obtained by executing the rendering task, and sends the rendering image obtained by rendering to the client.
And after receiving the rendering instruction stream sent by the client, the second rendering node can execute corresponding rendering operation according to the rendering instruction stream, wherein the rendering operation can generate state parameters of the rendering task and generate a rendering image of the rendering task according to the state parameters, and the second rendering node can send the rendering image to the client so that the client can display the rendering image. When the rendering system includes a gateway node, the rendering instruction stream sent by the client may be forwarded to the second rendering node via the gateway node, and the rendered image sent by the second rendering node may be sent to the client via the gateway node. The rendering target in the rendering task may be the whole scene that the client needs to display, or may be a single model in the scene, that is, the rendering of the second rendering node may be the whole scene, or may be a single model in the scene, which is not specifically limited in the embodiment of the present application.
The state parameter may be considered an intermediate product of the second rendering node from execution of the stream of rendering instructions to the time of the rendered image. In an implementation manner, the state parameter includes a rendering scene configuration parameter, where the rendering scene configuration parameter is used to indicate a configuration of a scene (such as a two-dimensional scene or a three-dimensional scene) that needs to be displayed by the client, and the rendering node can reconstruct the entire rendering scene according to the rendering scene configuration parameter. Optionally, the rendering scene configuration parameters include: and one or any combination of the position, the material information, the texture map information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task.
Further, the state parameters further include a rendering model parameter indicating a configuration of a rendering model from which the rendering node can reconstruct the entire rendering model. Optionally, the rendering model parameters include: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
When the state parameter includes the rendering model parameter, although the storage pressure and the implementation cost of the state parameter may be increased, the efficiency of obtaining the rendering model parameter from the state parameter is effectively improved compared to an implementation manner in which the rendering model parameter is obtained from the original storage location of the rendering model parameter when the state parameter does not include the rendering model parameter.
Optionally, there are various implementation manners for storing the state parameters according to different implementation manners of the state storage node. For example, when the state storage node is deployed on a host on which the second rendering node resides, the second rendering node may store the state parameter in a storage medium of the host on which the second rendering node resides. For another example, when the state storage node is not deployed on the host on which the second rendering node is located, and when the state storage node is deployed on another host on which the rendering node is deployed, the second rendering node may send the state parameter to the other host, so as to store the state parameter in a storage medium of the other host. For another example, when the state storage node is deployed on a host or a host cluster in the rendering system where no rendering node is deployed, the second rendering node may send the state parameter to the host or the host cluster where no rendering node is deployed, and the state parameter is already stored in the storage medium on the host or the host cluster where no rendering node is deployed.
It should be noted that the rendering instruction stream received by the second rendering node may include a rendering instruction stream for rendering a plurality of images, and the second rendering node may store the state parameter immediately after obtaining the state parameter according to the rendering instruction stream for rendering any one of the images, or the second rendering node may store the obtained state parameter within a specified time according to the specified time, or the second rendering node may store all the state parameters obtained by executing the rendering task after completing the rendering task. For example, when a rendering task needs to be scheduled from the second rendering node to the first rendering node for execution, the second rendering node may store all state parameters obtained during the execution of the rendering task by the second rendering node after executing the rendering operation that needs to be executed according to the scheduling instruction.
In order to effectively continue to execute the rendering task according to the state parameters, the state parameters obtained by the second rendering node each time the rendering operation is executed need to be stored. In addition, in order to ensure the time sequence of the state parameters obtained according to the rendering instruction streams for rendering different images, the second rendering node may add tag information to the stored state parameters to identify the time sequence of the state parameters by using the tag information, so that the time sequences of the state parameters obtained according to the rendering instruction streams for rendering different images are not confused.
In addition, the second rendering node may encode the rendered image before sending the rendered image to the client, and send the encoded rendered image to the client. And, when the rendering image is an image frame in the video, the second rendering node also needs to encode one I frame. The encoding mode used by the second rendering node for encoding the rendered image may be determined according to an application requirement, and the embodiment of the present application does not specifically limit the encoding mode. In addition, the second rendering node needs to consider the frame rate of the client when encoding the rendered image and transmitting the encoded rendered image. For example, the second rendering node may encode the rendered image at a fixed frame rate (e.g., 30 frames per second) and send the encoded rendered image to the client, or the second rendering node may determine the frame rate to which encoding refers according to a change between every two adjacent rendered images.
The scenes of the rendering node executing the rendering task in the embodiment of the application comprise at least two scenes as follows:
in a first scenario, an application program runs in a client, the client needs to use rendering capability provided by a rendering node to provide images which need to be displayed in the running process of the application program for the client, and the client selects different images which need to be displayed according to different operations executed by the user at the client. For example, a certain game application is run in the client, and when a user performs different operations in the user interface of the game application, the images that the client needs to display are different. As shown in fig. 5, fig. 5 shows an image of a room just entered by a game character, where the image can be obtained by a user indicating the game character to enter the room in a user interface of a game application, a client sending a rendering instruction stream to a rendering node according to the indication of entering the room, and the rendering node executing a rendering operation according to the rendering instruction stream. As shown in fig. 6, fig. 6 shows an image in which a game character enters a room and moves forward in the room to a position near a couch, the image may be obtained by a user instructing the game character to move forward in the user interface shown in fig. 5, the client sends a rendering instruction stream to the rendering node according to the movement instruction, and the rendering node performs a rendering operation according to the rendering instruction stream.
Also, as shown in fig. 5 and 6, the state parameter may be a rendering scene configuration parameter for describing the game scene displayed in fig. 5 and 6, such as a rendering scene configuration parameter describing the following rendering scene: the tea table is placed against the wall, located in front of the visual angle, of the room, the tea table is placed right opposite to the sofa, a soldier squats in the center of the room, and the soldier holds the gun to make an aiming posture.
When the state parameters further include the rendering model parameters, as shown in fig. 5 and 6, the state parameters include the total number of vertices, the total number of triangle patches, and the color of each rendering model in the room, the door, the soldier, the gun, the sofa, the end table, and the floor of the room.
In a second scenario, an application program runs in a client, a user interface of the application program includes at least two parts, a first part of the at least two parts displays an initial image drawn by a user, the initial image is locally rendered by the client, so the definition is low, a second part of the at least two parts displays an image with higher definition, which is sent by a rendering node to the client according to the rendering of the initial image, wherein after the user performs a rendering operation in the first part, the client displays an image which is drawn by the rendering operation and is rendered locally but is less clear in the first part, generates a rendering instruction stream according to the drawing operation of the user, and then sends the rendering instruction stream to the rendering node, so that the rendering node performs the rendering operation according to the rendering instruction stream and feeds back the rendered image to the client.
Also, as shown in fig. 7, the state parameter may be a rendering scene configuration parameter for describing the wreath scene displayed in fig. 7, such as a rendering scene configuration parameter for describing the following rendering scenes: the multiple boughs are connected end to form a garland.
When the state parameters further include rendering model parameters, as shown in fig. 7, the state parameters include the number of flowering branches enclosing a rosette, the total number of vertices of each bouquet of flowering branches, the total number of triangular patches, and colors.
Step 405, the management node instructs to schedule the rendering task of the client from the second rendering node to the first rendering node for execution, and notifies the first rendering node and the second rendering node.
After the management node instructs the second rendering node to execute the rendering task generated by the client, the management node may continue to schedule the rendering node for executing the rendering task generated by the client to the client, for example, continue to determine the rendering node allocated to the client according to the specified scheduling policy of the management node, so as to optimize the resource utilization rate in the rendering system, or after the rendering task of the client is interrupted for some reason, the management node may reschedule the rendering task generated by the client, so as to continue to execute the rendering task. Also, the rendering node that the management node reschedules to the client may be the same or different than the rendering node that the management node previously scheduled to the client. For example, the rendering node that the management node reschedules to the client may be the first rendering node, at which point the management node may indicate to the first rendering node and the second rendering node that the rendering task for the client is scheduled from the second rendering node to the first rendering node.
The condition that the management node reschedules the rendering node executing the rendering task comprises the following steps: firstly, the running load of the second rendering node is too high, and the rendering task needs to be scheduled to other rendering nodes for execution so as to reduce the running load of the second rendering node and ensure the running performance of the second rendering node; secondly, the running load of the second rendering node is too low, all rendering tasks executed by the second rendering node can be scheduled to other rendering nodes for execution, and the second rendering node is closed, so that the resource utilization rate of the rendering system is improved; thirdly, the second rendering node fails to execute the rendering task continuously, and the rendering task needs to be dispatched to other rendering nodes for execution so as to ensure the normal execution of the rendering task; fourthly, the client does not send the rendering instruction stream to the second rendering node for a long time, so that the management node indicates that the rendering session between the second rendering node and the client is closed, even the management node allocates the second rendering node to other clients, and at this time, when the user reactivates the rendering session of the client, the rendering node needs to be scheduled for the client again.
When the rendering task of the client is scheduled from the second rendering node to the first rendering node for execution, the network connection between the client and the rendering node needs to be switched. When the rendering system includes a gateway node, the switching of the network connection between the client and the rendering node may be implemented by the gateway node, and the implementation manner includes: and maintaining network connection between the gateway node and the client, and switching the rendering node connected with the gateway node from the second rendering node to the first rendering node. In this way, the client does not perceive the switching of the network connection, and can realize the rescheduling of the rendering node under the condition that the client does not perceive. When the rendering system does not include a gateway node, the management node may notify the rendering node to which the client is assigned to become the first rendering node, so that the client switches its network connection with the rendering node to a network connection with the first rendering node.
And 406, the first rendering node acquires the state parameter of the rendering task.
After the first rendering node receives the instruction that the management node instructs to schedule the rendering task to the first rendering node for execution, the first rendering node may start a related rendering program and obtain a state parameter of the rendering task. Moreover, according to different implementation manners of the state storage node, there are also multiple implementation manners for the first rendering node to obtain the state parameter, and the following implementation manners are taken as examples to describe the following implementation manners:
in a first implementation manner, when a state storage node is deployed on a host or a host cluster in which no rendering node is deployed in a rendering system, a first rendering node acquires a state parameter from the state storage node, for example, from a storage medium of a host or a host cluster in which the state storage node is located.
In a second implementation manner, when the state parameter is stored on the host computer where the first rendering node is located, the first rendering node may obtain the state parameter from a storage medium of the host computer where the first rendering node is located. At this time, the second rendering node may be deployed on the same host as the first rendering node.
In a third implementation, when the state parameter is stored on another host that is not deployed with the first rendering node, the first rendering node may obtain the state parameter from a storage medium of the other host. For example, when the first rendering node and the second rendering node are deployed on different hosts and the second rendering node stores the state parameter on the host on which the second rendering node is located, the first rendering node may obtain the state parameter from a storage medium of the host on which the second rendering node is located. For another example, when the state parameter is stored on another host that does not deploy the first rendering node and the second rendering node, the first rendering node may acquire the state parameter from a storage medium of the other host.
It should be noted that, when the first rendering node and the second rendering node are deployed on the same host, the first rendering node may not obtain the state parameter stored by the second rendering node, and the first rendering node may restore the data on the host where the first rendering node is located to be available, and then continue to execute the rendering task according to the data restored to be available.
And 407, the first rendering node continues to execute the rendering task based on the state parameter to obtain a rendering image of the rendering task, and the rendering image is sent to the client.
After the first rendering node obtains the state parameter of the rendering task, model data can be loaded, model parameters and camera parameters can be set, and the like, based on the state parameter, so that the rendering task can be continuously executed. Since the amount of data involved in the process is large, and when the state parameters do not include the model configuration parameters, the first rendering node needs to obtain the model configuration parameters from other storage systems, for example, the model configuration parameters need to be obtained from a network file system of the object storage, and therefore the process may need to be completed by performing one or more processes. And the first rendering node and the second rendering node can simultaneously execute the rendering tasks, and send the rendering images to the client by using the second rendering node so as to ensure the quality of the rendering service provided for the client until the first rendering node can stably execute the rendering tasks, and then switch to the first rendering node to send the rendering images to the client.
In addition, in the process of executing the rendering task by the first rendering node, the client may also send a newly generated rendering instruction stream to the first rendering node, and after receiving the newly generated rendering instruction stream, the first rendering node may execute a rendering operation according to the newly generated rendering instruction stream, so as to obtain a rendering image that the client needs to display. Meanwhile, the first rendering node may also store the state parameters obtained in the process of performing the rendering operation for subsequent use.
In addition, the second rendering node may encode the rendered image before sending the rendered image to the client, and send the encoded rendered image to the client. And, when the rendering image is an image frame in the video, the second rendering node also needs to encode one I frame. The encoding mode used by the second rendering node to encode the rendered image may be determined according to application requirements, and is not specifically limited in the embodiment of the present application.
As can be seen from the above, in the rendering method provided in the embodiment of the present application, after receiving an instruction instructing execution of a rendering task generated by a client, a first rendering node obtains a state parameter generated when a second rendering node executes the rendering task, continues to execute the rendering task based on the state parameter, obtains a rendering image of the rendering task, and sends the rendering image to the client. In the rendering method, the state parameter is obtained by the second rendering node executing the rendering task in advance, so that on one hand, the first rendering node can directly execute the subsequent rendering operation according to the state parameter, and the first rendering node does not need to re-render according to the rendering instruction sent by the client to obtain the state parameter, the consumption of rendering resources of the first rendering node is reduced, the rendering efficiency is improved, on the other hand, the client does not need to send the rendering instruction to the first rendering node again, so that the client does not sense the scheduling of the rendering node for executing the rendering task of the client, and the user experience is ensured.
The following describes an implementation process of allocating rendering nodes by a management node based on a similarity policy. As shown in fig. 8, the implementation process includes the following steps:
step 801, the management node obtains description information of a rendering target in a rendering task of the client.
The description information of the rendering target is used for indicating the rendering target in the rendering task. In different implementation scenarios, the implementation manner of the description information is different. The following two implementation scenarios are taken as examples to illustrate the description information of the rendering target:
in a first implementation scenario, a client may instruct to access a browsing type file (also referred to as a read-only browsing type file), at this time, an image to be displayed in a display interface of the client is a page of the browsing type file, and a rendering task sheet renders a page targeted for the browsing line file. In the first scenario, the description information of the rendering target is information for describing the browsing type file. For example, when the rendering target is a browsing type file, the description information of the rendering target is the storage address of the browsing type file. The rendering session request sent by the client may carry description information of the browsing-type file, and the rendering session request is used to request the management node to allocate, to the client, a rendering node for executing a rendering task generated by the client.
In a second implementation scenario, a user operates the client to drive a scene to be displayed in the client to change, at this time, an image to be displayed on a display interface of the client is a picture of the changed scene, and the client sends a rendering instruction stream according to the user operation, so that the rendering node executes a rendering operation according to the rendering instruction stream to obtain the scene. In the second scene, the description information of the rendering target is information for describing the rendered scene. For example, when the rendering target is a game scene of a game application running in the client, the description information of the rendering target is information of the game scene obtained by the rendering node executing the rendering operation according to the rendering instruction stream.
Step 802, the management node obtains the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by each rendering node managed by the management node.
Optionally, the acquiring, by the management node, a similarity between the rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node includes: the management node respectively obtains the total number of the same rendering model included in the rendering target of the rendering task executed by each rendering node managed by the management node and the rendering target described by the description information, and determines the similarity based on the total number. For convenience of description, the total number of the same rendering model included in the rendering target of the rendering task executed by any one rendering node and the rendering target described by the description information is referred to as the total number of the same rendering model corresponding to any one rendering node.
For example, for the rendering node a managed by the management node, the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by the rendering node a may be determined according to the total number A1 of rendering models included in the rendering target of the rendering task executed by the rendering node a and the total number A2 of the same rendering models corresponding to the rendering node a.
Or, in order to improve the accuracy of the obtained similarity, the management node may further process the total number of the same rendering models corresponding to any rendering node according to the features of the rendering models included in the rendering target, so as to more accurately evaluate the similarity between the rendering target of the rendering task executed by the any rendering node and the rendering target described by the description information.
As an implementation manner, the management node may obtain at least one parameter of the total number of vertices, the total number of triangular patches, and the size of the occupied storage space of each same rendering model included in the rendering target of the rendering task executed by the any rendering node and the rendering target described by the description information, and determine the similarity based on the at least one parameter and the total number of the same rendering models corresponding to the any rendering node. For example, when determining the similarity, the at least one parameter may be used to weight a total number of the same rendering models corresponding to the any rendering node, so as to obtain a more accurate similarity.
Optionally, determining whether the two models are the same rendering model may be implemented in a variety of ways. For example, two rendering models may be considered the same rendering model when they are from the same network storage location (e.g., the Uniform Resource Locators (URLs) of the two rendering models are the same). Alternatively, two rendering models may be considered to be the same rendering model when they have the same model identification (e.g., message digest algorithm 5, MD5) value).
And step 803, the management node indicates the rendering nodes with the similarity greater than the specified similarity threshold, and the rendering tasks of the client are executed.
When the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by a certain rendering node is greater than an execution similarity threshold, the same data which needs to be rendered by the rendering target and the rendering target is more, the rendering node with the similarity greater than a specified similarity threshold is indicated to execute the rendering task of the client, so that at least two rendering tasks with the greater similarity can share rendering resources, at least part of rendering operations in different rendering tasks can be realized by using the same resource, repeated rendering operations are reduced, and the consumption of the rendering resources is reduced, for example, the consumption of video memory resources and computing resources for rendering is reduced, so that the limited rendering resources are utilized to provide services for more users, and the utilization rate of the rendering resources is improved.
The rendering nodes with the similarity greater than the specified similarity threshold may exist in multiple numbers, and at this time, one rendering node may be selected from the multiple rendering nodes according to a specified policy, and the selected rendering node is instructed to execute the rendering task of the client. The specified policy can be set according to application requirements. For example, the rendering node with the lowest load may be selected from the plurality of rendering nodes, which is not specifically limited in the embodiment of the present application. And, the specified similarity threshold can also be determined according to application requirements.
Moreover, when the rendering nodes are allocated, the load state of the rendering nodes also needs to be considered, for example, the management node indicates the rendering node with the similarity greater than a specified similarity threshold, and the rendering task of the client is executed, which may specifically include: the management node acquires the load state of the rendering node with the similarity larger than the specified similarity threshold, and when the load state of the rendering node with the similarity larger than the specified similarity threshold meets the specified load condition, the management node indicates the rendering node with the similarity larger than the specified similarity threshold to execute the rendering task of the client.
Therefore, the rendering node with the similarity greater than the specified similarity threshold is used for executing the rendering task of the client, at least part of rendering operations in different rendering tasks can be realized by using the same resource, repeated rendering operations are reduced, consumption of rendering resources is reduced, service is provided for more users by using the limited rendering resources, and the utilization rate of the rendering resources is improved.
It should be noted that, the order of steps of the rendering method provided in the embodiment of the present application may be appropriately adjusted, and the steps may also be correspondingly increased or decreased according to the situation. Any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application is covered by the protection scope of the present application, and thus the detailed description thereof is omitted.
The application also provides a rendering device, and a first rendering node is deployed in the rendering device. As shown in fig. 9, the rendering apparatus 90 includes:
a receiving module 901, configured to receive an instruction indicating to execute a rendering task generated by a client.
A first obtaining module 902, configured to obtain a state parameter of the rendering task, where the state parameter of the rendering task is generated by the second rendering node executing the rendering task.
A first processing module 903, configured to continue to execute the rendering task based on the state parameter, to obtain a rendering image of the rendering task;
a sending module 904, configured to send the rendered image to the client.
Optionally, the first obtaining module 902 is specifically configured to: and acquiring the state parameters from the state storage nodes, wherein the state parameters are stored in the state storage nodes by a second rendering node, the first rendering node and the state storage nodes are deployed on different hosts, and the second rendering node and the state storage nodes are deployed on different hosts.
Optionally, when the first rendering node and the second rendering node are deployed on the same host, the first obtaining module 902 is specifically configured to: and acquiring the state parameters from the storage medium of the host where the first rendering node is located.
Optionally, when the first rendering node and the second rendering node are deployed on different hosts, the first obtaining module 902 is specifically configured to: and acquiring the state parameters from the storage medium of the host where the second rendering node is located.
Optionally, the state parameter includes a rendering scene configuration parameter, and the rendering scene configuration parameter includes: and rendering the position, the material information, the texture mapping information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task, or any combination thereof.
Optionally, the state parameters further include rendering model parameters, and the rendering model parameters include: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
In summary, in the rendering apparatus provided in the embodiment of the present application, after receiving an instruction instructing execution of a rendering task generated by a client, a first rendering node obtains a state parameter generated by a second rendering node when executing the rendering task, and based on the state parameter, continues to execute the rendering task to obtain a rendering image of the rendering task, and sends the rendering image to the client.
The application provides a rendering device, wherein a management node is deployed in the rendering device. As shown in fig. 10, the rendering apparatus 100 includes:
a second obtaining module 1001, configured to obtain description information of a rendering target in a rendering task generated by a client.
The second obtaining module 1001 is further configured to obtain a similarity between a rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node.
The second processing module 1002 is configured to instruct a rendering node with a similarity greater than a specified similarity threshold to perform a rendering task of the client.
Optionally, the second obtaining module 1001 is specifically configured to: respectively acquiring the total number of the same rendering model included in the rendering target of the rendering task executed by each rendering node managed by the management node and the rendering target described by the description information; the similarity is determined based on the total number.
Optionally, the second obtaining module 1001 is specifically configured to: acquiring at least one parameter of the total number of vertexes, the total number of triangular patches and the size of occupied storage space of each same rendering model; based on the total number and the at least one parameter, a similarity is determined.
Optionally, the second processing module 1002 is specifically configured to: acquiring the load state of a rendering node with the similarity larger than a specified similarity threshold; and when the load state of the rendering node with the similarity larger than the specified similarity threshold meets the specified load condition, indicating the rendering node with the similarity larger than the specified similarity threshold, and executing the rendering task of the client.
Optionally, the description information includes any one of: the information is used for describing the browsing type file which needs to be accessed by the rendering task of the client, and the information is used for describing the rendering target obtained by the rendering node executing the rendering operation based on the rendering instruction of the client.
In summary, by indicating that the rendering node with the similarity greater than the specified similarity threshold executes the rendering task of the client, at least part of rendering operations in different rendering tasks can be implemented by using the same resource, so that repeated rendering operations are reduced, consumption of rendering resources is reduced, service is provided for more users by using limited rendering resources, and improvement of the utilization rate of rendering resources is facilitated.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding contents in the foregoing method embodiments, and are not described herein again.
The embodiment of the application provides computer equipment. A first rendering node or management node may be deployed in the computer device. Fig. 11 illustratively provides one possible architecture diagram for a computer device. As shown in fig. 11, the computer device 110 may include a processor 1101, a memory 1102, a communication interface 1103, and a bus 1104. In a computer device, the number of processors 1101 may be one or more, and fig. 11 illustrates only one of the processors 1101. Alternatively, processor 1101 may be a Central Processing Unit (CPU). If the computer device has multiple processors 1101, the multiple processors 1101 may be of different types, or may be the same type. Optionally, multiple processors of the computer device may also be integrated into a multi-core processor.
The memory 1102 stores computer instructions and data, and the memory 1102 may store computer instructions and data required to implement the rendering methods provided herein. Memory 1102 may be any one or any combination of the following storage media: nonvolatile Memory (e.g., read-Only Memory (ROM), solid State Disk (SSD), hard Disk (Hard Disk Drive), optical Disk, etc., volatile Memory.
The communication interface 1103 may be any one or any combination of the following devices: network interface (such as Ethernet interface), wireless network card, etc.
Communication interface 1103 is used for data communication between the computer device and other nodes or other computer devices.
Fig. 11 also illustratively depicts bus 1104. The bus 1104 may connect the processor 1101 with the memory 1102 and the communication interface 1103. Thus, via bus 1104, processor 1101 can access memory 1102 and can also interact with other nodes or other computer devices using communication interface 1103.
In the present application, the computer device executes the computer instructions in the memory 1102, so as to implement the function of the rendering resource recommendation device in the rendering method provided by the present application. For example, instructions are received that instruct execution of a client-generated rendering task; acquiring the state parameters of the rendering task, wherein the state parameters of the rendering task are generated by executing the rendering task by a second rendering node; based on the state parameters, continuing to execute the rendering task to obtain a rendering image of the rendering task; and sending the rendered image to the client. Moreover, by executing the computer instructions in the memory 1102, the implementation process of executing the steps of the computer device may refer to the corresponding description in the above method embodiments.
Embodiments of the present application further provide a storage medium, which is a non-volatile computer-readable storage medium, and when instructions in the storage medium are executed by a processor, the rendering method provided in the embodiments of the present application is implemented.
Embodiments of the present application further provide a computer program product including instructions, which, when the computer program product runs on a computer, causes the computer to execute the rendering method provided in the embodiments of the present application.

Claims (24)

1. A rendering method, comprising:
a first rendering node receives an instruction instructing execution of a rendering task generated by a client;
the first rendering node acquires the state parameters of the rendering tasks, and the state parameters of the rendering tasks are generated by executing the rendering tasks by a second rendering node;
the first rendering node continues to execute the rendering task based on the state parameter to obtain a rendering image of the rendering task;
the first rendering node sends the rendered image to the client.
2. The method according to claim 1, wherein the obtaining, by the first rendering node, the state parameter of the rendering task specifically includes:
the first rendering node acquires the state parameter from a state storage node, the state parameter is stored in the state storage node by the second rendering node, the first rendering node and the state storage node are deployed on different hosts, and the second rendering node and the state storage node are deployed on different hosts.
3. The method according to claim 1, wherein when the first rendering node and the second rendering node are deployed on the same host, the obtaining, by the first rendering node, the state parameter of the rendering task specifically includes:
and the first rendering node acquires the state parameters from a storage medium of a host where the first rendering node is located.
4. The method according to claim 1, wherein when the first rendering node and the second rendering node are deployed on different hosts, the first rendering node obtains the state parameter of the rendering task, and specifically includes:
and the first rendering node acquires the state parameters from the storage medium of the host where the second rendering node is located.
5. The method of any of claims 1 to 4, wherein the state parameters comprise rendering scene configuration parameters, and wherein the rendering scene configuration parameters comprise: and one or any combination of the position, the material information, the texture mapping information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task.
6. The method of claim 5, wherein the state parameters further comprise rendering model parameters, the rendering model parameters comprising: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
7. A rendering method, comprising:
the method comprises the steps that a management node obtains description information of a rendering target in a rendering task generated by a client;
the management node acquires the similarity between a rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node;
and the management node indicates the rendering nodes with the similarity greater than a specified similarity threshold, and the rendering tasks of the client are executed.
8. The method according to claim 7, wherein the acquiring, by the management node, the similarity between the rendering target described by the description information and the rendering target of the rendering task executed by each rendering node managed by the management node includes:
the management node respectively acquires the rendering targets of the rendering tasks executed by the rendering nodes managed by the management node and the total number of the same rendering models included in the rendering targets described by the description information;
the management node determines the similarity based on the total number.
9. The method according to claim 8, wherein the management node obtains a similarity between a rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node, and further comprising:
the management node acquires at least one parameter of the total number of vertexes, the total number of triangular patches and the size of occupied storage space of each same rendering model;
the determining, by the management node, the similarity based on the total number specifically includes:
the management node determines the similarity based on the total number and the at least one parameter.
10. The method of any of claims 7 to 9, wherein the management node indicates rendering nodes with a similarity greater than a specified similarity threshold, and wherein performing the rendering task of the client comprises:
the management node acquires the load state of the rendering node with the similarity larger than a specified similarity threshold;
and when the load state of the rendering node with the similarity larger than the specified similarity threshold value meets a specified load condition, the management node indicates the rendering node with the similarity larger than the specified similarity threshold value to execute the rendering task of the client.
11. The method according to any one of claims 7 to 10, wherein the description information includes any one of:
the information is used for describing the browsing type file which needs to be accessed by the rendering task of the client, and the information is used for describing the rendering target which is obtained by the rendering node executing the rendering operation based on the rendering instruction of the client.
12. A rendering apparatus in which a first rendering node is disposed, the rendering apparatus comprising:
a receiving module for receiving an instruction instructing execution of a rendering task generated by a client;
the first obtaining module is used for obtaining the state parameters of the rendering tasks, and the state parameters of the rendering tasks are generated by executing the rendering tasks by a second rendering node;
the first processing module is used for continuously executing the rendering task based on the state parameter to obtain a rendering image of the rendering task;
a sending module, configured to send the rendered image to the client.
13. The apparatus of claim 12, wherein the first obtaining module is specifically configured to:
and acquiring the state parameters from a state storage node, wherein the state parameters are stored in the state storage node by the second rendering node, the first rendering node and the state storage node are deployed on different hosts, and the second rendering node and the state storage node are deployed on different hosts.
14. The apparatus of claim 12, wherein when the first rendering node and the second rendering node are deployed on the same host, the first obtaining module is specifically configured to:
and acquiring the state parameters from a storage medium of a host where the first rendering node is located.
15. The apparatus of claim 12, wherein when the first rendering node and the second rendering node are deployed on different hosts, the first obtaining module is specifically configured to:
and acquiring the state parameter from a storage medium of a host where the second rendering node is located.
16. The apparatus according to any one of claims 12 to 15, wherein the status parameter comprises a rendering scene configuration parameter, and wherein the rendering scene configuration parameter comprises: and one or any combination of the position, the material information, the texture map information, the light source type, the light source position, the camera shooting position and angle and the data storage address of the rendering model in the rendering scene in the rendering task.
17. The apparatus of claim 16, wherein the state parameters further comprise rendering model parameters, the rendering model parameters comprising: one or any combination of the total number of vertices, the total number of triangle patches, and the colors of the rendering model in the rendering task.
18. A rendering apparatus in which a management node is disposed, the rendering apparatus comprising:
the second acquisition module is used for acquiring description information of a rendering target in a rendering task generated by the client;
the second obtaining module is further configured to obtain similarity between a rendering target described by the description information and a rendering target of a rendering task executed by each rendering node managed by the management node;
and the second processing module is used for indicating the rendering nodes with the similarity greater than a specified similarity threshold value and executing the rendering task of the client.
19. The apparatus of claim 18, wherein the second obtaining module is specifically configured to:
respectively acquiring the rendering targets of the rendering tasks executed by the rendering nodes managed by the management node and the total number of the same rendering model included in the rendering targets described by the description information;
determining the similarity based on the total number.
20. The apparatus of claim 19, wherein the second obtaining module is specifically configured to:
acquiring at least one parameter of the total number of vertexes, the total number of triangular patches and the size of occupied storage space of each same rendering model;
determining the similarity based on the total number and the at least one parameter.
21. The apparatus according to any one of claims 18 to 20, wherein the processing module is specifically configured to:
acquiring the load state of the rendering node with the similarity larger than a specified similarity threshold;
and when the load state of the rendering node with the similarity larger than the specified similarity threshold value meets a specified load condition, indicating the rendering node with the similarity larger than the specified similarity threshold value, and executing the rendering task of the client.
22. The apparatus according to any one of claims 18 to 21, wherein the description information comprises any one of:
the information is used for describing the browsing type file which needs to be accessed by the rendering task of the client, and the information is used for describing the rendering target obtained by the rendering node executing the rendering operation based on the rendering instruction of the client.
23. A computer device, characterized in that the computer device comprises: a processor and a memory, the memory having a computer program stored therein; the computer device implementing the method of any one of claims 1 to 11 when the processor executes the computer program.
24. A storage medium, wherein instructions of the storage medium, when executed by a processor, implement the method of any one of claims 1 to 11.
CN202110482646.8A 2021-04-30 2021-04-30 Rendering method and device, computer equipment and storage medium Pending CN115253299A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110482646.8A CN115253299A (en) 2021-04-30 2021-04-30 Rendering method and device, computer equipment and storage medium
PCT/CN2022/089931 WO2022228521A1 (en) 2021-04-30 2022-04-28 Rendering method and apparatus therefor, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110482646.8A CN115253299A (en) 2021-04-30 2021-04-30 Rendering method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115253299A true CN115253299A (en) 2022-11-01

Family

ID=83744939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110482646.8A Pending CN115253299A (en) 2021-04-30 2021-04-30 Rendering method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115253299A (en)
WO (1) WO2022228521A1 (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8436867B1 (en) * 2009-11-06 2013-05-07 Pixar System and method for generating computer graphic images by identifying variant and invariant shader arguments
CN102088472B (en) * 2010-11-12 2013-06-12 中国传媒大学 Wide area network-oriented decomposition support method for animation rendering task and implementation method
EP2538328A1 (en) * 2011-06-21 2012-12-26 Unified Computing Limited A method of provisioning a cloud-based render farm
CN103106680B (en) * 2013-02-16 2015-05-06 赞奇科技发展有限公司 Implementation method for three-dimensional figure render based on cloud computing framework and cloud service system
CN103699364B (en) * 2013-12-24 2016-09-21 四川川大智胜软件股份有限公司 A kind of three-dimensional graphics renderer method based on parallel drawing technology
CN106296788B (en) * 2016-10-10 2019-07-16 深圳市彬讯科技有限公司 Across the computer room Cluster Rendering of one kind disposes realization system
CN109669673A (en) * 2017-10-12 2019-04-23 世熠网络科技(上海)有限公司 Game engine device based on HTML5
CN110020367B (en) * 2017-12-15 2022-07-12 阿里巴巴集团控股有限公司 Page rendering method and device
CN109242945B (en) * 2018-12-13 2019-04-16 深圳市彬讯科技有限公司 Intelligent dispatching method, equipment and the storage medium of Distributed Rendering Environment
CN111951363A (en) * 2020-07-16 2020-11-17 广州玖的数码科技有限公司 Cloud computing chain-based rendering method and system and storage medium

Also Published As

Publication number Publication date
WO2022228521A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
US10097596B2 (en) Multiple stream content presentation
CN110227259B (en) Data processing method, device, server and system
EP3669547B1 (en) Method and apparatus for point-cloud streaming
CN111988392B (en) Resource allocation method based on cloud service, related device, equipment and system
US8924985B2 (en) Network based real-time virtual reality input/output system and method for heterogeneous environment
CN113457160B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111450528A (en) Cloud game rendering service system, method and device
US20150133216A1 (en) View generation based on shared state
CN108389241A (en) The methods, devices and systems of textures are generated in scene of game
US20150130814A1 (en) Data collection for multiple view generation
CN111739141B (en) 3D cloud rendering method for light terminal
CN112057851A (en) Multi-display-card-based real-time rendering method for single-frame picture
US20230336841A1 (en) System and method for streaming in metaverse space
US20150130815A1 (en) Multiple parallel graphics processing units
CN106940880A (en) A kind of U.S. face processing method, device and terminal device
CN109660508A (en) Data visualization method, electronic device, computer equipment and storage medium
US20170109113A1 (en) Remote Image Projection Method, Sever And Client Device
CN115253299A (en) Rendering method and device, computer equipment and storage medium
WO2023035619A1 (en) Scene rendering method and apparatus, device and system
CN107959824A (en) A kind of monitor video processing method, physical server and storage medium
JP7301453B2 (en) IMAGE PROCESSING METHOD, IMAGE PROCESSING APPARATUS, COMPUTER PROGRAM, AND ELECTRONIC DEVICE
CN114327790A (en) Rendering method of Android container based on Linux system
CN109995838A (en) Virtual content dispatching method, device, equipment and computer readable storage medium
CN110941413B (en) Display screen generation method and related device
JP6567032B2 (en) Multiple stream content presentation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination