WO2023035619A1 - 一种场景渲染方法、装置、设备及系统 - Google Patents

一种场景渲染方法、装置、设备及系统 Download PDF

Info

Publication number
WO2023035619A1
WO2023035619A1 PCT/CN2022/088042 CN2022088042W WO2023035619A1 WO 2023035619 A1 WO2023035619 A1 WO 2023035619A1 CN 2022088042 W CN2022088042 W CN 2022088042W WO 2023035619 A1 WO2023035619 A1 WO 2023035619A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering
scene
host
management device
application
Prior art date
Application number
PCT/CN2022/088042
Other languages
English (en)
French (fr)
Inventor
陈普
Original Assignee
华为云计算技术有限公司
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 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Priority to EP22866097.3A priority Critical patent/EP4390852A1/en
Publication of WO2023035619A1 publication Critical patent/WO2023035619A1/zh

Links

Images

Classifications

    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of data processing, in particular to a scene rendering method, device, equipment and system.
  • the real-time rendering of a three-dimensional (three dimensions, 3D) scene requires high performance of computing equipment.
  • lightweight terminal devices on the user side such as mobile phones and tablet computers, cannot meet this requirement.
  • a current approach is to adopt a cloud rendering solution, that is, to deploy 3D applications to remote devices with more powerful performance, and the remote devices run 3D applications to render 3D scene, and send the rendering result to the terminal device, and the terminal device displays the rendering result.
  • cloud rendering solutions have higher and higher requirements for cloud computing capabilities, which increases the cost of cloud rendering.
  • Embodiments of the present application provide a scene rendering method, device, device, and system, which can reduce the time delay caused by scene switching and reduce the cost of remote rendering.
  • a scene rendering method includes: obtaining a first request sent by a first device, where the first request indicates rendering a first scene of an application; determining from a plurality of rendering hosts for rendering the first scene The determined first rendering host is used to provide the rendering result of the first scene to the first device; obtain the scene switching notification of the application, and the scene switching notification indicates to render the second scene of the application; from multiple rendering hosts A second rendering host for rendering the second scene is determined, and the determined second rendering host is used to provide a rendering result of the second scene to the first device.
  • the rendering host needs to reload the program and data used to render the switched scene after the rendering of the previous scene is completed, resulting in delay.
  • different rendering hosts can be used to render different scenes of the application, and the program and data of the switched scene can be loaded without waiting for the rendering of the previous scene to end, thereby reducing the cost caused by scene switching. delay.
  • rendering hosts with higher computing power are used to render scenes with higher complexity
  • rendering hosts with lower computing power are used to render scenes with lower complexity
  • the rendering hosts responsible for rendering scenes with higher complexity can be allocated More computing resources, allocating less computing resources to scenes that are less responsible for rendering. This reduces performance requirements on the rendering host.
  • the method includes: during the process of rendering the first scene by the first rendering host, loading programs and data required for rendering the second scene on the second rendering host.
  • the rendering host that renders the latter scene in the process of rendering the previous scene, can load the programs and data required by the latter scene, so that after receiving the scene switching notification, it can Immediately start rendering the latter scene, thereby reducing the delay of scene switching and improving user experience.
  • the method includes: configuring a gateway; wherein, the gateway is configured to: receive the rendering result of the first scene of the first rendering host in the local area network, and send the first scene to the first device of the external network The rendering result of .
  • the rendering host can be isolated from the devices of the external network, avoiding the security risk caused by the devices of the external network directly accessing the rendering host, thereby improving the network security of the rendering host, avoiding or Reduce network attacks on render hosts
  • the method further includes: connecting the first device to the first rendering host, so that the first rendering host sends a rendering result of the first scene to the first device.
  • the scene switching notification is generated when the first rendering host receives a scene switching operation instruction from the first device, and the scene switching operation instruction instructs to render the second scene of the application.
  • the first device when it triggers scene switching, it can directly send the scene switching operation command to the rendering host that is currently in communication with the first device, and the rendering host generates a scene switching notification, so that The scene switching notification can be generated as soon as possible, reducing the time delay caused by scene switching and improving user experience.
  • the method further includes: acquiring a second request sent by the second device, where the second request indicates rendering the first scene of the application; instructing the first rendering host to provide the second device with the rendering of the first scene result.
  • the rendering host can provide rendering results of the same scene for different devices, so that there is no need to repeatedly render the same scene for different devices, which improves the utilization rate of the rendering results of the scene and saves computing resources.
  • the method further includes: adjusting resources used by the first rendering host for rendering the first scene according to the load of rendering the first scene.
  • the load of the scene can be rendered, and the resources used by the rendering host to render the scene can be dynamically adjusted, so that computing resources can be saved while meeting the rendering requirements of the scene.
  • a management device configured to include: an acquisition unit, configured to acquire a first request sent by a first device, where the first request indicates a first scene of a rendering application; a determination unit, configured to render from multiple The first rendering host for rendering the first scene is determined in the host, and the determined first rendering host is used to provide the rendering result of the first scene to the first device; the obtaining unit is also used to obtain a scene switching notification of the application, and the scene switching notification Indicates rendering the second scene of the application; the determining unit is further configured to determine a second rendering host for rendering the second scene from multiple rendering hosts, and the determined second rendering host is used to provide rendering of the second scene to the first device result.
  • the management device further includes: a loading unit, configured to load, on the second rendering host, programs and data required for rendering the second scene during the rendering of the first scene by the first rendering host.
  • the management device further includes: a configuration unit configured to configure the gateway; wherein the gateway is configured to: receive the rendering result of the first scene of the first rendering host in the local area network, and send A device sends the rendering result of the first scene.
  • the management device further includes: a connection unit, configured to connect the first device to the first rendering host, so that the first rendering host sends a rendering result of the first scene to the first device.
  • the scene switching notification is generated when the first rendering host receives a scene switching operation instruction from the first device, and the scene switching operation instruction instructs to render the second scene of the application.
  • the management apparatus further includes: an indication unit; wherein the acquisition unit is further configured to acquire a second request sent by the second device, and the second request indicates rendering the first scene of the application; the indication unit is configured to indicate The first rendering host provides the rendering result of the first scene to the second device.
  • the management device further includes: an adjusting unit, configured to adjust resources used by the first rendering host for rendering the first scene according to a load of rendering the first scene.
  • management device provided in the second aspect is used to implement the method provided in the first aspect, and its beneficial effects can refer to the beneficial effects of the method provided in the first aspect, and details are not repeated here.
  • a scene remote rendering system includes a management device and a plurality of rendering hosts; wherein the management device is configured to: obtain the first request sent by the first device, the first request indicates the rendering application The first scene; determining a first rendering host for rendering the first scene from multiple rendering hosts, and the determined first rendering host is used to provide a rendering result of the first scene to the first device; obtaining a scene switching notification of the application, The scene switching notification indicates rendering the second scene of the application; determining a second rendering host for rendering the second scene from multiple rendering hosts, and the determined second rendering host is used to provide a rendering result of the second scene to the first device.
  • the management device is further configured to execute: during the process of rendering the first scene by the first rendering host, load the program and data required for rendering the second scene on the second rendering host.
  • the management device is further configured to: configure a gateway; wherein, the gateway is configured to: receive the rendering result of the first scene of the first rendering host in the local area network, and send the rendering result to the first device on the external network The rendered result of the first scene.
  • the management device is further configured to: connect the first device to the first rendering host, so that the first rendering host sends a rendering result of the first scene to the first device.
  • the scene switching notification is generated when the first rendering host receives a scene switching operation instruction from the first device, and the scene switching operation instruction instructs to render the second scene of the application.
  • the management device is further configured to: acquire a second request sent by the second device, where the second request indicates to render the first scene of the application; instruct the first rendering host to provide the first scene to the second device The rendering result of .
  • the management device is further configured to: adjust resources used by the first rendering host for rendering the first scene according to the load of rendering the first scene.
  • scene remote rendering system provided by the third aspect is used to implement the method provided by the first aspect, and its beneficial effect can refer to the beneficial effect of the method provided by the first aspect, and details are not repeated here.
  • an image rendering system including the system provided in the third aspect and the first device.
  • a computer-readable storage medium including computer program instructions.
  • the cluster of computing devices executes the method provided in the first aspect.
  • a computer program product containing instructions is provided, and when the instructions are executed by a cluster of computer equipment, the cluster of computer equipment executes the method provided in the first aspect.
  • a management device in a seventh aspect, includes: a memory; and a processor, configured to execute instructions in the memory, so that the management device provides the method in the first aspect.
  • the scene rendering method, device, device, and system provided by this application can reduce the delay caused by scene switching, and can reduce the waste of computing resources, so that the computing resources can be used reasonably, the cost of remote rendering can be reduced, and the cost of remote rendering can be reduced. Render host performance requirements.
  • FIG. 1A is a schematic diagram of a scene rendering solution
  • FIG. 1B is a schematic diagram of a scene rendering solution
  • FIG. 2 is a schematic diagram of a scene rendering solution provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 4 is a flow chart of a rendering program deployment solution provided by an embodiment of the present application.
  • FIG. 5 is a flow chart of a terminal device logging into a remote rendering system provided by an embodiment of the present application
  • FIG. 6 is a flow chart of a scene switching solution provided by an embodiment of the present application.
  • FIG. 7 is a flow chart of a scene switching solution provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of a computing resource allocation scheme provided by an embodiment of the present application.
  • FIG. 9 is a flowchart of a scene rendering method provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a scene rendering device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a management device provided by an embodiment of the present application.
  • first and second are used for description purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • 3D applications such as 3D (3 dimension, 3D) games and virtual reality (virtual reality, VR) applications require real-time rendering of 3D scenes.
  • the 3D scene may refer to a three-dimensional space including one or more models.
  • Rendering a 3D scene may refer to a process in which a computing device runs a 3D application, drives scene data, renders a 3D scene, and obtains a rendering result.
  • the rendering result may refer to a rendered image for displaying a 3D scene.
  • Scene data refers to data used to describe a 3D scene, and may include graphic data of a model in a 3D space, light source data, virtual camera data, and the like.
  • the graphic data of the model may include the position and orientation of the model in three-dimensional space, and data such as vertices, materials, and textures composing the model.
  • the light source data may include data such as the location and type of the light source.
  • the virtual camera data may include data such as the position and orientation of the virtual camera.
  • a rendering solution for a 3D scene is a local rendering solution.
  • the terminal device can run a 3D application, drive scene data, and render a 3D scene. Due to the limited computing resources of terminal devices, it is difficult to render complex 3D scenes.
  • One solution is a cloud rendering solution.
  • the remote device runs the 3D application, renders the 3D scene, obtains the rendering result, and sends the rendering result to the terminal device.
  • the terminal device displays the rendering result by running the client of the 3D application. Therefore, the user can experience the visual experience brought by the 3D application without requiring the terminal device to have a strong graphics rendering capability.
  • the remote device whenever a terminal device requests the remote device to render a 3D scene, the remote device starts a 3D application to render the 3D scene for the terminal device.
  • a 3D application it may include multiple 3D scenes.
  • different rooms are different 3D scenes.
  • the user may need to switch between different 3D scenes, thus, the remote device needs to render different 3D scenes.
  • FIG. 1B when a 3D scene is switched, the remote device needs to load the scene data of the switched 3D scene. This loading process takes a certain amount of time, so that the user has to wait for a period of time, resulting in poor user experience.
  • the remote device when multiple terminal devices simultaneously request the remote device to render a 3D scene, the remote device simultaneously runs multiple 3D applications to render the 3D scene for the multiple terminal devices. In this way, the remote device needs to prepare computing resources for multiple 3D applications, which increases the requirement for computing resources on the remote device.
  • the same 3D application may include multiple 3D scenes of different complexity.
  • the 3D application may include a scene 1 and a scene 2, and scene 1 may be rendered by using the scene data of scene 1, and scene 2 may be rendered by using the scene data of scene 2.
  • More complex 3D scenes require more computing resources, and remote devices need to prepare computing resources for 3D applications according to the 3D scenes that require the most computing resources in 3D applications.
  • the 3D scene requiring the most computing resources is not always rendered, and the rendering of other 3D scenes may occupy most of the time. In this way, during most of the time, the computing resources allocated for the 3D application are not fully utilized, resulting in a waste of computing resources.
  • the complexity of the scene can also be understood as the difficulty of rendering the scene.
  • the complexity of the scene is related to the number of models in the scene, the texture of the model, the material of the model, and so on. For example, the more models in a scene, and the less easily rendered textures and materials for the models, the more complex the scene is.
  • the embodiment of the present application provides a scene rendering solution, which can be applied to a remote rendering system including multiple rendering hosts.
  • different rendering hosts can be used to render different scenes of the same application.
  • the rendering host A1 can be used to render the scene B1 of the application B
  • the rendering host A2 can be used to render the scene B2 of the application B, and so on.
  • computing resource allocation can be performed according to the granularity of the scene. For example, more computing resources can be allocated to the rendering host responsible for rendering scenes with higher complexity, and less computing resources can be allocated to rendering less responsible scenes; or, the rendering host with more computing resources can be used to render complex scenes. For scenes with a higher degree of complexity, a rendering host with less computing resources is used to render a scene with a lower degree of complexity. Thereby, the waste of resources can be reduced.
  • the terminal device may request the remote rendering system to render the switched scene.
  • the rendering host A1 can be set as the terminal device to render scene B1.
  • the remote rendering system receives the information sent by the terminal device to request rendering scene B2, it can instruct the rendering host A2 to Render scene B2 for the end device.
  • the remote rendering system can establish a connection between the terminal device and the rendering host A2, so that the rendering host A2 can send the rendering result to the terminal device. In this way, the loading time of the scene data can be saved, and the waiting of the user can be reduced.
  • a terminal device may also be called a user-side device, a local device, or simply a device.
  • the terminal device may be implemented as a mobile phone, a tablet computer, a personal computer (personal computer, PC), a smart wearable device, a smart TV, a vehicle terminal, and the like.
  • the terminal device can be deployed by a terminal device, which can perform the functions of the terminal device described below, wherein the terminal device can provide a hardware environment for the operation of the terminal device
  • the remote rendering system may be a cloud rendering system
  • the rendering host included in the remote rendering system may be a cloud computing device or device.
  • a rendering host may refer to a device or device that executes a rendering program, drives scene data of a scene, and performs scene rendering.
  • the rendering host may be a physical machine, such as an independent computing device, or a cluster composed of one or more computing devices.
  • the rendering host may be a virtual device, such as a virtual machine (virtual machine, VM), or a container (container).
  • the rendering host may have graphics rendering-related hardware, or obtain support from graphics rendering-related hardware, so as to have or obtain graphics rendering capabilities.
  • the graphics rendering hardware may refer to graphics processing unit (graphics processing unit, GPU), artificial intelligence (artificial intelligence, AI) chip and other hardware with graphics rendering capabilities.
  • the scene rendering method provided in the embodiment of the present application can render a 3D scene or a 2D scene.
  • the mentioned scene may refer to a 3D scene or a 2D scene.
  • the rendering host can load the rendering data of a certain scene when or before rendering the scene.
  • the rendering data of the scene may include the scene data of the scene, and may also include a rendering program for driving the scene data to render the scene. That is to say, the rendering program of the scene refers to the program required for rendering the scene, and the scene data of the scene refers to the data required for rendering the scene.
  • a specific rendering program of the scene may be called a rendering program instance of the scene.
  • the rendering host that can load the rendering program of the scene can specifically load one or more rendering program instances of the scene for the rendering host.
  • the rendering program or the rendering program instance When the rendering program or the rendering program instance is running in the rendering host, it can call the graphics rendering capability or computing resources of the rendering host to load and drive the scene data to complete the rendering of the scene.
  • the rendering program instance can load and parse the fbx file, and then call an open graphics library (open graphics library, openGL) program interface of the rendering host to complete image rendering.
  • the image refers to an image used to display a scene, that is, a rendering result.
  • the same application may include multiple scenarios, and a unique identification (identity document, ID) may be configured for each scenario, for example, the ID of scenario B1 is 092387459aa.
  • the rendering programs of different scenes in the multiple scenes may be different or the same. Exemplarily, for different scenes with low complexity, for example, different browsing scenes in a game application, their rendering programs may be the same. In an example, for a browsing scene, the rendering program may be the Viewer component provided by the WebGL browser rendering engine babylonjs. Exemplarily, for different scenes with high complexity, their rendering programs may be different. In particular, for scenes with frequent interactions, more program logic is required to process the interaction logic of the scenes. Different interactive scenarios may require different interaction logic, resulting in different required program logic. In one example, for the interactive scene of the game application, the program logic of the rendering program can be written using C++ language, C# language or visual blueprint technology, or the scene can be completed through shader programming during the scene rendering process. Rendering of some kind of special effect.
  • the embodiment of the present application proposes that different scenes can be rendered by different rendering hosts, but the number of scenes rendered by one rendering host is not limited, nor is the number of rendering hosts rendering the same scene.
  • one render host may be used to render one or more scenes.
  • the rendering host A4 can be used to render scene B1 and scene B3.
  • the same scene can also be rendered by multiple rendering hosts.
  • the rendering host A1 may render the scene B1 for one or more terminal devices.
  • the rendering capability of the rendering host A1 is limited, and it may be difficult to render the scene B1 for more terminal devices.
  • other rendering hosts such as rendering host A3, may be set to render scene B1.
  • the rendering host A1 and the rendering host A3 can respectively render the scene B1 for different terminal devices, and send respective rendering results to corresponding terminal devices.
  • the rendering host A1 and the rendering host A3 can cooperate to run the rendering program of the scene B1 to complete the rendering of the scene B1. Then, the rendering result of the collaborative rendering is sent to the terminal device D1 and the terminal device D2.
  • the rendering host A1 and the rendering host A3 can independently run the rendering program of the scene B1, and complete the rendering of the scene B1 independently. Wherein, the rendering host A1 can send the rendering result to the terminal device D1, and the rendering host A3 can send the rendering result to the terminal device D2.
  • a scene rendering program can be constructed based on cloud native technology, so that the flexibility and distributed advantages of the cloud platform can be fully utilized to realize the rapid deployment of the scene rendering program and the on-demand rendering of computing resources of the host. It needs to be scaled to save computing resources while ensuring user experience.
  • FIG. 3 shows a network architecture to which this embodiment of the present application is applicable.
  • the network architecture includes a remote rendering system and terminal devices.
  • the remote rendering system may include multiple rendering hosts.
  • the rendering host reference may be made to the introduction to the embodiment shown in FIG. 2 above.
  • the remote rendering system may include a management device for managing various components in the remote rendering system, such as a rendering host.
  • the management device can manage the deployment and update of the rendering data of the scene, and can also apply for computing resources for the rendering host when the rendering host runs the rendering program, or allocate rendering resources for the terminal device when the terminal device is connected to the remote rendering system.
  • the host you can also choose the rendering host used to render a certain scene, or you can choose the rendering host to render the switched scene when the scene is switched, etc., which will not be listed here.
  • the management device can receive management operations of the remote user.
  • the remote side user can combine the rendering data of multiple scenes into the rendering data of the application through the management device, and publish or update the rendering data of the application in the remote rendering system through the management device.
  • the remote side user can also publish or update the rendering data of one or some scenes in the remote rendering system by managing the device.
  • the management device may be a physical machine, such as an independent computing device, or a cluster composed of one or more computing devices.
  • the management device may be deployed with a management device, where the functions of the management device may be specifically implemented by the management device.
  • the management device may be a virtual device deployed on the management device, such as a virtual machine, a container, and the like.
  • the remote rendering system may also include a data storage device, which may be used to store scene rendering data. Specifically, it can be used to store the rendering program of the scene, and can be used to store the scene data of the scene. Exemplarily, as mentioned above, for different scenes with low complexity, their rendering programs are the same. Therefore, for different scenes with low complexity, it is not necessary to store the rendering program separately for each scene, and only one copy of the rendering program may be stored.
  • the rendering program can be reused, for example, it can be loaded or invoked by different rendering hosts.
  • the rendering host can load or call the rendering program of the scene from the data storage device, for example, the rendering host A1 can load or call the rendering program of the scene B1 from the data storage device.
  • the rendering program of the scene B1 may include the program logic of the scene B1.
  • the program logic of scenario B1 may be the same as or different from the program logic of other scenarios.
  • the program logic of the scene B1 may be the same as that of other scenes with a low complexity.
  • the program logic of the scene B1 may be different from the program logic of other scenes.
  • the rendering program of scene B1 may include a rendering engine module.
  • the rendering engine module may specifically be unity.
  • the rendering engine module can call a graphics library interface (for example, an openGL program interface) of the rendering host to complete image rendering.
  • the rendering program of scene B1 may also include an event processing module.
  • the event processing module can respond to user operation instructions from the terminal device D1, such as scene switching operation instructions, and generate a scene switching notification according to the scene switching operation instructions to notify the management device to perform scene switching. switch. The details will be introduced below and will not be repeated here.
  • the rendering program of scene B1 may also include a scene data loading module.
  • the scene data loading module can load the scene data of the scene B1 from the data storage device, so that the rendering program can use the scene data of the scene B1 to render the scene B1.
  • the rendering program of scene B1 may also include a communication module.
  • the communication module can receive information sent by the terminal device, for example, a scene switching operation instruction from the terminal device.
  • the communication module can also send information to the terminal device, such as sending a rendering result to the terminal device.
  • the rendering program of scene B1 can be implemented as a separate process.
  • the rendering program of scene B1 may be a thread under one process.
  • the rendering program of scene B1 may be a thread under the process of application B.
  • application B may include multiple scenes such as scene B1, scene B2, and scene B3, wherein the rendering program of each scene may be one or more threads under the process of application B.
  • the remote rendering system may further include a gateway (gateway), which is used to isolate the terminal device from the rendering host to improve the network security of the rendering host and avoid or reduce network attacks on the rendering host.
  • the remote rendering system can form a local area network, and the gateway, rendering host, and management device are located in the local area network. Therefore, the gateway can receive the rendering results and other data of the rendering host in the local area network, and send them to the external network. End devices send rendering results and other data.
  • the gateway can receive data such as rendering requests and scene switching operation instructions from terminal devices in the external network, and send data such as rendering requests and scene switching operation instructions in the local area network to the rendering host or management device in the local area network.
  • the terminal device can be connected to the gateway, and the gateway is connected to the rendering host, thereby realizing the brief connection between the terminal device and the rendering host.
  • the connection between the terminal device and the gateway does not need to be disconnected, and the terminal device can be connected to the new rendering host only by connecting the gateway to the new rendering host, which improves the user experience. experience. The details will be introduced in detail below, and will not be repeated here.
  • the terminal device may also be directly connected to the rendering host, so as to exchange information with the rendering host. The details will be introduced below and will not be repeated here.
  • the network architecture also includes a terminal device D1.
  • the terminal device D1 may also be called a user-side device or a local device.
  • terminal device D1 may be implemented as a terminal device.
  • the terminal device D1 can be implemented as a mobile phone, a tablet computer, a personal computer (personal computer, PC), a smart wearable device, a smart TV, a vehicle terminal, and the like.
  • the terminal device D1 may be configured with a terminal device.
  • the functions of the terminal device D1 may be specifically implemented by a terminal device, wherein the terminal device D1 may provide a hardware environment for the operation of the terminal device.
  • the terminal device D1 may be deployed with a client.
  • the client may be the client of the application to which the scene rendered by the remote rendering system belongs. Wherein, the client may also be referred to as a terminal device.
  • the client terminal may include an operation module, configured to receive a user operation instruction from a user at the terminal side.
  • the user operation instruction may be an operation instruction directly input by the user at the terminal side by using an input device (such as a keyboard, a mouse, etc.) of the terminal device.
  • the user at the terminal side can click the left mouse button, or press the A key on the keyboard, and so on.
  • User operation instructions may represent preset meanings.
  • a user operation instruction represents a scene switch.
  • the user operation instruction representing scene switching may be referred to as a scene switching operation instruction.
  • the meaning represented by the user operation instruction may be determined by the client on the terminal device, or may be determined by a related component or module (such as an event processing module) in the remote rendering system.
  • the above example introduces the applicable network architecture of the scene rendering solution provided by the embodiment of the present application.
  • the implementation process of the scene rendering solution provided by the embodiments of the present application is introduced.
  • a remote user can upload rendering data through a management device.
  • the rendering data may include scene data and rendering programs.
  • the rendering data uploaded in step 401 may be rendering data of scenes of one or more applications.
  • the rendering data uploaded in step 401 may be rendering data of a partial scene of an application.
  • the rendering data uploaded in step 401 may be the first uploaded rendering data of one or some scenes.
  • the rendering data uploaded in step 401 may be updated or upgraded rendering data of one or some scenes.
  • the rendering data uploaded in step 401 includes the rendering data of scene B1 and the rendering data of scene B2.
  • scene B1 and scene B2 may both belong to application B.
  • the management device may store the rendering data uploaded in step 401 in the data storage device.
  • step 403 the user at the remote end can trigger the deployment of the rendering program.
  • step 403 may also be understood as triggering an update of the rendering program.
  • the remote user can trigger the management device to deploy the rendering program to the rendering host.
  • the management device may send indication information A11 to the rendering host A1 through step 404a.
  • the instruction information A11 is used to instruct the rendering host A1 to deploy the rendering program of the scene B1.
  • the rendering host A1 may respond to the instruction information A11, and execute step 405a to load the rendering program of the scene B1 stored in the data storage device to the rendering host A1.
  • the rendering host A1 may immediately execute step 405a after receiving the instruction information A11, so as to deploy the rendering program of the scene B1 on the rendering host A1 before the rendering host A1 is connected to the terminal device.
  • the rendering host A1 may not execute step 405a immediately, but when there is a connection between the rendering host A1 and the terminal device, then execute the step 405a, so that the rendering host A1 When the operation of rendering scene B1 needs to be performed, the rendering program of scene B1 is deployed on the rendering host A1.
  • the management device may send instruction information A21 to the rendering host A2 through step 404b.
  • the instruction information A21 is used to instruct the rendering host A2 to deploy the rendering program of the scene B2.
  • the rendering host A2 may respond to the instruction information A21 and execute step 405b to load the rendering program of the scene B2 stored in the data storage device to the rendering host A2.
  • the rendering host A2 may execute step 405b immediately after receiving the instruction information A21, so as to deploy the rendering program of the scene B2 on the rendering host A2 before the rendering host A2 is connected to the terminal device.
  • the rendering host A2 may not execute step 405b immediately, but when there is a connection between the rendering host A2 and the terminal device, then execute step 405b, so that the rendering host A2 When the operation of rendering scene B2 needs to be performed, the rendering program of scene B2 is deployed in the rendering host A2.
  • the management device may send indication information A31 to the rendering host A3 through step 404c.
  • the instruction information A31 is used to instruct the rendering host A3 to deploy the rendering program of the scene B1.
  • the rendering host A3 may respond to the instruction information A31 and execute step 405c to load the rendering program of the scene B1 stored in the data storage device to the rendering host A3.
  • the rendering host A3 may execute step 405c immediately after receiving the instruction information A31, so as to deploy the rendering program of the scene B1 on the rendering host A3 before the rendering host A3 is connected to the terminal device.
  • the rendering host A3 may not execute step 405c immediately, but when there is a connection between the rendering host A3 and the terminal device, then execute step 405c, so that the rendering host A3 When the operation of rendering scene B1 needs to be performed, the rendering program of scene B1 is deployed in the rendering host A3.
  • step 405a, step 405b, and step 405c may be performed simultaneously or sequentially.
  • step 405a can be executed first, so that the rendering host A1 can use the rendering program of the scene B1 to render the scene B1.
  • step 405b may be executed, and the rendering host A2 loads the rendering program of the scene B2.
  • the above example introduces the deployment process of rendering data, and then describes the process of terminal devices logging into the remote rendering system.
  • the terminal device D1 may receive a login operation of a terminal-side user, such as receiving an account number and a password input by the user.
  • the terminal device D1 may send a login request to the remote rendering system in response to the login operation.
  • the login request may include identity information, and the identity information represents the user identity of the user at the terminal side.
  • Identity information can be used for authentication.
  • the remote rendering system can respond to the login request, allocate session resources (session), establish a session, and send the session identifier to the terminal device D1.
  • the terminal device D1 can use the session identifier to request services of the remote rendering system, such as rendering a scene.
  • the remote rendering system may include a login service device.
  • the login service device may store the corresponding relationship between the identity information and the remote service account, wherein the remote service account also represents a user identity, and the user identity has the authority to request the service of the remote rendering system.
  • the login service device can determine the remote service account according to the identity information in the login request, and send a session request to the management device through step 503, and the session request includes the remote service account.
  • the management device may perform step 504 to allocate a session for the terminal device D1 and generate a session ID (session ID).
  • the session identifier may be a token (token), for example, a token with a length of 256 bits.
  • the management device may also determine the first scene that needs to be rendered after the terminal device D1 logs in to the remote rendering system, and determine the rendering host used to render the scene.
  • the login request can also be understood as a scene rendering request, which is used to request the remote rendering system to render the scene for the terminal device D1 sending the login request.
  • the login request may include the identifier of the scene.
  • the identification of the scene is used to identify the scene.
  • the identifier of the scene can be sent to the management device through the login service device.
  • the management device can determine the first scene to be rendered after the terminal device D1 logs in to the remote rendering system according to the identifier of the scene, and determine the rendering host for rendering the first scene.
  • the terminal device D1 may directly send the login request to the management device.
  • the management device can allocate session resources and establish a session according to the login request, and determine the rendering host according to the identifier of the scene in the login request.
  • the remote rendering system may further include a gateway.
  • the management device may notify the gateway of the rendering host to be connected.
  • the rendering host to be connected here refers to the rendering host determined by the management device for rendering the first scene.
  • the management device may perform step 505 to send indication information to the gateway, where the indication information is used to indicate the rendering host to be connected.
  • the indication information may include a network address (such as an Internet Protocol (IP) address) of the rendering host to be connected.
  • IP Internet Protocol
  • the management device may not notify the gateway of the rendering host to be connected through step 505, but when or after the gateway establishes a connection with the terminal device D1, the gateway may query the management device for the rendering host to be connected .
  • the management device may also notify the gateway of the session identifier, so as to instruct the gateway to subsequently support the session with the session identifier.
  • the management device may not notify the gateway of the session identifier.
  • the management device may send the session identifier and gateway address to the login service device through step 506 .
  • the login service device may send the session identifier and gateway address to the terminal device D1 through step 507 .
  • the management device may directly send the session identifier and the gateway address to the terminal device D1. That is to say, the management device may send the session ID and the gateway address to the terminal device D1 without using the login service device or when the remote rendering system does not have a login service device.
  • the terminal device D1 may perform step 508 to send a connection request to the gateway according to the address of the gateway, so as to establish a connection between the terminal device D1 and the gateway.
  • the gateway can establish a connection between the gateway and the rendering host to be connected, so that the terminal device D1 can connect to the rendering host through the gateway, so that the rendering host can send the rendering result to the terminal Device D1.
  • the gateway can refer to the above introduction according to the manner of determining the rendering host to be connected, and details will not be repeated here.
  • the connection request sent by the terminal device D1 to the gateway can also be understood as a scene rendering request, which is used to request the remote rendering system to render the scene for the terminal device D1.
  • the connection request may include the identifier of the scene.
  • the gateway After the gateway receives the connection request, it can send the identifier of the scene to the management device.
  • the management device may determine the scene that the terminal device D1 requests to render according to the scene identifier. Afterwards, the management device may determine the rendering host for rendering the scene requested by the terminal device D1, and use the rendering host as the rendering host to be connected.
  • the management device can send the information (such as the network address) of the rendering host to be connected to the gateway.
  • the gateway can connect to the rendering host according to the information of the rendering host to be connected.
  • the connection between the terminal device D1 and the rendering host is established. That is to say, in this embodiment, before the terminal device D1 sends a connection request to the gateway, the management device does not need to determine the rendering host to be connected, but after the gateway receives the connection request, the management device then determines the rendering host to be connected.
  • the connection between the terminal device D1 and the gateway is a session.
  • the terminal device D1 can also send the session identifier to the gateway.
  • the gateway receives the session identifier, it can compare whether the session identifier is consistent with the session identifier received or queried by the gateway from the management device. If consistent, the gateway supports the session between itself and the terminal device D1.
  • the management device can directly send the determined network address of the rendering host used to render the first scene to the terminal device D1, and the terminal device D1 can The network address to connect to the render host.
  • the above example introduces the solution of terminal device D1 logging into the remote rendering system.
  • the example introduces the scene switching scenario.
  • the terminal device D1 may execute step 601 to send a connection request to the remote rendering system, so as to establish a connection between the terminal device D1 and the remote rendering system.
  • the terminal device D1 may send a connection request to the gateway in step 601, so as to establish a connection between the terminal device D1 and the gateway.
  • the gateway may query the management device for a rendering host to be connected.
  • the management device may also notify the gateway in advance of the rendering host to be connected.
  • the rendering host A1 can be set as the rendering host to be connected.
  • the management device may notify the rendering host A1 to prepare to connect to the terminal device D1.
  • the execution sequence of step 603 and step 602 is not limited.
  • step 603 may be performed after step 602 .
  • step 603 may be performed before step 602 .
  • step 603 may be executed when the management device determines that the rendering host A1 is the rendering host to be connected or after.
  • the gateway may connect to the rendering host A1. Since a connection has been established between the gateway and the terminal device D1 (see the description of the embodiment shown in FIG. 5 for details), when the gateway is connected to the rendering host A1, the terminal device D1 is also connected to the rendering host A1.
  • the terminal device D1 can send a connection request to the rendering host A1 according to the gateway address of the rendering host A1, so as to establish the terminal device D1 and the rendering host A1.
  • the rendering host A1 can run the rendering program of the scene B1, drive the scene data of the scene B1, and render the scene B1, so as to obtain the rendering result of the scene B1. Then, in step 606, the rendering host A1 may send the rendering result of the scene B1 to the terminal device D1.
  • the rendering result of the scene B1 in the case where the remote rendering system has a gateway, that is to say, when the terminal device D1 and the rendering host A1 are connected through a gateway, the rendering result of the scene B1 can be sent to the gateway first, and then the gateway can then Send the rendering result of the scene B1 to the terminal device D1.
  • the rendering host A1 can directly send the rendering result of the scene B1 to the terminal device D1.
  • the rendering host A1 needs to complete the loading of the rendering program and scene data of the scene B1.
  • the rendering host A1 may finish loading the rendering program of the scene B1 in advance. That is, before the terminal device D1 logs into the remote rendering system, the rendering host A1 can complete the loading of the rendering program of the scene B1.
  • the rendering host A1 after the rendering host A1 finishes loading the rendering program of the scene B1, it can call the scene data loading module in the rendering program to load the scene data of the scene B1 from the data storage device. That is to say, before the terminal device D1 logs into the remote rendering system, the rendering host A1 can finish loading the scene data of the scene B1.
  • the rendering host A1 may finish loading the rendering program of the scene B1. Then, when receiving the notification from the management device that the terminal device D1 is ready to be connected, or when the terminal device is connected to the rendering host A1, the rendering host A1 can call the scene data loading module to load the scene of the scene B1 from the data storage device data. In an example, when receiving the notification from the management device that the terminal device D1 is ready to be connected or when the terminal device D1 is connected to the rendering host A1, the rendering host A1 can load the rendering program of the scene B1 and call the scene data loading module , load the scene data of the scene B1 from the data storage device. In addition, for the scheme of loading the rendering program by the rendering host A1, reference may also be made to the above introduction to the embodiment shown in FIG. 4 .
  • the user at the terminal side may perform a scene switching operation.
  • the scene switching operation refers to the operation of entering another scene (scene B2) from the current scene (scene B1).
  • a user on the terminal side can perform an operation to enter a certain room in the game.
  • This operation may be an operation on a certain door in scene B1.
  • This operation may also be that when the focus is on a certain door in the scene B1, the user at the terminal side triggers a shortcut key (for example, clicks the left button of the mouse, or presses the A key on the keyboard).
  • the scene switching operation can also be an instruction to directly enter a certain scene.
  • the terminal device can be a language control device, and the user on the terminal side can enter a certain scene through a voice command.
  • the embodiment of the present application does not specifically limit the manner or form of the scene switching operation generated by the user at the terminal side.
  • the terminal device D1 may respond to the scene switching operation generated by the user on the terminal side, execute step 607, and send a scene switching operation command to the remote rendering system, and the scene switching operation command may be used to request the remote rendering system to render the scene B2, or instruct the remote rendering system to render the scene B2.
  • the end rendering system switches from performing the operation of rendering the scene B1 to performing the operation of rendering the scene B2.
  • the gateway can receive the scene switching operation instruction sent by the terminal device D1, and then send the scene switching operation instruction to the rendering host A1 through step 608.
  • the scene switching operation instruction sent by the terminal device D1 can be directly sent to the rendering host A1.
  • the rendering host A1 may determine that the scene switching operation instruction is used to instruct switching from performing the operation of rendering the scene B1 to performing the operation of rendering the scene B2.
  • the rendering host A1 may execute step 609 to send a scene switching notification to the management device, for notifying the management device that the terminal device D1 requests rendering of the scene B2.
  • the management device may respond to the scene switching notification and execute step 610 to determine that the rendering host A2 is used to render the scene B2, and determine that the rendering host A2 is the rendering host to be connected. Then, the management device may perform step 611 to notify the rendering host A2 to prepare to connect to the terminal device D1. In the case that the remote rendering system has a gateway, the management device may also perform step 612 to notify the gateway to switch the rendering host. Wherein, when informing the gateway to switch the rendering host, the information (such as network address) of the rendering host to be connected (the rendering host to be connected at this time is the rendering host A2) may be sent to the gateway.
  • the gateway can establish a connection between the gateway and the rendering host to be connected according to the information of the rendering host to be connected, that is, establish a connection between the gateway and the rendering host A2.
  • a connection is established between the terminal device D1 and the rendering host A2.
  • the rendering host A2 can execute step 614 to run the rendering program of the scene B2, drive the scene data of the scene B2, and render the scene B2, so as to obtain the rendering result of the scene B2. Then, in step 615, the rendering host A2 may send the rendering result of the scene B2 to the terminal device D1.
  • the rendering result of the scene B2 in the case where the remote rendering system has a gateway, that is to say, when the terminal device D1 and the rendering host A2 are connected through a gateway, the rendering result of the scene B2 can be sent to the gateway first, and then the gateway can then Send the rendering result of the scene B2 to the terminal device D1.
  • the rendering host A2 can directly send the rendering result of the scene B2 to the terminal device D1.
  • the rendering host A2 needs to complete the loading of the rendering program and scene data of the scene B2.
  • the specific implementation of rendering host A2 loading the rendering program and scene data of scene B2 can refer to the above introduction of rendering host A1 loading the rendering program and scene data of scene B1, and can also refer to the above description of Figure 4 Presentation of the example shown.
  • the rendering host A2 may load the rendering program and scene data of the scene B2.
  • an example introduces the scene switching solution.
  • an example of a scene switching solution is introduced.
  • the rendering host A1 is deployed with a rendering program of the scene B1, and the rendering program may include a rendering engine module, an event processing module and a communication module.
  • the rendering host A1 is deployed with a rendering program of the scene B2, and the rendering program includes a rendering engine module, an event processing module and a communication module.
  • the rendering engine module, event processing module and communication module deployed to the rendering program of rendering host A1 can be referred to as the rendering engine module, event processing module of rendering host A1 in turn. modules and communication modules.
  • the rendering engine module, event processing module and communication module of the rendering program deployed to the rendering host A2 may be referred to as the rendering engine module, event processing module and communication module of the rendering host A2 in turn.
  • the terminal device D1 executes step 701 to send a connection request to the remote rendering system.
  • the gateway in the remote rendering system may receive the connection request sent by the terminal device D1, and respond to the connection request, and through step 702, connect to the rendering host A1.
  • the rendering host A1 is connected to the gateway through the communication module of the rendering host A1. Thus an indirect connection between the terminal device D1 and the rendering host A1 will be established.
  • the communication module of the rendering host A1 may perform step 703 to send a rendering start notification to the rendering engine module of the rendering host A1 to instruct the rendering engine module to start rendering the scene B1.
  • the rendering engine module of the rendering host A1 may respond to the rendering start notification, perform step 704 to render the scene B1, and send the rendering result of the rendering scene B1 to the communication module of the rendering host A1 through step 705 .
  • the communication module of the rendering host A1 can send the rendering result to the terminal device D1 through steps 706 and 707, so that the terminal device D1 can display the rendering result.
  • the terminal device D1 may execute step 708 to send a scene switching operation instruction to the remote rendering system.
  • the gateway in the remote rendering system may receive the scene switching operation instruction, and send the scene switching operation instruction to the communication module of the rendering host A1 through step 709 .
  • the communication module of the rendering host A1 may send the scene switching operation instruction to the event processing module of the rendering host A1 through step 710 .
  • the event processing module may execute step 711, and identify a scene switching event according to the scene switching operation instruction, that is, identify an event that a scene switching from scene B1 to scene B2 has occurred.
  • the event processing module of the rendering host A1 may execute step 712 to send a scene switching notification to the management device.
  • step 711 and step 712 may also be executed by the communication module of the rendering host A1.
  • the management device may respond to the scene switching notification, determine that the rendering host A2 is used to render the scene B2, and notify the communication module of the rendering host A2 to prepare to connect to the terminal device D1 through step 713 .
  • the management device may also notify the gateway to switch the rendering host through step 714.
  • the gateway may execute step 715, to connect to the rendering host A2.
  • the communication module of the rendering host A2 is used to connect to the gateway.
  • the management device may execute step 716 to send a connection release notification to the communication module of the rendering host A1, so that the rendering host A1 releases the connection between the rendering host A1 and the gateway.
  • the communication module of the rendering host A2 may perform step 717 to send a rendering start notification to the rendering engine module of the rendering host A2 to instruct the rendering engine module to start rendering the scene B2.
  • the rendering engine module of the rendering host A2 may respond to the rendering start notification, perform step 718 to render the scene B2, and send the rendering result of the rendering scene B2 to the communication module of the rendering host A2 through step 719 .
  • the communication module of the rendering host A2 can send the rendering result to the terminal device D1 through steps 720 and 721, so that the terminal device D1 can display the rendering result.
  • Step 716 and step 717 can be executed simultaneously or successively.
  • the above example introduces the scene switching scheme.
  • the example introduces the computing resource allocation scheme.
  • computing resources may also be referred to as hardware resources, and may be simply referred to as resources.
  • the remote rendering system may further include a computing resource management device, configured to allocate computing resources to the rendering host.
  • the computing resource management device may serve cloud hosts.
  • the computing resources of the rendering hosts in the remote rendering system are not fixed, and the computing resource management device may allocate the same or different computing resources to different rendering hosts.
  • the rendering host may be a virtual machine or a container.
  • computing resources refer to resources used by computing devices (such as rendering hosts) when executing computing tasks. Among them, the more computing resources the device has or can use, the stronger the computing capability. Wherein, the computing resources may include the number and operating frequency of processors, and may also include the size of memory.
  • the rendering host Before connecting the rendering host to a terminal device or gateway, it is necessary to allocate computing resources to the rendering host so that the rendering host can use the computing resources to run rendering programs and perform related operations. For example, the rendering host invokes the communication module in the rendering program to establish a connection with the gateway (or terminal device).
  • the terminal device D1 may execute step 801 to send a connection request to the gateway.
  • the gateway may execute step 802, querying the management device for the rendering host to be connected. You can set the rendering host to be connected as rendering host A1.
  • the management device may perform step 803 to request the computing resource A12 for the rendering host A1.
  • the computing resource management device may respond to the request of the management device and execute step 804 to allocate the computing resource A12 to the rendering host A1.
  • the rendering host A1 can use the computing resource A12.
  • the size of the computing resource A12 may be determined by the management device. Specifically, the management device may determine the size of the computing resource A12 according to the scene that the rendering host A1 is responsible for rendering (that is, the scene B1). If the scene B1 is a scene with high complexity, the computing resource A12 is large. If the scene B1 is a scene with low complexity, the computing resource A12 is relatively small.
  • the size of the computing resource A12 may be determined by a computing resource management device. Specifically, the management device may send the identifier of the scene that the rendering host A1 is responsible for rendering (that is, the scene B1 ) to the computing resource management device. The computing resource management device may determine the size of the computing resource A12 according to the identifier of the scenario B1. If the scene B1 is a scene with high complexity, the computing resource A12 is large. If the scene B1 is a scene with low complexity, the computing resource A12 is relatively small.
  • steps 803 and 804 only need to be performed before the connection between the rendering host and the gateway (or terminal device D1 ) is established.
  • the management device can execute step 803 and step 804 when or before deploying the rendering program of the scene B1 to the rendering host A1.
  • the management device may execute step 803 and step 804 before step 802 is executed. In this way, computing resources can be prepared for the rendering host A1 in advance, reducing the waiting time of the user on the terminal side.
  • the management device may also perform step 805, sending a rendering program start instruction A13 to the rendering host A1.
  • the rendering program start instruction A13 is used to trigger the rendering host A1 to run the rendering program instance A131 of the scene B1, so as to connect the gateway (or terminal device D1) through the communication module of the rendering program instance A131, and call the rendering engine module of the rendering program instance A131 Render the scene B1 for the terminal device D1, and provide the rendering result of the scene B1 for the terminal device D2.
  • the terminal device D2 may execute step 806 to send a connection request to the gateway.
  • the gateway may perform step 807 to inquire about the rendering host to be connected to the management device.
  • the rendering host to be connected can be set as the rendering host A1, that is, the management device also assigns the terminal device D2 to the rendering host A1, and instructs the rendering host A1 to render the scene B1 for the terminal device D2.
  • the management device may also perform step 808, sending a rendering program start instruction A14 to the rendering host A1.
  • the rendering program start instruction A14 is used to trigger the rendering host A1 to run the rendering program instance A141 of the scene B1, so as to connect the gateway (or terminal device D2) through the communication module of the rendering program instance A141, and call the rendering engine module of the rendering program instance A141
  • the scene B1 is rendered for the terminal device D2, and the rendering result of the scene B1 is provided for the terminal device D2.
  • the rendering program instance A131 and the rendering program instance A141 are not the same instance. That is, the rendering program instance A131 is a rendering program instance of the scene B1, and the rendering program instance A141 is another rendering program instance of the scene B1.
  • the rendering program instance A131 and the rendering program instance A141 are the same instance.
  • the rendering program instance may copy the rendering result of the scene B1, and then send the rendering result of the scene B1 or a copy of the rendering result of the scene B1 to the terminal device D1 and the terminal device D2 respectively.
  • the terminal device D1 may execute step 809 to send a scene switching operation instruction to the rendering host A1.
  • the rendering host A1 may execute step 810 according to the scene switching operation instruction, and send a scene switching notification to the management device.
  • the management device may determine that the rendering host A2 is used to render the switched scene according to the scene switching notification. For details, reference may be made to the introduction of steps 607 to 610 in FIG. 6 above, which will not be repeated here.
  • the management device may also perform step 811 to request computing resource A22 for the rendering host A2.
  • the computing resource management device may execute step 812 to allocate computing resource A22 to the rendering host A2.
  • step 811 and step 822 can be implemented with reference to the introduction of step 803 and step 804 above.
  • the rendering host A2 can be set to render the scene B2.
  • the management device may also perform step 813, sending a rendering program start instruction A23 to the rendering host A2.
  • the rendering program start instruction A23 is used to trigger the rendering host A2 to execute the rendering program instance of the scene B2.
  • the gateway may perform step 814 to connect to the rendering host A2.
  • the communication module of the rendering program instance run by the rendering host A2 is used to connect with the gateway.
  • the rendering host A2 can send the rendering result of rendering the scene B2 to the terminal device D1.
  • the terminal device D1 may close the connection between the terminal device D1 and the gateway through step 815 .
  • Operations on the terminal device D1 side (for example, the terminal device D1 no longer runs the client, or the terminal device D1 logs out, etc.) may trigger the terminal device D1 to close the connection between the terminal device D1 and the gateway.
  • the gateway can execute step 816, and send a rendering host close request to the rendering host to notify the rendering host A2 that it can stop running, and there is no need to render the scene B2 for the terminal device D1.
  • the rendering host A2 may execute step 817 to send a session closing notification to the management device.
  • the management device may respond to the session closing notification, and may close or release the session resources allocated by the management device for the terminal device D1.
  • the session may be a session resource allocated to the terminal device D1 of the management device when the terminal device D1 logs in to the remote rendering system.
  • the management device may execute step 818 to request the computing resource management device to release the computing resource A22.
  • the management device may wait for a preset time length T1, and then perform step 818 .
  • the management device may perform step 818 after finding that the rendering host A2 is not running a rendering program instance.
  • the management device may perform step 818 after finding that the rendering host A2 is not running the rendering program instance, and the state of not running the rendering program instance lasts for a preset time length T2.
  • the computing resource management device may respond to the request of the management device and execute step 819 to release the computing resource A22 from the rendering host A2, so that the rendering host A2 no longer uses the computing resource A22.
  • the computing resource management device may wait for a preset period of time T2, and if the rendering host A2 is not running a rendering program instance during the waiting period, the computing resource management device executes the step 819. This avoids long time consumption caused by the management device repeatedly requesting computing resources for the rendering host A2 when the rendering host A2 constantly has new connection requirements.
  • the management device may adjust the computing resources used by the rendering host A1 for rendering the scene B1 according to the load of the rendering scene B1. Specifically, in the process of rendering scene B1 by rendering host A1, if the load of rendering scene B1 is high, so that rendering host A1 takes a long time to render scene B1 or the effect is poor, more resources can be allocated to rendering host A1. computing resources, so that the rendering host A1 can complete the rendering of the scene B1 with high quality and quickly. In the process of rendering host A1 rendering scene B1, if rendering host A1 can render scene B1 under a relatively low load, the computing resources allocated to rendering host B1 can be reduced to release unnecessary computing resources of rendering host A1 , reducing the waste of computing resources.
  • computing resource allocation can be performed according to the granularity of the scene. For example, more computing resources can be allocated to the rendering host responsible for rendering scenes with higher complexity, and less computing resources can be allocated to rendering less responsible scenes; or, the rendering host with more computing resources can be used to render complex scenes. For scenes with a higher degree of complexity, a rendering host with less computing resources is used to render a scene with a lower degree of complexity. Thereby, the waste of resources can be reduced. Furthermore, during the scene rendering process, the computing resources used by the rendering host can be adjusted according to the load of the rendering scene, which further reduces the waste of computing resources and enables more reasonable utilization of computing resources.
  • a scene rendering method provided by an embodiment of the present application is introduced. It can be understood that this method is proposed based on the above-mentioned scene rendering solution, and is another way of expressing the above-mentioned scene rendering solution, and the two are combined. For a specific implementation manner of the method, reference may be made to the above description.
  • the method includes the following steps.
  • Step 901 acquire a first request sent by a first device, where the first request indicates rendering a first scene of an application.
  • step 901 can be implemented with reference to the introduction of step 601 in FIG. 6 or step 701 in FIG. 7 above.
  • Step 902 Determine a first rendering host used to render the first scene from multiple rendering hosts, and the determined first rendering host is used to provide a rendering result of the first scene to the first device.
  • step 902 may be implemented with reference to the above introduction to steps 602-606 in FIG. 6 or steps 702-707 in FIG. 7 .
  • Step 903 acquiring a scene switching notification of the application, where the scene switching notification indicates rendering a second scene of the application.
  • step 903 can be implemented with reference to the above introduction to steps 607-609 in FIG. 6 or steps 708-710 in FIG. 7 .
  • Step 904 Determine a second rendering host for rendering the second scene from the plurality of rendering hosts, and the determined second rendering host is used for rendering the second scene to the first device result.
  • step 904 can be implemented with reference to the above introduction to steps 610-615 in FIG. 6 or steps 711-721 in FIG. 7 .
  • the method includes: during the process of rendering the first scene by the first rendering host, loading programs and data required for rendering the second scene on the second rendering host.
  • loading programs and data required for rendering the second scene on the second rendering host For details, reference may be made to the above introduction to step 405a and step 405b in FIG. 4 , or the above introduction to step 605 and step 614 in FIG. 6 , which will not be repeated here.
  • the method further includes: configuring a gateway; wherein, the gateway is configured to: receive the rendering result of the first scene of the first rendering host in the local area network, and send the rendering result of the first scene to the external network.
  • a device sends the rendering result of the first scene.
  • the method further includes: the method further includes: connecting the first device to the first rendering host, so that the first rendering host sends the first scene to the first device The rendering result of .
  • the introduction of step 604 and step 613 in FIG. 6 will not be repeated here.
  • the scene switching notification is generated when the first rendering host receives a scene switching operation instruction from the first device, and the scene switching operation instruction instructs to render the second scene of the application .
  • the scene switching operation instruction instructs to render the second scene of the application .
  • the method further includes: acquiring a second request sent by the second device, the second request indicating rendering the first scene of the application; instructing the first rendering host to send the second request to the second The device provides a rendering result of the first scene.
  • the method further includes: adjusting resources used by the first rendering host for rendering the first scene according to the load of rendering the first scene.
  • the management device can adjust the computing resources used by the rendering host A1 for rendering the scene B1 according to the load of the rendering scene B1, and details are not repeated here.
  • different rendering hosts can be used to render different scenes of the application, which can reduce the time delay caused by scene switching and reduce the performance requirements of the rendering host.
  • different scenes of the application can be rendered by different rendering hosts, and the rendering hosts can be selected or assigned computing resources according to the granularity of the scenes. For example, more computing resources can be allocated to the rendering host responsible for rendering scenes with higher complexity, and less computing resources can be allocated to rendering less responsible scenes; or, the rendering host with more computing resources can be used to render complex scenes. For scenes with a higher degree of complexity, a rendering host with less computing resources is used to render a scene with a lower degree of complexity. Thereby, the waste of resources can be reduced.
  • the embodiment of the present application provides a management apparatus 1000 , and the management apparatus 1000 can be deployed in the above-mentioned management device.
  • the management device 1000 may include:
  • An acquiring unit 1010 configured to acquire a first request sent by the first device, where the first request indicates rendering a first scene of the application;
  • the determining unit 1020 is configured to determine a first rendering host used to render the first scene from multiple rendering hosts, and the determined first rendering host is used to provide the first device with the rendering result;
  • the acquiring unit 1010 is further configured to acquire a scene switching notification of the application, where the scene switching notification indicates rendering a second scene of the application;
  • the determining unit 1020 is further configured to determine a second rendering host used to render the second scene from the plurality of rendering hosts, and the determined second rendering host is used to provide the first device with the The rendered result of the second scene.
  • the functions of the functional units of the management device 1000 can be realized by referring to the method embodiment shown in FIG. 9 above, or can be realized by referring to the introduction of the management equipment in FIGS. 3-8 above, and will not be repeated here.
  • the scene rendering device provided by the embodiment of the present application can instruct different rendering hosts to render different scenes of the application, which can reduce the time delay caused by scene switching and reduce the performance requirements of the rendering host.
  • different scenes of the application can be rendered by different rendering hosts, and the rendering hosts can be selected or assigned computing resources according to the granularity of the scenes. For example, more computing resources can be allocated to the rendering host responsible for rendering scenes with higher complexity, and less computing resources can be allocated to rendering less responsible scenes; or, the rendering host with more computing resources can be used to render complex scenes. For scenes with a higher degree of complexity, a rendering host with less computing resources is used to render a scene with a lower degree of complexity. Thereby, the waste of resources can be reduced.
  • the embodiment of the present application provides a management device 1100 , including a processor 1110 and a memory 1120 .
  • the memory 1120 is used to store computer instructions.
  • the processor 1110 is used to execute the computer instructions stored in the memory 1120, so that the management device 1100 can execute the various method embodiments shown in FIG. 9, or execute the operations performed by the management device shown in FIGS. 3-8.
  • the first request indicates to render the first scene of the application; determine the first rendering host for rendering the first scene from multiple rendering hosts, and the determined The first rendering host is configured to provide the first device with a rendering result of the first scene; acquire a scene switching notification of the application, where the scene switching notification indicates rendering a second scene of the application; A second rendering host for rendering the second scene is determined among the rendering hosts, and the determined second rendering host is used for providing a rendering result of the second scene to the first device.
  • the processor 1110 may be a central processing unit (central processing unit, CPU), and may also be other general-purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuits) , ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC application specific integrated circuits
  • FPGA field programmable gate array
  • a general-purpose processor can be a microprocessor, or any conventional processor.
  • An embodiment of the present application provides a remote rendering system, which may include a management device and multiple rendering hosts.
  • the management device may be the management device 1100 and multiple rendering hosts shown in FIG. 11 , or the management device shown in FIGS. 3-8 .
  • the multiple rendering hosts may include the rendering host A1 and the rendering host A2 described above.
  • the function of the management device and the function of the rendering host can be described in detail above, and will not be repeated here.
  • An embodiment of the present application provides an image rendering system, including the above-mentioned remote rendering system and a terminal device.
  • an image rendering system including the above-mentioned remote rendering system and a terminal device.
  • the terminal device For the specific functions of the terminal device, reference may be made to the introduction of the terminal device D1 above, and details will not be repeated here.
  • the method steps in the embodiments of the present application may be implemented by means of hardware, or may be implemented by means of a processor executing software instructions.
  • the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (random access memory, RAM), flash memory, read-only memory (read-only memory, ROM), programmable read-only memory (programmable rom) , PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or known in the art any other form of storage medium.
  • An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
  • the storage medium may also be a component of the processor.
  • the processor and storage medium can be located in the ASIC.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted via a computer-readable storage medium.
  • the computer instructions may be transmitted from one website site, computer, server, or data center to another website site by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) , computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Graphics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及数据处理领域,特别涉及一种场景渲染方法、装置、设备及系统。其中,该方法包括:获取第一设备发送的第一请求,第一请求指示渲染应用的第一场景;从多个渲染主机中确定用于渲染第一场景的第一渲染主机,确定的第一渲染主机用于向第一设备提供第一场景的渲染结果;获取应用的场景切换通知,场景切换通知指示渲染应用的第二场景;从多个渲染主机中确定用于渲染第二场景的第二渲染主机,确定的第二渲染主机用于向第一设备提供第二场景的渲染结果。该方法可以减少场景切换所导致的时延以及降低远端渲染成本。

Description

一种场景渲染方法、装置、设备及系统
本申请要求于2021年9月10日提交中国国家知识产权局、申请号为202111060254.9、申请名称为“一种多场景云渲染的系统”,以及于2022年1月7日提交中国国家知识产权局、申请号为202210017329.3、申请名称为“一种场景渲染方法、装置、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理领域,特别涉及一种场景渲染方法、装置、设备及系统。
背景技术
对三维(three dimensions,3D)场景的实时渲染对计算设备的性能要求较高。通常,用户侧的轻量级终端设备,例如手机、平板电脑等,难以满足该要求。为了使用户能够使用轻量级终端设备体验3D场景,目前的一种做法为采用云端渲染方案,即将3D应用部署到性能更为强大的远端设备,由远端设备运行3D应用,来渲染3D场景,并将渲染结果发送给终端设备,由终端设备显示渲染结果。
随着3D应用的普及和发展,云端渲染方案对云端计算能力的要求越来越高,增加了云端渲染的成本。
发明内容
本申请实施例提供了一种场景渲染方法、装置、设备及系统,可以减少场景切换所导致的时延以及降低远端渲染成本。
第一方面,提供了一种场景渲染方法,该方法包括:获取第一设备发送的第一请求,第一请求指示渲染应用的第一场景;从多个渲染主机中确定用于渲染第一场景的第一渲染主机,确定的第一渲染主机用于向第一设备提供第一场景的渲染结果;获取应用的场景切换通知,场景切换通知指示渲染应用的第二场景;从多个渲染主机中确定用于渲染第二场景的第二渲染主机,确定的第二渲染主机用于向第一设备提供第二场景的渲染结果。
若应用的不同场景由同一渲染主机渲染,那么在场景切换时,渲染主机需要在前一场景的渲染结束后,重新加载用于渲染切换后的场景的程序和数据,从而导致时延。在本申请提供的场景渲染方法中,可以采用不同的渲染主机渲染应用的不同场景,无需等待前一场景的渲染结束,就可以加载切换后场景的程序和数据,从而可减少场景切换所导致的时延。
并且,若应用的不同场景由同一渲染主机渲染,那么需要根据复杂程度最高的场景为该渲染主机配置计算资源,而该渲染主机并不非一直渲染复杂程度最高的场景,或者说,大部分时间不在渲染复杂程度最高的场景,导致了渲染主机所配置的计算资源得不到充分利用,产生了计算资源的浪费。在本申请提供的场景渲染方法中,应用的不同场景可由不同的渲染主机渲染,当某一场景渲染完成时,相应的主机可以释放计算资源,或者为其他应用或设备渲染场景,从而减少了计算资源的浪费,使得计算资源得到合理使用,降低了远端渲染的成本。
另外,从而可以按照场景的粒度为选择渲染主机或为渲染主机分配计算资源,无需要求每个渲染主机都具备渲染复杂程度最高的场景的能力,或者根据复杂程度最高的场景为每个渲染主机配置计算资源。例如,采用计算能力较高的渲染主机渲染复杂程度较高的场景,采用计算能力较低的渲染主机渲染复杂程度较低的场景;或者,可以为负责渲染复杂程度较高的场景的渲染主机分配较多的计算资源,为负责渲染负责程度较低的场景分配较少的计算资源。从而可以降低对渲染主机的性能要求。
在一种可能的实现方式中,该方法包括:在第一渲染主机渲染第一场景的过程中,在第二渲染主机加载渲染第二场景所需的程序和数据。
也就是说,在该实现方式中,在渲染前一场景的过程中,渲染后一场景的渲染主机可以进行加载该后一场景所需的程序和数据,从而在获取到场景切换通知后,可以立即开始渲染后一场景,从而减少了场景切换的时延,改善了用户体验。
在一种可能的实现方式中,该方法包括:配置网关;其中,网关被配置为:在局域网内接收第一渲染主机的第一场景的渲染结果,向外部网络的第一设备发送第一场景的渲染结果。
也就是说,在该实现方式中,可以将渲染主机和外部网络的设备隔离开来,避免了外部网络的设备直接访问渲染主机所导致的安全风险,从而提高了渲染主机的网络安全,避免或减少对渲染主机的网络攻击
在一种可能的实现方式中,该方法还包括:将第一设备连接到第一渲染主机,以便第一渲染主机向第一设备发送第一场景的渲染结果。
也就是说,在该实现方式中,第一设备和第一渲染主机之间具有连接,从而使得渲染主机可以将渲染结果尽快发送至第一设备,减少了渲染结果在数据传输过程中的时延,改善了用户体验。
在一种可能的实现方式中,场景切换通知是第一渲主机在从第一设备接收到场景切换操作指令时产生的,场景切换操作指令指示渲染应用的第二场景。
也就是说,在该实现方式中,第一设备在触发场景切换时,可以将场景切换操作指令直接发送到当前与第一设备保持通信的渲染主机,并由该渲染主机产生场景切换通知,从而可以尽快产生场景切换通知,减少了场景切换所导致的时延,改善了用户体验。
在一种可能的实现方式中,该方法还包括:获取第二设备发送的第二请求,第二请求指示渲染应用的第一场景;指示第一渲染主机向第二设备提供第一场景的渲染结果。
也就是说,在该实现方式中,渲染主机可以为不同设备提供同一场景的渲染结果,从而无需为不同的设备重复渲染同一场景,提高了场景的渲染结果的利用率,节省了计算资源。
在一种可能的实现方式中,该方法还包括:根据渲染第一场景的负载,调整供第一渲染主机用于渲染第一场景所用的资源。
也就是说,在该实现方式中,可以渲染场景的负载情况,动态调整渲染主机用于渲染该场景的资源,从而可以在满足场景渲染需求的同时,节省计算资源。
第二方面,提供了一种管理装置,管理装置包括:获取单元,用于获取第一设备发送的第一请求,第一请求指示渲染应用的第一场景;确定单元,用于从多个渲染主机中确定用于渲染第一场景的第一渲染主机,确定的第一渲染主机用于向第一设备提供第一场景的渲染结果;获取单元还用于获取应用的场景切换通知,场景切换通知指示渲染应用的第二场景;确定单元还用于从多个渲染主机中确定用于渲染第二场景的第二渲染主机,确定的第二渲染主机用于向第一设备提供第二场景的渲染结果。
在一种可能的实现方式中,管理装置还包括:加载单元,用于在第一渲染主机渲染第一场景的过程中,在第二渲染主机加载渲染第二场景所需的程序和数据。
在一种可能的实现方式中,管理装置还包括:配置单元,用于配置网关;其中,网关被配置为:在局域网内接收第一渲染主机的第一场景的渲染结果,向外部网络的第一设备发送第一场景的渲染结果。
在一种可能的实现方式中,管理装置还包括:连接单元,用于将第一设备连接到第一渲染主机,以便第一渲染主机向第一设备发送第一场景的渲染结果。
在一种可能的实现方式中,场景切换通知是第一渲主机在从第一设备接收到场景切换操作指令时产生的,场景切换操作指令指示渲染应用的第二场景。
在一种可能的实现方式中,管理装置还包括:指示单元;其中,获取单元还用于获取第二设备发送的第二请求,第二请求指示渲染应用的第一场景;指示单元用于指示第一渲染主机向第二设备提供第一场景的渲染结果。
在一种可能的实现方式中,管理装置还包括:调整单元,用于根据渲染第一场景的负载,调整供第一渲染主机用于渲染第一场景所用的资源。
可以理解,第二方面提供的管理装置用于实施第一方面所提供的方法,其有益效果可以参考第一方面所提供的方法的有益效果,在此不再赘述。
第三方面,提供了一种场景远端渲染系统,该系统包括管理设备和多个渲染主机;其中,管理设备用于执行:获取第一设备发送的第一请求,第一请求指示渲染应用的第一场景;从多个渲染主机中确定用于渲染第一场景的第一渲染主机,确定的第一渲染主机用于向第一设备提供第一场景的渲染结果;获取应用的场景切换通知,场景切换通知指示渲染应用的第二场景;从多个渲染主机中确定用于渲染第二场景的第二渲染主机,确定的第二渲染主机用于向第一设备提供第二场景的渲染结果。在一种可能的实现方式中,管理装置还用于执行:在第一渲染主机渲染第一场景的过程中,在第二渲染主机加载渲染第二场景所需的程序和数据。
在一种可能的实现方式中,管理装置还用于执行:配置网关;其中,网关被配置为:在局域网内接收第一渲染主机的第一场景的渲染结果,向外部网络的第一设备发送第一场景的渲染结果。
在一种可能的实现方式中,管理装置还用于执行:将第一设备连接到第一渲染主机,以便第一渲染主机向第一设备发送第一场景的渲染结果。
在一种可能的实现方式中,场景切换通知是第一渲主机在从第一设备接收到场景切换操作指令时产生的,场景切换操作指令指示渲染应用的第二场景。
在一种可能的实现方式中,管理装置还用于执行:获取第二设备发送的第二请求,第二请求指示渲染应用的第一场景;指示第一渲染主机向第二设备提供第一场景的渲染结果。
在一种可能的实现方式中,管理装置还用于执行:根据渲染第一场景的负载,调整供第一渲染主机用于渲染第一场景所用的资源。
可以理解,第三方面提供的场景远端渲染系统用于实施第一方面所提供的方法,其有益效果可以参考第一方面所提供的方法的有益效果,在此不再赘述。
第四方面,提供了一种图像渲染系统,包括第三方面所提供系统和第一设备。
第五方面,提供了一种计算机可读存储介质,包括计算机程序指令,当计算机程序指令由计算设备集群执行时,计算设备集群执行第一方面所提供的方法。
第六方面,提供了一种包含指令的计算机程序产品,当指令被计算机设备集群运行时,使得计算机设备集群执行第一方面所提供的方法。
第七方面,提供了一种管理设备,管理设备包括:存储器;处理器,用于执行存储器中的指令,使得管理设备第一方面所提供的方法。
本申请提供的场景渲染方法、装置、设备及系统,可以减少场景切换所导致的时延,并且可以减少计算资源的浪费,使得计算资源得到合理使用,降低远端渲染的成本,以及可以降低对渲染主机的性能要求。
附图说明
图1A为一种场景渲染方案的示意图;
图1B为一种场景渲染方案的示意图;
图2为本申请实施例提供的一种场景渲染方案的示意图;
图3为本申请实施例提供的一种网络架构的示意图;
图4为本申请实施例提供的一种渲染程序部署方案的流程图;
图5为本申请实施例提供的一种终端设备登陆远端渲染系统的流程图;
图6为本申请实施例提供的一种场景切换方案的流程图;
图7为本申请实施例提供的一种场景切换方案的流程图;
图8为本申请实施例提供的一种计算资源分配方案的流程图;
图9为本申请实施例提供的一种场景渲染方法流程图;
图10为本申请实施例提供的一种场景渲染装置的结构示意图;
图11为本申请实施例提供的一种管理设备的结构示意图。
具体实施方式
下面将结合附图,对本发明实施例中的技术方案进行描述。显然,所描述的实施例仅是本说明书一部分实施例,而不是全部的实施例。
在本说明书的描述中“一个实施例”或“一些实施例”等意味着在本说明书的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。
其中,在本说明书的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本说明书实施例的描述中,“多个”是指两个或多于两个。
在本说明书的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
三维(3 dimension,3D)游戏、虚拟现实(virtual reality,VR)应用等3D应用,需要实时渲染3D场景。其中,3D场景可以是指包括了一个或多个模型的三维空间。渲染3D场景可以是指计算装置运行3D应用,驱动场景数据,对3D场景进行渲染,得到渲染结果的过程。其中,渲染结果可以是指绘制渲染出的用于展示3D场景的图像。场景数据是指用于描述3D场景的数据,可以包括三维空间中模型的图形数据、光源数据、虚拟摄像机数据等。其中,模型的图形数据可以包括模型在三维空间中的位置、朝向,组成该模型的顶点、材料、纹理等数据。光源数据可以包括光源所在的位置、类型等数据。虚拟摄像机数据可以包括虚拟摄像机的位置、朝向等数据。
一种3D场景的渲染方案为本地渲染方案。参阅图1A,终端设备可以运行3D应用,驱动场景数据,对3D场景进行渲染。由于终端设备计算资源有限,难以渲染复杂的3D场景。
一种方案为云渲染方案。参阅图1B,在云渲染方案中,远端设备通过运行3D应用,渲染3D场景,得到渲染结果,并将渲染结果发送至终端设备。终端设备通过运行3D应用的客户端,显示渲染结果。从而在无需终端设备具有较强的图形渲染能力的情况下,使得用户可以体验3D应用带来的视觉体验。
但在该方案中,每当一终端设备请求远端设备渲染3D场景时,远端设备启动3D应用,为该终端设备渲染3D场景。通常,对于一个3D应用而言,其可能包括多个3D场景。例如,对于3D游戏应用而言,不同的房间为不同的3D场景。用户可能需要在不同3D场景之间进行切换,由此,远端设备需要渲染不同的3D场景。参阅图1B,在进行3D场景切换时,远端设备需要加载切换后到的3D场景的场景数据。这一加载过程需要占用一定的时间,使得用户不得不等待一段时间,导致用户体验较差。
并且,当多个终端设备同时请求远端设备渲染3D场景时,远端设备同时运行多个3D应用,为该多个终端设备渲染3D场景。如此,远端设备需要为多个3D应用准备计算资源,这提高了对远端设备的计算资源要求。
另外,同一3D应用可能包括复杂程度不一的多个3D场景。例如,如图1B所示,3D应用可以包括场景1和场景2,并可以利用场景1的场景数据渲染场景1,以及利用场景2的场景数据渲染场景2。复杂程度较高的3D场景需要的计算资源更多,远端设备需要按照3D应用中对计算资源要求最多的3D场景,为3D应用准备计算资源。而在3D应用的运行期间,并非一直渲染计算资源要求最多的3D场景,对其他的3D场景的渲染可能占据了大部分时间。如此,在这大部分时间内,为3D应用分配的计算资源得不到充分利用,造成了计算资源的浪费。
其中,场景的复杂程度也可以理解为场景渲染的难易程度。其中,场景的复杂程度与该场景中的模型多少、模型的纹理、模型的材质等相关。例如,场景中的模型越多,且模型的纹理和材质越不容易渲染,则该场景的复杂程度越高。
本申请实施例提供了一种场景渲染方案,可以应用于包括多个渲染主机的远端渲染系统。该方案在进行场景渲染时,可以利用不同的渲染主机渲染同一应用的不同的场景。例如,如图2所示,渲染主机A1可以用于渲染应用B的场景B1,渲染主机A2可以用于渲染应用B的场景B2,等等。
由此,可以按照场景粒度进行计算资源分配。例如,可以为负责渲染复杂程度较高的场景的渲染主机分配较多的计算资源,为负责渲染负责程度较低的场景分配较少的计算资源;或者,采用计算资源较多的渲染主机渲染复杂程度较高的场景,采用计算资源较少的渲染主机渲染复杂程度较低的场景。从而可以减少资源的浪费。
并且,由于不同的场景可由不同渲染主机渲染,在需要切换场景时,可以通过切换主机,实现场景的切换,无需重新加载切换后场景的场景数据,减少了用户等待。举例而言,参阅图2,在终端设备接收到用户发出的场景切换操作之后,可以请求远端渲染系统渲染切换后的场景。以场景B1到场景B2的切换为例,可以设定渲染主机A1为终端设备渲染场景B1,当远端渲染系统接收到终端设备发送的用于请求渲染场景B2的信息后,可以指示渲染主机A2为终端设备渲染场景B2。远端渲染系统可以建立终端设备和渲染主机A2之间的连接,以便渲染主机A2将渲染结果发送至终端设备。由此,可以节省场景数据的加载时间,减少用户等待。
终端设备也可以称为用户侧设备、本地设备,或者被简称为设备。在一些实施例中,终端设备可以实现为手机、平板电脑、个人电脑(personal computer,PC)、智能穿戴设备、智能电视、车载终端等。在一些实施例中,终端设备可以部署由终端装置,该终端装置可以执行将在下文描述的终端设备的功能,其中,终端设备可以为终端装置的运行提供硬件环境
在一些实施例中,远端渲染系统可以为云端渲染系统,远端渲染系统所包括的渲染主机可以为云端计算装置或设备。
在本申请实施例中,渲染主机可以是指执行渲染程序,驱动场景的场景数据,进行场景渲染的装置或设备。在一些实施例中,渲染主机可以为物理机,例如可以为一个独立的计算设备,也可以为由一个或多个计算设备组成的集群。在一些实施例中,渲染主机可以为虚拟设备,例如可以为虚拟机(virtual machine,VM),也可以为容器(container)。
在一些实施例中,渲染主机可以具备图形渲染相关硬件,或者获得图形渲染相关硬件的支持,从而具备或者获得图形渲染能力。其中,图形渲染硬件可以是指图形处理器(graphics processing unit,GPU)、人工智能(artificial intelligence,AI)芯片等具有图形渲染能力的硬件。需要说明的是,前文的介绍仅为对渲染主机的示例介绍,并不构成限定。本申请实施例不限定渲染主机的具体形态或实现方式。
需要说明的是,本申请实施例提供的场景渲染方法,可以渲染3D场景,也可以渲染2D场景。另外,在下文描述中,如无特殊说明,所提到的场景,可以是指3D场景,也可以是指2D场景。
渲染主机可以在渲染某一场景时或之前,加载该场景的渲染数据。其中,场景的渲染数据可以包括该场景的场景数据,也可以包括用于驱动该场景数据,以渲染该场景的渲染程序。也就是说,场景的渲染程序是指渲染该场景所需的程序,场景的场景数据是指渲染该场景所需的数据。另外,场景的一个具体的渲染程序可以称为场景的一个渲染程序实例。渲染主机可以加载场景的渲染程序具体可以为渲染主机加载该场景的一个或多个渲染程序实例。渲染程序或者说渲染程序实例在渲染主机中运行时,可以调用渲染主机的图形渲染能力或者说计算资源,加载并驱动场景数据,完成对该场景的渲染。例如,渲染程序实例可以加载并解析fbx文件,然后,调用渲染主机的开放图形库(open graphics library,openGL)程序接口,完成图像的渲染。其中,该图像是指用于展示场景的图像,即渲染结果。
在一些实施例中,同一个应用可以包括多个场景,可以为每个场景配置唯一的标识(identity document,ID),例如,场景B1的ID为092387459aa。该多个场景中不同场景的渲染程序可以不同,也可以相同。示例性的,对于复杂程度较低的不同场景,例如,游戏应用中的不同的浏览型场景,它们的渲染程序可以相同。在一个例子中,对于浏览型场景,其渲染程序可以为WebGL浏览器渲染引擎babylonjs提供的Viewer组件。示例性的,对于复杂程度较高的不同场景,它们的渲染程序可以不同。特别是,对于交互比较频繁的场景,需要较多的程序逻辑来处理场景的交互逻辑。不同的交互式场景,所需的交互逻辑可能不同,从而导致所需的程序逻辑可能不同。在一个例子中,对于游戏应用的交互式场景而言,可以使用C++语言、C#语言或者可视化的蓝图技术来编写渲染程序的程序逻辑,也可以在场景渲染过程中,通过shader编程来完成场景中某种特效的渲染。
另外,本申请实施例提出了不同的场景可以由不同的渲染主机渲染,但不限制一个渲染主机渲染的场景的个数,也不限制渲染同一场景的渲染主机的个数。
在一些实施例中,一个渲染主机可以用于渲染一个或多个场景。例如,如图2所示,渲染主机A4可以用于渲染场景B1和场景B3。
在一些实施例中,同一个场景也可以由多个渲染主机渲染。示例性的,以场景B1为例,渲染主机A1可以为一个或多个终端设备渲染场景B1。当更多终端设备请求远端渲染系统渲染场景B1时,渲染主机A1的渲染能力有限,可能难以为更多终端设备渲染场景B1。为了应对这种情况,可以设置其他渲染主机,例如渲染主机A3,用于渲染场景B1。其中,渲染主机A1和渲染主机A3可以分别为不同的终端设备渲染场景B1,并将各自的渲染结果发送至相应的终端设备。
示例性的,渲染主机A1和渲染主机A3可以协同运行场景B1的渲染程序,完成场景B1的渲染。然后,将协同渲染的渲染结果发送至终端设备D1和终端设备D2。示例性的,渲染主机A1和渲染主机A3可以分别独立运行场景B1的渲染程序,各自独立完成场景B1的渲染。其中,渲染主机A1可以将渲染结果发送至终端设备D1,渲染主机A3可以将渲染结果发送至终端设备D2。
上文示例介绍了场景的渲染程序的设置和部署方式,并不对场景的渲染程序的设置和部署方式进行限制。开发者可以灵活采用不同的开发方式,以场景为粒度,构建和部署场景的渲染程序。在一些实施例中,可以基于云原生(cloud native)技术,构建场景的渲染程序,从而可以充分云平台的弹性和分布式优势,实现场景的渲染程序的快速部署,以及渲染主机计算资源的按需伸缩,在保障用户体验的同时,节省计算资源。
图3示出了本申请实施例可应用的一种网络架构。参阅图3,该网络架构包括远端渲染系统和终端设备。其中,远端渲染系统可以包括多个渲染主机。渲染主机可以参考上文对图2所示实施例的介绍。远端渲染系统可以包括管理设备,用于管理远端渲染系统中的各个部件,例如渲染主机等。具体而言,管理设备可以管理场景的渲染数据的部署、更新,也可以在渲染主机运行渲染程序时为渲染主机申请计算资源,也可以在终端设备接入远端渲染系统时为终端设备分配渲染主机,也可以选择用于渲染某场景的渲染主机,也可以在场景切换时选择渲染主机来渲染切换后场景,等等,此处不再一一列举。
管理设备可以接收远端侧用户的管理操作。例如,远端侧用户可以通过管理设备,将多个场景的渲染数据组合为应用的渲染数据,并通过管理设备,在远端渲染系统发布或更新应用的渲染数据。远端侧用户也可以通过管理设备,在远端渲染系统发布或更新某个或某些场景的渲染数据。
管理设备的功能还将在下文结合场景渲染方案,进行具体介绍,在此不再赘述。
在一些实施例中,管理设备可以为物理机,例如可以为一个独立的计算设备,也可以为由一个或多个计算设备组成的集群。在一些实施例中,管理设备可以部署有管理装置,其中,管理设备的功能具体可以由管理装置实现。示例性的,管理装置可以为部署在管理设备上的虚拟设备,例如虚拟机、容器等。
远端渲染系统还可以包括数据存储设备,可以用于存储场景的渲染数据。具体而言,可以用于存储场景的渲染程序,可以用于存储场景的场景数据。示例性的,如上所述,对于复杂程度较低的不同场景,它们的渲染程序是相同的。因此,对于复杂程度较低的不同场景,可以不必为每一个场景单独存储渲染程序,可以只存储一份渲染程序。该渲染程序可以被重复使用,例如可以由不同的渲染主机加载或调用。
渲染主机可以从数据存储设备加载或者说调用场景的渲染程序,例如渲染主机A1可以从数据存储设备加载或者说调用场景B1的渲染程序。
接下来,以场景B1的渲染程序为例,示例介绍渲染程序的功能模块。
参阅图3,场景B1的渲染程序可以包括场景B1的程序逻辑。其中,场景B1的程序逻辑和其他场景的程序逻辑可以是相同的,也可以是不同的。示例性的,当场景B1为复杂程度较低的场景时,场景B1的程序逻辑可以和其他复杂程度较低的场景的程序逻辑相同。当场景B1为复杂程度较高的场景时,场景B1的程序逻辑可以和其他场景的程序逻辑不同。
场景B1的渲染程序可以包括渲染引擎模块。在一个例子中,渲染引擎模块具体可以为unity。在渲染场景时,渲染引擎模块可以调用渲染主机的图形库接口(例如,openGL程序接口),完成图像的渲染。
场景B1的渲染程序还可以包括事件处理模块。在渲染主机A1连接终端设备D1的情况下,事件处理模块可以响应来自终端设备D1的用户操作指令,例如场景切换操作指令,并根据场景切换操作指令,生成场景切换通知,以通知管理设备进行场景切换。具体将在下文进行介绍,在此不再赘述。
场景B1的渲染程序还可以包括场景数据加载模块。场景数据加载模块可以从数据存储设备中加载场景B1的场景数据,以便渲染程序可以利用场景B1的场景数据,渲染场景B1。
场景B1的渲染程序还可以包括通信模块。通信模块可以接收终端设备发送的信息,例如,来自终端设备的场景切换操作指令。通信模块还可以向终端设备发送信息,例如向终端设备发送渲染结果。
在一些实施例中,场景B1的渲染程序可以实现为一个单独的进程。在另一些实施例中,场景B1的渲染程序可以为一个进程下的线程。示例性的,场景B1的渲染程序可以为应用B的进程下的线程。在一个例子中,应用B可以包括场景B1、场景B2、场景B3等多个场景,其中,每个场景的渲染程序可以为应用B的进程下的一个或多个线程。
上文示例介绍了场景的渲染程序的功能模块,接下来,继续介绍网络架构中的其他部件。
继续参阅图3,远端渲染系统还可包括网关(gateway),用于隔离终端设备和渲染主机以提高渲染主机的网络安全,避免或减少对渲染主机的网络攻击。具体而言,远端渲染系统可以构成局域网,网关、渲染主机、管理设备等同处于该局域网中,由此,网关可以在该局域网内接收渲染主机的渲染结果以及其他数据,并向处于外部网络的终端设备发送渲染结果以及其他数据。并且,网关可以从处于外部网络的终端设备接收渲染请求、场景切换操作指令等数据,并将处于该局域网渲染请求、场景切换操作指令等数据发送至局域网内渲染主机或管理设备。
另外,终端设备可以连接到网关,网关连接渲染主机,从而实现了终端设备和渲染主机的简介连接。在切换终端设备所连接的渲染主机时,终端设备和网关之间的连接无需断开,只需将网关连接到新的渲染主机,就可以将终端设备连接到新的渲染主机上,改善了用户体验。具体将在下文进行具体介绍,在此不再赘述。
在一些实施例中,终端设备也可以直接连接到渲染主机,以便和渲染主机之间进行信息交互。具体将在下文进行介绍,在此不再赘述。
继续参阅图3,该网络架构还包括终端设备D1。终端设备D1也可以称为用户侧设备、本地设备。在一些实施例中,终端设备D1可以实现为终端设备。例如,终端设备D1可以实现为手机、平板电脑、个人电脑(personal computer,PC)、智能穿戴设备、智能电视、车载终端等。在一些实施例中,终端设备D1可以配置有终端装置。终端设备D1的功能具体可以由终端装置实现,其中,终端设备D1可以为终端装置的运行提供硬件环境。
如图3所示,终端设备D1可以部署有客户端。该客户端可以为远端渲染系统渲染的场景所属应用的客户端。其中,该客户端也可以称为终端装置。
客户端可以包括操作模块,用于接收终端侧用户做出的用户操作指令。在一些实施例中,用户操作指令可以为终端侧用户利用终端设备的输入设备(例如键盘、鼠标等)直接输入的操作指令。例如,终端侧用户可以点击鼠标左键,或者按下键盘上的A键,等等。用户操作指令可以代表预设的含义,比如,用户操作指令代表场景切换,例如,若某个用户操作指令代表开门动作,开门后展示另一个场景,则该用户操作代表了场景切换。其中,代表场景切换的用户操作指令可以称为场景切换操作指令。示例性的,用户操作指令所代表的含义可以由终端设备上的客户端确定,也可以由远端渲染系统中的相关部件或模块(例如事件处理模 块)确定。
上文示例介绍了,本申请实施例提供的场景渲染方案可应用的网络架构。接下来,在不同实施例中,介绍本申请实施例提供的场景渲染方案的实施过程。
首先,结合图4,介绍场景的渲染程序部署方案。
参阅图4,在步骤401,远端侧用户可以通过管理设备上传渲染数据。其中,如上文所述,渲染数据可以包括场景数据和渲染程序。示例性的,在步骤401中上传的渲染数据可以为一个或多个应用的场景的渲染数据。示例性的,在步骤401中上传的渲染数据可以为一个应用的部分场景的渲染数据。示例性的,在步骤401中上传的渲染数据可以为某一或某些场景首次被上传的渲染数据。示例性的,在步骤401中上传的渲染数据可以为某一或某些场景被更新或升级后的渲染数据。
在图4所示实施例中,可以设定步骤401上传的渲染数据包括场景B1的渲染数据和场景B2的渲染数据。其中,场景B1和场景B2可以同属于应用B。
通过步骤402,管理设备可以将步骤401上传的渲染数据,存储到数据存储设备。
在步骤403,远端侧用户可以触发渲染程序部署。其中,当在步骤401中上传的渲染数据可以为某一或某些场景被更新或升级后的渲染数据时,步骤403也可以理解为触发渲染程序更新。
通过步骤403,远端侧用户可以触发管理设备向渲染主机部署渲染程序。示例性的,如图4所示,管理设备可以通过步骤404a,向渲染主机A1发送指示信息A11。指示信息A11用于指示渲染主机A1部署场景B1的渲染程序。渲染主机A1可以响应指示信息A11,执行步骤405a,将存储在数据存储设备中的场景B1的渲染程序加载到渲染主机A1。在一个例子中,渲染主机A1可以在接收到指示信息A11后,立即执行步骤405a,以在渲染主机A1和终端设备连接之前,在渲染主机A1中部署场景B1的渲染程序。在另一个例子中,渲染主机A1可以在接收到指示信息A11后,可以不立即执行步骤405a,而是当渲染主机A1和终端设备之间有连接时,再执行步骤405a,以便在渲染主机A1需要执行渲染场景B1的操作时,在渲染主机A1中部署场景B1的渲染程序。
示例性的,如图4所示,管理设备可以通过步骤404b,向渲染主机A2发送指示信息A21。指示信息A21用于指示渲染主机A2部署场景B2的渲染程序。渲染主机A2可以响应指示信息A21,执行步骤405b,将存储在数据存储设备中的场景B2的渲染程序加载到渲染主机A2。在一个例子中,渲染主机A2可以在接收到指示信息A21后,立即执行步骤405b,以在渲染主机A2和终端设备连接之前,在渲染主机A2中部署场景B2的渲染程序。在另一个例子中,渲染主机A2可以在接收到指示信息A21后,可以不立即执行步骤405b,而是当渲染主机A2和终端设备之间有连接时,再执行步骤405b,以便在渲染主机A2需要执行渲染场景B2的操作时,在渲染主机A2中部署场景B2的渲染程序。
示例性的,如图4所示,管理设备可以通过步骤404c,向渲染主机A3发送指示信息A31。指示信息A31用于指示渲染主机A3部署场景B1的渲染程序。渲染主机A3可以响应指示信息A31,执行步骤405c,将存储在数据存储设备中的场景B1的渲染程序加载到渲染主机A3。在一个例子中,渲染主机A3可以在接收到指示信息A31后,立即执行步骤405c,以在渲染主机A3和终端设备连接之前,在渲染主机A3中部署场景B1的渲染程序。在另一个例子中,渲染主机A3可以在接收到指示信息A31后,可以不立即执行步骤405c,而是当渲染主机A3和终端设备之间有连接时,再执行步骤405c,以便在渲染主机A3需要执行渲染场景B1的操作时,在渲染主机A3中部署场景B1的渲染程序。
在一些实施例中,步骤405a、步骤405b和步骤405c可以同时执行,也可以先后执行。例如,可以先执行步骤405a,使得渲染主机A1可以利用场景B1的渲染程序渲染场景B1。其中,在渲染主机A1利用场景B1的渲染程序渲染场景B1的过程中,可以执行步骤405b,渲染主机A2加载场景B2的渲染程序。
上文示例介绍了渲染数据的部署过程,接下来,描述终端设备登陆远端渲染系统的过程。
在步骤501,终端设备D1可以接收终端侧用户的登陆操作,例如接收用户输入的账号、密码等。在步骤502,终端设备D1可以响应该登陆操作向远端渲染系统发送登陆请求。其中,登陆请求可以包括身份信息,该身份信息代表了终端侧用户的用户身份。身份信息可以用于鉴权。在鉴权通过后,远端渲染系统可以响应该登陆请求,分配会话资源(session)和建立会话,并将会话标识发送至终端设备D1。终端设备D1可以利用会话标识请求远端渲染系统的服务,例如渲染场景。
在一些实施例中,参阅图5,远端渲染系统可以包括登陆服务设备。登陆服务设备可以存储有身份信息和远端服务账号的对应关系,其中,远端服务账号也代表一种用户身份,该用户身份具有请求远端渲染系统服务的权限。登陆服务设备可以根据登陆请求中的身份信息,确定远端服务账号,并通过步骤503,向管理设备发送会话请求,该会话请求中包括远端服务账号。
管理设备可以执行步骤504,为终端设备D1分配会话,并生成会话标识(session ID)。示例性的,会话标识可以为令牌(token),例如长度为256比特的令牌。
管理设备还可以确定终端设备D1在登陆远端渲染系统后,需要渲染的首个场景,并确定用于渲染该场景的渲染主机。在一些实施例中,登陆请求也可以理解为场景渲染请求,用于请求远端渲染系统为发送登陆请求的终端设备D1渲染场景。其中,登陆请求可以包括场景的标识。如上所述,场景的标识用于标识该场景。场景的标识可以经登陆服务设备发送至管理设备。管理设备可以根据该场景的标识,确定终端设备D1登陆远端渲染系统后需要渲染的首个场景,并确定用于渲染该首个场景的渲染主机。
在一些实施例中,在远端渲染系统不具有登陆服务设备的情况下,终端设备D1可以将登陆请求直接发送至管理设备。管理设备可以根据该登陆请求,分配会话资源和建立会话,以及根据登陆请求中的场景的标识,确定渲染主机。
在一些实施例中,远端渲染系统还可以包括网关。管理设备可以将待连接渲染主机通知给网关。其中,此处的待连接渲染主机是指管理设备确定的用于渲染首个场景的渲染主机。示例性的,管理设备可以执行步骤505,向网关发送指示信息,该指示信息用于指示待连接渲染主机。示例性的,该指示信息可以包括待连接渲染主机的网络地址(例如网际互连协议(internet protocol,IP)地址)。在另一个说明性示例中,管理设备也可以不通过步骤505,将待连接渲染主机通知给网关,而是当网关和终端设备D1建立连接时或之后,网关可以向管理设备查询待连接渲染主机。
示例性的,管理设备还可以将会话标识通知给网关,以指示网关在后续支持该会话标识的会话。示例性的,管理设备也可以不将会话标识通知给网关。当网关和终端设备D1建立连接时,网关可以向管理设备查询会话标识。
示例性的,如图5所示,管理设备可以通过步骤506,向登陆服务设备发送会话标识和网关地址。登陆服务设备可以通过步骤507,向终端设备D1发送会话标识和网关地址。示例性的,管理设备可以直接向终端设备D1发送会话标识和网关地址。也就是说,管理设备可以不通过登陆服务设备或者在远端渲染系统不具有登陆服务设备的情况下,向终端设备D1发送 会话标识和网关地址。
继续参阅图5,终端设备D1可以执行步骤508,根据网关地址,向网关发送连接请求,以建立终端设备D1和网关之间的连接。在终端设备D1和网关建立连接时或之后,网关可以建立网关和待连接渲染主机之间的连接,由此,终端设备D1可以通过网关连接到渲染主机,使得渲染主机可以将渲染结果发送至终端设备D1。
在一些实施例中,网关可以根据确定待连接渲染主机的方式可以参考上文介绍,在此不再赘述。
在另一些实施例中,终端设备D1向网关发送的连接请求也可以理解为场景渲染请求,用于请求远端渲染系统为终端设备D1渲染场景。其中,该连接请求可以包括场景的标识。网关接收到连接请求后,可以将场景的标识发送至管理设备。管理设备可以根据场景的标识,确定终端设备D1请求渲染的场景。之后,管理设备可以确定用于渲染终端设备D1请求渲染的场景的渲染主机,并将该渲染主机作为待连接渲染主机。管理设备可以将待连接渲染主机的信息(例如网络地址)发送至网关。网关可以根据待连接渲染主机的信息,连接该渲染主机。从而建立了终端设备D1和渲染主机之间的连接。也就是说,在该实施例中,在终端设备D1向网关发送连接请求之前,管理设备无需为确定待连接渲染主机,而是在网关接收到连接请求之后,管理设备再确定待连接渲染主机。
在一些实施例中,终端设备D1和网关之间的连接为会话。终端设备D1还可以向网关发送会话标识。网关接收到该会话标识时或之后,可以对比该会话标识和网关从管理设备收到的或查询到的会话标识是否一致。若一致,网关支持其和终端设备D1之间的会话。
在一些实施例中,在远端渲染系统不具有网关的情况下,管理设备可以直接将确定的用于渲染首个场景的渲染主机的网络地址发送至终端设备D1,终端设备D1可以根据渲染主机的网络地址,连接到渲染主机。
上文示例介绍了,终端设备D1登陆远端渲染系统的方案。接下来,示例介绍场景切换方案。
终端设备D1可以执行步骤601,向远端渲染系统发送连接请求,以建立终端设备D1和远端渲染系统之间的连接。
在一些实施例中,在远端渲染系统具有网关的情况下,终端设备D1可以在步骤601中,向网关发送连接请求,以建立终端设备D1和网关之间的连接。具体可以参考上文对图5中步骤508的介绍。示例性的,在步骤602中,网关可以向管理设备中查询待连接渲染主机。示例性的,管理设备也可以预先向网关通知待连接渲染主机。具体可以参考上文对图5所示实施例的介绍。
可以设定渲染主机A1为待连接渲染主机。示例性的,在步骤603中,管理设备可以通知渲染主机A1准备连接终端设备D1。其中,本申请实施例,不限定步骤603和步骤602的执行时序。在一个例子中,步骤603可以在步骤602之后执行。在另一个例子中,步骤603可以在步骤602之前执行。在又一个例子中,步骤603可以为当管理设备确定渲染主机A1为待连接渲染主机时或之后执行。
在步骤604中,网关可以连接到渲染主机A1。由于网关和终端设备D1之间已建立了连接(具体可见上文对图5所示实施例的描述),当网关和渲染主机A1连接时,终端设备D1和渲染主机A1也建立了连接。
在一些实施例中,在远端渲染系统不具有网关的情况下,终端设备D1可以根据渲染主机A1的网关地址,向渲染主机A1发送连接请求,以建立终端设备D1和渲染主机A1。
在步骤605,渲染主机A1可以运行场景B1的渲染程序,驱动场景B1的场景数据,渲染场景B1,以得到场景B1的渲染结果。然后,在步骤606,渲染主机A1可以向终端设备D1发送场景B1的渲染结果。其中,在远端渲染系统具有网关的情况下,也就是说,在终端设备D1和渲染主机A1之间通过网关连接的情况下,场景B1的渲染结果可以先被发送至网关,然后,网关再将场景B1的渲染结果发送至终端设备D1。在远端渲染系统不具有网关的情况下,渲染主机A1可以直接将场景B1的渲染结果发送至终端设备D1。
其中,在步骤605之前,渲染主机A1需要完成场景B1的渲染程序和场景数据的加载。在一个示例中,渲染主机A1可以提前完成场景B1的渲染程序的加载。即在终端设备D1登陆远端渲染系统之前,渲染主机A1可以完成场景B1的渲染程序的加载。在一个示例中,渲染主机A1在完成场景B1的渲染程序加载后,可以调用渲染程序中的场景数据加载模块,从数据存储设备中加载场景B1的场景数据。也就是说,在终端设备D1登陆远端渲染系统之前,渲染主机A1可以完成场景B1的场景数据的加载。在一个示例中,在终端设备D1登陆远端渲染系统之前,渲染主机A1可以完成场景B1的渲染程序的加载。然后,在接收到管理设备发送的准备连接终端设备D1的通知时,或者,在终端设备和渲染主机A1连接时,渲染主机A1可以调用场景数据加载模块,从数据存储设备中加载场景B1的场景数据。在一个示例中,在接收到管理设备发送的准备连接终端设备D1的通知时或者,在终端设备D1和渲染主机A1连接时,渲染主机A1可以加载场景B1的渲染程序,并调用场景数据加载模块,从数据存储设备中加载场景B1的场景数据。另外,渲染主机A1加载渲染程序的方案还可以参考上文对图4所示实施例的介绍。
终端侧用户在操作终端设备D1的过程中,可以产生场景切换操作。其中,场景切换操作是指从当前场景(场景B1)进入到另一场景(场景B2)的操作。例如,终端侧用户可以产生进入游戏中某个房间的操作。该操作可以为针对场景B1中某个门的操作。该操作也可以是当焦点处于场景B1中某个门上时,终端侧用户触发快捷键(例如点击鼠标左键,或者按下键盘上的A键)。场景切换操作也可以为直接进入某个场景的指令,例如,终端设备可以为语言操控设备,终端侧用户可以通过语音指令,进入某个场景。等等,本申请实施例对终端侧用户产生的场景切换操作的方式或形式不做具体限定。
终端设备D1可以响应终端侧用户产生的场景切换操作,执行步骤607,向远端渲染系统发送场景切换操作指令,场景切换操作指令可以用于请求远端渲染系统渲染场景B2,或者说,指示远端渲染系统从执行渲染场景B1的操作到执行渲染场景B2的操作切换。在远端渲染系统具有网关的情况下,网关可以接收终端设备D1发送的场景切换操作指令,然后通过步骤608,将场景切换操作指令发送至渲染主机A1。在远端渲染系统不具有网关的情况下,终端设备D1发送的场景切换操作指令可以直接被发送至渲染主机A1。
渲染主机A1在接收到场景切换操作指令后,可以确定场景切换操作指令用于指示从执行渲染场景B1的操作到执行渲染场景B2的操作的切换。渲染主机A1可以执行步骤609,向管理设备发送场景切换通知,用于向管理设备通知终端设备D1请求渲染场景B2。
管理设备可以响应场景切换通知,执行步骤610,确定渲染主机A2用于渲染场景B2,并确定渲染主机A2为待连接渲染主机。然后,管理设备可以执行步骤611,通知渲染主机A2准备连接终端设备D1。在远端渲染系统具有网关的情况下,管理设备还可以执行步骤612,通知网关切换渲染主机。其中,在通知网关切换渲染主机时,可以将待连接渲染主机(此时的待连接渲染主机为渲染主机A2)的信息(例如网络地址)发送至网关。在步骤613,网关可以根据待连接渲染主机的信息,建立网关和待连接渲染主机的连接,即建立网关和渲染主 机A2之间的连接。由此,终端设备D1和渲染主机A2之间建立了连接。
渲染主机A2可以执行步骤614,运行场景B2的渲染程序,驱动场景B2的场景数据,渲染场景B2,以得到场景B2的渲染结果。然后,在步骤615,渲染主机A2可以向终端设备D1发送场景B2的渲染结果。其中,在远端渲染系统具有网关的情况下,也就是说,在终端设备D1和渲染主机A2之间通过网关连接的情况下,场景B2的渲染结果可以先被发送至网关,然后,网关再将场景B2的渲染结果发送至终端设备D1。在远端渲染系统不具有网关的情况下,渲染主机A2可以直接将场景B2的渲染结果发送至终端设备D1。
其中,在步骤614之前,渲染主机A2需要完成场景B2的渲染程序和场景数据的加载。在一些实施例中,渲染主机A2加载场景B2的渲染程序和场景数据的具体实现方式可以参考上文对渲染主机A1加载场景B1的渲染程序和场景数据的介绍,也可以参考上文对图4所示实施例的介绍。在一些实施例中,在步骤605的执行过程中,即在渲染主机A1渲染场景B1的过程中,渲染主机A2可以加载场景B2的渲染程序和场景数据。
上文结合图6,示例介绍了场景切换方案。接下来,结合图7,在一个更具体地实施例中,对场景切换方案进行举例介绍。
在图7所示的实施例中,渲染主机A1部署有场景B1的渲染程序,该渲染程序可以包括渲染引擎模块、事件处理模块和通信模块。渲染主机A1部署有场景B2的渲染程序,该渲染程序包括渲染引擎模块、事件处理模块和通信模块。具体可以参考上文对图3所示实施例的介绍。
在下文中,为方便描述,可以将部署到渲染主机A1的渲染程序(即场景B1的渲染程序)的渲染引擎模块、事件处理模块和通信模块,依次称为渲染主机A1的渲染引擎模块、事件处理模块和通信模块。可以将部署到渲染主机A2的渲染程序(即场景B2的渲染程序)的渲染引擎模块、事件处理模块和通信模块,依次称为渲染主机A2的渲染引擎模块、事件处理模块和通信模块。
终端设备D1执行步骤701,向远端渲染系统发生连接请求。其中,远端渲染系统中的网关可以接收终端设备D1发送的连接请求,并响应该连接请求,通过步骤702,连接渲染主机A1。渲染主机A1通过渲染主机A1的通信模块和网关连接。从而将建立了终端设备D1和渲染主机A1之间的间接连接。
渲染主机A1的通信模块可以执行步骤703,向渲染主机A1的渲染引擎模块发送渲染启动通知,以指示渲染引擎模块开始渲染场景B1。渲染主机A1的渲染引擎模块可以响应该渲染启动通知,执行步骤704,渲染场景B1,并通过步骤705,将渲染场景B1的渲染结果发送至渲染主机A1的通信模块。渲染主机A1的通信模块可以通过步骤706和步骤707,将渲染结果发送至终端设备D1,以便终端设备D1显示该渲染结果。
终端设备D1可以执行步骤708,向远端渲染系统发送场景切换操作指令。其中,远端渲染系统中的网关可以接收该场景切换操作指令,并通过步骤709,将该场景切换操作指令发送至渲染主机A1的通信模块。渲染主机A1的通信模块可通过步骤710,将该场景切换操作指令发送至渲染主机A1的事件处理模块。事件处理模块可以执行步骤711,根据该场景切换操作指令,识别出场景切换事件,即识别出发生了场景B1到场景B2切换的事件。之后,渲染主机A1的事件处理模块可以执行步骤712,向管理设备发送场景切换通知。在另一实施例中,步骤711和步骤712也可以由渲染主机A1的通信模块执行。
管理设备可以响应场景切换通知,确定渲染主机A2用于渲染场景B2,并通过步骤713,通知渲染主机A2的通信模块准备连接终端设备D1。管理设备还可以通过步骤714,通知网关 切换渲染主机。网关可以执行步骤715,连接渲染主机A2。其中,渲染主机A2的通信模块用于连接网关。由此,建立了终端设备D1和渲染主机A2之间的间接连接。
管理设备可以执行步骤716,向渲染主机A1的通信模块发送连接释放通知,使得渲染主机A1释放渲染主机A1和网关之间的连接。
渲染主机A2的通信模块可以执行步骤717,向渲染主机A2的渲染引擎模块发送渲染启动通知,以指示渲染引擎模块开始渲染场景B2。渲染主机A2的渲染引擎模块可以响应该渲染启动通知,执行步骤718,渲染场景B2,并通过步骤719,将渲染场景B2的渲染结果发送至渲染主机A2的通信模块。渲染主机A2的通信模块可以通过步骤720和步骤721,将渲染结果发送至终端设备D1,以便终端设备D1显示该渲染结果。
其中,步骤716和步骤717之间没有时序顺序。步骤716和步骤717可以同时执行,也可以先后执行。
上文示例介绍了,场景切换方案。接下来,示例介绍计算资源分配方案。
其中,计算资源也可以称为硬件资源,可被简称为资源。
在一些实施例中,远端渲染系统还可以包括计算资源管理设备,用于为渲染主机分配计算资源。示例性的,计算资源管理设备可以为云主机服务。
在一些实施例中,远端渲染系统中的渲染主机的计算资源不是固定的,计算资源管理设备可以为不同的渲染主机分配相同或不同的计算资源。示例性,渲染主机可以为虚拟机,也可以为容器。
在本申请实施例中,计算资源是指供计算设备(例如渲染主机)在执行计算任务时,所使用的资源。其中,拥有或者说可使用计算资源越多的设备,计算能力越强。其中,计算资源可以包括处理器的数量和运行频率,也可以包括内存的大小。
在将渲染主机连接到终端设备或者网关之前,需要为渲染主机分配计算资源,以便渲染主机利用该计算资源,运行渲染程序,执行相关操作。例如,渲染主机调用渲染程序中的通信模块和网关(或终端设备)建立连接。
参阅图8,终端设备D1可以执行步骤801,向网关发送连接请求。网关可以执行步骤802,向管理设备查询待连接渲染主机。可以设定待连接渲染主机为渲染主机A1。在将渲染主机A1连接网关之前,管理设备可以执行步骤803,为渲染主机A1请求计算资源A12。计算资源管理设备可以响应管理设备的请求,执行步骤804,为渲染主机A1分配计算资源A12。由此,渲染主机A1可以使用计算资源A12。
示例性的,计算资源A12的大小可以由管理设备确定。具体而言,管理设备可以根据渲染主机A1负责渲染的场景(即场景B1),确定计算资源A12的大小。若场景B1为复杂程度较高的场景,则计算资源A12较大。若场景B1为复杂程度较低的场景,则计算资源A12较小。
示例性的,计算资源A12的大小可以由计算资源管理设备确定。具体而言,管理设备可以将渲染主机A1负责渲染的场景(即场景B1)的标识发送至计算资源管理设备。计算资源管理设备可以根据场景B1的标识,确定计算资源A12的大小。若场景B1为复杂程度较高的场景,则计算资源A12较大。若场景B1为复杂程度较低的场景,则计算资源A12较小。
需要说明的是,步骤803、步骤804只需在建立渲染主机和网关(或终端设备D1)之间的连接之前执行即可。示例性的,管理设备在向渲染主机A1部署场景B1的渲染程序时或之前,即可执行步骤803、步骤804。示例性的,管理设备可以在步骤802被执行之前,执行步骤803、步骤804。如此,可以提前为渲染主机A1准备好计算资源,减少终端侧用户的等待。
管理设备还可以执行步骤805,向渲染主机A1发送渲染程序启动指示A13。渲染程序启 动指示A13用于触发渲染主机A1运行场景B1的渲染程序实例A131,以便通过该渲染程序实例A131的通信模块连接网关(或终端设备D1),以及调用该渲染程序实例A131的渲染引擎模块为终端设备D1渲染场景B1,并为终端设备D2提供场景B1的渲染结果。
在一些实施例中,如图8所示,终端设备D2可以执行步骤806,向网关发送连接请求。网关可以执行步骤807,向管理设备查询待连接渲染主机。可以设定待连接渲染主机为渲染主机A1,即管理设备也将终端设备D2分配至渲染主机A1,指示渲染主机A1为终端设备D2渲染场景B1。管理设备还可以执行步骤808,向渲染主机A1发送渲染程序启动指示A14。渲染程序启动指示A14用于触发渲染主机A1运行场景B1的渲染程序实例A141,以便通过该渲染程序实例A141的通信模块连接网关(或终端设备D2),以及调用该渲染程序实例A141的渲染引擎模块为终端设备D2渲染场景B1,并为终端设备D2提供场景B1的渲染结果。
在一个例子中,渲染程序实例A131和渲染程序实例A141不为同一实例。即渲染程序实例A131为场景B1的一渲染程序实例,渲染程序实例A141为场景B1的另一渲染程序实例。
在一个例子中,渲染程序实例A131和渲染程序实例A141为同一实例。其中,渲染程序实例可以将场景B1的渲染结果拷贝,然后,分别向终端设备D1和终端设备D2发送场景B1的渲染结果或场景B1的渲染结果的拷贝。
继续参阅图8,终端设备D1可以执行步骤809,向渲染主机A1发送场景切换操作指令。渲染主机A1可以根据场景切换操作指令,执行步骤810,向管理设备发送场景切换通知。管理设备可以根据场景切换通知,确定渲染主机A2用于渲染切换后的场景。具体可以参考上文对图6中步骤607-步骤610的介绍,在此不再赘述。
管理设备还可以执行步骤811,为渲染主机A2请求计算资源A22。计算资源管理设备可以执行步骤812,为渲染主机A2分配计算资源A22。其中,步骤811和步骤822的具体可以参考上文对步骤803和步骤804的介绍实现。
可以设定渲染主机A2用于渲染场景B2。管理设备还可以执行步骤813,向渲染主机A2发送渲染程序启动指示A23。渲染程序启动指示A23用于触发渲染主机A2执行场景B2的渲染程序实例。在渲染主机A2运行场景B2的渲染程序实例之后,网关可以执行步骤814,连接渲染主机A2。其中,渲染主机A2运行的渲染程序实例的通信模块用于和网关连接。由此,渲染主机A2可以将对场景B2进行渲染的渲染结果发送至终端设备D1。
终端设备D1可以通过步骤815,关闭终端设备D1和网关之间的连接。终端设备D1侧的操作(例如,终端设备D1不再运行客户端,或者,终端设备D1退出登陆,等等)可以触发终端设备D1关闭终端设备D1和网关之间的连接。终端设备D1关闭终端设备D1和网关之间的连接之后,网关可以执行步骤816,向渲染主机发送渲染主机关闭请求,以通知渲染主机A2可以停止运行,无需再为终端设备D1渲染场景B2。
在接收到渲染主机关闭请求之后,渲染主机A2可以执行步骤817,向管理设备发送会话关闭通知。管理设备可以响应该会话关闭通知,可以关闭或者说释放管理设备为终端设备D1分配的会话资源。示例性的,该会话可以为在终端设备D1登陆远端渲染系统时为管理设备终端设备D1分配的会话资源。
管理设备可以执行步骤818,向计算资源管理设备请求释放计算资源A22。
示例性的,管理设备在接收到连接关闭通知后,可以再等待预设时长T1,再执行步骤818。
示例性的,管理设备可以在查询到渲染主机A2没有运行渲染程序实例后,再执行步骤818。在该示例的一个例子中,管理设备可以在查询到渲染主机A2没有运行渲染程序实例,并且没有运行渲染程序实例的状态持续了预设时长T2后,再执行步骤818。
计算资源管理设备可以响应管理设备的请求,执行步骤819,将计算资源A22从渲染主机A2释放,使渲染主机A2不再使用计算资源A22。
示例性的,在管理设备执行了步骤818之后,计算资源管理设备可以再等待预设时长T2,若在等待期间,渲染主机A2一直处于没有运行渲染程序实例的状态,则计算资源管理设备执行步骤819。从而避免了在渲染主机A2不断有新的连接需求的情况下,管理设备反复为渲染主机A2请求计算资源而造成的较长耗时。
在一些实施例中,管理设备可以根据渲染场景B1的负载,调整渲染主机A1用于渲染场景B1所用的计算资源。具体而言,在渲染主机A1渲染场景B1的过程中,若渲染场景B1的负载较高,使得渲染主机A1渲染场景B1的时延较长或效果较差时,可以为渲染主机A1分配更多的计算资源,使得渲染主机A1可以高质量、快速地完成场景B1的渲染。在渲染主机A1渲染场景B1的过程中,若渲染主机A1在较低负荷运行下,就可以渲染场景B1,则可以减少为渲染主机B1分配的计算资源,以释放渲染主机A1不必要的计算资源,减少了计算资源浪费。
由此,可以按照场景粒度进行计算资源分配。例如,可以为负责渲染复杂程度较高的场景的渲染主机分配较多的计算资源,为负责渲染负责程度较低的场景分配较少的计算资源;或者,采用计算资源较多的渲染主机渲染复杂程度较高的场景,采用计算资源较少的渲染主机渲染复杂程度较低的场景。从而可以减少资源的浪费。进一步地,可以在场景渲染过程中,根据渲染场景地负载,调整渲染主机所用地计算资源,进一步减少了计算资源的浪费,使得计算资源可以得到更合理的利用。
接下来,结合图9,介绍本申请实施例提供的一种场景渲染方法。可以理解的是,该方法基于上文所述的场景渲染方案而提出的,是上文所述场景渲染方案的另一种表达方式,两者是相结合的。该方法的具体实现方式可以参考上文描述实现。
如图9所示,该方法包括如下步骤。
步骤901,获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景。示例性的,步骤901具体可以参考上文对图6中步骤601或图7中步骤701的介绍实现。
步骤902,从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果。示例性的,步骤902具体可以参考上文对图6中步骤602-606或图7中步骤702-707的介绍实现。
步骤903,获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景。示例性的,步骤903具体可以参考上文对图6中步骤607-609或图7中步骤708-710的介绍实现。
步骤904,从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。示例性的,步骤904具体可以参考上文对图6中步骤610-615或图7中步骤711-721的介绍实现。
在一些实施例,该方法包括:在所述第一渲染主机渲染所述第一场景的过程中,在所述第二渲染主机加载渲染所述第二场景所需的程序和数据。具体可以参考上文对图4中步骤405a、步骤405b的介绍,或者上文对图6中步骤605、步骤614的介绍,在此不再赘述。
在一些实施例中,该方法还包括:配置网关;其中,所述网关被配置为:在局域网内接收所述第一渲染主机的所述第一场景的渲染结果,向外部网络的所述第一设备发送所述第一场景的渲染结果。具体可以参考上文对图5中步骤505-508的介绍,或者对图6中步骤606、步骤615的介绍,或者对图7中步骤706、步骤707、步骤720、步骤721的介绍,在此不再 赘述。
在一些实施例中,该方法还包括:该方法还包括:将所述第一设备连接到所述第一渲染主机,以便所述第一渲染主机向所述第一设备发送所述第一场景的渲染结果。对图6中步骤604、步骤613的介绍,在此不再赘述。
在一些实施例中,所述场景切换通知是所述第一渲主机在从所述第一设备接收到场景切换操作指令时产生的,所述场景切换操作指令指示渲染所述应用的第二场景。具体可以参考上文对步骤607-步骤609的介绍,在此不再赘述。
在一些实施例中,该方法还包括:获取第二设备发送的第二请求,所述第二请求指示渲染所述应用的所述第一场景;指示所述第一渲染主机向所述第二设备提供所述第一场景的渲染结果。具体可以参考上文对图8中步骤801-808的介绍,在此不再赘述。
在一些实施例中,该方法还包括:根据渲染所述第一场景的负载,调整供所述第一渲染主机用于渲染所述第一场景所用的资源。具体可以参考上文对管理设备可以根据渲染场景B1的负载,调整渲染主机A1用于渲染场景B1所用的计算资源的介绍,在此不再赘述。
在本申请实施例提供的场景渲染方法中,可以采用不同的渲染主机渲染应用的不同场景,可减少场景切换所导致的时延,以及降低对渲染主机的性能的要求。另外,在本方法中,应用的不同场景可由不同的渲染主机渲染,可以按照场景的粒度为选择渲染主机或为渲染主机分配计算资源。例如,可以为负责渲染复杂程度较高的场景的渲染主机分配较多的计算资源,为负责渲染负责程度较低的场景分配较少的计算资源;或者,采用计算资源较多的渲染主机渲染复杂程度较高的场景,采用计算资源较少的渲染主机渲染复杂程度较低的场景。从而可以减少资源的浪费。
参阅图10,本申请实施例提供了一种管理装置1000,管理装置1000可以部署在上文所述的管理设备中。如图10所示,管理装置1000可以包括:
获取单元1010,用于获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景;
确定单元1020,用于从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果;
所述获取单元1010还用于获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景;
所述确定单元1020还用于从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。
其中,管理装置1000的功能单元的功能具体可以参考上文对图9所示方法实施例实现,也可以参考上文对图3-图8中管理设备的介绍实现,在此不再赘述。
本申请实施例提供的场景渲染装置,可以指示不同的渲染主机渲染应用的不同场景,可减少场景切换所导致的时延,以及降低对渲染主机的性能的要求。另外,在本方法中,应用的不同场景可由不同的渲染主机渲染,可由按照场景的粒度为选择渲染主机或为渲染主机分配计算资源。例如,可以为负责渲染复杂程度较高的场景的渲染主机分配较多的计算资源,为负责渲染负责程度较低的场景分配较少的计算资源;或者,采用计算资源较多的渲染主机渲染复杂程度较高的场景,采用计算资源较少的渲染主机渲染复杂程度较低的场景。从而可以减少资源的浪费。
参阅图11,本申请实施例提供了管理设备1100,包括处理器1110和存储器1120。其中,存储器1120用于存储计算机指令。处理器1110用于执行存储器1120存储的计算机指令,使 得管理设备1100可以执行图9所示的各方法实施例,或者执行图3-图8所示的管理设备所执行的操作。例如,获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景;从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果;获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景;从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。
在一些实施例中,处理器1110可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。
本申请实施例提供了一种远端渲染系统,该系统可以包括管理设备和多个渲染主机。其中,管理设备可以为图11所示的管理设备1100和多个渲染主机,或者图3-图8所示的管理设备。该多个渲染主机可以包括上文所述的渲染主机A1和渲染主机A2等。其中,管理设备的功能以及渲染主机的功能具体可以上文介绍,在此不再一一赘述。
本申请实施例提供了一种图像渲染系统,包括上文所述的远端渲染系统和终端设备。其中,终端设备的功能具体可以参考上文对终端设备D1的介绍,在此不再一一赘述。
另外,本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。

Claims (25)

  1. 一种场景渲染方法,其特征在于,所述方法包括:
    获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景;
    从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果;
    获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景;
    从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。
  2. 根据权利要求1所述的方法,其特征在于,所述方法包括:
    在所述第一渲染主机渲染所述第一场景的过程中,在所述第二渲染主机加载渲染所述第二场景所需的程序和数据。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法包括:
    配置网关;其中,所述网关被配置为:在局域网内接收所述第一渲染主机的所述第一场景的渲染结果,向外部网络的所述第一设备发送所述第一场景的渲染结果。
  4. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:将所述第一设备连接到所述第一渲染主机,以便所述第一渲染主机向所述第一设备发送所述第一场景的渲染结果。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述场景切换通知是所述第一渲主机在从所述第一设备接收到场景切换操作指令时产生的,所述场景切换操作指令指示渲染所述应用的第二场景。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:
    获取第二设备发送的第二请求,所述第二请求指示渲染所述应用的所述第一场景;
    指示所述第一渲染主机向所述第二设备提供所述第一场景的渲染结果。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:
    根据渲染所述第一场景的负载,调整供所述第一渲染主机用于渲染所述第一场景所用的资源。
  8. 一种管理装置,其特征在于,所述管理装置包括:
    获取单元,用于获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景;
    确定单元,用于从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果;
    所述获取单元还用于获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景;
    所述确定单元还用于从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。
  9. 根据权利要求8所述的管理装置,其特征在于,所述管理装置还包括:
    加载单元,用于在所述第一渲染主机渲染所述第一场景的过程中,在所述第二渲染主机加载渲染所述第二场景所需的程序和数据。
  10. 根据权利要求8或9所述的管理装置,其特征在于,所述管理装置还包括:
    配置单元,用于配置网关;其中,所述网关被配置为:在局域网内接收所述第一渲染主机的所述第一场景的渲染结果,向外部网络的所述第一设备发送所述第一场景的渲染结果。
  11. 根据权利要求8或9所述的管理装置,其特征在于,所述管理装置还包括:
    连接单元,用于将所述第一设备连接到所述第一渲染主机,以便所述第一渲染主机向所述第一设备发送所述第一场景的渲染结果。
  12. 根据权利要求8-11任一项所述的管理装置,其特征在于,所述场景切换通知是所述第一渲主机在从所述第一设备接收到场景切换操作指令时产生的,所述场景切换操作指令指示渲染所述应用的第二场景。
  13. 根据权利要求8-12任一项所述的管理装置,其特征在于,所述管理装置还包括:指示单元;其中,
    所述获取单元还用于获取第二设备发送的第二请求,所述第二请求指示渲染所述应用的所述第一场景;
    所述指示单元用于指示所述第一渲染主机向所述第二设备提供所述第一场景的渲染结果。
  14. 根据权利要求8-13任一项所述的管理装置,其特征在于,所述管理装置还包括:
    调整单元,用于根据渲染所述第一场景的负载,调整供所述第一渲染主机用于渲染所述第一场景所用的资源。
  15. 一种场景远端渲染系统,其特征在于,所述系统包括管理设备和多个渲染主机;其中,所述管理设备用于执行:
    获取第一设备发送的第一请求,所述第一请求指示渲染应用的第一场景;
    从多个渲染主机中确定用于渲染所述第一场景的第一渲染主机,确定的所述第一渲染主机用于向所述第一设备提供所述第一场景的渲染结果;
    获取所述应用的场景切换通知,所述场景切换通知指示渲染所述应用的第二场景;
    从所述多个渲染主机中确定用于渲染所述第二场景的第二渲染主机,确定的所述第二渲染主机用于向所述第一设备提供所述第二场景的渲染结果。
  16. 根据权利要求15所述的系统,其特征在于,所述管理装置还用于执行:
    在所述第一渲染主机渲染所述第一场景的过程中,在所述第二渲染主机加载渲染所述第二场景所需的程序和数据。
  17. 根据权利要求15或16所述的系统,其特征在于,所述管理装置还用于执行:
    配置网关;其中,所述网关被配置为:在局域网内接收所述第一渲染主机的所述第一场景的渲染结果,向外部网络的所述第一设备发送所述第一场景的渲染结果。
  18. 根据权利要求15或18所述的系统,其特征在于,所述管理装置还用于执行:
    将所述第一设备连接到所述第一渲染主机,以便所述第一渲染主机向所述第一设备发送所述第一场景的渲染结果。
  19. 根据权利要求15-18任一项所述的系统,其特征在于,所述场景切换通知是所述第一渲主机在从所述第一设备接收到场景切换操作指令时产生的,所述场景切换操作指令指示渲染所述应用的第二场景。
  20. 根据权利要求15-19任一项所述的系统,其特征在于,所述管理装置还用于执行:
    获取第二设备发送的第二请求,所述第二请求指示渲染所述应用的所述第一场景;
    指示所述第一渲染主机向所述第二设备提供所述第一场景的渲染结果。
  21. 根据权利要求15-20任一项所述的系统,其特征在于,所述管理装置还用于执行:
    根据渲染所述第一场景的负载,调整供所述第一渲染主机用于渲染所述第一场景所用的资源。
  22. 一种图像渲染系统,其特征在于,包括权利要求15-21任一项所述的系统和第一设备。
  23. 一种计算机可读存储介质,其特征在于,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求1-7任一项所述的方法。
  24. 一种包含指令的计算机程序产品,其特征在于,当所述指令被计算机设备集群运行时,使得所述计算机设备集群执行如权利要求的1-7任一项所述的方法。
  25. 一种管理设备,其特征在于,所述管理设备包括:
    存储器;
    处理器,用于执行所述存储器中的指令,使得所述管理设备执行权利要求1-7任一项所述的方法。
PCT/CN2022/088042 2021-09-10 2022-04-21 一种场景渲染方法、装置、设备及系统 WO2023035619A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22866097.3A EP4390852A1 (en) 2021-09-10 2022-04-21 Scene rendering method and apparatus, device and system

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202111060254.9 2021-09-10
CN202111060254 2021-09-10
CN202210017329.3A CN115797527A (zh) 2021-09-10 2022-01-07 一种场景渲染方法、装置、设备及系统
CN202210017329.3 2022-01-07

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/601,287 Continuation US20240212255A1 (en) 2021-09-10 2024-03-11 Scene Rendering Method, Apparatus, Device, and System

Publications (1)

Publication Number Publication Date
WO2023035619A1 true WO2023035619A1 (zh) 2023-03-16

Family

ID=85431033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088042 WO2023035619A1 (zh) 2021-09-10 2022-04-21 一种场景渲染方法、装置、设备及系统

Country Status (3)

Country Link
EP (1) EP4390852A1 (zh)
CN (1) CN115797527A (zh)
WO (1) WO2023035619A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437342A (zh) * 2023-12-20 2024-01-23 深圳图为技术有限公司 一种三维场景渲染方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003054740A2 (en) * 2001-12-21 2003-07-03 Koninklijke Philips Electronics N.V. Multimedia authoring system
CN103106680A (zh) * 2013-02-16 2013-05-15 赞奇科技发展有限公司 基于云计算架构的三维图形渲染的实现方法及云服务系统
US20160293134A1 (en) * 2013-12-26 2016-10-06 Square Enix Holdings Co., Ltd. Rendering system, control method and storage medium
WO2019017549A1 (en) * 2017-07-19 2019-01-24 Hp Printing Korea Co., Ltd. CONTENT TRANSMISSION USING A CLOUD SERVER
CN112581578A (zh) * 2020-12-23 2021-03-30 江苏赞奇科技股份有限公司 一种基于软件定义的云渲染系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003054740A2 (en) * 2001-12-21 2003-07-03 Koninklijke Philips Electronics N.V. Multimedia authoring system
CN103106680A (zh) * 2013-02-16 2013-05-15 赞奇科技发展有限公司 基于云计算架构的三维图形渲染的实现方法及云服务系统
US20160293134A1 (en) * 2013-12-26 2016-10-06 Square Enix Holdings Co., Ltd. Rendering system, control method and storage medium
WO2019017549A1 (en) * 2017-07-19 2019-01-24 Hp Printing Korea Co., Ltd. CONTENT TRANSMISSION USING A CLOUD SERVER
CN112581578A (zh) * 2020-12-23 2021-03-30 江苏赞奇科技股份有限公司 一种基于软件定义的云渲染系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437342A (zh) * 2023-12-20 2024-01-23 深圳图为技术有限公司 一种三维场景渲染方法、装置及设备
CN117437342B (zh) * 2023-12-20 2024-04-30 深圳图为技术有限公司 一种三维场景渲染方法和存储介质

Also Published As

Publication number Publication date
CN115797527A (zh) 2023-03-14
EP4390852A1 (en) 2024-06-26

Similar Documents

Publication Publication Date Title
US11895184B2 (en) Peer to peer remote application discovery
US20220058766A1 (en) Graphics rendering method and apparatus
WO2019169913A1 (zh) 一种数据处理的方法、装置、服务器和系统
US11283866B2 (en) Providing remote access to applications through interface hooks
JP7100154B2 (ja) プロセッサコアのスケジューリング方法、装置、端末及び記憶媒体
WO2022017070A1 (zh) 图像处理方法、装置、服务器及介质
WO2017049945A1 (zh) 加速器虚拟化的方法、装置及集中资源管理器
US20130073600A1 (en) Remote process execution management
WO2022257699A1 (zh) 图像画面显示方法、装置、设备、存储介质及程序产品
US20130073601A1 (en) Remote process execution management
CA2920050C (en) Image display method and apparatus
US9525892B2 (en) Video image distribution method
CN107580011B (zh) 一种数据共享方法及桌面云服务端
CN113467958B (zh) 一种数据处理方法、装置、设备以及可读存储介质
WO2024037110A1 (zh) 数据处理方法、装置、设备以及介质
WO2024066828A1 (zh) 一种数据处理方法、装置、设备、计算机可读存储介质及计算机程序产品
WO2023173516A1 (zh) 数据交互的方法、装置、存储介质及电子设备
CN113037795B (zh) 瘦终端系统及其处理方法
WO2023035619A1 (zh) 一种场景渲染方法、装置、设备及系统
CN113778593B (zh) 云桌面控制方法、装置、电子设备、存储介质及程序产品
WO2024051148A1 (zh) 云游戏控制方法、装置、电子设备及存储介质
US20180189090A1 (en) Exposing Hardware Work Queues as Virtual Devices in Virtual Machines
US20170109113A1 (en) Remote Image Projection Method, Sever And Client Device
WO2021016815A1 (zh) 数据包写入方法及装置、控制终端和可移动平台
US20240212255A1 (en) Scene Rendering Method, Apparatus, Device, and System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22866097

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022866097

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022866097

Country of ref document: EP

Effective date: 20240321

NENP Non-entry into the national phase

Ref country code: DE