Data processing methods and systems
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-04
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本公开实施例提供一种数据处理方法及系统,能够解决现有软编码对主机CPU算力的消耗和负荷问题
[0004]本公开实施例提供一种数据处理方法及系统,能够解决现有软编码对主机CPU算力的消耗和负荷问题。所述技术方案如下:
Smart Images

Figure CN113141389B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of virtual machine technology, and in particular to data processing methods and systems. Background Technology
[0002] IaaS (Infrastructure as a Service) refers to a service model that provides IT infrastructure as a service through a network, with billing based on the actual usage or occupancy of resources by the user. In this service model, ordinary users do not need to build their own data centers or other hardware facilities. Instead, they obtain computer infrastructure services, including servers, storage, and networking, from an IaaS service provider via the Internet through a rental agreement.
[0003] For current IaaS vendors, the profit comes from the difference between the price customers pay for virtual machines (VMs) and the cost of hosting those VMs. In the current VDI (Virtual Desktop Infrastructure) market, the cost per server is fixed; therefore, the best way to reduce VM costs is to create more VMs on each host server. For existing VDI systems, current encoding primarily relies on software encoding within the VM's CPU, consuming significant host CPU resources. Therefore, reducing the CPU load on the host CPU and thus reducing the computational power required for encoding is a very real problem. Summary of the Invention
[0004] This disclosure provides a data processing method and system that can solve the problems of excessive CPU computing power consumption and load on existing software coding. The technical solution is as follows:
[0005] According to a first aspect of the present disclosure, a data processing method is provided, the method comprising:
[0006] The smart network card acquires the first UDP packet generated by the virtual machine. The first UDP packet includes image data on the virtual machine and the encoding identifier corresponding to the image data.
[0007] The first UDP packet is parsed, and the parsed image data is encoded according to the encoding identifier obtained from the parsing to obtain the encoded image data;
[0008] A second UDP packet is generated based on the encoded image data and the encoding identifier;
[0009] The second UDP packet is sent to the client device so that the client device can parse the second UDP packet and decode the encoded image data according to the parsed encoding identifier before displaying it.
[0010] By encoding the image data of virtual machines using smart network interface cards (NICs) and sending it to client devices, the technology shifts the encoding process from CPU-based software encoding to NIC-based encoding. This offloads the most computationally valuable data to the host CPU, reducing the CPU load and increasing the number of virtual machines (VMs). This results in cost and density advantages, ultimately boosting the profits of IaaS (Internet Application Assurance) vendors.
[0011] In one embodiment, the smart network interface card (NIC) acquiring the first UDP packet generated by the virtual machine includes: the smart NIC receiving the first UDP packet sent by the virtual machine through the network interface controller (NIC) device;
[0012] Sending the second UDP packet to the client device includes: sending the second UDP packet to the client device via the NIC device. The method further includes:
[0013] In one embodiment, the parsed image data is encoded according to the parsed encoding identifier to obtain the encoded image data, which includes:
[0014] The parsed image data is then VGTP encoded based on the parsed encoding identifier to obtain the encoded image data.
[0015] In one embodiment, the encoded identifier includes an SN sequence, and the encoded identifier is located in the header 8 bytes of the first UDP packet.
[0016] According to a second aspect of the present disclosure, a data processing method is provided, comprising:
[0017] When the virtual machine starts, the image acquisition module acquires image data on the virtual machine, adds an encoding identifier to the image data, generates the first UDP packet, and sends the first UDP packet to the smart network card through the network interface controller (NIC) device.
[0018] The smart network interface card (NIC) parses the first UDP packet, encodes the parsed image data according to the encoding identifier obtained from the parsing, obtains the encoded image data, and generates a second UDP packet according to the encoded image data and the encoding identifier. The second UDP packet is then sent to the client device through the NIC device.
[0019] The client device parses the second UDP packet and decodes the encoded image data according to the parsed encoding identifier before displaying it.
[0020] In one embodiment, the method further includes, before acquiring image data on the virtual machine:
[0021] The client device obtains the user login information and sends it to the VDI management platform;
[0022] The VDI management platform sends a list of virtual machines corresponding to the user to the client device based on the user's login information;
[0023] The client device obtains the user's operation instructions and sends them to the VDI management platform. The user's operation instructions are used to instruct the selection of a virtual machine from the list of virtual machines.
[0024] The VDI management platform creates or starts the corresponding virtual machine based on the user's operation instructions.
[0025] In one embodiment, the intelligent network uses VGTP encoding for the image data, and the client device uses VGTP decoding for the encoded image data.
[0026] According to a third aspect of the present disclosure, a data processing system is provided, comprising: at least one client device, at least one virtual machine, and a host server, wherein each virtual machine is provided with an image acquisition module, and the host server is provided with a NIC device and a smart network card;
[0027] The image acquisition module is used to acquire image data in the virtual machine when the virtual machine starts, add a flag bit to the image data and generate a first UDP packet, and send the first UDP packet to the smart network card through the NIC.
[0028] The smart network interface card (NIC) is used to parse the first UDP packet, encode the image data according to the encoding identifier obtained from the parsing, obtain the encoded image data, and generate a second UDP packet according to the encoded image data and the encoding identifier. The second UDP packet is then sent to the corresponding client device through the NIC.
[0029] The client device is used to parse the second UDP packet to obtain the encoding identifier and the encoded image data, and then decode the encoded image data according to the encoding identifier for display.
[0030] In one embodiment, the data processing system further includes: a VDI management platform;
[0031] The client device is used to obtain user login information and send it to the VDI management platform.
[0032] The VDI management platform is used to send a list of virtual machines corresponding to a user to the client device based on the user's login information;
[0033] The client device is used to display the list of virtual machines and obtain user operation instructions, which are used to instruct the user to select a virtual machine from the list of virtual machines.
[0034] A VDI management platform is used to create or start corresponding virtual machines based on user operation commands.
[0035] In one embodiment, the smart network interface card is equipped with a VGTP encoding module;
[0036] The VGTP encoding module is used to parse the first UDP packet and perform VGTP encoding on the image data according to the encoding identifier obtained from the parsing to obtain the encoded image data.
[0037] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0039] Figure 1 This is a flowchart of a data processing method provided in an embodiment of this disclosure;
[0040] Figure 2 This is a structural diagram of a data processing system provided in an embodiment of this disclosure;
[0041] Figure 3 This is a flowchart of a data processing method provided in an embodiment of this disclosure;
[0042] Figure 4 This is a structural diagram of a smart network interface card provided in an embodiment of this disclosure. Detailed Implementation
[0043] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0044] This disclosure provides a data processing method, such as... Figure 1 As shown, the data processing method includes the following steps:
[0045] 101. The smart network card obtains the first UDP packet generated by the virtual machine.
[0046] The first UDP packet includes image data from the virtual machine and a corresponding encoded identifier. In this embodiment, the smart NIC's acquisition of the first UDP packet generated by the virtual machine includes: the smart NIC receiving the first UDP packet sent by the virtual machine through the network interface controller (NIC) device. Specifically, the virtual machine is equipped with an image acquisition module. When the virtual machine starts, the image acquisition module acquires image data from the virtual machine, adds an encoded identifier to the image data, packages it into a first UDP packet, and then sends the first UDP packet to the NIC device. The NIC device then sends the first UDP packet to the smart NIC. In one example, the encoded identifier includes an SN sequence, located in the header 8 bytes of the first UDP packet.
[0047] 102. Parse the first UDP packet, and encode the parsed image data according to the encoding identifier obtained from the parsing to obtain the encoded image data.
[0048] The core of a smart network interface card (NIC) is to assist the CPU in handling network load and programming network interface functions through an FPGA (Field-Programmable Gate Array). Therefore, in this embodiment, when the smart NIC receives a first UDP packet, it parses the packet to obtain the virtual machine's image data and encoding identifier. Then, it encodes the parsed virtual machine image data according to the encoding identifier to obtain the encoded image data. Compared with existing technologies, this method shifts the portion originally performed by the CPU in software encoding to the FPGA in hardware encoding on the smart NIC, thus offloading the most needed computing power to the encoding and reducing the overhead of software encoding on the host CPU.
[0049] In one example, the smart network card is equipped with a VGTP encoding module, which is implemented using an FPGA. The smart network card performs VGTP encoding on the parsed image data according to the parsed encoding identifier to obtain the encoded image data.
[0050] 103. Generate a second UDP packet based on the encoded image data and the encoding identifier.
[0051] After the smart network interface card (NIC) completes encoding, the encoded image data and encoding identifier are packaged into a second UDP packet. It should be noted that the encoding identifier in the second UDP packet is the same as the encoding identifier in the first UDP packet.
[0052] 104. Send the second UDP packet to the client device so that the client device can parse the second UDP packet and decode the encoded image data according to the parsed encoding identifier for display.
[0053] In this embodiment of the disclosure, the smart network interface card (NIC) sending the second UDP packet to the client device includes: sending the second UDP packet to the client device via the NIC device. Specifically, the smart network interface card sends the second UDP packet to the NIC device, the NIC device sends the second UDP packet to the client device, and after receiving the second UDP packet, the client device parses the second UDP packet to obtain encoded image data and an encoding identifier, and then decodes the encoded image data according to the encoding identifier for display.
[0054] In one example, as described in step 102, if the smart network card uses VGTP encoding for the image data, then the client device uses VGTP decoding for the encoded image data to obtain the decoded image data.
[0055] The data processing method provided in this disclosure involves a smart network interface card (NIC) acquiring a first UDP packet generated by a virtual machine; parsing the first UDP packet; encoding the parsed image data according to the obtained encoding identifier to obtain encoded image data; generating a second UDP packet based on the encoded image data and the encoding identifier; and sending the second UDP packet to a client device so that the client device can parse the second UDP packet and decode the parsed encoded image data according to the obtained encoding identifier for display. By encoding the virtual machine's image data using a smart NIC and sending it to the client device, compared to existing technologies, the portion originally used for CPU-based software encoding is transferred to the smart NIC for encoding. This offloads the most computationally valuable encoding, reducing the CPU overhead and resource consumption of software encoding, increasing the number of virtual machines (VMs), and providing cost and density advantages, thereby increasing the profits of IaaS vendors.
[0056] Based on the above Figure 1 The corresponding embodiment provides a data processing method, and another embodiment of this disclosure provides a data processing method applied to... Figure 2 The data processing system shown includes at least one client device, at least one virtual machine (VM), a host server, and a VDI management platform. Each VM is equipped with a graphic capture module, and each VM corresponds to one or more applications (APPs). The operating system running on each VM can be configured according to actual needs; it can be a Windows system or a Linux system. The host server is equipped with a NIC device and a smart NIC, and the smart NIC is equipped with a VGTP encoding module. Figure 2The data processing system shown employs an FPGA-based VGTP encoding module, maximizing efficiency by enabling the encoding of the NIC device as a single-root I / O virtualization (SR-IOV) network interface card (NIC) on the host machine. This virtualization technology allows the virtual machine to perceive a real NIC device and communicate with the network through it. Within each VM, an image acquisition module adds a VGTP tag to the captured image data from the VM, packages it into UDP packets, and sends them to the NIC device. The host machine's NIC device sends the UDP packets to a smart NIC, which parses the VGTP tag in the UDP packets and encodes the image data using the VGTP algorithm. After encoding, the data is repackaged into UDP packets and sent to the client via the NIC device's tx interface. Data received by the NIC device is directly passed to the VM without the need for smart NIC intervention. Figure 2 The thin solid black line indicates receiving data from the client device, the thick solid black line indicates a UDP packet with raw graphic data from the virtual machine, and the thin dashed black line indicates sending VGTP-encoded graphic data.
[0057] according to Figure 2 The data processing system described herein, refer to Figure 3 As shown, the data processing method provided in this embodiment includes the following steps:
[0058] 301. The client device obtains the user login information and sends it to the VDI management platform.
[0059] User login information includes a username and password. The username and password can be preset; if not, they can be set during login.
[0060] 302. The VDI management platform sends a list of virtual machines corresponding to the user to the client device based on the user's login information.
[0061] In this embodiment, the VDI management platform can verify user login information by matching the user login information with pre-stored login information. If the match is successful, the verification is passed. After successful verification, a list of virtual machines corresponding to the user is sent to the client device.
[0062] 303. The client device obtains the user's operation instructions and sends them to the VDI management platform.
[0063] User operation commands are used to instruct the selection of a virtual machine from the list of virtual machines.
[0064] 304. The VDI management platform creates or starts the corresponding virtual machine according to the user's operation instructions.
[0065] 305. When the virtual machine starts, the image acquisition module acquires image data on the virtual machine.
[0066] Since each virtual machine has its own corresponding image module, when a virtual machine starts up, the image data in that virtual machine is acquired by the image acquisition module that starts up with the machine.
[0067] 306. The image acquisition module adds an encoding identifier to the image data to generate the first UDP packet, and sends the first UDP packet to the NIC device.
[0068] Specifically, the image acquisition module adds a tag to the flag bit of the image data. This tag is used to indicate that the data is dedicated to image data and includes sequences such as SN. It is located in the header 8 bytes of the first UDP packet. After generating the first UDP packet, the first UDP packet is sent to the NCI device.
[0069] 307. The NIC device sends the first message to the smart network card.
[0070] 308. The smart network card parses the first UDP packet and encodes the parsed image data according to the encoding identifier obtained from the parsing to obtain the encoded image data.
[0071] Specifically, when the first UDP packet is sent from the NIC device to the smart NIC on the host, the smart NIC starts the FPGA's VGTP encoding module to encode the data and obtain the encoded image data.
[0072] 309. Generate a second UDP packet based on the encoded image data and encoding identifier, and send the second UDP packet to the client device through the NIC device.
[0073] After encoding is complete, the smart NIC re-encapsulates the encoded image data using UDP. At this point, the tag in the generated second UDP packet is the same as the tag in the first UDP packet. Then, the second UDP packet is sent directly to the client device through the NIC device.
[0074] 310. The client device parses the second UDP packet, and then decodes and displays the encoded image data obtained from the parsing based on the parsed encoding identifier.
[0075] After receiving the second UDP packet, the client device parses it to obtain the encoding identifier tag and the encoded image data. Based on this tag, it uses VGTP to decode the data, obtaining the decoded image data, which the client device then displays. After these steps, the VM's screen will be displayed on the client.
[0076] The data processing method provided in this disclosure, compared with existing solutions, offloads the portion of VGTP encoding that was originally performed by the CPU to the smartNIC. This reduces the CPU consumption of soft encoding, reserving only the image acquisition and packet transmission portions, thus offloading the most computationally necessary encoding. This reduces the CPU load on the host machine, increases the number of VMs per unit hardware cost, and brings cost and VM density advantages.
[0077] Based on the above Figure 1 The data processing methods described in the corresponding embodiments are described below as device embodiments of this disclosure, which can be used to execute the method embodiments of this disclosure.
[0078] This disclosure provides an embodiment of a smart network interface card, such as... Figure 4 As shown, the smart network interface card 40 includes: an acquisition module 401, a parsing module 402, an encoding module 403, a generation module 404, and a sending module 405;
[0079] The acquisition module 401 is used to acquire the first UDP packet generated by the virtual machine. The first UDP packet includes image data on the virtual machine and the encoding identifier corresponding to the image data.
[0080] Parsing module 402 is used to parse the first UDP packet;
[0081] Encoding module 403 is used to encode the parsed image data according to the parsed encoding identifier to obtain encoded image data;
[0082] The generation module 404 is used to generate a second UDP packet based on the encoded image data and the encoding identifier;
[0083] The sending module 405 is used to send the second UDP packet to the client device so that the client device can parse the second UDP packet and decode the encoded image data obtained from the parsing according to the parsed encoding identifier for display.
[0084] In one embodiment, the acquisition module 401 is used to receive a first UDP packet sent by the virtual machine through the network interface controller (NIC) device.
[0085] In one embodiment, the sending module 405 is used to send the second UDP packet to the client device via the NIC device.
[0086] In one embodiment, the encoding module 403 is configured to perform VGTP encoding on the parsed image data according to the parsed encoding identifier, to obtain encoded image data.
[0087] In one embodiment, the encoded identifier includes an SN sequence, and the encoded identifier is located in the header 8 bytes of the first UDP packet.
[0088] The smart network interface card (NIC) provided in this embodiment acquires a first UDP packet generated by a virtual machine; parses the first UDP packet, encodes the parsed image data according to the encoding identifier obtained from the parsing, and obtains encoded image data; generates a second UDP packet based on the encoded image data and the encoding identifier; and sends the second UDP packet to a client device so that the client device can parse the second UDP packet and decode the parsed encoded image data according to the parsed encoding identifier for display. By encoding the virtual machine's image data using a smart NIC and sending it to the client device, compared with existing technologies, the portion originally performed by the CPU for software encoding is transferred to the smart NIC for encoding. This offloads the most needed computing power to the encoding, reducing the consumption and load on the host CPU caused by software encoding, increasing the number of VMs, bringing cost advantages and VM density advantages, and thus increasing the profits of IaaS vendors.
[0089] This disclosure also provides a smart network interface card (NIC), which includes a receiver, a transmitter, a memory, and a processor. The transmitter and the memory are respectively connected to the processor. The memory stores at least one computer instruction, and the processor loads and executes the at least one computer instruction to achieve the above-mentioned purpose. Figure 1 The data processing method described in the corresponding embodiment.
[0090] Based on the above Figure 1 In addition to the data processing methods described in the corresponding embodiments, this disclosure also provides a computer-readable storage medium. For example, a non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, or an optical data storage device. This storage medium stores computer instructions for executing the above-described data processing methods. Figure 1The data processing methods described in the corresponding embodiments will not be repeated here.
[0091] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0092] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
Claims
1. A data processing method, characterized in that, The method includes: The smart network interface card acquires the first UDP packet generated by the virtual machine, the first UDP packet including image data on the virtual machine and the encoding identifier corresponding to the image data; The first UDP packet is parsed, and the parsed image data is encoded according to the encoding identifier obtained from the parsing to obtain the encoded image data; A second UDP packet is generated based on the encoded image data and the encoded identifier; The second UDP packet is sent to the client device so that the client device can parse the second UDP packet and decode the encoded image data according to the parsed encoding identifier for display. The smart network interface card (NIC) acquires the first UDP packet generated by the virtual machine by receiving the first UDP packet sent by the virtual machine through the network interface controller (NIC) device. Sending the second UDP packet to the client device includes sending the second UDP packet to the client device through the NIC device.
2. The method according to claim 1, characterized in that, The process of encoding the parsed image data according to the parsed encoding identifier to obtain the encoded image data includes: The parsed image data is VGTP encoded based on the parsed encoding identifier to obtain the encoded image data.
3. The method according to claim 1, characterized in that, The encoded identifier includes an SN sequence, and the encoded identifier is located in the header 8 bytes of the first UDP packet.
4. A data processing method, characterized in that, The method includes: When the virtual machine starts, the image acquisition module acquires image data on the virtual machine, adds an encoding identifier to the image data, generates a first UDP packet, and sends the first UDP packet to the smart network card through the network interface controller (NIC) device. The smart network interface card (NIC) parses the first UDP packet, encodes the parsed image data according to the encoding identifier obtained from the parsing, obtains the encoded image data, generates a second UDP packet according to the encoded image data and the encoding identifier, and sends the second UDP packet to the client device through the NIC device. The client device parses the second UDP packet and decodes the encoded image data obtained from the parsing according to the parsed encoding identifier before displaying it.
5. The method according to claim 4, characterized in that, Before acquiring image data on the virtual machine, the method further includes: The client device obtains user login information and sends the user login information to the VDI management platform; The VDI management platform sends a list of virtual machines corresponding to the user to the client device based on the user login information; The client device acquires user operation instructions and sends the user operation instructions to the VDI management platform. The user operation instructions are used to instruct the selection of a virtual machine from the virtual machine list. The VDI management platform creates or starts the corresponding virtual machine according to the user's operation instructions.
6. The method according to claim 4, characterized in that, The intelligent network encodes the image data using VGTP, and the client device decodes the encoded image data using VGTP.
7. A data processing system, characterized in that, The data processing system includes: at least one client device, at least one virtual machine, and a host server. Each virtual machine is equipped with an image acquisition module, and the host server is equipped with a NIC device and a smart network card. The image acquisition module is used to acquire image data in the virtual machine when the virtual machine starts, add a flag bit to the image data and generate a first UDP packet, and send the first UDP packet to the smart network card through the NIC. The smart network interface card (NIC) is used to parse the first UDP packet, encode the image data according to the encoding identifier obtained from the parsing, obtain the encoded image data, generate a second UDP packet according to the encoded image data and the encoding identifier, and send the second UDP packet to the corresponding client device through the NIC. The client device is used to parse the second UDP packet to obtain the encoding identifier and the encoded image data, and then decode and display the encoded image data according to the encoding identifier.
8. The system according to claim 7, characterized in that, The data processing system also includes: a VDI management platform; The client device is used to obtain user login information and send the user login information to the VDI management platform; The VDI management platform is used to send a list of virtual machines corresponding to the user to the client device based on the user login information; The client device is used to display the list of virtual machines and obtain user operation instructions, which are used to instruct the user to select a virtual machine from the list of virtual machines. The VDI management platform is used to create or start the corresponding virtual machine according to the user's operation instructions.
9. The system according to claim 7, characterized in that, The smart network card is equipped with a VGTP encoding module; The VGTP encoding module is used to parse the first UDP packet and perform VGTP encoding on the image data according to the encoding identifier obtained from the parsing to obtain the encoded image data.
Citation Information
Patent Citations
System and method for internationalization encoding
US20130254752A1
Enhanced image encoding in a virtual desktop infrastructure environment
US20150215624A1