CN115700484A - Rendering method, device, equipment and storage medium - Google Patents

Rendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN115700484A
CN115700484A CN202110851281.1A CN202110851281A CN115700484A CN 115700484 A CN115700484 A CN 115700484A CN 202110851281 A CN202110851281 A CN 202110851281A CN 115700484 A CN115700484 A CN 115700484A
Authority
CN
China
Prior art keywords
rendering
synchronization
identification point
end rendering
synchronous
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
CN202110851281.1A
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.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte 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 Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110851281.1A priority Critical patent/CN115700484A/en
Publication of CN115700484A publication Critical patent/CN115700484A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The embodiment of the invention provides a rendering method, a rendering device, equipment and a storage medium, wherein the method comprises the following steps: the front-end rendering device sends a plurality of rendering instructions and a plurality of synchronous identification points to the rear-end rendering device, and the synchronous identification points are sequentially inserted among the rendering instructions. The front-end rendering device receives the first synchronization identification point sent by the rear-end rendering device, and the rear-end rendering device feeds back the first synchronization identification point to the front-end rendering device when finishing a rendering instruction before the first synchronization identification point. And in response to a synchronization request corresponding to the second synchronization identification point, triggered by the front-end rendering engine, the front-end rendering equipment determines the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point. In the scheme, the front-end rendering device can know the rendering state of the back-end rendering device without frequently sending a synchronization request to the back-end rendering device, so that the communication overhead is saved.

Description

Rendering method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a rendering method, apparatus, device, and storage medium.
Background
Applications such as some games, for example, may design very realistic and complex pictures to enhance the user experience. When rendering these pictures, if rendering is performed only by the user terminal device, an excessive processing load may be imposed on the user terminal device due to the limited computing capability of the user terminal device. Therefore, a remote rendering scheme is provided, wherein the front end and the back end are matched to complete picture rendering. The front end and the back end may also be referred to as a user end and a server end.
In the remote rendering scheme, the front end simply transmits the rendering instructions to the back end of the remote end one by one through the network, the back end performs the image rendering, and the finally rendered image is transmitted back to the front end. In the process, the front end needs to synchronously master the rendering condition of the back end, so that the front end sends a synchronous request to the back end after sending a rendering instruction to the back end, the back end detects the execution condition of the requested rendering instruction after receiving the synchronous request, if the synchronous request is completed, the result is directly fed back to the front end, and if the synchronous request is not completed, the back end feeds back the execution result to the front end after waiting for the completion of the rendering instruction.
Therefore, in the process that the front end needs to synchronously obtain the rendering state of the back end, because the communication distance between the front end and the back end is often long, the time delay caused by communication interaction is long, frequent synchronization requirements can cause high communication cost overhead, and finally the image rendering speed of the front end is low, so that the frame rate is reduced.
Disclosure of Invention
Embodiments of the present invention provide a rendering method, an apparatus, a device, and a storage medium, which are used to reduce communication overhead of a front-end and a back-end synchronous rendering state and ensure a frame rate of the front-end.
In a first aspect, an embodiment of the present invention provides a rendering method, which is applied to a front-end rendering device, where the method includes:
sending a plurality of rendering instructions and a plurality of synchronous identification points to a rear-end rendering device, wherein the synchronous identification points are sequentially interspersed among the rendering instructions;
receiving a first synchronization identification point sent by the back-end rendering device, wherein the back-end rendering device feeds back the first synchronization identification point to the front-end rendering device when finishing a rendering instruction before the first synchronization identification point;
and responding to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, and determining the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
In a second aspect, an embodiment of the present invention provides a rendering apparatus, which is applied to a front-end rendering device, where the apparatus includes:
the device comprises a sending module, a processing module and a processing module, wherein the sending module is used for sending a plurality of rendering instructions and a plurality of synchronous identification points to a rear-end rendering device, and the synchronous identification points are sequentially inserted among the rendering instructions;
a receiving module, configured to receive a first synchronization identifier sent by the back-end rendering device, where the back-end rendering device feeds back the first synchronization identifier to the front-end rendering device when completing a rendering instruction located before the first synchronization identifier;
and the determining module is used for responding to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, and determining the completion state of the rendering instruction before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
In a third aspect, an embodiment of the present invention provides a front-end rendering device, including: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to implement at least the rendering method of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of a front-end rendering device, causes the processor to implement at least the rendering method according to the first aspect.
In a fifth aspect, an embodiment of the present invention provides a rendering method, which is applied to a back-end rendering device, where the method includes:
receiving a plurality of rendering instructions and a plurality of synchronous identification points sent by front-end rendering equipment, wherein the plurality of synchronous identification points are sequentially inserted among the plurality of rendering instructions;
when a rendering instruction before a first synchronous identification point is finished, feeding back the first synchronous identification point to the front-end rendering device, so that the front-end rendering device responds to a synchronous request, corresponding to a second synchronous identification point, triggered by a front-end rendering engine, and determines the completion state of the back-end rendering device on the rendering instruction before the second synchronous identification point according to the position sequence of the second synchronous identification point and the first synchronous identification point, wherein the front-end rendering engine is arranged on the front-end rendering device.
In a sixth aspect, an embodiment of the present invention provides a rendering apparatus, applied to a back-end rendering device, where the apparatus includes:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a plurality of rendering instructions and a plurality of synchronous identification points which are sent by front-end rendering equipment, and the plurality of synchronous identification points are sequentially inserted among the plurality of rendering instructions;
the sending module is used for feeding back the first synchronous identification point to the front-end rendering equipment when a rendering instruction before the first synchronous identification point is completed, so that the front-end rendering equipment responds to a synchronous request which is triggered by a front-end rendering engine and corresponds to a second synchronous identification point, and determines the completion state of the rendering instruction before the second synchronous identification point by the rear-end rendering equipment according to the position sequence of the second synchronous identification point and the first synchronous identification point, wherein the rendering instruction before the second synchronous identification point is completed by the front-end rendering engine which is arranged on the front-end rendering equipment.
In a seventh aspect, an embodiment of the present invention provides a back-end rendering device, including: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to implement at least the rendering method of the fifth aspect.
In an eighth aspect, the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored, and when the executable code is executed by a processor of a back-end rendering device, the processor is enabled to implement at least the rendering method according to the fifth aspect.
In a ninth aspect, an embodiment of the present invention provides a rendering method, including:
the front-end rendering equipment sends a plurality of rendering instructions and a plurality of synchronous identification points to the rear-end rendering equipment, and the synchronous identification points are sequentially inserted among the rendering instructions;
the back-end rendering equipment feeds back the first synchronous identification point to the front-end rendering equipment when finishing the rendering instruction positioned before the first synchronous identification point;
and in response to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, the front-end rendering equipment determines the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, and the front-end rendering engine is arranged on the front-end rendering equipment.
In the solution provided by the embodiment of the present invention, when the front-end rendering device needs to request the back-end rendering device to complete some rendering tasks for the front-end rendering device, a plurality of corresponding rendering instructions are sent to the back-end rendering device, and a plurality of synchronization identification points are sequentially inserted between the plurality of rendering instructions, so that the front-end rendering device can synchronously obtain the rendering state of the back-end rendering device. Specifically, when the rendering instruction before a certain synchronization identification point is completed, the back-end rendering device feeds back the synchronization identification point to the front-end rendering device, so that the front-end rendering device knows the execution condition of the rendering instruction by the back-end rendering device. If the rendering engine (referred to as a front-end rendering engine) in the front-end rendering device triggers a synchronization request corresponding to the second synchronization identification point, the front-end rendering device may determine, according to the position sequence of the second synchronization identification point and the received first synchronization identification point, whether the rendering instruction located before the second synchronization identification point is completed by the back-end rendering device.
In the above scheme, by inserting the synchronization identifier point between a plurality of consecutive rendering instructions, when the back-end rendering device executes the rendering process, if a certain synchronization identifier point is reached, it means that the rendering instruction before the synchronization identifier point is completed, the rendering state is actively reported to the front-end rendering device, so that when the front-end rendering device needs to synchronously know the execution conditions of the plurality of rendering instructions sent by the back-end rendering device, the front-end rendering device can know the rendering state of the back-end rendering device based on the synchronization identifier point without frequently sending a synchronization request to the back-end rendering device, thereby saving the communication overhead of the front-end rendering device and the back-end rendering device in the synchronization process of the rendering states, and also being beneficial to ensuring the frame rate of the front-end rendering device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is an application diagram of a rendering method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an application for sending a rendering instruction and a synchronization mark point according to an embodiment of the present invention;
fig. 3 is a flowchart of a rendering method according to an embodiment of the present invention;
fig. 4 is a flowchart of a rendering method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a front-end rendering device corresponding to the rendering apparatus provided in the embodiment shown in fig. 5;
fig. 7 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a back-end rendering device corresponding to the rendering apparatus provided in the embodiment shown in fig. 7.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
In addition, the sequence of steps in the embodiments of the methods described below is merely an example, and is not strictly limited.
In a conventional remote rendering scheme, when a front-end rendering device needs to synchronize a rendering state of a back-end rendering device, the front-end rendering device sends a synchronization request to the back-end rendering device, the back-end rendering device checks the rendering state corresponding to a requested rendering instruction after receiving the synchronization request, and directly returns a rendering completed result to the front-end rendering device (case 1) if a corresponding rendering instruction is completed, and returns an execution result to the front-end rendering device after the back-end rendering device completes the corresponding rendering instruction if the corresponding rendering instruction is not completed (case 2). Therefore, the synchronization request triggered by the front-end rendering device may cause long time consumption for network communication, and when a part of synchronization requests occur, the back-end rendering device has already completed execution of the corresponding rendering instruction, that is, the corresponding rendering instruction is in a rendering-completed state (corresponding to the above-mentioned case 1), which causes waste of the current network request and feedback. Moreover, due to the overhead of the network communication cost, it may be difficult to ensure the frame rate (the number of frames that can be displayed per unit time) of the front-end rendering device to be stable.
Therefore, in the rendering scheme, the front-end rendering device does not need to send a synchronization request to the back-end rendering device to request the back-end rendering device to inform the rendering state of the back-end rendering device, but the back-end rendering device actively reports the condition that the back-end rendering device executes the rendering instruction (i.e., the rendering state).
The implementation of the above-described rendering scheme is described below with reference to the following embodiments.
Fig. 1 is an application schematic diagram of a rendering method according to an embodiment of the present invention, as shown in fig. 1, a front-end rendering device and a back-end rendering device that need to be used in an execution process of the rendering method are used. As shown in fig. 1, the front-end rendering device may include a front-end rendering engine and a synchronous processing module a; the back-end rendering device may include a synchronization processing module B and graphics rendering hardware.
The graphics rendering hardware may be hardware such as a GPU having an image rendering function.
The synchronous processing module a and the synchronous processing module B are only for explaining that the front-end rendering device and the back-end rendering device have a functional module in charge of rendering state synchronization, and in practical application, a function corresponding to the functional module may be executed by units such as a CPU in the corresponding rendering device.
In practical applications, taking a scene that a certain user plays a network game as an example, the front-end rendering device may be a terminal device used by the user to play the game, such as a smart phone, a PC, a notebook computer, and the like. The back-end rendering device can be an electronic device for rendering game pictures by a back-end server corresponding to the game or other auxiliary front-end rendering devices pre-configured by a game provider.
In practical applications, taking an online game scene as an example, a complete game picture (a frame) seen by a user at a certain time often corresponds to a plurality of rendering instructions, that is, the complete game picture is finally obtained only after the plurality of rendering instructions are sequentially executed. In terms of the analogy, a task equivalent to rendering a complete picture is divided into a plurality of subtasks to be completed, and the plurality of subtasks correspond to a plurality of rendering instructions.
Therefore, for convenience of description, in the embodiment of the present invention, how the front-end rendering device synchronously knows how to execute the plurality of rendering instructions by the back-end rendering device is described by taking a plurality of rendering instructions corresponding to one screen as an example.
In practical applications, the game application running in the front-end rendering device may call the front-end rendering engine to perform rendering of the game screen. When the front-end rendering engine needs to render a certain game picture, a plurality of rendering instructions corresponding to the front-end rendering engine can be sent to the rear-end rendering equipment through the synchronous processing module A.
In the embodiment of the present invention, the front-end rendering device sends only the plurality of rendering instructions to the back-end rendering device, and the rendering instructions sent together with the plurality of rendering instructions further include a plurality of synchronization identification points. Wherein the plurality of synchronization mark points are interspersed in sequence among the plurality of rendering instructions.
For ease of understanding, the transmission of rendering instructions and synchronization mark points is illustrated in connection with FIG. 2. In fig. 2, it is assumed that the plurality of rendering instructions sequentially issued by the front-end rendering apparatus to the back-end rendering apparatus include: rendering instruction 1, rendering instruction 2, rendering instruction 3, rendering instruction 4 and rendering instruction 5; and assume that the sequentially inserted synchronization mark points include: synchronization mark point 1, synchronization mark point 2 and synchronization mark point 3. Wherein, the synchronous identification point 1 is located between the rendering instruction 1 and the rendering instruction 2, the synchronous identification point 2 is located between the rendering instruction 2 and the rendering instruction 3, and the synchronous identification point 3 is located between the rendering instruction 4 and the rendering instruction 5.
In the embodiment of the present invention, the plurality of synchronization identification points may be implemented as characters encoded according to a set rule, for example, sequentially numbered numbers, so as to represent the sequence of the positions of different synchronization identification points.
Alternatively, the insertion positions of the plurality of synchronous identification points among the plurality of rendering instructions may be determined by the front-end rendering engine or an application program (such as the game application program) calling the front-end rendering engine according to a preset rule configured, for example: inserting a synchronous identification point after each rendering instruction; alternatively, a synchronization mark point is inserted every third rendering instruction.
The preset rules are only examples and are not limited thereto. For example, in practical application, the application program may determine the synchronization identification point insertion rule corresponding to different pictures according to the number of rendering instructions corresponding to the different pictures, for example, when there are more rendering instructions, more synchronization identification points may be inserted, and when there are fewer rendering instructions, fewer synchronization identification points are inserted.
The method comprises the steps that after a rear-end rendering device receives a plurality of rendering instructions which are transmitted by a front-end rendering device and are inserted with a plurality of synchronous identification points, the received rendering instructions are sequentially executed, and in the executing process, when a synchronous identification point is encountered, the synchronous identification point encountered at present is transmitted to the front-end rendering device.
Specifically, in practical application, the back-end rendering device may receive, through the synchronization processing module B in fig. 1, a plurality of rendering instructions and a plurality of synchronization identification points sent by the front-end rendering device, store the rendering instructions and the synchronization identification points that are received in sequence into a task queue, and the graphics rendering hardware sequentially reads information stored in the task queue according to a first-in first-out sequence. If the current reading is a rendering instruction, executing the rendering instruction to complete corresponding rendering operation; if a synchronization mark point is currently read, the synchronization mark point can be stored in the memory, so that the synchronization processing module B reads the synchronization mark point from the memory and sends the synchronization mark point to the front-end rendering device.
Therefore, the back-end rendering device has the capability of distinguishing the rendering instruction from the synchronous identification point, and the distinguishing capability can be that the front-end rendering device respectively associates corresponding identifiers with the rendering instruction and the synchronous identification point when sending the rendering instruction and the synchronous identification point so as to distinguish the rendering instruction from the synchronous identification point.
In addition, as can be understood in conjunction with fig. 2, it is assumed that the back-end rendering device currently reads synchronization identification point 1 from the queue, and this means that rendering instructions before synchronization identification point 1 have all been executed, that is, rendering instruction 1 has been executed. Similarly, if the back-end rendering device currently reads out the synchronization mark point 3 from the queue, it means that all rendering instructions before the synchronization mark point have been executed completely.
Therefore, after the back-end rendering device receives the rendering instructions which are transmitted by the front-end rendering device and are interspersed with the plurality of synchronous identification points, if the first synchronous identification point is executed, the back-end rendering device feeds back the first synchronous identification point to the front-end rendering device when the rendering instructions before the first synchronous identification point are completed, so as to inform the front-end rendering device that the front-end rendering device has executed the first synchronous identification point.
And after the front-end rendering equipment receives the first synchronous identification point, storing the first synchronous identification point.
In addition, after the front-end rendering engine issues the rendering instructions, it needs to know the execution conditions of the rendering instructions on the back-end rendering device, that is, the rendering state of the back-end rendering device needs to be known, and the front-end rendering engine triggers the synchronization request. However, in the embodiment of the present invention, the keyword carried in the synchronization request triggered by the front-end rendering engine is a synchronization identifier point, that is, the front-end rendering engine continuously queries whether different synchronization identifier points have been executed to know the rendering state of the back-end rendering device, and as shown in fig. 1, the synchronization request triggered by the front-end rendering engine and corresponding to a synchronization identifier point (referred to as a second synchronization identifier point, which is distinguished from the synchronization identifier point reported by the back-end rendering device) is only sent to the synchronization processing module a in the front-end rendering device, and is not sent to the back-end rendering device.
And in response to a synchronization request corresponding to the second synchronization identification point, triggered by the front-end rendering engine, the front-end rendering equipment determines the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the second synchronization identification point and the currently stored position sequence of the first synchronization identification point reported by the rear-end rendering equipment. That is, whether the rendering instruction before the second synchronization mark point has been completed is determined according to the position sequence of the second synchronization mark point and the first synchronization mark point.
Specifically, if the second synchronization identifier point is located before the first synchronization identifier point, it indicates that the back-end rendering device has currently completed executing the rendering instruction located before the second synchronization identifier point, and otherwise, if the second synchronization identifier point is located after the first synchronization identifier point, it indicates that the back-end rendering device has not currently completed executing the rendering instruction located before the second synchronization identifier point.
Based on this, optionally, if the second synchronization identification point is located before the first synchronization identification point, the front-end rendering device (the synchronization processing module a therein) may directly feed back response information to the front-end rendering engine, where the response information indicates that the back-end rendering device has completed rendering instructions located before the second synchronization identification point. If the second synchronization identification point is located behind the first synchronization identification point, after the second synchronization identification point sent by the back-end rendering device is received, the front-end rendering device (the synchronization processing module a therein) feeds back response information to the front-end rendering engine, where the response information indicates that the back-end rendering device has completed the rendering instruction located before the second synchronization identification point.
In short, if the second synchronization mark point is located before the first synchronization mark point, which means that the rendering instructions located before the second synchronization mark point have been executed, the front-end rendering engine can be immediately notified that the rendering instructions located before the second synchronization mark point have been executed; if the second synchronous identification point is located behind the first synchronous identification point, which means that the rear-end rendering device has not executed all rendering instructions located before the second synchronous identification point, that is, the second synchronous identification point is not executed yet, and it is required that when the rear-end rendering device executes the second synchronous identification point, the second synchronous identification point is sent to the front-end rendering device, the front-end rendering device updates the previously stored first synchronous identification point to the second synchronous identification point, which means that the rear-end rendering device has executed the second synchronous identification point at this time, the front-end rendering device compares the stored second synchronous identification point to be the same as the synchronous identification point requested by the front-end rendering engine, and then it is determined that at this time, the rear-end rendering device has executed all rendering instructions located before the second synchronous identification point, and feeds back the information to the front-end rendering engine.
In practical applications, the front-end rendering device (i.e., the front-end rendering engine) may request the rendering result from the back-end rendering device at an appropriate time according to a requirement based on a synchronization result of the rendering state of the rendering instruction executed by the back-end rendering device. For example, the front-end rendering device may request the back-end rendering device to feed back a rendered picture to the front-end rendering device for display after rendering of the picture corresponding to the rendering instructions is completed, and for this situation, a synchronization mark point may be set at a tail of the rendering instructions, that is, the synchronization mark points include a synchronization mark point located after a last rendering instruction, and when the back-end rendering device executes the last synchronization mark point, it means that all the rendering instructions have been completed. For another example, when the front-end rendering device also executes some simple rendering operations, the front-end rendering device may request the rendering result from the rear-end rendering device when it is determined that the rear-end rendering device has executed to a certain middle synchronization identification point, perform some rendering operations based on the rendering result, and feed back the result of the executed rendering operation to the rear-end rendering device to continue to execute subsequent rendering instructions. In addition, optionally, the back-end rendering device may also actively send the rendering result to the front-end rendering device when executing a certain synchronization identifier point according to a configuration preset by the front-end rendering device, where the configuration preset by the front-end rendering device may be that the front-end rendering device configures in advance which synchronization identifier point the back-end rendering device needs to send the rendering result when executing.
In summary, in the above solution, by inserting the synchronization identifier point between consecutive rendering instructions, if a certain synchronization identifier point is executed in the process of executing the rendering by the back-end rendering device, it means that the rendering instruction before the synchronization identifier point is completed, and the rendering state is actively reported to the front-end rendering device, so that when the front-end rendering device needs to synchronously know the execution conditions of multiple rendering instructions sent by the back-end rendering device to the front-end rendering device, it is unnecessary to frequently send a synchronization request to the back-end rendering device, so that the rendering state of the back-end rendering device can be known based on the synchronization identifier point, thereby saving communication overhead of the front-end rendering device and the back-end rendering device in the process of synchronizing the rendering states, and also helping to ensure the frame rate of the front-end rendering device.
Fig. 3 is a flowchart of a rendering method according to an embodiment of the present invention, where the method may be executed by the front-end rendering device, as shown in fig. 3, and may include the following steps:
301. and sending a plurality of rendering instructions and a plurality of synchronous identification points to the rear-end rendering equipment, wherein the plurality of synchronous identification points are sequentially interspersed among the plurality of rendering instructions.
In practical applications, the plurality of rendering instructions may be used for rendering a frame of picture. Of course, the present invention is not limited to this, and may be applied to rendering of two or more frames.
302. And receiving a first synchronous identification point sent by the back-end rendering equipment, wherein the first synchronous identification point is fed back to the front-end rendering equipment by the back-end rendering equipment when the rendering instruction before the first synchronous identification point is completed.
303. And in response to a synchronization request corresponding to the second synchronization identification point, triggered by the front-end rendering engine, determining the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering device according to the position sequence of the second synchronization identification point and the first synchronization identification point, wherein the front-end rendering engine is arranged on the front-end rendering device.
Optionally, if the second synchronization identifier point is located before the first synchronization identifier point, directly feeding back response information to the front-end rendering engine, where the response information indicates that the back-end rendering device has completed the rendering instruction located before the second synchronization identifier point. And if the second synchronous identification point is positioned behind the first synchronous identification point, after the second synchronous identification point sent by the back-end rendering equipment is waited to be received, feeding back response information to a front-end rendering engine, wherein the response information indicates that the back-end rendering equipment finishes rendering instructions positioned before the second synchronous identification point.
In addition, the front-end rendering device has a requirement for acquiring a rendering result of the back-end rendering device in addition to a requirement for synchronously learning the rendering state of the back-end rendering device. The process of obtaining the picture rendering result may be implemented as:
and if the front-end rendering device determines that the rendering instruction before the third synchronous identification point is completed by the rear-end rendering device, sending a picture acquisition request to the rear-end rendering device, and receiving a rendering picture corresponding to the picture acquisition request sent by the rear-end rendering device. Wherein the third synchronization identification point is any one of the plurality of synchronization identification points.
The third synchronization mark point may be a synchronization mark point located after the last rendering instruction, or may be one before the last synchronization mark point.
If the third synchronous identification point is the synchronous identification point located after the last rendering instruction, the front-end rendering device is meant to acquire the rendering result after the rear-end rendering device executes all the rendering instructions; if the third synchronization mark point is one before the last synchronization mark point, it means that the front-end rendering device obtains the intermediate rendering result after the back-end rendering device executes a certain rendering instruction.
In this embodiment, the detailed execution process of the front-end rendering device may refer to the related descriptions in the foregoing other embodiments, which are not described herein again.
Fig. 4 is a flowchart of a rendering method according to an embodiment of the present invention, where the method may be executed by the above backend rendering device, and as shown in fig. 4, the method may include the following steps:
401. receiving a plurality of rendering instructions and a plurality of synchronous identification points sent by front-end rendering equipment, wherein the plurality of synchronous identification points are sequentially interspersed among the plurality of rendering instructions.
In fact, after receiving the rendering instructions and the synchronization identification points, the back-end rendering device may write the rendering instructions and the synchronization identification points into a task queue in sequence, so that the graphics rendering hardware in the back-end rendering device reads the queue in sequence. If a rendering instruction is read from the task queue at present, executing the read rendering instruction; and if a synchronous identification point is read from the task queue at present, sending the read synchronous identification point to the front-end rendering equipment.
402. And feeding back the first synchronous identification point to the front-end rendering equipment when the rendering instruction before the first synchronous identification point is finished so that the front-end rendering equipment responds to a synchronous request which is triggered by the front-end rendering engine and corresponds to the second synchronous identification point, and determining the completion state of the rendering instruction before the second synchronous identification point by the rear-end rendering equipment according to the position sequence of the second synchronous identification point and the first synchronous identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
Wherein the first synchronization mark point is any one of the plurality of synchronization mark points. And the rear-end rendering equipment sends the synchronous identification point to the front-end rendering equipment when the synchronous identification point is read out from the task queue, so that the front-end rendering equipment updates the synchronous identification point reported by the rear-end rendering equipment.
In this embodiment, the detailed execution process of the back-end rendering device may refer to the related descriptions in the foregoing other embodiments, which are not described herein again.
The rendering apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these means can each be constructed using commercially available hardware components and by performing the steps taught in this disclosure.
Fig. 5 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention, where the apparatus is located in the front-end rendering device, and as shown in fig. 5, the apparatus includes: a receiving module 11 and a sending module 12.
The sending module 11 is configured to send a plurality of rendering instructions and a plurality of synchronous identification points to a back-end rendering device, where the plurality of synchronous identification points are sequentially interspersed among the plurality of rendering instructions.
A receiving module 12, configured to receive a first synchronization identifier sent by the back-end rendering device, where the back-end rendering device feeds back the first synchronization identifier to the front-end rendering device when completing a rendering instruction before the first synchronization identifier.
A determining module 13, configured to determine, in response to a synchronization request corresponding to a second synchronization identifier triggered by a front-end rendering engine, a completion state of a rendering instruction located before the second synchronization identifier by the rear-end rendering device according to a position sequence of the second synchronization identifier and the first synchronization identifier, where the front-end rendering engine is located in the front-end rendering device.
Optionally, the determining module 13 may be specifically configured to: if the second synchronous identification point is located before the first synchronous identification point, directly feeding back response information to the front-end rendering engine, wherein the response information indicates that the rear-end rendering equipment has completed rendering instructions located before the second synchronous identification point; if the second synchronization identification point is located behind the first synchronization identification point, after the second synchronization identification point sent by the back-end rendering device is received, response information is fed back to the front-end rendering engine, and the response information indicates that the back-end rendering device has completed rendering instructions located in front of the second synchronization identification point.
Optionally, the rendering instructions are used for rendering a frame of picture.
Optionally, the determining module 13 is further configured to: if it is determined that the rendering instruction located before the third synchronization identification point has been completed by the back-end rendering device, sending a picture acquisition request to the back-end rendering device through the sending module 11; wherein the third synchronization identification point is a synchronization identification point located after a last rendering instruction, or the third synchronization identification point is any one of the plurality of synchronization identification points; and receiving, by the receiving module 12, a rendering screen corresponding to the screen obtaining request sent by the back-end rendering device.
The apparatus shown in fig. 5 may perform the steps performed by the first transmission device in the foregoing embodiment, and for details of the performing process and the technical effect, reference is made to the description in the foregoing embodiment, and details are not repeated here.
In one possible design, the structure of the rendering apparatus shown in fig. 5 may be implemented as a front-end rendering device, which may include, as shown in fig. 6: a first processor 21, a first memory 22, a first communication interface 23. Wherein the first memory 22 has stored thereon executable code, which when executed by the first processor 21, makes the first processor 21 at least implement the steps performed by the front-end rendering device as in the previous embodiments.
In fact, a display screen may be further included in the front-end rendering device for displaying the rendering result. The front-end rendering engine described above is also run in the front-end rendering device.
Fig. 7 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention, where the apparatus is located in a back-end rendering device, and as shown in fig. 7, the apparatus includes: a receiving module 31 and a transmitting module 32.
The receiving module 31 is configured to receive a plurality of rendering instructions and a plurality of synchronous identification points sent by a front-end rendering device, where the plurality of synchronous identification points are sequentially interspersed among the plurality of rendering instructions.
A sending module 32, configured to feed back the first synchronization identifier point to the front-end rendering device when the rendering instruction before the first synchronization identifier point is completed, so that the front-end rendering device determines, according to a position sequence of the second synchronization identifier point and the first synchronization identifier point, a completion state of the rendering instruction before the second synchronization identifier point by the rear-end rendering device in response to a synchronization request corresponding to the second synchronization identifier point and triggered by a front-end rendering engine, where the front-end rendering engine is located in the front-end rendering device.
Wherein, optionally, the apparatus further comprises: the device comprises a storage module and an execution module.
The storage module is configured to sequentially write the rendering instructions and the synchronization identification points into a task queue.
The execution module is used for executing a read rendering instruction if a rendering instruction is currently read from the task queue; and if a synchronous identification point is read from the task queue at present, sending the read synchronous identification point to the front-end rendering equipment.
The apparatus shown in fig. 7 may perform the steps performed by the back-end rendering device in the foregoing embodiment, and the detailed performing process and technical effects refer to the description in the foregoing embodiment, which are not described herein again.
In one possible design, the structure of the rendering apparatus shown in fig. 7 may be implemented as a back-end rendering device, as shown in fig. 8, where the back-end rendering device may include: a second processor 41, a second memory 42, a second communication interface 43. Wherein the second memory 42 has stored thereon executable code which, when executed by the second processor 41, makes the second processor 41 at least operable to carry out the steps performed by the back-end rendering device as in the previous embodiments.
In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium having stored thereon executable code, which, when executed by a processor of a rendering device, causes the processor to at least implement a rendering method as provided in the foregoing embodiments.
The above-described apparatus embodiments are merely illustrative, wherein the elements described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described solutions and/or portions thereof that are prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein (including but not limited to disk storage, CD-ROM, optical storage, etc.).
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A rendering method, applied to a front-end rendering device, the method comprising:
sending a plurality of rendering instructions and a plurality of synchronous identification points to a rear-end rendering device, wherein the synchronous identification points are sequentially interspersed among the rendering instructions;
receiving a first synchronization identification point sent by the back-end rendering device, wherein the back-end rendering device feeds back the first synchronization identification point to the front-end rendering device when finishing a rendering instruction before the first synchronization identification point;
and responding to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, and determining the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
2. The method according to claim 1, wherein the determining the completion status of the rendering instruction before the second synchronization mark point by the back-end rendering device according to the position sequence of the second synchronization mark point and the first synchronization mark point comprises:
and if the second synchronous identification point is positioned before the first synchronous identification point, directly feeding back response information to the front-end rendering engine, wherein the response information indicates that the rear-end rendering equipment has finished rendering instructions positioned before the second synchronous identification point.
3. The method according to claim 1, wherein the determining the completion status of the rendering instruction before the second synchronization mark point by the back-end rendering device according to the position sequence of the second synchronization mark point and the first synchronization mark point comprises:
if the second synchronization identification point is located behind the first synchronization identification point, after the second synchronization identification point sent by the back-end rendering equipment is received, feeding back response information to the front-end rendering engine, wherein the response information indicates that the back-end rendering equipment has completed the rendering instruction located before the second synchronization identification point.
4. The method of claim 1, wherein the plurality of rendering instructions are for rendering a frame of a picture.
5. The method of claim 1, further comprising:
if the rendering instruction before the third synchronous identification point is determined to be completed by the rear-end rendering equipment, sending a picture acquisition request to the rear-end rendering equipment;
receiving a rendering picture corresponding to the picture acquisition request sent by the back-end rendering equipment; the third synchronization identification point is any one of the plurality of synchronization identification points.
6. A rendering method, applied to a back-end rendering device, the method comprising:
receiving a plurality of rendering instructions and a plurality of synchronous identification points sent by front-end rendering equipment, wherein the plurality of synchronous identification points are sequentially inserted among the plurality of rendering instructions;
when a rendering instruction before a first synchronous identification point is completed, feeding back the first synchronous identification point to the front-end rendering equipment so that the front-end rendering equipment responds to a synchronous request which is triggered by a front-end rendering engine and corresponds to a second synchronous identification point, and determining the completion state of the rendering instruction before the second synchronous identification point by the rear-end rendering equipment according to the position sequence of the second synchronous identification point and the first synchronous identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
7. The method of claim 6, further comprising:
sequentially writing the plurality of rendering instructions and the plurality of synchronization identification points into a task queue;
if a rendering instruction is read from the task queue at present, executing the read rendering instruction;
and if a synchronous identification point is read from the task queue at present, sending the read synchronous identification point to the front-end rendering equipment.
8. A rendering apparatus, at a front-end rendering device, comprising:
the device comprises a sending module, a processing module and a processing module, wherein the sending module is used for sending a plurality of rendering instructions and a plurality of synchronous identification points to a rear-end rendering device, and the synchronous identification points are sequentially inserted among the rendering instructions;
a receiving module, configured to receive a first synchronization identification point sent by the back-end rendering device, where the back-end rendering device feeds back the first synchronization identification point to the front-end rendering device when finishing a rendering instruction located before the first synchronization identification point;
and the determining module is used for responding to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, and determining the completion state of the rendering instruction before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, wherein the front-end rendering engine is arranged on the front-end rendering equipment.
9. A rendering apparatus, at a back-end rendering device, comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a plurality of rendering instructions and a plurality of synchronous identification points which are sent by front-end rendering equipment, and the plurality of synchronous identification points are sequentially inserted among the plurality of rendering instructions;
the sending module is used for feeding back the first synchronous identification point to the front-end rendering equipment when a rendering instruction before the first synchronous identification point is completed, so that the front-end rendering equipment responds to a synchronous request which is triggered by a front-end rendering engine and corresponds to a second synchronous identification point, and determines the completion state of the rendering instruction before the second synchronous identification point by the rear-end rendering equipment according to the position sequence of the second synchronous identification point and the first synchronous identification point, wherein the rendering instruction before the second synchronous identification point is completed by the front-end rendering engine which is arranged on the front-end rendering equipment.
10. A rendering device, characterized by comprising: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the rendering method of any of claims 1 to 5, or to perform the rendering method of claim 6 or 7.
11. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of a rendering device, causes the processor to perform the rendering method of any one of claims 1 to 5, or to perform the rendering method of claim 6 or 7.
12. A rendering method, comprising:
the front-end rendering equipment sends a plurality of rendering instructions and a plurality of synchronous identification points to the rear-end rendering equipment, and the synchronous identification points are sequentially inserted among the rendering instructions;
the back-end rendering equipment feeds back the first synchronous identification point to the front-end rendering equipment when finishing the rendering instruction positioned before the first synchronous identification point;
and in response to a synchronization request corresponding to a second synchronization identification point triggered by a front-end rendering engine, the front-end rendering equipment determines the completion state of the rendering instruction positioned before the second synchronization identification point by the rear-end rendering equipment according to the position sequence of the second synchronization identification point and the first synchronization identification point, and the front-end rendering engine is arranged on the front-end rendering equipment.
CN202110851281.1A 2021-07-27 2021-07-27 Rendering method, device, equipment and storage medium Pending CN115700484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110851281.1A CN115700484A (en) 2021-07-27 2021-07-27 Rendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110851281.1A CN115700484A (en) 2021-07-27 2021-07-27 Rendering method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115700484A true CN115700484A (en) 2023-02-07

Family

ID=85120702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110851281.1A Pending CN115700484A (en) 2021-07-27 2021-07-27 Rendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115700484A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721007A (en) * 2023-08-02 2023-09-08 摩尔线程智能科技(北京)有限责任公司 Task control method, system and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721007A (en) * 2023-08-02 2023-09-08 摩尔线程智能科技(北京)有限责任公司 Task control method, system and device, electronic equipment and storage medium
CN116721007B (en) * 2023-08-02 2023-10-27 摩尔线程智能科技(北京)有限责任公司 Task control method, system and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112004086B (en) Video data processing method and device
CN110502310B (en) Time synchronization method and device of virtual machine
CN111026493B (en) Interface rendering processing method and device
CN112492372B (en) Comment message display method and device, electronic equipment, system and storage medium
CN112437318A (en) Content display method, device and system and storage medium
CN111338808B (en) Collaborative computing method and system
CN111240564B (en) Material display method and device, electronic equipment and storage medium
CN111381749A (en) Image display and processing method, device, equipment and storage medium
CN112351333A (en) Data transmission method, device and medium
CN115700484A (en) Rendering method, device, equipment and storage medium
US20240073488A1 (en) Live video processing method and apparatus, device and medium
CN104079368B (en) A kind of the test data transmission method and server of application software
CN112367535B (en) Generation method and device of active user interface
CN115567754A (en) Video playing method, device, equipment and storage medium
CN114339325A (en) Multi-engine dynamic wallpaper playing method and device based on android system
CN111013144B (en) Game picture drawing and rendering method and device and mobile terminal
CN111467797A (en) Game data processing method and device, computer storage medium and electronic equipment
CN113031895A (en) Screen projection control method and device and electronic equipment
CN112929728A (en) Video rendering method, device and system, electronic equipment and storage medium
CN115314588B (en) Background synchronization method, device, terminal, equipment, system and storage medium
CN113791962B (en) Picture frame rate determining method and device
CN107613341B (en) Method for playing different videos on multiple display interfaces, storage medium and mobile terminal
CN111163138B (en) Method, device and server for reducing network load during game
CN116421962A (en) Protocol execution method, protocol execution device, storage medium and equipment
CN114896014A (en) Desktop image display method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240315

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore