Image processing method, system and server
By only transmitting the area data where the current frame image changes compared to the previous frame image in the image processing system, the problem of large bandwidth usage and low user experience caused by the server transmitting the entire frame image is solved, achieving more efficient data transmission and improving user experience. .
Patent Information
- Application Number
- CN202310410896.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2024-10-18
AI Technical Summary
During the application development and testing phase, the server transmits the entire frame of image data, which consumes a lot of bandwidth and degrades the user experience. Especially when bandwidth is insufficient, the page on the remote simulator becomes severely stuck.
By generating drawing instructions, the image data of the drawing area where the current frame image has changed relative to the previous frame image is obtained, and only the image data of this area is transmitted to avoid transmitting the entire frame of image data, thereby reducing bandwidth usage.
It reduces the amount of transmitted data, reduces bandwidth usage, improves user experience, and improves the image display performance of remote simulators or cloud phones.
Smart Images

Figure CN118803091A_ABST
Abstract
Description
[Technical field]
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an image processing method, system and server. [Background technology]
[0002] At present, during the development and testing phase of an application, application developers need to use a server to perform debugging and other operations. For example, the server includes a remote real machine, a cloud phone, or a remote simulator. Currently, the server can transmit the entire image data frame by frame to the remote device. Specifically, the server can obtain the image data of the entire frame through the mobile screen projection tool "scrcpy" or the remote control tool "vnc server", and then encode and compress the image data of the entire frame and remotely transmit the encoded and compressed image data to the client, so that the client can decode the encoded and compressed image data to obtain the image data of the entire frame for display.
[0003] Since the data transmitted by the server is the image data of the entire frame, the amount of data transmitted is large, which occupies a large bandwidth. Therefore, when the bandwidth is insufficient, it is easy to cause page jams. Since one physical machine can simulate multiple remote simulators, the page jams on the remote simulator are more serious, thus reducing the user experience. [Summary of the invention]
[0004] In view of this, embodiments of the present invention provide an image processing method, system and server for reducing the amount of transmitted data and lowering the bandwidth occupied during transmission, thereby improving user experience.
[0005] A first aspect provides an image processing system, the system comprising: a server and a client;
[0006] The server is used to obtain image data of a drawing area according to the generated drawing instruction, wherein the drawing area includes an area where a current frame image changes relative to a previous frame image;
[0007] The server is used to transmit the image data of the drawing area to the client.
[0008] In a possible implementation, the server includes a client side and a host side;
[0009] The client terminal is used to transmit the drawing instruction to the host terminal, wherein the drawing instruction includes identification information of the drawing area;
[0010] The host end is used to parse the drawing instruction to obtain the identification information and record the identification information, and drive the graphics processor GPU to render and generate image data of the drawing area according to the drawing instruction;
[0011] The host end is used for caching the image data of the drawing area;
[0012] The host end is used to obtain image data of the corresponding drawing area according to the identification information.
[0013] In a possible implementation manner, the client terminal is further used to generate the drawing instruction.
[0014] In a possible implementation, the server includes a remote simulator or a cloud phone.
[0015] In a possible implementation, the drawing instruction includes identification information of the drawing area;
[0016] The server is used to record the identification information, and drive the GPU to render and generate image data of the drawing area according to the drawing instruction;
[0017] The server is used for caching the image data of the drawing area;
[0018] The server is used for acquiring image data of the corresponding drawing area according to the identification information.
[0019] In a possible implementation manner, the server is further configured to generate the drawing instruction.
[0020] In a possible implementation, the server includes a remote real machine.
[0021] In a possible implementation manner, the identification information includes location information.
[0022] In a possible implementation manner, the drawing area includes a rectangular area, and the identification information includes coordinates of vertices of the rectangular area.
[0023] In a possible implementation, the client is further configured to display a current frame image according to the image data of the drawing area and the acquired image data of a previous frame image.
[0024] A second aspect provides an image processing method, the method comprising:
[0025] Acquire image data of a drawing area according to the generated drawing instruction, wherein the drawing area includes an area where the current frame image changes relative to the previous frame image;
[0026] The image data of the drawing area is transmitted to the client.
[0027] In a possible implementation, the drawing instruction includes identification information of the drawing area; and acquiring image data of the drawing area according to the generated drawing instruction includes:
[0028] Recording the identification information, and driving the GPU to render and generate image data of the drawing area according to the drawing instruction;
[0029] caching the image data of the drawing area;
[0030] The image data of the corresponding drawing area is acquired according to the identification information.
[0031] In a possible implementation manner, the identification information includes location information.
[0032] In a possible implementation manner, the drawing area includes a rectangular area, and the identification information includes coordinates of vertices of the rectangular area.
[0033] The third aspect provides a server, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the server, enable the server to perform the image processing method in the second aspect or any possible implementation of the second aspect.
[0034] A fourth aspect provides a computer-readable storage medium, which includes a stored program, wherein when the program is run, the server where the computer-readable storage medium is located is controlled to execute the image processing method in the second aspect or any possible implementation of the second aspect.
[0035] In the technical solution provided by the embodiment of the present invention, the server obtains image data of the drawing area according to the generated drawing instructions, and transmits the image data of the drawing area to the client. Since the drawing area includes the area where the current frame image has changed relative to the previous frame image, the server only needs to transmit the image data of the drawing area, and there is no need to transmit the image data of the entire current frame, thereby reducing the amount of data transmitted and reducing the bandwidth occupied during transmission, thereby improving the user experience.
Brief Description of the Drawings
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 is a schematic diagram of the structure of an image processing system in some embodiments;
[0038] Figure 2 is an architectural diagram of a server in some embodiments;
[0039] Figure 3 is an architectural diagram of a server in some other embodiments;
[0040] Figure 4 is a flowchart of an image processing method in some embodiments;
[0041] Figure 5 a to Figure 5 d is a schematic diagram of an interface of an image processing method in some embodiments;
[0042] Figure 6a is a flow chart of an image processing method in some other embodiments;
[0043] Figure 6b is a schematic diagram of an image processing method in some embodiments;
[0044] Figure 7a is a flow chart of an image processing method in some other embodiments;
[0045] Figure 7b is a schematic diagram of an image processing method in some other embodiments;
[0046] Figure 8 is a schematic diagram of a server provided by some embodiments. [Specific implementation method]
[0047] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0048] It should be clear that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0050] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0051] Figure 1 is a schematic diagram of the structure of an image processing system in some embodiments, such as Figure 1 As shown, the image processing system includes: a server 100 and a client 200. Remote control can be implemented between the server 100 and the client 200. For example, the server 100 can remotely transmit the acquired image data to the client 200, and the client 200 displays the image data to implement remote image display. Exemplarily, the server 100 and the client 200 can implement remote control through a remote control tool. For example, the remote control tool can be a virtual network console (VNC), and the server 100 and the client 200 can implement remote image display through VNC.
[0052] like Figure 1 As shown, the server 100 is used to obtain image data of a drawing area according to the generated drawing instruction, and the drawing area includes an area where the current frame image changes relative to the previous frame image; the server 100 is used to transmit the image data of the drawing area to the client 200. Furthermore, the client 200 is also used to display the current frame image according to the image data of the drawing area and the image data of the previous frame image obtained.
[0053] In some embodiments, the server 100 includes but is not limited to Or devices with other operating systems. In the embodiment of the present invention, the server 100 may include a remote real machine, a cloud phone or a remote simulator, etc. For example, the server 100 may be installed with an application "VNC Server" applied to the server side, so that the server 100 can realize remote image display through the application "VNC Server".
[0054] In one possible implementation, Figure 2 is an architecture diagram of a server in some embodiments, such as Figure 2As shown, when the server 100 includes a remote simulator or a cloud phone, the server 100 includes a guest side and a host side. The server 100 also includes a graphics processing unit (GPU), which is not shown in the figure. The guest side is used to transmit drawing instructions to the host side, and the drawing instructions include identification information of the drawing area; the host side is used to parse the drawing instructions to obtain identification information and record the identification information, and drive the GPU to render and generate image data of the drawing area according to the drawing instructions; the host side is used to cache the image data of the drawing area; the host side is used to obtain the image data of the corresponding drawing area according to the identification information. Further, the guest side is also used to generate drawing instructions. As an optional solution, the drawing area includes a rectangular area, and the identification information includes the coordinates of the vertices of the rectangular area.
[0055] like Figure 2 As shown, the client side includes a target application (Application), a user interface hardware acceleration (HWUI) module, a virtual graphics driver module and a host connection (Host Connection) module. The target application is used to call the HWUI module so that the HWUI module calls the specified graphics interface to generate a drawing instruction, and the drawing instruction includes the identification information of the drawing area. For example, the specified graphics interface includes openGL, skiagl or skiakv. In an embodiment of the present invention, the client side calls the HWUI module through the target application so that the HUWI module calls openGL to generate a drawing instruction. The virtual graphics driver module is used to transmit the drawing instruction to the host connection (Host Connection) module. For example, the virtual graphics driver module is a "goldfishOpenGL" module. The host connection module is used to transmit the drawing instruction to the host side.
[0056] like Figure 2 As shown, the host side includes a rendering thread, a graphics card driver module, a frame buffer, and a VNC service. The rendering thread is used to parse the drawing instruction to obtain identification information and send the identification information to the VNC service. The rendering thread is also used to call the graphics card driver module so that the graphics card driver module calls the drawing instruction to drive the GPU to render and generate image data of the drawing area. The frame buffer is used to cache the image data of the drawing area. The VNC service is used to obtain the image data of the corresponding drawing area from the frame buffer according to the identification information, and transmit the image data of the drawing area to the client.
[0057] In another possible implementation, Figure 3 is an architecture diagram of a server in some other embodiments, such as Figure 3As shown, the server 100 includes a remote real machine. The drawing instruction includes identification information of the drawing area, and the server 100 is used to record the identification information and drive the GPU to render and generate image data of the drawing area according to the drawing instruction; the server 100 is used to cache the image data of the drawing area; the server 100 is used to obtain the image data of the corresponding drawing area according to the identification information. Further, the server 100 is also used to generate a drawing instruction. As an optional solution, the drawing area includes a rectangular area, and the identification information includes the coordinates of the vertices of the rectangular area.
[0058] The server 100 includes a target application (Application), a HWUI module, a graphics card driver module, a frame buffer, and a VNC service. The server 100 also includes a GPU, which is not shown in the figure. The target application is used to call the HWUI module so that the HWUI module calls a specified graphics interface to generate a drawing instruction, and the drawing instruction includes the identification information of the drawing area. For example, the specified graphics interface includes openGL, skiagl or skiakv. In an embodiment of the present invention, the server 100 calls the HWUI module through the target application so that the HUWI module calls openGL to generate a drawing instruction. The graphics card driver module is used to send the identification information to the VNC service. The graphics card driver module is also used to call the drawing instruction to drive the GPU to render and generate image data of the drawing area. For example, the graphics card driver module is an "OpenGL ES Impl" module. The frame buffer is used to cache the image data of the drawing area. The VNC service is used to obtain the image data of the corresponding drawing area from the frame buffer according to the identification information, and transmit the image data of the drawing area to the client.
[0059] In some embodiments, the client 200 includes but is not limited to Or devices with other operating systems, the client 200 includes but is not limited to mobile phones, tablet computers, laptops, desktop computers, smart screens, etc. For example, the client 200 can be installed with the application "VNCViewer" applied to the client, so that the client 200 can realize remote image display through the application "VNC Viewer", then the client 200 can be a network (web) vnc client or a Java vnc client. In actual applications, the client 200 can also use other types of clients, which is not limited in the embodiment of the present invention. Specifically, the client 200 can display the current frame image based on the image data of the drawing area and the image data of the previous frame image acquired.
[0060] In the technical solution provided by the embodiment of the present invention, the server obtains image data of the drawing area according to the generated drawing instructions, and transmits the image data of the drawing area to the client. Since the drawing area includes the area where the current frame image has changed relative to the previous frame image, the server only needs to transmit the image data of the drawing area, and there is no need to transmit the image data of the entire current frame, thereby reducing the amount of data transmitted and reducing the bandwidth occupied during transmission, thereby improving the user experience.
[0061] Figure 4 is a flowchart of an image processing method in some embodiments, Figure 5 a to Figure 5 d is a schematic diagram of an interface of an image processing method in some embodiments, such as Figure 4 , Figure 5 a to Figure 5 d, the method comprises:
[0062] Step 102: The server obtains image data of a drawing area according to the generated drawing instruction, where the drawing area includes an area where the current frame image changes relative to the previous frame image.
[0063] If the server determines that the current frame image has changed relative to the previous frame image, step 102 is executed. Figure 5 a shows the previous frame image, Figure 5 d shows the current frame image. Figure 5 The previous frame in a is the main interface of the mobile phone, on which a pop-up Figure 5 b, then Figure 5 As shown in c, the area where the current frame image changes relative to the previous frame image includes the rectangular area corresponding to the privacy statement box, and the drawing area includes the rectangular area corresponding to the privacy statement box, so that Figure 5 d shows the current frame image. In the embodiment of the present invention, the drawing area may be a rectangular area. To ensure that the changed images are all located within the rectangular area, regardless of whether the shape of the changed images is rectangular, the edge of the rectangular area must be located outside the edge of the changed images to confine the changed images to the rectangular area. Figure 5 b and Figure 5 c as an example, Figure 5 The privacy statement box shown in c is located in Figure 5 c is the rectangular area shown in Figure 5 The edge of the rectangular area shown in c is located outside the edge of the privacy statement box, thereby ensuring that the changed images are all located within the rectangular area, and further ensuring that the determined drawing area can include the area where the changed images are located, that is, ensuring that the drawing area can include all the changed areas. In the embodiment of the present invention, as an optional solution, if the shape of the changed image is a rectangle, the edge of the rectangular area is the edge of the changed image, which is not specifically drawn.
[0064] In the embodiment of the present invention, the drawing area may also be an area of other shapes, which is not limited in the embodiment of the present invention.
[0065] In the embodiment of the present invention, Figure 5 a to Figure 5 The interface schematic diagram shown in d is an exemplary display of an embodiment of the present invention. The interface schematic diagram may also be in other styles, and the embodiment of the present invention is not limited to this.
[0066] In the embodiment of the present invention, the drawing instruction is an instruction for acquiring image data of the drawing area, that is, the drawing instruction is an instruction for acquiring image data of the changed area, rather than an instruction for acquiring image data of the entire frame.
[0067] In a possible implementation, step 102 may specifically include: the server records the identification information, and drives the GPU to render and generate image data of the drawing area according to the drawing instruction; caches the image data of the drawing area; and obtains the image data of the corresponding drawing area according to the identification information. In an embodiment of the present invention, the identification information is used to identify the drawing area, and specifically, the identification information can be used to identify the position of the drawing area, and the identification information can be position information, for example, the position information can be coordinates.
[0068] Step 104: The server transmits the image data of the drawing area to the client.
[0069] In the embodiment of the present invention, the server can transmit only the image data of the drawing area without transmitting the image data of the entire current frame, thereby reducing the amount of transmitted data and the bandwidth occupied during transmission, thereby improving the user experience.
[0070] In a possible implementation, the server may encode and compress the image data of the drawing area to obtain the encoded and compressed image data of the drawing area, and transmit the encoded and compressed image data of the drawing area to the client. Since the server only encodes and compresses the image data of the drawing area, and does not need to encode and compress the image data of the entire current frame, the encoding and compression time of the image data is reduced, thereby further improving the user experience.
[0071] In another possible implementation, the server may not encode and compress the image data of the drawing area, but directly transmit the image data of the drawing area to the client.
[0072] Step 106: The client displays the current frame image according to the image data of the drawing area and the acquired image data of the previous frame image.
[0073] In the embodiment of the present invention, when displaying the previous frame of image, the client obtains the image data of the previous frame of image and displays the previous frame of image according to the image data of the previous frame of image. Then, when the client executes step 106, the current frame of image can be displayed according to the image data of the drawing area and the image data of the previous frame of image obtained.
[0074] In the embodiment of the present invention, in step 104, the server further transmits identification information of the drawing area to the client, for example, the image data of the drawing area carries the identification information. Then in step 106, the client replaces the image data of the position identified by the identification information in the image data of the previous frame image with the image data of the drawing area according to the identification information of the drawing area, so as to generate the image data of the current frame image; the client displays the current frame image according to the image data of the current frame image.
[0075] For example, Figure 5 a to Figure 5 d, the client will Figure 5 The image data at the position identified by the identification information in the image data of the previous frame of image shown in a is replaced by Figure 5 c to generate the image data of the drawing area Figure 5 d shows the image data of the current frame image; the client displays the image data of the current frame image according to the image data of the current frame image. Figure 5 d shows the current frame image.
[0076] In a possible implementation, if the server encodes and compresses the image data of the drawing area in step 104 , then the client decodes the encoded and compressed image data of the drawing area in step 106 to obtain the image data of the drawing area.
[0077] In the technical solution provided by the embodiment of the present invention, the server obtains image data of the drawing area according to the generated drawing instructions, and transmits the image data of the drawing area to the client. Since the drawing area includes the area where the current frame image has changed relative to the previous frame image, the server only needs to transmit the image data of the drawing area, and there is no need to transmit the image data of the entire current frame, thereby reducing the amount of data transmitted and reducing the bandwidth occupied during transmission, thereby improving the user experience.
[0078] The following is a specific example to illustrate that the server includes Figure 2 The workflow of the image processing method when using a remote simulator or cloud phone is shown. Figure 6a is a flowchart of an image processing method in some other embodiments, Figure 6b is a schematic diagram of an image processing method in some embodiments, such as Figure 6a and Figure 6b As shown, the method includes:
[0079] Step 202: The client generates a drawing instruction, where the drawing instruction includes identification information of a drawing area, and the drawing area includes an area where the current frame image has changed relative to the previous frame image.
[0080] like Figure 6b As shown, the client side calls the HWUI module through the target application so that the HWUI module calls the specified graphics interface to generate a drawing instruction. Specifically, the target application calls the HWUI module, and the HWUI module calls the specified graphics interface to generate a drawing instruction. For example, the specified graphics interface may include openGL, skiagl or skiakv. In the embodiment of the present invention, the specified graphics interface is described as openGL. Among them, the drawing instruction is an instruction for obtaining image data of the drawing area, that is, the drawing instruction is an instruction for obtaining image data of the changed area, rather than an instruction for obtaining the entire frame of image data.
[0081] like Figure 6b As shown, in order to make the solution of the embodiment of the present invention applicable to products of different manufacturers, the virtual graphics driver module transmits the drawing instructions to the host connection module. For example, the virtual graphics driver module is a "goldfish OpenGL" module, thereby implementing OpenGL as goldfish OpenGL.
[0082] In the embodiment of the present invention, the identification information is used to identify the drawing area. Specifically, the identification information can be used to identify the position of the drawing area. The identification information may be position information, such as coordinates.
[0083] In the embodiment of the present invention, the drawing area includes a rectangular area, and the identification information includes the coordinates of the vertices of the rectangular area, for example, the identification information includes the coordinates of the four vertices of the rectangular area to identify the position of the rectangular area. For example, the coordinates may be the positions of the pixel points corresponding to the vertices of the rectangular area, and the identification information may include the positions of the pixel points corresponding to the four vertices of the rectangular area.
[0084] Step 204: The client transmits the drawing instruction to the host.
[0085] like Figure 6b As shown, the host connection module transmits the drawing instruction to the host end.
[0086] Step 206: The host side analyzes the drawing instruction to obtain identification information and records the identification information, and drives the GPU to render and generate image data of the drawing area according to the drawing instruction.
[0087] In an embodiment of the present invention, in step 206, the host side may first parse the drawing instruction to obtain identification information and record the identification information, and then drive the GPU to render and generate image data of the drawing area according to the drawing instruction; or, the host side may first drive the GPU to render and generate image data of the drawing area according to the drawing instruction, and then parse the drawing instruction to obtain identification information and record the identification information; or, the host side may simultaneously execute the steps of parsing the drawing instruction to obtain identification information and record the identification information and the step of driving the GPU to render and generate image data of the drawing area according to the drawing instruction.
[0088] like Figure 6b As shown, the host side can start a rendering thread, the rendering thread parses the drawing instruction to obtain identification information and sends the identification information to the VNC service for the VNC service to record the identification information, and the rendering thread calls the graphics card driver module, so that the graphics card driver module calls the drawing instruction to drive the GPU to render and generate image data of the drawing area. In the embodiment of the present invention, the client side can start a rendering thread to execute steps 202 to 204, then in step 206, the host side can start a rendering thread corresponding to the rendering thread of the client to execute step 204.
[0089] Step 208: The host end caches the image data of the drawing area.
[0090] like Figure 6b As shown, the frame buffer caches the image data of the drawing area rendered by the GPU.
[0091] Step 210: The host terminal obtains image data of the corresponding drawing area according to the identification information.
[0092] Since each drawing area has identification information, that is, each drawing area corresponds to the identification information, and there is a corresponding relationship between the drawing area and the identification number information, the host side can obtain the image data of the drawing area corresponding to the identification information from the cached image data. Figure 6b As shown, the VNC service can obtain image data of the drawing area corresponding to the identification information from the frame buffer.
[0093] Step 212: The host transmits the image data of the drawing area to the client.
[0094] The host side can encode and compress the image data in the drawing area to obtain the encoded and compressed image data, and transmit the encoded and compressed image data to the client side. Figure 6bAs shown, the VNC service can encode and compress the image data of the drawing area to obtain the encoded and compressed image data of the drawing area, and transmit the encoded and compressed image data of the drawing area to the client. For example, the VNC service can transmit the encoded and compressed image data of the drawing area to the web vnc client or the Java vnc client.
[0095] Step 214: The client displays the current frame image according to the image data of the drawing area and the acquired image data of the previous frame image.
[0096] In a possible implementation, if the host end encodes and compresses the image data of the drawing area in step 212 , then the client end decodes the encoded and compressed image data of the drawing area in step 214 to obtain the image data of the drawing area.
[0097] In the embodiment of the present invention, the specific description of step 214 can refer to the description of step 106, which will not be repeated here.
[0098] In the technical solution provided by the embodiment of the present invention, the client side generates a drawing instruction, the host side parses the drawing instruction to obtain identification information and records the identification information, and drives the GPU to render according to the drawing instruction to generate image data of the drawing area, the host side caches the image data of the drawing area and obtains the corresponding image data of the drawing area according to the identification information, and the host side transmits the image data of the drawing area to the client side. Since the drawing area includes the area where the current frame image changes relative to the previous frame image, the remote simulator or cloud phone only needs to transmit the image data of the drawing area, and there is no need to transmit the image data of the entire current frame, thereby reducing the amount of data transmitted and reducing the bandwidth occupied during transmission, thereby improving the user experience and improving the vnc image display performance of the remote simulator or cloud phone.
[0099] The following is another specific embodiment to illustrate that the server includes Figure 3 The workflow of the image processing method on a remote real machine is shown. Figure 7a is a flowchart of an image processing method in some other embodiments, Figure 7b is a schematic diagram of an image processing method in some other embodiments, such as Figure 7a and Figure 7b As shown, the method includes:
[0100] Step 302: The server generates a drawing instruction, where the drawing instruction includes identification information of a drawing area, and the drawing area includes an area where the current frame image has changed relative to the previous frame image.
[0101] like Figure 7bAs shown, the server calls the HWUI module through the target application so that the HWUI module calls the specified graphics interface to generate a drawing instruction. Specifically, the target application calls the HWUI module, and the HWUI module calls the specified graphics interface to generate a drawing instruction. For example, the specified graphics interface may include openGL, skiagl, or skiakv. In the embodiment of the present invention, the specified graphics interface is described as openGL. Among them, the drawing instruction is an instruction for obtaining image data of the drawing area, that is, the drawing instruction is an instruction for obtaining image data of the changed area, rather than an instruction for obtaining the entire frame of image data.
[0102] In the embodiment of the present invention, the identification information is used to identify the drawing area. Specifically, the identification information can be used to identify the position of the drawing area. The identification information may be position information, such as coordinates.
[0103] In the embodiment of the present invention, the drawing area includes a rectangular area, and the identification information includes the coordinates of the vertices of the rectangular area, for example, the identification information includes the coordinates of the four vertices of the rectangular area to identify the position of the rectangular area. For example, the coordinates may be the positions of the pixel points corresponding to the vertices of the rectangular area, and the identification information may include the positions of the pixel points corresponding to the four vertices of the rectangular area.
[0104] Step 304: The server records the identification information and drives the GPU to render and generate image data of the drawing area according to the drawing instruction.
[0105] In an embodiment of the present invention, in step 304, the server may first record the identification information, and then drive the GPU to render and generate image data of the drawing area according to the drawing instruction; or, the server may first drive the GPU to render and generate image data of the drawing area according to the drawing instruction, and then record the identification information; or, the server may simultaneously perform the steps of recording the identification information and driving the GPU to render and generate image data of the drawing area according to the drawing instruction.
[0106] like Figure 7b As shown, the graphics card driver module sends the identification information to the VNC service so that the VNC service can record the identification information, and the graphics card driver module calls the drawing instructions to drive the GPU to render and generate image data of the drawing area. For example, the graphics card driver module is an "OpenGL ES Impl" module. This embodiment is applied to the remote real machine scenario. The remote real machine does not have a host and a client. By modifying the OpenGL ES hardware, the drawing instructions can be directly executed on the remote real machine. Step 306, the server caches the image data of the drawing area.
[0107] like Figure 7b As shown, the frame buffer caches the image data of the drawing area.
[0108] Step 308: The server obtains image data of the corresponding drawing area according to the identification information.
[0109] Since each drawing area has identification information, that is, each drawing area corresponds to the identification information, and there is a corresponding relationship between the drawing area and the identification number information, the server can obtain the image data of the drawing area corresponding to the identification information from the cached image data. Figure 7b As shown, the VNC service can obtain image data of the drawing area corresponding to the identification information from the frame buffer.
[0110] Step 310: The server transmits the image data of the drawing area to the client.
[0111] The server can encode and compress the image data in the drawing area to obtain the encoded and compressed image data, and transmit the encoded and compressed image data to the client. Figure 7b As shown, the VNC service can encode and compress the image data of the drawing area to obtain the encoded and compressed image data of the drawing area, and transmit the encoded and compressed image data of the drawing area to the client. For example, the VNC service can transmit the encoded and compressed image data of the drawing area to the web vnc client or the Java vnc client.
[0112] Step 312: The client displays the current frame image according to the image data of the drawing area and the acquired image data of the previous frame image.
[0113] In a possible implementation, if the server encodes and compresses the image data of the drawing area in step 310 , then in step 312 , the client decodes the encoded and compressed image data of the drawing area to obtain the image data of the drawing area.
[0114] In the embodiment of the present invention, the specific description of step 312 can refer to the description of step 106, which will not be repeated here.
[0115] In the technical solution provided by the embodiment of the present invention, the server generates a drawing instruction, records identification information, and drives the GPU to render and generate image data of the drawing area according to the drawing instruction, caches the image data of the drawing area and obtains the corresponding image data of the drawing area according to the identification information, and then transmits the image data of the drawing area to the client. Since the drawing area includes the area where the current frame image changes relative to the previous frame image, the remote real machine only needs to transmit the image data of the drawing area, and there is no need to transmit the image data of the entire current frame, thereby reducing the amount of data transmitted and reducing the bandwidth occupied during transmission, thereby improving the user experience and improving the vnc image display performance of the remote real machine.
[0116] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is executed, the server where the computer-readable storage medium is located is controlled to execute each step in the above-mentioned image processing method embodiment.
[0117] An embodiment of the present invention provides a computer program product including instructions. When the computer program product is run on a computer or any at least one processor, the computer is enabled to execute each step in the above-mentioned image processing method embodiment.
[0118] An embodiment of the present invention provides a server, which includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the server, enable the server to perform the various steps in the above-mentioned image processing method embodiment.
[0119] Figure 8 is a schematic diagram of a server provided by some embodiments, such as Figure 8 As shown, the server 100 includes: a processor 11, a memory 12, and a computer program 13 stored in the memory 12 and executable on the processor 11. When the computer program 13 is executed by the processor 11, the image processing method in the above-mentioned embodiment is implemented. To avoid repetition, they are not described one by one here.
[0120] The server 100 includes, but is not limited to, a processor 11 and a memory 12. Those skilled in the art will appreciate that Figure 8 It is only an example of the server 100 and does not constitute a limitation of the server 100. The server 100 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the server 100 may also include input and output devices, network access devices, buses, etc.
[0121] The processor 11 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0122] The memory 12 may be an internal storage unit of the server 100, such as a hard disk or memory of the server 100. The memory 12 may also be an external storage device of the server 100, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the server 100. Further, the memory 12 may also include both an internal storage unit of the server 100 and an external storage device. The memory 12 is used to store computer programs and other programs and data required by the server 100. The memory 12 may also be used to temporarily store data that has been output or is to be output.
[0123] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c may be single or multiple.
[0124] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0127] The above is only a specific embodiment of the present invention. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An image processing system, characterized in that: The system comprises: a server and a client; The server is used to obtain image data of a drawing area according to the generated drawing instruction, wherein the drawing area includes an area where a current frame image changes relative to a previous frame image; The server is used to transmit the image data of the drawing area to the client.
2. The system according to claim 1, characterized in that The server includes a client side and a host side; The client terminal is used to transmit the drawing instruction to the host terminal, wherein the drawing instruction includes identification information of the drawing area; The host end is used to parse the drawing instruction to obtain the identification information and record the identification information, and drive the graphics processor GPU to render and generate image data of the drawing area according to the drawing instruction; The host end is used for caching the image data of the drawing area; The host end is used to obtain image data of the corresponding drawing area according to the identification information.
3. The system according to claim 2, characterized in that The client terminal is also used to generate the drawing instruction.
4. The system according to any one of claims 1 to 3, characterized in that: The server includes a remote simulator or a cloud phone.
5. The system according to claim 1, characterized in that The drawing instruction includes identification information of the drawing area; The server is used to record the identification information, and drive the GPU to render and generate image data of the drawing area according to the drawing instruction; The server is used for caching the image data of the drawing area; The server is used for acquiring image data of the corresponding drawing area according to the identification information.
6. The system according to claim 5, characterized in that The server is further configured to generate the drawing instruction.
7. The system according to claim 1, 5 or 6, characterized in that: The server includes a remote real machine.
8. The system according to claim 2 or 5, characterized in that: The identification information includes location information.
9. The system according to claim 2 or 5, characterized in that: The drawing area includes a rectangular area, and the identification information includes coordinates of vertices of the rectangular area.
10. The system according to claim 1, characterized in that The client is also used to display the current frame image according to the image data of the drawing area and the acquired image data of the previous frame image.
11. An image processing method, characterized in that: The method comprises: Acquire image data of a drawing area according to the generated drawing instruction, wherein the drawing area includes an area where the current frame image changes relative to the previous frame image; The image data of the drawing area is transmitted to the client.
12. The method according to claim 11, characterized in that The drawing instruction includes identification information of the drawing area; and acquiring image data of the drawing area according to the generated drawing instruction includes: Recording the identification information, and driving the GPU to render and generate image data of the drawing area according to the drawing instruction; caching the image data of the drawing area; The image data of the corresponding drawing area is acquired according to the identification information.
13. The method according to claim 12, characterized in that The identification information includes location information.
14. The method according to claim 12, characterized in that The drawing area includes a rectangular area, and the identification information includes coordinates of vertices of the rectangular area.
15. A server, characterized in that: include: one or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the server, enable the server to execute the image processing method described in any one of claims 11 to 14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the server where the computer-readable storage medium is located is controlled to execute the image processing method according to any one of claims 11 to 14.
Citation Information
Cited By
Image processing method and electronic device
WO2026085755A1
