Movatterモバイル変換


[0]ホーム

URL:


CN113836455B - Special effects rendering method, device, equipment, storage medium and computer program product - Google Patents

Special effects rendering method, device, equipment, storage medium and computer program product
Download PDF

Info

Publication number
CN113836455B
CN113836455BCN202111097131.2ACN202111097131ACN113836455BCN 113836455 BCN113836455 BCN 113836455BCN 202111097131 ACN202111097131 ACN 202111097131ACN 113836455 BCN113836455 BCN 113836455B
Authority
CN
China
Prior art keywords
rendering
special effect
image
renderer
rendered
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.)
Active
Application number
CN202111097131.2A
Other languages
Chinese (zh)
Other versions
CN113836455A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111097131.2ApriorityCriticalpatent/CN113836455B/en
Publication of CN113836455ApublicationCriticalpatent/CN113836455A/en
Application grantedgrantedCritical
Publication of CN113836455BpublicationCriticalpatent/CN113836455B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The disclosure provides a special effect rendering method, a special effect rendering device, electronic equipment, a computer readable storage medium and a computer program product, and relates to the technical field of media clouds. The method comprises the following steps: according to the special effect rendering request transmitted from the webpage end, determining a target special effect corresponding to the image to be rendered; calling a first renderer configured at a webpage end to partially render the image to be rendered according to the target special effect, so as to obtain a first rendering result; in response to the first rendering result being confirmed by the initiating terminal of the special effect rendering request, controlling a second renderer configured at the server to perform complete rendering on the image to be rendered according to the target special effect to obtain a second rendering result, wherein the first renderer and the second renderer are products obtained after the characteristics of the same rendering engine and different terminals are matched; and the control server returns a second rendering result to the initiating terminal. The method increases the success rate of one-time rendering, saves operation resources and improves the overall utilization rate of the operation resources.

Description

Translated fromChinese
特效渲染方法、装置、设备、存储介质及计算机程序产品Special effects rendering method, device, equipment, storage medium and computer program product

技术领域Technical Field

本公开涉及图像处理技术领域,具体涉及媒体云技术领域,尤其涉及一种特效渲染方法、装置、电子设备、计算机可读存储介质及计算机程序产品。The present disclosure relates to the field of image processing technology, specifically to the field of media cloud technology, and in particular to a special effects rendering method, device, electronic device, computer-readable storage medium, and computer program product.

背景技术Background technique

随着特效技术的发展,越来越多的高级特效逐渐进入普通用户的视野,以期通过使用这些高级特效来提升图像或视频内容的感官。With the development of special effects technology, more and more advanced special effects are gradually entering the field of vision of ordinary users, hoping to enhance the sensory perception of image or video content by using these advanced special effects.

而特效的种类五花八门,即使是同类特效也会因细节的不同被再次细分为多个子类,考虑到进行一次特效渲染需要耗费大量的运算资源,保障最终渲染结果与预期或用户之前选择的特效一致,是非常重要的。There are many types of special effects, and even the same type of special effects will be further subdivided into multiple subcategories due to different details. Considering that a special effect rendering requires a lot of computing resources, it is very important to ensure that the final rendering result is consistent with the expected or previously selected special effect by the user.

发明内容Summary of the invention

本公开实施例提出了一种特效渲染方法、装置、电子设备、计算机可读存储介质及计算机程序产品。The embodiments of the present disclosure provide a special effects rendering method, device, electronic device, computer-readable storage medium, and computer program product.

第一方面,本公开实施例提出了一种特效渲染方法,包括:根据经网页端传入的特效渲染请求,确定与待渲染图像对应的目标特效;调用配置在网页端的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果;响应于第一渲染结果被特效渲染请求的发起端确认,控制配置在服务端的第二渲染器按目标特效对待渲染图像进行完整渲染,得到第二渲染结果;其中,第一渲染器和第二渲染器为相同渲染引擎与不同端的特性相适配后得到的产物;控制服务端向发起端返回第二渲染结果。In a first aspect, an embodiment of the present disclosure proposes a special effects rendering method, including: determining a target special effect corresponding to an image to be rendered according to a special effects rendering request transmitted via a web page; calling a first renderer configured on the web page to partially render the image to be rendered according to the target special effect, and obtaining a first rendering result; in response to the first rendering result being confirmed by an initiator of the special effects rendering request, controlling a second renderer configured on a server to completely render the image to be rendered according to the target special effect, and obtaining a second rendering result; wherein the first renderer and the second renderer are products obtained by adapting the same rendering engine to the characteristics of different terminals; and controlling the server to return the second rendering result to the initiator.

第二方面,本公开实施例提出了一种特效渲染装置,包括:目标特效确定单元,被配置成根据经网页端传入的特效渲染请求,确定与待渲染图像对应的目标特效;网页端部分渲染单元,被配置成调用配置在网页端的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果;服务端完整渲染单元,被配置成响应于第一渲染结果被特效渲染请求的发起端确认,控制配置在服务端的第二渲染器按目标特效对待渲染图像进行完整渲染,得到第二渲染结果;其中,第一渲染器和第二渲染器为相同渲染引擎与不同端的特性相适配后得到的产物;完整渲染结果返回单元,被配置成控制服务端向发起端返回第二渲染结果。In a second aspect, an embodiment of the present disclosure proposes a special effects rendering device, including: a target special effects determination unit, configured to determine a target special effects corresponding to an image to be rendered according to a special effects rendering request transmitted via a web page; a web page partial rendering unit, configured to call a first renderer configured on the web page to partially render the image to be rendered according to the target special effects, and obtain a first rendering result; a server-side complete rendering unit, configured to control a second renderer configured on the server to completely render the image to be rendered according to the target special effects in response to confirmation of the first rendering result by an initiator of the special effects rendering request, and obtain a second rendering result; wherein the first renderer and the second renderer are products obtained by adapting the same rendering engine to the characteristics of different terminals; and a complete rendering result returning unit, configured to control the server to return the second rendering result to the initiator.

第三方面,本公开实施例提供了一种电子设备,该电子设备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,该指令被至少一个处理器执行,以使至少一个处理器执行时能够实现如第一方面中任一实现方式描述的特效渲染方法。In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the special effects rendering method described in any implementation method in the first aspect when executing.

第四方面,本公开实施例提供了一种存储有计算机指令的非瞬时计算机可读存储介质,该计算机指令用于使计算机执行时能够实现如第一方面中任一实现方式描述的特效渲染方法。In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the special effects rendering method described in any implementation method of the first aspect when executed.

第五方面,本公开实施例提供了一种包括计算机程序的计算机程序产品,该计算机程序在被处理器执行时能够实现如第一方面中任一实现方式描述的特效渲染方法。In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the special effects rendering method described in any implementation manner in the first aspect.

在接收到特效渲染请求时,本公开首先调用配置在网页端的第一渲染器来对待渲染图像进行部分渲染,得到用于给发起端预览渲染效果的第一渲染结果,不至于给性能较差的网页端较大的渲染压力,而在发起端确认第一渲染结果的渲染结果后,就控制配置在服务端的第二渲染器来对待渲染图像进行完整渲染,进而借助服务端拥有的强大运算能力来高效率的完成完整渲染,而通过控制第一渲染器和第二渲染器基于相同的渲染引擎开发得到,则能够保证第二渲染结果的渲染效果与之前看到的第一渲染结果的渲染效果一致,增加了一次渲染的成功率、节省了运算资源、提升了运算资源的整体利用率。When receiving a special effect rendering request, the present invention first calls the first renderer configured on the web page to partially render the image to be rendered, and obtains a first rendering result for previewing the rendering effect to the initiating end, so as not to put a large rendering pressure on the web page with poor performance. After the initiating end confirms the rendering result of the first rendering result, it controls the second renderer configured on the server to completely render the image to be rendered, and then uses the powerful computing power of the server to efficiently complete the complete rendering. By controlling the first renderer and the second renderer to be developed based on the same rendering engine, it can ensure that the rendering effect of the second rendering result is consistent with the rendering effect of the first rendering result seen before, thereby increasing the success rate of a rendering, saving computing resources, and improving the overall utilization of computing resources.

应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本公开可以应用于其中的示例性系统架构;FIG1 is an exemplary system architecture in which the present disclosure may be applied;

图2为本公开实施例提供的一种特效渲染方法的流程图;FIG2 is a flow chart of a special effects rendering method provided by an embodiment of the present disclosure;

图3为本公开实施例提供的一种对人像进行部分渲染的方法的流程图;FIG3 is a flow chart of a method for partially rendering a portrait provided by an embodiment of the present disclosure;

图4为本公开实施例提供的一种对风景像进行部分渲染的方法的流程图;FIG4 is a flow chart of a method for partially rendering a landscape image provided by an embodiment of the present disclosure;

图5为本公开实施例提供的一种确定目标特效的方法的流程图;FIG5 is a flow chart of a method for determining a target special effect provided by an embodiment of the present disclosure;

图6为本公开实施例提供的一种示出各执行主体各自所执行步骤的特效渲染方法的时序图;FIG6 is a timing diagram of a special effect rendering method showing steps executed by each execution subject according to an embodiment of the present disclosure;

图7为本公开实施例提供的一种特效渲染装置的结构框图;FIG7 is a structural block diagram of a special effects rendering device provided by an embodiment of the present disclosure;

图8为本公开实施例提供的一种适用于执行特效渲染方法的电子设备的结构示意图。FIG8 is a schematic diagram of the structure of an electronic device suitable for executing a special effects rendering method provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.

本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

图1示出了可以应用本公开的特效渲染方法、装置、电子设备及计算机可读存储介质的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the special effects rendering method, apparatus, electronic device, and computer-readable storage medium of the present disclosure may be applied.

如图1所示,系统架构100可以包括用户终端101、102、103,网络104和服务器105。网络104用以在用户终端101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Fig. 1, system architecture 100 may include user terminals 101, 102, 103, network 104 and server 105. Network 104 is used to provide a medium for communication links between user terminals 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

用户可以使用用户终端101、102、103通过网络104与服务器105交互,以接收或发送消息等。用户终端101、102、103和服务器105上可以安装有各种用于实现两者之间进行信息通讯的应用,例如特效渲染类应用、图像资源传输类应用、即时通讯类应用等。The user can use the user terminal 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various applications for realizing information communication between the user terminals 101, 102, 103 and the server 105 can be installed, such as special effect rendering applications, image resource transmission applications, instant messaging applications, etc.

用户终端101、102、103和服务器105可以是硬件,也可以是软件。当用户终端101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等;当用户终端101、102、103为软件时,可以安装在上述所列举的电子设备中,其可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块,在此不做具体限定。当服务器105为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器;服务器为软件时,可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块,在此不做具体限定。User terminals 101, 102, 103 and server 105 can be hardware or software. When user terminals 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when user terminals 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.

用户终端101、102、103通过内置的各种应用可以提供各种服务,以可以结合服务器105共同为用户提供特效渲染服务的特效渲染类应用为例,用户终端101、102、103在运行该特效渲染类应用时可实现如下效果:首先,接收用户通过安装在操作系统上的浏览器应用传入的特效渲染请求;然后,根据该特效渲染请求确定与待渲染图像对应的目标特效;接下来,调用配置在浏览器应用上的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果;下一步,呈现第一渲染结果给发起该特效渲染请求的用户,并期望接收用户再次传入的是否确认的指示信息;在第一渲染结果被用户确认时,向服务器105下发包括待渲染图像和目标特效的完整渲染指令,以使服务器105调用被配置在本地的第二渲染器按目标特效对待渲染图像进行完整渲染,并将渲染得到的第二渲染结果返回至用户终端101、102、103,第一渲染器和第二渲染器为相同渲染引擎与不同端的特性相适配后得到的产物。The user terminals 101, 102, and 103 can provide various services through various built-in applications. Taking the special effect rendering application that can be combined with the server 105 to provide special effect rendering services for users as an example, the user terminals 101, 102, and 103 can achieve the following effects when running the special effect rendering application: first, receive the special effect rendering request passed in by the user through the browser application installed on the operating system; then, determine the target special effect corresponding to the image to be rendered according to the special effect rendering request; next, call the first renderer configured on the browser application to partially render the image to be rendered according to the target special effect, and obtain The first rendering result; the next step is to present the first rendering result to the user who initiated the special effect rendering request, and expect to receive confirmation indication information from the user again; when the first rendering result is confirmed by the user, a complete rendering instruction including the image to be rendered and the target special effect is sent to the server 105, so that the server 105 calls the second renderer configured locally to completely render the image to be rendered according to the target special effect, and returns the rendered second rendering result to the user terminal 101, 102, 103. The first renderer and the second renderer are the products obtained by adapting the same rendering engine to the characteristics of different terminals.

本公开后续各实施例所提供的特效渲染方法一般由直接面向用户的用户终端101、102、103来执行,相应地,特效渲染装置一般也设置于用户终端101、102、103中。The special effect rendering method provided in the subsequent embodiments of the present disclosure is generally executed by the user terminal 101 , 102 , 103 directly facing the user, and accordingly, the special effect rendering device is generally also arranged in the user terminal 101 , 102 , 103 .

应该理解,图1中的用户终端、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的用户终端、网络和服务器。It should be understood that the number of user terminals, networks and servers in Figure 1 is only illustrative and any number of user terminals, networks and servers may be provided according to implementation requirements.

请参考图2,图2为本公开实施例提供的一种特效渲染方法的流程图,其中流程200包括以下步骤:Please refer to FIG. 2 , which is a flow chart of a special effects rendering method provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:

步骤201:根据经网页端传入的特效渲染请求,确定与待渲染图像对应的目标特效;Step 201: determining a target special effect corresponding to the image to be rendered according to a special effect rendering request transmitted via a web page;

本步骤旨在由特效渲染方法的执行主体(例如图1所示的用户终端101、102、103)根据传入的特效渲染请求确定作为渲染目标的待渲染图像和选择的渲染方式。其中,该特效渲染请求由用户通过浏览器网页传入,该网页是在安装在上述执行主体操作系统中的浏览器应用中打开的某个提供特效渲染服务的网页。This step is intended for the execution subject of the special effect rendering method (e.g., the user terminal 101, 102, 103 shown in FIG1 ) to determine the image to be rendered as the rendering target and the selected rendering method according to the incoming special effect rendering request. The special effect rendering request is passed in by the user through a browser webpage, which is a webpage that provides special effect rendering services and is opened in a browser application installed in the operating system of the execution subject.

该特效渲染请求中至少包括待渲染图像和目标特效,其中,待渲染图像作为渲染目标存在,目标特效则是用户所指示对渲染目标进行何种特效渲染的特效参数,可以表现为某个特效插件、特效滤镜或某种特效滤镜的某种使用方式。待渲染图像可以由用户选择本地文件或临时调用摄像头拍摄得到后上传至该网页,也可以直接在该网页上输入指向某个图像的网络地址,此处并不做具体限定。The special effect rendering request includes at least the image to be rendered and the target special effect, wherein the image to be rendered exists as a rendering target, and the target special effect is the special effect parameter indicated by the user for what special effect rendering to be performed on the rendering target, which can be expressed as a special effect plug-in, a special effect filter, or a certain use method of a special effect filter. The image to be rendered can be uploaded to the webpage by the user after selecting a local file or temporarily calling a camera to shoot it, or the network address pointing to a certain image can be directly entered on the webpage, and there is no specific limitation here.

步骤202:调用配置在网页端的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果;Step 202: calling a first renderer configured on the web page to partially render the image to be rendered according to the target special effect, and obtaining a first rendering result;

在步骤201的基础上,本步骤旨在由上述执行主体调用配置在网页端的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果。On the basis of step 201, this step aims to cause the execution subject to call a first renderer configured on the web page to partially render the image to be rendered according to the target special effects to obtain a first rendering result.

其中,第一渲染器是配置在上述执行主体的浏览器应用中、可被提供特效渲染服务的网页调用的渲染器,而按目标特效对待渲染图像进行部分渲染,则是为了在尽可能的减少渲染耗时的情况下能够让用户看到其选择的目标特效的渲染效果,并在用户对渲染效果不满意时仅需付出较小的代价进行重新选择、重新渲染。Among them, the first renderer is a renderer configured in the browser application of the above-mentioned execution entity and can be called by a web page that provides special effects rendering services. The partial rendering of the rendered image according to the target special effects is to enable the user to see the rendering effect of the target special effect selected by the user while minimizing the rendering time. When the user is not satisfied with the rendering effect, he only needs to pay a small cost to reselect and re-render.

出于这一目的,对待渲染图像的哪一部分进行渲染,也是十分重要的,因为需要选择渲染后能够让用户尽可能直观看到渲染效果的部分,否则哪怕是对一部分进行渲染做的也是无用功。在选择进行渲染的一部分时,可结合待渲染图像的图像内容类型、尺寸、图像中出现的物体的数量、位置关系等因素进行选择,以期尽可能的选择出具有代表性的部分图像来进行本步骤的渲染。For this purpose, it is also very important to choose which part of the image to be rendered, because it is necessary to select the part that allows users to see the rendering effect as intuitively as possible after rendering, otherwise even rendering a part is useless. When selecting a part to render, you can combine factors such as the image content type, size, number of objects appearing in the image, and position relationship of the image to be rendered, so as to select as representative a part of the image as possible for rendering in this step.

步骤203:响应于第一渲染结果被特效渲染请求的发起端确认,控制配置在服务端的第二渲染器按目标特效对待渲染图像进行完整渲染,得到第二渲染结果;Step 203: in response to the first rendering result being confirmed by the initiator of the special effect rendering request, controlling the second renderer configured on the server to completely render the image to be rendered according to the target special effect to obtain a second rendering result;

在步骤202的基础上,本步骤在第一渲染结果被特效渲染请求的发起端确认的情况下,旨在由上述执行主体控制服务端调用其第二渲染器按目标特效对待渲染图像进行完整渲染,即借助服务端所拥有的强大渲染性能来尽快的完成对待渲染图像的完整渲染,得到第二渲染结果。On the basis of step 202, when the first rendering result is confirmed by the initiator of the special effect rendering request, this step aims to control the server to call its second renderer to completely render the image to be rendered according to the target special effect, that is, to use the powerful rendering performance of the server to complete the complete rendering of the image to be rendered as soon as possible to obtain the second rendering result.

具体的,在上述执行主体得到第一渲染结果后,还可以确定特效渲染请求的发起路径,然后通过与发起路径对应的返回路径返回第一渲染结果,以将第一渲染结果展示给发起渲染请求的用户,以期接收到其返回的指示是否满意当前所选择的特效渲染效果的指示信息,然后根据该指示信息选择不同的后续分支。若该指示信息表达了不满意第一渲染结果示出的渲染效果,可以返回要求用户重新选择新的目标特效的提示信息。Specifically, after the execution subject obtains the first rendering result, it can also determine the initiation path of the special effect rendering request, and then return the first rendering result through the return path corresponding to the initiation path, so as to display the first rendering result to the user who initiated the rendering request, in order to receive the indication information returned by the user indicating whether the currently selected special effect rendering effect is satisfied, and then select different subsequent branches according to the indication information. If the indication information expresses dissatisfaction with the rendering effect shown by the first rendering result, a prompt information requiring the user to reselect a new target special effect can be returned.

具体的,上述执行主体可通过向服务端(例如图1所示的服务器105)下发同样包含待渲染图像和目标特效的特效渲染指令,以使服务端根据接收到特效渲染指令调用自身配置有的第二渲染器按该目标特效对待渲染图像进行完整的特效渲染,得到该第二渲染结果。也可以向服务端下发不包含待渲染图像和目标特效而是包含索引信息的特效渲染指令,以使服务端根据指令中包含的索引信息自行在索引信息指示的位置获取到待渲染图像和目标特效。Specifically, the execution subject may send a special effect rendering instruction that also includes the image to be rendered and the target special effect to the server (e.g., the server 105 shown in FIG. 1 ), so that the server can call the second renderer configured by itself to perform complete special effect rendering on the image to be rendered according to the target special effect according to the received special effect rendering instruction, and obtain the second rendering result. A special effect rendering instruction that does not include the image to be rendered and the target special effect but includes index information may also be sent to the server, so that the server can obtain the image to be rendered and the target special effect at the location indicated by the index information according to the index information included in the instruction.

需要说明的是,本公开中的第一渲染器是配置在上述执行主体的网页端(即配置在浏览器应用上),而第二渲染器则是配置在服务器端,除配置位置不同外,第一渲染器和第二渲染器拥有相同的底层渲染引擎(也可以称为渲染算法、渲染框架),并将相同渲染引擎与网页端和服务器端在运算性能上表现的差异相适配后得到的产物。因此,通过第一渲染器得到的第一渲染结果和通过第二渲染器得到的第二渲染结果对相同的图像内容拥有相同的渲染效果,使得第二渲染结果实际上表现为第一渲染结果的完整版。It should be noted that the first renderer in the present disclosure is configured on the web page of the above-mentioned execution subject (i.e., configured on the browser application), while the second renderer is configured on the server side. Except for the different configuration locations, the first renderer and the second renderer have the same underlying rendering engine (also known as rendering algorithm, rendering framework), and are the product obtained by adapting the same rendering engine to the difference in computing performance between the web page and the server side. Therefore, the first rendering result obtained by the first renderer and the second rendering result obtained by the second renderer have the same rendering effect for the same image content, so that the second rendering result actually appears as a complete version of the first rendering result.

步骤204:控制服务端向发起端返回第二渲染结果。Step 204: Control the server to return the second rendering result to the initiator.

在步骤203的基础上,本步骤旨在由上述执行主体控制服务端向发起端返回第二渲染结果,以使实际发起该特效渲染请求的发起端(或发起用户)最终得到期望的完整渲染结果。On the basis of step 203, this step aims to control the server end to return the second rendering result to the initiating end by the above-mentioned execution subject, so that the initiating end (or initiating user) who actually initiates the special effect rendering request finally obtains the expected complete rendering result.

在接收到特效渲染请求时,本公开实施例提供的特效渲染方法首先调用配置在网页端的第一渲染器来对待渲染图像进行部分渲染,得到用于给发起端预览渲染效果的第一渲染结果,不至于给性能较差的网页端较大的渲染压力,而在发起端确认第一渲染结果的渲染结果后,就控制配置在服务端的第二渲染器来对待渲染图像进行完整渲染,进而借助服务端拥有的强大运算能力来高效率的完成完整渲染,而通过控制第一渲染器和第二渲染器基于相同的渲染引擎开发得到,则能够保证第二渲染结果的渲染效果与之前看到的第一渲染结果的渲染效果一致,增加了一次渲染的成功率、节省了运算资源、提升了运算资源的整体利用率。When a special effects rendering request is received, the special effects rendering method provided by the embodiment of the present disclosure first calls the first renderer configured on the web page to partially render the image to be rendered, and obtains a first rendering result for previewing the rendering effect to the initiating end, so as not to put a large rendering pressure on the web page with poor performance. After the initiating end confirms the rendering result of the first rendering result, it controls the second renderer configured on the server end to completely render the image to be rendered, and then uses the powerful computing power of the server end to efficiently complete the complete rendering. By controlling the first renderer and the second renderer to be developed based on the same rendering engine, it can ensure that the rendering effect of the second rendering result is consistent with the rendering effect of the first rendering result seen before, thereby increasing the success rate of a rendering, saving computing resources, and improving the overall utilization of computing resources.

针对如何合理确定完整的待渲染图像中进行渲染的部分图像,本公开还分别针对两种常见类型的待渲染图像,分别通过图3和图4提供了不同的实现方案,以期尽可能对具有代表性的部分图像内容进行特效渲染。图3示出了一种针对人像的部分渲染方案,其中流程300包括以下步骤:Regarding how to reasonably determine the partial image to be rendered in the complete image to be rendered, the present disclosure also provides different implementation schemes for two common types of images to be rendered, respectively, through FIG3 and FIG4, in order to perform special effects rendering on representative partial image content as much as possible. FIG3 shows a partial rendering scheme for a portrait, wherein process 300 includes the following steps:

步骤301:响应于待渲染图像为包含人脸的全身照图像,确定全身照图像中的人脸部分;Step 301: In response to the image to be rendered being a full-body image containing a face, determining a face portion in the full-body image;

步骤302:调用配置在网页端的第一渲染器按目标特效对人脸部分进行特效渲染。Step 302: Calling a first renderer configured on the web page to perform special effects rendering on the face part according to the target special effects.

针对人像类的特效渲染需求,考虑到观看者通常都比较注重的脸部信息,脸部也是最“抓”观看者眼球的部分,因此本实施例将全身照图像中的人脸部分作为进行部分渲染的对象,结合脸部占全身照的比例,在满足代表性的同时也能够有效缩短渲染耗时。Regarding the special effects rendering needs of portraits, considering that viewers usually pay more attention to facial information, and the face is also the most eye-catching part of the viewer, this embodiment uses the facial part in the full-body image as the object for partial rendering. Combined with the proportion of the face in the full-body image, it can effectively shorten the rendering time while meeting representativeness.

当然,在某些特殊场景下,可能观看者的侧重点有所改变或者渲染重点不在脸部,在存在这些指导信息时,也应灵活的根据这些指导信息调整进行部分渲染的对象。Of course, in some special scenes, the viewer's focus may change or the rendering focus may not be on the face. When such guidance information exists, the object to be partially rendered should be flexibly adjusted according to such guidance information.

图4示出了一种针对风景像的部分渲染方案,其中流程400包括以下步骤:FIG. 4 shows a partial rendering solution for a landscape image, wherein the process 400 includes the following steps:

步骤401:响应于待渲染图像为包含多个物体的风景图像,确定风景图像中存在物体数量最多的区域子图像;Step 401: In response to the image to be rendered being a landscape image containing a plurality of objects, determining a region sub-image having the largest number of objects in the landscape image;

步骤402:调用配置在网页端的第一渲染器按目标特效对区域子图像进行特效渲染。Step 402: Calling a first renderer configured on the web page to perform special effect rendering on the regional sub-image according to the target special effect.

区别于重点较为突出的人像,风景像往往包含多个物体,且很难确定哪个物体较为合适作为代表性物体来仅对其进行渲染,因此为了尽可能的保证部分渲染结果能够为用户提供更多的渲染效果反馈,本公开将风景图像中存在物体数量最多的区域子图像确定为部分渲染的对象,以使渲染效果覆盖尽可能多的物体,让用户能够看到对不同物体的渲染效果,进而保障第一渲染结果的有效性。Different from portraits with more prominent focus, landscape images often contain multiple objects, and it is difficult to determine which object is more suitable as a representative object to render only it. Therefore, in order to ensure that the partial rendering results can provide users with more rendering effect feedback as much as possible, the present disclosure determines the area sub-image with the largest number of objects in the landscape image as the object of partial rendering, so that the rendering effect covers as many objects as possible, allowing users to see the rendering effects of different objects, thereby ensuring the effectiveness of the first rendering result.

包含其它类型的图像内容的待渲染图像,则可以根据上述论述内容中体现出的寻找代表性部分的指导思想,进行适应性调整,此处不再一一列举。The images to be rendered that contain other types of image content can be adaptively adjusted according to the guiding principle of finding representative parts reflected in the above discussion, and they will not be listed one by one here.

若伴随特效渲染请求有明确的渲染重点指示信息,则可以根据该渲染重点指示信息确定待渲染图像中与渲染重点相关的部分,并将这部分作为渲染对象来得到第一渲染结果。若无法获取到直接给出的渲染重点指示信息,则可以根据包含有渲染重点指示信息的历史特效渲染请求来进行统计、分析,以通过分析结果来预测性的确定图像中各部分属于渲染重点的概率,并选择概率较高的部分图像进行渲染。具体的,进行统计、分析的工具可使用线性或非线性的分类器,以及深度学习算法等,此处不做具体限定。If the special effects rendering request is accompanied by clear rendering focus indication information, the part of the image to be rendered that is related to the rendering focus can be determined based on the rendering focus indication information, and this part can be used as the rendering object to obtain the first rendering result. If the rendering focus indication information cannot be obtained directly, statistics and analysis can be performed based on the historical special effects rendering requests that contain the rendering focus indication information, so as to predictively determine the probability of each part of the image belonging to the rendering focus through the analysis results, and select the part of the image with a higher probability for rendering. Specifically, the tools for statistics and analysis can use linear or nonlinear classifiers, as well as deep learning algorithms, etc., which are not specifically limited here.

由于目标特效可通过多种形式进行表示,为加强对这部分方案的理解,本实施例还具体以特效滤镜为例,结合图5给出了一种确定目标特效的具体实现方案,流程500包括如下步骤:Since the target special effect can be represented in various forms, in order to enhance the understanding of this part of the solution, this embodiment also specifically takes the special effect filter as an example, and provides a specific implementation solution for determining the target special effect in combination with FIG. 5 . The process 500 includes the following steps:

步骤501:接收发起端通过浏览器网页传入的特效渲染请求;Step 501: receiving a special effects rendering request transmitted by an initiator through a browser web page;

步骤502:根据特效渲染请求确定待渲染图像和特效滤镜选择信息;Step 502: Determine the image to be rendered and the special effect filter selection information according to the special effect rendering request;

步骤503:根据特效滤镜选择信息确定为待渲染图像施加特效的目标特效滤镜。Step 503: Determine a target special effect filter for applying special effects to the image to be rendered according to the special effect filter selection information.

即在本实施例中,特效渲染请求具体包含了待渲染图像和特效滤镜选择信息,该特效滤镜选择信息可以表现为执行某个特效滤镜或某类特效滤镜的编号、编码、名称等,以便上述执行主体能够根据该特效滤镜选择信息准确的用于对待渲染图像施加目标特效的目标特效滤镜。That is, in this embodiment, the special effects rendering request specifically includes the image to be rendered and the special effects filter selection information. The special effects filter selection information can be expressed as the number, code, name, etc. of executing a certain special effects filter or a certain type of special effects filter, so that the above-mentioned execution entity can accurately use the target special effects filter to apply the target special effects to the image to be rendered according to the special effects filter selection information.

其它表现形式的目标特效也可以按照该本实施例的逻辑进行适应性调整。Target special effects in other forms of expression can also be adaptively adjusted according to the logic of this embodiment.

由上述任意实施例描述的内容可知,网页端的第一渲染器与服务端的第二渲染器相互协同保障第二渲染结果与第一渲染结果表现出相同的渲染效果,因此在接收到针对第一渲染器和第二渲染器中任一的更新指示时,需要对匹配的另一端的另一渲染器也进行相同的更新,以保证更新前后仍能够保持相同的渲染效果。以接收到针对第二渲染器的更新指示为例,下述给出了一种包括但不限于的实现方案:It can be seen from the description of any of the above embodiments that the first renderer on the web page and the second renderer on the server cooperate with each other to ensure that the second rendering result and the first rendering result show the same rendering effect. Therefore, when an update instruction for either the first renderer or the second renderer is received, the other renderer on the other matching end needs to be updated in the same way to ensure that the same rendering effect can be maintained before and after the update. Taking the receipt of an update instruction for the second renderer as an example, the following provides an implementation scheme including but not limited to:

响应于接收到针对第二渲染器的更新指示,确定第一渲染器的可更新状态信息;In response to receiving an update indication for the second renderer, determining updateable state information of the first renderer;

在本实施例中,该可更新状态信息基于网页端当前接收到的渲染任务的进行状态确定,包括与仍有渲染任务正在进行对应的不允许更新状态、与没有正在进行的渲染任务对应的允许更新状态。In this embodiment, the updateable status information is determined based on the progress status of the rendering task currently received by the web page, including a non-update-allowed status corresponding to a rendering task still in progress and an update-allowed status corresponding to no rendering task in progress.

响应于可更新状态信息为允许更新状态,根据更新指示同时对第二渲染器和第一渲染器进行相应的更新,反之则确认第一渲染器无法在当前进行更新,需要等待至可更新状态信息变更为允许更新状态。In response to the updateable status information being in the update-allowed state, the second renderer and the first renderer are updated accordingly according to the update indication. Otherwise, it is confirmed that the first renderer cannot be updated at present and needs to wait until the updateable status information changes to the update-allowed state.

即本实施例额外引入了对是否允许同步进行更新的时机的判断,以避免非同步更新造成的渲染效果不同的问题出现。That is, this embodiment additionally introduces the judgment of whether to allow synchronous updating, so as to avoid the problem of different rendering effects caused by asynchronous updating.

为加深理解,本公开还结合一个具体应用场景,给出了一种具体的实现方案:To deepen understanding, the present disclosure also provides a specific implementation solution in combination with a specific application scenario:

1、用户通过其持有的智能手机向提供特效渲染服务的浏览器网页传入了特效渲染请求;1. The user transmits a special effects rendering request to the browser webpage providing the special effects rendering service through the smartphone he holds;

2、基于浏览器应用运行的网页调用配置在浏览器应用中的WebGL图像处理框架,按目标特效滤镜为待渲染图像的所选部分进行部分渲染,得到第一渲染结果;2. Based on the webpage running in the browser application, the WebGL image processing framework configured in the browser application is called, and partial rendering is performed on the selected part of the image to be rendered according to the target special effect filter to obtain a first rendering result;

具体的,可以调用WebGL图像处理框架的Shader(着色器)按目标特效滤镜为待渲染图像的所选部分进行部分的着色渲染。Specifically, a Shader (shader) of a WebGL image processing framework may be called to perform partial shading rendering for a selected portion of the image to be rendered according to a target special effect filter.

3、该网页通过将第一渲染结果通过智能手机的显示屏展现给用户;4、用户对看到的第一渲染结果是否满足预期进行确认;3. The webpage displays the first rendering result to the user through a display screen of a smart phone; 4. The user confirms whether the first rendering result meets expectations;

5.1、在用户认为第一渲染结果示出的渲染效果满足预期时,向智能手机返回确认指示;5.1. When the user believes that the rendering effect shown by the first rendering result meets expectations, a confirmation indication is returned to the smart phone;

5.2、在用户认为第一渲染结果示出的渲染效果未满足预期时,向智能手机返回退回指示,从重新跳转至第1步来重新下发包含新目标特效信息特效渲染请求;5.2. When the user believes that the rendering effect shown by the first rendering result does not meet the expectations, a return instruction is returned to the smart phone, and the process jumps back to step 1 to re-issue a special effect rendering request containing new target special effect information;

6、智能手机将该确认指示通过浏览器应用转发给该网页,该网页下服务器发送对待渲染图像按目标特效滤镜进行完整渲染的特效渲染请求;6. The smartphone forwards the confirmation instruction to the webpage through the browser application, and the server under the webpage sends a special effect rendering request for fully rendering the image to be rendered according to the target special effect filter;

7、服务器调用预先配置在本地的OpenGL图像处理框架,按目标特效滤镜为待渲染图像进行完整渲染,得到第二渲染结果;7. The server calls the OpenGL image processing framework pre-configured locally, and performs complete rendering for the image to be rendered according to the target special effect filter to obtain the second rendering result;

具体的,可以调用OpenGL图像处理框架的Shader(着色器)按目标特效滤镜为待渲染图像的所选部分进行着色渲染。Specifically, a Shader (shader) of the OpenGL image processing framework may be called to perform shading and rendering for the selected portion of the image to be rendered according to the target special effect filter.

8、服务器将第二渲染结果返回至智能手机;8. The server returns the second rendering result to the smartphone;

9、智能手机将接收到的第二渲染结果通过显示屏展现给用户。9. The smartphone displays the received second rendering result to the user through a display screen.

即本实施例为网页端配置了同样基于OpenGL(Open Graphics Library,中文译名为开放图形库或者开放式图形库)作为底层渲染逻辑的WebGL(Web Graphics Library,可以理解为经常在网页端使用的JavaScript框架和OpenGL的结合,得以使其能够在网页端被调用实现OpenGL的处理效果)图像处理框架,为服务端直接配置了OpenGL图像处理框架,因此得以保持两者对相同图像的相同部分在使用相同的特效滤镜时得到相同的渲染效果,其两者实际上使用了一套用于进行着色渲染的Shader。That is, this embodiment configures a WebGL (Web Graphics Library, which can be understood as a combination of a JavaScript framework often used on web pages and OpenGL, so that it can be called on the web page to achieve OpenGL processing effects) image processing framework for the web page, which is also based on OpenGL (Open Graphics Library, Chinese translation is open graphics library or open graphics library) as the underlying rendering logic, and directly configures the OpenGL image processing framework for the server, so that the two can maintain the same rendering effect when using the same special effects filter for the same part of the same image. In fact, both use a set of Shaders for shading rendering.

除本实施例示出的WebGL搭配OpenGL的方案外,还可以其它类似的解决方案,例如直接针对像素点数据在颜色空间内以像素点方式进行特效渲染的处理框架,只需要保证网页端和服务器端在相同的颜色空间内进行即可。In addition to the WebGL combined with OpenGL solution shown in this embodiment, other similar solutions can also be used, such as a processing framework that directly performs special effects rendering in a pixel-by-pixel manner in a color space for pixel data, and it is only necessary to ensure that the web page and the server are in the same color space.

进一步参考图7,作为对上述各图所示方法的实现,本公开提供了一种特效渲染装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 7 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a special effects rendering device, which corresponds to the method embodiment shown in FIG. 2 , and can be specifically applied to various electronic devices.

如图7所示,本实施例的特效渲染装置700可以包括:目标特效确定单元701、网页端部分渲染单元702、服务端完整渲染单元703、完整渲染结果返回单元704。其中,目标特效确定单元701,被配置成根据经网页端传入的特效渲染请求,确定与待渲染图像对应的目标特效;网页端部分渲染单元702,被配置成调用配置在网页端的第一渲染器按目标特效对待渲染图像进行部分渲染,得到第一渲染结果;服务端完整渲染单元703,被配置成响应于第一渲染结果被特效渲染请求的发起端确认,控制配置在服务端的第二渲染器按目标特效对待渲染图像进行完整渲染,得到第二渲染结果;其中,第一渲染器和第二渲染器为相同渲染引擎与不同端的特性相适配后得到的产物;完整渲染结果返回单元704,被配置成控制服务端向发起端返回第二渲染结果。As shown in FIG7 , the special effect rendering device 700 of this embodiment may include: a target special effect determination unit 701, a web page side partial rendering unit 702, a server side complete rendering unit 703, and a complete rendering result returning unit 704. The target special effect determination unit 701 is configured to determine the target special effect corresponding to the image to be rendered according to the special effect rendering request transmitted via the web page side; the web page side partial rendering unit 702 is configured to call the first renderer configured on the web page side to partially render the image to be rendered according to the target special effect to obtain a first rendering result; the server side complete rendering unit 703 is configured to control the second renderer configured on the server side to completely render the image to be rendered according to the target special effect in response to the first rendering result being confirmed by the initiator of the special effect rendering request, to obtain a second rendering result; wherein the first renderer and the second renderer are products obtained by adapting the same rendering engine to the characteristics of different terminals; the complete rendering result returning unit 704 is configured to control the server side to return the second rendering result to the initiator.

在本实施例中,特效渲染装置700中:目标特效确定单元701、网页端部分渲染单元702、服务端完整渲染单元703、完整渲染结果返回单元704的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201-204的相关说明,在此不再赘述。In this embodiment, in the special effects rendering device 700, the specific processing of the target special effects determination unit 701, the partial rendering unit 702 on the web page side, the complete rendering unit 703 on the server side, and the complete rendering result return unit 704 and the technical effects brought about by them can be respectively referred to the relevant descriptions of steps 201-204 in the corresponding embodiment of Figure 2, and will not be repeated here.

在本实施例的一些可选的实现方式中,网页端部分渲染单元702可以被进一步配置成:In some optional implementations of this embodiment, the web page side partial rendering unit 702 may be further configured to:

响应于待渲染图像为包含人脸的全身照图像,确定全身照图像中的人脸部分;In response to the image to be rendered being a full-body image containing a human face, determining a human face portion in the full-body image;

调用配置在网页端的第一渲染器按目标特效对人脸部分进行特效渲染。The first renderer configured on the web page is called to perform special effects rendering on the face part according to the target special effects.

在本实施例的一些可选的实现方式中,网页端部分渲染单元702可以被进一步配置成:In some optional implementations of this embodiment, the web page side partial rendering unit 702 may be further configured to:

响应于待渲染图像为包含多个物体的风景图像,确定风景图像中存在物体数量最多的区域子图像;In response to the image to be rendered being a landscape image containing a plurality of objects, determining a region sub-image having the largest number of objects in the landscape image;

调用配置在网页端的第一渲染器按目标特效对区域子图像进行特效渲染。The first renderer configured on the web page is called to perform special effect rendering on the regional sub-image according to the target special effect.

在本实施例的一些可选的实现方式中,目标特效确定单元701可以被进一步配置成:In some optional implementations of this embodiment, the target special effect determination unit 701 may be further configured to:

接收发起端通过浏览器网页传入的特效渲染请求;Receive a special effects rendering request from the initiator via a browser web page;

根据特效渲染请求确定待渲染图像和特效滤镜选择信息;Determine the image to be rendered and the special effect filter selection information according to the special effect rendering request;

根据特效滤镜选择信息确定为待渲染图像施加特效的目标特效滤镜。A target special effect filter for applying special effects to the image to be rendered is determined according to the special effect filter selection information.

在本实施例的一些可选的实现方式中,特效渲染装置700还可以包括:In some optional implementations of this embodiment, the special effects rendering device 700 may further include:

发起路径确定单元,被配置成在控制配置在服务端的第二渲染器按目标特效对待渲染图像进行完整渲染之前,确定特效渲染请求的发起路径;An initiation path determination unit is configured to determine an initiation path of a special effect rendering request before controlling a second renderer configured on the server to completely render the image to be rendered according to the target special effect;

部分渲染结果返回单元,被配置成通过与发起路径对应的返回路径返回第一渲染结果。The partial rendering result returning unit is configured to return the first rendering result through a return path corresponding to the initiating path.

在本实施例的一些可选的实现方式中,特效渲染装置700还可以包括:In some optional implementations of this embodiment, the special effects rendering device 700 may further include:

可更新状态信息确定单元,被配置成响应于接收到针对第二渲染器的更新指示,确定第一渲染器的可更新状态信息;an updateable state information determining unit, configured to determine the updateable state information of the first renderer in response to receiving an update indication for the second renderer;

同步更新单元,被配置成响应于可更新状态信息为允许更新状态,根据更新指示同时对第二渲染器和第一渲染器进行相应的更新;其中,可更新状态信息基于网页端当前接收到的渲染任务的进行状态确定,包括与仍有渲染任务正在进行对应的不允许更新状态、与没有正在进行的渲染任务对应的允许更新状态。A synchronous update unit is configured to respond to the updateable status information being in an update-allowed status and to simultaneously update the second renderer and the first renderer according to the update indication; wherein the updateable status information is determined based on the progress status of the rendering task currently received by the web page, including an update-not-allowed status corresponding to a rendering task still in progress and an update-allowed status corresponding to no rendering task in progress.

在本实施例的一些可选的实现方式中,网页端部分渲染单元702可以被进一步配置成:In some optional implementations of this embodiment, the web page side partial rendering unit 702 may be further configured to:

调用配置在网页端的WebGL按目标特效对待渲染图像进行部分渲染;Call the WebGL configured on the web page to partially render the rendered image according to the target special effects;

对应的,服务端完整渲染单元703可以被进一步配置成:Correspondingly, the server-side complete rendering unit 703 may be further configured as follows:

控制配置在服务端的OpenGL按目标特效对待渲染图像进行完整渲染。Control the OpenGL configured on the server to fully render the image to be rendered according to the target special effects.

本实施例作为对应于上述方法实施例的装置实施例存在。This embodiment exists as an apparatus embodiment corresponding to the above method embodiment.

在接收到特效渲染请求时,本公开实施例提供的特效渲染装置首先调用配置在网页端的第一渲染器来对待渲染图像进行部分渲染,得到用于给发起端预览渲染效果的第一渲染结果,不至于给性能较差的网页端较大的渲染压力,而在发起端确认第一渲染结果的渲染结果后,就控制配置在服务端的第二渲染器来对待渲染图像进行完整渲染,进而借助服务端拥有的强大运算能力来高效率的完成完整渲染,而通过控制第一渲染器和第二渲染器基于相同的渲染引擎开发得到,则能够保证第二渲染结果的渲染效果与之前看到的第一渲染结果的渲染效果一致,增加了一次渲染的成功率、节省了运算资源、提升了运算资源的整体利用率。When receiving a special effects rendering request, the special effects rendering device provided by the embodiment of the present disclosure first calls the first renderer configured on the web page to partially render the image to be rendered, and obtains a first rendering result for previewing the rendering effect to the initiating end, so as not to put a large rendering pressure on the web page with poor performance. After the initiating end confirms the rendering result of the first rendering result, it controls the second renderer configured on the server end to completely render the image to be rendered, and then uses the powerful computing power of the server end to efficiently complete the complete rendering. By controlling the first renderer and the second renderer to be developed based on the same rendering engine, it can ensure that the rendering effect of the second rendering result is consistent with the rendering effect of the first rendering result seen before, thereby increasing the success rate of a rendering, saving computing resources, and improving the overall utilization of computing resources.

根据本公开的实施例,本公开还提供了一种电子设备,该电子设备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,该指令被至少一个处理器执行,以使至少一个处理器执行时能够实现上述任意实施例所描述的特效渲染方法。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the special effects rendering method described in any of the above embodiments can be implemented when the at least one processor executes.

根据本公开的实施例,本公开还提供了一种可读存储介质,该可读存储介质存储有计算机指令,该计算机指令用于使计算机执行时能够实现上述任意实施例所描述的特效渲染方法。According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the special effects rendering method described in any of the above embodiments when executed.

本公开实施例提供了一种计算机程序产品,该计算机程序在被处理器执行时能够实现上述任意实施例所描述的特效渲染方法。The embodiments of the present disclosure provide a computer program product, which, when executed by a processor, can implement the special effects rendering method described in any of the above embodiments.

图6示出了可以用来实施本公开的实施例的示例电子设备600的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG6 shows a schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.

如图6所示,设备600包括计算单元601,其可以根据存储在只读存储器(ROM)602中的计算机程序或者从存储单元608加载到随机访问存储器(RAM)603中的计算机程序,来执行各种适当的动作和处理。在RAM 603中,还可存储设备600操作所需的各种程序和数据。计算单元601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in Figure 6, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to the bus 604.

设备600中的多个部件连接至I/O接口605,包括:输入单元606,例如键盘、鼠标等;输出单元607,例如各种类型的显示器、扬声器等;存储单元608,例如磁盘、光盘等;以及通信单元609,例如网卡、调制解调器、无线通信收发机等。通信单元609允许设备600通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元601可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元601的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元601执行上文所描述的各个方法和处理,例如特效渲染方法。例如,在一些实施例中,特效渲染方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元608。在一些实施例中,计算机程序的部分或者全部可以经由ROM 602和/或通信单元609而被载入和/或安装到设备600上。当计算机程序加载到RAM 603并由计算单元601执行时,可以执行上文描述的特效渲染方法的一个或多个步骤。备选地,在其他实施例中,计算单元601可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行特效渲染方法。The computing unit 601 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as special effects rendering methods. For example, in some embodiments, the special effects rendering method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed on the device 600 via ROM 602 and/or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the special effects rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the special effects rendering method in any other appropriate manner (e.g., by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决传统物理主机与虚拟专用服务器(VPS,Virtual Private Server)服务中存在的管理难度大,业务扩展性弱的缺陷。A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

在接收到特效渲染请求时,本公开实施例首先调用配置在网页端的第一渲染器来对待渲染图像进行部分渲染,得到用于给发起端预览渲染效果的第一渲染结果,不至于给性能较差的网页端较大的渲染压力,而在发起端确认第一渲染结果的渲染结果后,就控制配置在服务端的第二渲染器来对待渲染图像进行完整渲染,进而借助服务端拥有的强大运算能力来高效率的完成完整渲染,而通过控制第一渲染器和第二渲染器基于相同的渲染引擎开发得到,则能够保证第二渲染结果的渲染效果与之前看到的第一渲染结果的渲染效果一致,增加了一次渲染的成功率、节省了运算资源、提升了运算资源的整体利用率。When receiving a special effects rendering request, the disclosed embodiment first calls the first renderer configured on the web page to partially render the image to be rendered, and obtains a first rendering result for previewing the rendering effect for the initiating end, so as not to put a large rendering pressure on the web page with poor performance. After the initiating end confirms the rendering result of the first rendering result, it controls the second renderer configured on the server to completely render the image to be rendered, and then uses the powerful computing power of the server to efficiently complete the complete rendering. By controlling the first renderer and the second renderer to be developed based on the same rendering engine, it can ensure that the rendering effect of the second rendering result is consistent with the rendering effect of the first rendering result seen before, thereby increasing the success rate of a rendering, saving computing resources, and improving the overall utilization of computing resources.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (17)

CN202111097131.2A2021-09-182021-09-18 Special effects rendering method, device, equipment, storage medium and computer program productActiveCN113836455B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111097131.2ACN113836455B (en)2021-09-182021-09-18 Special effects rendering method, device, equipment, storage medium and computer program product

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111097131.2ACN113836455B (en)2021-09-182021-09-18 Special effects rendering method, device, equipment, storage medium and computer program product

Publications (2)

Publication NumberPublication Date
CN113836455A CN113836455A (en)2021-12-24
CN113836455Btrue CN113836455B (en)2024-08-02

Family

ID=78959822

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111097131.2AActiveCN113836455B (en)2021-09-182021-09-18 Special effects rendering method, device, equipment, storage medium and computer program product

Country Status (1)

CountryLink
CN (1)CN113836455B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114841854B (en)*2022-05-182025-09-12北京字跳网络技术有限公司 Image processing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111339462A (en)*2020-02-182020-06-26北京百度网讯科技有限公司Component rendering method, device, server, terminal and medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8732571B2 (en)*2011-03-312014-05-20Google Inc.Methods and systems for generating and displaying a preview image of a content area
US8245125B1 (en)*2011-11-302012-08-14Google Inc.Hybrid rendering for webpages
CN106462582B (en)*2014-06-262020-05-15谷歌有限责任公司Batch optimized rendering and fetching architecture
US10082937B2 (en)*2015-09-112018-09-25International Business Machines CorporationIntelligent rendering of webpages
CN110020329B (en)*2017-07-132021-07-30北京京东尚科信息技术有限公司Method, device and system for generating webpage
US10747828B2 (en)*2018-03-272020-08-18Capital One Services, LlcSystems and methods for single page application server side renderer
US10459609B2 (en)*2018-04-032019-10-29Palantir Technologies Inc.Multi-stage data page rendering
CN112749358B (en)*2021-01-132024-12-06中国工商银行股份有限公司 Page rendering method and device, electronic device and storage medium
CN112860944B (en)*2021-02-052023-07-25北京百度网讯科技有限公司Video rendering method, apparatus, device, storage medium, and computer program product
CN112882711B (en)*2021-03-102024-07-19百度在线网络技术(北京)有限公司Rendering method, device, equipment and storage medium
CN113238754A (en)*2021-06-012021-08-10中国联合网络通信集团有限公司Server rendering method and device, server and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111339462A (en)*2020-02-182020-06-26北京百度网讯科技有限公司Component rendering method, device, server, terminal and medium

Also Published As

Publication numberPublication date
CN113836455A (en)2021-12-24

Similar Documents

PublicationPublication DateTitle
CN113438355B (en) Communication method, device, equipment and storage medium based on cloud mobile phone
CN113419865B (en)Cloud resource processing method, related device and computer program product
CN113487524B (en)Image format conversion method, apparatus, device, storage medium, and program product
CN113784049B (en)Camera calling method of android system virtual machine, electronic equipment and storage medium
CN114793285B (en) Information display method, device, equipment and medium
CN114035865B (en)Method, device and equipment for starting small program and storage medium
CN113453073B (en) Image rendering method, device, electronic equipment and storage medium
CN113691602B (en) Business processing method, system, device, equipment and medium based on cloud phone
CN114090118B (en)Method, device, equipment and storage medium for starting applet
CN113660504B (en)Message display method, device, electronic equipment and storage medium
CN113724398A (en)Augmented reality method, apparatus, device and storage medium
CN113836455B (en) Special effects rendering method, device, equipment, storage medium and computer program product
US11195248B2 (en)Method and apparatus for processing pixel data of a video frame
CN114819084B (en)Model reasoning method, device, equipment and storage medium
CN113434551B (en) Data processing method, apparatus, device and computer storage medium
CN115510508A (en)Page information protection method and device and electronic equipment
CN111913711B (en) Video rendering method and device
CN114095758B (en)Cloud image intercepting method and related device
CN113724355B (en) Method, device and electronic device for drawing charts for video
CN116320223A (en)Photographing method, photographing device, photographing equipment and storage medium
CN113887435A (en)Face image processing method, device, equipment, storage medium and program product
CN114051046B (en)Cloud data issuing method, related device and computer program product
CN114786051B (en) A video rendering method, device, electronic equipment and storage medium
CN113744414B (en)Image processing method, device, equipment and storage medium
CN113407329B (en)Task execution method, device, equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp