CN112330783A - Cloud rendering method and device, terminal device and readable storage medium - Google Patents

Cloud rendering method and device, terminal device and readable storage medium Download PDF

Info

Publication number
CN112330783A
CN112330783A CN201910700981.3A CN201910700981A CN112330783A CN 112330783 A CN112330783 A CN 112330783A CN 201910700981 A CN201910700981 A CN 201910700981A CN 112330783 A CN112330783 A CN 112330783A
Authority
CN
China
Prior art keywords
picture
rendering
server
drawing instruction
terminal device
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
CN201910700981.3A
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.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN201910700981.3A priority Critical patent/CN112330783A/en
Priority to PCT/CN2020/099053 priority patent/WO2021000843A1/en
Publication of CN112330783A publication Critical patent/CN112330783A/en
Priority to US17/566,790 priority patent/US20220210484A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a cloud rendering method and device, terminal equipment and a readable storage medium, and relates to the field of human-computer interaction. Firstly, storing a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction into a lock-free queue; then, when a preset information sending condition is met, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server, and performing picture rendering by the server according to the drawing instruction and the drawing parameter; and finally, receiving the rendered picture and displaying the rendered picture. In the process, when the preset information sending condition is met, the drawing instructions and the drawing parameters stored in the lock-free queue are sent in batches, so that the number of times of calling the IO thread to send data and the number of times of context switching are reduced, the time consumed for sending data by the terminal equipment can be saved, and the delay of the whole cloud rendering process is reduced.

Description

Cloud rendering method and device, terminal device and readable storage medium
Technical Field
The application relates to the field of human-computer interaction, in particular to a cloud rendering method, a cloud rendering device, terminal equipment and a readable storage medium.
Background
The cloud rendering refers to a process that the terminal equipment sends a picture to be rendered to a server running a cloud rendering platform, and the server renders the picture to be rendered and sends the rendered picture to the terminal equipment for display. The server has stronger software resources and hardware resources relative to the terminal equipment, and the rendering speed of the picture is faster.
However, since the cloud rendering needs to be completed by means of data communication between the terminal device and the server, it takes a certain time for the terminal device to send the picture to be rendered to the server, which increases the time consumption of the whole cloud rendering process, causes delay of the cloud rendering, and reduces the efficiency of the cloud rendering.
Disclosure of Invention
In order to overcome at least the above disadvantages in the prior art, an object of the present application is to provide a method, an apparatus, a server and a readable storage medium for reducing cloud rendering delay.
In a first aspect, an embodiment of the present application provides a cloud rendering method, which includes a cloud rendering system including a terminal device and a server, and the method includes:
the terminal equipment stores drawing instructions for rendering pictures and drawing parameters corresponding to the drawing instructions into a lock-free queue, wherein a plurality of drawing instructions are needed for rendering a picture;
when the preset information sending condition is met, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server;
after receiving the drawing instruction and the drawing parameter, the server performs picture rendering according to the drawing instruction and the drawing parameter;
after finishing the picture rendering, the server encodes the rendered picture and sends the encoded picture to the terminal equipment;
and the terminal equipment receives the coded picture, decodes the received picture and displays the decoded picture.
In a second aspect, an embodiment of the present application provides a cloud rendering method, which is applied to a terminal device in a cloud rendering system, the terminal device communicating with a server, and the method includes:
storing a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction into a lock-free queue, wherein a plurality of drawing instructions are required for rendering a picture;
when the condition that the preset information sending condition is met is detected, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server, carrying out image rendering by the server according to the received drawing instruction and the drawing parameter, after the image rendering is completed, coding the rendered image, and sending the coded image to the terminal equipment;
the encoded pictures are received, the received pictures are decoded, and the decoded pictures are displayed.
In a third aspect, an embodiment of the present application further provides a cloud rendering apparatus, which is applied to a terminal device in a cloud rendering system, where the cloud rendering system further includes a server, and the apparatus includes:
the sending module is used for storing the picture to be rendered and the rendering parameters into a lock-free queue, sending the picture to be rendered and the rendering parameters stored in the lock-free queue to a server when an instruction of a preset open graphic library is detected to be executed, rendering the picture to be rendered by the server according to the received rendering parameters, coding the rendered picture and sending the coded picture to the terminal equipment;
and the receiving module is used for receiving the coded picture, decoding the received picture and displaying the decoded picture.
In a fourth aspect, an embodiment of the present application further provides a terminal device, including: the cloud rendering method comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when a terminal device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the cloud rendering method of the first aspect.
In a fifth aspect, the present application further provides a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the cloud rendering method according to the first aspect.
Compared with the prior art, the method has the following beneficial effects:
when the cloud rendering is performed on the picture, firstly, a drawing instruction used for rendering the picture and a drawing parameter corresponding to the drawing instruction are stored in a lock-free queue, when a preset information sending condition is met, the drawing instruction and the drawing parameter stored in the lock-free queue are sent to a server, the server performs picture rendering according to the drawing instruction and the drawing parameter, and finally, the rendered picture is received from the server for displaying. In the process, when the preset information sending condition is met, the drawing instructions and the drawing parameters stored in the lock-free queue are sent in batch, so that the number of times of calling the IO thread to send data and the number of times of context switching are reduced, the time consumed for sending data by the terminal equipment is saved, and the delay of the whole cloud rendering process is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 illustrates an application scene schematic diagram of a cloud rendering system provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a cloud rendering method according to a first embodiment of the present application;
fig. 3 is a flowchart illustrating a cloud rendering method according to a second embodiment of the present application;
fig. 4 shows a block schematic structure diagram of a terminal device according to a third embodiment of the present application.
Icon: 10-a cloud rendering system; 100-a terminal device; 200-a server; 110-a storage medium; 120-a processor; 130-cloud rendering means; 1301-a storage module; 1302-a sending module; 1303-receiving module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
The inventor finds that the time required for cloud rendering a picture is mainly composed of the following parts: firstly, the terminal equipment sends a drawing instruction and a drawing parameter for rendering a picture to a server for required time; secondly, the server carries out time required by picture rendering according to the drawing instruction and the drawing parameter; thirdly, the time required by the process of compressing and encoding the rendered picture is saved; fourthly, sending the coded picture to terminal equipment through a network for a required time; fifthly, the terminal device decodes the encoded picture to obtain the time required for the picture.
In order to reduce the time duration of the time required for cloud rendering and reduce the cloud rendering delay, the inventors have studied to provide the following solutions.
First embodiment
Referring to fig. 1, fig. 1 is a schematic view of an application scene of a cloud rendering system 10 according to the present disclosure. The cloud rendering system 10 includes a terminal device 100 and a server 200 that are communicatively connected to each other.
The terminal device 100 has capabilities of decoding and playing video and images, but the terminal device 100 is weak in screen rendering capability with respect to the server 200, and is difficult to run a program with a high rendering requirement (for example, a 3D rendering program). Specifically, the terminal Device 100 may be, but is not limited to, a smart phone, a Personal Computer (PC), a tablet PC, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like.
A cloud rendering platform is run in the server 200, and the cloud rendering platform can run various rendering tasks by using a GPU (Graphics Processing Unit) of the server 200. The cloud rendering platform has the capabilities of picture rendering, coding and the like.
Referring to fig. 2, fig. 2 is a schematic flowchart of a cloud rendering method according to an embodiment of the present disclosure. The cloud rendering method may be performed by the cloud rendering platform shown in fig. 1. It should be understood that, in other embodiments, the order of some steps in the cloud rendering method described in the embodiment of the present application may be exchanged according to actual needs, or some steps may be omitted or deleted. The following describes the detailed steps of the cloud rendering method.
Step S210, the terminal device stores the drawing instruction for rendering the screen and the drawing parameter corresponding to the drawing instruction into a lock-free queue.
In the embodiment of the present application, the terminal device 100 responds to a screen rendering request triggered by a user, and generates a drawing instruction and corresponding drawing parameters for performing screen rendering. After intercepting the drawing instruction and the drawing parameter, the terminal device 100 serializes the drawing instruction and the drawing parameter, and stores data obtained by serializing the drawing instruction and the drawing parameter into a lock-free queue, where the serializing is a process of converting state information of an object into a form that can be stored or transmitted, that is, a process of converting the drawing instruction and the drawing parameter into a byte stream in the embodiment of the present application. The data is stored in the lock-free queue, so that the two threads can operate concurrently under the scene of one enqueue thread and one dequeue thread, and the thread safety can be ensured without any locking action. The data storage and extraction efficiency can be ensured on the premise of ensuring the safety of data storage and extraction by adopting the lock-free queue to store the data.
In the embodiment of the present application, rendering a screen requires a plurality of drawing commands, each drawing command corresponds to a drawing parameter for completing a task of the drawing command, and the drawing parameters include texture parameters, color parameters, and the like.
The drawing instructions and the drawing parameters are stored in the lock-free queue, instead of directly calling the intercepted drawing instructions and the corresponding drawing parameters to the IO sending thread for immediate processing, for example, 1000 drawing instructions are needed for rendering a picture, and if each drawing instruction calls the IO sending thread once, 1000 IO sending threads need to be called. If the serialized data is stored in the lock-free queue, the data is sent when the sending condition is met, and a plurality of drawing instructions can be sent out by calling an IO sending thread. Therefore, the calling times of the IO sending thread can be reduced, and the context switching times can be reduced. The context switch refers to a process in which a CPU (Central Processing Unit) saves a state of a previous task and loads a next task.
In this step, taking OpenGL (Open Graphics Library) as an example for performing image rendering, the terminal device 100 instantiates the intercepted OpenGL drawing instruction into various GLTask subclasses (drawing instruction and drawing parameter), serializes the GLTask, and then puts the GLTask into the lock-free queue. Instantiation refers to the process of creating objects from classes in object-oriented programming.
Step S220, when detecting that the preset information sending condition is met, the terminal device sends the drawing instruction and the drawing parameter stored in the lock-free queue to the server.
In this embodiment, the terminal device 100 may detect whether it satisfies a preset information sending condition. In detail, taking OpenGL for screen rendering as an example, when any one of a wait synchronization object instruction (wait), a flush buffer instruction (flush), a synchronous API call instruction (get), and a render action instruction (draw) of OpenGL is detected, it may be determined that the terminal device 100 meets a preset information sending condition, and when the terminal device 100 meets the preset information sending condition, the drawing instructions and corresponding drawing parameters stored in the lock-free queue may be sent in batch, which may reduce the number of times of invoking IO sending threads, and save time consumed by the terminal device 100 to send data.
In step S230, after receiving the drawing command and the drawing parameter, the server performs image rendering according to the drawing command and the drawing parameter.
And step S240, after finishing the picture rendering, the server encodes the rendered picture and sends the encoded picture to the terminal equipment.
In step S250, the terminal device receives the encoded picture, decodes the received picture, and displays the decoded picture.
In the method, the intercepted drawing instructions and the drawing parameters are stored in the lock-free queue, when the condition that the preset information sending condition is met is detected, the drawing instructions and the drawing parameters stored in the lock-free queue are sent in batch, the number of times of calling the IO thread to send data is reduced, namely the number of times of context switching is reduced, so that the time consumed by the terminal device 100 to send the data is saved, the time required by the terminal device 100 to send the drawing instructions and the drawing parameters to the server 200 in the cloud rendering process can be reduced, the time consumed by the whole cloud rendering process is reduced, and the purpose of reducing the delay of the whole cloud rendering process is achieved.
Further, in order to reduce the time consumption of rendering the picture by the server 200 in the cloud rendering process. The inventors have found that, when screen rendering is performed using the terminal apparatus 100, in order to prevent a tearing phenomenon from occurring in a screen rendered on the terminal apparatus 100, a frame rate per second is limited (for example, not more than 60 frames per second). In order to limit the frame rate per second, the terminal device 100 may start a vertical synchronization (vsync) function, and in the embodiment of the present application, since the screen rendering is performed by the server 200, the rendered screen is not displayed by the server 200.
In order to reduce the time required for rendering the screen by the server 200, step S230 may be implemented by:
and closing the vertical synchronization function in the server 200, and performing picture rendering according to the drawing instruction and the drawing parameters.
By turning off the vertical synchronization function, the frame rate of the rendered pictures can be increased (e.g., 200 frames per second), so that the rendering speed of the pictures in unit time can be increased, the time consumption for rendering each picture can be reduced, and the delay of the whole cloud rendering process can be reduced.
The server 200 receives the byte stream sent by the terminal device 100, deserializes the received byte stream to obtain a drawing instruction and a drawing parameter, and renders a picture according to the obtained drawing instruction and the drawing parameter, wherein deserialization is a reverse process of creating an object from the byte stream. In the embodiment of the present application, the protobuf protocol may be used to implement serialization and deserialization.
Further, in order to reduce the time required for the server 200 to compress and encode the rendered picture. The inventors have discovered that most windowing systems use dual buffers (e.g., including a front buffer and a back buffer) for buffering pictures to avoid picture tearing and flickering. The screen displays the picture in the front end buffer area, the rendering occurs in the back end buffer area, so the difference of the picture cached in the front end buffer area and the back end buffer area is a frame, namely the picture seen by human eyes through the screen is delayed.
In order to reduce the time required for the server 200 to compress and encode the rendered picture, step S240 may be implemented as follows:
firstly, obtaining a rendered picture from a front-end cache region of a display card of the server 200;
then, the rendered picture is encoded in a hardware acceleration manner, and the encoded picture is transmitted to the terminal device 100.
By copying the picture from the front-end cache region, the latest rendered picture can be ensured to be obtained. And during coding, directly coding the obtained rendering picture by adopting a hardware acceleration mode to obtain a code stream of H264 or H265. Then, the encoded code stream is sent to the terminal device 100, hardware acceleration is a technology that the computer device processes the code stream by allocating the work with large calculation amount to special hardware to reduce the work amount of the central processing unit, and the code stream can be simultaneously encoded by the central processing unit and the image processor in a hardware acceleration mode, so that the time consumption of encoding is saved. In order to ensure that the encoding process does not block the picture rendering process of the server 200, in the embodiment of the present application, an independent encoding thread is used to encode the rendered picture. The coding thread can interact with the thread for rendering the picture through a synchronization mechanism, and normal picture rendering and coding are ensured.
In the embodiment of the present application, in the process of sending the encoded code stream to the terminal device 100, the server 200 firstly performs serialization on the encoded code stream, and stores data obtained after the serialization into a sending queue; next, the data in the transmission queue is transmitted to the terminal device 100 according to the network status between the server 200 and the terminal device 100. In detail, the server 200 may dynamically adjust a data Transmission rate according to a network state between the server and the terminal device 100, so as to avoid data loss caused by a bad network state when a Transmission Control Protocol (TCP) is used for data Transmission.
Further, in order to reduce the time required for the picture cloud rendering to transmit the encoded picture to the terminal device 100 through the network and the time required for the terminal device 100 to decode the picture. In the embodiment of the present application, step S250 may be implemented by:
first, an independent IO receive thread is used to receive the encoded picture.
The terminal device 100 receives the data sent by the thread server 200 by using independent IO, and performs deserialization processing on the received data to obtain an encoded image. The IO receiving thread independent to the IO sending thread is adopted to receive the data, so that the mutual influence between data sending and data receiving can be reduced, the data receiving and sending efficiency is improved, and the time consumption of data receiving and sending is reduced.
And then, decoding the coded picture by adopting a hardware acceleration mode, and displaying the decoded picture.
The decoding method using hardware acceleration is similar to the above encoding method, and is not described herein again.
Second embodiment
Referring to fig. 3, fig. 3 is a schematic flowchart of a cloud rendering method according to an embodiment of the present disclosure. The cloud rendering method may be performed by the terminal device 100 shown in fig. 1. It should be understood that, in other embodiments, the order of some steps in the cloud rendering method described in the embodiment of the present application may be exchanged according to actual needs, or some steps may be omitted or deleted. The following describes the detailed steps of the cloud rendering method.
In step S310, the drawing command for rendering the image and the drawing parameters corresponding to the drawing command are stored in the lock-free queue.
In the embodiment of the present application, the terminal device 100 responds to a screen rendering request triggered by a user, and generates a drawing instruction and corresponding drawing parameters for performing screen rendering. After intercepting the drawing instruction and the drawing parameter, the terminal device 100 serializes the drawing instruction and the drawing parameter, and stores data obtained by serializing the drawing instruction and the drawing parameter into a lock-free queue, where the serializing is a process of converting state information of an object into a form that can be stored or transmitted, that is, a process of converting the drawing instruction and the drawing parameter into a byte stream in the embodiment of the present application. The data is stored in the lock-free queue, so that the two threads can operate concurrently under the scene of one enqueue thread and one dequeue thread, and the thread safety can be ensured without any locking action. The data storage and extraction efficiency can be ensured on the premise of ensuring the safety of data storage and extraction by adopting the lock-free queue to store the data.
In the embodiment of the present application, rendering a screen requires a plurality of drawing commands, each drawing command corresponds to a drawing parameter for completing a task of the drawing command, and the drawing parameters include texture parameters, color parameters, and the like.
The drawing instruction and the corresponding drawing parameter are stored in the lock-free queue, and the intercepted drawing instruction and the corresponding drawing parameter are not directly called the IO sending thread to be immediately processed, so that the calling times of the IO sending thread can be reduced, and the context switching times can be reduced. The context switch refers to a process in which a CPU (Central Processing Unit) saves a state of a previous task and loads a next task.
In this step, taking OpenGL (Open Graphics Library) as an example for performing image rendering, the terminal device 100 instantiates the intercepted OpenGL drawing instruction into various GLTask subclasses (drawing instruction and drawing parameter), serializes the GLTask, and then puts the GLTask into the lock-free queue. Instantiation refers to the process of creating objects with classes in object-oriented programming; serialization refers to the process of converting state information of an object into a form that can be stored or transmitted.
And step S320, when the preset information sending condition is met, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server, performing image rendering by the server according to the received drawing instruction and the drawing parameter, after the image rendering is completed, encoding the rendered image, and sending the encoded image to the terminal equipment.
In this embodiment, the terminal device 100 may detect whether it satisfies a preset information sending condition. In detail, taking OpenGL for screen rendering as an example, when any one of a wait synchronization object instruction (wait), a Flush buffer instruction (Flush), a synchronous API call instruction (get), and a render action instruction (draw) of OpenGL is detected, it may be determined that the terminal device 100 satisfies a preset information sending condition, and when the terminal device 100 satisfies the preset information sending condition, the drawing instructions and corresponding drawing parameters stored in the lock-free queue may be sent in batch, which may reduce the number of times of invoking IO sending threads, and save time consumed by the terminal device 100 to send data.
Step S330, receiving the encoded picture, decoding the received picture, and displaying the decoded picture.
Third embodiment
Referring to fig. 4, fig. 4 is a schematic block diagram illustrating a structure of the terminal device 100 in fig. 1 according to an embodiment of the present disclosure, where the terminal device 100 may include a storage medium 110, a processor 120, and a cloud rendering apparatus 130. In this embodiment, the storage medium 110 and the processor 120 are both located in the terminal device 100 and are separately disposed. However, it should be understood that the storage medium 110 may be separate from the terminal device 100 and may be accessed by the processor 120 through a bus interface. Alternatively, the storage medium 110 may be integrated into the processor 120, for example, may be a cache and/or general purpose registers.
The cloud rendering device 130 may be understood as the terminal device 100 or the processor 120 of the terminal device 100, or may be understood as a software functional module that is independent of the terminal device 100 or the processor 120 and implements the cloud rendering method under the control of the terminal device 100. As shown in fig. 4, the cloud rendering apparatus 130 may include a logging module 1301, a sending module 1302, and a receiving module 1303, and the functions of the functional modules of the cloud rendering apparatus 130 are described in detail below.
The storing module 1301 is configured to store the drawing instruction for rendering the screen and the drawing parameter corresponding to the drawing instruction into a lock-free queue, where multiple drawing instructions are required to render a screen. It is understood that the logging module 1301 may be configured to perform the step S310, and for detailed implementation of the logging module 1301, reference may be made to the content related to the step S310.
The sending module 1302 is configured to send the drawing instruction and the drawing parameter stored in the lock-free queue to the server when it is detected that the preset information sending condition is met, perform image rendering by the server according to the received drawing instruction and drawing parameter, encode the rendered image after the image rendering is completed, and send the encoded image to the terminal device. It is understood that the sending module 1302 may be configured to perform the step S320, and for detailed implementation of the sending module 1302, reference may be made to the content related to the step S320.
And a receiving module 1303, configured to receive the encoded picture, decode the received picture, and display the decoded picture. It is understood that the receiving module 1303 may be configured to perform the step S330, and for a detailed implementation of the receiving module 1303, reference may be made to the content related to the step S330.
The embodiment of the present application further provides a readable storage medium, where the readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute the domain name resolution method in any of the above method embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the method and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. The cloud rendering method is applied to a cloud rendering system comprising terminal equipment and a server, and comprises the following steps:
the terminal equipment stores drawing instructions for rendering pictures and drawing parameters corresponding to the drawing instructions into a lock-free queue, wherein a plurality of drawing instructions are needed for rendering a picture;
when the preset information sending condition is met, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server;
after receiving the drawing instruction and the drawing parameter, the server performs picture rendering according to the drawing instruction and the drawing parameter;
after finishing the picture rendering, the server encodes the rendered picture and sends the encoded picture to the terminal equipment;
and the terminal equipment receives the coded picture, decodes the received picture and displays the decoded picture.
2. The method of claim 1, wherein the terminal device stores a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction into a lock-free queue, and the method comprises:
the terminal equipment carries out serialization processing on a drawing instruction used for rendering a picture and a drawing parameter corresponding to the drawing instruction, and stores data obtained by carrying out serialization processing on the drawing instruction and the drawing parameter into a lock-free queue.
3. The method of claim 1, wherein the terminal device receiving the encoded picture, decoding the received picture, and displaying the decoded picture, comprises:
receiving the coded picture by adopting an independent IO receiving thread;
and decoding the coded picture by adopting a hardware acceleration mode, and displaying the decoded picture.
4. The method of claim 3, wherein receiving the encoded picture with an independent IO receive thread comprises:
and the terminal equipment receives data obtained by serializing the coded pictures by the server through an independent IO receiving thread, and performs deserialization on the received data to obtain the coded images.
5. The method according to any one of claims 1 to 4, wherein the rendering of the screen by the server according to the drawing instruction and the drawing parameter after receiving the drawing instruction and the drawing parameter comprises:
and closing the vertical synchronization function of the server, performing deserialization on the data sent by the terminal equipment to obtain the drawing instruction and the drawing parameter, and performing picture rendering according to the drawing instruction and the drawing parameter.
6. The method of claim 5, wherein the server encodes and transmits the rendered picture to the terminal device after finishing picture rendering, and the method comprises:
obtaining a rendered picture from a front-end cache region of the server display card;
and coding the rendered pictures in a hardware acceleration mode, storing data obtained after the coded pictures are serialized into a sending queue, and sending the data stored in the sending queue to the terminal equipment according to the network state between the server and the terminal equipment.
7. The method of claim 5, wherein before the terminal device stores a drawing instruction for rendering a screen and a drawing parameter corresponding to the drawing instruction in a lock-free queue, the method further comprises:
and responding to a picture rendering request triggered by a user, and intercepting a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction.
8. The method of claim 5, wherein the method further comprises:
and when at least one of a command of waiting for a synchronous object, a command of refreshing a cache region, a synchronous API (application program interface) calling command and a rendering action command of the open graphics library is detected, judging that a preset information sending condition is met.
9. A cloud rendering method is applied to a terminal device which communicates with a server in a cloud rendering system, and comprises the following steps:
storing a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction into a lock-free queue, wherein a plurality of drawing instructions are required for rendering a picture;
when the condition that the preset information sending condition is met is detected, sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server, carrying out image rendering by the server according to the received drawing instruction and the drawing parameter, after the image rendering is completed, coding the rendered image, and sending the coded image to the terminal equipment;
the encoded pictures are received, the received pictures are decoded, and the decoded pictures are displayed.
10. A cloud rendering apparatus, applied to a terminal device in a cloud rendering system, the cloud rendering system further including a server, the apparatus comprising:
the storage module is used for storing a drawing instruction for rendering a picture and a drawing parameter corresponding to the drawing instruction into a lock-free queue, wherein a plurality of drawing instructions are needed for rendering a picture;
the sending module is used for sending the drawing instruction and the drawing parameter stored in the lock-free queue to a server when the preset information sending condition is detected to be met, the server performs picture rendering according to the received drawing instruction and drawing parameter, and after the picture rendering is completed, the rendered picture is coded and the coded picture is sent to the terminal equipment;
and the receiving module is used for receiving the coded picture, decoding the received picture and displaying the decoded picture.
11. A terminal device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the terminal device is running, the processor executing the machine-readable instructions to perform the steps of the cloud rendering method as claimed in claim 9.
12. A readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the cloud rendering method of claim 9.
CN201910700981.3A 2019-07-04 2019-07-31 Cloud rendering method and device, terminal device and readable storage medium Pending CN112330783A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201910700981.3A CN112330783A (en) 2019-07-31 2019-07-31 Cloud rendering method and device, terminal device and readable storage medium
PCT/CN2020/099053 WO2021000843A1 (en) 2019-07-04 2020-06-29 Method for processing live broadcast data, system, electronic device, and storage medium
US17/566,790 US20220210484A1 (en) 2019-07-04 2021-12-31 Method for processing live broadcast data, system, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910700981.3A CN112330783A (en) 2019-07-31 2019-07-31 Cloud rendering method and device, terminal device and readable storage medium

Publications (1)

Publication Number Publication Date
CN112330783A true CN112330783A (en) 2021-02-05

Family

ID=74319569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910700981.3A Pending CN112330783A (en) 2019-07-04 2019-07-31 Cloud rendering method and device, terminal device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112330783A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114581580A (en) * 2022-02-28 2022-06-03 维塔科技(北京)有限公司 Method and device for rendering image, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114581580A (en) * 2022-02-28 2022-06-03 维塔科技(北京)有限公司 Method and device for rendering image, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10110662B2 (en) Method and apparatus for sending data in VDI environment
CN103688240B (en) For sending method and the transmitters and receivers scene process equipment of numeral scene description data
KR101980990B1 (en) Exploiting frame to frame coherency in a sort-middle architecture
CN110377263B (en) Image synthesis method, image synthesis device, electronic equipment and storage medium
CN111432262B (en) Page video rendering method and device
CN107729095B (en) Image processing method, virtualization platform and computer-readable storage medium
US20230215076A1 (en) Image frame display method, apparatus, device, storage medium, and program product
CN109992347B (en) Interface display method, device, terminal and storage medium
CN112843676B (en) Data processing method, device, terminal, server and storage medium
US20220210484A1 (en) Method for processing live broadcast data, system, electronic device, and storage medium
CN116821040B (en) Display acceleration method, device and medium based on GPU direct memory access
WO2016073137A1 (en) Systems and methods for performing display mirroring
US20120218292A1 (en) System and method for multistage optimized jpeg output
CN113655975B (en) Image display method, image display device, electronic apparatus, and medium
CN113839998B (en) Image data transmission method, apparatus, device, storage medium, and program product
CN109587555B (en) Video processing method and device, electronic equipment and storage medium
CN109587561B (en) Video processing method and device, electronic equipment and storage medium
CN112330783A (en) Cloud rendering method and device, terminal device and readable storage medium
CN115409681A (en) Rendering method and related device
CN113411660A (en) Video data processing method and device and electronic equipment
CN112565869A (en) Window fusion method, device and equipment for video redirection
CN115988265A (en) Rendering method and device of display picture and terminal equipment
CN115460419A (en) Image processing method, image processing device, electronic equipment and storage medium
US20220261945A1 (en) Data processing system, data processing method, and computer program
CN112370776A (en) Method, device and medium for improving cloud game fluency through dynamic frame limiting

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