US-20260127715-A1 - RENDERING METHOD, APPARATUS, AND SYSTEM
Abstract
This application discloses a rendering method, apparatus, and system, to ensure normal running of an application as much as possible. The method includes: A first area in a first image of a first application is rendered, to obtain a first rendering result of the first area. A terminal sends a first rendering request to a server, and obtains a second rendering result from the server. Then, the terminal fuses the first rendering result and the second rendering result to obtain the first image, and displays the first image.
Inventors
- Hongyan Gao
- Baolei Xu
- Xiaojie Wang
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260507
- Application Date
- 20251230
- Priority Date
- 20230630
Claims (20)
- 1 . A rendering method applied to a terminal, wherein a first application is installed on the terminal, the method comprising: rendering a first area in a first image of the first application to obtain a first rendering result of the first area; sending a first rendering request to a server, the first rendering request requesting the server render a second area in the first image to obtain a second rendering result, and the second area is other than the first area in the first image; obtaining the second rendering result from the server; fusing the first rendering result and the second rendering result to obtain the first image; and displaying the first image.
- 2 . The method according to claim 1 , further comprising: rendering a third area in a second image of the first application to obtain a third rendering result of the third area; sending a second rendering request to the server, the second rendering request requesting the server render a fourth area in the second image to obtain a fourth rendering result, and the fourth area is other than the third area in the second image; and when the fourth rendering result fails to be obtained from the server, displaying the second image based on the third rendering result.
- 3 . The method according to claim 1 , wherein the first area is a dynamic image area in the first image, and the second area is a static image area in the first image; or the first area is a low-level high-frequency area in the first image, and the second area is a high-level low-frequency area in the first image.
- 4 . The method according to claim 1 , wherein sending the first rendering request to the server comprises: determining a quality of a network between the terminal and the server; and if the quality of the network between the terminal and the server meets a preset condition, sending the first rendering request to the server.
- 5 . The method according to claim 4 , wherein that the quality of the network between the terminal and the server meets the preset condition comprises meeting at least one of the following conditions: a packet loss rate between the terminal and the server is less than or equal to a first threshold, a bandwidth between the terminal and the server is greater than or equal to a second threshold, a transmission delay between the terminal and the server is less than or equal to a third threshold, or a transmission rate between the terminal and the server is greater than or equal to a fourth threshold.
- 6 . The method according to claim 1 , further comprising: obtaining data of the first image of the first application; and determining the first area and the second area in the first image according to a rendering strategy.
- 7 . The method according to claim 6 , wherein the rendering strategy comprises: whether to activate a device-cloud collaboration capability when the first application is run, a preset condition for activating the device-cloud collaboration capability, and an image area that needs to be rendered by the server when the first application is run.
- 8 . The method according to claim 6 , wherein the rendering strategy is preset by a developer in the first application.
- 9 . The method according to claim 1 , further comprising: determining information about a first rendering resource corresponding to the second area, wherein the first rendering request comprises the information about the first rendering resource and the information is used by the server to check whether the first rendering resource has been stored.
- 10 . The method according to claim 1 , wherein the first application comprises a three-dimensional (3D) application, and the 3D application comprises at least one of the following: a 3D game application, a 3D social application, or a 3D live-streaming application.
- 11 . The method according to claim 1 , wherein the rendering the first area in the first image of the first application comprises: rendering the first area in the first image of the first application using a graphics processing unit (GPU).
- 12 . A rendering method applied to a server, the method comprising: receiving a first rendering request from a terminal, the first rendering request requesting the server render a second area in a first image to obtain a second rendering result, and the second area is other than a first area in the first image; and sending the second rendering result to the terminal, the second rendering result is used for fusing with a first rendering result obtained by the terminal by rendering the first area, to obtain the first image.
- 13 . The method according to claim 12 , wherein the first area is a dynamic image area in the first image and the second area is a static image area in the first image, or the first area is a low-level high-frequency area in the first image and the second area is a high-level low-frequency area in the first image.
- 14 . A terminal, comprising: a memory storing instructions; and at least one processor in communication with the memory, the at least one processor configured, upon execution of the instructions, to perform the following steps: rendering a first area in a first image of a first application to obtain a first rendering result of the first area; sending a first rendering request to a server, the first rendering request requesting the server render a second area in the first image to obtain a second rendering result, and the second area is other than the first area in the first image; obtaining the second rendering result from the server; fusing the first rendering result and the second rendering result to obtain the first image; and displaying the first image.
- 15 . The terminal according to claim 14 , further comprising: rendering a third area in a second image of the first application to obtain a third rendering result of the third area; sending a second rendering request to the server, the second rendering request requesting the server render a fourth area in the second image to obtain a fourth rendering result, and the fourth area is other than the third area in the second image; and when the fourth rendering result fails to be obtained from the server, displaying the second image based on the third rendering result.
- 16 . The terminal according to claim 14 , wherein the first area is a dynamic image area in the first image and the second area is a static image area in the first image, or the first area is a low-level high-frequency area in the first image and the second area is a high-level low-frequency area in the first image.
- 17 . The terminal according to claim 14 , wherein the sending the first rendering request to the server comprises: determining a quality of a network between the terminal and the server; and if the quality of the network between the terminal and the server meets a preset condition, sending the first rendering request to the server.
- 18 . The terminal according to claim 14 , wherein that the quality of the network between the terminal and the server meets the preset condition comprises meeting at least one of the following conditions: a packet loss rate between the terminal and the server is less than or equal to a first threshold, a bandwidth between the terminal and the server is greater than or equal to a second threshold, a transmission delay between the terminal and the server is less than or equal to a third threshold, or a transmission rate between the terminal and the server is greater than or equal to a fourth threshold.
- 19 . The terminal according to claim 14 , further comprising: obtaining data of the first image of the first application; and determining the first area and the second area in the first image according to a rendering strategy.
- 20 . A server, comprising: a memory storing instructions; and at least one processor in communication with the memory, the at least one processor configured, upon execution of the instructions, to perform the following steps: rendering a first area in a first image of the first application to obtain a first rendering result of the first area; sending a first rendering request to a server, the first rendering request requesting the server render a second area in the first image to obtain a second rendering result, and the second area is other than the first area in the first image; obtaining the second rendering result from the server; fusing the first rendering result and the second rendering result to obtain the first image; and displaying the first image.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No. PCT/CN2024/073844, filed on Jan. 24, 2024, which claims priority to Chinese Patent Application No. 202310808445.1, filed on Jun. 30, 2023. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD Embodiments of this application relate to the field of image processing technologies, and in particular, to a rendering method, apparatus, and system. BACKGROUND Currently, users can experience high-definition three-dimensional (3D) games by using terminals. To improve reality and image quality of 3D games, developers can design and add a plurality of special effects, for example, light and shadow effects for the 3D games. As a result, a large quantity of GPU computing resources are consumed when game images in the 3D games are rendered. Consequently, phenomena such as frame freezing and frame dropping occur when the 3D games are run and good game experience cannot be ensured. To resolve the frame freezing problem during 3D game running, some game vendors provide a cloud game solution, that is, a cloud server is used to complete game running logic. However, this solution has a high requirement on quality of a network between a terminal and the cloud server. Once a network problem occurs, the 3D game cannot be run normally. SUMMARY Embodiments of this application provide a rendering method, apparatus, and system to implement normal running of an application. To achieve the foregoing objective, the following technical solutions are used in embodiments of this application. According to a first aspect, an embodiment of this application provides a rendering method. The method is applied to a terminal. The method may be performed by the terminal, or may be performed by a component (for example, a chip, a chip system, or a processor of the terminal). The following uses an example in which the method is performed by the terminal for description, a first application is installed on the terminal, and the method includes: a first area in a first image of the first application is rendered, to obtain a first rendering result of the first area. The terminal sends a first rendering request to a server, and obtains a second rendering result from the server. Then, the terminal fuses the first rendering result and the second rendering result to obtain the first image, and displays the first image. The first rendering request is used to request the server to render a second area in the first image, to obtain the second rendering result, and the second area is an area other than the first area in the first image. In this application, in a running process of the first application, the terminal and the server may collaboratively process a rendering task of the first application, to avoid a performance bottleneck caused by independently processing the rendering task by the server, so that normal running of the first application can be ensured as much as possible. In a design of the first aspect, the method may further include: rendering a third area in a second image of the first application, to obtain a third rendering result of the third area;sending a second rendering request to the server, where the second rendering request is used to request the server to render a fourth area in the second image, to obtain a fourth rendering result, and the fourth area is an area other than the third area in the second image; andwhen the fourth rendering result fails to be obtained from the server, displaying the second image based on the third rendering result. In the method, the terminal renders the third area in a game image. In this way, even if quality of a network between the terminal and the server is poor, and the terminal cannot receive the rendering result of the server or cannot receive the rendering result of the server in time, that the terminal generates the game image including the third area (for example, an area in which a character is located) may not be affected. This meets a requirement for real-time generation and display of the game image including the third area, and improves smoothness of the game image. In a design of the first aspect, the method further includes: sending the rendering request to the server when the quality of the network between the terminal and the server is restored to meet a preset condition. In this way, if the quality of the network does not meet the condition, the terminal does not send the rendering request to the server, and the terminal locally performs rendering. Subsequently, when the quality of the network meets the condition, the terminal may deliver a rendering task of a subsequent frame to the server. In a design of the first aspect, the first area is a dynamic image area in the first image, and the second area is a static image area in the first image; or the first area is a low-level high-frequency area in the first i