CN114581580A - Method and device for rendering image, storage medium and electronic equipment - Google Patents

Method and device for rendering image, storage medium and electronic equipment Download PDF

Info

Publication number
CN114581580A
CN114581580A CN202210191667.9A CN202210191667A CN114581580A CN 114581580 A CN114581580 A CN 114581580A CN 202210191667 A CN202210191667 A CN 202210191667A CN 114581580 A CN114581580 A CN 114581580A
Authority
CN
China
Prior art keywords
image
instruction
rendering
image rendering
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210191667.9A
Other languages
Chinese (zh)
Inventor
陈友旭
沈标标
邹懋
陈飞
王鲲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vita Technology Beijing Co ltd
Original Assignee
Vita Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vita Technology Beijing Co ltd filed Critical Vita Technology Beijing Co ltd
Priority to CN202210191667.9A priority Critical patent/CN114581580A/en
Publication of CN114581580A publication Critical patent/CN114581580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for rendering images, in the method, a server receives an image rendering instruction and image rendering data sent by a terminal, wherein the image rendering data is rendering data corresponding to a rendered image object; obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data; and sending the target image object to the terminal so that the terminal can display a target image corresponding to the target image object.

Description

Method and device for rendering image, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image rendering, and in particular, to a method and an apparatus for rendering an image, a storage medium, and an electronic device.
Background
With the continuous evolution and development of computer architecture, a GPU (Graphics Processing Unit) is gradually applied to the general computing field due to its efficient many-core computing capability, such as scenes of numerical analysis, three-dimensional modeling, games, and the like.
In the related art, in order to relieve the local GPU resource limitation of the terminal, remote image rendering may be performed, in a remote image rendering scene, an image rendering instruction of a terminal application program is forwarded to a server with GPU resources for execution, and after the server executes an image rendering operation, a rendered image is transmitted back to the terminal application program and displayed on a screen of the terminal.
Disclosure of Invention
The purpose of the present disclosure is to provide a method, an apparatus, a storage medium, and an electronic device for rendering an image.
In order to achieve the above object, the present disclosure provides a method of rendering an image, applied to a server, the method including: receiving an image rendering instruction and image rendering data sent by a terminal, wherein the image rendering data is rendering data corresponding to a rendered image object; obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data; and sending the target image object to the terminal so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction for creating the target image object, and after receiving the image rendering instruction and the image rendering data sent by the terminal, the method further includes: under the condition that the image rendering instruction is the first instruction, acquiring a space size corresponding to the image rendering data from the image rendering instruction; and storing the image rendering data according to the space size.
Optionally, after the target image object is obtained by performing the image rendering instruction rendering according to the image rendering data, the method further includes: recording a first mapping relationship of the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction for updating image rendering data corresponding to the target image object, and after the image rendering instruction and the image rendering data sent by the receiving terminal, the method further includes: and updating the resource data corresponding to a first address to the image rendering data under the condition that the image rendering instruction is the second instruction, wherein the first address is a resource data storage address corresponding to the target image object on the server.
Optionally, the method further comprises: receiving an image resource synchronization instruction sent by a terminal, wherein the image resource synchronization instruction is used for instructing the server to send image rendering data corresponding to the target image object to the terminal; acquiring the image rendering data corresponding to the target image object according to the image resource synchronization instruction; and sending the image rendering data to the terminal.
Optionally, the obtaining, according to the image resource synchronization instruction, the image rendering data corresponding to the target image object includes: acquiring identification information of the target image object according to the image resource synchronization instruction; acquiring a first storage address of image rendering data corresponding to the target image object by querying a first preset database according to the identification information of the target image object; and acquiring the image rendering data corresponding to the target image object according to the first storage address.
Optionally, after the target image object is sent to the terminal, the method further includes: receiving a resource deleting instruction sent by the terminal, wherein the resource deleting instruction is used for instructing the server to delete the image rendering data corresponding to the target image object; and deleting the image rendering data corresponding to the target image object according to the resource deleting instruction.
In order to achieve the above object, the present disclosure provides a method for rendering an image, which is applied to a terminal, and includes: acquiring an image rendering instruction according to the triggering operation of a user; acquiring image rendering data according to the image rendering instruction, wherein the image rendering data are rendering data corresponding to other rendered image objects; sending the image rendering instruction and the image rendering data to a server; and receiving a target image object obtained by the server according to the image rendering data, so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction to create the target image object, and the obtaining image rendering data according to the image rendering instruction includes: if the image rendering instruction is the first instruction, acquiring a second storage address of the image rendering data from the image rendering instruction; and reading the image rendering data from the memory of the terminal according to the second storage address.
Optionally, after receiving the target image object rendered by the server according to the shared resource data, the method further includes: recording a second mapping relationship of the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction to update image rendering data corresponding to the target image object, and the obtaining image rendering data according to the image rendering instruction includes: under the condition that the image rendering instruction is the second instruction, acquiring identification information of the target image object according to the image rendering instruction; acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object; and reading the image rendering data from the memory of the terminal according to the third storage address.
Optionally, the method further comprises:
under the condition that an image resource synchronization instruction is obtained, sending the image resource synchronization instruction to the server, wherein the image resource synchronization instruction is used for indicating the server to send image rendering data corresponding to the target image object to the terminal; receiving the image rendering data sent by the server according to the image resource synchronization instruction; and updating the resource data corresponding to the second address into the image rendering data, wherein the second address is a resource data storage address corresponding to the target image object on the terminal.
Optionally, after receiving the target image object rendered by the server according to the image rendering data, the method further includes: and sending a resource deleting instruction to the server, wherein the resource deleting instruction is used for indicating the server to delete the image rendering data corresponding to the target image object.
In order to achieve the above object, the present disclosure provides an apparatus for rendering an image, applied to a server, the apparatus including: the first receiving module is used for receiving an image rendering instruction and image rendering data sent by a terminal, wherein the image rendering data is rendering data corresponding to a rendered image object; the rendering module is used for obtaining a target image object by executing the image rendering instruction according to the image rendering data; and the first sending module is used for sending the target image object to the terminal so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction to create the target image object, and the apparatus further includes: a rendering data storage module, configured to, when the image rendering instruction is the first instruction, obtain a space size corresponding to the image rendering data from the image rendering instruction; and storing the image rendering data according to the space size.
Optionally, the apparatus further comprises: and the first mapping relation recording module is used for recording a first mapping relation between the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction to update image rendering data corresponding to the target image object, and the apparatus further includes: and the first updating module is used for updating the resource data corresponding to the first address into the image rendering data under the condition that the image rendering instruction is the second instruction, wherein the first address is a resource data storage address corresponding to the target image object on the server.
Optionally, the apparatus further comprises: a second receiving module, configured to receive an image resource synchronization instruction sent by a terminal, where the image resource synchronization instruction is used to instruct the server to send image rendering data corresponding to the target image object to the terminal; the image resource synchronization module is used for acquiring the image rendering data corresponding to the target image object according to the image resource synchronization instruction; and sending the image rendering data to the terminal.
Optionally, the image resource synchronization module is configured to obtain identification information of the target image object according to the image resource synchronization instruction; acquiring a first storage address of image rendering data corresponding to the target image object by querying a first preset database according to the identification information of the target image object; and acquiring the image rendering data corresponding to the target image object according to the first storage address.
Optionally, the apparatus further comprises: a resource deleting module, configured to receive a resource deleting instruction sent by the terminal, where the resource deleting instruction is used to instruct the server to delete the image rendering data corresponding to the target image object; and deleting the image rendering data corresponding to the target image object according to the resource deleting instruction.
In order to achieve the above object, the present disclosure provides an apparatus for rendering an image, applied to a terminal, the apparatus including: the first acquisition module is used for acquiring an image rendering instruction according to the triggering operation of a user; the second obtaining module is used for obtaining image rendering data according to the image rendering instruction, wherein the image rendering data are rendering data corresponding to other rendered image objects; the second sending module is used for sending the image rendering instruction and the image rendering data to a server; and the third receiving module is used for receiving a target image object obtained by rendering according to the image rendering data by the server so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction to create the target image object, and the first obtaining module is configured to obtain a second storage address of the image rendering data from the image rendering instruction if the image rendering instruction is the first instruction; and reading the image rendering data from the memory of the terminal according to the second storage address.
Optionally, the apparatus further comprises: and the second mapping relation recording module is used for recording a second mapping relation between the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction for updating image rendering data corresponding to the target image object, and the first obtaining module is configured to obtain, according to the image rendering instruction, identification information of the target image object when the image rendering instruction is the second instruction; acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object; and reading the image rendering data from the memory of the terminal according to the third storage address.
Optionally, the apparatus further comprises: a third sending module, configured to send an image resource synchronization instruction to the server when the image resource synchronization instruction is obtained, where the image resource synchronization instruction is used to instruct the server to send image rendering data corresponding to the target image object to the terminal; a fourth receiving module, configured to receive the image rendering data sent by the server according to the image resource synchronization instruction; and the second updating module is used for updating the resource data corresponding to the second address into the image rendering data, wherein the second address is a resource data storage address corresponding to the target image object on the terminal.
Optionally, the apparatus further comprises: a fourth sending module, configured to send a resource deletion instruction to the server, where the resource deletion instruction is used to instruct the server to delete the image rendering data corresponding to the target image object.
To achieve the above object, the present disclosure provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to the first aspect of the present disclosure.
In order to achieve the above object, the present disclosure provides an electronic device including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory, the steps of the method of the first aspect of the disclosure.
To achieve the above object, the present disclosure provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the second aspect of the present disclosure.
In order to achieve the above object, the present disclosure provides an electronic device including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the second aspect of the present disclosure.
According to the technical scheme, the server receives an image rendering instruction and image rendering data sent by the terminal, wherein the image rendering data are rendering data corresponding to rendered image objects; obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data; and sending the target image object to the terminal so that the terminal can display the target image corresponding to the target image object, thus rendering data corresponding to the rendered image object can be used as shared resource data, a GPU on the server side can use the existing shared resource data to finish remote image rendering operation, and image elements do not need to be calculated one by one according to original image data based on an original image rendering mode, so that the image rendering efficiency is improved while the correctness of a rendering target result is ensured, and the image rendering performance can be obviously improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a schematic illustration of image rendering locally based on shared resources;
FIG. 2 is a flow diagram illustrating a first method of rendering an image in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a second method of rendering an image in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating a third method of rendering an image in accordance with an exemplary embodiment;
FIG. 5 is an architectural diagram illustrating remote image rendering based on shared resources in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a first apparatus for rendering an image, according to an example embodiment;
FIG. 7 is a block diagram illustrating a second apparatus for rendering an image according to an example embodiment;
FIG. 8 is a block diagram illustrating a third apparatus for rendering an image according to an example embodiment;
FIG. 9 is a block diagram illustrating a fourth apparatus for rendering an image in accordance with an illustrative embodiment;
FIG. 10 is a block diagram illustrating a fifth apparatus for rendering an image in accordance with an illustrative embodiment;
FIG. 11 is a block diagram illustrating a sixth apparatus for rendering an image in accordance with an illustrative embodiment;
FIG. 12 is a block diagram illustrating the structure of an electronic device in accordance with an exemplary embodiment;
fig. 13 is a block diagram illustrating a configuration of an electronic device according to an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
It should be noted that all the actions of acquiring signals, information or data in the present disclosure are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
The application scene of the present disclosure is introduced first, and the present disclosure is mainly applied to a remote image rendering scene, in the existing remote image rendering technology, an image rendering instruction of a terminal application program is forwarded to a server with GPU resources to be executed, and after the server executes an image rendering operation, a rendered image is transmitted back to the terminal application program and displayed on a screen of the terminal.
When performing image rendering based on a GPU in a local node (i.e., a terminal), an application program of the local node typically renders a target image object (e.g., Texture object Texture, Surface data Surface, etc.) by using an image shared resource existing in another program (cross process/device) on the local node, so as to optimize image rendering operations and improve image rendering performance, as shown in fig. 1, the shared resource is typically stored in a local memory space of the terminal, and both the application program and the other program can update a target image by modifying the shared resource, that is, the shared resource can be modified across process/device to update a target image of the application program; the application may also modify the target image data to update the shared resource, thereby modifying the image data across processes/devices.
Therefore, in order to solve the problem of low image rendering efficiency in the existing remote image rendering technology, in the present disclosure, a server may receive an image rendering instruction and image rendering data sent by a terminal, where the image rendering data is rendering data corresponding to a rendered image object; obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data; and sending the target image object to the terminal so that the terminal can display the target image corresponding to the target image object, thus rendering data corresponding to the rendered image object can be used as shared resource data, a GPU on the server side can use the existing shared resource data to finish remote image rendering operation, and image elements do not need to be calculated one by one according to original image data based on an original image rendering mode, so that the image rendering efficiency is improved while the correctness of a rendering target result is ensured, and the image rendering performance can be obviously improved.
In order to solve the problem that image data is inconsistent due to the fact that shared resources are updated by processes/devices on a local node, the terminal can send an instruction (namely, a second instruction mentioned later) for updating image rendering data corresponding to a target image object to the server, so that the server can update resource data corresponding to a first address to the image rendering data, the first address is a resource data storage address corresponding to the target image object on the server, and consistency of the shared resource data of the terminal and the server side is guaranteed.
In addition, after the server updates the shared resource, the update cannot be synchronized to the terminal, so that other processes/devices cannot use the updated shared resource, and the display of other processes/devices is abnormal, and for the problem, after receiving an image resource synchronization instruction sent by the terminal, the server can obtain the image rendering data corresponding to the target image object according to the image resource synchronization instruction; and then sending the image rendering data to the terminal, thereby ensuring the consistency of the shared resource data, and leading the existing process/equipment and application program to use the latest shared resource in real time to render and load the image data.
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Fig. 2 is a flowchart illustrating a method of rendering an image, which is applied to a server, according to an exemplary embodiment, and includes:
in step S201, an image rendering instruction and image rendering data sent by a terminal are received, where the image rendering data is rendering data corresponding to a rendered image object.
Wherein the image object includes texture object, surface data, etc., the image rendering data includes vertex data, texture data, index, shader parameters, etc., and the image rendering instruction may include a first instruction (e.g., CreateTexture () in DirectX) to create a target image object or a second instruction (e.g., UpdateTexture () in DirectX) to update image rendering data corresponding to the target image object.
In step S202, a target image object is obtained by performing the rendering of the image rendering instruction according to the image rendering data.
After receiving the image rendering instruction sent by the terminal, the server may obtain a space size corresponding to the image rendering data from the image rendering instruction if the image rendering instruction is the first instruction, and then store the image rendering data according to the space size, so that the image rendering data corresponding to the target image object may also be used as shared resource data, so that other image objects may also perform image rendering based on the image rendering data corresponding to the target image object, thereby improving rendering efficiency.
In order to facilitate obtaining shared resource data corresponding to each image object to be rendered, after the server obtains a target image object by performing rendering of the image rendering instruction according to the image rendering data, a first mapping relation between the target image object and the image rendering data can be recorded in a first preset database on the server side, so that in the process of rendering other image objects, required shared resource data can be conveniently and rapidly obtained according to the first mapping relation.
In addition, after receiving the image rendering instruction sent by the terminal, and when the image rendering instruction is the second instruction, the server may further instruct the server to update the shared resource data, so that the server may update the resource data corresponding to a first address as the image rendering data, where the first address is the resource data storage address corresponding to the target image object on the server.
In step S203, the target image object is sent to the terminal, so that the terminal can display a target image corresponding to the target image object.
Considering that in an actual image rendering scene, if a frame of complete image is to be rendered, different image objects need to be rendered by executing a plurality of different rendering instructions in the middle, for example, an instruction CreateTexture () is used to create a new texture object, an instruction UpdateTexture () is used to create a new texture object after updating shared resource data corresponding to the texture object, and an instruction CreateSurface () is used to create new surface data, etc., therefore, after the server executes all rendering instructions corresponding to a rendering target image, the terminal may sequentially receive execution results of executing different rendering instructions, where the execution results include different target image objects, and at this time, after the target image is rendered, the terminal may normally display the target image on a screen.
By adopting the method, the rendering data corresponding to the rendered image object can be used as shared resource data, the GPU on the server side can use the existing shared resource data to finish remote image rendering operation, and each image element does not need to be calculated one by one according to the original image data based on the original image rendering mode, so that the image rendering efficiency is improved while the correctness of the rendering target result is ensured, and the image rendering performance can be obviously improved.
Fig. 3 is a flowchart illustrating a method of rendering an image, which is applied to a terminal, according to an exemplary embodiment, and as shown in fig. 3, the method includes the steps of:
in step S301, an image rendering instruction is acquired according to a trigger operation by a user.
In an actual application scenario, when a user runs an application program (such as game software, video clip software, etc.), a terminal needs to perform real-time image display according to a trigger operation of the user, i.e. displaying a target image on the terminal screen (taking the example that the user is using video clipping software to perform video clipping, after the user triggers a "video generation" button on the terminal interface, the terminal acquires the triggering operation of the user and then shows each frame of picture that has been clipped to the user), it can be understood that image rendering is required before displaying the target image, in this process, the application program can call a function (e.g. CreateTexture (), UpdateTexture () in DirectX, etc.) in an image application programming interface such as OpenGL or DirectX, then, the actual image data (such as vertex data, texture data, index, shader parameters, etc.) is used as the input of the calling function to generate the image rendering instruction.
In addition, the image rendering instruction may include a first instruction (e.g., CreateTexture () in DirectX) for creating a new target image object, or a second instruction (e.g., UpdateTexture () in DirectX) for updating image rendering data corresponding to the target image object, where the target image object is each image element to be rendered during rendering the target image, such as texture object, surface data, and the like.
In step S302, image rendering data is obtained according to the image rendering instruction, where the image rendering data is rendering data corresponding to other rendered image objects;
in a possible implementation manner, the image rendering instruction may include a second storage address preset by an application developer, where the second storage address is a storage address of rendering data (or referred to as shared resource data) corresponding to a target image object to be rendered at a client, and therefore, after the terminal acquires the image rendering instruction, it may be determined whether rendering data corresponding to the target image object is already stored in a local node according to whether the image rendering instruction includes the second storage address.
Therefore, in this step, in the case where the image rendering instruction is the first instruction, a second storage address of the image rendering data may be acquired from the image rendering instruction; and then reading the image rendering data from the memory of the terminal according to the second storage address.
Illustratively, the first instruction may be of the form:
CreateTexture(,…,pAddress)
wherein paddrses is the second storage address.
In another possible application scenario, if other application programs (cross-process/device) of the local node modify the shared resource data to update the target image of the application program, at this time, the updated shared resource data needs to be updated on the server side to ensure consistency of the shared resource data stored by the terminal and the server, and the updated server performs image rendering based on the latest image rendering data to obtain the target image object, so that the terminal can normally display a picture, in this case, the terminal may send a second instruction for updating the image rendering data corresponding to the target image object to the server.
In the case that the image rendering instruction is the second instruction, this step may obtain identification information of the target image object according to the image rendering instruction; then acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object; and reading the image rendering data from the memory of the terminal according to the third storage address.
The second preset database stores a plurality of rendered image objects and rendering resource information corresponding to the rendered image objects, wherein the rendering resource information includes information such as storage addresses and occupied space sizes of image rendering data corresponding to the image objects in a terminal memory.
In step S303, the image rendering instruction and the image rendering data are transmitted to a server.
In step S304, a target image object rendered by the server according to the image rendering data is received, so that the terminal can display a target image corresponding to the target image object.
Considering that in an actual image rendering scene, if a frame of complete image is to be rendered, different image objects need to be rendered by executing a plurality of different rendering instructions in the middle, for example, an instruction CreateTexture () is used to create a new texture object, an instruction UpdateTexture () is used to create a new texture object after updating shared resource data corresponding to the texture object, and an instruction CreateSurface () is used to create new surface data, etc., therefore, after the server executes all rendering instructions corresponding to a rendering target image, the terminal may sequentially receive execution results of executing different rendering instructions, where the execution results include different target image objects, and at this time, after the target image is rendered, the terminal may normally display the target image on a screen.
By adopting the method, the terminal can send the image rendering instruction and the rendering data corresponding to the rendered image object to the server, so that the rendering data can be used as shared resource data, the GPU on the server side can use the existing shared resource data to finish the remote image rendering operation, and each image element does not need to be calculated one by one according to the original image data based on the original image rendering mode, thereby ensuring the correctness of the rendering target result, improving the image rendering efficiency and obviously improving the image rendering performance.
FIG. 4 is a flowchart illustrating a method of rendering an image, as shown in FIG. 4, including the steps of:
in step S401, the terminal acquires an image rendering instruction according to a trigger operation of a user.
In an actual application scenario, when a user runs an application program (such as game software, video clip software, etc.), a terminal needs to perform real-time image display according to a trigger operation of the user, i.e. displaying a target image on the terminal screen (taking the example that the user is using video clipping software to perform video clipping, after the user triggers a "video generation" button on the terminal interface, the terminal acquires the triggering operation of the user and then shows each frame of picture that has been clipped to the user), it can be understood that image rendering is required before displaying the target image, in this process, the application program can call a function (e.g. CreateTexture (), UpdateTexture () in DirectX, etc.) in an image application programming interface such as OpenGL or DirectX, then, the actual image data (such as vertex data, texture data, index, shader parameters, etc.) is used as the input of the calling function to generate the image rendering instruction.
In addition, the image rendering instruction may include a first instruction (e.g., CreateTexture () in DirectX) for creating a new target image object, or a second instruction (e.g., UpdateTexture () in DirectX) for updating image rendering data corresponding to the target image object, where the target image object is each image element to be rendered during rendering the target image, such as texture object, surface data, and the like.
In step S402, the terminal obtains image rendering data according to the image rendering instruction, where the image rendering data is rendering data corresponding to other rendered image objects.
In a possible application scenario, in the process of rendering a frame of image, a target image object corresponding to the frame of image may be newly created at a remote server, that is, a first instruction for newly creating the target image object is sent from a terminal to a server, and the terminal may automatically identify whether rendering data corresponding to a target image object to be currently rendered already exists, that is, determine whether rendering data corresponding to the target image object has already been generated in a historical rendering process of other already-rendered image objects at a local node, and if it is determined that rendering data corresponding to the target image object has already been generated, send the rendering data to the server as shared resource data, so that the server performs fast rendering according to the shared resource data to obtain the target image object.
In a possible implementation manner, the image rendering instruction may include a second storage address preset by an application developer, where the second storage address is a storage address of rendering data (or referred to as shared resource data) corresponding to a target image object to be rendered at a client, and therefore, after the terminal acquires the image rendering instruction, it may be determined whether rendering data corresponding to the target image object is already stored in a local node according to whether the image rendering instruction includes the second storage address.
Therefore, in this step, in the case where the image rendering instruction is the first instruction, a second storage address of the image rendering data may be acquired from the image rendering instruction; and then reading the image rendering data from the memory of the terminal according to the second storage address.
Illustratively, the first instruction may be of the form:
CreateTexture(,…,pAddress)
wherein paddrses is the second storage address.
In another possible application scenario, if other application programs (cross-process/device) of the local node modify the shared resource data to update the target image of the application program, at this time, the updated shared resource data needs to be updated on the server side to ensure consistency of the shared resource data stored by the terminal and the server, and the updated server performs image rendering based on the latest image rendering data to obtain the target image object, so that the terminal can normally display a picture, in this case, the terminal may send a second instruction for updating the image rendering data corresponding to the target image object to the server.
In the case that the image rendering instruction is the second instruction, this step may obtain identification information of the target image object according to the image rendering instruction; then acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object; and reading the image rendering data from the memory of the terminal according to the third storage address.
The second preset database stores a plurality of rendered image objects and rendering resource information corresponding to the rendered image objects, wherein the rendering resource information includes information such as storage addresses and occupied space sizes of image rendering data corresponding to the image objects in a terminal memory.
In step S403, the terminal sends the image rendering instruction and the image rendering data to a server.
In step S404, the server obtains a target image object by performing the rendering of the image rendering instruction according to the image rendering data.
It should be noted that, after receiving the image rendering instruction sent by the terminal, the server may obtain a space size corresponding to the image rendering data from the image rendering instruction if the image rendering instruction is the first instruction, and then store the image rendering data according to the space size, so that the image rendering data corresponding to the target image object may also be used as shared resource data, so that other image objects may also perform image rendering based on the image rendering data corresponding to the target image object, thereby improving rendering efficiency.
In order to facilitate obtaining shared resource data corresponding to each image object to be rendered, after the server obtains a target image object by performing rendering of the image rendering instruction according to the image rendering data, a first mapping relation between the target image object and the image rendering data can be recorded in a first preset database on the server side, so that in the process of rendering other image objects, required shared resource data can be conveniently and rapidly obtained according to the first mapping relation.
In addition, after receiving the image rendering instruction sent by the terminal, and when the image rendering instruction is the second instruction, the server may further instruct the server to update the shared resource data, so that the server may update the resource data corresponding to a first address as the image rendering data, where the first address is the resource data storage address corresponding to the target image object on the server.
Exemplarily, fig. 5 is a schematic diagram of an architecture of a remote image rendering scheme based on a shared resource, as shown in fig. 5, the architecture includes a terminal, a server and a communication module therebetween, during a running process of an image application program on the terminal, the terminal needs to perform real-time image display on an image display module according to a user trigger operation, at this time, the terminal acquires the user trigger operation, the application program can generate an image rendering instruction by calling a function (e.g. CreateTexture (), updatetext () in DirectX) in an image application programming interface such as OpenGL or DirectX, and using actual image data (e.g. vertex data, texture data, index, shader parameter, etc.) as an input of the called function, and then send the image rendering instruction to an image rendering instruction forwarding module, where the image rendering instruction is the first instruction (i.e. an instruction for creating a target image object), the image rendering instruction can be analyzed through the shared resource management module to obtain shared resource data, the terminal sends the target image rendering instruction and the shared resource data to the server, the server receives the first instruction sent by the terminal and allocates a space with a corresponding size in the memory to store the shared resource data, the server executes the first instruction to create a target image object and record the mapping relation between the target image object and the shared resource data, the server sends the created target image object to the terminal through the image return module, the terminal receives the target image object sent by the server and records the mapping relation between the target image object and the shared resource data, and the target image is displayed on a screen after all image objects corresponding to the target image to be displayed are received.
Continuing with fig. 5 as an example, in the case that the image rendering instruction is the second instruction (i.e. the instruction for updating the image rendering data corresponding to the target image object), the image rendering instruction forwarding module on the terminal intercepts the image rendering instruction of the image application program, the terminal obtains the shared resource data by querying the mapping relationship between the target image object and the shared resource data, then the image rendering instruction and the shared resource data are sent to a server, after the server receives the image rendering instruction and the shared resource data sent by the terminal, updating the shared resource data to a local memory space, then executing an image rendering instruction to obtain a rendered target image formation, and sending the created target image object to the terminal through the image return module, and displaying the target image on a screen after the terminal receives all image objects corresponding to the target image to be displayed.
In step S405, the server transmits the target image object to the terminal.
And after receiving the target image object sent by the server, the terminal can display a target image corresponding to the target image object on a terminal screen.
Considering that in an actual image rendering scene, if a frame of complete image is to be rendered, different image objects need to be rendered by executing a plurality of different rendering instructions in the middle, for example, an instruction CreateTexture () is used to create a new texture object, an instruction UpdateTexture () is used to create a new texture object after updating shared resource data corresponding to the texture object, and an instruction CreateSurface () is used to create new surface data, etc., therefore, after the server executes all rendering instructions corresponding to a rendering target image, the terminal may sequentially receive execution results of executing different rendering instructions, where the execution results include different target image objects, and at this time, after the target image is rendered, the terminal may normally display the target image on a screen.
In step S406, the terminal records a second mapping relationship between the target image object and the image rendering data.
After the terminal receives the target image object created by the server according to the first instruction, the newly-created corresponding relationship between the target image object and the image rendering data is not stored in the second preset database of the terminal, so that the terminal can quickly acquire the shared resource data corresponding to the target image object in the subsequent rendering process, and the second mapping relationship between the target image object and the image rendering data can be recorded in the second preset database.
In step S407, when an image resource synchronization instruction is obtained, the image resource synchronization instruction is sent to the server, where the image resource synchronization instruction is used to instruct the server to send image rendering data corresponding to the target image object to the terminal.
It has been mentioned above that when other applications (cross processes/devices) of the local node modify the shared resource data to update the target image of the application, the updated shared resource data needs to be updated on the server side, to ensure the consistency of the shared resource data stored by the terminal and the server, and similarly, if the server updates the target image by modifying the shared resource, also, the shared resource data at the terminal side is inconsistent with the shared resource data at the server side, and other application programs such as cross processes and devices cannot use the updated shared resource, so that when the terminal acquires the image resource synchronization command, the image resource synchronization instruction may be sent to the server, so that the server synchronizes the image rendering data corresponding to the target image object to the terminal side according to the image resource synchronization instruction.
In step S408, the server obtains the image rendering data corresponding to the target image object according to the image resource synchronization instruction, and sends the image rendering data to the terminal.
Wherein the image resource synchronization instruction includes identification information of the target image object.
In this step, the server may obtain the identification information of the target image object according to the image resource synchronization instruction; acquiring a first storage address of image rendering data corresponding to the target image object by querying a first preset database according to the identification information of the target image object; and acquiring the image rendering data corresponding to the target image object according to the first storage address.
The first preset database stores a plurality of rendered image objects and rendering resource information corresponding to the rendered image objects, wherein the rendering resource information includes information such as storage addresses and occupied space sizes of image rendering data corresponding to the image objects in a server memory.
In step S409, the terminal updates the resource data corresponding to a second address to the image rendering data, where the second address is a resource data storage address corresponding to the target image object on the terminal.
After receiving the image rendering data sent by the server according to the image resource synchronization instruction, the terminal can store the image rendering data into a memory corresponding to the resource data storage address of the target image object on the terminal, thereby completing the synchronization of the server side and the terminal side for sharing the resource data.
Illustratively, continuing with fig. 5 as an example, in the process of synchronizing shared resource data at the server side to the terminal, an image rendering instruction forwarding module on the terminal intercepts an image resource synchronization instruction of an image application program, and sends the image resource synchronization instruction to the server, the server receives the image resource synchronization instruction sent from the terminal and executes locally, the server queries a mapping relationship between a target image object and the shared resource data, and obtains shared resource data associated with the target image object, the server sends an operation result and updated shared resource data to the terminal, and after the terminal receives the shared resource data sent from the server, the terminal updates local shared resource information to implement synchronization of the shared resource data.
In step S410, the terminal sends a resource deletion instruction to the server, where the resource deletion instruction is used to instruct the server to delete the image rendering data corresponding to the target image object.
In consideration of an actual application scenario, after a certain image object is created, if shared resource data corresponding to the certain image object is no longer needed in a subsequent rendering process, in this case, in order to efficiently utilize a storage space, shared resource data corresponding to the certain image object may be deleted from a memory, so that in this step, a terminal may send a resource deletion instruction to a server, so that the server may delete image rendering data of the certain image object indicated in the instruction according to the resource deletion instruction, thereby implementing effective management of a remote server space.
Exemplarily, continuing to take fig. 5 as an example, an image rendering instruction forwarding module on the terminal intercepts a resource deletion instruction of the image application, the terminal sends the resource deletion instruction to the server, the server receives the resource deletion instruction sent by the terminal and locally executes the resource deletion instruction through an image rendering instruction execution module, specifically, the server queries a mapping relationship between a target image object and shared resource data through a shared resource management module, releases a corresponding shared resource memory space, and deletes a mapping record.
It should be further noted that, in what kind of trigger, deleting the image rendering data corresponding to which image object may be preset in advance by a developer of the application program, for example, the last rendering instruction for rendering a certain image may be set as the resource deleting instruction, so that the server deletes the image rendering data of the image object corresponding to the resource deleting instruction after executing the resource deleting instruction, which is only an example and is not limited in this disclosure.
In step S411, the server deletes the image rendering data corresponding to the target image object according to the resource deletion instruction.
By adopting the method, the rendering data corresponding to the rendered image object can be used as shared resource data, the GPU on the server side can use the existing shared resource data to finish remote image rendering operation, and each image element does not need to be calculated one by one according to the original image data based on the original image rendering mode, so that the image rendering efficiency is improved while the correctness of the rendering target result is ensured, and the image rendering performance can be obviously improved.
In addition, the server may further update the shared resource data at the terminal side to the server side after receiving an instruction to update the image rendering data corresponding to the target image object, and after the server updates the image rendering data corresponding to the target image object, the server may obtain the image rendering data corresponding to the target image object according to an image resource synchronization instruction sent by the terminal; and then sending the image rendering data to the terminal, thereby ensuring the consistency of the shared resource data between the server and the terminal, and leading the existing process/equipment, application programs and the server to use the latest shared resource in real time to render and load the image data.
Meanwhile, the terminal can send a resource deletion instruction to the server, so that the server can delete the image rendering data of a certain image object indicated in the instruction according to the resource deletion instruction, and effective management of the remote server space is realized.
Fig. 6 is a block diagram illustrating an apparatus for rendering an image, applied to a server, according to an exemplary embodiment, the apparatus including:
a first receiving module 601, configured to receive an image rendering instruction and image rendering data sent by a terminal, where the image rendering data is rendering data corresponding to a rendered image object;
a rendering module 602, configured to obtain a target image object by performing rendering of the image rendering instruction according to the image rendering data;
a first sending module 603, configured to send the target image object to the terminal, so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction to create the target image object, and fig. 7 is a block diagram of an apparatus for rendering an image according to the embodiment shown in fig. 6, as shown in fig. 7, the apparatus further includes:
a rendering data storage module 604, configured to, if the image rendering instruction is the first instruction, obtain a space size corresponding to the image rendering data from the image rendering instruction; and storing the image rendering data according to the space size.
Optionally, as shown in fig. 7, the apparatus further includes:
a first mapping relation recording module 605, configured to record a first mapping relation between the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction to update image rendering data corresponding to the target image object, and fig. 8 is a block diagram of an apparatus for rendering an image according to the embodiment shown in fig. 6, and as shown in fig. 8, the apparatus further includes:
a first updating module 606, configured to update, when the image rendering instruction is the second instruction, the resource data corresponding to a first address to the image rendering data, where the first address is a resource data storage address corresponding to the target image object on the server.
Alternatively, fig. 9 is a block diagram of an apparatus for rendering an image according to the embodiment shown in fig. 6, and as shown in fig. 9, the apparatus further includes:
a second receiving module 607, configured to receive an image resource synchronization instruction sent by a terminal, where the image resource synchronization instruction is used to instruct the server to send image rendering data corresponding to the target image object to the terminal;
an image resource synchronization module 608, configured to obtain the image rendering data corresponding to the target image object according to the image resource synchronization instruction; and sending the image rendering data to the terminal.
Optionally, the image resource synchronization module 608 is configured to obtain identification information of the target image object according to the image resource synchronization instruction; acquiring a first storage address of image rendering data corresponding to the target image object by querying a first preset database according to the identification information of the target image object; and acquiring the image rendering data corresponding to the target image object according to the first storage address.
Optionally, as shown in fig. 9, the apparatus further includes:
a resource deleting module 609, configured to receive a resource deleting instruction sent by the terminal, where the resource deleting instruction is used to instruct the server to delete the image rendering data corresponding to the target image object; and deleting the image rendering data corresponding to the target image object according to the resource deleting instruction.
Fig. 10 is a block diagram illustrating an apparatus for rendering an image, applied to a terminal, according to an exemplary embodiment, and as shown in fig. 10, the apparatus includes:
a first obtaining module 1001, configured to obtain an image rendering instruction according to a trigger operation of a user;
a second obtaining module 1002, configured to obtain image rendering data according to the image rendering instruction, where the image rendering data is rendering data corresponding to other rendered image objects;
a second sending module 1003, configured to send the image rendering instruction and the image rendering data to a server;
a third receiving module 1004, configured to receive a target image object rendered by the server according to the image rendering data, so that the terminal can display a target image corresponding to the target image object.
Optionally, the image rendering instruction includes a first instruction to create the target image object, and the first obtaining module 1001 is configured to obtain a second storage address of the image rendering data from the image rendering instruction if the image rendering instruction is the first instruction; and reading the image rendering data from the memory of the terminal according to the second storage address.
Optionally, fig. 11 is a block diagram of an apparatus for rendering an image according to the embodiment shown in fig. 10, and as shown in fig. 11, the apparatus further includes:
a second mapping relation recording module 1005, configured to record a second mapping relation between the target image object and the image rendering data.
Optionally, the image rendering instruction includes a second instruction for updating image rendering data corresponding to the target image object, and the first obtaining module 1001 is configured to, if the image rendering instruction is the second instruction, obtain identification information of the target image object according to the image rendering instruction; acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object; and reading the image rendering data from the memory of the terminal according to the third storage address.
Optionally, as shown in fig. 11, the apparatus further includes:
a third sending module 1006, configured to send an image resource synchronization instruction to the server when the image resource synchronization instruction is obtained, where the image resource synchronization instruction is used to instruct the server to send image rendering data corresponding to the target image object to the terminal;
a fourth receiving module 1007, configured to receive the image rendering data sent by the server according to the image resource synchronization instruction;
a second updating module 1008, configured to update the resource data corresponding to a second address to the image rendering data, where the second address is a resource data storage address corresponding to the target image object on the terminal.
Optionally, as shown in fig. 11, the apparatus further includes:
a fourth sending module 1009, configured to send a resource deletion instruction to the server, where the resource deletion instruction is used to instruct the server to delete the image rendering data corresponding to the target image object.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
By adopting the device, the rendering data corresponding to the rendered image object can be used as shared resource data, the GPU at the server side can use the existing shared resource data to finish remote image rendering operation, and each image element does not need to be calculated one by one according to the original image data based on an original image rendering mode, so that the image rendering efficiency is improved while the correctness of a rendering target result is ensured, and the image rendering performance can be obviously improved.
Fig. 12 is a block diagram illustrating an electronic device 1200 in accordance with an example embodiment. As shown in fig. 12, the electronic device 1200 may include: a processor 1201 and a memory 1202. The electronic device 1200 may also include one or more of a multimedia component 1203, an input/output (I/O) interface 1204, and a communications component 1205.
The processor 1201 is configured to control the overall operation of the electronic device 1200, so as to complete all or part of the steps in the method for rendering an image. The memory 1202 is used to store various types of data to support operation of the electronic device 1200, such as instructions for any application or method operating on the electronic device 1200 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 1202 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 1203 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in the memory 1202 or transmitted via the communication component 1205. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 1204 provides an interface between the processor 1201 and other interface modules, such as a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. A communication component 1205 is used for wired or wireless communication between the electronic device 1200 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 1205 can therefore include: Wi-Fi modules, Bluetooth modules, NFC modules, and the like.
In an exemplary embodiment, the electronic Device 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method of rendering an image.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the method of rendering an image described above is also provided. For example, the computer readable storage medium may be the memory 1202 including program instructions executable by the processor 1201 of the electronic device 1200 to perform the method of rendering an image described above.
Fig. 13 is a block diagram illustrating an electronic device 1300 in accordance with an example embodiment. For example, the electronic device 1300 may be provided as a server. Referring to fig. 13, an electronic device 1300 includes a processor 1322, which may be one or more in number, and a memory 1332 for storing computer programs that are executable by the processor 1322. The computer programs stored in memory 1332 may include one or more modules that each correspond to a set of instructions. Further, the processor 1322 may be configured to execute the computer program to perform the method of rendering an image described above.
Additionally, the electronic device 1300 may also include a power component 1326 and a communication component 1350, the power component 1326 may be configured to perform power management for the electronic device 1300, and the communication component 1350 may be configured to enable communication, e.g., wired or wireless communication, for the electronic device 1300. The electronic device 1300 may also include input/output (I/O) interfaces 1358. The electronic device 1300 may operate based on an operating system, such as Windows, stored in the memory 1332ServerTM,Mac OS XTM,UnixTM,LinuxTMAnd so on.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the method of rendering an image described above is also provided. For example, the non-transitory computer readable storage medium may be the memory 1332 described above that includes program instructions executable by the processor 1322 of the electronic device 1300 to perform the method of rendering an image described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the method of rendering an image described above when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (19)

1. A method of rendering an image, applied to a server, the method comprising:
receiving an image rendering instruction and image rendering data sent by a terminal, wherein the image rendering data is rendering data corresponding to a rendered image object;
obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data;
and sending the target image object to the terminal so that the terminal can display a target image corresponding to the target image object.
2. The method of claim 1, wherein the image rendering instruction comprises a first instruction to create the target image object, and after receiving the image rendering instruction and the image rendering data sent by the terminal, the method further comprises:
under the condition that the image rendering instruction is the first instruction, acquiring a space size corresponding to the image rendering data from the image rendering instruction;
and storing the image rendering data according to the space size.
3. The method of claim 2, wherein after rendering a target image object according to the image rendering data by executing the image rendering instructions, the method further comprises:
recording a first mapping relationship of the target image object and the image rendering data.
4. The method according to claim 1, wherein the image rendering instruction comprises a second instruction for updating image rendering data corresponding to the target image object, and after the image rendering instruction and the image rendering data sent by the receiving terminal, the method further comprises:
and updating resource data corresponding to a first address as the image rendering data under the condition that the image rendering instruction is the second instruction, wherein the first address is a resource data storage address corresponding to the target image object on the server.
5. The method of claim 1, further comprising:
receiving an image resource synchronization instruction sent by a terminal, wherein the image resource synchronization instruction is used for instructing the server to send image rendering data corresponding to the target image object to the terminal;
acquiring the image rendering data corresponding to the target image object according to the image resource synchronization instruction;
and sending the image rendering data to the terminal.
6. The method of claim 5, wherein the obtaining the image rendering data corresponding to the target image object according to the image resource synchronization instruction comprises:
acquiring identification information of the target image object according to the image resource synchronization instruction;
acquiring a first storage address of image rendering data corresponding to the target image object by querying a first preset database according to the identification information of the target image object;
and acquiring the image rendering data corresponding to the target image object according to the first storage address.
7. The method according to any one of claims 1-6, wherein after said transmitting said target image object to said terminal, said method further comprises:
receiving a resource deleting instruction sent by the terminal, wherein the resource deleting instruction is used for instructing the server to delete the image rendering data corresponding to the target image object;
and deleting the image rendering data corresponding to the target image object according to the resource deleting instruction.
8. A method for rendering an image, applied to a terminal, the method comprising:
acquiring an image rendering instruction according to the triggering operation of a user;
acquiring image rendering data according to the image rendering instruction, wherein the image rendering data are rendering data corresponding to other rendered image objects;
sending the image rendering instruction and the image rendering data to a server;
and receiving a target image object obtained by the server according to the image rendering data, so that the terminal can display a target image corresponding to the target image object.
9. The method of claim 8, wherein the image rendering instructions include a first instruction to create the target image object, and wherein the obtaining image rendering data according to the image rendering instructions comprises:
if the image rendering instruction is the first instruction, acquiring a second storage address of the image rendering data from the image rendering instruction;
and reading the image rendering data from the memory of the terminal according to the second storage address.
10. The method of claim 9, wherein after receiving the target image object rendered by the server from the shared resource data, the method further comprises:
recording a second mapping relationship of the target image object and the image rendering data.
11. The method of claim 8, wherein the image rendering instructions include a second instruction to update image rendering data corresponding to the target image object, and wherein obtaining image rendering data according to the image rendering instructions comprises:
under the condition that the image rendering instruction is the second instruction, acquiring identification information of the target image object according to the image rendering instruction;
acquiring a third storage address of image rendering data corresponding to the target image object by querying a second preset database according to the identification information of the target image object;
and reading the image rendering data from the memory of the terminal according to the third storage address.
12. The method of claim 8, further comprising:
under the condition that an image resource synchronization instruction is obtained, sending the image resource synchronization instruction to the server, wherein the image resource synchronization instruction is used for indicating the server to send image rendering data corresponding to the target image object to the terminal;
receiving the image rendering data sent by the server according to the image resource synchronization instruction;
and updating the resource data corresponding to the second address into the image rendering data, wherein the second address is a resource data storage address corresponding to the target image object on the terminal.
13. The method of any of claims 8-12, wherein after receiving the target image object rendered by the server according to the image rendering data, the method further comprises:
and sending a resource deleting instruction to the server, wherein the resource deleting instruction is used for indicating the server to delete the image rendering data corresponding to the target image object.
14. An apparatus for rendering an image, applied to a server, the apparatus comprising:
the first receiving module is used for receiving an image rendering instruction and image rendering data sent by a terminal, wherein the image rendering data is rendering data corresponding to a rendered image object;
the rendering module is used for obtaining a target image object by executing the image rendering instruction rendering according to the image rendering data;
and the first sending module is used for sending the target image object to the terminal so that the terminal can display a target image corresponding to the target image object.
15. An apparatus for rendering an image, applied to a terminal, the apparatus comprising:
the first acquisition module is used for acquiring an image rendering instruction according to the triggering operation of a user;
the second obtaining module is used for obtaining image rendering data according to the image rendering instruction, wherein the image rendering data are rendering data corresponding to other rendered image objects;
the second sending module is used for sending the image rendering instruction and the image rendering data to a server;
and the third receiving module is used for receiving a target image object obtained by rendering according to the image rendering data by the server so that the terminal can display a target image corresponding to the target image object.
16. A non-transitory computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, performs the steps of the method of any one of claims 1 to 7.
17. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.
18. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 8 to 13.
19. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 8 to 13.
CN202210191667.9A 2022-02-28 2022-02-28 Method and device for rendering image, storage medium and electronic equipment Pending CN114581580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210191667.9A CN114581580A (en) 2022-02-28 2022-02-28 Method and device for rendering image, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210191667.9A CN114581580A (en) 2022-02-28 2022-02-28 Method and device for rendering image, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114581580A true CN114581580A (en) 2022-06-03

Family

ID=81776597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210191667.9A Pending CN114581580A (en) 2022-02-28 2022-02-28 Method and device for rendering image, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114581580A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082583A (en) * 2022-06-14 2022-09-20 维塔科技(北京)有限公司 Image rendering method and device, storage medium and electronic equipment
CN115604270A (en) * 2022-11-29 2023-01-13 北京数原数字化城市研究中心(Cn) Method and device for selecting rendering server

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014137008A1 (en) * 2013-03-06 2014-09-12 팬터로그 주식회사 System and method for sharing graphic resource
CN104796393A (en) * 2014-05-30 2015-07-22 厦门极致互动网络技术有限公司 Online game system and method based on server real-time rendering
US20160293134A1 (en) * 2013-12-26 2016-10-06 Square Enix Holdings Co., Ltd. Rendering system, control method and storage medium
CN111084983A (en) * 2019-11-25 2020-05-01 腾讯科技(深圳)有限公司 Cloud game service method, device, equipment and storage medium
CN111158866A (en) * 2019-12-30 2020-05-15 珠海金山网络游戏科技有限公司 Engine system and rendering method thereof
CN111708600A (en) * 2020-08-20 2020-09-25 腾讯科技(深圳)有限公司 Page display method, device, equipment and computer readable storage medium
CN111752619A (en) * 2020-05-20 2020-10-09 西安万像电子科技有限公司 Image processing method and system
CN111784812A (en) * 2020-06-09 2020-10-16 当家移动绿色互联网技术集团有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN112230923A (en) * 2020-11-05 2021-01-15 Oppo广东移动通信有限公司 User interface rendering method, user interface rendering device and server
CN112330783A (en) * 2019-07-31 2021-02-05 广州虎牙科技有限公司 Cloud rendering method and device, terminal device and readable storage medium
CN112316424A (en) * 2021-01-06 2021-02-05 腾讯科技(深圳)有限公司 Game data processing method, device and storage medium
CN112381918A (en) * 2020-12-03 2021-02-19 腾讯科技(深圳)有限公司 Image rendering method and device, computer equipment and storage medium
CN112835843A (en) * 2021-01-26 2021-05-25 西安万像电子科技有限公司 Data rendering method and system
CN113015000A (en) * 2019-12-19 2021-06-22 中兴通讯股份有限公司 Rendering and displaying method, server, terminal, and computer-readable medium
CN113244614A (en) * 2021-06-07 2021-08-13 腾讯科技(深圳)有限公司 Image picture display method, device, equipment and storage medium
CN113730922A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Graph rendering method and device, electronic equipment and storage medium
CN114077508A (en) * 2022-01-19 2022-02-22 维塔科技(北京)有限公司 Remote image rendering method and device, electronic equipment and medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014137008A1 (en) * 2013-03-06 2014-09-12 팬터로그 주식회사 System and method for sharing graphic resource
US20160293134A1 (en) * 2013-12-26 2016-10-06 Square Enix Holdings Co., Ltd. Rendering system, control method and storage medium
CN104796393A (en) * 2014-05-30 2015-07-22 厦门极致互动网络技术有限公司 Online game system and method based on server real-time rendering
CN112330783A (en) * 2019-07-31 2021-02-05 广州虎牙科技有限公司 Cloud rendering method and device, terminal device and readable storage medium
CN111084983A (en) * 2019-11-25 2020-05-01 腾讯科技(深圳)有限公司 Cloud game service method, device, equipment and storage medium
CN113015000A (en) * 2019-12-19 2021-06-22 中兴通讯股份有限公司 Rendering and displaying method, server, terminal, and computer-readable medium
CN111158866A (en) * 2019-12-30 2020-05-15 珠海金山网络游戏科技有限公司 Engine system and rendering method thereof
CN111752619A (en) * 2020-05-20 2020-10-09 西安万像电子科技有限公司 Image processing method and system
CN111784812A (en) * 2020-06-09 2020-10-16 当家移动绿色互联网技术集团有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN111708600A (en) * 2020-08-20 2020-09-25 腾讯科技(深圳)有限公司 Page display method, device, equipment and computer readable storage medium
CN112230923A (en) * 2020-11-05 2021-01-15 Oppo广东移动通信有限公司 User interface rendering method, user interface rendering device and server
CN112381918A (en) * 2020-12-03 2021-02-19 腾讯科技(深圳)有限公司 Image rendering method and device, computer equipment and storage medium
CN112316424A (en) * 2021-01-06 2021-02-05 腾讯科技(深圳)有限公司 Game data processing method, device and storage medium
CN112835843A (en) * 2021-01-26 2021-05-25 西安万像电子科技有限公司 Data rendering method and system
CN113244614A (en) * 2021-06-07 2021-08-13 腾讯科技(深圳)有限公司 Image picture display method, device, equipment and storage medium
CN113730922A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Graph rendering method and device, electronic equipment and storage medium
CN114077508A (en) * 2022-01-19 2022-02-22 维塔科技(北京)有限公司 Remote image rendering method and device, electronic equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082583A (en) * 2022-06-14 2022-09-20 维塔科技(北京)有限公司 Image rendering method and device, storage medium and electronic equipment
CN115604270A (en) * 2022-11-29 2023-01-13 北京数原数字化城市研究中心(Cn) Method and device for selecting rendering server
CN115604270B (en) * 2022-11-29 2023-03-14 北京数原数字化城市研究中心 Method and device for selecting rendering server

Similar Documents

Publication Publication Date Title
CN109260708B (en) Map rendering method and device and computer equipment
CN107890671B (en) Three-dimensional model rendering method and device for WEB side, computer equipment and storage medium
US20220058766A1 (en) Graphics rendering method and apparatus
WO2019091017A1 (en) Method and device for processing buried points in dynamic pages, and computer device
CN114581580A (en) Method and device for rendering image, storage medium and electronic equipment
CN111736850B (en) Image processing method, apparatus, server and medium
KR20190116479A (en) Application program processing methods, devices, and storage media
JP2021518955A (en) Processor core scheduling method, equipment, terminals and storage media
CN107526623B (en) Data processing method and device
CN114820272A (en) Data interaction method and device, storage medium and electronic equipment
WO2023197762A1 (en) Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
CN110659024B (en) Graphics resource conversion method and device, electronic equipment and storage medium
CN109144638B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
US11189003B2 (en) Graphics processing method and related apparatus, and device for unidirectionally transmitting calling information of a graphics API to a client
CN114661465A (en) Resource management method, device, storage medium and electronic equipment
CN115797527A (en) Scene rendering method, device, equipment and system
CN109189498B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
JP2015515651A (en) Information processing apparatus, control method, program, and recording medium
CN109165067B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
CN112925584A (en) Scene-based file configuration method, device, storage medium, and program product
CN111866065A (en) Rendering image returning method and device
WO2022104883A1 (en) Adding method and apparatus for coexistence of multiple types of scenarios, terminal and storage medium
US11763528B2 (en) Avatar mobility between virtual reality spaces
CN110278331B (en) System attribute feedback method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 1022, Floor 10, No. 1, Zhongguancun Street, Haidian District, Beijing 100085

Applicant after: Vita Technology (Beijing) Co.,Ltd.

Address before: 819-1, floor 7, No. 8, Haidian North 2nd Street, Haidian District, Beijing 100080

Applicant before: Vita Technology (Beijing) Co.,Ltd.

CB02 Change of applicant information