CN113836455A - Special effect rendering method, device, equipment, storage medium and computer program product - Google Patents

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

Info

Publication number
CN113836455A
CN113836455A CN202111097131.2A CN202111097131A CN113836455A CN 113836455 A CN113836455 A CN 113836455A CN 202111097131 A CN202111097131 A CN 202111097131A CN 113836455 A CN113836455 A CN 113836455A
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.)
Pending
Application number
CN202111097131.2A
Other languages
Chinese (zh)
Inventor
常炎隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111097131.2A priority Critical patent/CN113836455A/en
Publication of CN113836455A publication Critical patent/CN113836455A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

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 cloud. The method comprises the following steps: determining a target special effect corresponding to an image to be rendered according to a special effect rendering request transmitted from a webpage end; calling a first renderer configured at a webpage end to partially render an image to be rendered according to a target special effect to obtain a first rendering result; responding to the confirmation of the first rendering result by the initiating end of the special effect rendering request, controlling a second renderer configured at the server end to perform complete rendering on an 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 same rendering engine is matched with the characteristics of different ends; and controlling the server to return the second rendering result to the initiating end. The method increases the success rate of one-time rendering, saves the operation resources and improves the overall utilization rate of the operation resources.

Description

Special effect rendering method, device, equipment, storage medium and computer program product
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for rendering a special effect, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the development of special effects technology, more and more advanced special effects gradually enter the visual field of common users, so that the sense of image or video content is improved by using the advanced special effects.
The types of special effects are five-flower eight, even the same type of special effects are subdivided into a plurality of subclasses due to different details, and it is very important to consider that a large amount of calculation resources are consumed for carrying out one-time special effect rendering, and guarantee that the final rendering result is consistent with the expected or previously selected special effect by a user.
Disclosure of Invention
The embodiment of 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.
In a first aspect, an embodiment of the present disclosure provides a special effect rendering method, including: determining a target special effect corresponding to an image to be rendered according to a special effect rendering request transmitted from a webpage end; calling a first renderer configured at a webpage end to partially render an image to be rendered according to a target special effect to obtain a first rendering result; in response to the confirmation of the first rendering result by the initiating end of the special effect rendering request, controlling a second renderer configured at the server end to perform complete rendering on an image to be rendered according to the target special effect to obtain a second rendering result; the first renderer and the second renderer are products obtained after the same rendering engine is matched with the characteristics of different ends; and controlling the server to return the second rendering result to the initiating end.
In a second aspect, an embodiment of the present disclosure provides a special effect rendering apparatus, including: the target special effect determining unit is configured to determine a target special effect corresponding to the image to be rendered according to a special effect rendering request transmitted through the webpage end; the webpage end part rendering unit is configured to call a first renderer configured at a webpage end to perform partial rendering on an image to be rendered according to a target special effect to obtain a first rendering result; the server-side complete rendering unit is configured to respond to the confirmation that the first rendering result is confirmed by the initiating end of the special effect rendering request, and control a second renderer configured at the server to perform complete rendering on an image to be rendered according to the target special effect to obtain a second rendering result; the first renderer and the second renderer are products obtained after the same rendering engine is matched with the characteristics of different ends; and the complete rendering result returning unit is configured to control the server to return the second rendering result to the initiating terminal.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of special effect rendering as described in any implementation form of the first aspect when executed by the at least one processor.
In a fourth aspect, the disclosed embodiments provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement the special effects rendering method as described in any implementation manner of the first aspect when executed.
In a fifth aspect, the present disclosure provides a computer program product including a computer program, which when executed by a processor is capable of implementing the special effect rendering method as described in any implementation manner of the first aspect.
When a special effect rendering request is received, the method calls a first renderer configured at a webpage end to perform partial rendering on an image to be rendered to obtain a first rendering result for previewing a rendering effect for an initiating end so as not to exert larger rendering pressure on the webpage end with poor performance, after the initiating end confirms the rendering result of the first rendering result, the initiating end controls a second renderer configured at the service end to completely render the image to be rendered, and then complete rendering is efficiently completed by means of strong computing power possessed by the server, and the rendering is developed by controlling the first renderer and the second renderer based on the same rendering engine, the rendering effect of the second rendering result is consistent with the previously seen rendering effect of the first rendering result, the success rate of one-time rendering is increased, the operation resources are saved, and the overall utilization rate of the operation resources is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture to which the present disclosure may be applied;
fig. 2 is a flowchart of a special effect rendering method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for partially rendering a portrait according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for partially rendering a landscape image according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of a method for determining a target special effect according to an embodiment of the present disclosure;
fig. 6 is a timing diagram illustrating a special effect rendering method performed by each execution subject according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a special effect rendering apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device adapted to execute a special effect rendering method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
Fig. 1 illustrates 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.
As shown in fig. 1, the system architecture 100 may include user terminals 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the user terminals 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the user terminals 101, 102, 103 to interact with the server 105 over the network 104 to receive or send messages or the like. The user terminals 101, 102, 103 and the server 105 may be installed with various applications for implementing information communication between the two, such as a special effect rendering application, an image resource transmission application, an instant messaging application, and the like.
The user terminals 101, 102, 103 and the server 105 may be hardware or software. When the user terminals 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like; when the user terminals 101, 102, 103 are software, they may be installed in the electronic devices listed above, and they may be implemented as a plurality of software or software modules, or implemented as a single software or software module, and are not limited in this respect. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server; when the server is software, the server may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not limited herein.
The user terminals 101, 102, and 103 may provide various services through various built-in applications, and taking a special effect rendering application that may provide a special effect rendering service for the user together with the server 105 as an example, the user terminals 101, 102, and 103 may achieve the following effects when running the special effect rendering application: firstly, receiving a special effect rendering request transmitted by a user through a browser application installed on an operating system; then, determining a target special effect corresponding to the image to be rendered according to the special effect rendering request; next, calling a first renderer configured on the browser application to perform partial rendering on an image to be rendered according to the target special effect to obtain a first rendering result; next, presenting a first rendering result to a user who initiates the special effect rendering request, and expecting to receive indication information whether the user confirms or not, wherein the indication information is transmitted by 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 issued to the server 105, so that the server 105 invokes a second renderer configured locally to perform complete rendering on the image to be rendered according to the target special effect, and returns a second rendering result obtained by rendering to the user terminals 101, 102, and 103, wherein the first renderer and the second renderer are products obtained after the same rendering engine is adapted to the characteristics of different terminals.
The special effect rendering methods provided in the subsequent embodiments of the present disclosure are generally executed by the user terminals 101, 102, and 103 directly facing the user, and accordingly, the special effect rendering apparatuses are also generally disposed in the user terminals 101, 102, and 103.
It should be understood that the number of user terminals, networks and servers in fig. 1 is merely illustrative. There may be any number of user terminals, networks, and servers, as desired for an implementation.
Referring to fig. 2, fig. 2 is a flowchart of a special effect rendering method according to an embodiment of the disclosure, where the process 200 includes the following steps:
step 201: determining a target special effect corresponding to an image to be rendered according to a special effect rendering request transmitted from a webpage end;
this step is intended to determine an image to be rendered and a selected rendering manner as a rendering target from an incoming special effect rendering request by an execution subject of the special effect rendering method (e.g., user terminals 101, 102, 103 shown in fig. 1). The special effect rendering request is transmitted by a user through a browser webpage, and the webpage is a webpage which is opened in a browser application installed in the execution main body operating system and provides special effect rendering service.
The special effect rendering request at least comprises an image to be rendered and a target special effect, wherein the image to be rendered exists as a rendering target, and the target special effect is a special effect parameter indicating which special effect rendering is performed on the rendering target by a user, and can be represented as a certain special effect plug-in, a special effect filter or a certain using mode of a certain special effect filter. The image to be rendered may be obtained by selecting a local file by a user or temporarily calling a camera to capture the image and then uploaded to the web page, or a network address pointing to a certain image may be directly input to the web page, which is not specifically limited herein.
Step 202: calling a first renderer configured at a webpage end to partially render an image to be rendered according to a target special effect to obtain a first rendering result;
on the basis of step 201, the execution subject calls a first renderer configured at the web page end to partially render an image to be rendered according to a target special effect, so as to obtain a first rendering result.
The first renderer is configured in the browser application of the execution body and can be called by a webpage providing a special effect rendering service, and partial rendering is performed on an image to be rendered according to a target special effect, so that a user can see a rendering effect of the selected target special effect under the condition that rendering time is reduced as much as possible, and the user can reselect and re-render the image with less cost when the rendering effect is not satisfactory.
For this purpose, it is also important to render which part of the image to be rendered, since it is desirable to select the part that, after rendering, is as intuitive as possible for the user to see the rendering effect, otherwise it is useless to render even a part. When a part to be rendered is selected, factors such as the image content type, the size, the number of objects appearing in the image, the position relation and the like of the image to be rendered can be combined for selection, so that a representative part image is selected as much as possible for rendering in the step.
Step 203: in response to the confirmation of the first rendering result by the initiating end of the special effect rendering request, controlling a second renderer configured at the server end to perform complete rendering on an image to be rendered according to the target special effect to obtain a second rendering result;
on the basis of step 202, in this step, when the first rendering result is confirmed by the initiating end of the special effect rendering request, the execution main body controls the server to invoke the second renderer to perform complete rendering on the image to be rendered according to the target special effect, that is, complete rendering of the image to be rendered is completed as soon as possible by means of the strong rendering performance of the server, so as to obtain a second rendering result.
Specifically, after the execution main body obtains the first rendering result, an initiating path of the special effect rendering request may be determined, and then the first rendering result is returned through a return path corresponding to the initiating path, so that the first rendering result is displayed to a user initiating the rendering request, so as to receive indication information indicating whether the returned indication satisfies the currently selected special effect rendering effect, and then different subsequent branches are selected according to the indication information. If the indication information indicates that the rendering effect shown by the first rendering result is not satisfied, prompt information for requesting the user to reselect a new target special effect may be returned.
Specifically, the execution main body issues a special effect rendering instruction that also includes an image to be rendered and a target special effect to a server (for example, the server 105 shown in fig. 1), so that the server invokes a second renderer configured by the server according to the received special effect rendering instruction to perform complete special effect rendering on the image to be rendered according to the target special effect, thereby obtaining the second rendering result. Or issuing a special effect rendering instruction which does not contain the image to be rendered and the target special effect but contains the index information to the server, so that the server can obtain the image to be rendered and the target special effect at the position indicated by the index information according to the index information contained in the instruction.
It should be noted that, in the present disclosure, the first renderer is configured at the web page side of the execution main body (i.e., configured on the browser application), and the second renderer is configured at the server side, except for different configuration positions, the first renderer and the second renderer have the same bottom-layer rendering engine (which may also be referred to as a rendering algorithm and a rendering frame), and the same rendering engine is adapted to the difference in the operational performance between the web page side and the server side to obtain a product. 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 on the same image content, so that the second rendering result is actually represented as a full version of the first rendering result.
Step 204: and controlling the server to return the second rendering result to the initiating end.
On the basis of step 203, this step is intended to control the server to return the second rendering result to the initiating end by the executing entity, so that the initiating end (or initiating user) actually initiating the special effect rendering request finally obtains the desired complete rendering result.
When a special effect rendering request is received, the special effect rendering method provided by the embodiment of the disclosure calls a first renderer configured at a webpage end to perform partial rendering on an image to be rendered to obtain a first rendering result for previewing a rendering effect for an initiating end without giving a large rendering pressure to the webpage end with poor performance, and after the initiating end confirms the rendering result of the first rendering result, controls a second renderer configured at a server end to perform complete rendering on the image to be rendered to efficiently complete the complete rendering by virtue of strong operational capability of the server end, and controls the first renderer and the second renderer to be developed based on the same rendering engine, so that the rendering effect of the second rendering result can be ensured to be consistent with the previously seen rendering effect of the first rendering result, the success rate of one-time rendering is increased, and operational resources are saved, The overall utilization rate of the operation resources is improved.
Aiming at how to reasonably determine the partial images to be rendered in the complete images to be rendered, the disclosure also provides different implementation schemes respectively for two common types of images to be rendered through fig. 3 and fig. 4, so as to render the partial image content with a special effect as representative as possible. FIG. 3 illustrates a partial rendering scheme for a portrait, wherein the flow 300 includes the steps of:
step 301: responding to the image to be rendered as a whole-body photographic image containing a human face, and determining a human face part in the whole-body photographic image;
step 302: and calling a first renderer configured at the webpage end to render the human face part according to the target special effect.
For the special effect rendering requirement of the human image class, considering that the viewers usually pay more attention to face information, and the face is the most eyeball part of the viewers, the embodiment takes the face part in the whole-body-shot image as the object for performing partial rendering, and combines the proportion of the face in the whole-body shot, so that the rendering time consumption can be effectively reduced while the representativeness is satisfied.
Of course, in some special scenes, the emphasis of the viewer may be changed or the rendering emphasis is not on the face, and when the guidance information exists, the object to be partially rendered should be flexibly adjusted according to the guidance information.
FIG. 4 illustrates a partial rendering scheme for a landscape, wherein the flow 400 includes the steps of:
step 401: determining that the regional sub-image with the largest number of objects exists in the landscape image in response to the image to be rendered being the landscape image containing a plurality of objects;
step 402: and calling a first renderer configured at the webpage end to render the area sub-images according to the target special effect.
Different from the portrait with a prominent key point, the landscape image often contains a plurality of objects, and it is difficult to determine which object is more suitable to be used as a representative object to render only the representative object, so in order to ensure that a partial rendering result can provide more rendering effect feedback for a user as much as possible, the regional sub-image with the largest number of objects in the landscape image is determined as a partial rendering object, so that the rendering effect covers as many objects as possible, the user can see the rendering effect on different objects, and the effectiveness of the first rendering result is ensured.
Images to be rendered, which contain other types of image content, may be adaptively adjusted according to the guiding concept of finding representative parts embodied in the above discussion, which is not listed here.
If there is explicit rendering emphasis indication information accompanying the special effect rendering request, determining a part related to rendering emphasis in the image to be rendered according to the rendering emphasis indication information, and taking the part as a rendering object to obtain a first rendering result. If the directly given rendering key point indication information cannot be acquired, statistics and analysis can be performed according to the historical special effect rendering request containing the rendering key point indication information, so that the probability that each part in the image belongs to the rendering key point is predictively determined according to the analysis result, and the partial image with higher probability is selected for rendering. Specifically, the tool for performing statistics and analysis may use a linear or non-linear classifier, a deep learning algorithm, and the like, and is not limited herein.
Since the target special effect can be expressed in various forms, to enhance the understanding of this part of the scheme, this embodiment also specifically takes a special effect filter as an example, and a specific implementation scheme for determining the target special effect is given in conjunction with fig. 5, where the process 500 includes the following steps:
step 501: receiving a special effect rendering request transmitted by an initiating terminal through a browser webpage;
step 502: determining an image to be rendered and special effect filter selection information according to the special effect rendering request;
step 503: and determining a target special effect filter applying a special effect to the image to be rendered according to the special effect filter selection information.
That is, in this embodiment, the special effect rendering request specifically includes the image to be rendered and the special effect filter selection information, and the special effect filter selection information may be expressed as a number, a code, a name, and the like of a certain special effect filter or a certain type of special effect filter, so that the execution main body can accurately apply a target special effect filter of a target special effect to the image to be rendered according to the special effect filter selection information.
The target special effects of other expressions can also be adaptively adjusted according to the logic of the embodiment.
As can be seen from the content described in any of the embodiments, the first renderer at the web page side and the second renderer at the server side cooperate with each other to ensure that the second rendering result and the first rendering result show the same rendering effect, so that when an update instruction for any one of the first renderer and the second renderer is received, the same update needs to be performed on the other renderer at the other matched end, so as to ensure that the same rendering effect can be maintained before and after the update. Taking the example of receiving an update indication for the second renderer, the following is given for one implementation including, but not limited to:
in response to receiving an update indication for the second renderer, determining updatable state information for the first renderer;
in this embodiment, the updatable status information is determined based on the progress status of the rendering task currently received by the web page, and includes a non-update permitted status corresponding to the rendering task still being performed, and an update permitted status corresponding to the rendering task not being performed.
And responding to the update permission state of the updatable state information, correspondingly updating the second renderer and the first renderer according to the update indication, and otherwise, confirming that the first renderer cannot be updated currently and waiting until the updatable state information is changed into the update permission state.
That is, the present embodiment additionally introduces a judgment on the timing of allowing the synchronous update, so as to avoid the problem of different rendering effects caused by asynchronous update.
In order to deepen understanding, the disclosure also provides a specific implementation scheme by combining a specific application scenario:
1. a user transmits a special effect rendering request to a browser webpage providing special effect rendering service through a smart phone held by the user;
2. calling a WebGL image processing frame configured in a browser application based on a webpage operated by the browser application, and performing partial rendering on a selected part of an image to be rendered according to a target special effect filter to obtain a first rendering result;
specifically, a Shader of the WebGL image processing framework may be invoked to perform a partial shading rendering of the selected portion of the image to be rendered according to the target special effect filter.
3. The webpage displays the first rendering result to a user through a display screen of the smart phone; 4. confirming whether the seen first rendering result meets the expectation by the user;
5.1, when the user considers that the rendering effect shown by the first rendering result meets the expectation, returning a confirmation instruction to the smart phone;
5.2, when the user considers that the rendering effect shown by the first rendering result does not meet the expectation, returning a return instruction to the smart phone, and skipping to the step 1 again to resend the special effect rendering request containing the new target special effect information;
6. the smart phone forwards the confirmation instruction to the webpage through browser application, and the server under the webpage sends a special effect rendering request for completely rendering the image to be rendered according to the target special effect filter;
7. the server calls an OpenGL image processing framework which is pre-configured in the local, and complete rendering is carried out on the image to be rendered according to the target special effect filter, so that a second rendering result is obtained;
specifically, a Shader of the OpenGL image processing framework may be invoked to render the selected portion of the image to be rendered in a color based on the target special effect filter.
8. The server returns the second rendering result to the smart phone;
9. and the smart phone displays the received second rendering result to the user through a display screen.
That is, in this embodiment, a Web Graphics Library (Web Graphics Library, which may be understood as a combination of a JavaScript frame and OpenGL often used at a Web page end to enable the Web page end to be called to achieve a processing effect of OpenGL) image processing frame is configured at a Web page end, and an OpenGL image processing frame is directly configured at a server end, so that the two frames can keep the same part of the same image to obtain the same rendering effect when using the same special effect filter, and both frames actually use a set of shaders for performing rendering.
In addition to the scheme of matching WebGL with OpenGL shown in this embodiment, other similar solutions may also be used, for example, a processing framework for performing special effect rendering directly on pixel point data in a color space in a pixel point manner only needs to ensure that the web page side and the server side are performed in the same color space.
With further reference to fig. 7, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a special effect rendering apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which may be applied in various electronic devices.
As shown in fig. 7, the special effect rendering apparatus 700 of the present embodiment may include: a target special effect determination unit 701, a webpage end part rendering unit 702, a server complete rendering unit 703 and a complete rendering result returning unit 704. The target special effect determining unit 701 is configured to determine a target special effect corresponding to an image to be rendered according to a special effect rendering request transmitted through a webpage end; a webpage end part rendering unit 702, configured to invoke a first renderer configured at a webpage end to perform partial rendering on an image to be rendered according to a target special effect, so as to obtain a first rendering result; the server-side complete rendering unit 703 is configured to, in response to the first rendering result being confirmed by the initiating side of the special effect rendering request, control a second renderer configured at the server to perform complete rendering on the image to be rendered according to the target special effect, so as to obtain a second rendering result; the first renderer and the second renderer are products obtained after the same rendering engine is matched with the characteristics of different ends; and a complete rendering result returning unit 704 configured to control the server to return the second rendering result to the initiator.
In the present embodiment, in the special effect rendering apparatus 700: the specific processing of the target special effect determining unit 701, the web page end portion rendering unit 702, the server side complete rendering unit 703, and the complete rendering result returning unit 704 and the technical effects thereof can refer to the related descriptions of step 201 and step 204 in the corresponding embodiment of fig. 2, and are not described herein again.
In some optional implementations of the present embodiment, the web page end portion rendering unit 702 may be further configured to:
responding to the image to be rendered as a whole-body photographic image containing a human face, and determining a human face part in the whole-body photographic image;
and calling a first renderer configured at the webpage end to render the human face part according to the target special effect.
In some optional implementations of the present embodiment, the web page end portion rendering unit 702 may be further configured to:
determining that the regional sub-image with the largest number of objects exists in the landscape image in response to the image to be rendered being the landscape image containing a plurality of objects;
and calling a first renderer configured at the webpage end to render the area sub-images according to the target special effect.
In some optional implementations of this embodiment, the target special effect determining unit 701 may be further configured to:
receiving a special effect rendering request transmitted by an initiating terminal through a browser webpage;
determining an image to be rendered and special effect filter selection information according to the special effect rendering request;
and determining a target special effect filter applying a special effect to the image to be rendered according to the special effect filter selection information.
In some optional implementations of this embodiment, the special effect rendering apparatus 700 may further include:
the initiating path determining unit is configured to determine the initiating path of the special effect rendering request before controlling a second renderer configured at the server to completely render the image to be rendered according to the target special effect;
a partial rendering result returning unit configured to return the first rendering result through a return path corresponding to the originating path.
In some optional implementations of this embodiment, the special effect rendering apparatus 700 may further include:
an updatable state information determination unit configured to determine updatable state information of the first renderer in response to receiving an update indication for the second renderer;
the synchronous updating unit is configured to respond to the state information which can be updated and to allow the updating state, and the second renderer and the first renderer are correspondingly updated at the same time according to the updating indication; the updatable state information is determined based on the proceeding state of the rendering task currently received by the webpage end, and comprises a non-updating-allowed state corresponding to the rendering task still in progress and an updating-allowed state corresponding to the rendering task not in progress.
In some optional implementations of the present embodiment, the web page end portion rendering unit 702 may be further configured to:
calling WebGL configured on a webpage end to perform partial rendering on an image to be rendered according to a target special effect;
correspondingly, the server-side complete rendering unit 703 may be further configured to:
and controlling OpenGL configured on the server to completely render the image to be rendered according to the target special effect.
This embodiment exists as an apparatus embodiment corresponding to the method embodiment described above.
When a special effect rendering request is received, the special effect rendering device provided by the embodiment of the disclosure calls a first renderer configured at a webpage end to perform partial rendering on an image to be rendered to obtain a first rendering result for previewing a rendering effect for an initiating end without giving a large rendering pressure to the webpage end with poor performance, and after the initiating end confirms the rendering result of the first rendering result, a second renderer configured at a server end is controlled to perform complete rendering on the image to be rendered, so that complete rendering is efficiently completed by means of strong operational capability of the server end, and the first renderer and the second renderer are controlled to be developed based on the same rendering engine, so that the rendering effect of the second rendering result is consistent with the previously seen rendering effect of the first rendering result, the success rate of one-time rendering is increased, and operational resources are saved, The overall utilization rate of the operation resources is improved.
According to an embodiment of the present disclosure, the present disclosure also provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to implement the special effect rendering method described in any of the above embodiments when executed.
According to an embodiment of the present disclosure, a readable storage medium is further provided, where computer instructions are stored, and the computer instructions are configured to enable a computer to implement the special effect rendering method described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product, which when executed by a processor is capable of implementing the special effect rendering method described in any of the above embodiments.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may 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 meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 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 calculation 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 bus 604.
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, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having 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, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 executes the respective methods and processes described above, such as the special effect rendering method. For example, in some embodiments, the special effects rendering method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the 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 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods 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, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, 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 may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in the conventional physical host and Virtual Private Server (VPS) service.
When receiving a special effect rendering request, the embodiment of the disclosure first calls a first renderer configured at a webpage end to perform partial rendering on an image to be rendered to obtain a first rendering result for previewing a rendering effect for an initiating end, so as not to apply a larger rendering pressure to the webpage end with poor performance, after the initiating end confirms the rendering result of the first rendering result, the initiating end controls a second renderer configured at the service end to completely render the image to be rendered, and then complete rendering is efficiently completed by means of strong computing power possessed by the server, and the rendering is developed by controlling the first renderer and the second renderer based on the same rendering engine, the rendering effect of the second rendering result is consistent with the previously seen rendering effect of the first rendering result, the success rate of one-time rendering is increased, the operation resources are saved, and the overall utilization rate of the operation resources is improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A special effects rendering method, comprising:
determining a target special effect corresponding to an image to be rendered according to a special effect rendering request transmitted from a webpage end;
calling a first renderer configured at a webpage end to perform partial rendering on the image to be rendered according to the target special effect to obtain a first rendering result;
in response to the first rendering result being confirmed by the initiating end of the special effect rendering request, controlling a second renderer configured at a server to perform complete rendering on the image to be rendered according to the target special effect to obtain a second rendering result; the first renderer and the second renderer are products obtained after the same rendering engine is matched with the characteristics of different ends;
and controlling the server to return the second rendering result to the initiating terminal.
2. The method of claim 1, wherein the invoking of a first renderer configured at a webpage end to partially render the image to be rendered according to the target special effect comprises:
responding to the image to be rendered as a whole-body image containing a human face, and determining a human face part in the whole-body image;
and calling a first renderer configured at a webpage end to render the face part according to the target special effect.
3. The method of claim 1, wherein the invoking of a first renderer configured at a webpage end to partially render the image to be rendered according to the target special effect comprises:
in response to the image to be rendered being a landscape image containing a plurality of objects, determining that the regional sub-image with the largest number of objects exists in the landscape image;
and calling a first renderer configured at the webpage end to render the area sub-images according to the target special effect.
4. The method of claim 1, wherein the determining a target special effect corresponding to the image to be rendered according to the special effect rendering request transmitted from the webpage end comprises:
receiving a special effect rendering request transmitted by the initiating terminal through a browser webpage;
determining the image to be rendered and the selection information of the special effect filter according to the special effect rendering request;
and determining a target special effect filter applying a special effect to the image to be rendered according to the special effect filter selection information.
5. The method according to claim 1, wherein before controlling a second renderer configured at a server to completely render the image to be rendered according to the target special effect, the method further comprises:
determining an initiating path of the special effect rendering request;
and returning the first rendering result through a return path corresponding to the initiating path.
6. The method of claim 1, further comprising:
in response to receiving an update indication for the second renderer, determining updatable state information for the first renderer;
in response to the updatable state information being a state allowing updating, the second renderer and the first renderer are updated correspondingly at the same time according to the updating indication; the updatable state information is determined based on the progress state of the rendering task currently received by the webpage end, and comprises a non-updating permission state corresponding to the rendering task still being performed and an updating permission state corresponding to the rendering task not being performed.
7. The method according to any one of claims 1 to 6, wherein the invoking of a first renderer configured at a webpage end to partially render the image to be rendered according to the target special effect comprises:
calling WebGL configured on a webpage end to partially render the image to be rendered according to the target special effect;
correspondingly, the controlling a second renderer configured at the server to completely render the image to be rendered according to the target special effect includes:
and controlling OpenGL configured on a server to completely render the image to be rendered according to the target special effect.
8. A special effects rendering apparatus comprising:
the target special effect determining unit is configured to determine a target special effect corresponding to the image to be rendered according to a special effect rendering request transmitted through the webpage end;
the webpage end part rendering unit is configured to call a first renderer configured at a webpage end to perform partial rendering on the image to be rendered according to the target special effect to obtain a first rendering result;
the server-side complete rendering unit is configured to respond to the confirmation of the first rendering result by the initiating side of the special effect rendering request, and control a second renderer configured at the server side to perform complete rendering on the image to be rendered according to the target special effect to obtain a second rendering result; the first renderer and the second renderer are products obtained after the same rendering engine is matched with the characteristics of different ends;
a complete rendering result returning unit configured to control the server to return the second rendering result to the initiator.
9. The apparatus of claim 8, wherein the web page end portion rendering unit is further configured to:
responding to the image to be rendered as a whole-body image containing a human face, and determining a human face part in the whole-body image;
and calling a first renderer configured at a webpage end to render the face part according to the target special effect.
10. The apparatus of claim 8, wherein the web page end portion rendering unit is further configured to:
in response to the image to be rendered being a landscape image containing a plurality of objects, determining that the regional sub-image with the largest number of objects exists in the landscape image;
and calling a first renderer configured at the webpage end to render the area sub-images according to the target special effect.
11. The apparatus of claim 8, wherein the target special effects determination unit is further configured to:
receiving a special effect rendering request transmitted by the initiating terminal through a browser webpage;
determining the image to be rendered and the selection information of the special effect filter according to the special effect rendering request;
and determining a target special effect filter applying a special effect to the image to be rendered according to the special effect filter selection information.
12. The apparatus of claim 8, further comprising:
the initiating path determining unit is configured to determine the initiating path of the special effect rendering request before controlling a second renderer configured at a server to completely render the image to be rendered according to the target special effect;
a partial rendering result returning unit configured to return the first rendering result through a return path corresponding to the originating path.
13. The apparatus of claim 8, further comprising:
an updatable state information determination unit configured to determine updatable state information of the first renderer in response to receiving an update indication for the second renderer;
a synchronous updating unit configured to respond to the updatable state information being a state allowing updating, and simultaneously and correspondingly update the second renderer and the first renderer according to the updating indication; the updatable state information is determined based on the progress state of the rendering task currently received by the webpage end, and comprises a non-updating permission state corresponding to the rendering task still being performed and an updating permission state corresponding to the rendering task not being performed.
14. The apparatus of any of claims 8-13, wherein the web page end portion rendering unit is further configured to:
calling WebGL configured on a webpage end to partially render the image to be rendered according to the target special effect;
correspondingly, the server-side complete rendering unit is further configured to:
and controlling OpenGL configured on a server to completely render the image to be rendered according to the target special effect.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the special effects rendering method of any of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the special effects rendering method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, carries out the steps of the special effects rendering method according to any one of claims 1-7.
CN202111097131.2A 2021-09-18 2021-09-18 Special effect rendering method, device, equipment, storage medium and computer program product Pending CN113836455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111097131.2A CN113836455A (en) 2021-09-18 2021-09-18 Special effect rendering method, device, equipment, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111097131.2A CN113836455A (en) 2021-09-18 2021-09-18 Special effect rendering method, device, equipment, storage medium and computer program product

Publications (1)

Publication Number Publication Date
CN113836455A true CN113836455A (en) 2021-12-24

Family

ID=78959822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111097131.2A Pending CN113836455A (en) 2021-09-18 2021-09-18 Special effect rendering method, device, equipment, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN113836455A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023221941A1 (en) * 2022-05-18 2023-11-23 北京字跳网络技术有限公司 Image processing method and apparatus, device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8245125B1 (en) * 2011-11-30 2012-08-14 Google Inc. Hybrid rendering for webpages
US20150379014A1 (en) * 2014-06-26 2015-12-31 Google Inc. Batch-optimized render and fetch architecture
CN110020329A (en) * 2017-07-13 2019-07-16 北京京东尚科信息技术有限公司 For generating the methods, devices and systems of webpage
US20190302974A1 (en) * 2018-04-03 2019-10-03 Palantir Technologies Inc. Multi-stage data page rendering
US20190303500A1 (en) * 2018-03-27 2019-10-03 Capital One Services, Llc Systems and methods for single page application server side renderer
CN111339462A (en) * 2020-02-18 2020-06-26 北京百度网讯科技有限公司 Component rendering method, device, server, terminal and medium
CN112749358A (en) * 2021-01-13 2021-05-04 中国工商银行股份有限公司 Page rendering method and device, electronic equipment and storage medium
CN112882711A (en) * 2021-03-10 2021-06-01 百度在线网络技术(北京)有限公司 Rendering method, device, equipment and storage medium
CN113238754A (en) * 2021-06-01 2021-08-10 中国联合网络通信集团有限公司 Server rendering method and device, server and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8245125B1 (en) * 2011-11-30 2012-08-14 Google Inc. Hybrid rendering for webpages
US20150379014A1 (en) * 2014-06-26 2015-12-31 Google Inc. Batch-optimized render and fetch architecture
CN110020329A (en) * 2017-07-13 2019-07-16 北京京东尚科信息技术有限公司 For generating the methods, devices and systems of webpage
US20190303500A1 (en) * 2018-03-27 2019-10-03 Capital One Services, Llc Systems and methods for single page application server side renderer
US20190302974A1 (en) * 2018-04-03 2019-10-03 Palantir Technologies Inc. Multi-stage data page rendering
CN111339462A (en) * 2020-02-18 2020-06-26 北京百度网讯科技有限公司 Component rendering method, device, server, terminal and medium
CN112749358A (en) * 2021-01-13 2021-05-04 中国工商银行股份有限公司 Page rendering method and device, electronic equipment and storage medium
CN112882711A (en) * 2021-03-10 2021-06-01 百度在线网络技术(北京)有限公司 Rendering method, device, equipment and storage medium
CN113238754A (en) * 2021-06-01 2021-08-10 中国联合网络通信集团有限公司 Server rendering method and device, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023221941A1 (en) * 2022-05-18 2023-11-23 北京字跳网络技术有限公司 Image processing method and apparatus, device, and storage medium

Similar Documents

Publication Publication Date Title
CN107204023B (en) Method and apparatus for avoiding distortion of graphics drawn in canvas
JP2015529878A (en) Providing access to remote applications via a web client
CN113453073B (en) Image rendering method and device, electronic equipment and storage medium
CN113808231B (en) Information processing method and device, image rendering method and device, and electronic device
CN113784049B (en) Camera calling method of android system virtual machine, electronic equipment and storage medium
CN112714357B (en) Video playing method, video playing device, electronic equipment and storage medium
CN110675465A (en) Method and apparatus for generating image
EP4135333A1 (en) Image display method and apparatus, electronic device, and medium
CN107301220B (en) Method, device and equipment for data driving view and storage medium
JP2021006982A (en) Method and device for determining character color
CN112862934B (en) Method, apparatus, device, medium, and product for processing animation
CN113836455A (en) Special effect rendering method, device, equipment, storage medium and computer program product
CN113839998A (en) Image data transmission method, device, equipment, storage medium and program product
CN109672931B (en) Method and apparatus for processing video frames
CN115576470A (en) Image processing method and apparatus, augmented reality system, and medium
CN113905040B (en) File transmission method, device, system, equipment and storage medium
CN114071190B (en) Cloud application video stream processing method, related device and computer program product
CN113411661B (en) Method, apparatus, device, storage medium and program product for recording information
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN113554721A (en) Image data format conversion method and device
CN113487524A (en) Image format conversion method, device, equipment, storage medium and program product
CN111292392A (en) Unity-based image display method, apparatus, device and medium
CN113542620B (en) Special effect processing method and device and electronic equipment
CN113434551B (en) Data processing method, device, equipment and computer storage medium
CN114979471B (en) Interface display method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination