WO2021008183A1 - Data transmission method and apparatus, and server - Google Patents

Data transmission method and apparatus, and server Download PDF

Info

Publication number
WO2021008183A1
WO2021008183A1 PCT/CN2020/086293 CN2020086293W WO2021008183A1 WO 2021008183 A1 WO2021008183 A1 WO 2021008183A1 CN 2020086293 W CN2020086293 W CN 2020086293W WO 2021008183 A1 WO2021008183 A1 WO 2021008183A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
server
client
request
data processing
Prior art date
Application number
PCT/CN2020/086293
Other languages
French (fr)
Chinese (zh)
Inventor
李超
王知明
范志刚
Original Assignee
西安万像电子科技有限公司
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 西安万像电子科技有限公司 filed Critical 西安万像电子科技有限公司
Publication of WO2021008183A1 publication Critical patent/WO2021008183A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/194Transmission of image signals

Definitions

  • the present disclosure relates to the field of cloud computing technology, and in particular to data transmission methods, devices, and servers.
  • Cloud desktop technology refers to the technology in which users remotely access the server through the client, and the server provides the desktop image of the current server host to the remote client in a virtual manner.
  • the server transmits the image to the user through the screen copy, and the user obtains the desktop image sequence. After the image is compressed, it is transmitted to the cloud terminal through the network, and the terminal decodes the desktop image content.
  • the server side often needs to support a large number of client-side 3D image rendering jobs at the same time, which requires very high graphics processing unit (GPU) resources on the server side, but the existing servers generally do not have such powerful GPU resources, even those without 3D rendering capabilities.
  • GPU graphics processing unit
  • the server needs to be interrupted. During the interrupted period of time, the server will consume a certain amount of time and cost, and the configuration upgrade process needs to transform the interior of the server rack. This process is also very cumbersome. difficult.
  • the embodiments of the present disclosure provide a data transmission method, device, and server, which can solve the problems that the server cannot support a large number of 3D image rendering tasks in the current cloud desktop technology and the difficulty of upgrading the server is very high.
  • the technical solution is as follows:
  • a data transmission method including:
  • the server receives the client's request forwarded by the data processing device
  • the server obtains the instructions corresponding to the image rendering;
  • the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the server determines the image processing unit corresponding to the client in the data processing device
  • the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
  • the data processing device which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
  • the method further includes:
  • the server divides the image processing module of the data processing device into N image processing units; among them, each image processing unit can independently complete an image rendering task.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the server determining the image processing unit corresponding to the image rendering request of the client in the data processing apparatus includes:
  • the server obtains the identification of the client from the image rendering request
  • the server judges whether there is an image processing unit corresponding to the client according to the identifier of the client;
  • the server allocates a corresponding image processing unit to the client, and binds the client to the corresponding image processing unit.
  • the image processing unit By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
  • the server assigns the corresponding image processing unit to the client, including:
  • the server judges whether there is currently an idle image processing unit
  • the server selects an idle image processing unit to allocate to the client;
  • the server selects an image processing unit to allocate to the client according to a preset rule.
  • the server selects an image processing unit to allocate to the client according to preset rules, including:
  • the server finds the image processing unit with the least number of bound clients and allocates it to the client; or,
  • the server finds out the image processing unit with the lowest current processing load and assigns it to the client.
  • the server acquiring the instruction corresponding to image rendering includes:
  • the server intercepts the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
  • the server intercepts the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
  • the server operating system generates instructions in accordance with the client's request for 3D image rendering. By intercepting the instructions, the server can be used to perform 3D image rendering, with minimal changes and no burden on the server.
  • the method further includes:
  • the server processes the request according to the request and then transmits the processing result to the data processing device so that the data processing device forwards it to the client.
  • a data transmission method including:
  • the data processing device receives the client's request
  • the data processing device sends the client's request to the server;
  • the data processing device receives the instruction corresponding to the image rendering sent by the server;
  • the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the data processing device completes image rendering through the image processing module of the data processing device according to the instruction
  • the data processing device sends the image data obtained after the image rendering is completed to the client.
  • the data processing device a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without a troublesome upgrade.
  • the data processing device performs image rendering through the image processing module of the data processing device according to the instruction, including:
  • the image processing unit corresponding to the client in the image processing module completes the image rendering according to the instruction; where the image processing unit is allocated by the server to the client in the image processing module for correspondingly processing the image rendering request of the client.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the method further includes:
  • the data processing device receives the processing result obtained after the server processes the request according to the request;
  • the data processing device sends the processing result to the client.
  • a server including:
  • the receiving module is used to receive the client's request forwarded by the data processing device
  • the obtaining module is used to obtain instructions corresponding to image rendering when the request is an image rendering request; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the determining module is used to determine the image processing unit corresponding to the client in the data processing device;
  • the transmission module is used to transmit the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
  • the data processing device which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
  • the server further includes:
  • the dividing module is used to divide the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete the image rendering task.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the determining module is specifically used for:
  • the image processing unit By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
  • the determining module is specifically used for:
  • an image processing unit is selected and assigned to the client according to preset rules.
  • the determining module is specifically used for:
  • the obtaining module is specifically used for:
  • the server operating system generates instructions in accordance with the client's request for 3D image rendering. By intercepting the instructions, the server can be used to perform 3D image rendering, with minimal changes and no burden on the server.
  • the server further includes:
  • the processing module is used for when the request is a request other than the image rendering request, the server processes the request according to the request and then calls the transmission module to transmit the processing result to the data processing device so that the data processing device forwards the data processing device to the client.
  • a data processing device includes: a communication module, a processor, an image processing module, and a memory; the data processing device communicates with a client and a server through the communication module; a communication module Including: request receiving module, request forwarding module, instruction receiving module, image acquisition module and image transmission module;
  • Request receiving module used to receive client requests
  • the request forwarding module is used to send the client's request to the server
  • the instruction receiving module is used for when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server; where the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the memory is used to cache the instruction corresponding to the image rendering received from the server and the image obtained after the image rendering is completed;
  • a processor for instructing the image processing module to complete image rendering according to instructions
  • the image acquisition module is used to acquire the image obtained after the image rendering is completed
  • the image transmission module is used to send the image obtained after the image rendering is completed to the client.
  • the data processing device which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
  • the processor is specifically configured to:
  • the image processing unit corresponding to the client in the image processing module is instructed to complete the image rendering; wherein the image processing unit is allocated by the server to the client in the image processing module for corresponding processing of the image rendering request of the client.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the image acquisition module is further configured to: when the request is a request other than an image rendering request, acquire an image sent by the server after processing according to the request;
  • the image transmission module is also used to: send the image sent by the server and obtained after processing according to the request to the client.
  • the data processing device receives the client's request and forwards it to the server; when the request is an image rendering request, the server obtains the instruction corresponding to the image rendering; wherein the instruction includes: graphics card configuration Instructions, special effects instructions and drawing instructions; the server determines the corresponding image processing unit in the data processing device for the client, and transmits the instruction to the data processing device after the corresponding image processing unit completes the image rendering and transmits the image data to the client; where , There is no need to perform image rendering according to instructions in the server. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
  • FIG. 1 is a schematic diagram of the system architecture of an embodiment of the present disclosure
  • Figure 2 is an existing WDDM drive model architecture diagram
  • FIG. 3 is a schematic flowchart of a data transmission method provided by an embodiment of the present disclosure
  • FIG. 4 is a diagram of the architecture of the WDDM drive model of the server operating system in an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a server provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of an implementation effect provided by an embodiment of the present disclosure.
  • FIG. 1 A schematic diagram of the system architecture of the embodiment of the present disclosure is shown in FIG. 1, where the server communicates with M (M is a positive integer) clients through a data processing device, and the requests of the M clients and the responses from the server are processed through data.
  • M is a positive integer
  • both the data processing device and the server need to be configured with an operating system that supports the Windows Display Driver Model (WDDM).
  • WDDM Windows Display Driver Model
  • WDDM is a display driver architecture supported in the Windows Vista operating system developed by Microsoft.
  • WDDM is an innovation of the display driver structure in the Windows XP operating system. While supporting new solutions, graphics and applications, it can provide users with a desktop experience with better performance and higher reliability.
  • Figure 2 is a schematic diagram of the architecture of the WDDM drive model.
  • the operating system will call the relevant interface functions of the D3D RT (Direct 3D runtime) program, and at the same time send the parameters related to image rendering to the D3D RT program. Graphics card configuration parameters), special effects parameters (parameters related to special effects) and drawing parameters.
  • the D3D RT program will interact with the User Mode Display Driver (UMDD) to obtain the status of the graphics card, and pass drawing instructions to the User Mode Display Driver (the drawing instructions are generated based on the drawing parameters).
  • UMDD User Mode Display Driver
  • the drawing instructions are generated based on the drawing parameters.
  • the display driver After the display driver translates the received drawing instruction, it will put the translated instruction into the memory to facilitate the display miniport driver to read the translated instruction.
  • the user mode display driver will notify The D3D RT program instruction translation is completed.
  • the D3D RT program will be notified via the graphics kernel subsystem (Direct Graphics kernel subsysterm or Dxgkrnl.sys) to display the miniport driver to obtain the translated instruction from the memory, and access it through direct memory ( Direct Memory Access, DMA)) is passed to the video memory of the graphics card and then executed by the graphics card;
  • the D3D RT program combines graphics card configuration instructions (graphic card configuration instructions generated based on graphics card configuration parameters) and special effect instructions (special effect instructions generated based on special effect parameters) Passed to the graphics kernel subsystem.
  • the graphics hardware supplier must provide a user-mode display driver and a display miniport driver.
  • the user-mode display driver is a dynamic link library loaded at runtime by Microsoft Direct3D (a set of 3D graphics programming interface developed by Microsoft on the Microsoft Windows operating system, which is part of DirectX and is currently widely supported by various graphics card manufacturers) (Dynamic Link Library, DLL).
  • the display miniport driver communicates with the DirectX (Multimedia Programming Interface created by Microsoft Corporation) graphics kernel subsystem.
  • the graphics kernel subsystem is a system file that the operating system completes image display management, and it participates in all image generation management of the system.
  • the embodiment of the present disclosure provides a data transmission method. As shown in FIG. 3, the method includes the following steps:
  • the server receives a request from the client forwarded by the data processing device.
  • the server and the client communicate through the data processing device.
  • the client's request and the server's response are forwarded through the data processing device.
  • the data processing device is configured with the same operating system as that on the server, for example, both are installed There are operating systems that support WDDM.
  • the server obtains an instruction corresponding to the image rendering; where the instruction includes: a graphics card configuration instruction, a special effect instruction, and a drawing instruction.
  • the server acquiring the instruction corresponding to the image rendering in step 102 may specifically include:
  • the server intercepts the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
  • the server intercepts the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
  • FIG. 4 shows the WDDM drive model architecture for the server provided in the embodiments of the disclosure.
  • a user is added between the D3D RT program in the server's operating system and the user mode display driver.
  • Mode filter driver or use virtual driver.
  • a kernel mode filter driver or use virtual driver
  • the user mode filter driver is used to intercept the drawing instructions transmitted from the D3D RT program to the user mode display driver.
  • the user mode filter driver is equivalent to a bridge between the D3D RT program and the user mode display driver. It monitors the commands between them, but does not change the content of the commands themselves.
  • the D3D RT program in the operating system of the server when the D3D RT program in the operating system of the server receives the image rendering request sent by the application layer, it will first notify the user mode display driver (such as DrawPrimitive), and the user mode display driver will The received drawing instructions are converted and processed to obtain instructions that the graphics card can recognize, and the graphics memory transferred to the graphics card by DMA is executed by the graphics card.
  • the user mode filter driver is used to intercept the drawing instructions before the user mode display driver executes the instruction conversion processing action.
  • the kernel mode filter driver is used to intercept the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem to the display miniport driver. These instructions are received from the application layer by the D3D RT program and passed to the graphics kernel subsystem.
  • a virtual server is set in the WDDM drive model architecture in the operating system of the virtualized server.
  • the user mode filter driver is used to act as a user mode display driver in order to intercept drawing instructions
  • a virtual display miniport driver is used to act as a display miniport driver in order to configure instructions and special effects instructions for the graphics card.
  • the server determines the image processing unit corresponding to the client in the data processing device.
  • the data processing device has image rendering capabilities, that is, it is equipped with a graphics processing unit (GPU), and several clients are connected to the server through the data processing device.
  • GPU graphics processing unit
  • 3D images from several clients There will also be a lot of rendering requirements, and the data processing device needs to configure several graphics cards as the image processing modules of the data processing device according to the amount of tasks required for rendering.
  • the server divides the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete the image rendering task.
  • the server side logically divides the image processing modules of the data processing device, and divides the image processing modules to obtain N (N is a positive integer) image processing units that can independently complete image rendering tasks. Specifically, it can be Dividing according to the number of graphics cards can also be obtained by dividing the video memory resources of several graphics cards to obtain N image processing units. It is worth mentioning that one image processing unit can provide 3D image rendering services for one or more clients.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients from competing for resources and The waiting time is longer.
  • the server determining the image processing unit corresponding to the image rendering request of the client in the data processing apparatus includes:
  • the server obtains the identification of the client from the image rendering request
  • the server judges whether there is an image processing unit corresponding to the client according to the identifier of the client;
  • the server allocates a corresponding image processing unit to the client, and binds the client to the corresponding image processing unit.
  • the identifier of the client may be an IP address, a media access control address (Media Access Control Address, MAC address), and so on.
  • the image processing unit has two states: idle and occupied.
  • the server will set a corresponding number for each image processing unit, and record the corresponding status on the server side in real time. In the occupied state, the server will also record the number of occupied clients and the corresponding identification.
  • the server allocates a corresponding image processing unit to the client, and binds the two through the identification of the client and the number of the image processing unit, so that the image processing of the data processing device can be efficiently managed Resources, providing image rendering services for several clients.
  • the image processing unit By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
  • the server assigns the corresponding image processing unit to the client, including:
  • the server judges whether there is currently an idle image processing unit
  • the server selects an idle image processing unit to allocate to the client;
  • selecting an idle image processing unit to allocate to the client includes:
  • the server selects an image processing unit to allocate to the client according to a preset rule.
  • the server selects an image processing unit to allocate to the client according to preset rules, including:
  • the server finds the image processing unit with the least number of bound clients and allocates it to the client; or,
  • the server finds out the image processing unit with the lowest current processing load and assigns it to the client.
  • the image processing unit with the lowest processing load may refer to the image processing unit with the smallest number of 3D image rendering requests received per unit time.
  • the aforementioned unit time refers to a period of time between a point in time before the current time and the current time, and its duration can be set and adjusted as required.
  • step 102 and step 103 can be exchanged.
  • the server can first execute the step of determining the image processing unit corresponding to the client in the data processing device, and then execute the acquisition The steps of the instructions corresponding to the image rendering.
  • the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
  • the user mode filter driver sends the intercepted drawing instructions to the data processing device
  • the kernel mode filter driver sends the intercepted graphics card configuration instructions and special effect instructions to the data processing device
  • the data processing device operating system uses the data processing device's operating system according to the aforementioned instructions.
  • the graphics card completes the image rendering.
  • the operating system of the data processing device completes the image rendering process through the graphics card according to the instructions related to the image rendering, and only needs to refer to the relevant technical data of the graphics rendering image, which will not be described in detail here.
  • the method further includes:
  • the server transmits the processing result to the data processing device after processing the request according to the request, so that the data processing device forwards the data processing device to the client.
  • the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the server obtains the instruction corresponding to the image rendering; wherein the instructions include: graphics card configuration instructions, special effects instructions And drawing instructions; the server determines the image processing unit corresponding to the client in the data processing device; the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after rendering the image according to the instruction; You need to perform image rendering according to instructions. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
  • the embodiment of the present disclosure provides another data transmission method. As shown in FIG. 5, the method includes the following steps:
  • the data processing device receives a request from a client.
  • the data processing device sends the client's request to the server.
  • the data processing device receives an instruction corresponding to the image rendering sent by the server; where the instruction includes: a graphics card configuration instruction, a special effect instruction, and a drawing instruction.
  • the data processing device completes image rendering through the image processing module of the data processing device according to the instruction.
  • the data processing device has image rendering capability, that is, it is equipped with a graphics processing unit (GPU).
  • GPU graphics processing unit
  • several clients are connected to the server through the data processing device.
  • the client's 3D image rendering needs will be very large, and the data processing device needs to configure several graphics cards as the image processing modules of the data processing device according to the amount of rendering required tasks.
  • the data processing device sends the image data obtained after the image rendering is completed to the client.
  • step 204 specifically includes:
  • the image processing unit corresponding to the client in the image processing module completes the image rendering according to the instruction; where the image processing unit is allocated by the server to the client in the image processing module for correspondingly processing the image rendering request of the client.
  • the image processing resources of the data processing device can be efficiently used.
  • the user mode display driver in the operating system of the data processing device converts the drawing instructions into instructions that can be recognized by the graphics card and is executed by the graphics card corresponding to the image processing unit; the display miniport driver in the operating system of the data processing device obtains the graphics card configuration Instructions and special effects instructions are executed by the graphics card corresponding to the image processing unit.
  • the Microsoft Windows operating system installed on the data processing device supports the WDDM drive model architecture, and the user mode display driver in the data processing device operating system converts the received drawing instructions Obtain instructions that can be recognized by the graphics card and transfer them to the graphics memory of the graphics card through direct memory access (DMA).
  • DMA direct memory access
  • the image rendering process performed by the data processing device is implemented based on the WDDM model framework shown in FIG. 2.
  • the data processing device receives instructions (including configuration instructions for the graphics card, special effects instructions, and drawing instructions) sent by the server through the network ,
  • the drawing instruction is composed of one or more functions containing specific parameters, and these functions can be reproduced in the operating system of the data processing device to complete the final 3D image rendering work.
  • the received drawing commands are: func1 (parameter 1, parameter 2, parameter 3); func2 (parameter 1, parameter 2); func3 (parameter 1, parameter 2, parameter 3, parameter 4); among them, func1, func2 , Func3 are three exemplary function names given to distinguish different functions.
  • the data processing device can execute the three functions in the drawing instruction to perform 3D image rendering (that is, the function reproduction process).
  • the method may further include:
  • the data processing device receives the processing result obtained by the server after processing the request according to the request.
  • the data processing device sends the processing result to the client.
  • the data processing device receives the client's request and forwards it to the server; when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server, where the instruction includes: a graphics card Configuration instructions, special effect instructions, and drawing instructions; the data processing device completes image rendering through the image processing module of the data processing device according to the instructions; the data processing device sends the image data obtained after the image rendering is completed to the client. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
  • the server 60 includes:
  • the receiving module 601 is used to receive the client's request forwarded by the data processing device;
  • the obtaining module 602 is configured to obtain instructions corresponding to image rendering when the request is an image rendering request; the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the determining module 603 is used to determine the image processing unit corresponding to the client in the data processing device;
  • the transmission module 604 is configured to transmit the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
  • the data processing device a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without a troublesome upgrade.
  • the server 60 may further include:
  • the dividing module 600 is used to divide the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete an image rendering task.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the determining module 603 is specifically configured to:
  • the image processing unit By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
  • the determining module 603 is specifically configured to:
  • the server 60 may further include:
  • the processing module 605 is configured to, when the request is a request other than the image rendering request, call the transmission module 603 to transmit the processing result to the data processing device after processing the request according to the request, so that the data processing device forwards the data processing device to the client.
  • the obtaining module 602 is specifically configured to:
  • the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the server obtains the instructions corresponding to the image rendering; wherein the instructions include: graphics card configuration instructions, special effects instructions and drawing Instruction; the server determines the image processing unit corresponding to the client in the data processing device; the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after the image rendering is completed according to the instruction; Instruct image rendering. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
  • the data processing device 70 includes:
  • the request receiving module 7011 is used to receive the client's request
  • the request forwarding module 7012 is used to send the client's request to the server;
  • the instruction receiving module 7013 is configured to receive the instruction corresponding to the image rendering sent by the server by the data processing device when the request is an image rendering request; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
  • the memory 704 is configured to cache the instruction corresponding to the image rendering received from the server and the image obtained after the image rendering is completed;
  • the processor 702 is configured to instruct the image processing module 703 to complete image rendering according to instructions
  • the image acquisition module 7014 is used to acquire an image obtained after image rendering is completed
  • the image transmission module 7015 is used to send the image obtained after the image rendering is completed to the client.
  • the data processing device which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
  • the processor 702 is specifically configured to:
  • the image processing unit corresponding to the client in the image processing module is instructed to complete the image rendering; wherein the image processing unit is allocated by the server to the client in the image processing module for corresponding processing of the image rendering request of the client.
  • the user mode display driver in the operating system of the data processing device converts the drawing instructions into instructions that can be recognized by the graphics card and is executed by the graphics card corresponding to the image processing unit; the display miniport driver in the operating system of the data processing device obtains the graphics card configuration Instructions and special effects instructions are executed by the graphics card corresponding to the image processing unit.
  • the data processing device is configured with an operating system that supports WDDM, and after receiving the instruction corresponding to the image rendering sent by the server, the image rendering is completed through the graphics card configured by itself according to the instruction execution flow in the operating system.
  • the server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client.
  • the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
  • the image acquisition module 7014 is further configured to: when the request is a request other than an image rendering request, acquire an image sent by the server after processing according to the request;
  • the image transmission module 7015 is also used to: send the image sent by the server and obtained after processing according to the request to the client.
  • FIG. 8 is a detailed schematic diagram of implementation effects provided by the embodiments of the disclosure.
  • the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server, where the instruction includes: a graphics card Configuration instructions, special effect instructions, and drawing instructions; the data processing device completes image rendering through the image processing module of the data processing device according to the instructions; the data processing device sends the image data obtained after the image rendering is completed to the client. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
  • the embodiment of the present disclosure also provides a computer-readable storage medium.
  • the non-transitory computer-readable storage medium may be a read-only memory (Read Only). Memory, ROM), random access memory (Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk and optical data storage device, etc.
  • the storage medium stores computer instructions for executing the data transmission method described in the embodiment corresponding to FIG. 3/5, which will not be repeated here.

Abstract

Provided are a data transmission method and apparatus, and a server, wherein same relate to the technical field of cloud computing, and can solve the problems of servers in current cloud desktop technology being unable to support a large number of 3D image rendering work tasks and the servers being difficult to upgrade. The specific technical solution involves: a data processing apparatus receiving a request from a client and then forwarding the request to a server; when the request is an image rendering request, the server acquiring an instruction corresponding to image rendering, wherein the instruction comprises: a graphics card configuration instruction, a special effect instruction and a drawing instruction; the server determining an image processing unit, corresponding to the client, in the data processing apparatus, and transmitting the instruction to the data processing apparatus, so that the corresponding image processing unit completes image rendering and then transmits image data to the client, wherein in the server, there is no need to perform image rendering according to the instruction.

Description

数据传输方法、装置及服务器Data transmission method, device and server 技术领域Technical field
本公开涉及云计算技术领域,尤其涉及数据传输方法、装置及服务器。The present disclosure relates to the field of cloud computing technology, and in particular to data transmission methods, devices, and servers.
背景技术Background technique
云桌面技术是指用户通过客户端远程访问服务器,服务器将当前服务器主机的桌面图像通过虚拟方式提供给远程客户端的技术。服务器通过屏幕拷贝,将图像传输给用户,用户获得的是桌面图像序列。图像经过压缩后,通过网络传输到云终端,终端解码得到桌面图像内容。Cloud desktop technology refers to the technology in which users remotely access the server through the client, and the server provides the desktop image of the current server host to the remote client in a virtual manner. The server transmits the image to the user through the screen copy, and the user obtains the desktop image sequence. After the image is compressed, it is transmitted to the cloud terminal through the network, and the terminal decodes the desktop image content.
现有很多场景下,比如,网络游戏、三维(three dimensional,3D)视频或者3D远程桌面传输等等,需要进行3D图像的传输和客户端显示。在这种情况下,服务器端往往需要同时支撑大量客户端的3D图像渲染工作,这对服务器端的图形处理器(Graphics Processing Unit,GPU)资源的要求非常高,但是,现有服务器一般不具备这么强大的GPU资源,甚至是不具备3D渲染能力的。如果直接对服务器进行配置升级则需要服务器中断工作,在中断工作的一段时间内,服务器需要消耗一定的时间成本,而且配置升级的过程需要对服务器机架内部进行改造,这一过程也是非常繁琐、困难。In many existing scenarios, for example, network games, three-dimensional (3D) video, or 3D remote desktop transmission, etc., 3D image transmission and client display are required. In this case, the server side often needs to support a large number of client-side 3D image rendering jobs at the same time, which requires very high graphics processing unit (GPU) resources on the server side, but the existing servers generally do not have such powerful GPU resources, even those without 3D rendering capabilities. If you directly configure and upgrade the server, the server needs to be interrupted. During the interrupted period of time, the server will consume a certain amount of time and cost, and the configuration upgrade process needs to transform the interior of the server rack. This process is also very cumbersome. difficult.
发明内容Summary of the invention
本公开实施例提供一种数据传输方法、装置及服务器,能够解决目前云桌面技术中服务器无法支撑大量3D图像渲染工作任务以及升级服务器难度很高的问题。所述技术方案如下:The embodiments of the present disclosure provide a data transmission method, device, and server, which can solve the problems that the server cannot support a large number of 3D image rendering tasks in the current cloud desktop technology and the difficulty of upgrading the server is very high. The technical solution is as follows:
根据本公开实施例的第一方面,提供一种数据传输方法,该方法包括:According to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method, the method including:
服务器接收数据处理装置转发的客户端的请求;The server receives the client's request forwarded by the data processing device;
当该请求为图像渲染请求时,服务器获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;When the request is an image rendering request, the server obtains the instructions corresponding to the image rendering; the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
服务器确定数据处理装置中对应客户端的图像处理单元;The server determines the image processing unit corresponding to the client in the data processing device;
服务器将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。The server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自客户端的图像渲染请求。The data processing device, which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
在一个实施例中,该方法之前还包括:In one embodiment, the method further includes:
服务器将数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。The server divides the image processing module of the data processing device into N image processing units; among them, each image processing unit can independently complete an image rendering task.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,服务器确定数据处理装置中对应处理客户端的图像渲染请求的图像处理单元,包括:In an embodiment, the server determining the image processing unit corresponding to the image rendering request of the client in the data processing apparatus includes:
服务器从图像渲染请求中获取客户端的标识;The server obtains the identification of the client from the image rendering request;
服务器根据客户端的标识判断是否存在客户端对应的图像处理单元;The server judges whether there is an image processing unit corresponding to the client according to the identifier of the client;
如果不存在,则服务器为客户端分配对应的图像处理单元,并将客户端与对应的图像处理单元绑定。If it does not exist, the server allocates a corresponding image processing unit to the client, and binds the client to the corresponding image processing unit.
通过将图像处理单元与客户端绑定,便于在客户端发送图像渲染请求后选择对应的图像处理单元直接处理,并且可以将同一客户端的图像渲染请求交由同一图像处理单元,提升处理效率。By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
在一个实施例中,服务器为客户端分配对应的图像处理单元,包括:In an embodiment, the server assigns the corresponding image processing unit to the client, including:
服务器判断当前是否存在空闲的图像处理单元;The server judges whether there is currently an idle image processing unit;
如果存在,则服务器选择一个空闲的图像处理单元分配给客户端;If it exists, the server selects an idle image processing unit to allocate to the client;
如果不存在,则服务器按照预设规则选择一个图像处理单元分配给客户端。If it does not exist, the server selects an image processing unit to allocate to the client according to a preset rule.
在一个实施例中,服务器按照预设规则选择一个图像处理单元分配给客 户端,包括:In one embodiment, the server selects an image processing unit to allocate to the client according to preset rules, including:
服务器查找出绑定客户端数量最少的图像处理单元分配给客户端;或者,The server finds the image processing unit with the least number of bound clients and allocates it to the client; or,
服务器查找出当前处理负荷最低的图像处理单元分配给客户端。The server finds out the image processing unit with the lowest current processing load and assigns it to the client.
在一个实施例中,服务器获取图像渲染对应的指令,包括:In one embodiment, the server acquiring the instruction corresponding to image rendering includes:
服务器截获服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的绘图指令;The server intercepts the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
服务器截获服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的显卡配置指令以及特效指令。The server intercepts the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
服务器操作系统按照客户端3D图像渲染的请求生成指令,通过截获指令则可以不用服务器去执行3D图像渲染,改动很小,对服务器无任何改造负担。The server operating system generates instructions in accordance with the client's request for 3D image rendering. By intercepting the instructions, the server can be used to perform 3D image rendering, with minimal changes and no burden on the server.
在一个实施例中,该方法还包括:In one embodiment, the method further includes:
当该请求为除图像渲染请求以外的请求时,服务器根据该请求进行处理后将处理结果传输给数据处理装置以使数据处理装置转发给客户端。When the request is a request other than the image rendering request, the server processes the request according to the request and then transmits the processing result to the data processing device so that the data processing device forwards it to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For a general cloud desktop client request, what the server can directly process is directly processed in the server without being processed by the data processing device. It only needs to forward the processing result, such as computer desktop image data, to the client through the data processing device.
根据本公开实施例的第二方面,提供一种数据传输方法,包括:According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission method, including:
数据处理装置接收客户端的请求;The data processing device receives the client's request;
数据处理装置向服务器发送客户端的请求;The data processing device sends the client's request to the server;
当该请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;When the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server; the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
数据处理装置根据指令通过数据处理装置的图像处理模块完成图像渲染;The data processing device completes image rendering through the image processing module of the data processing device according to the instruction;
数据处理装置将完成图像渲染后得到的图像数据发送给客户端。The data processing device sends the image data obtained after the image rendering is completed to the client.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自 客户端的图像渲染请求。The data processing device, a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without a troublesome upgrade.
在一个实施例中,数据处理装置根据指令通过数据处理装置的图像处理模块完成图像渲染,包括:In an embodiment, the data processing device performs image rendering through the image processing module of the data processing device according to the instruction, including:
图像处理模块中对应客户端的图像处理单元根据指令完成图像渲染;其中,图像处理单元是服务器在图像处理模块中为客户端分配的用于对应处理客户端的图像渲染请求。The image processing unit corresponding to the client in the image processing module completes the image rendering according to the instruction; where the image processing unit is allocated by the server to the client in the image processing module for correspondingly processing the image rendering request of the client.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,该方法还包括:In one embodiment, the method further includes:
当该请求为除图像渲染请求以外的请求时,数据处理装置接收服务器根据该请求进行处理后得到的处理结果;When the request is a request other than an image rendering request, the data processing device receives the processing result obtained after the server processes the request according to the request;
数据处理装置将处理结果发送给客户端。The data processing device sends the processing result to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For a general cloud desktop client request, what the server can directly process is directly processed in the server without being processed by the data processing device. It only needs to forward the processing result, such as computer desktop image data, to the client through the data processing device.
根据本公开实施例的第三方面,提供一种服务器,包括:According to a third aspect of the embodiments of the present disclosure, a server is provided, including:
接收模块,用于接收数据处理装置转发的客户端的请求;The receiving module is used to receive the client's request forwarded by the data processing device;
获取模块,用于当该请求为图像渲染请求时,获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;The obtaining module is used to obtain instructions corresponding to image rendering when the request is an image rendering request; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
确定模块,用于确定数据处理装置中对应客户端的图像处理单元;The determining module is used to determine the image processing unit corresponding to the client in the data processing device;
传输模块,用于将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。The transmission module is used to transmit the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自客户端的图像渲染请求。The data processing device, which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
在一个实施例中,服务器还包括:In one embodiment, the server further includes:
划分模块,用于将数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。The dividing module is used to divide the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete the image rendering task.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,确定模块具体用于:In an embodiment, the determining module is specifically used for:
从图像渲染请求中获取客户端的标识;Obtain the client's ID from the image rendering request;
根据客户端的标识判断是否存在客户端对应的图像处理单元;Determine whether there is an image processing unit corresponding to the client according to the identifier of the client;
如果不存在,则为客户端分配对应的图像处理单元,并将客户端与对应的图像处理单元绑定。If it does not exist, assign the corresponding image processing unit to the client, and bind the client to the corresponding image processing unit.
通过将图像处理单元与客户端绑定,便于在客户端发送图像渲染请求后选择对应的图像处理单元直接处理,并且可以将同一客户端的图像渲染请求交由同一图像处理单元,提升处理效率。By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
在一个实施例中,确定模块具体用于:In an embodiment, the determining module is specifically used for:
判断当前是否存在空闲的图像处理单元;Determine whether there is currently an idle image processing unit;
如果存在,则选择一个空闲的图像处理单元分配给客户端;If it exists, select an idle image processing unit to allocate to the client;
如果不存在,则按照预设规则选择一个图像处理单元分配给客户端。If it does not exist, an image processing unit is selected and assigned to the client according to preset rules.
在一个实施例中,确定模块具体用于:In an embodiment, the determining module is specifically used for:
查找出绑定客户端数量最少的图像处理单元分配给客户端;或者,Find out the image processing unit with the least number of bound clients and assign it to the client; or,
查找出当前处理负荷最低的图像处理单元分配给客户端。Find out the image processing unit with the lowest current processing load and assign it to the client.
在一个实施例中,获取模块具体用于:In an embodiment, the obtaining module is specifically used for:
截获服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的绘图指令;Intercept the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
截获服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的显卡配置指令以及特效指令。Intercept the graphics card configuration instructions and special effects instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
服务器操作系统按照客户端3D图像渲染的请求生成指令,通过截获指令则可以不用服务器去执行3D图像渲染,改动很小,对服务器无任何改造负担。The server operating system generates instructions in accordance with the client's request for 3D image rendering. By intercepting the instructions, the server can be used to perform 3D image rendering, with minimal changes and no burden on the server.
在一个实施例中,服务器还包括:In one embodiment, the server further includes:
处理模块,用于当该请求为除图像渲染请求以外的请求时,服务器根据该请求进行处理后调用传输模块将处理结果传输给数据处理装置以使数据处理装置转发给客户端。The processing module is used for when the request is a request other than the image rendering request, the server processes the request according to the request and then calls the transmission module to transmit the processing result to the data processing device so that the data processing device forwards the data processing device to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For a general cloud desktop client request, what the server can directly process is directly processed in the server without being processed by the data processing device. It only needs to forward the processing result, such as computer desktop image data, to the client through the data processing device.
根据本公开实施例的第四方面,一种数据处理装置,包括:通信模块、处理器、图像处理模块、及存储器;数据处理装置通过通信模块分别与客户端和服务器之间进行通信;通信模块包括:请求接收模块、请求转发模块、指令接收模块、图像采集模块和图像传输模块;According to a fourth aspect of the embodiments of the present disclosure, a data processing device includes: a communication module, a processor, an image processing module, and a memory; the data processing device communicates with a client and a server through the communication module; a communication module Including: request receiving module, request forwarding module, instruction receiving module, image acquisition module and image transmission module;
请求接收模块,用于接收客户端的请求;Request receiving module, used to receive client requests;
请求转发模块,用于向服务器发送客户端的请求;The request forwarding module is used to send the client's request to the server;
指令接收模块,用于当该请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;The instruction receiving module is used for when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server; where the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
存储器,用于缓存从服务器接收到的图像渲染对应的指令以及完成图像渲染后得到的图像;The memory is used to cache the instruction corresponding to the image rendering received from the server and the image obtained after the image rendering is completed;
处理器,用于根据指令指示图像处理模块完成图像渲染;A processor for instructing the image processing module to complete image rendering according to instructions;
图像采集模块,用于采集完成图像渲染后得到的图像;The image acquisition module is used to acquire the image obtained after the image rendering is completed;
图像传输模块,用于将完成图像渲染后得到的图像发送给客户端。The image transmission module is used to send the image obtained after the image rendering is completed to the client.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自客户端的图像渲染请求。The data processing device, which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
在一个实施例中,处理器具体用于:In an embodiment, the processor is specifically configured to:
根据指令指示图像处理模块中对应客户端的图像处理单元完成图像渲染;其中,图像处理单元是服务器在图像处理模块中为客户端分配的用于对应处理客户端的图像渲染请求。According to the instruction, the image processing unit corresponding to the client in the image processing module is instructed to complete the image rendering; wherein the image processing unit is allocated by the server to the client in the image processing module for corresponding processing of the image rendering request of the client.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,图像采集模块还用于:当该请求为除图像渲染请求以外的请求时,采集服务器发送的根据该请求进行处理后得到的图像;In one embodiment, the image acquisition module is further configured to: when the request is a request other than an image rendering request, acquire an image sent by the server after processing according to the request;
相应的,图像传输模块还用于:将服务器发送的根据该请求进行处理后得到的图像发送给客户端。Correspondingly, the image transmission module is also used to: send the image sent by the server and obtained after processing according to the request to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For a general cloud desktop client request, what the server can directly process is directly processed in the server without being processed by the data processing device. It only needs to forward the processing result, such as computer desktop image data, to the client through the data processing device.
本公开实施例提供的数据传输方法、装置及服务器,数据处理装置接收客户端的请求后转发给服务器;当该请求为图像渲染请求时,服务器获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;服务器为客户端在数据处理装置中确定对应的图像处理单元,将指令传输给数据处理装置后对应的图像处理单元完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。因此,服务器的工作量大大减轻,甚至可以不需要图形处理器就可以支撑大量客户端的3D图像渲染任务,也无需升级服务器。According to the data transmission method, device and server provided by the embodiments of the present disclosure, the data processing device receives the client's request and forwards it to the server; when the request is an image rendering request, the server obtains the instruction corresponding to the image rendering; wherein the instruction includes: graphics card configuration Instructions, special effects instructions and drawing instructions; the server determines the corresponding image processing unit in the data processing device for the client, and transmits the instruction to the data processing device after the corresponding image processing unit completes the image rendering and transmits the image data to the client; where , There is no need to perform image rendering according to instructions in the server. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments in accordance with the disclosure, and together with the specification are used to explain the principle of the disclosure.
图1是本公开实施例的系统架构示意图;FIG. 1 is a schematic diagram of the system architecture of an embodiment of the present disclosure;
图2是现有的WDDM驱动模型体系结构图;Figure 2 is an existing WDDM drive model architecture diagram;
图3是本公开实施例提供的一种数据传输方法的流程示意图;FIG. 3 is a schematic flowchart of a data transmission method provided by an embodiment of the present disclosure;
图4是本公开实施例中服务器操作系统的WDDM驱动模型体系结构图;4 is a diagram of the architecture of the WDDM drive model of the server operating system in an embodiment of the present disclosure;
图5是本公开实施例提供的另一种数据传输方法的流程示意图;FIG. 5 is a schematic flowchart of another data transmission method provided by an embodiment of the present disclosure;
图6是本公开实施例提供的一种服务器的结构示意图;FIG. 6 is a schematic structural diagram of a server provided by an embodiment of the present disclosure;
图7是本公开实施例提供的一种数据处理装置的结构示意图;FIG. 7 is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure;
图8是本公开实施例提供的一个实施效果示意图。FIG. 8 is a schematic diagram of an implementation effect provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
本公开实施例的系统架构示意图如图1所示,其中,服务器与M(M为正整数)个客户端之间通过数据处理装置进行通信,M个客户端的请求以及服务器的应答均通过数据处理装置转发,数据处理装置与服务器均需配置支持Windows显示器驱动程序模型(Windows Display Driver Model,WDDM)的操作系统。A schematic diagram of the system architecture of the embodiment of the present disclosure is shown in FIG. 1, where the server communicates with M (M is a positive integer) clients through a data processing device, and the requests of the M clients and the responses from the server are processed through data. For device forwarding, both the data processing device and the server need to be configured with an operating system that supports the Windows Display Driver Model (WDDM).
WDDM是在微软公司开发的Windows Vista操作系统中开始支持的一种显示器驱动程序体系结构。WDDM是对Windows XP操作系统中的显示器驱动程序结构的革新,在支持新的方案、图形和应用程序的同时,能够为用户提供性能更佳、可靠性更高的桌面体验。WDDM is a display driver architecture supported in the Windows Vista operating system developed by Microsoft. WDDM is an innovation of the display driver structure in the Windows XP operating system. While supporting new solutions, graphics and applications, it can provide users with a desktop experience with better performance and higher reliability.
图2是WDDM驱动模型体系结构示意图,当应用程序有图像渲染需求时,操作系统会调用D3D RT(Direct 3D runtime)程序的相关接口函数,同时向D3D RT程序发送与图像渲染相关的参数(对显卡的配置参数)、特效参数(与特效相关的参数)及绘图参数等。一方面,D3D RT程序会与用户模式显示驱动程序(User Mode Display Driver,UMDD)进行交互,以获取 显卡状态,并向用户模式显示驱动程序传递绘图指令(绘图指令根据绘图参数生成),用户模式显示驱动程序对接收到的绘图指令进行翻译后,会将翻译后的指令放入内存,以方便显示微型端口驱动(Display miniport driver)读取该翻译后的指令,同时,用户模式显示驱动会通知D3D RT程序指令翻译完成,此时,D3D RT程序会经由图形内核子系统(Direct Graphics kernel subsysterm或者Dxgkrnl.sys)通知显示微型端口驱动去内存中获取翻译后的指令,并通过直接内存存取(Direct Memory Access,DMA))方式传递给显卡的显存后供显卡执行;另一方面,D3D RT程序将显卡配置指令(显卡配置指令根据显卡配置参数生成)和特效指令(特效指令根据特效参数生成)传递给图形内核子系统。其中,图形硬件供应商(显卡制造商)必须提供用户模式显示驱动程序和显示微型端口驱动程序。用户模式显示驱动程序是Microsoft Direct3D(微软公司在Microsoft Windows操作系统上所开发的一套3D绘图编程接口,是DirectX的一部分,目前广为各家显卡制造商所支援)运行时加载的动态链接库(Dynamic Link Library,DLL)。显示微型端口驱动程序与DirectX(微软公司创建的多媒体编程接口)图形内核子系统进行通信。图形内核子系统是操作系统完成图像显示管理的系统文件,其参与系统所有的图像生成管理。Figure 2 is a schematic diagram of the architecture of the WDDM drive model. When the application requires image rendering, the operating system will call the relevant interface functions of the D3D RT (Direct 3D runtime) program, and at the same time send the parameters related to image rendering to the D3D RT program. Graphics card configuration parameters), special effects parameters (parameters related to special effects) and drawing parameters. On the one hand, the D3D RT program will interact with the User Mode Display Driver (UMDD) to obtain the status of the graphics card, and pass drawing instructions to the User Mode Display Driver (the drawing instructions are generated based on the drawing parameters). After the display driver translates the received drawing instruction, it will put the translated instruction into the memory to facilitate the display miniport driver to read the translated instruction. At the same time, the user mode display driver will notify The D3D RT program instruction translation is completed. At this time, the D3D RT program will be notified via the graphics kernel subsystem (Direct Graphics kernel subsysterm or Dxgkrnl.sys) to display the miniport driver to obtain the translated instruction from the memory, and access it through direct memory ( Direct Memory Access, DMA)) is passed to the video memory of the graphics card and then executed by the graphics card; on the other hand, the D3D RT program combines graphics card configuration instructions (graphic card configuration instructions generated based on graphics card configuration parameters) and special effect instructions (special effect instructions generated based on special effect parameters) Passed to the graphics kernel subsystem. Among them, the graphics hardware supplier (graphic card manufacturer) must provide a user-mode display driver and a display miniport driver. The user-mode display driver is a dynamic link library loaded at runtime by Microsoft Direct3D (a set of 3D graphics programming interface developed by Microsoft on the Microsoft Windows operating system, which is part of DirectX and is currently widely supported by various graphics card manufacturers) (Dynamic Link Library, DLL). The display miniport driver communicates with the DirectX (Multimedia Programming Interface created by Microsoft Corporation) graphics kernel subsystem. The graphics kernel subsystem is a system file that the operating system completes image display management, and it participates in all image generation management of the system.
本公开实施例提供一种数据传输方法,如图3所示,该方法包括以下步骤:The embodiment of the present disclosure provides a data transmission method. As shown in FIG. 3, the method includes the following steps:
101、服务器接收数据处理装置转发的客户端的请求。101. The server receives a request from the client forwarded by the data processing device.
具体的,在服务器与客户端之间通过数据处理装置进行通信,客户端的请求以及服务器的应答均通过数据处理装置转发,数据处理装置上配置有与服务器上操作系统相同的操作系统,例如均安装有支持WDDM的操作系统。Specifically, the server and the client communicate through the data processing device. The client's request and the server's response are forwarded through the data processing device. The data processing device is configured with the same operating system as that on the server, for example, both are installed There are operating systems that support WDDM.
102、当该请求为图像渲染请求时,服务器获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令。102. When the request is an image rendering request, the server obtains an instruction corresponding to the image rendering; where the instruction includes: a graphics card configuration instruction, a special effect instruction, and a drawing instruction.
在一个实施例中,步骤102中服务器获取图像渲染对应的指令,具体可以包括:In an embodiment, the server acquiring the instruction corresponding to the image rendering in step 102 may specifically include:
102a、服务器截获服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的绘图指令;102a. The server intercepts the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
102b、服务器截获服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的显卡配置指令以及特效指令。102b. The server intercepts the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
具体的,图4所示为本公开实施例中提供的针对服务器的WDDM驱动模型体系结构,相较于图2,在服务器的操作系统中的D3D RT程序和用户模式显示驱动之间增加一个用户模式过滤驱动(或者采用虚拟驱动),同时,在图形内核子系统和显示微型端口驱动之间增加一个内核模式过滤驱动(或者采用虚拟驱动)。下面分别对这两个增加的过滤驱动的功能进行介绍:Specifically, FIG. 4 shows the WDDM drive model architecture for the server provided in the embodiments of the disclosure. Compared with FIG. 2, a user is added between the D3D RT program in the server's operating system and the user mode display driver. Mode filter driver (or use virtual driver). At the same time, add a kernel mode filter driver (or use virtual driver) between the graphics kernel subsystem and the display miniport driver. The functions of these two added filter drivers are introduced below:
1)用户模式过滤驱动1) User mode filter driver
用户模式过滤驱动用于对D3D RT程序向用户模式显示驱动传递的绘图指令进行截获。用户模式过滤驱动相当于D3D RT程序和用户模式显示驱动之间的一个桥梁,对它们之间的指令进行监听,但并不会改变指令本身内容。The user mode filter driver is used to intercept the drawing instructions transmitted from the D3D RT program to the user mode display driver. The user mode filter driver is equivalent to a bridge between the D3D RT program and the user mode display driver. It monitors the commands between them, but does not change the content of the commands themselves.
具体的,如图4所示的结构,当服务器的操作系统中的D3D RT程序收到应用层发送的图像渲染需求时,会首先通知用户模式显示驱动程序(比如DrawPrimitive),用户模式显示驱动会对接收到的绘图指令进行转换处理得到显卡能够识别的指令并通过DMA方式传递给显卡的显存由显卡进行指令执行。本公开实施例中通过用户模式过滤驱动在用户模式显示驱动执行指令转换处理动作之前对绘图指令进行截获。Specifically, as shown in the structure shown in Figure 4, when the D3D RT program in the operating system of the server receives the image rendering request sent by the application layer, it will first notify the user mode display driver (such as DrawPrimitive), and the user mode display driver will The received drawing instructions are converted and processed to obtain instructions that the graphics card can recognize, and the graphics memory transferred to the graphics card by DMA is executed by the graphics card. In the embodiments of the present disclosure, the user mode filter driver is used to intercept the drawing instructions before the user mode display driver executes the instruction conversion processing action.
2)内核模式过滤驱动2) Kernel mode filter driver
内核模式过滤驱动用于对图形内核子系统发给显示微型端口驱动的显卡配置指令和特效指令进行截获,这些指令是D3D RT程序从应用层接收到并传递给图形内核子系统的。The kernel mode filter driver is used to intercept the graphics card configuration instructions and special effect instructions sent by the graphics kernel subsystem to the display miniport driver. These instructions are received from the application layer by the D3D RT program and passed to the graphics kernel subsystem.
需要说明的是,对于虚拟化的服务器,由于没有实体显卡,对于这种场景,应用本公开实施例的技术方案时,在该虚拟化服务器的操作系统中的WDDM驱动模型体系结构中设置一个虚拟的用户模式过滤驱动用于充当用户模式显示驱动的角色以便截获绘图指令,以及设置一个虚拟的显示微型端口驱动用于充当显示微型端口驱动的角色以便显卡配置指令和特效指令。It should be noted that for a virtualized server, since there is no physical graphics card, for this scenario, when the technical solution of the embodiment of the present disclosure is applied, a virtual server is set in the WDDM drive model architecture in the operating system of the virtualized server. The user mode filter driver is used to act as a user mode display driver in order to intercept drawing instructions, and a virtual display miniport driver is used to act as a display miniport driver in order to configure instructions and special effects instructions for the graphics card.
103、服务器确定数据处理装置中对应客户端的图像处理单元。103. The server determines the image processing unit corresponding to the client in the data processing device.
本公开实施例中数据处理装置具备图像渲染能力即配置有图形处理器(Graphics Processing Unit,GPU),若干个客户端通过数据处理装置与服务 器连接,这种情况下,来自若干个客户端的3D图像渲染需求也会非常多,数据处理装置需根据渲染需求任务量配置若干个显卡作为数据处理装置的图像处理模块。In the embodiments of the present disclosure, the data processing device has image rendering capabilities, that is, it is equipped with a graphics processing unit (GPU), and several clients are connected to the server through the data processing device. In this case, 3D images from several clients There will also be a lot of rendering requirements, and the data processing device needs to configure several graphics cards as the image processing modules of the data processing device according to the amount of tasks required for rendering.
在一个实施例中,服务器将数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。In one embodiment, the server divides the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete the image rendering task.
具体的,服务器端对数据处理装置的图像处理模块进行逻辑上的划分,将图像处理模块划分后得到N(N为正整数)个可以独立完成图像渲染任务的图像处理单元,具体的,可以是按照显卡的数量进行划分,还可以是通过对若干个显卡的显存资源进行划分后得到N个图像处理单元。值得一提的是,一个图像处理单元可以为一个或多个客户端提供3D图像渲染服务。Specifically, the server side logically divides the image processing modules of the data processing device, and divides the image processing modules to obtain N (N is a positive integer) image processing units that can independently complete image rendering tasks. Specifically, it can be Dividing according to the number of graphics cards can also be obtained by dividing the video memory resources of several graphics cards to obtain N image processing units. It is worth mentioning that one image processing unit can provide 3D image rendering services for one or more clients.
通过将数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。By dividing the image processing module of the data processing device into several image processing units that can independently complete image tasks and assign them to each client, the image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients from competing for resources and The waiting time is longer.
在一个实施例中,服务器确定数据处理装置中对应处理客户端的图像渲染请求的图像处理单元,包括:In an embodiment, the server determining the image processing unit corresponding to the image rendering request of the client in the data processing apparatus includes:
服务器从图像渲染请求中获取客户端的标识;The server obtains the identification of the client from the image rendering request;
服务器根据客户端的标识判断是否存在客户端对应的图像处理单元;The server judges whether there is an image processing unit corresponding to the client according to the identifier of the client;
如果不存在,则服务器为客户端分配对应的图像处理单元,并将客户端与对应的图像处理单元绑定。If it does not exist, the server allocates a corresponding image processing unit to the client, and binds the client to the corresponding image processing unit.
具体的,客户端的标识可以是IP地址、媒体访问控制地址(Media Access Control Address,MAC地址)等。图像处理单元会有空闲和占用两种状态。服务器端对于每一个图像处理单元会设置一个对应的编号,并在服务器端实时记录相应的状态,占用状态下,服务器会同时记录所占用的客户端数量及相应的标识。本公开实施例中,服务器会为客户端分配一个对应的图像处理单元,并会通过客户端的标识以及图像处理单元的编号对两者进行绑定,这样,就可以高效管理数据处理装置的图像处理资源,为若干个客户端提供图像渲染服务。Specifically, the identifier of the client may be an IP address, a media access control address (Media Access Control Address, MAC address), and so on. The image processing unit has two states: idle and occupied. The server will set a corresponding number for each image processing unit, and record the corresponding status on the server side in real time. In the occupied state, the server will also record the number of occupied clients and the corresponding identification. In the embodiment of the present disclosure, the server allocates a corresponding image processing unit to the client, and binds the two through the identification of the client and the number of the image processing unit, so that the image processing of the data processing device can be efficiently managed Resources, providing image rendering services for several clients.
值得一提的是,当一个客户端与一个图像处理单元绑定之后,如果长时间,比如超过30分钟、或者40分钟客户端没有发送3D图像渲染请求,则 解除该客户端与其对应图像处理单元的绑定关系;解除绑定之后,如果该客户端再次发送3D图像渲染请求,则重新为其分配图像处理单元即可。It is worth mentioning that after a client is bound to an image processing unit, if the client does not send a 3D image rendering request for a long time, such as more than 30 minutes or 40 minutes, the client and its corresponding image processing unit will be released After the binding is released, if the client sends a 3D image rendering request again, the image processing unit can be reassigned to it.
通过将图像处理单元与客户端绑定,便于在客户端发送图像渲染请求后选择对应的图像处理单元直接处理,并且可以将同一客户端的图像渲染请求交由同一图像处理单元,提升处理效率。By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
在一个实施例中,服务器为客户端分配对应的图像处理单元,包括:In an embodiment, the server assigns the corresponding image processing unit to the client, including:
服务器判断当前是否存在空闲的图像处理单元;The server judges whether there is currently an idle image processing unit;
如果存在,则服务器选择一个空闲的图像处理单元分配给客户端;If it exists, the server selects an idle image processing unit to allocate to the client;
具体的,选择一个空闲的图像处理单元分配给客户端,包括:Specifically, selecting an idle image processing unit to allocate to the client includes:
从所有空闲的图像处理单元中随机选择一个图像处理单元;或者,从所有空闲的图像处理单元中选择编号最小的图像处理单元;或者,从所有空闲的图像处理单元中选择编号最大的图像处理单元。Randomly select an image processing unit from all idle image processing units; or, select the image processing unit with the smallest number from all idle image processing units; or, select the image processing unit with the largest number from all idle image processing units .
如果不存在,则服务器按照预设规则选择一个图像处理单元分配给客户端。If it does not exist, the server selects an image processing unit to allocate to the client according to a preset rule.
在一个实施例中,服务器按照预设规则选择一个图像处理单元分配给客户端,包括:In an embodiment, the server selects an image processing unit to allocate to the client according to preset rules, including:
服务器查找出绑定客户端数量最少的图像处理单元分配给客户端;或者,The server finds the image processing unit with the least number of bound clients and allocates it to the client; or,
服务器查找出当前处理负荷最低的图像处理单元分配给客户端。The server finds out the image processing unit with the lowest current processing load and assigns it to the client.
具体的,处理负荷最低的图像处理单元可以是指:单位时间内接收到的3D图像渲染请求数量最少的图像处理单元。前述单位时间是指当前时间之前的一个时间点到当前时间之间的一段时间,其时长可以根据需要进行设置和调整。Specifically, the image processing unit with the lowest processing load may refer to the image processing unit with the smallest number of 3D image rendering requests received per unit time. The aforementioned unit time refers to a period of time between a point in time before the current time and the current time, and its duration can be set and adjusted as required.
如果绑定客户端数量最少的图像处理单元和当前处理负荷最低的图像处理单元为多个时,则可以随机选择一个/选择编号最小的一个/选择编号最大的一个,分配给客户端。If there are multiple image processing units with the least number of bound clients and the image processing unit with the lowest current processing load, one can be randomly selected/choose the one with the smallest number/choose the one with the largest number and allocated to the client.
值得一提的是,步骤102与步骤103的执行顺序可以调换,具体的,当当该请求为图像渲染请求时,服务器可以先执行确定数据处理装置中对应客户端的图像处理单元的步骤,再执行获取图像渲染对应的指令的步骤。It is worth mentioning that the execution order of step 102 and step 103 can be exchanged. Specifically, when the request is an image rendering request, the server can first execute the step of determining the image processing unit corresponding to the client in the data processing device, and then execute the acquisition The steps of the instructions corresponding to the image rendering.
104、服务器将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。104. The server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
具体的,用户模式过滤驱动将截获的绘图指令发送到数据处理装置,内核模式过滤驱动将截获的显卡配置指令和特效指令发送给数据处理装置,数据处理装置操作系统根据前述指令利用数据处理装置的显卡完成图像渲染。具体的,数据处理装置操作系统根据图像渲染相关的指令通过显卡完成图像渲染的过程参照相关的显卡渲染图像的技术资料即可,在此不做详述。Specifically, the user mode filter driver sends the intercepted drawing instructions to the data processing device, the kernel mode filter driver sends the intercepted graphics card configuration instructions and special effect instructions to the data processing device, and the data processing device operating system uses the data processing device's operating system according to the aforementioned instructions. The graphics card completes the image rendering. Specifically, the operating system of the data processing device completes the image rendering process through the graphics card according to the instructions related to the image rendering, and only needs to refer to the relevant technical data of the graphics rendering image, which will not be described in detail here.
在一个实施例中,该方法还包括:In one embodiment, the method further includes:
105、当该请求为除图像渲染请求以外的请求时,服务器根据该请求进行处理后将处理结果传输给数据处理装置以使数据处理装置转发给客户端。105. When the request is a request other than the image rendering request, the server transmits the processing result to the data processing device after processing the request according to the request, so that the data processing device forwards the data processing device to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For a general cloud desktop client request, what the server can directly process is directly processed in the server without being processed by the data processing device. It only needs to forward the processing result, such as computer desktop image data, to the client through the data processing device.
本公开实施例提供的数据传输方法,数据处理装置接收客户端的请求后转发给服务器;当该请求为图像渲染请求时,服务器获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;服务器确定数据处理装置中对应客户端的图像处理单元;服务器将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。因此,服务器的工作量大大减轻,甚至可以不需要图形处理器就可以支撑大量客户端的3D图像渲染任务,也无需升级服务器。In the data transmission method provided by the embodiments of the present disclosure, the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the server obtains the instruction corresponding to the image rendering; wherein the instructions include: graphics card configuration instructions, special effects instructions And drawing instructions; the server determines the image processing unit corresponding to the client in the data processing device; the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after rendering the image according to the instruction; You need to perform image rendering according to instructions. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
本公开实施例提供另一种数据传输方法,如图5所示,该方法包括以下步骤:The embodiment of the present disclosure provides another data transmission method. As shown in FIG. 5, the method includes the following steps:
201、数据处理装置接收客户端的请求。201. The data processing device receives a request from a client.
202、数据处理装置向服务器发送客户端的请求。202. The data processing device sends the client's request to the server.
203、当该请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令。203. When the request is an image rendering request, the data processing device receives an instruction corresponding to the image rendering sent by the server; where the instruction includes: a graphics card configuration instruction, a special effect instruction, and a drawing instruction.
204、数据处理装置根据指令通过数据处理装置的图像处理模块完成图像渲染。204. The data processing device completes image rendering through the image processing module of the data processing device according to the instruction.
本公开实施例中数据处理装置具备图像渲染能力即配置有图形处理器(Graphics Processing Unit,GPU),在实际应用中,有若干个客户端通过数据处理装置与服务器连接,这种情况下,来自客户端的3D图像渲染需求会非常多,数据处理装置需根据渲染需求任务量配置若干个显卡作为数据处理装置的图像处理模块。In the embodiment of the present disclosure, the data processing device has image rendering capability, that is, it is equipped with a graphics processing unit (GPU). In practical applications, several clients are connected to the server through the data processing device. In this case, The client's 3D image rendering needs will be very large, and the data processing device needs to configure several graphics cards as the image processing modules of the data processing device according to the amount of rendering required tasks.
205、数据处理装置将完成图像渲染后得到的图像数据发送给客户端。205. The data processing device sends the image data obtained after the image rendering is completed to the client.
在一个实施例中,步骤204具体包括:In one embodiment, step 204 specifically includes:
图像处理模块中对应客户端的图像处理单元根据指令完成图像渲染;其中,图像处理单元是服务器在图像处理模块中为客户端分配的用于对应处理客户端的图像渲染请求。通过划分图像处理单元可以高效利用数据处理装置的图像处理资源。The image processing unit corresponding to the client in the image processing module completes the image rendering according to the instruction; where the image processing unit is allocated by the server to the client in the image processing module for correspondingly processing the image rendering request of the client. By dividing the image processing unit, the image processing resources of the data processing device can be efficiently used.
数据处理装置的操作系统中的用户模式显示驱动程序对绘图指令转换处理成显卡可识别的指令并由图像处理单元对应的显卡执行;数据处理装置的操作系统中的显示微型端口驱动程序获取显卡配置指令以及特效指令并由图像处理单元对应的显卡执行。The user mode display driver in the operating system of the data processing device converts the drawing instructions into instructions that can be recognized by the graphics card and is executed by the graphics card corresponding to the image processing unit; the display miniport driver in the operating system of the data processing device obtains the graphics card configuration Instructions and special effects instructions are executed by the graphics card corresponding to the image processing unit.
具体的,数据处理装置接收到服务器发送的指令后,数据处理装置安装的微软windows操作系统支持WDDM驱动模型体系结构,数据处理装置操作系统中的用户模式显示驱动对接收到的绘图指令进行转换处理得到显卡能够识别的指令并通过直接内存存取(DMA)方式传递给显卡的显存,结合接收到的显卡配置指令以及特效指令,由显卡进行指令执行完成图像渲染。Specifically, after the data processing device receives the instruction sent by the server, the Microsoft Windows operating system installed on the data processing device supports the WDDM drive model architecture, and the user mode display driver in the data processing device operating system converts the received drawing instructions Obtain instructions that can be recognized by the graphics card and transfer them to the graphics memory of the graphics card through direct memory access (DMA). Combining the received graphics configuration instructions and special effects instructions, the graphics card executes the instructions to complete the image rendering.
示例性的,数据处理装置所执行的图像渲染过程基于图2所示的WDDM模型框架实现,数据处理装置通过网络接收到服务器发送的指令(包括对显卡的配置指令、特效指令及绘图指令)后,其中,绘图指令由一个或者多个包含具体参数的函数组成,这些函数可以在数据处理装置的操作系统中重现,从而完成最终的3D图像渲染工作。比如,接收到的绘图指令为:func1(参数1、参数2、参数3);func2(参数1、参数2);func3(参数1、参数2、参数3、参数4);其中,func1、func2、func3是为了区分不同函数,而给 出的三个示例性的函数名,根据上述示例,数据处理装置可以执行绘图指令中的三个函数来进行3D图像渲染(也就是函数重现过程)。Exemplarily, the image rendering process performed by the data processing device is implemented based on the WDDM model framework shown in FIG. 2. After the data processing device receives instructions (including configuration instructions for the graphics card, special effects instructions, and drawing instructions) sent by the server through the network , Where the drawing instruction is composed of one or more functions containing specific parameters, and these functions can be reproduced in the operating system of the data processing device to complete the final 3D image rendering work. For example, the received drawing commands are: func1 (parameter 1, parameter 2, parameter 3); func2 (parameter 1, parameter 2); func3 (parameter 1, parameter 2, parameter 3, parameter 4); among them, func1, func2 , Func3 are three exemplary function names given to distinguish different functions. According to the above examples, the data processing device can execute the three functions in the drawing instruction to perform 3D image rendering (that is, the function reproduction process).
在一个实施例中,该方法还可以包括:In an embodiment, the method may further include:
206、当该请求为除图像渲染请求以外的请求时,数据处理装置接收服务器根据该请求进行处理后得到的处理结果;206. When the request is a request other than an image rendering request, the data processing device receives the processing result obtained by the server after processing the request according to the request.
207、数据处理装置将处理结果发送给客户端。207. The data processing device sends the processing result to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,服务器将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For general cloud desktop client requests, what the server can directly process is directly processed in the server, and the server can forward the processing result, such as computer desktop image data, to the client through the data processing device.
本公开实施例提供的数据传输方法,数据处理装置接收客户端的请求后转发给服务器;当该请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令,其中,指令包括:显卡配置指令、特效指令及绘图指令;数据处理装置根据指令通过数据处理装置的图像处理模块完成图像渲染;数据处理装置将完成图像渲染后得到的图像数据发送给客户端。因此,服务器的工作量大大减轻,甚至可以不需要图形处理器就可以支撑大量客户端的3D图像渲染任务,也无需升级服务器。In the data transmission method provided by the embodiments of the present disclosure, the data processing device receives the client's request and forwards it to the server; when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server, where the instruction includes: a graphics card Configuration instructions, special effect instructions, and drawing instructions; the data processing device completes image rendering through the image processing module of the data processing device according to the instructions; the data processing device sends the image data obtained after the image rendering is completed to the client. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
基于上述对应的实施例中所描述的数据传输方法,下述为本公开装置实施例,可以用于执行上述本公开方法实施例。Based on the data transmission method described in the above corresponding embodiment, the following are device embodiments of the disclosure, which can be used to execute the above method embodiments of the disclosure.
本公开实施例提供一种服务器,如图6所示,该服务器60包括:An embodiment of the present disclosure provides a server. As shown in FIG. 6, the server 60 includes:
接收模块601,用于接收数据处理装置转发的客户端的请求;The receiving module 601 is used to receive the client's request forwarded by the data processing device;
获取模块602,用于当该请求为图像渲染请求时,获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;The obtaining module 602 is configured to obtain instructions corresponding to image rendering when the request is an image rendering request; the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
确定模块603,用于确定数据处理装置中对应客户端的图像处理单元;The determining module 603 is used to determine the image processing unit corresponding to the client in the data processing device;
传输模块604,用于将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。The transmission module 604 is configured to transmit the instruction to the data processing device so that the image processing unit transmits the image data to the client after completing the image rendering according to the instruction; wherein, there is no need to perform image rendering according to the instruction in the server.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自 客户端的图像渲染请求。The data processing device, a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without a troublesome upgrade.
在一个实施例中,如图6所示,服务器60还可以包括:In an embodiment, as shown in FIG. 6, the server 60 may further include:
划分模块600,用于将数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。The dividing module 600 is used to divide the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete an image rendering task.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,确定模块603具体用于:In an embodiment, the determining module 603 is specifically configured to:
从图像渲染请求中获取客户端的标识;Obtain the client's ID from the image rendering request;
根据客户端的标识判断是否存在客户端对应的图像处理单元;Determine whether there is an image processing unit corresponding to the client according to the identifier of the client;
如果不存在,则为客户端分配对应的图像处理单元,并将客户端与对应的图像处理单元绑定。If it does not exist, assign the corresponding image processing unit to the client, and bind the client to the corresponding image processing unit.
通过将图像处理单元与客户端绑定,便于在客户端发送图像渲染请求后选择对应的图像处理单元直接处理,并且可以将同一客户端的图像渲染请求交由同一图像处理单元,提升处理效率。By binding the image processing unit with the client, it is convenient to select the corresponding image processing unit for direct processing after the client sends the image rendering request, and the image rendering request of the same client can be handed over to the same image processing unit to improve processing efficiency.
在一个实施例中,确定模块603具体用于:In an embodiment, the determining module 603 is specifically configured to:
判断当前是否存在空闲的图像处理单元;Determine whether there is currently an idle image processing unit;
如果存在,则选择一个空闲的图像处理单元分配给客户端;If it exists, select an idle image processing unit to allocate to the client;
如果不存在,则按照预设规则选择一个图像处理单元分配给客户端,包括:If it does not exist, select an image processing unit to assign to the client according to preset rules, including:
查找出绑定客户端数量最少的图像处理单元分配给客户端;或者,Find out the image processing unit with the least number of bound clients and assign it to the client; or,
查找出当前处理负荷最低的图像处理单元分配给客户端。Find out the image processing unit with the lowest current processing load and assign it to the client.
在一个实施例中,如图6所示,服务器60还可以包括:In an embodiment, as shown in FIG. 6, the server 60 may further include:
处理模块605,用于当该请求为除图像渲染请求以外的请求时,根据该请求进行处理后调用传输模块603将处理结果传输给数据处理装置以使数据处理装置转发给客户端。The processing module 605 is configured to, when the request is a request other than the image rendering request, call the transmission module 603 to transmit the processing result to the data processing device after processing the request according to the request, so that the data processing device forwards the data processing device to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器 内处理,无需交由数据处理装置处理,只需将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For general cloud desktop client requests, what the server can directly process is directly processed in the server, without being processed by the data processing device, just forward the processing result, such as computer desktop image data, to the client through the data processing device.
在一个实施例中,获取模块602具体用于:In an embodiment, the obtaining module 602 is specifically configured to:
截获服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的绘图指令;Intercept the drawing instructions sent by the D3D RT program in the server's operating system to the user mode display driver;
截获服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的显卡配置指令以及特效指令。Intercept the graphics card configuration instructions and special effects instructions sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
本公开实施例提供的服务器,数据处理装置接收客户端的请求后转发给服务器;当该请求为图像渲染请求时,服务器获取图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;服务器确定数据处理装置中对应客户端的图像处理单元;服务器将指令传输给数据处理装置以使图像处理单元根据指令完成图像渲染后将图像数据传输给客户端;其中,在服务器内不需要根据指令进行图像渲染。因此,服务器的工作量大大减轻,甚至可以不需要图形处理器就可以支撑大量客户端的3D图像渲染任务,也无需升级服务器。In the server provided by the embodiment of the present disclosure, the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the server obtains the instructions corresponding to the image rendering; wherein the instructions include: graphics card configuration instructions, special effects instructions and drawing Instruction; the server determines the image processing unit corresponding to the client in the data processing device; the server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after the image rendering is completed according to the instruction; Instruct image rendering. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
本公开实施例提供一种数据处理装置,如图7所示,该数据处理装置70包括:An embodiment of the present disclosure provides a data processing device. As shown in FIG. 7, the data processing device 70 includes:
通信模块701、处理器702、图像处理模块703、及存储器704;数据处理装置70通过通信模块701分别与客户端和服务器之间进行通信;通信模块701包括:请求接收模块7011、请求转发模块7012、指令接收模块7013、图像采集模块7014和图像传输模块7015;The communication module 701, the processor 702, the image processing module 703, and the memory 704; the data processing device 70 communicates with the client and the server respectively through the communication module 701; the communication module 701 includes: a request receiving module 7011, a request forwarding module 7012 , Instruction receiving module 7013, image acquisition module 7014 and image transmission module 7015;
请求接收模块7011,用于接收客户端的请求;The request receiving module 7011 is used to receive the client's request;
请求转发模块7012,用于向服务器发送客户端的请求;The request forwarding module 7012 is used to send the client's request to the server;
指令接收模块7013,用于当请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令;其中,指令包括:显卡配置指令、特效指令及绘图指令;The instruction receiving module 7013 is configured to receive the instruction corresponding to the image rendering sent by the server by the data processing device when the request is an image rendering request; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
存储器704,用于缓存从服务器接收到的图像渲染对应的指令以及缓存完成图像渲染后得到的图像;The memory 704 is configured to cache the instruction corresponding to the image rendering received from the server and the image obtained after the image rendering is completed;
处理器702,用于根据指令指示图像处理模块703完成图像渲染;The processor 702 is configured to instruct the image processing module 703 to complete image rendering according to instructions;
图像采集模块7014,用于采集完成图像渲染后得到的图像;The image acquisition module 7014 is used to acquire an image obtained after image rendering is completed;
图像传输模块7015,用于将完成图像渲染后得到的图像发送给客户端。The image transmission module 7015 is used to send the image obtained after the image rendering is completed to the client.
通过数据处理装置这一设置于服务器与客户端之间的设备完成客户端的图像渲染任务,从而使得服务器可以无需通过麻烦的升级就能支持大量来自客户端的图像渲染请求。The data processing device, which is a device set between the server and the client, completes the image rendering task of the client, so that the server can support a large number of image rendering requests from the client without troublesome upgrades.
在一个实施例中,处理器702具体用于:In an embodiment, the processor 702 is specifically configured to:
根据指令指示图像处理模块中对应客户端的图像处理单元完成图像渲染;其中,图像处理单元是服务器在图像处理模块中为客户端分配的用于对应处理客户端的图像渲染请求。数据处理装置的操作系统中的用户模式显示驱动程序对绘图指令转换处理成显卡可识别的指令并由图像处理单元对应的显卡执行;数据处理装置的操作系统中的显示微型端口驱动程序获取显卡配置指令以及特效指令并由图像处理单元对应的显卡执行。According to the instruction, the image processing unit corresponding to the client in the image processing module is instructed to complete the image rendering; wherein the image processing unit is allocated by the server to the client in the image processing module for corresponding processing of the image rendering request of the client. The user mode display driver in the operating system of the data processing device converts the drawing instructions into instructions that can be recognized by the graphics card and is executed by the graphics card corresponding to the image processing unit; the display miniport driver in the operating system of the data processing device obtains the graphics card configuration Instructions and special effects instructions are executed by the graphics card corresponding to the image processing unit.
示例性的,数据处理装置配置有支持WDDM的操作系统,接收到服务器发送的图像渲染对应的指令后,按照操作系统中执行指令的流程通过自身配置的显卡完成图像渲染。Exemplarily, the data processing device is configured with an operating system that supports WDDM, and after receiving the instruction corresponding to the image rendering sent by the server, the image rendering is completed through the graphics card configured by itself according to the instruction execution flow in the operating system.
服务器对数据处理装置的图像处理模块划分成若干个可以独立完成图像任务的图像处理单元,分配给各个客户端,可以更加高效的利用图像处理单元完成图像渲染,避免多个客户端争抢资源以及等待处理时间较长。The server divides the image processing module of the data processing device into several image processing units that can complete image tasks independently, and assign them to each client. The image processing unit can be used more efficiently to complete image rendering, avoiding multiple clients competing for resources and The waiting time is longer.
在一个实施例中,图像采集模块7014还用于:当该请求为除图像渲染请求以外的请求时,采集服务器发送的根据该请求进行处理后得到的图像;In an embodiment, the image acquisition module 7014 is further configured to: when the request is a request other than an image rendering request, acquire an image sent by the server after processing according to the request;
相应的,图像传输模块7015还用于:将服务器发送的根据该请求进行处理后得到的图像发送给客户端。Correspondingly, the image transmission module 7015 is also used to: send the image sent by the server and obtained after processing according to the request to the client.
对于一般的云桌面客户端请求,服务器可以直接处理的则直接在服务器内处理,服务器将处理结果例如计算机桌面图像数据通过数据处理装置转发给客户端即可。For general cloud desktop client requests, what the server can directly process is directly processed in the server, and the server can forward the processing result, such as computer desktop image data, to the client through the data processing device.
基于图7所示的数据处理装置,图8为本公开实施例提供的一个详细的实施效果示意图。Based on the data processing device shown in FIG. 7, FIG. 8 is a detailed schematic diagram of implementation effects provided by the embodiments of the disclosure.
本公开实施例提供的数据处理装置,数据处理装置接收客户端的请求后转发给服务器;当该请求为图像渲染请求时,数据处理装置接收服务器发送的图像渲染对应的指令,其中,指令包括:显卡配置指令、特效指令及绘图指令;数据处理装置根据指令通过数据处理装置的图像处理模块完成图像渲染;数据处理装置将完成图像渲染后得到的图像数据发送给客户端。因此,服务器的工作量大大减轻,甚至可以不需要图形处理器就可以支撑大量客户端的3D图像渲染任务,也无需升级服务器。In the data processing device provided by the embodiment of the present disclosure, the data processing device receives the request from the client and forwards it to the server; when the request is an image rendering request, the data processing device receives the instruction corresponding to the image rendering sent by the server, where the instruction includes: a graphics card Configuration instructions, special effect instructions, and drawing instructions; the data processing device completes image rendering through the image processing module of the data processing device according to the instructions; the data processing device sends the image data obtained after the image rendering is completed to the client. Therefore, the workload of the server is greatly reduced, and even a large number of client-side 3D image rendering tasks can be supported without a graphics processor, and there is no need to upgrade the server.
基于上述图3/5对应的实施例中所描述的数据传输方法,本公开实施例还提供一种计算机可读存储介质,例如,非临时性计算机可读存储介质可以是只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、CD-ROM、磁带、软盘和光数据存储装置等。该存储介质上存储有计算机指令,用于执行上述图3/5对应的实施例中所描述的数据传输方法,此处不再赘述。Based on the data transmission method described in the embodiment corresponding to FIG. 3/5, the embodiment of the present disclosure also provides a computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a read-only memory (Read Only). Memory, ROM), random access memory (Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk and optical data storage device, etc. The storage medium stores computer instructions for executing the data transmission method described in the embodiment corresponding to FIG. 3/5, which will not be repeated here.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。After considering the specification and practicing the disclosure disclosed herein, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The description and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

Claims (20)

  1. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized by comprising:
    服务器接收数据处理装置转发的客户端的请求;The server receives the client's request forwarded by the data processing device;
    当所述请求为图像渲染请求时,所述服务器获取所述图像渲染对应的指令;其中,所述指令包括:显卡配置指令、特效指令及绘图指令;When the request is an image rendering request, the server obtains instructions corresponding to the image rendering; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
    所述服务器确定所述数据处理装置中对应所述客户端的图像处理单元;Determining, by the server, an image processing unit corresponding to the client in the data processing device;
    所述服务器将所述指令传输给所述数据处理装置以使所述图像处理单元根据所述指令完成图像渲染后将图像数据传输给所述客户端;其中,在所述服务器内不需要根据所述指令进行图像渲染。The server transmits the instruction to the data processing device so that the image processing unit transmits the image data to the client after the image rendering is completed according to the instruction; wherein, there is no need to perform the image processing in the server. The instructions are for image rendering.
  2. 根据权利要求1所述的方法,其特征在于,所述方法之前还包括:The method according to claim 1, wherein the method further comprises:
    所述服务器将所述数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。The server divides the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete an image rendering task.
  3. 根据权利要求2所述的方法,其特征在于,所述服务器确定所述数据处理装置中对应处理所述客户端的所述图像渲染请求的图像处理单元,包括:The method according to claim 2, wherein the server determining the image processing unit corresponding to the image rendering request of the client in the data processing device comprises:
    所述服务器从所述图像渲染请求中获取所述客户端的标识;The server obtains the identification of the client from the image rendering request;
    所述服务器根据所述客户端的标识判断是否存在所述客户端对应的图像处理单元;The server judges whether there is an image processing unit corresponding to the client according to the identifier of the client;
    如果不存在,则所述服务器为所述客户端分配对应的图像处理单元,并将所述客户端与所述对应的图像处理单元绑定。If it does not exist, the server allocates a corresponding image processing unit to the client, and binds the client to the corresponding image processing unit.
  4. 根据权利要求3所述的方法,其特征在于,所述服务器为所述客户端分配对应的图像处理单元,包括:The method according to claim 3, wherein the server assigns a corresponding image processing unit to the client, comprising:
    所述服务器判断当前是否存在空闲的图像处理单元;The server judges whether there is currently an idle image processing unit;
    如果存在,则所述服务器选择一个空闲的图像处理单元分配给所述客户端;If it exists, the server selects an idle image processing unit to allocate to the client;
    如果不存在,则所述服务器按照预设规则选择一个图像处理单元分配给所述客户端。If it does not exist, the server selects an image processing unit to allocate to the client according to a preset rule.
  5. 根据权利要求4所述的方法,其特征在于,所述服务器按照预设规则选择一个图像处理单元分配给所述客户端,包括:The method according to claim 4, wherein the server selecting an image processing unit to allocate to the client according to a preset rule comprises:
    所述服务器查找出绑定客户端数量最少的图像处理单元分配给所述客户端;或者,The server finds out the image processing unit with the least number of bound clients and allocates it to the client; or,
    所述服务器查找出当前处理负荷最低的图像处理单元分配给所述客户端。The server finds out the image processing unit with the lowest current processing load and allocates it to the client.
  6. 根据权利要求1所述的方法,其特征在于,所述服务器获取所述图像渲染对应的指令,包括:The method according to claim 1, wherein the server acquiring the instruction corresponding to the image rendering comprises:
    所述服务器截获所述服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的所述绘图指令;The server intercepts the drawing instruction sent by the D3D RT program in the operating system of the server to the user mode display driver;
    所述服务器截获所述服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的所述显卡配置指令以及所述特效指令。The server intercepts the graphics card configuration instruction and the special effect instruction sent by the graphics kernel subsystem in the server's operating system to the display miniport driver.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    当所述请求为除所述图像渲染请求以外的请求时,所述服务器根据所述请求进行处理后将所述处理结果传输给所述数据处理装置以使所述数据处理装置转发给所述客户端。When the request is a request other than the image rendering request, the server transmits the processing result to the data processing device after processing the request according to the request so that the data processing device can forward the data processing device to the client end.
  8. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized by comprising:
    数据处理装置接收客户端的请求;The data processing device receives the client's request;
    所述数据处理装置向服务器发送所述客户端的请求;The data processing device sends the client's request to the server;
    当所述请求为图像渲染请求时,所述数据处理装置接收所述服务器发送的所述图像渲染对应的指令;其中,所述指令包括:显卡配置指令、特效指令及绘图指令;When the request is an image rendering request, the data processing device receives an instruction corresponding to the image rendering sent by the server; wherein the instruction includes: a graphics card configuration instruction, a special effect instruction, and a drawing instruction;
    所述数据处理装置根据所述指令通过所述数据处理装置的图像处理模块完成图像渲染;The data processing device completes image rendering through the image processing module of the data processing device according to the instruction;
    所述数据处理装置将完成图像渲染后得到的图像数据发送给所述客户端。The data processing device sends the image data obtained after the image rendering is completed to the client.
  9. 根据权利要求8所述的方法,其特征在于,所述数据处理装置根据所述指令通过所述数据处理装置的图像处理模块完成图像渲染,包括:The method according to claim 8, wherein the data processing device performs image rendering through the image processing module of the data processing device according to the instruction, comprising:
    所述图像处理模块中对应所述客户端的图像处理单元根据所述指令完成 图像渲染;其中,所述图像处理单元是所述服务器在所述图像处理模块中为所述客户端分配的用于对应处理所述客户端的所述图像渲染请求。The image processing unit corresponding to the client in the image processing module completes the image rendering according to the instruction; wherein, the image processing unit is allocated by the server in the image processing module for the client to correspond to Processing the image rendering request of the client.
  10. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    当所述请求为除所述图像渲染请求以外的请求时,所述数据处理装置接收所述服务器根据所述请求进行处理后得到的处理结果;When the request is a request other than the image rendering request, the data processing device receives a processing result obtained by the server after processing according to the request;
    所述数据处理装置将所述处理结果发送给所述客户端。The data processing device sends the processing result to the client.
  11. 一种服务器,其特征在于,包括:A server, characterized in that it comprises:
    接收模块,用于接收数据处理装置转发的客户端的请求;The receiving module is used to receive the client's request forwarded by the data processing device;
    获取模块,用于当所述请求为图像渲染请求时,获取所述图像渲染对应的指令;其中,所述指令包括:显卡配置指令、特效指令及绘图指令;The obtaining module is configured to obtain instructions corresponding to the image rendering when the request is an image rendering request; wherein the instructions include: graphics card configuration instructions, special effects instructions, and drawing instructions;
    确定模块,用于确定所述数据处理装置中对应所述客户端的图像处理单元;A determining module, configured to determine an image processing unit corresponding to the client in the data processing device;
    传输模块,用于将所述指令传输给所述数据处理装置以使所述图像处理单元根据所述指令完成图像渲染后将图像数据传输给所述客户端;其中,在所述服务器内不需要根据所述指令进行图像渲染。The transmission module is configured to transmit the instruction to the data processing device so that the image processing unit transmits the image data to the client after rendering the image according to the instruction; wherein, there is no need in the server Perform image rendering according to the instructions.
  12. 根据权利要求1所述的服务器,其特征在于,所述服务器还包括:The server according to claim 1, wherein the server further comprises:
    划分模块,用于将所述数据处理装置的图像处理模块划分为N个图像处理单元;其中,每个图像处理单元能够独立完成图像渲染任务。The dividing module is used to divide the image processing module of the data processing device into N image processing units; wherein each image processing unit can independently complete an image rendering task.
  13. 根据权利要求12所述的服务器,其特征在于,所述确定模块具体用于:The server according to claim 12, wherein the determining module is specifically configured to:
    从所述图像渲染请求中获取所述客户端的标识;Obtaining the identification of the client from the image rendering request;
    根据所述客户端的标识判断是否存在所述客户端对应的图像处理单元;Judging whether there is an image processing unit corresponding to the client according to the identifier of the client;
    如果不存在,则为所述客户端分配对应的图像处理单元,并将所述客户端与所述对应的图像处理单元绑定。If it does not exist, assign a corresponding image processing unit to the client, and bind the client to the corresponding image processing unit.
  14. 根据权利要求13所述的服务器,其特征在于,所述确定模块具体用于:The server according to claim 13, wherein the determining module is specifically configured to:
    判断当前是否存在空闲的图像处理单元;Determine whether there is currently an idle image processing unit;
    如果存在,则选择一个空闲的图像处理单元分配给所述客户端;If it exists, select an idle image processing unit to allocate to the client;
    如果不存在,则按照预设规则选择一个图像处理单元分配给所述客户端。If it does not exist, an image processing unit is selected and allocated to the client according to a preset rule.
  15. 根据权利要求14所述的服务器,其特征在于,所述确定模块具体用于:The server according to claim 14, wherein the determining module is specifically configured to:
    查找出绑定客户端数量最少的图像处理单元分配给所述客户端;或者,Find out the image processing unit with the least number of bound clients and allocate it to the client; or,
    查找出当前处理负荷最低的图像处理单元分配给所述客户端。The image processing unit with the lowest current processing load is found and allocated to the client.
  16. 根据权利要求1所述的服务器,其特征在于,所述获取模块具体用于:The server according to claim 1, wherein the obtaining module is specifically configured to:
    截获所述服务器的操作系统中的D3D RT程序向用户模式显示驱动程序发送的所述绘图指令;Intercepting the drawing instruction sent by the D3D RT program in the operating system of the server to the user mode display driver;
    截获所述服务器的操作系统中的图形内核子系统向显示微型端口驱动程序发送的所述显卡配置指令以及所述特效指令。Intercept the graphics card configuration instructions and the special effect instructions sent by the graphics kernel subsystem in the operating system of the server to the display miniport driver.
  17. 根据权利要求1所述的服务器,其特征在于,所述服务器还包括:The server according to claim 1, wherein the server further comprises:
    处理模块,用于当所述请求为除所述图像渲染请求以外的请求时,所述服务器根据所述请求进行处理后调用所述传输模块将所述处理结果传输给所述数据处理装置以使所述数据处理装置转发给所述客户端。The processing module is configured to, when the request is a request other than the image rendering request, the server processes the request according to the request and then calls the transmission module to transmit the processing result to the data processing device so that The data processing device forwards to the client.
  18. 一种数据处理装置,其特征在于,包括:通信模块、处理器、图像处理模块、及存储器;所述数据处理装置通过所述通信模块分别与客户端和服务器之间进行通信;所述通信模块包括:请求接收模块、请求转发模块、指令接收模块、图像采集模块和图像传输模块;A data processing device, which is characterized by comprising: a communication module, a processor, an image processing module, and a memory; the data processing device communicates with a client and a server through the communication module; the communication module Including: request receiving module, request forwarding module, instruction receiving module, image acquisition module and image transmission module;
    所述请求接收模块,用于接收所述客户端的请求;The request receiving module is configured to receive a request from the client;
    所述请求转发模块,用于向所述服务器发送所述客户端的请求;The request forwarding module is configured to send the client's request to the server;
    所述指令接收模块,用于当所述请求为图像渲染请求时,所述数据处理装置接收所述服务器发送的所述图像渲染对应的指令;其中,所述指令包括:显卡配置指令、特效指令及绘图指令;The instruction receiving module is configured to: when the request is an image rendering request, the data processing device receives an instruction corresponding to the image rendering sent by the server; wherein the instruction includes: a graphics card configuration instruction and a special effect instruction And drawing instructions;
    所述存储器,用于缓存从所述服务器接收到的所述图像渲染对应的指令以及完成图像渲染后得到的图像;The memory is configured to cache the instruction corresponding to the image rendering received from the server and the image obtained after the image rendering is completed;
    所述处理器,用于根据所述指令指示所述图像处理模块完成图像渲染;The processor is configured to instruct the image processing module to complete image rendering according to the instruction;
    所述图像采集模块,用于采集所述完成图像渲染后得到的图像;The image acquisition module is used to acquire the image obtained after the image rendering is completed;
    所述图像传输模块,用于将所述完成图像渲染后得到的图像发送给所述客户端。The image transmission module is configured to send the image obtained after the image rendering is completed to the client.
  19. 根据权利要求18所述的数据处理装置,其特征在于,所述处理器具体用于:The data processing device according to claim 18, wherein the processor is specifically configured to:
    根据所述指令指示所述图像处理模块中对应所述客户端的图像处理单元完成图像渲染;其中,所述图像处理单元是所述服务器在所述图像处理模块中为所述客户端分配的用于对应处理所述客户端的所述图像渲染请求。According to the instruction, the image processing unit corresponding to the client in the image processing module is instructed to complete the image rendering; wherein, the image processing unit is allocated by the server to the client in the image processing module for Correspondingly process the image rendering request of the client.
  20. 根据权利要求18所述的数据处理装置,其特征在于,所述图像采集模块还用于:当所述请求为除所述图像渲染请求以外的请求时,采集所述服务器发送的根据所述请求进行处理后得到的图像;The data processing device according to claim 18, wherein the image acquisition module is further configured to: when the request is a request other than the image rendering request, collect the request sent by the server according to the request The image obtained after processing;
    相应的,所述图像传输模块还用于:将所述服务器发送的根据所述请求进行处理后得到的图像发送给所述客户端。Correspondingly, the image transmission module is further configured to: send the image obtained after processing according to the request sent by the server to the client.
PCT/CN2020/086293 2019-07-16 2020-04-23 Data transmission method and apparatus, and server WO2021008183A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910639886.7 2019-07-16
CN201910639886.7A CN110557624A (en) 2019-07-16 2019-07-16 Data transmission method and device and server

Publications (1)

Publication Number Publication Date
WO2021008183A1 true WO2021008183A1 (en) 2021-01-21

Family

ID=68735549

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/086293 WO2021008183A1 (en) 2019-07-16 2020-04-23 Data transmission method and apparatus, and server

Country Status (2)

Country Link
CN (1) CN110557624A (en)
WO (1) WO2021008183A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110557624A (en) * 2019-07-16 2019-12-10 西安万像电子科技有限公司 Data transmission method and device and server
CN111277829B (en) * 2020-02-25 2023-03-24 西安万像电子科技有限公司 Encoding and decoding method and device
CN111681157B (en) * 2020-06-09 2024-04-09 西安万像电子科技有限公司 Image rendering method and system
CN114650434A (en) * 2020-12-18 2022-06-21 华为云计算技术有限公司 Cloud service-based rendering method and related equipment thereof
WO2023050418A1 (en) * 2021-09-30 2023-04-06 深圳传音控股股份有限公司 Data processing method, data processing system, electronic device, and storage medium
CN116485965A (en) * 2022-01-13 2023-07-25 华为云计算技术有限公司 Graphic rendering system, method and management platform based on cloud technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888485A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Method for distributing cloud computing resource, device thereof and system thereof
CN105242957A (en) * 2015-09-28 2016-01-13 广州云晫信息科技有限公司 Method and system for cloud computing system to allocate GPU resources to virtual machine
CN109582425A (en) * 2018-12-04 2019-04-05 中山大学 A kind of GPU service redirection system and method merged based on cloud with terminal GPU
US20190132381A1 (en) * 2012-03-02 2019-05-02 Citrix Systems, Inc. Reverse Seamless Integration Between Local and Remote Computing Environments
CN110545415A (en) * 2019-07-16 2019-12-06 西安万像电子科技有限公司 Data transmission method and device and server
CN110557624A (en) * 2019-07-16 2019-12-10 西安万像电子科技有限公司 Data transmission method and device and server

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BRPI0818582A2 (en) * 2007-10-20 2015-07-21 Citrix Systems Inc Methods and systems for remotely displaying three-dimensional graph data
US9069622B2 (en) * 2010-09-30 2015-06-30 Microsoft Technology Licensing, Llc Techniques for load balancing GPU enabled virtual machines
US9348552B2 (en) * 2011-11-16 2016-05-24 Cisco Technology, Inc. Network appliance for transcoding or enriching virtual desktop infrastructure desktop images
TWI482118B (en) * 2012-10-18 2015-04-21 Wistron Corp System and method for processing load balance of graphic streams
US9665921B2 (en) * 2012-12-29 2017-05-30 Futurewei Technologies, Inc. Adaptive OpenGL 3D graphics in virtual desktop infrastructure
WO2015042430A1 (en) * 2013-09-19 2015-03-26 Citrix Systems, Inc. Transmitting hardware-rendered graphical data
US9824026B2 (en) * 2014-12-23 2017-11-21 Intel Corporation Apparatus and method for managing a virtual graphics processor unit (VGPU)
US10699364B2 (en) * 2017-07-12 2020-06-30 Citrix Systems, Inc. Graphical rendering using multiple graphics processors

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190132381A1 (en) * 2012-03-02 2019-05-02 Citrix Systems, Inc. Reverse Seamless Integration Between Local and Remote Computing Environments
CN103888485A (en) * 2012-12-19 2014-06-25 华为技术有限公司 Method for distributing cloud computing resource, device thereof and system thereof
CN105242957A (en) * 2015-09-28 2016-01-13 广州云晫信息科技有限公司 Method and system for cloud computing system to allocate GPU resources to virtual machine
CN109582425A (en) * 2018-12-04 2019-04-05 中山大学 A kind of GPU service redirection system and method merged based on cloud with terminal GPU
CN110545415A (en) * 2019-07-16 2019-12-06 西安万像电子科技有限公司 Data transmission method and device and server
CN110557624A (en) * 2019-07-16 2019-12-10 西安万像电子科技有限公司 Data transmission method and device and server

Also Published As

Publication number Publication date
CN110557624A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
WO2021008183A1 (en) Data transmission method and apparatus, and server
US9798565B2 (en) Data processing system and method having an operating system that communicates with an accelerator independently of a hypervisor
JP5902175B2 (en) GPU load balancing technique for virtual machines
US10229469B2 (en) System and method for distributed virtualization of GPUs in desktop cloud
JP6329484B2 (en) Deliver a single end-user experience from multiple servers to clients
CN111488196B (en) Rendering method and device, storage medium and processor
WO2021008185A1 (en) Data transmission method and apparatus, and server
US8872835B2 (en) Prevention of DoS attack by a rogue graphics application
WO2022041507A1 (en) 3d rendering method and system
US9389896B1 (en) Sharing webcam between guest and host OS
CN105122210B (en) GPU virtualization implementation method and related device and system
JP2016541072A (en) Resource processing method, operating system, and device
CN110458748A (en) Data transmission method, server and client
JP7100154B2 (en) Processor core scheduling method, equipment, terminals and storage media
US20070253436A1 (en) Communicating in a virtual environment
JP2022516486A (en) Resource management methods and equipment, electronic devices, and recording media
US9104452B2 (en) Hybrid remote sessions
US11750749B1 (en) Method to use native scanning properties dialog to scan in scanner redirection
US11716428B1 (en) Method of dynamically mapping scanner names from client to agent
JP2008107966A (en) Computer system
US8442939B2 (en) File sharing method, computer system, and job scheduler
WO2023216621A1 (en) Cloud desktop image processing method and apparatus, server and storage medium
US20240022670A1 (en) Scanning preview method in scanner redirection
CN109634721B (en) Method and related device for starting communication between virtual machine and host
US8978042B2 (en) Method and system for maintaining game functionality for a plurality of game instances running on a computer system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20841507

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20841507

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20841507

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/10/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20841507

Country of ref document: EP

Kind code of ref document: A1