Data processing method, device, electronic device and computer readable medium

By transmitting the input terminal events simulated by the virtual machine in the bare metal server and sending message signals to remap interrupt requests, the problem of virtual machine terminal simulation competing with vcpu for CPU resources is solved, achieving better user experience and resource utilization.

CN113326093BActive Publication Date: 2025-02-18ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010271152.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-08
Publication Date
2025-02-18
Estimated Expiration
2040-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to effectively avoid the terminal simulation of virtual machines competing with vcpu for physical CPU computing resources, resulting in damage to customer business and poor user experience.

Method used

By transferring the input terminal events simulated by the virtual machine in the processing device to the buffer in the virtual kernel of the bare metal server and sending a message signal to the virtual machine to remap the interrupt request, the virtual machine can read the event from the buffer, thereby stripping the virtual machine from the virtual machine, thus The input terminal of the machine simulates logic to execute to the processing device.

Benefits of technology

It effectively avoids the virtual machine's input terminal simulation logic competing with the vcpu for physical CPU computing resources, frees up the physical CPU computing resources of the bare metal server, and improves the user's experience of using the virtual machine to simulate terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113326093B_ABST
    Figure CN113326093B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a data processing method, device, electronic device and computer-readable medium, which relate to the field of virtualization technology. The method includes: transmitting the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual kernel of the bare metal server, wherein the virtual machine is running in the bare metal server; sending the message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. Through the embodiments of the present application, it is possible to effectively avoid the input terminal simulation of the virtual machine from competing with the vcpu for physical CPU computing resources, and ensure the user experience of the input terminal simulated by the virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of virtualization technology, and in particular, to a data processing method, device, electronic device, and computer-readable medium. Background Art

[0002] With the continuous evolution of cloud computing technology, bare metal architecture cloud servers have begun to appear. The bare metal architecture brings higher computing power and more stable performance to cloud servers through a new virtualization architecture, while also bringing lower costs to cloud vendors. This bare metal architecture can not only provide users with physical machine sales units, but also run many traditional virtual machines, and still provide virtual machines to customers in the form of cloud servers. Due to the optimization of virtualization technology under the bare metal framework, vendors can usually use all CPUs of cloud servers for sale. In the past, monitoring, operation and maintenance services on cloud servers no longer run in the same machine environment as virtual machines, but are replaced by other soc (system on chip) chips. This ensures that the vcpu (virtual central processing unit) of the customer virtual machine occupies 100% of the physical CPU computing resources, and no other process can compete with the vcpu process for physical CPU computing resources, so that the performance of the customer virtual machine is guaranteed. However, there is a type of computing logic that is included in the code implementation of the virtual machine, which is a function of the virtual machine itself and will occupy a large amount of physical CPU computing resources. This function is the terminal simulation of the virtual machine. However, because the physical CPU computing resources consumed by this function do not belong to the physical CPU computing resources consumed by the customer's internal business, when this function competes for the physical CPU computing resources of the vcpu, the customer's business is damaged. If the physical CPU computing resources of the vcpu are given priority, the user's experience of using the virtual machine's simulated terminal will become extremely poor, giving people a "machine lag" experience. However, because this function is part of the virtual machine's own implementation, it cannot be solved by simply deploying this function on the soc chip like monitoring, operation and maintenance and other businesses to solve the problem of this function competing for the physical CPU computing resources of the vcpu.

[0003] In the prior art, in order to ensure the computing power of the vcpu, the scheduling priority of the vcpu process is increased to give priority to obtaining physical CPU computing resources, but the disadvantage is that the competition between the terminal simulation of the virtual machine and the vcpu for physical CPU computing resources is only alleviated, but still exists, and the terminal simulation of the virtual machine has a low execution priority, resulting in a poor user experience. It can be seen that how to effectively avoid the terminal simulation of the virtual machine from competing with the vcpu for physical CPU computing resources and ensure the user experience of the simulated terminal of the virtual machine has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of this application is to propose a data processing method, device, electronic device and computer-readable medium to solve the technical problem existing in the prior art of how to effectively avoid the terminal simulation of the virtual machine and the vCPU from competing for physical CPU computing resources and ensure the user experience of the simulated terminal of the virtual machine.

[0005] According to a first aspect of an embodiment of the present application, a data processing method is provided. The method comprises: transmitting an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server, wherein the bare metal server runs the virtual machine; and sending a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

[0006] According to a second aspect of an embodiment of the present application, a data processing method is provided. The method comprises: receiving a message signal remapping interrupt request of an input terminal simulated by a virtual machine running in a bare metal server and sent by a processing device to the virtual machine; and reading an event of the input terminal from a buffer of the input terminal in a virtual kernel of the bare metal server based on the message signal remapping interrupt request.

[0007] According to the third aspect of the embodiment of the present application, a data processing method is provided. The method includes: sending a first data read request of a first video memory bitmap of a virtual graphics card of the virtual machine running in a bare metal server to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the processing device for the virtual graphics card; based on the data in the second video memory bitmap, sending a second data read request of a first video memory buffer of the virtual graphics card to the virtual machine to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card; based on the video memory change data in the second video memory buffer, determining the pixels whose pixel values ​​have changed in the video frame image.

[0008] According to a fourth aspect of an embodiment of the present application, a data processing device is provided. The device includes: a transmission module, which is used to transmit an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server, wherein the bare metal server runs the virtual machine; and a first sending module, which is used to send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

[0009] According to a fifth aspect of an embodiment of the present application, a data processing device is provided. The device includes: a receiving module, configured to receive a message signal remapping interrupt request of an input terminal simulated by a virtual machine running in a bare metal server and sent by a processing device to the virtual machine; and a reading module, configured to read an event of the input terminal from a buffer of the input terminal in the virtual kernel of the bare metal server based on the message signal remapping interrupt request.

[0010] According to the sixth aspect of the embodiment of the present application, a data processing device is provided. The device includes: a second sending module, which is used to send a first data read request of a first video memory bitmap of a virtual graphics card of the virtual machine running in a bare metal server to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the processing device for the virtual graphics card; a third sending module, which is used to send a second data read request of a first video memory buffer of the virtual graphics card to the virtual machine based on the data in the second video memory bitmap, so as to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card; a determination module, which is used to determine the pixels whose pixel values ​​have changed in the video frame image based on the video memory change data in the second video memory buffer.

[0011] According to the seventh aspect of the embodiment of the present application, a data processing system is provided. The system includes: a chip, and a bare metal server connected to the chip in communication, wherein the chip is used to transmit the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the chip to the second buffer of the input terminal in the virtual kernel of the bare metal server, and send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server; the bare metal server is used to receive the message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the chip to the virtual machine running in the bare metal server, and read the event of the input terminal from the buffer of the input terminal in the virtual kernel of the bare metal server based on the message signal remapping interrupt request.

[0012] According to the eighth aspect of the embodiment of the present application, a data processing system is provided. The system includes: a chip, and a bare metal server connected to the chip in communication, wherein the chip is used to send a first data read request of a first video memory bitmap of a virtual graphics card of the virtual machine to a virtual machine running in the bare metal server, so as to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the chip for the virtual graphics card; the chip is used to send a second data read request of a first video memory buffer of the virtual graphics card to the virtual machine based on the data in the second video memory bitmap, so as to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the chip for the virtual graphics card; the chip is used to determine the pixels whose pixel values ​​have changed in the video frame image based on the video memory change data in the second video memory buffer.

[0013] According to the ninth aspect of the embodiments of the present application, an electronic device is provided, comprising: one or more processors; a computer-readable medium configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as described in the first aspect, the second aspect or the third aspect of the above-mentioned embodiments.

[0014] According to the tenth aspect of the embodiments of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the data processing method described in the first aspect, the second aspect or the third aspect of the above embodiments is implemented.

[0015] According to the data processing scheme provided in the embodiment of the present application, an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device is transmitted to a second buffer of an input terminal in a virtual kernel of a bare metal server, wherein a virtual machine is running in the bare metal server; a message signal remapping interrupt request of the input terminal is sent to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. Compared with other existing methods, the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device is transmitted to the second buffer of the input terminal in the virtual kernel of the bare metal server, and a message signal remapping interrupt request of the input terminal is sent to the virtual machine running in the bare metal server. Remap the interrupt request, separate the simulation logic of the virtual machine's input terminal from the bare metal server running the virtual machine, and use a separate processing device to execute the simulation logic of the virtual machine's input terminal, that is, sink the simulation logic of the virtual machine's input terminal in the virtual machine simulator in the bare metal server to the processing device for execution. There will be no more computing resource overhead for the simulation logic of the virtual machine's input terminal in the bare metal server, effectively avoiding the competition between the simulation logic of the virtual machine's input terminal and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the input terminal simulation, thereby further using the physical CPU computing resources to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the virtual machine's input terminal, it is sufficient to complete the simulation logic of the virtual machine's input terminal, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the input terminal simulated by the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0017] Figure 1 This is a flowchart of the steps of the data processing method in Embodiment 1 of the present application;

[0018] Figure 2A This is a flowchart of the steps of the data processing method in Embodiment 2 of the present application;

[0019] Figure 2B A schematic diagram of a data processing process provided according to Embodiment 2 of the present application;

[0020] Figure 3A This is a flowchart of the steps of the data processing method in Embodiment 3 of the present application;

[0021] Figure 3BA schematic diagram of a data processing process provided according to Embodiment 3 of the present application;

[0022] Figure 4 This is a schematic diagram of the structure of the data processing device in the fourth embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of the structure of the data processing device in Embodiment 5 of the present application;

[0024] Figure 6 This is a schematic diagram of the structure of the data processing device in Embodiment 6 of the present application;

[0025] Figure 7 This is a schematic diagram of the structure of an electronic device in Embodiment 7 of the present application;

[0026] Figure 8 This is the hardware structure of the electronic device in Example 8 of the present application. DETAILED DESCRIPTION

[0027] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only configured to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] Reference Figure 1 , showing a step flow chart of the data processing method of embodiment 1 of the present application.

[0030] Specifically, the data processing method provided in this embodiment includes the following steps:

[0031] In step S101, an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device is transmitted to a second buffer of the input terminal in a virtual kernel of a bare metal server.

[0032] In the embodiment of the present application, the processing device may be a soc (system on chip) chip. Generally speaking, soc is called a system-on-chip, and is also called a system on chip, which means that it is a product, an integrated circuit with a dedicated target, which contains a complete system and all the contents of the embedded software. At the same time, it is also a technology for realizing the entire process from determining the system function to the software / hardware division and completing the design. The input terminal simulated by the virtual machine may include a keyboard and a mouse simulated by the virtual machine. The input terminal event can be understood as an operation event of the user on the input terminal simulated by the virtual machine, for example, a sliding operation and a click operation on the mouse, a click operation on the keyboard, etc. The bare metal server can be understood as a server with a bare metal architecture virtualization architecture. The bare metal server runs the virtual machine. The bare metal architecture can be understood as a virtualization architecture that directly installs virtualization software on the hardware, and then installs an operating system and applications on it, relying on the virtual layer kernel and the server console for management. The virtual kernel can be a KVM (Kernel-based Virtual Machine, kernel-based virtual machine) module. It should be understood that the above description is merely exemplary and the embodiments of the present application do not impose any limitation thereto.

[0033] In some optional embodiments, when an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device is transmitted to a second buffer of the input terminal in a virtual kernel of a bare metal server, when a set time of a timer of the input device is reached, the input terminal event in the first buffer is transmitted to the second buffer through a first hardware channel in a virtual function of a communication device of the bare metal server. It is to be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0034] In a specific example, the input device includes a keyboard and a mouse. When the input terminal events in the first buffer of the input terminal simulated by the virtual machine in the processing device are transmitted to the second buffer of the input terminal in the virtual core of the bare metal server, when the set time of the timer of the input device is reached, the keyboard events in the third buffer of the keyboard simulated by the virtual machine in the processing device are transmitted to the fourth buffer of the keyboard in the virtual core of the bare metal server through the first hardware channel, and the mouse events in the fifth buffer of the mouse simulated by the virtual machine in the processing device are transmitted to the sixth buffer of the mouse in the virtual core of the bare metal server. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0035] In a specific example, the setting time of the timer of the input device can be set by a technician in this field according to actual needs, for example, 5ms, 10ms, etc. The communication device of the bare metal server can be an FPGA (Field Programmable Gate Array) chip. In actual applications, the FPGA chip implements the SR-IOV (Single Root I / O Virtualization) logic and maintains a VF (Virtual Functions) resource pool. When the virtual machine is started, the VF of the FPGA chip is allocated to the virtual machine from the FPGA chip. Specifically, the SR-IOV specification defines a standardized mechanism to natively support the sharing of a physical device by multiple virtual machines. SR-IOV is widely used on network cards. SR-IOV enables a single functional unit (for example, an Ethernet port) to look like multiple independent physical devices. A physical device with SR-IOV function can be configured as multiple functional units. SR-IOV uses two functions. The first function is PF (Physical Functions). This is a complete PCIe device with SR-IOV capability. PF can be discovered, managed and configured like ordinary PCI devices. The second function is VF (Virtual Functions). A simple PCIe function that can only process I / O. Each VF is separated from the PF. Each physical hardware has a limit on the number of VFs. A PF can be virtualized into multiple VFs for allocation to multiple virtual machines. Hypervisor can assign one or more VFs to a virtual machine. At a certain moment, a VF can only be assigned to one virtual machine. The first hardware channel in the virtual function can be a hardware queue. The keyboard event can be understood as an operation event of the keyboard simulated by the user for the virtual machine, for example, a click event of the user on the keyboard. The mouse event can be understood as an operation event of the mouse simulated by the user for the virtual machine, for example, a click event, a sliding event, etc. of the mouse by the user. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0036] In some optional embodiments, before transmitting the input terminal events in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual kernel of the bare metal server, the method further includes: in the processing device, creating the third buffer of the keyboard to buffer the keyboard events sent by the user, and creating the fifth buffer of the mouse to buffer the mouse events sent by the user. The third buffer and the fifth buffer may be first-in-first-out queues. It is to be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0037] In step S102, a message signal remapping interrupt request of the input terminal is sent to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

[0038] In the embodiment of the present application, the message signal remapping interrupt request can be understood as a message signal interrupt request in a remappable format, for example, an MSI-X interrupt request in a remappable format, etc. It can be understood that the above description is only exemplary and the embodiment of the present application does not impose any limitation on this.

[0039] In some optional embodiments, when sending a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, when the set time of the timer of the input device is reached, the message signal remapping interrupt request of the input terminal is sent to the virtual machine through the second hardware channel in the virtual function of the communication device of the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. The second hardware channel in the virtual function of the communication device can be a hardware queue. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0040] In a specific example, the input device includes a keyboard and a mouse. When sending a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, when the set time of the timer of the input device is reached, the message signal remapping interrupt request of the keyboard is sent to the virtual machine through the second hardware channel, so that the virtual machine reads keyboard events from the buffer of the keyboard in the virtual kernel of the bare metal server based on the message signal remapping interrupt request of the keyboard, and sends a message signal remapping interrupt request of the mouse to the virtual machine, so that the virtual machine reads mouse events from the buffer of the mouse in the virtual kernel of the bare metal server based on the message signal remapping interrupt request of the mouse. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0041] Through the data processing method provided in the embodiment of the present application, an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device is transmitted to a second buffer of an input terminal in a virtual kernel of a bare metal server, wherein a virtual machine is running in the bare metal server; a message signal remapping interrupt request of the input terminal is sent to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. Compared with other existing methods, the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device is transmitted to the second buffer of the input terminal in the virtual kernel of the bare metal server, and a message signal of the input terminal is sent to the virtual machine running in the bare metal server. Remap the interrupt request, separate the simulation logic of the virtual machine's input terminal from the bare metal server running the virtual machine, and use a separate processing device to execute the simulation logic of the virtual machine's input terminal, that is, sink the simulation logic of the virtual machine's input terminal in the virtual machine simulator in the bare metal server to the processing device for execution. There will be no more computing resource overhead for the simulation logic of the virtual machine's input terminal in the bare metal server, effectively avoiding the competition between the simulation logic of the virtual machine's input terminal and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the input terminal simulation, thereby further using the physical CPU computing resources to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the virtual machine's input terminal, it is sufficient to complete the simulation logic of the virtual machine's input terminal, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the input terminal simulated by the virtual machine.

[0042] The data processing method of this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted devices, entertainment equipment, advertising equipment, personal digital assistants (PDAs), tablet computers, laptop computers, handheld game consoles, glasses, watches, wearable devices, virtual display devices or display enhancement devices, etc.

[0043] Reference Figure 2A , showing a step flow chart of the data processing method of embodiment 2 of the present application.

[0044] Specifically, the data processing method provided in this embodiment includes the following steps:

[0045] In step S201, a message signal remapping interrupt request of an input terminal simulated by a virtual machine running in a bare metal server is sent by a receiving processing device to the virtual machine.

[0046] In some optional embodiments, before the receiving processing device sends a message signal remapping interrupt request of the virtual machine simulated input terminal to the virtual machine running in the bare metal server, the method further includes: receiving an input terminal event in a first buffer of the virtual machine simulated input terminal transmitted by the processing device, and buffering the input terminal event to a second buffer of the input terminal in the virtual core. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0047] In some optional embodiments, when receiving a message signal remapping interrupt request of an input terminal simulated by a virtual machine sent by a processing device to a virtual machine running in a bare metal server, a message signal remapping interrupt request of an input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server is received through a hardware channel in a virtual function of a communication device of the bare metal server. The hardware channel in the virtual function of the communication device is a hardware queue. It is to be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0048] In a specific example, before receiving the message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server through the hardware channel in the virtual function of the communication device of the bare metal server, the method further includes: when the virtual machine is started, allocating the virtual function of the communication device to the virtual machine, wherein the virtual function includes a hardware queue for communication. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0049] In step S202, based on the message signal remapping interrupt request, an event of the input terminal is read from a buffer of the input terminal in the virtual kernel of the bare metal server.

[0050] In the embodiment of the present application, the buffer of the input terminal may be the second buffer in the above-mentioned embodiment 1. It can be understood that the above description is only exemplary and the embodiment of the present application does not impose any limitation on this.

[0051] In some optional embodiments, the input device includes a keyboard and a mouse. When reading the input terminal event from the buffer of the input terminal in the virtual core of the bare metal server based on the message signal remapping interrupt request, the keyboard event is read from the buffer of the keyboard in the virtual core of the bare metal server based on the message signal remapping interrupt request of the keyboard; and the mouse event is read from the buffer of the mouse in the virtual core of the bare metal server based on the message signal remapping interrupt request of the mouse. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0052] In a specific example, the message signal based on the keyboard remaps the interrupt request, and before reading the keyboard event from the keyboard buffer in the virtual kernel of the bare metal server, the method also includes: applying for the keyboard buffer from the virtual kernel through the simulator of the virtual machine. Wherein, the simulator of the virtual machine may be QEMU (Quick Emulator). QEMU is a VMM (virtual machine monitor) on a host, which simulates the CPU through dynamic binary conversion and provides a series of hardware models, so that the operating system of the virtual machine thinks that it is dealing with the hardware directly, but in fact it is dealing with the hardware simulated by QEMU, and QEMU translates these instructions to the real hardware for operation. Through this mode, the operating system of the virtual machine can interact with the hard disk, network card, CPU, CD-ROM, audio device and USB device on the host. The keyboard buffer may be the fourth buffer in the above-mentioned embodiment 1. It can be understood that the above description is only exemplary, and the embodiment of the present application does not make any limitation to this.

[0053] In some optional embodiments, when reading the keyboard event from the keyboard buffer in the virtual kernel of the bare metal server based on the keyboard message signal remapping interrupt request, find the table entry in the preconfigured interrupt remapping table based on the keyboard message signal remapping interrupt request to obtain the bare metal server interrupt request corresponding to the keyboard message signal remapping interrupt request; based on the interrupt service routine of the interrupt request, send an interrupt injection signal to the interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine; execute the interrupt service routine of the interrupt request through the virtual processor of the virtual machine, and read the keyboard event from the keyboard buffer in the virtual kernel of the bare metal server. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0054] In a specific example, the interrupt service routine, that is, the interrupt service program, the processor handles "urgent matters", which can be understood as a service, which is completed by executing a specific program compiled in advance. This program for handling "urgent matters" is called an interrupt service program. The interrupt injection unit can be an irqfd module. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0055] In a specific example, when an interrupt service routine based on the interrupt request sends an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, the interrupt request is triggered so that the interrupt service routine of the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual kernel; based on the interrupt injection signal, the kernel thread corresponding to the interrupt injection unit in the virtual kernel is awakened, and the corresponding wake-up service routine is executed to inject the interrupt request into the virtual machine. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0056] In some optional embodiments, before searching for an entry in a pre-configured interrupt remapping table based on the message signal remapping interrupt request of the keyboard, the method further includes: after the operating system of the virtual machine assigns an interrupt number to the keyboard, based on the interrupt number, establishing an interrupt remapping table entry of the keyboard, and writing the interrupt remapping table entry of the keyboard into the interrupt remapping table in the virtual function of the communication device of the bare metal server, wherein the interrupt remapping table entry records the corresponding relationship between the interrupt request assigned to the keyboard and the message signal remapping interrupt request in the virtual function. Specifically, through the vfio framework, based on the interrupt number, an interrupt remapping table entry of the keyboard is established, and the interrupt remapping table entry of the keyboard is written into the interrupt remapping table in the virtual function of the communication device of the bare metal server. Among them, the vfio framework can be a framework that can safely expose device I / O, interrupts, DMA (Direct Memory Access, direct memory access), etc. to user space, so that device drivers can be completed in user space. Direct device access in user space and virtual machine device allocation can achieve higher IO performance. It should be understood that the above description is merely exemplary and the embodiments of the present application do not impose any limitation thereto.

[0057] In some optional embodiments, before the interrupt service routine based on the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, the method further includes: creating the interrupt injection unit for the keyboard, and registering the interrupt injection unit in the virtual kernel to create a kernel thread corresponding to the interrupt injection unit in the virtual kernel for executing the wake-up service routine. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0058] In a specific example, before the interrupt request based on the message signal of the mouse is remapped and the event of the mouse is read from the buffer of the mouse in the virtual kernel of the bare metal server, the method further includes: applying for the buffer of the mouse from the virtual kernel through the simulator of the virtual machine. The buffer of the mouse may be the sixth buffer in the first embodiment above. It is to be understood that the above description is only exemplary and the embodiment of the present application does not impose any limitation on this.

[0059] In some optional embodiments, when reading the mouse event from the buffer of the mouse in the virtual kernel of the bare metal server based on the mouse message signal remapping interrupt request, find the table entry in the preconfigured interrupt remapping table based on the mouse message signal remapping interrupt request to obtain the bare metal server interrupt request corresponding to the mouse message signal remapping interrupt request; based on the interrupt service routine of the interrupt request, send an interrupt injection signal to the interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine; execute the interrupt service routine of the interrupt request through the virtual processor of the virtual machine, and read the mouse event from the buffer of the mouse in the virtual kernel of the bare metal server. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0060] In a specific example, when an interrupt service routine based on the interrupt request sends an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, the interrupt request is triggered so that the interrupt service routine of the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual kernel; based on the interrupt injection signal, the kernel thread corresponding to the interrupt injection unit in the virtual kernel is awakened, and the corresponding wake-up service routine is executed to inject the interrupt request into the virtual machine. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0061] In some optional embodiments, before searching for an entry in a preconfigured interrupt remapping table based on the message signal remapping interrupt request of the mouse, the method further includes: after the operating system of the virtual machine assigns an interrupt number to the mouse, based on the interrupt number, establishing an interrupt remapping table entry for the mouse, and writing the interrupt remapping table entry for the mouse into the interrupt remapping table in the virtual function of the communication device of the bare metal server, wherein the interrupt remapping table entry records the correspondence between the interrupt request assigned to the mouse and the message signal remapping interrupt request in the virtual function. Specifically, through the vfio framework, an interrupt remapping table entry for the mouse is established based on the interrupt number, and the interrupt remapping table entry for the mouse is written into the interrupt remapping table in the virtual function of the communication device of the bare metal server. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0062] In some optional embodiments, the interrupt service routine based on the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, and the method further includes: creating the interrupt injection unit for the mouse, and registering the interrupt injection unit in the virtual kernel to create a kernel thread corresponding to the interrupt injection unit in the virtual kernel for executing the wake-up service routine. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0063] Accordingly, in an embodiment of the present application, a data processing system is also provided. The system includes: a chip, and a bare metal server connected to the chip in communication, wherein the chip is used to transmit an input terminal event in a first buffer of an input terminal simulated by a virtual machine in the chip to a second buffer of the input terminal in a virtual core of the bare metal server, and send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server; the bare metal server is used to receive a message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the chip to the virtual machine running in the bare metal server, and read the event of the input terminal from the buffer of the input terminal in the virtual core of the bare metal server based on the message signal remapping interrupt request. Thus, by receiving the message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server, and based on the message signal remapping interrupt request, the event of the input terminal is read from the buffer of the input terminal in the virtual kernel of the bare metal server, the simulation logic of the input terminal of the virtual machine is separated from the bare metal server running the virtual machine, and a separate processing device is used to execute the simulation logic of the input terminal of the virtual machine, that is, the simulation logic of the input terminal of the virtual machine in the simulator of the virtual machine in the bare metal server is sunk to the processing device for execution, and there will be no computing resource overhead of the simulation logic of the input terminal of the virtual machine in the bare metal server, which effectively avoids the competition between the simulation logic of the input terminal of the virtual machine and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the input terminal simulation, thereby further using the physical CPU computing resources to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the virtual machine's input terminal, it is sufficient to complete the simulation logic of the virtual machine's input terminal, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the virtual machine's simulated input terminal. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0064] In a specific example, Figure 2BAs shown in the figure, the bare metal server above is the host of the virtual machine. The basic components of virtual machine simulation such as simulator and virtual kernel can be seen above. The FPGA chip in the middle is responsible for data communication between the bare metal server and the soc chip. The soc chip below runs a complete operating system. The terminal simulated by the virtual machine is mainly divided into two parts. One part is the simulation of the keyboard and mouse, which is the simulation of the input terminal. The other part is the simulation of the image display, which is the simulation of the output terminal. Among them, the process of sinking the simulation logic of the input terminal of the virtual machine in the simulator of the virtual machine in the bare metal server to the soc chip for execution is as follows: 1. The FPGA chip in the bare metal server implements the SR-IOV logic and maintains a VF resource pool. When the virtual machine starts, the VF of the FPGA chip is allocated to the virtual machine. Then, after the virtual machine's operating system allocates the interrupt numbers of the virtual machine's simulated keyboard and mouse, it will use the Intel vt-d (Intel Virtualization Technology for Direct I / O) interrupt remapping mechanism to create an interrupt remapping table entry for each virtual keyboard and mouse through the vfio framework, and write these two interrupt remapping table entries into the interrupt remapping table of the VF of the FPGA chip. The interrupt remapping table entry records the corresponding relationship between the interrupt requests allocated to the keyboard and mouse from the idle interrupt resources of the bare metal server and the MSI-X interrupt requests in the remapping format of the VF of the FPGA chip. 2. After the interrupt remapping table entry is filled in through the vfio framework, an interrupt injection unit irqfd is created for the keyboard and mouse respectively, and registered in the virtual kernel kvm. In the virtual kernel kvm, two kernel threads are created to wait in the corresponding interrupt injection unit irqfd, and the wake-up service routine of the kernel thread is responsible for injecting the interrupt requests allocated to the keyboard and mouse into the virtual machine. 3. After the first two steps are completed, the simulator qemu will apply for two caches in the virtual kernel kvm: the keyboard buffer and the mouse buffer, which are mainly used to simulate the data buffer of the actual keyboard and mouse devices, and are used to obtain specific keyboard events and mouse events from them during the interruption process of the corresponding keyboard and mouse of the vcpu. 4. Through the first three steps, the configuration process of the keyboard and mouse simulated for the virtual machine in the bare metal server is completed. In the soc chip, a virtual machine input terminal simulation program will be run to complete the input terminal simulation logic in the previous simulator qemu. The input terminal simulation logic is sunk from the simulator qemu to the soc chip, saving the computing resources of this part.In this program, a first-in-first-out queue is created for the keyboard and mouse simulated by the virtual machine to buffer the keyboard events and mouse events sent by the user. The keyboard and mouse timer will do two things every 10ms: the first thing is to transmit the keyboard events and mouse events in the queue to the keyboard buffer and mouse buffer in the virtual kernel kvm through the hardware queue of the VF of the FPGA chip. The second thing is to initiate two custom MSI-X interrupt requests in a remappable format to the virtual machine through the hardware queue of the VF of the FPGA chip. The interrupt request will pass the Intel vt-d protocol and finally trigger the interrupt request of the bare metal server allocated by the vfio framework in step 1. The interrupt service routine of the interrupt request of the bare metal server will send a signal to the interrupt injection unit irqfd. At this time, the kernel thread waiting for the irqfd in the virtual kernel kvm will wake up, and the corresponding wake-up service routine will be executed, and then the interrupt request of the bare metal server of the keyboard and the interrupt request of the bare metal server of the mouse will be injected into the virtual machine using the principle of virtualization interrupt simulation. 5. After the interrupt request of the bare metal server of the keyboard and the interrupt request of the bare metal server of the mouse are injected into the virtual machine in step 4, the vcpu process in the virtual machine executes the input and output of the port when executing the interrupt service routine of the bare metal server of the keyboard and the interrupt service routine of the bare metal server of the mouse, and then exits to the virtual kernel kvm. At this time, the virtual kernel kvm will provide the keyboard events and mouse events that the vcpu wants through the previously allocated keyboard buffer and mouse buffer to complete the simulation of the port input and output. The vcpu process returns to the virtual machine to run, and the event simulation of the keyboard and mouse is completed. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0065] To sink the simulation logic of the keyboard and mouse, you can also add an input device that complies with the Virtio protocol inside the virtual machine, and then connect the VF of an FPGA chip directly to the input device that complies with the Virtio protocol inside the virtual machine. The SOC chip puts the keyboard events and mouse events sent by the customer into the Virtio ring of the input device that complies with the Virtio protocol according to the Virtio protocol to complete the simulation of the keyboard and mouse events. It is understandable that the above description is only exemplary and the embodiments of the present application do not make any limitation to this. It is understandable that the above description is only exemplary and the embodiments of the present application do not make any limitation to this.

[0066] By using the data processing method provided in the embodiment of the present application, a message signal remapping interrupt request of an input terminal simulated by a virtual machine sent by a receiving processing device to a virtual machine running in a bare metal server is received, and based on the message signal remapping interrupt request, an event of the input terminal is read from a buffer of the input terminal in the virtual kernel of the bare metal server. Compared with other existing methods, by using the message signal remapping interrupt request of an input terminal simulated by a virtual machine sent by a receiving processing device to a virtual machine running in a bare metal server, and based on the message signal remapping interrupt request, an event of the input terminal is read from a buffer of the input terminal in the virtual kernel of the bare metal server, the simulation logic of the input terminal of the virtual machine is changed from the running state to the running state. The bare metal server that runs the virtual machine is separated from the bare metal server, and a separate processing device is used to execute the simulation logic of the virtual machine's input terminal, that is, the simulation logic of the virtual machine's input terminal in the virtual machine simulator in the bare metal server is sunk to the processing device for execution. There will be no more computing resource overhead for the simulation logic of the virtual machine's input terminal in the bare metal server, which effectively avoids the competition between the simulation logic of the virtual machine's input terminal and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the input terminal simulation, thereby further using the physical CPU computing resources to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the virtual machine's input terminal, it is sufficient to complete the simulation logic of the virtual machine's input terminal, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the input terminal simulated by the virtual machine.

[0067] The data processing method of this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted devices, entertainment equipment, advertising equipment, personal digital assistants (PDAs), tablet computers, laptop computers, handheld game consoles, glasses, watches, wearable devices, virtual display devices or display enhancement devices, etc.

[0068] Reference Figure 3A , showing a step flow chart of the data processing method of embodiment 3 of the present application.

[0069] Specifically, the data processing method provided in this embodiment includes the following steps:

[0070] In step S301, a first data read request of a first video memory bitmap of a virtual graphics card of a virtual machine running in a bare metal server is sent to the virtual machine running in the bare metal server, so as to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by a processing device to the virtual graphics card.

[0071] In an embodiment of the present application, the processing device may be a SOC (System on Chip) chip. Generally speaking, SOC is called a system-on-chip, also known as a system on chip, which means that it is a product, an integrated circuit with a dedicated purpose, which contains a complete system and all the contents of the embedded software. At the same time, it is also a technology that is used to implement the entire process from determining the system function to the software / hardware division and completing the design. The bare metal server can be understood as a server with a bare metal architecture virtualization architecture. The virtual machine is running in the bare metal server. The bare metal architecture can be understood as a virtualization architecture that directly installs virtualization software on the hardware, and then installs the operating system and applications on it, relying on the virtual layer kernel and the server console for management. The virtual kernel may be a KVM (Kernel-based Virtual Machine) module. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any restrictions on this.

[0072] In some optional embodiments, before sending a first data read request of a first video memory bitmap of a virtual graphics card of a virtual machine running in a bare metal server, the method further includes: constructing the first data read request based on the physical address of the first video memory bitmap, the physical address of the second video memory bitmap, and the length of the data read in the first video memory bitmap. The length of the data in the first video memory bitmap can be set by a person skilled in the art according to actual needs, and the embodiments of the present application do not impose any limitation on this. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0073] In some optional embodiments, before constructing the first data read request, the method further includes: receiving the physical address of the first video memory bitmap synchronized by the simulator of the virtual machine. Wherein, the simulator of the virtual machine may be QEMU (Quick Emulator). QEMU is a VMM (virtual machine monitor) on a host, which simulates the CPU through dynamic binary conversion and provides a series of hardware models, so that the operating system of the virtual machine thinks that it is dealing with the hardware directly, but in fact it is dealing with the hardware simulated by QEMU, and QEMU then translates these instructions to the real hardware for operation. Through this mode, the operating system of the virtual machine can interact with the hard disk, network card, CPU, CD-ROM, audio device and USB device on the host. The buffer of the keyboard may be the fourth buffer in the above-mentioned embodiment 1. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0074] In some optional embodiments, when a first data read request of a first video memory bitmap of a virtual graphics card of a virtual machine running in a bare metal server is sent to the virtual machine, when the set time of the image timer of the processing device is reached, the first data read request is sent to the virtual machine through a hardware channel in a virtual function of the communication device of the bare metal server to synchronize the data in the first video memory bitmap to the second video memory bitmap. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0075] In a specific example, the setting time of the image timer of the processing device can be set by a technician in this field according to actual needs, for example, 5ms, 10ms, etc. The communication device of the bare metal server may be an FPGA (Field Programmable Gate Array) chip. In actual applications, the FPGA chip implements the SR-IOV (Single Root I / O Virtualization) logic and maintains a VF (Virtual Functions) resource pool. When the virtual machine starts, the VF of the FPGA chip is allocated to the virtual machine from the FPGA chip. The hardware channel in the virtual function may be a hardware queue. It will be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0076] In step S302, based on the data in the second video memory bitmap, a second data read request for the first video memory buffer of the virtual graphics card is sent to the virtual machine to synchronize the video memory change data in the first video memory buffer located in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card.

[0077] In some optional embodiments, when sending a second data read request of the first video memory buffer of the virtual graphics card to the virtual machine based on the data in the second video memory bitmap, traverse the bits in the second video memory bitmap, and convert the data of the bits in the second video memory bitmap into the virtual address of the first video memory buffer inside the virtual machine; determine the physical address of the first video memory buffer based on the mapping relationship between the physical address of the first video memory buffer and the virtual address; construct the second data read request based on the physical address of the first video memory buffer, the physical address of the second video memory buffer, and the length of the data read in the first video memory buffer, and send the second data read request to the virtual machine to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card. Among them, the length of the data read in the first video memory buffer can be set by those skilled in the art according to actual needs, and the embodiment of the present application does not make any limitation on this. It can be understood that the above description is only exemplary, and the embodiment of the present application does not make any limitation on this.

[0078] In some optional embodiments, before determining the physical address of the first video memory buffer based on the mapping relationship between the physical address of the first video memory buffer and the virtual address, the method further includes: receiving the mapping relationship between the physical address of the first video memory buffer and the virtual address synchronized by the simulator of the virtual machine. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0079] In step S303, based on the video memory change data in the second video memory buffer, pixels whose pixel values ​​have changed in the video frame image are determined.

[0080] In some optional embodiments, when determining the pixels whose pixel values ​​in the video frame image have changed based on the video memory change data in the second video memory buffer, the video memory change data in the second video memory buffer is converted into pixel change data, and the pixel change data is synchronized to the first pixel buffer allocated by the processing device for the virtual graphics card; the pixels at the current moment in the first pixel buffer are compared with the pixels at the previous moment in the second pixel buffer allocated by the processing device for the virtual graphics card to obtain the pixels whose pixel values ​​in the video frame image have changed. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0081] In a specific example, when the video memory change data in the second video memory buffer is converted into pixel change data, the video memory change data in the second video memory buffer is converted into pixel change data by data format conversion. The video memory change data can be understood as video memory level change data, and the pixel change data can be understood as pixel level change data. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0082] Accordingly, in an embodiment of the present application, a data processing system is also provided. The system includes: a chip, and a bare metal server connected to the chip in communication, wherein the chip is used to send a first data read request of a first video memory bitmap of a virtual graphics card of the virtual machine to a virtual machine running in the bare metal server, so as to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the chip for the virtual graphics card; the chip is used to send a second data read request of a first video memory buffer of the virtual graphics card to the virtual machine based on the data in the second video memory bitmap, so as to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the chip for the virtual graphics card; the chip is used to determine the pixels whose pixel values ​​have changed in the video frame image based on the video memory change data in the second video memory buffer. Thus, by sending a first data read request of the first video memory bitmap of the virtual graphics card of the virtual machine to the virtual machine running in the bare metal server, and based on the data in the second video memory bitmap, sending a second data read request of the first video memory buffer of the virtual graphics card to the virtual machine, and then determining the pixel whose pixel value has changed in the video frame image based on the video memory change data in the second video memory buffer, the simulation logic of the display terminal of the virtual machine is separated from the bare metal server running the virtual machine, and a separate processing device is used to execute the simulation logic of the display terminal of the virtual machine, that is, the simulation logic of the display terminal of the virtual machine in the simulator of the virtual machine in the bare metal server is sunk to the processing device for execution, and there will be no computing resource overhead of the simulation logic of the display terminal of the virtual machine in the bare metal server, which effectively avoids the competition between the simulation logic of the display terminal of the virtual machine and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the display terminal simulation, so that the physical CPU computing resources can be further used to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the display terminal of the virtual machine, it is sufficient to complete the simulation logic of the display terminal of the virtual machine, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the display terminal simulated by the virtual machine. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0083] In a specific example, Figure 3BAs shown in the figure, the bare metal server above is the host of the virtual machine. You can see the simulator, virtual kernel and other basic components of the virtual machine simulation. The FPGA chip in the middle is responsible for data communication between the bare metal server and the soc chip. The soc chip below runs a complete operating system. The terminal simulated by the virtual machine is mainly divided into two parts. One part is the simulation of the keyboard and mouse, which is the simulation of the input terminal. The other part is the simulation of the image display, which is the simulation of the output terminal. The process of sinking the simulation logic of the display terminal of the virtual machine in the simulator of the virtual machine in the bare metal server to the SOC chip for execution is as follows: 1. When the virtual machine is started, after the initialization of the virtual graphics card is completed, the simulator QEMU will synchronize the mapping relationship between the physical address HPA (host physical address) of the video memory buffer of the virtual graphics card of the virtual machine in the virtual kernel KVM and the internal address GPA (guest physical address) of the virtual machine to the display terminal simulation program of the virtual machine of the SOC chip. In the display terminal simulation program of the virtual machine, a video memory buffer and two pixel buffers will be allocated to the virtual graphics card of the virtual machine. The former is used to cache the video memory data of the virtual graphics card of the virtual machine, and the latter is used to cache the pixel-level data of the virtual graphics card of the virtual machine. 2. After the synchronization of the mapping relationship between the GPA and HPA of the video memory buffer of the virtual graphics card of the virtual machine is completed, the physical address of the video memory bitmap of the virtual graphics card of the virtual machine will be synchronized to the display terminal simulation program of the virtual machine of the SOC chip. The bits in the bitmap will be automatically set by the Intel PML mechanism and the physical CPU hardware logic of the bare metal server to mark which video memory data has changed between the previous and next two moments. 3. Through the first two steps, the SOC chip has obtained the mapping relationship between the GPA and HPA of the memory buffer of the virtual graphics card of the virtual machine and the physical address of the bitmap of the virtual graphics card of the virtual machine. The image timer will notify the FPGA chip to complete the transfer of memory data at a certain image refresh frequency. Specifically: 1. Construct a data read request for the bare metal server, fill the physical address of the bitmap in the virtual kernel and the length of the data read from the physical address of the bitmap in the virtual kernel in the data read request, and wait for the bitmap synchronization to end after the data read request is sent. 2. Traverse the bits of the bitmap in the SOC chip, convert the bits into the address GPA of the memory buffer in the virtual kernel inside the virtual machine, and then obtain the corresponding HPA through the mapping relationship between the GPA and HPA of the memory buffer of the virtual graphics card of the virtual machine. Then, a data read request for the bare metal server is constructed, and the physical address HPA and the physical address of the video memory buffer of the virtual graphics card in the SOC chip, as well as the length of the data read from the video memory buffer in the virtual kernel are filled in the data read request. After the request is completed, the changed video memory data in the video memory buffer in the virtual kernel is synchronized to the video memory buffer of the virtual graphics card in the SOC chip.3. After traversing the bitmap in the previous step, the video memory buffer of the virtual graphics card in the soc chip already has the latest video memory data. After that, the changed video memory data will be converted into changed pixel data and synchronized to the new pixel buffer according to the bitmap in the soc chip. Then, the pixels in the new pixel buffer are compared with the pixels in the old pixel buffer at the previous moment, so as to find out which specific pixels have changed. 4. After the previous step, it has been found out which specific pixels of a frame of image have changed. Finally, the difference pixels will be sent to the user through the network card, and the sinking simulation logic of a frame of image is completed. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0084] For the sinking of the simulation logic of the graphics card, an input device that complies with the virtio protocol can also be added to the virtual machine, and then the VF of an FPGA chip directly connected to the virtual machine can be connected to the input device that complies with the virtio protocol inside the virtual machine. The data of the virtual graphics card can be negotiated by the front-end driver to tell the soc chip the video memory address of the virtual graphics card. The soc chip can send a memory read transaction to the VF of the FPGA chip at the back end of the virtual graphics card to synchronize the video memory data of the virtual graphics card to the soc chip, and then use the CPU of the soc chip to complete the calculation of the difference of the video memory data of the virtual graphics card according to the logic of this solution. It is also possible to customize the hardware logic in the FPGA chip to complete the calculation of the difference of the video memory data of the virtual graphics card, and finally send the difference image to the customer. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0085] In practical applications, the embodiment of the present application uses the MSIX interrupt remapping technology to sink the simulation logic of the keyboard and mouse of the virtual machine in the simulator QEMU to the SOC chip. In addition, by copying the video memory data of the virtual graphics card of the virtual machine to the SOC chip, the CPU of the SOC chip is used to perform the calculation tasks of video memory difference comparison and pixel difference comparison to complete the sinking of the image display, and finally the terminal simulation logic of the virtual machine is sunk from the simulator QEMU to the SOC chip. It can be understood that the above description is only exemplary and the embodiment of the present application does not make any limitation to this.

[0086] Through the data processing method provided in the embodiment of the present application, a first data read request for the first video memory bitmap of the virtual graphics card of the virtual machine is sent to the virtual machine running in the bare metal server, so as to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated to the virtual graphics card by the processing device; based on the data in the second video memory bitmap, a second data read request for the first video memory buffer of the virtual graphics card is sent to the virtual machine, so as to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated to the virtual graphics card by the processing device; based on the video memory change data in the second video memory buffer, the pixel whose pixel value changes in the video frame image is determined. Compared with other existing methods, by sending the first data read request for the first video memory bitmap of the virtual graphics card of the virtual machine to the virtual machine running in the bare metal server, and based on the data in the second video memory bitmap, sending the virtual machine to the virtual machine The second data read request of the first video memory buffer of the graphics card is then based on the video memory change data in the second video memory buffer to determine the pixel whose pixel value has changed in the video frame image, and the simulation logic of the display terminal of the virtual machine is separated from the bare metal server running the virtual machine, and a separate processing device is used to execute the simulation logic of the display terminal of the virtual machine, that is, the simulation logic of the display terminal of the virtual machine in the simulator of the virtual machine in the bare metal server is sunk to the processing device for execution, and there will be no more computing resource overhead of the simulation logic of the display terminal of the virtual machine in the bare metal server, which effectively avoids the competition between the simulation logic of the display terminal of the virtual machine and the vcpu for the physical CPU computing resources in the bare metal server, further releasing the physical CPU computing resources in the bare metal server, and the computing power of the vcpu will not be damaged by the display terminal simulation, so that the physical CPU computing resources are further used to serve the actual business of the user. At the same time, since a separate processing device is used to execute the simulation logic of the display terminal of the virtual machine, it is sufficient to complete the simulation logic of the display terminal of the virtual machine, and there will be no "machine freeze" phenomenon, which effectively guarantees the user's experience of using the display terminal simulated by the virtual machine.

[0087] The data processing method of this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted devices, entertainment equipment, advertising equipment, personal digital assistants (PDAs), tablet computers, laptop computers, handheld game consoles, glasses, watches, wearable devices, virtual display devices or display enhancement devices, etc.

[0088] Reference Figure 4 , showing a schematic diagram of the structure of the data processing device in Example 4 of the present application.

[0089] The data processing device provided in this embodiment includes: a transmission module 402, which is used to transmit the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual kernel of the bare metal server, wherein the virtual machine is running in the bare metal server; a first sending module 403, which is used to send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

[0090] Optionally, the transmission module 402 is specifically used to: when the set time of the timer of the input device is reached, transmit the input terminal event in the first buffer to the second buffer through the first hardware channel in the virtual function of the communication device of the bare metal server.

[0091] Optionally, the input device includes a keyboard and a mouse, and the transmission module 402 is specifically used to: when the set time of the timer of the input device is reached, transmit the keyboard events in the third buffer of the keyboard simulated by the virtual machine in the processing device to the fourth buffer of the keyboard in the virtual kernel of the bare metal server through the first hardware channel, and transmit the mouse events in the fifth buffer of the mouse simulated by the virtual machine in the processing device to the sixth buffer of the mouse in the virtual kernel of the bare metal server.

[0092] Optionally, the first sending module 403 is specifically used to: when the set time of the timer of the input device is reached, send the message signal remapping interrupt request of the input terminal to the virtual machine through the second hardware channel in the virtual function of the communication device of the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

[0093] Optionally, the input device includes a keyboard and a mouse, and the first sending module 403 is specifically used to: when the set time of the timer of the input device is reached, send the keyboard message signal remapping interrupt request to the virtual machine through the second hardware channel, so that the virtual machine reads keyboard events from the keyboard buffer in the virtual kernel of the bare metal server based on the keyboard message signal remapping interrupt request, and send the mouse message signal remapping interrupt request to the virtual machine, so that the virtual machine reads mouse events from the mouse buffer in the virtual kernel of the bare metal server based on the mouse message signal remapping interrupt request.

[0094] Optionally, before the transmission module 402, the apparatus further includes: a creation module 401, which is used to create the third buffer of the keyboard in the processing device for buffering the keyboard events sent by the user, and to create the fifth buffer of the mouse for buffering the mouse events sent by the user.

[0095] The data processing device of this embodiment is used to implement the corresponding data processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.

[0096] Reference Figure 5 , showing a schematic diagram of the structure of the data processing device in Example 5 of the present application.

[0097] The data processing device provided in this embodiment includes: a first receiving module 501, which is used to receive a message signal remapping interrupt request of an input terminal simulated by a virtual machine sent by a processing device to the virtual machine running in a bare metal server; a reading module 502, which is used to read the event of the input terminal from the buffer of the input terminal in the virtual kernel of the bare metal server based on the message signal remapping interrupt request.

[0098] Optionally, the first receiving module 501 is specifically used to: receive, through a hardware channel in a virtual function of the communication device of the bare metal server, a message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server.

[0099] Optionally, the input device includes a keyboard and a mouse, and the reading module 502 includes: a first reading submodule 5022, used to remap interrupt requests based on message signals of the keyboard, and read keyboard events from the buffer of the keyboard in the virtual kernel of the bare metal server; a second reading submodule 5028, used to remap interrupt requests based on message signals of the mouse, and read mouse events from the buffer of the mouse in the virtual kernel of the bare metal server.

[0100] Optionally, before the first reading submodule 5022, the reading module 502 further includes: an applying submodule 5021, configured to apply for the buffer of the keyboard from the virtual kernel through the simulator of the virtual machine.

[0101] Optionally, the first reading submodule 5022 includes: a searching unit 5024, used to search for an entry in a pre-configured interrupt remapping table based on the message signal remapping interrupt request of the keyboard, so as to obtain the interrupt request of the bare metal server corresponding to the message signal remapping interrupt request of the keyboard; a sending unit 5026, used to send an interrupt injection signal to an interrupt injection unit registered in the virtual kernel based on the interrupt service routine of the interrupt request, so as to inject the interrupt request into the virtual machine; a reading unit 5027, used to execute the interrupt service routine of the interrupt request through the virtual processor of the virtual machine, and read the keyboard event from the keyboard buffer in the virtual kernel of the bare metal server.

[0102] Optionally, the sending unit 5026 is specifically used to: trigger the interrupt request so that the interrupt service routine of the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual kernel; based on the interrupt injection signal, wake up the kernel thread in the virtual kernel corresponding to the interrupt injection unit, and execute a corresponding wake-up service routine to inject the interrupt request into the virtual machine.

[0103] Optionally, before the search unit 5024, the first reading submodule 5022 also includes: an establishment unit 5023, which is used to establish an interrupt remapping table entry for the keyboard based on the interrupt number after the operating system of the virtual machine assigns an interrupt number to the keyboard, and write the interrupt remapping table entry for the keyboard into the interrupt remapping table in the virtual function of the communication device of the bare metal server, wherein the interrupt remapping table entry records the correspondence between the interrupt request assigned to the keyboard and the message signal remapping interrupt request in the virtual function.

[0104] Optionally, before the sending unit 5026, the first reading submodule 5022 also includes: a creation unit 5025, used to create the interrupt injection unit for the keyboard, and register the interrupt injection unit into the virtual kernel to create a kernel thread corresponding to the interrupt injection unit in the virtual kernel for executing the wake-up service routine.

[0105] Optionally, the second reading submodule 5028 is specifically used to: based on the message signal remapping interrupt request of the mouse, search for an entry in a pre-configured interrupt remapping table to obtain the interrupt request of the bare metal server corresponding to the message signal remapping interrupt request of the mouse; based on the interrupt service routine of the interrupt request, send an interrupt injection signal to the interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine; execute the interrupt service routine of the interrupt request through the virtual processor of the virtual machine, and read the mouse event from the buffer of the mouse in the virtual kernel of the bare metal server.

[0106] The data processing device of this embodiment is used to implement the corresponding data processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.

[0107] Reference Figure 6 , showing a schematic diagram of the structure of the data processing device in Example 6 of the present application.

[0108] The data processing device provided in this embodiment includes: a second sending module 603, which is used to send a first data read request of a first video memory bitmap of a virtual graphics card of the virtual machine running in a bare metal server, so as to synchronize the data in the first video memory bitmap in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the processing device for the virtual graphics card; a third sending module 604, which is used to send a second data read request of a first video memory buffer of the virtual graphics card to the virtual machine based on the data in the second video memory bitmap, so as to synchronize the video memory change data in the first video memory buffer in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card; a determination module 605, which is used to determine the pixels whose pixel values ​​have changed in the video frame image based on the video memory change data in the second video memory buffer.

[0109] Optionally, before the second sending module 603, the device further includes: a construction module 602, used to construct the first data read request based on the physical address of the first video memory bitmap, the physical address of the second video memory bitmap, and the length of the data read in the first video memory bitmap.

[0110] Optionally, before the construction module 602, the device further includes: a second receiving module 601, configured to receive the physical address of the first video memory bitmap synchronized by the simulator of the virtual machine.

[0111] Optionally, the second sending module 603 is specifically used to: when the set time of the image timer of the processing device is reached, send the first data read request to the virtual machine through the hardware channel in the virtual function of the communication device of the bare metal server to synchronize the data in the first video memory bitmap to the second video memory bitmap.

[0112] Optionally, the third sending module 604 includes: a traversal submodule 6041, used to traverse the bits in the second video memory bitmap, and convert the data of the bits in the second video memory bitmap into the virtual address of the first video memory buffer inside the virtual machine; a determination submodule 6043, used to determine the physical address of the first video memory buffer based on the mapping relationship between the physical address of the first video memory buffer and the virtual address; a construction submodule 6044, used to construct the second data read request based on the physical address of the first video memory buffer, the physical address of the second video memory buffer, and the length of the data read in the first video memory buffer, and send the second data read request to the virtual machine.

[0113] Optionally, before the determining submodule 6043, the third sending module 604 further includes: a receiving submodule 6042, configured to receive a mapping relationship between the physical address of the first video memory buffer synchronized by the simulator of the virtual machine and the virtual address.

[0114] Optionally, the determination module 605 is specifically used to: convert the video memory change data in the second video memory buffer into pixel change data, and synchronize the pixel change data to the first pixel buffer allocated by the processing device for the virtual graphics card; compare the pixels at the current moment in the first pixel buffer with the pixels at the previous moment in the second pixel buffer allocated by the processing device for the virtual graphics card to obtain the pixels whose pixel values ​​have changed in the video frame image.

[0115] The data processing device of this embodiment is used to implement the corresponding data processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.

[0116] Figure 7 This is a schematic diagram of the structure of an electronic device in Embodiment 7 of the present application; the electronic device may include:

[0117] One or more processors 701;

[0118] The computer readable medium 702 may be configured to store one or more programs,

[0119] When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as described in the above-mentioned embodiment 1, embodiment 2 or embodiment 3.

[0120] Figure 8 The hardware structure of the electronic device in the eighth embodiment of the present application; Figure 8 As shown, the hardware structure of the electronic device may include: a processor 801, a communication interface 802, a computer readable medium 803 and a communication bus 804;

[0121] The processor 801, the communication interface 802, and the computer readable medium 803 communicate with each other via a communication bus 804;

[0122] Optionally, the communication interface 802 may be an interface of a communication module, such as an interface of a GSM module;

[0123] The processor 801 can be specifically configured to: transmit the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual core of the bare metal server, wherein the virtual machine is running in the bare metal server; send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. In addition, the processor 801 can also be configured to: receive the message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server; read the input terminal event from the buffer of the input terminal in the virtual core of the bare metal server based on the message signal remapping interrupt request. In addition, the processor 801 can also be configured to: send a first data read request for the first video memory bitmap of the virtual graphics card of the virtual machine running in the bare metal server to synchronize the data in the first video memory bitmap located in the virtual kernel of the bare metal server to the second video memory bitmap allocated by the processing device for the virtual graphics card; based on the data in the second video memory bitmap, send a second data read request for the first video memory buffer of the virtual graphics card to the virtual machine to synchronize the video memory change data in the first video memory buffer located in the virtual kernel to the second video memory buffer allocated by the processing device for the virtual graphics card; based on the video memory change data in the second video memory buffer, determine the pixels whose pixel values ​​have changed in the video frame image.

[0124] The processor 801 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0125] The computer readable medium 803 can be, but is not limited to, a random access memory medium (RAM), a read-only memory medium (ROM), a programmable read-only memory medium (PROM), an erasable read-only memory medium (EPROM), an electrically erasable read-only memory medium (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.

[0126] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program configured to be used by or in combination with an instruction execution system, an apparatus or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0127] Computer program code configured to perform the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions configured to implement the specified logical function. There are specific sequential relationships in the above-mentioned specific embodiments, but these sequential relationships are only exemplary. When the specific implementation is implemented, these steps may be less, more, or the execution order may be adjusted. That is, in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The modules involved in the embodiments of the present application may be implemented in software or in hardware. The modules described may also be set in a processor, for example, may be described as: a processor includes a transmission module and a first sending module. Among them, the names of these modules do not constitute a limitation on the module itself in some cases. For example, the transmission module may also be described as "a module that transmits the input terminal events in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual kernel of the bare metal server".

[0130] As another aspect, the present application further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the data processing method described in the above-mentioned embodiment 1, embodiment 2 or embodiment 3 is implemented.

[0131] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the device: transmits the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual core of the bare metal server, wherein the virtual machine is running in the bare metal server; sends a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request. In addition, the device is also made to: receive the message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the processing device to the virtual machine running in the bare metal server; and read the event of the input terminal from the buffer of the input terminal in the virtual core of the bare metal server based on the message signal remapping interrupt request. In addition, the device is also configured to: send a first data read request for a first video memory bitmap of a virtual graphics card of a virtual machine running in a bare metal server to synchronize data in the first video memory bitmap in a virtual kernel of the bare metal server to a second video memory bitmap allocated by a processing device for the virtual graphics card; based on the data in the second video memory bitmap, send a second data read request for a first video memory buffer of the virtual graphics card to the virtual machine to synchronize video memory change data in the first video memory buffer in the virtual kernel to a second video memory buffer allocated by the processing device for the virtual graphics card; and based on the video memory change data in the second video memory buffer, determine pixels in a video frame image whose pixel values ​​have changed.

[0132] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.

[0133] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.

[0134] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A data processing method, the method comprising: Transmitting an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server, wherein the virtual machine is running in the bare metal server; A message signal remapping interrupt request of the input terminal is sent to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

2. The method according to claim 1, wherein: The step of transmitting an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server includes: When the set time of the timer of the input device inside the virtual machine arrives, the input terminal event in the first buffer is transmitted to the second buffer through the first hardware channel in the virtual function of the communication device of the bare metal server.

3. The method according to claim 2, wherein: The input device includes a keyboard and a mouse, and the step of transmitting an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server includes: When the set time of the timer of the input device is reached, the keyboard events in the third buffer of the keyboard simulated by the virtual machine in the processing device are transmitted to the fourth buffer of the keyboard in the virtual kernel of the bare metal server through the first hardware channel, and the mouse events in the fifth buffer of the mouse simulated by the virtual machine in the processing device are transmitted to the sixth buffer of the mouse in the virtual kernel of the bare metal server.

4. The method according to claim 1, wherein: The sending the message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server includes: When the set time of the timer of the input device inside the virtual machine arrives, a message signal remapping interrupt request of the input terminal is sent to the virtual machine through the second hardware channel in the virtual function of the communication device of the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

5. The method according to claim 4, wherein: The input device includes a keyboard and a mouse, and the sending of the message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server includes: When the set time of the timer of the input device arrives, a message signal remapping interrupt request of the keyboard is sent to the virtual machine through the second hardware channel, so that the virtual machine reads keyboard events from the buffer of the keyboard in the virtual kernel of the bare metal server based on the message signal remapping interrupt request of the keyboard, and a message signal remapping interrupt request of the mouse is sent to the virtual machine, so that the virtual machine reads mouse events from the buffer of the mouse in the virtual kernel of the bare metal server based on the message signal remapping interrupt request of the mouse.

6. The method according to claim 3, wherein: Before transmitting the input terminal event in the first buffer of the input terminal simulated by the virtual machine in the processing device to the second buffer of the input terminal in the virtual kernel of the bare metal server, the method further includes: In the processing device, the third buffer of the keyboard is created for buffering the keyboard events sent by the user, and the fifth buffer of the mouse is created for buffering the mouse events sent by the user.

7. A data processing method, the method comprising: A message signal remapping interrupt request of an input terminal simulated by a virtual machine running in a bare metal server is received and sent by a processing device to the virtual machine; Based on the message signal remapping interrupt request, an event of the input terminal is read from a buffer of the input terminal in the virtual kernel of the bare metal server.

8. The method according to claim 7, wherein: The receiving and processing device sends a message signal remapping interrupt request of an input terminal simulated by the virtual machine running in the bare metal server, including: A message signal remapping interrupt request of the input terminal simulated by the virtual machine and sent by the processing device to the virtual machine running in the bare metal server is received through a hardware channel in a virtual function of the communication device of the bare metal server.

9. The method according to claim 7, wherein: The input device inside the virtual machine includes a keyboard and a mouse, and the remapping interrupt request based on the message signal and reading the event of the input terminal from the buffer of the input terminal in the virtual kernel of the bare metal server include: Reading an event of the keyboard from a buffer of the keyboard in the virtual kernel of the bare metal server based on a message signal remapping interrupt request of the keyboard; Based on the message signal remapping interrupt request of the mouse, the event of the mouse is read from the buffer of the mouse in the virtual kernel of the bare metal server.

10. The method according to claim 9, wherein: Before remapping the interrupt request based on the message signal of the keyboard and reading the keyboard event from the buffer of the keyboard in the virtual kernel of the bare metal server, the method further includes: The keyboard buffer is applied for from the virtual kernel through the simulator of the virtual machine.

11. The method according to claim 9, wherein: The remapping interrupt request based on the message signal of the keyboard, reading the keyboard event from the buffer of the keyboard in the virtual kernel of the bare metal server, includes: Based on the message signal remapping interrupt request of the keyboard, searching for an entry in a preconfigured interrupt remapping table to obtain an interrupt request of the bare metal server corresponding to the message signal remapping interrupt request of the keyboard; Based on the interrupt service routine of the interrupt request, sending an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine; The interrupt service routine of the interrupt request is executed by the virtual processor of the virtual machine, and the keyboard event is read from the buffer of the keyboard in the virtual kernel of the bare metal server.

12. The method according to claim 11, wherein: The interrupt service routine based on the interrupt request sends an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, including: Triggering the interrupt request so that the interrupt service routine of the interrupt request sends an interrupt injection signal to the interrupt injection unit registered in the virtual core; Based on the interrupt injection signal, a kernel thread corresponding to the interrupt injection unit in the virtual kernel is awakened, and a corresponding wake-up service routine is executed to inject the interrupt request into the virtual machine.

13. The method according to claim 11, wherein: Before remapping the interrupt request based on the message signal of the keyboard and searching for an entry in a preconfigured interrupt remapping table, the method further comprises: After the operating system of the virtual machine assigns an interrupt number to the keyboard, an interrupt remapping table entry for the keyboard is established based on the interrupt number, and the interrupt remapping table entry for the keyboard is written into the interrupt remapping table in the virtual function of the communication device of the bare metal server, wherein the interrupt remapping table entry records the correspondence between the interrupt request assigned to the keyboard and the message signal remapping interrupt request in the virtual function.

14. The method according to claim 11, wherein: Before the interrupt service routine based on the interrupt request sends an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine, the method further includes: The interrupt injection unit is created for the keyboard, and the interrupt injection unit is registered in the virtual kernel, so as to create a kernel thread corresponding to the interrupt injection unit in the virtual kernel for executing a wake-up service routine.

15. The method according to claim 9, wherein: The remapping interrupt request based on the message signal of the mouse, reading the mouse event from the buffer of the mouse in the virtual kernel of the bare metal server, comprises: Based on the message signal remapping interrupt request of the mouse, searching for an entry in a preconfigured interrupt remapping table to obtain an interrupt request of the bare metal server corresponding to the message signal remapping interrupt request of the mouse; Based on the interrupt service routine of the interrupt request, sending an interrupt injection signal to an interrupt injection unit registered in the virtual kernel to inject the interrupt request into the virtual machine; The interrupt service routine of the interrupt request is executed by the virtual processor of the virtual machine, and the mouse event is read from the buffer of the mouse in the virtual kernel of the bare metal server.

16. A data processing device, comprising: a transmission module, configured to transmit an input terminal event in a first buffer of an input terminal simulated by a virtual machine in a processing device to a second buffer of the input terminal in a virtual kernel of a bare metal server, wherein the virtual machine is running in the bare metal server; The first sending module is used to send the message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server, so that the virtual machine reads the input terminal event from the second buffer based on the message signal remapping interrupt request.

17. A data processing device, the device comprising: A first receiving module is used to receive a message signal remapping interrupt request of an input terminal simulated by a virtual machine running in a bare metal server, which is sent by a processing device to the virtual machine; A reading module is used to read the event of the input terminal from the buffer of the input terminal in the virtual kernel of the bare metal server based on the message signal remapping interrupt request.

18. A data processing system, the system comprising: A chip, and a bare metal server connected to the chip for communication, The chip is used to transmit an input terminal event in a first buffer of an input terminal simulated by a virtual machine in the chip to a second buffer of the input terminal in a virtual kernel of the bare metal server, and send a message signal remapping interrupt request of the input terminal to the virtual machine running in the bare metal server; The bare metal server is used to receive a message signal remapping interrupt request of the input terminal simulated by the virtual machine sent by the chip to the virtual machine running in the bare metal server, and read the event of the input terminal from the buffer of the input terminal in the virtual kernel of the bare metal server based on the message signal remapping interrupt request.

19. An electronic device, comprising: one or more processors; A computer readable medium configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as described in any one of claims 1 to 6, or implement the data processing method as described in any one of claims 7 to 15.

20. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the program implements the data processing method according to any one of claims 1 to 6, or implements the data processing method according to any one of claims 7 to 15.

Citation Information

Patent Citations

  • I / O resource scheduling method for distributed virtual machine monitor

    CN101751284A

  • Method for detecting scheduling based on time-triggered forwarding

    CN106209684A