CN111866065A - Method and device for returning rendered image - Google Patents
Method and device for returning rendered image Download PDFInfo
- Publication number
- CN111866065A CN111866065A CN202010496914.7A CN202010496914A CN111866065A CN 111866065 A CN111866065 A CN 111866065A CN 202010496914 A CN202010496914 A CN 202010496914A CN 111866065 A CN111866065 A CN 111866065A
- Authority
- CN
- China
- Prior art keywords
- rendering
- data processing
- processing request
- application
- result data
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Image Generation (AREA)
Abstract
本公开提供一种渲染图像回传的方法和装置,涉及图像处理领域,能够解决远程渲染图像回传过程中数据传输开销较大的问题。其中,提供的一种渲染图像回传的方法包括:应用端发送渲染指令给渲染端;所述应用端在需要进行渲染结果处理时发送数据处理请求给所述渲染端;接收所述渲染端根据所述数据处理请求回传的渲染结果数据。通过本发明实施例提供的技术方案,应用端可以通过数据处理请求告知渲染端有针对性的进行渲染结果数据的回传和处理,降低了应用端与渲染端数据传输的开销。
The present disclosure provides a method and a device for returning a rendered image, which relate to the field of image processing and can solve the problem of large data transmission overhead in the process of returning a remote rendered image. The provided method for returning a rendered image includes: an application sending a rendering instruction to the rendering; the application sending a data processing request to the rendering when the rendering result needs to be processed; receiving the rendering according to the The rendering result data returned by the data processing request. With the technical solutions provided by the embodiments of the present invention, the application end can notify the rendering end to return and process the rendering result data in a targeted manner through a data processing request, thereby reducing the overhead of data transmission between the application end and the rendering end.
Description
技术领域technical field
本公开涉及图像处理领域,尤其涉及渲染图像回传的方法及装置。The present disclosure relates to the field of image processing, and in particular, to a method and apparatus for returning a rendered image.
背景技术Background technique
渲染是指利用计算机图像生成技术,通过对计算机中数据化物体的几何模型附上一定的材质、纹理及色彩等计算图形元素,在一定的光源设置条件下计算生成具有真实感的物体状态的场景图像。在远程渲染场景下,应用端和渲染端分离,应用端的渲染需求可以由渲染端的一台或多台电脑共同完成;也可以把渲染需求发送到远端的服务器进行渲染,服务器根据渲染指令执行对应的渲染任务并将渲染结果回传给应用端,这种远程渲染的方式也称为云渲染。Rendering refers to the use of computer image generation technology, by attaching certain materials, textures, colors and other computational graphic elements to the geometric model of data-based objects in the computer, under certain light source settings, calculate and generate realistic object state scenes. image. In the remote rendering scenario, the application side and the rendering side are separated, and the rendering requirements of the application side can be completed by one or more computers on the rendering side; the rendering requirements can also be sent to the remote server for rendering, and the server executes the corresponding rendering instructions according to the rendering instructions. The rendering task and the rendering result are sent back to the application side. This remote rendering method is also called cloud rendering.
在远程渲染的过程中,往往会涉及到应用端需要对大量对中间渲染结果进行处理,相关技术中,当应用端需要对中间渲染结果进行处理时,会直接发送操作请求给渲染端,由渲染端直接将中间渲染结果回传到应用端,应用端完成处理后再发送到渲染端进行进一步的渲染操作;这种处理方式,使得应用端与渲染端数据传输的开销较大,从而需要较大的带宽。In the process of remote rendering, the application side often needs to process a large number of intermediate rendering results. In related technologies, when the application side needs to process the intermediate rendering results, it will directly send an operation request to the rendering side. The client directly returns the intermediate rendering results to the application side, and after the application side completes the processing, it is sent to the rendering side for further rendering operations; this processing method makes the data transmission overhead between the application side and the rendering side larger, which requires a larger bandwidth.
发明内容SUMMARY OF THE INVENTION
本公开实施例提供一种渲染图像回传的方法及装置,能够解决相关技术中应用端与渲染端数据传输的开销较大的问题。Embodiments of the present disclosure provide a method and an apparatus for returning a rendered image, which can solve the problem of high overhead in data transmission between an application end and a rendering end in the related art.
根据本公开实施例的第一方面,提供一种渲染图像回传的方法,可以应用于应用端,该方法包括:应用端发送渲染指令给渲染端;所述应用端在需要进行渲染结果处理时,发送数据处理请求给所述渲染端;接收所述渲染端根据所述数据处理请求回传的渲染结果数据。通过该方法的实施,应用端可以通过数据处理请求告知渲染端有针对性的进行渲染结果数据的回传和处理,降低了应用端与渲染端数据传输的开销。According to a first aspect of the embodiments of the present disclosure, there is provided a method for returning a rendered image, which can be applied to an application end. The method includes: the application end sends a rendering instruction to the rendering end; when the application end needs to process the rendering result , sending a data processing request to the rendering end; and receiving the rendering result data returned by the rendering end according to the data processing request. Through the implementation of the method, the application end can inform the rendering end to carry out the return and processing of the rendering result data in a targeted manner through the data processing request, thereby reducing the overhead of data transmission between the application end and the rendering end.
在一些实施例中,应用端在需要进行渲染结果处理时,发送数据处理请求给所述渲染端,可以包括:所述应用端应用程序生成操作请求并发送给所述渲染端的检测模块;所述检测模块判断所述操作请求的操作类别,并根据所述操作类别发送所述数据处理请求给所述渲染端。In some embodiments, when the application end needs to perform rendering result processing, sending a data processing request to the rendering end may include: the application end application generates an operation request and sends it to the detection module of the rendering end; the The detection module determines the operation type of the operation request, and sends the data processing request to the rendering end according to the operation type.
在一些实施例中,所述操作请求可以是读写请求,所述操作类别可以是读操作和/或写操作(也可简称为读写操作)。In some embodiments, the operation request may be a read/write request, and the operation category may be a read operation and/or a write operation (also referred to as a read/write operation for short).
在一些实施例中,所述数据处理请求包括:请求所述渲染端回传指定位置上指定大小的渲染结果数据;或者请求所述渲染端将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the data processing request includes: requesting the rendering end to return rendering result data of a specified size at a specified location; or requesting the rendering end to update the rendering result data of the specified content to a specified location.
通过上述渲染图像回传方法,应用端可以针对不同的操作类型发送不用的数据处理请求,既满足了应用端对中间渲染结果处理的需要,又使得渲染端可以针对不同的数据处理请求,进行不同的渲染结果数据处理,解决了相关技术中渲染端需要直接回传全部渲染结果,数据传输开销较大的问题。Through the above rendering image return method, the application side can send different data processing requests for different operation types, which not only satisfies the needs of the application side for processing intermediate rendering results, but also enables the rendering side to perform different processing requests for different data. The data processing of rendering results using the new method solves the problem that the rendering end needs to directly return all rendering results in the related art, and the data transmission overhead is relatively large.
根据本公开实施例的第二方面,提供另一种渲染图像的回传方法,可以应用于渲染端,该方法包括:渲染端接收应用端发送的渲染指令,并根据所述渲染指令进行图像渲染;所述渲染端接收所述应用端发送的数据处理请求,并根据所述数据处理请求进行渲染结果数据处理。通过该技术方案的实施,渲染端可以针对应用端发送的数据处理请求,有针对性的进行渲染结果数据处理,不再需要直接回传完整的中间渲染结果数据,降低了数据传输开销。According to a second aspect of the embodiments of the present disclosure, there is provided another method for returning a rendered image, which can be applied to a rendering end. The method includes: the rendering end receives a rendering instruction sent by the application end, and performs image rendering according to the rendering instruction ; The rendering end receives the data processing request sent by the application end, and performs rendering result data processing according to the data processing request. Through the implementation of the technical solution, the rendering end can process the rendering result data in a targeted manner according to the data processing request sent by the application end, and it is no longer necessary to directly return the complete intermediate rendering result data, thereby reducing the data transmission overhead.
在一些实施例中,所述渲染端根据所述数据处理请求进行渲染结果数据处理包括:根据所述数据处理请求将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the rendering end performing rendering result data processing according to the data processing request includes: returning rendering result data of a specified size at a specified location to the application end according to the data processing request; or according to the data processing request; The above data processing request updates the rendering result data of the specified content to the specified location.
通过上述实施例提供的渲染图像回传方法,渲染端可以针对应用端发送的数据处理请求,有针对性的将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。不再需要直接回传完整的中间渲染结果数据,可以大大降低数据传输开销。Through the rendering image return method provided by the above-mentioned embodiment, the rendering end can, in response to the data processing request sent by the application end, return the rendering result data of the specified size at the specified location to the application end in a targeted manner; The data processing request updates the rendering result data of the specified content to the specified location. It is no longer necessary to directly return the complete intermediate rendering result data, which can greatly reduce the data transmission overhead.
根据本公开实施例的第三方面,提供一种渲染图像回传的装置,应用于应用端,该装置包括应用程序模块和检测模块,所述应用程序模块用于发送渲染指令给渲染端,所述检测模块用于在需要进行渲染结果处理时发送数据处理请求给所述渲染端;所述检测模块还用于接收所述渲染端根据所述数据处理请求回传的渲染结果数据。通过该装置,应用端可以通过数据处理请求告知渲染端有针对性的进行渲染结果数据的回传和处理,降低了应用端与渲染端数据传输开销较大的问题。According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for returning a rendered image, which is applied to an application side. The apparatus includes an application program module and a detection module. The application program module is configured to send a rendering instruction to the rendering side. The detection module is configured to send a data processing request to the rendering end when rendering result processing needs to be performed; the detection module is further configured to receive the rendering result data returned by the rendering end according to the data processing request. Through the device, the application end can inform the rendering end to carry out the return and processing of the rendering result data in a targeted manner through the data processing request, which reduces the problem of large data transmission overhead between the application end and the rendering end.
在一些实施例中,应用程序模块还可以用于生成并发送操作请求给所述检测模块;所述检测模块还可以用于判断所述操作请求的操作类别,并根据所述操作类别发送所述数据处理请求给所述渲染端。In some embodiments, the application program module can also be used to generate and send an operation request to the detection module; the detection module can also be used to determine the operation type of the operation request, and send the operation request according to the operation type. The data processing request is sent to the rendering end.
在一些实施例中,上述操作请求可以是读写请求,所述操作类别可以是读操作和/或写操作。In some embodiments, the above operation request may be a read/write request, and the operation category may be a read operation and/or a write operation.
在一些实施例中,数据处理请求可以包括:请求所述渲染端回传指定位置上指定大小的渲染结果数据,或者请求所述渲染端将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the data processing request may include: requesting the rendering end to return rendering result data of a specified size at a specified location, or requesting the rendering end to update the rendering result data of the specified content to a specified location.
通过上述渲染图像回传装置,应用端可以针对不同的操作类型发送不用的数据处理请求,既满足了应用端对中间渲染结果处理的需要,又使得渲染端可以针对不同的数据处理请求,进行不同的渲染结果数据处理,解决了相关技术中渲染端需要直接回传全部渲染结果,数据传输开销较大的问题。Through the above rendering image return device, the application side can send different data processing requests for different operation types, which not only satisfies the needs of the application side for processing intermediate rendering results, but also enables the rendering side to perform different processing requests for different data. The data processing of rendering results using the new method solves the problem that the rendering end needs to directly return all rendering results in the related art, and the data transmission overhead is relatively large.
根据本公开实施例的第四方面,提供另一种渲染图像的回传装置,应用于渲染端,其特征在于,所述装置包括接收模块和执行模块;所述接收模块用于接收应用端发送的渲染指令,所述执行模块用于根据所述渲染指令进行图像渲染,所述接收模块还用于接收所述发送模块发送的数据处理请求;所述执行模块还用于根据所述数据处理请求进行渲染结果数据处理。通过该装置,渲染端可以针对应用端发送的数据处理请求,有针对性的进行渲染结果数据处理,不再需要直接回传完整的中间渲染结果数据,降低了数据传输开销。According to a fourth aspect of the embodiments of the present disclosure, there is provided another apparatus for returning a rendered image, which is applied to a rendering end, wherein the apparatus includes a receiving module and an executing module; the receiving module is configured to receive the data sent by the application end. The rendering instruction, the execution module is used to perform image rendering according to the rendering instruction, the receiving module is also used to receive the data processing request sent by the sending module; the execution module is also used to process the request according to the data Perform rendering result data processing. Through the device, the rendering end can process the rendering result data in a targeted manner according to the data processing request sent by the application end, and it is no longer necessary to directly return the complete intermediate rendering result data, thereby reducing the data transmission overhead.
在一些实施例中,上述执行模块根据所述数据处理请求进行渲染结果数据处理包括:根据所述数据处理请求将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the execution module performing rendering result data processing according to the data processing request includes: returning rendering result data of a specified size at a specified location to the application according to the data processing request; or according to the data processing request; The data processing request updates the rendering result data of the specified content to the specified location.
通过上述实施例提供的渲染图像回传装置,渲染端可以针对应用端发送的数据处理请求,有针对性的将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。不再需要直接回传完整的中间渲染结果数据,可以大大降低数据传输开销。With the rendered image returning device provided by the above embodiment, the rendering end can, in response to the data processing request sent by the application end, return the rendering result data of the specified size at the specified location to the application end in a targeted manner; The data processing request updates the rendering result data of the specified content to the specified location. It is no longer necessary to directly return the complete intermediate rendering result data, which can greatly reduce the data transmission overhead.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是远程渲染系统的示意图;Figure 1 is a schematic diagram of a remote rendering system;
图2是本公开实施例提供的一种渲染图像回传方法的流程图;2 is a flowchart of a method for returning a rendered image provided by an embodiment of the present disclosure;
图3是本公开实施例提供的另一种渲染图像回传方法的流程图;3 is a flowchart of another method for returning a rendered image provided by an embodiment of the present disclosure;
图4是本公开实施例提供的另一种渲染图像回传方法的流程图;4 is a flowchart of another method for returning a rendered image provided by an embodiment of the present disclosure;
图5是本公开实施例提供的应用端读写操作过程的示意图;5 is a schematic diagram of an application-side read-write operation process provided by an embodiment of the present disclosure;
图6是本公开实施例提供的一种渲染图像回传装置的结构框图;6 is a structural block diagram of an apparatus for returning a rendered image provided by an embodiment of the present disclosure;
图7是本公开实施例提供的另一种渲染图像回传装置的结构框图。FIG. 7 is a structural block diagram of another apparatus for returning a rendered image provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
图1是远程渲染系统的示意图。如图1所示,该远程渲染系统中应用端101和渲染端102,其中,应用端101也可以称为用户端,可以是用户计算机、手机终端、平板电脑等;应用端101中可以安装图像渲染应用程序,如3D应用程序等。渲染端102可以是部署在局域网的一个或多个计算机或服务器,也可以是云端的一个或多个计算机或服务器(图中未示出多个的情况)。该渲染系统进行渲染的实现原理为:应用端101将本地3D应用程序生成的图像渲染指令发送给渲染端102;渲染端102执行相应的图像渲染指令进行图像渲染,并在完成图像渲染后将渲染结果回传给应用端101。在一些实施例中,渲染包括3D渲染,应用端也称为3D应用端,渲染端也称为3D渲染端。Figure 1 is a schematic diagram of a remote rendering system. As shown in FIG. 1 , an
相关技术中,在应用端101需要对中间渲染结果进行处理的场景下,会直接发送操作请求给渲染端102,渲染端102收到应用端的操作请求后直接将中间渲染结果发送给应用端101,应用端101处理完成后再发送给渲染端102。这种处理方式,使得应用端与渲染端数据传输的开销较大,需要较大的带宽。In the related art, in a scenario where the
经研究分析,应用端101对渲染端102渲染得到的渲染结果或者中间渲染结果一般有以下几类操作:After research and analysis, the rendering results or intermediate rendering results rendered by the
操作1:保存,即保存渲染结果的全部或者部分数据;Operation 1: Save, that is, save all or part of the data of the rendering result;
操作2:修改,即对渲染结果全部或者部分做计算;Operation 2: Modify, that is, calculate all or part of the rendering result;
操作3:替换,即覆盖渲染结果的全部或者部分内容。Operation 3: Replace, that is, cover all or part of the rendering result.
这三种操作中,操作1和操作2需要读取渲染结果的实际内容,需回传图像数据,但如果是部分保存或者修改,则不需要回传全部数据,只需回传部分数据即可;而操作3的目的只是覆盖,应用端实际并不需要知道渲染结果是什么,因此,针对操作3所回传的渲染结果是可以省略的。Among these three operations, operation 1 and operation 2 need to read the actual content of the rendering result, and need to return the image data, but if it is partially saved or modified, you do not need to return all the data, just return some data. ; The purpose of operation 3 is to cover, and the application side does not actually need to know what the rendering result is. Therefore, the rendering result returned by operation 3 can be omitted.
图2是本公开实施例提供的一种渲染图像回传方法的流程图。如图2所示,该方法包括以下步骤:FIG. 2 is a flowchart of a method for returning a rendered image provided by an embodiment of the present disclosure. As shown in Figure 2, the method includes the following steps:
201:应用端发送渲染指令给渲染端;201: The application side sends a rendering instruction to the rendering side;
202:应用端在需要进行渲染结果处理时发送数据处理请求给所述渲染端;202: The application end sends a data processing request to the rendering end when rendering result processing is required;
203:接收所述渲染端根据所述数据处理请求回传的渲染结果数据。203: Receive rendering result data returned by the rendering end according to the data processing request.
通过该方法的实施,应用端可以通过数据处理请求告知渲染端有针对性的进行渲染结果数据的回传和处理,降低了应用端与渲染端数据传输开销较大的问题。Through the implementation of this method, the application end can inform the rendering end to carry out the return and processing of the rendering result data in a targeted manner through the data processing request, which reduces the problem of large data transmission overhead between the application end and the rendering end.
在一些实施例中,步骤202中应用端需要进行渲染结果处理时发送数据处理请求给所述渲染端,可以包括:所述应用端应用程序生成操作请求并发送给所述渲染端的检测模块;所述检测模块判断所述操作请求的操作类别,并根据所述操作类别发送所述数据处理请求给所述渲染端。In some embodiments, sending a data processing request to the rendering end when the application end needs to process the rendering result in
在一些实施例中,上述数据处理请求可以包括:请求所述渲染端回传指定位置上指定大小的渲染结果数据;或者请求所述渲染端将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the data processing request may include: requesting the rendering end to return rendering result data of a specified size at a specified location; or requesting the rendering end to update the rendering result data of the specified content to a specified location.
通过上述渲染图像回传方法,应用端可以针对不同的操作类型发送不用的数据处理请求,既满足了应用端对中间渲染结果处理的需要,又使得渲染端可以针对不同的数据处理请求,进行不同的渲染结果数据处理,解决了相关技术中渲染端需要直接回传全部渲染结果,数据传输开销较大的问题。Through the above rendering image return method, the application side can send different data processing requests for different operation types, which not only satisfies the needs of the application side for processing intermediate rendering results, but also enables the rendering side to perform different processing requests for different data. The data processing of rendering results using the new method solves the problem that the rendering end needs to directly return all rendering results in the related art, and the data transmission overhead is relatively large.
图3是本公开实施例提供的另一种渲染图像回传方法的流程图。如图3所示,该方法包括以下步骤:FIG. 3 is a flowchart of another method for returning a rendered image provided by an embodiment of the present disclosure. As shown in Figure 3, the method includes the following steps:
301:渲染端接收应用端发送的渲染指令,并根据所述渲染指令进行图像渲染;301: The rendering terminal receives the rendering instruction sent by the application terminal, and performs image rendering according to the rendering instruction;
302:渲染端接收所述应用端发送的数据处理请求;302: The rendering end receives the data processing request sent by the application end;
303:渲染端根据所述数据处理请求进行渲染结果数据处理。303: The rendering end performs rendering result data processing according to the data processing request.
通过上述方法的实施,渲染端可以针对应用端发送的数据处理请求,有针对性的进行渲染结果数据处理,不再需要直接回传完整的中间渲染结果数据,降低了数据传输开销。Through the implementation of the above method, the rendering end can process the rendering result data in a targeted manner according to the data processing request sent by the application end, and it is no longer necessary to directly return the complete intermediate rendering result data, which reduces the data transmission overhead.
在一些实施例中,步骤303中渲染端根据数据处理请求进行渲染结果数据处理可以包括:根据所述数据处理请求将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the rendering result data processing performed by the rendering end according to the data processing request in
在一些实施例中,通过上述渲染图像回传方法的实施,渲染端可以针对应用端发送的数据处理请求,有针对性的将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。不再需要直接回传完整的中间渲染结果数据,可以大大降低数据传输开销。In some embodiments, through the implementation of the above method for returning a rendered image, the rendering end may, in response to the data processing request sent by the application end, return the rendering result data of the specified size at the designated location to the application end in a targeted manner; Or update the rendering result data of the specified content to the specified position according to the data processing request. It is no longer necessary to directly return the complete intermediate rendering result data, which can greatly reduce the data transmission overhead.
基于上述图2和图3对应的实施例提供的渲染图像的回传方法,本公开另一实施例提供一种渲染图像的回传方法,该方法可以应用于远程图像渲染系统。图4是本公开实施例提供的另一种渲染图像回传方法的流程图。如图4所示,该图像渲染处理方法,包括以下步骤:Based on the method for returning a rendered image provided by the embodiments corresponding to FIG. 2 and FIG. 3 , another embodiment of the present disclosure provides a method for returning a rendered image, which can be applied to a remote image rendering system. FIG. 4 is a flowchart of another method for returning a rendered image provided by an embodiment of the present disclosure. As shown in Figure 4, the image rendering processing method includes the following steps:
401:应用端通过3D应用程序发送图像渲染指令给渲染端;401: The application side sends an image rendering instruction to the rendering side through the 3D application;
402:渲染端接收图像渲染指令,并进行图像渲染;在一些实施例中,渲染端的渲染结果可以保存在图像处理器(Graphic Processing Unit,简称GPU)内存中。402: The rendering end receives the image rendering instruction, and performs image rendering; in some embodiments, the rendering result of the rendering end may be stored in the memory of a graphics processor (Graphic Processing Unit, GPU for short).
403:应用端需要对中间渲染结果进行处理时,应用端3D应用程序生成操作请求发送给应用端的检测模块;403: When the application side needs to process the intermediate rendering result, the application side 3D application generates an operation request and sends it to the detection module of the application side;
404:应用端检测模块接收到操作请求后,对该操作请求的操作类型进行判断;404: After receiving the operation request, the application-side detection module judges the operation type of the operation request;
405:应用端检测模块根据判断结果确定数据处理请求并发送给渲染端;405: The application-side detection module determines the data processing request according to the judgment result and sends it to the rendering end;
405:渲染端根据接收到的数据处理请求进行相应的处理。405: The rendering end performs corresponding processing according to the received data processing request.
在一些实施例中,上述操作请求的操作类型可以是读操作和/或写操作,也可简称读写操作;检测模块可以是读写检测模块。In some embodiments, the operation type of the above operation request may be a read operation and/or a write operation, and may also be referred to as a read-write operation; the detection module may be a read-write detection module.
在一些实施例中,步骤404中检测模块对操作请求的操作类型判定为读操作,则检测模块获取读取的位置与大小,其发送给渲染端的数据处理请求为:请求渲染端回传对应位置上对应大小的数据。在具体实现时,所述数据处理请求可以包括位置信息和数据大小信息。渲染端在收到数据处理请求后,将回传对应位置上对应大小的数据给应用端。In some embodiments, in
在一些实施例中,步骤404中检测模块对操作请求的操作类型判定为写操作,则检测模块获取写的位置和写的内容,其发送给渲染的数据处理需求为:请求渲染端将相应的内容更新到相应的位置上。在具体实现时,所述数据处理请求可以包括位置信息和内容信息。渲染端在收到数据处理请求后,将相应的内容更新到相应的位置上。In some embodiments, in
在一些实施例中,上述方法还包括,应用端根据渲染端的回传数据进行中间渲染结果的处理。In some embodiments, the above method further includes that the application side performs processing of the intermediate rendering result according to the data returned by the rendering side.
图5是本公开实施例提供的应用端读写操作过程的示意图。如图5所示,在一些实施例中,读写操作过程可以分为以下步骤:FIG. 5 is a schematic diagram of an application-side read and write operation process provided by an embodiment of the present disclosure. As shown in Figure 5, in some embodiments, the read and write operation process can be divided into the following steps:
501:发出映射请求;即请求把GPU的内存映射到CPU端,使3D应用能访问;501: Send a mapping request; that is, request to map the memory of the GPU to the CPU side, so that the 3D application can access;
502:读写操作;在一些实施例中,读写操作可以使用3D应用程序编程接口(Application Programming Interface,简称API)专有的读写函数实现,也可以使用一般的内存读写操作;502: read and write operations; in some embodiments, the read and write operations may be implemented using a 3D application programming interface (Application Programming Interface, API for short) proprietary read and write functions, or general memory read and write operations;
503:取消映射;取消映射也意味着访问完成,相关修改提交给GPU。503: Unmapping; Unmapping also means that the access is completed, and the relevant modifications are submitted to the GPU.
根据读写操作过程的上述步骤,检测模块可以利用操作系统的支持或处理器内存管理单元的支持来判别操作请求的操作类型,并确定发送给渲染端的数据处理请求。下面以利用操作系统的支持来判别操作请求的操作类型为例,示例性的说明一种可能的实现方式:According to the above steps of the read and write operation process, the detection module can use the support of the operating system or the support of the processor memory management unit to determine the operation type of the operation request, and determine the data processing request sent to the rendering end. The following uses the support of the operating system to determine the operation type of the operation request as an example to illustrate a possible implementation:
在步骤501中,应用端的3D应用程序发出映射请求时,可以请求操作系统映射一块内存空间,大小为访问GPU资源的大小,设置映射的内存无读写权限,并将该段映射的内存地址返回给3D应用。In
在步骤502中,应用端的3D应用程序在进行实际的读写操作时,因为上述返回的映射地址没有设置读写权限,因此不管是读还是写都会触发内存访问异常。In
在内存异常处理程序里面,根据异常产生的地址,与之前返回的地址相比,可以获取访问的位置,根据异常的原因,检测模块就可以判断是读访问还是写访问。在一些实施例中,有些操作系统平台不提供异常原因的信息,检测模块这时需要使用栈回溯,分析异常产生时执行的CPU指令,根据指令类型判断是读访问还是写访问。检测模块对读写数据大小的获取,可以通过3D API专有的读写函数获得,对于一般的内存读写方式,可以通过栈回溯分析函数调用的参数得到。In the memory exception handler, according to the address generated by the exception, compared with the address returned before, the access location can be obtained, and according to the cause of the exception, the detection module can determine whether it is a read access or a write access. In some embodiments, some operating system platforms do not provide information about the cause of the exception, and the detection module needs to use stack backtracking to analyze the CPU instruction executed when the exception occurs, and determine whether it is a read access or a write access according to the instruction type. The detection module can obtain the read and write data size through the 3D API proprietary read and write functions. For the general memory read and write methods, it can be obtained through the stack backtracking analysis function call parameters.
在步骤503中,取消映射时,对于写操作,可以上述步骤中获取的写的位置和大小及内容信息发送到渲染端。In
通过以上方式,一方面,针对写操作,能够避免写操作中不必要的数据传输,而是直接将写操作的内容更新到3D渲染端的渲染结果中的对应位置;另一方面,也不需要针对每一个读操作都回传整帧的渲染结果,而是直接回传待读取的存储位置上的数据。Through the above methods, on the one hand, for the write operation, unnecessary data transmission in the write operation can be avoided, and the content of the write operation can be directly updated to the corresponding position in the rendering result of the 3D rendering end; Each read operation returns the rendering result of the entire frame, but directly returns the data at the storage location to be read.
图6是本发明实施例提供的一种渲染图像回传装置的结构框图。该装置可以应用于应用端。如图6所示,渲染图像回传的装置600包括应用程序模块601和检测模块602。其中,应用程序模块601用于发送渲染指令给渲染端,检测模块602用于在需要进行渲染结果处理时发送数据处理请求给所述渲染端。在一些实施例中,检测模块601还用于接收渲染端根据所述数据处理请求回传的渲染结果数据。FIG. 6 is a structural block diagram of an apparatus for returning a rendered image provided by an embodiment of the present invention. The device can be applied to the application side. As shown in FIG. 6 , the
通过该装置,应用端可以通过数据处理请求告知渲染端有针对性的进行渲染结果数据的回传和处理,在一些实施例中,检测模块601可以用于判别该操作请求对渲染结果的使用情形,并根据使用情形来确定是否需要渲染端回传实际的图像数据,并在需要回传数据时,判断回传多少图像数据,这样就可以减少不必要的图像数据回传,从而提高处理效率,减少传输开销。Through this device, the application end can inform the rendering end to return and process the rendering result data in a targeted manner through the data processing request. In some embodiments, the
在一些实施例中,应用程序模块601还可以用于生成并发送操作请求给检测模块602;检测模块601还可以用于判断所述操作请求的操作类别,并根据所述操作类别发送所述数据处理请求给所述渲染端。In some embodiments, the
在一些实施例中,上述操作请求可以是读写请求,所述操作类别可以是读操作和/或写操作。在一些实施例中,数据处理请求可以包括:请求所述渲染端回传指定位置上指定大小的渲染结果数据,或者请求所述渲染端将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the above operation request may be a read/write request, and the operation category may be a read operation and/or a write operation. In some embodiments, the data processing request may include: requesting the rendering end to return rendering result data of a specified size at a specified location, or requesting the rendering end to update the rendering result data of the specified content to a specified location.
应用端针对不同的操作类型发送不用的数据处理请求,既满足了应用端对中间渲染结果处理的需要,又使得渲染端可以针对不同的数据处理请求,进行不同的渲染结果数据处理,解决了相关技术中渲染端需要直接回传全部渲染结果,数据传输开销较大的问题。The application side sends different data processing requests for different operation types, which not only satisfies the needs of the application side for processing intermediate rendering results, but also enables the rendering side to perform different rendering results data processing for different data processing requests. In the technology, the rendering end needs to directly return all rendering results, and the data transmission overhead is relatively large.
图7是本发明实施例提供的另一种渲染图像回传装置的结构框图。该装置可以应用于渲染端。如图7所示,渲染图像回传的装置700包括接收模块701和执行模块702;接收模块701用于接收应用端发送的渲染指令,执行模块702用于根据所述渲染指令进行图像渲染。在一些实施例中,接收模块701还用于接收所述发送模块发送的数据处理请求;执行模块702还用于根据所述数据处理请求进行渲染结果数据处理。通过该装置,渲染端可以针对应用端发送的数据处理请求,有针对性的进行渲染结果数据处理,不再需要直接回传完整的中间渲染结果数据,降低了数据传输开销。FIG. 7 is a structural block diagram of another apparatus for returning a rendered image provided by an embodiment of the present invention. The device can be applied to the rendering side. As shown in FIG. 7 , the
在一些实施例中,执行模块702根据所述数据处理请求进行渲染结果数据处理包括:根据所述数据处理请求将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。In some embodiments, the
通过上述实施例提供的渲染图像回传装置,渲染端可以针对应用端发送的数据处理请求,有针对性的将指定位置上指定大小的渲染结果数据回传给所述应用端;或者根据所述数据处理请求将指定内容的渲染结果数据更新到指定的位置上。不再需要直接回传完整的中间渲染结果数据,可以大大降低数据传输开销。With the rendered image returning device provided by the above embodiment, the rendering end can, in response to the data processing request sent by the application end, return the rendering result data of the specified size at the specified location to the application end in a targeted manner; The data processing request updates the rendering result data of the specified content to the specified location. It is no longer necessary to directly return the complete intermediate rendering result data, which can greatly reduce the data transmission overhead.
基于上述图2和图3对应的实施例中所描述的渲染图像的回传方法,本公开实施例还提供一种计算机可读存储介质,例如,非临时性计算机可读存储介质可以是只读存储器(英文:Read Only Memory,ROM)、随机存取存储器(英文:Random Access Memory,RAM)、CD-ROM、磁带、软盘和光数据存储装置等。该存储介质上存储有计算机指令,用于执行上述图2和图3对应的实施例中所描述的数据传输方法,此处不再赘述。Based on the method for returning a rendered image described in the embodiments corresponding to FIG. 2 and FIG. 3 , an embodiment of the present disclosure further provides a computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be read-only. Memory (English: Read Only Memory, ROM), random access memory (English: Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices, etc. The storage medium stores computer instructions for executing the data transmission methods described in the embodiments corresponding to FIG. 2 and FIG. 3 , and details are not described herein again.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010496914.7A CN111866065A (en) | 2020-06-03 | 2020-06-03 | Method and device for returning rendered image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010496914.7A CN111866065A (en) | 2020-06-03 | 2020-06-03 | Method and device for returning rendered image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111866065A true CN111866065A (en) | 2020-10-30 |
Family
ID=72985444
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010496914.7A Pending CN111866065A (en) | 2020-06-03 | 2020-06-03 | Method and device for returning rendered image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111866065A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114077508A (en) * | 2022-01-19 | 2022-02-22 | 维塔科技(北京)有限公司 | Remote image rendering method and device, electronic equipment and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105164636A (en) * | 2014-04-08 | 2015-12-16 | 华为技术有限公司 | Method, device and processor for data communication in virtualized environment |
CN110580674A (en) * | 2019-07-24 | 2019-12-17 | 西安万像电子科技有限公司 | Information processing method, device and system |
-
2020
- 2020-06-03 CN CN202010496914.7A patent/CN111866065A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105164636A (en) * | 2014-04-08 | 2015-12-16 | 华为技术有限公司 | Method, device and processor for data communication in virtualized environment |
CN108345492A (en) * | 2014-04-08 | 2018-07-31 | 华为技术有限公司 | The method, apparatus and processor of a kind of data communication in virtualized environment |
CN110580674A (en) * | 2019-07-24 | 2019-12-17 | 西安万像电子科技有限公司 | Information processing method, device and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114077508A (en) * | 2022-01-19 | 2022-02-22 | 维塔科技(北京)有限公司 | Remote image rendering method and device, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104216862B (en) | Communication method and device between user process and system service | |
CN108287708B (en) | Data processing method and device, server and computer readable storage medium | |
CN103412822B (en) | Operation Nonvolatile memory and the method and relevant apparatus of data manipulation | |
WO2015062339A1 (en) | Method and device for running remote application program | |
CN102971698B (en) | Snapshot data-processing method and system, storage system and snapshot agency | |
US9467495B2 (en) | Transferring assets via a server-based clipboard | |
CN114880072A (en) | Application window display method of virtual machine, computing equipment and storage medium | |
WO2022041507A1 (en) | 3d rendering method and system | |
CN112764668B (en) | Method, electronic device and computer program product for expanding GPU memory | |
CN111787036A (en) | A solution method, device, storage medium and device for front-end private cloud deployment | |
CN109033328A (en) | A kind of access request processing method, device, equipment and readable storage medium storing program for executing | |
CN110580674B (en) | Information processing method, device and system | |
WO2018103022A1 (en) | Method and apparatus for achieving frame buffering, electronic device and computer program product | |
WO2021008185A1 (en) | Data transmission method and apparatus, and server | |
CN105740413A (en) | File movement method by FUSE on Linux platform | |
CN115774621B (en) | A request processing method, system, device and computer-readable storage medium | |
CN116028455A (en) | A data processing method, device, storage medium and electronic equipment | |
CN108733602B (en) | data processing | |
CN107566470B (en) | Method and device for managing virtual machine in cloud data system | |
US20200371827A1 (en) | Method, Apparatus, Device and Medium for Processing Data | |
US9535713B2 (en) | Manipulating rules for adding new devices | |
CN111866065A (en) | Method and device for returning rendered image | |
JP2016515258A (en) | File aggregation for optimized file operation | |
CN113110846B (en) | A method and device for obtaining environment variables | |
CN113784075A (en) | Screen video reading method and system and computing device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201030 |
|
RJ01 | Rejection of invention patent application after publication |