CN112099884A - Image rendering method and device - Google Patents

Image rendering method and device Download PDF

Info

Publication number
CN112099884A
CN112099884A CN202010803845.XA CN202010803845A CN112099884A CN 112099884 A CN112099884 A CN 112099884A CN 202010803845 A CN202010803845 A CN 202010803845A CN 112099884 A CN112099884 A CN 112099884A
Authority
CN
China
Prior art keywords
rendering
image
application program
target application
client
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
CN202010803845.XA
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010803845.XA priority Critical patent/CN112099884A/en
Publication of CN112099884A publication Critical patent/CN112099884A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an image rendering method and device, relates to the technical field of image processing, and can solve the problem that in the prior art, the requirement on a cloud server and network bandwidth is high because all desktop images are rendered by the cloud server. The specific technical scheme is as follows: judging whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer; if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client for image rendering to obtain a first image; and when the display window of the target application program is not full screen, acquiring the residual desktop image and a second rendering sub-instruction aiming at the residual desktop image, rendering the residual desktop image to obtain a second image, and sending the second image to the client, so that the client combines the first image and the second image to obtain the target image. The present disclosure is for image rendering.

Description

Image rendering method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image rendering method and apparatus.
Background
Desktop clouds are based on "cloud computing" technology, and cross-platform applications and/or entire client desktops can be accessed through clients or any other network-connected device.
In the prior art, a user accesses a client desktop prepared for a client by a cloud server through network equipment, and in this case, the user can place various complex processing operations on the cloud. For example, a user accesses a network game, video, large drawing software, etc. through a client desktop. The solution to these application scenarios is: and the cloud server renders the desktop image, and sends the rendered desktop image to the client one frame by one frame, and the client decodes and displays the rendered desktop image.
However, in a scene with a high image quality requirement, the above method has at least the following two problems:
1. because the amount of transmitted image data is very large, the requirement on network bandwidth is very high, and the picture is easy to be jammed under the condition that the network bandwidth is insufficient;
2. the cloud server needs to support image rendering work of a large number of clients at the same time, which has a very high requirement on the performance of the cloud server.
Disclosure of Invention
The embodiment of the disclosure provides an image rendering method and an image rendering device, which can solve the problem that in the prior art, the requirements on a cloud server and network bandwidth are high because all desktop images are rendered by the cloud server. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided an image rendering method, the method including:
judging whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value;
if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client so as to enable the client to perform image rendering to obtain a first image;
when a display window of the target application program is not full screen, obtaining a residual desktop image and a second rendering sub-instruction aiming at the residual desktop image, rendering the residual desktop image according to the second rendering sub-instruction to obtain a second image, and sending the second image to the client, so that the client combines the first image and the second image to obtain a target image; the residual desktop image is the image of the desktop image except the window display position of the target application program.
The image rendering method provided by the embodiment of the disclosure includes the steps of firstly, judging whether a target application program in a current desktop image is a re-rendering application program located at a top layer, wherein the re-rendering application program is an application program with dependence degree on image rendering resources larger than a preset threshold value; if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client so as to enable the client to perform image rendering to obtain a first image; when the display window of the target application program is not full screen, obtaining the residual desktop image and a second rendering sub-instruction aiming at the residual desktop image, rendering the residual desktop image according to the second rendering sub-instruction to obtain a second image, and sending the second image to the client so that the client merges the first image and the second image to obtain a target image; the remaining desktop image is an image of the window display position of the desktop image removal target application program. According to the method, a part of image rendering work in the desktop image is carried out at the client, the rest image rendering work is carried out at the cloud server, and finally the client combines two rendering results to generate the final desktop image. By the method, the image rendering resources of the client device are fully utilized, the image rendering load of the cloud server can be reduced, and meanwhile, the cloud server does not need to send a complete rendering image to the client, so that the data transmission amount is reduced, and the bandwidth is saved.
In one embodiment, before determining whether the target application in the current desktop image is a re-rendering application at the top level, the method further comprises:
presetting a re-rendering application list, wherein the re-rendering application list comprises at least one application program with the dependence degree on rendering resources larger than a preset threshold value.
Through the steps, the re-rendering application list is generated in advance for the application program with the rendering resource dependence degree larger than the preset threshold value, and direct judgment on the target application program in the follow-up process is facilitated.
In one embodiment, determining whether the target application in the current desktop image is a re-rendering application at the top level includes:
detecting whether a target application program in a re-rendering application list is operated in a virtual machine corresponding to the client;
and if so, judging whether the display window of the target application program is positioned at the top layer of the current desktop.
Through the steps, the embodiment of the disclosure can quickly judge whether the target application program in the current desktop image is the re-rendering application program located at the top layer.
In one embodiment, determining whether the target application in the current desktop image is a re-rendering application at the top level includes:
acquiring information of a target application program currently positioned at a top layer of a desktop;
comparing the obtained target application program information with the application program information in the re-rendering application program list;
and if the comparison is successful, determining that the application program currently positioned at the top layer of the desktop is the application program in the re-rendering application program list.
Through the steps, the embodiment of the disclosure provides another method for quickly judging whether the target application program in the current desktop image is the re-rendering application program located at the top layer.
In one embodiment, determining the window display position of the target application comprises:
acquiring a window handle of the target application program;
and determining the window display position of the target application program according to the window handle.
Through the steps, the window display position of the target application program is determined according to the acquired window handle of the target application program, and the method is simple and reliable.
In one embodiment, obtaining a first rendering sub-instruction for a window display location of the target application comprises:
acquiring a rendering instruction of a desktop image in an operating system;
and extracting a first rendering sub-instruction of the window display position of the target application program in the rendering instruction.
Through the steps, the cloud server obtains the rendering instruction of the desktop image from the operating system, and then extracts the rendering work needing to be completed by the client, so that the subsequent division of the rendering work task is facilitated.
In one embodiment, the method further comprises:
and when the display window of the target application program is full screen, sending a notification message for indicating that the target application program is full screen to the client, so that the client takes the first image obtained by rendering as a target image.
Through the steps, after the client receives the notification message, when the image rendering of the display window of the target application program is completed, the first image obtained through rendering can be directly used as the final display image.
According to a second aspect of the embodiments of the present disclosure, an image rendering apparatus is provided, which includes a determining module, a transceiver module, and a rendering module;
the judging module is used for judging whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value;
the determining module is used for determining the window display position of the target application program when the judgment result of the judging module is yes;
the transceiver module is configured to acquire a first rendering sub-instruction for a window display position of the target application program, and send the first rendering sub-instruction to the client, so that the client performs image rendering to obtain a first image; the method further comprises the steps of obtaining a residual desktop image and a second rendering sub-instruction aiming at the residual desktop image when a display window of the target application program is not a full screen;
the rendering module is used for rendering the residual desktop images according to the second rendering sub-instruction to obtain second images;
the transceiver module is further configured to send the second image to the client, so that the client merges the first image and the second image to obtain a target image.
The image rendering device provided by the embodiment of the disclosure comprises a judging module, a determining module, a transceiving module and a rendering module. The judging module judges whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value; the determining module is used for determining the window display position of the target application program when the judgment result of the judging module is positive; the method comprises the steps that a transceiving module obtains a first rendering sub-instruction aiming at a window display position of a target application program, and sends the first rendering sub-instruction to a client side so that the client side can perform image rendering to obtain a first image; the method further comprises the steps of obtaining the residual desktop images and second rendering sub-instructions aiming at the residual desktop images when the display window of the target application program is not full screen; the rendering module renders the rest desktop images according to the second rendering sub-instruction to obtain second images; the transceiver module also sends the second image to the client, so that the client combines the first image and the second image to obtain the target image. According to the method, a part of image rendering work in the desktop image is carried out at the client, the rest image rendering work is carried out at the cloud server, and finally the client combines two rendering results to generate the final desktop image. By the method, the image rendering resources of the client device are fully utilized, the image rendering load of the cloud server can be reduced, and meanwhile, the cloud server does not need to send a complete rendering image to the client, so that the data transmission amount is reduced, and the bandwidth is saved.
In an embodiment, the apparatus further includes a setting module, configured to preset a re-rendering application list, where the re-rendering application list includes at least one application program whose dependency on rendering resources is greater than a preset threshold.
According to the embodiment of the disclosure, through the setting, the setting module generates the re-rendering application list in advance for the application program with the rendering resource dependence degree greater than the preset threshold value, which is beneficial to subsequently judging the target application program.
In one embodiment, the transceiver module comprises an acquisition unit, an extraction unit and a transmission unit;
the acquisition unit is used for acquiring a rendering instruction of a desktop image in an operating system;
the extracting unit is used for extracting a first rendering sub-instruction of the window display position of the target application program in the rendering instruction;
and the sending unit is used for sending the first rendering sub-instruction to the client.
According to the embodiment of the disclosure, through the arrangement, the cloud server acquires the rendering instruction of the desktop image from the operating system, then extracts the rendering work needing to be completed by the client, and sends the part of the rendering work to the client, so that the subsequent client and the cloud server can complete the rendering work of the desktop image together.
According to a third aspect of embodiments of the present disclosure, there is provided an image rendering apparatus comprising a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the image rendering method of any one of the above.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein at least one computer instruction, which is loaded and executed by a processor to implement the steps performed in the image rendering method of any one of the above.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of an image rendering method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of an image rendering method provided by an embodiment of the present disclosure;
fig. 3 is a block diagram of an image rendering apparatus according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an image rendering apparatus according to an embodiment of the present disclosure;
fig. 5 is a structural diagram of an image rendering apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Generally, after the cloud server is connected with the client, a remote desktop corresponding to the current client is operated through a virtual machine corresponding to the cloud server, and a corresponding desktop image is sent to the current client. An embodiment of the present disclosure provides an image rendering method, as shown in fig. 1, the image rendering method includes the following steps:
step 101, judging whether a target application program in a current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value.
Specifically, when a plurality of applications are simultaneously run on the desktop, all the applications are tiled on the desktop in a stacked manner according to preset rules, and an application located at an upper layer can block an application located at a lower layer, so that a display window of the application located at a top layer is not blocked, and the application located at the top layer is usually an application that a user is using or has recently started, and a window image of the application is constantly changing and becomes a part of a whole frame of desktop image that needs to occupy more image rendering resources. In the present disclosure, if the display window of the re-rendering application program is located at the top layer of the desktop, rendering the image of the re-rendering application program located at the top layer to the client for rendering processing.
In one embodiment, before determining whether the target application in the current desktop image is a re-rendering application at the top level, the method further includes:
and presetting a re-rendering application list, wherein the re-rendering application list comprises at least one application program with the dependence degree on rendering resources larger than a preset threshold value.
Through the steps, the re-rendering application list is generated in advance for the application program with high dependence degree on rendering resources, and subsequent judgment on the target application program is facilitated.
In one embodiment, determining whether the target application in the current desktop image is a re-rendering application at the top level includes:
detecting whether a target application program in a re-rendering application list runs in a virtual machine corresponding to a client;
and if so, judging whether the display window of the target application program is positioned at the top layer of the current desktop.
In this embodiment, if it is detected that the target application program in the re-rendering application list is not run in the virtual machine corresponding to the client, the detection of the application program is continued; further, if the display window of the target application program is judged not to be located at the top layer of the current desktop, the stacking position of the display window of the target application program is continuously detected. Through the steps, the embodiment of the disclosure can quickly judge whether the target application program in the current desktop image is the re-rendering application program located at the top layer.
In one embodiment, determining whether the target application in the current desktop image is a re-rendering application at the top level includes:
acquiring information of a target application program currently positioned at a top layer of a desktop;
comparing the obtained target application program information with the application program information in the re-rendering application program list;
and if the comparison is successful, determining that the application program currently positioned at the top layer of the desktop is the application program in the re-rendering application program list.
Through the steps, the embodiment of the disclosure provides another method for quickly judging whether the target application program in the current desktop image is the re-rendering application program located at the top layer.
And 102, if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client so that the client performs image rendering to obtain a first image.
In one embodiment, determining the window display position of the target application includes:
acquiring a window handle of a target application program;
and determining the window display position of the target application program according to the window handle.
Specifically, by acquiring the window handle of the target application program, the window display position of the target application program can be determined, that is, the display position of the display interface of the current target application program in the current frame image is determined.
In one embodiment, obtaining a first rendering sub-instruction for a window display position of a target application comprises:
acquiring a rendering instruction of a desktop image in an operating system;
and extracting a first rendering sub-instruction of the window display position of the target application program in the rendering instruction.
In this embodiment, the client performs image rendering according to the 3D rendering related instruction.
Specifically, in the prior art, when the operating system receives an image rendering request sent by the application layer, the received data request is "translated" into rendering instructions that can be recognized by the graphics card, and then the rendering instructions are sent to the graphics card, and the graphics card executes the rendering instructions to perform image rendering. Different from the prior art, in the present disclosure, before an operating system (for example, through a Windows Display Driver Model (WDDM)) sends rendering instructions obtained by "translation" to a graphics card, a cloud server intercepts and captures the rendering instructions, fetches a rendering instruction corresponding to a "window display position of a target application" according to position information carried in the rendering instruction, sends the fetched rendering instruction to a client, and after receiving the rendering instruction, the client directly gives the rendering instruction to a graphics card local to the client, and performs image rendering of a display window of the target application by executing the rendering instruction in the graphics card.
In one embodiment, the method further comprises: and if the target application program located at the top layer of the desktop at present is judged not to be the application program in the re-rendering application program list, continuing to judge.
103, when the display window of the target application program is not full screen, obtaining the remaining desktop image and a second rendering sub-instruction for the remaining desktop image, rendering the remaining desktop image according to the second rendering sub-instruction to obtain a second image, and sending the second image to the client, so that the client merges the first image and the second image to obtain the target image; the remaining desktop image is an image of the window display position of the desktop image removal target application program.
In this embodiment, the remaining rendering instructions are rendered at the cloud server. The image rendered by the cloud server is a desktop image lacking a target application program display window, and the lacking application program display window can be filled with blanks. After the client renders the image of the display window of the target application program according to the received rendering instruction, merging the two partial images, specifically: and overlaying an image (a first image) of a target application program display window obtained by local rendering of the client on a blank area of a second image received from the cloud server, so as to obtain a frame of complete desktop image.
In one embodiment, the method further comprises: when a display window of the target application program is full screen, sending a notification message for indicating that the target application program is full screen to the client, so that the client takes the rendered first image as a target image.
In this embodiment, when the display window of the target application program is in a full-screen state, the cloud server does not need to perform image rendering, and at this time, the cloud server only needs to send a notification message for indicating that the target application program is displayed in a full-screen state while sending a rendering instruction for the display window of the target application program to the client. After receiving the notification message, the client directly displays the rendered first image as a final display image when finishing the image rendering of the display window of the target application program.
The image rendering method provided by the embodiment of the disclosure includes the steps of firstly, judging whether a target application program in a current desktop image is a re-rendering application program located at a top layer, wherein the re-rendering application program is an application program with dependence degree on image rendering resources larger than a preset threshold value; if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client so as to enable the client to perform image rendering to obtain a first image; when the display window of the target application program is not full screen, obtaining the residual desktop image and a second rendering sub-instruction aiming at the residual desktop image, rendering the residual desktop image according to the second rendering sub-instruction to obtain a second image, and sending the second image to the client so that the client merges the first image and the second image to obtain a target image; the remaining desktop image is an image of the window display position of the desktop image removal target application program. According to the method, a part of image rendering work in the desktop image is carried out at the client, the rest image rendering work is carried out at the cloud server, and finally the client combines two rendering results to generate the final desktop image. By the method, the image rendering resources of the client device are fully utilized, the image rendering load of the cloud server can be reduced, and meanwhile, the cloud server does not need to send a complete rendering image to the client, so that the data transmission amount is reduced, and the bandwidth is saved.
Based on the image rendering method provided in the embodiment corresponding to fig. 1, another embodiment of the present disclosure provides an image rendering method, which is applied to run a remote desktop corresponding to a current client through a virtual machine corresponding to a cloud server after the cloud server establishes a connection with the client, and send a corresponding desktop image to the current client. Referring to fig. 2, the image rendering method provided in this embodiment includes the following steps:
step 201, pretreatment: generating a re-rendering application list;
the method comprises the following steps that a preprocessing step is carried out, a re-rendering application list is preset by a system, and an application program with high dependence degree on rendering resources is added to the re-rendering application list by a cloud administrator user according to needs;
step 202, the cloud server judges whether the application program currently positioned at the top layer of the desktop is an application in a re-rendering application program list or not; if yes, go to step 203, if not, continue judging;
specifically, whether the application program located at the top layer of the desktop is the re-rendering application program can be judged in the following two ways:
the first mode is as follows:
s11, the cloud server detects whether an application program (defined as a target application program) in the re-rendering application list is operated in the virtual machine corresponding to the current client; if yes, go to step S12; if not, continuing to detect the application program;
s12, judging whether the detected display window of the target application program is positioned at the top layer of the current desktop or not; if so, determining that the application program currently positioned at the top layer of the desktop is a re-rendering application program; if not, the stack position of the display window of the target application program is continuously detected.
The second mode is as follows:
s21, the cloud server acquires the information (name) of the application program currently positioned at the top layer of the desktop;
and S22, the cloud server compares the obtained application program information with the application information in the re-rendering application program list, and if the comparison is successful, the application program located at the top layer of the desktop at present is determined to be the re-rendering application program.
Specifically, when a plurality of applications are simultaneously run on the desktop, all the applications are tiled on the desktop in a stacked manner according to preset rules, and the application located on the upper layer can block the application located on the lower layer, so that the display window of the application located on the top layer cannot be blocked. The application program at the top layer is usually the application program being used by the user or being opened recently, and the window image of the application program is in a continuous change and becomes a part of the whole frame of desktop image which needs to occupy more image rendering resources.
Step 203, determining a window display position of the target application program, sending a rendering instruction aiming at the window display position in the rendering instruction of the current frame desktop image to a client, and performing image rendering by the client;
specifically, by acquiring the window handle of the target application program, the window display position of the application program can be determined, that is, the display position of the display interface of the current target application program in the current frame image is determined.
After the window display position of the target application program is determined, a rendering instruction for the window display position needs to be obtained from current system rendering instructions, and the part of the image rendering instruction needs to be sent to the client.
Specifically, the method for obtaining the rendering instruction for the window display position from the current system rendering instruction may be implemented by:
the cloud server acquires rendering related instructions from an operating system; and sending the obtained rendering related instruction to the client, and rendering the image by the client according to the 3D rendering related instruction.
Specifically, in the prior art, when the operating system receives an image rendering request sent by the application layer, the received data request is "translated" into rendering instructions that can be recognized by the graphics card, and then the rendering instructions are executed by the graphics card to perform image rendering after the data request is sent to the graphics card. Different from the prior art, the key points of the application are as follows: before an operating system (for example, a Windows Display Driver Model (WDDM)) sends rendering instructions obtained by "translation" to a graphics card, a cloud server intercepts the rendering instructions, fetches a rendering instruction corresponding to the aforementioned "window display position of a target application program" according to position information carried in the rendering instruction, sends the fetched rendering instruction to a client, and after receiving the rendering instruction, the client can directly give the rendering instruction to a local graphics card of the client, and performs image rendering of a display window of the target application program by executing the rendering instruction in the graphics card; and the rest of rendering instructions are rendered at the cloud server. The image rendered by the cloud server is a desktop image lacking a target application program display window, and the lacking application program display window can be filled with blanks.
By the method, one part (the target application program display interface) in the current frame image is rendered at the client, and the rest part is rendered at the cloud server.
When the display window of the target application program is in a full-screen state, the cloud server does not need to perform image rendering, and at this time, the cloud server only needs to send a notification message for indicating that the target application program is in a full-screen display mode while sending a rendering instruction for the display window of the target application program to the client. After receiving the notification message, the client directly displays the rendered first image as a final display image after finishing the image rendering of the display window of the target application program.
Step 204, the cloud server sends the rendered second image to the client, and the client locally renders the second image according to a rendering instruction received from the cloud server to obtain a first image;
in the step, rendering instructions received by the client from the cloud server are directly delivered to the display card, and the image rendering of the target application program display window is realized by executing the rendering instructions.
And step 205, the client combines the first image and the second image to obtain a final required target image, and displays the target image.
Specifically, when the cloud server performs image rendering, the position of the target application program display window is filled with a blank, and after the client renders the image of the target application program display window according to the received rendering instruction, the two parts of images are merged, specifically: and overlaying an image (a first image) of a target application program display window obtained by local rendering of the client on a blank area of a second image received from the cloud server, so as to obtain a frame of complete desktop image.
The image rendering method provided by the embodiment of the disclosure includes firstly, judging whether a target application program in a current desktop image is a re-rendering application program located at a top layer; if the judgment is yes, determining the window display position of the target application program, acquiring a rendering instruction aiming at the window display position of the target application program from the rendering instruction of the desktop image, and sending the rendering instruction to the client so as to enable the client to perform image rendering to obtain a first image; and performing image rendering on the rendering instructions of the residual desktop images to obtain second images, and sending the second images to the client so that the client combines the first images and the second images to obtain target images. According to the method, a part of image rendering work is carried out at the client, the rest image rendering work is carried out at the cloud server, and finally the client combines two rendering results to generate a final desktop image. By the method, the image rendering resources of the client device are fully utilized, the image rendering load of the cloud server can be reduced, and meanwhile, the cloud server does not need to send a complete rendering image to the client, so that the data transmission amount is reduced, and the bandwidth is saved.
Based on the image rendering method described in the embodiment corresponding to fig. 1 and fig. 2, the following is an embodiment of the apparatus of the present disclosure, which may be used to execute an embodiment of the method of the present disclosure.
An embodiment of the present disclosure provides an image rendering apparatus, as shown in fig. 3, the image rendering apparatus 30 includes: a judging module 301, a determining module 302, a transceiving module 303 and a rendering module 304;
the judging module 301 is configured to judge whether a target application in a current desktop image is a re-rendering application located at a top layer, where the re-rendering application is an application whose dependency on image rendering resources is greater than a preset threshold;
a determining module 302, configured to determine a window display position of the target application program when the determination result of the determining module 301 is yes;
the transceiving module 303 is configured to obtain a first rendering sub-instruction for a window display position of a target application program, and send the first rendering sub-instruction to a client, so that the client performs image rendering to obtain a first image; the method further comprises the steps of obtaining the residual desktop images and second rendering sub-instructions aiming at the residual desktop images when the display window of the target application program is not full screen;
the rendering module 304 is configured to render the remaining desktop images according to the second rendering sub-instruction to obtain second images;
the transceiver module 303 is further configured to send the second image to the client, so that the client merges the first image and the second image to obtain the target image.
The image rendering device provided by the embodiment of the present disclosure includes a determining module 301, a determining module 302, a transceiving module 303, and a rendering module 304. The judging module 301 judges whether a target application program in a current desktop image is a re-rendering application program located at a top layer, where the re-rendering application program is an application program whose dependency on image rendering resources is greater than a preset threshold; the determining module 302 is configured to determine a window display position of the target application program when the determination result of the determining module 301 is yes; the transceiving module 303 acquires a first rendering sub-instruction for a window display position of a target application program, and sends the first rendering sub-instruction to the client, so that the client performs image rendering to obtain a first image; the method further comprises the steps of obtaining the residual desktop images and second rendering sub-instructions aiming at the residual desktop images when the display window of the target application program is not full screen; the rendering module 304 renders the remaining desktop images according to the second rendering sub-instruction to obtain second images; the transceiver module 303 further sends the second image to the client, so that the client combines the first image and the second image to obtain the target image. According to the method, a part of image rendering work in the desktop image is carried out at the client, the rest image rendering work is carried out at the cloud server, and finally the client combines two rendering results to generate the final desktop image. By the method, the image rendering resources of the client device are fully utilized, the image rendering load of the cloud server can be reduced, and meanwhile, the cloud server does not need to send a complete rendering image to the client, so that the data transmission amount is reduced, and the bandwidth is saved.
In one embodiment, as shown in fig. 4, the apparatus further includes a setting module 305, configured to preset a re-rendering application list, where the re-rendering application list includes at least one application program whose dependency on rendering resources is greater than a preset threshold.
Through the above setting, the setting module 305 generates a re-rendering application list in advance for the application program whose dependency on rendering resources is greater than the preset threshold, which is beneficial to subsequently judging the target application program.
In one embodiment, as shown in fig. 5, the transceiver module 303 includes an obtaining unit 3031, an extracting unit 3032 and a transmitting unit 3033;
an obtaining unit 3031, configured to obtain a rendering instruction of a desktop image in an operating system;
an extracting unit 3032, configured to extract a first rendering sub-instruction of a window display position of a target application program in the rendering instruction;
a sending unit 3033, configured to send the first rendering sub-instruction to the client.
According to the embodiment of the disclosure, through the arrangement, the cloud server acquires the rendering instruction of the desktop image from the operating system, then extracts the rendering work needing to be completed by the client, and sends the part of the rendering work to the client, so that the subsequent client and the cloud server can complete the rendering work of the desktop image together.
Based on the image rendering method described in the embodiment corresponding to fig. 1 and fig. 2, another embodiment of the present disclosure further provides an image rendering device, which includes a processor and a memory, where the memory stores at least one computer instruction, and the instruction is loaded and executed by the processor to implement the image rendering method described in the embodiment corresponding to fig. 1 and fig. 2.
Based on the image rendering method described in the embodiment corresponding to fig. 1 and fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores at least one computer instruction, and the computer instruction is loaded by the processor and is used for executing the image rendering method described in the embodiment corresponding to fig. 1 and fig. 2, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of image rendering, the method comprising:
judging whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value;
if so, determining the window display position of the target application program, acquiring a first rendering sub-instruction aiming at the window display position of the target application program, and sending the first rendering sub-instruction to the client so as to enable the client to perform image rendering to obtain a first image;
when a display window of the target application program is not full screen, obtaining a residual desktop image and a second rendering sub-instruction aiming at the residual desktop image, rendering the residual desktop image according to the second rendering sub-instruction to obtain a second image, and sending the second image to the client, so that the client combines the first image and the second image to obtain a target image; the residual desktop image is the image of the desktop image except the window display position of the target application program.
2. The image rendering method of claim 1, wherein before determining whether the target application in the current desktop image is a re-rendering application at a top level, the method further comprises:
presetting a re-rendering application list, wherein the re-rendering application list comprises at least one application program with the dependence degree on rendering resources larger than a preset threshold value.
3. The image rendering method of claim 2, wherein the determining whether the target application in the current desktop image is a re-rendering application at a top layer comprises:
detecting whether a target application program in a re-rendering application list is operated in a virtual machine corresponding to the client;
and if so, judging whether the display window of the target application program is positioned at the top layer of the current desktop.
4. The image rendering method of claim 2, wherein the determining whether the target application in the current desktop image is a re-rendering application at a top layer comprises:
acquiring information of a target application program currently positioned at a top layer of a desktop;
comparing the obtained target application program information with the application program information in the re-rendering application program list;
and if the comparison is successful, determining that the application program currently positioned at the top layer of the desktop is the application program in the re-rendering application program list.
5. The image rendering method of claim 1, wherein the determining the window display position of the target application comprises:
acquiring a window handle of the target application program;
and determining the window display position of the target application program according to the window handle.
6. The image rendering method of claim 1, wherein the obtaining a first rendering sub-instruction for a window display position of the target application comprises:
acquiring a rendering instruction of a desktop image in an operating system;
and extracting a first rendering sub-instruction of the window display position of the target application program in the rendering instruction.
7. The image rendering method of claim 1, further comprising:
and when the display window of the target application program is full screen, sending a notification message for indicating that the target application program is full screen to the client, so that the client takes the first image obtained by rendering as a target image.
8. An image rendering apparatus, comprising: the device comprises a judging module, a determining module, a transmitting-receiving module and a rendering module;
the judging module is used for judging whether a target application program in the current desktop image is a re-rendering application program positioned at the top layer, wherein the re-rendering application program is an application program with the dependence degree on image rendering resources larger than a preset threshold value;
the determining module is used for determining the window display position of the target application program when the judgment result of the judging module is yes;
the transceiver module is configured to acquire a first rendering sub-instruction for a window display position of the target application program, and send the first rendering sub-instruction to the client, so that the client performs image rendering to obtain a first image; the method further comprises the steps of obtaining a residual desktop image and a second rendering sub-instruction aiming at the residual desktop image when a display window of the target application program is not a full screen;
the rendering module is used for rendering the residual desktop images according to the second rendering sub-instruction to obtain second images;
the transceiver module is further configured to send the second image to the client, so that the client merges the first image and the second image to obtain a target image.
9. An image rendering device comprising a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to carry out the steps performed in the image rendering method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one computer instruction, which is loaded and executed by a processor, to implement the steps performed in the image rendering method of any one of claims 1 to 7.
CN202010803845.XA 2020-08-11 2020-08-11 Image rendering method and device Pending CN112099884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010803845.XA CN112099884A (en) 2020-08-11 2020-08-11 Image rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010803845.XA CN112099884A (en) 2020-08-11 2020-08-11 Image rendering method and device

Publications (1)

Publication Number Publication Date
CN112099884A true CN112099884A (en) 2020-12-18

Family

ID=73752888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010803845.XA Pending CN112099884A (en) 2020-08-11 2020-08-11 Image rendering method and device

Country Status (1)

Country Link
CN (1) CN112099884A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113244614A (en) * 2021-06-07 2021-08-13 腾讯科技(深圳)有限公司 Image picture display method, device, equipment and storage medium
WO2023045392A1 (en) * 2021-09-26 2023-03-30 华为技术有限公司 Cloud mobile phone implementation method and apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577327A (en) * 2011-12-26 2012-07-11 华为技术有限公司 Method, apparatus and system for realizing web browsing in remote desk environment
CN104765636A (en) * 2014-01-02 2015-07-08 华为技术有限公司 Remote desktop image synthesis method and device
CN105025335A (en) * 2015-08-04 2015-11-04 合肥云中信息科技有限公司 Method for video synchronization rendering in environment of cloud desktop
CN110213265A (en) * 2019-05-29 2019-09-06 腾讯科技(深圳)有限公司 Image acquiring method, device, server and storage medium
CN110458748A (en) * 2019-06-27 2019-11-15 西安万像电子科技有限公司 Data transmission method, server and client
CN111354063A (en) * 2020-03-10 2020-06-30 深信服科技股份有限公司 Three-dimensional element rendering method, desktop cloud server and desktop cloud system
CN111475255A (en) * 2020-03-18 2020-07-31 西安万像电子科技有限公司 Image processing method, server and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577327A (en) * 2011-12-26 2012-07-11 华为技术有限公司 Method, apparatus and system for realizing web browsing in remote desk environment
CN104765636A (en) * 2014-01-02 2015-07-08 华为技术有限公司 Remote desktop image synthesis method and device
CN105025335A (en) * 2015-08-04 2015-11-04 合肥云中信息科技有限公司 Method for video synchronization rendering in environment of cloud desktop
CN110213265A (en) * 2019-05-29 2019-09-06 腾讯科技(深圳)有限公司 Image acquiring method, device, server and storage medium
CN110458748A (en) * 2019-06-27 2019-11-15 西安万像电子科技有限公司 Data transmission method, server and client
CN111354063A (en) * 2020-03-10 2020-06-30 深信服科技股份有限公司 Three-dimensional element rendering method, desktop cloud server and desktop cloud system
CN111475255A (en) * 2020-03-18 2020-07-31 西安万像电子科技有限公司 Image processing method, server and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113244614A (en) * 2021-06-07 2021-08-13 腾讯科技(深圳)有限公司 Image picture display method, device, equipment and storage medium
CN113244614B (en) * 2021-06-07 2021-10-26 腾讯科技(深圳)有限公司 Image picture display method, device, equipment and storage medium
WO2022257699A1 (en) * 2021-06-07 2022-12-15 腾讯科技(深圳)有限公司 Image picture display method and apparatus, device, storage medium and program product
WO2023045392A1 (en) * 2021-09-26 2023-03-30 华为技术有限公司 Cloud mobile phone implementation method and apparatus

Similar Documents

Publication Publication Date Title
US8467631B2 (en) Method and apparatus for identification of image uniqueness
US11366564B2 (en) Electronic device and method for multi-view browsing in an augmented reality environment
US11099657B2 (en) Remote information input method, device and system
US11727707B2 (en) Automatic image capture system based on a determination and verification of a physical object size in a captured image
CN112099884A (en) Image rendering method and device
CN113407086B (en) Object dragging method, device and storage medium
CN111459594A (en) Display interface processing method, device and system
US20220392101A1 (en) Training method, method of detecting target image, electronic device and medium
US10496694B2 (en) Rating and advising for selection of augmented reality markers
CN109445760B (en) Image rendering method and system
US20180336243A1 (en) Image Search Method, Apparatus and Storage Medium
US20140156736A1 (en) Apparatus and method for managing threads to perform divided execution of software
CN112642145A (en) Cloud game running system and method
CN111111175A (en) Game picture generation method and device and mobile terminal
US20200371822A1 (en) Method and device for displaying, on a local terminal, an application executed on a remote server by means of a remote office protocol
CN114338897B (en) Method and device for sharing objects, electronic equipment and storage medium
CN113641439B (en) Text recognition and display method, device, electronic equipment and medium
WO2021032160A1 (en) Image processing method and apparatus, and content sharing method and device
CN111814220B (en) CAE cloud simulation implementation method
US9361540B2 (en) Fast image processing for recognition objectives system
CN111882629A (en) Image rendering method, device and equipment and storage medium
CN111818150A (en) CAE simulation system based on cloud platform
CN112491974A (en) Remote browsing method and device, storage medium, terminal equipment and server
WO2017161476A1 (en) Rating and advising for selection of augmented reality markers
CN114398131B (en) Information display method, device, equipment, medium and program product

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