[go: up one dir, main page]

WO2024169436A1 - Data processing method and apparatus, and storage medium and electronic apparatus - Google Patents

Data processing method and apparatus, and storage medium and electronic apparatus Download PDF

Info

Publication number
WO2024169436A1
WO2024169436A1 PCT/CN2023/143717 CN2023143717W WO2024169436A1 WO 2024169436 A1 WO2024169436 A1 WO 2024169436A1 CN 2023143717 W CN2023143717 W CN 2023143717W WO 2024169436 A1 WO2024169436 A1 WO 2024169436A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtio
data
sub
end device
data plane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/143717
Other languages
French (fr)
Chinese (zh)
Inventor
徐超
刘小杨
刘松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Publication of WO2024169436A1 publication Critical patent/WO2024169436A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present disclosure relate to the computer field, and in particular, to a data processing method, device, storage medium, and electronic device.
  • Cloud computing has been deployed on a large scale in the industry. Assuming that each physical server runs 10 virtual machines, and each virtual machine has 1 virtual network console (VNC) and console device, it will require 1 million VNC and console devices. These devices will continue to simulate as long as there is output in the virtual machine. Assuming that the data plane simulation of each device only occupies 0.1% of the physical central processing unit (CPU), a total of 1,000 physical CPUs are required to simulate these devices. In most cases, these devices are not used by users and are idling in the background, resulting in a waste of computing resources.
  • VNC virtual network console
  • the embodiments of the present disclosure provide a data processing method, apparatus, storage medium and electronic device to at least solve the problem in the related art that device simulation will continue as long as there is output in the virtual machine, resulting in a waste of computing resources.
  • a data processing method comprising: initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end; processing the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.
  • a data processing device comprising: an initialization module, configured to initialize the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio backend; and a processing module, configured to process input data and/or output data of the virtio front-end device through the data plane of the virtio backend.
  • a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
  • an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • FIG1 is a hardware structure block diagram of a computer device of a data processing method according to an embodiment of the present disclosure
  • FIG2 is a flow chart of a data processing method according to an embodiment of the present disclosure.
  • FIG3 is a flow chart of a data processing method according to an optional embodiment of the present disclosure.
  • FIG4 is a block diagram of the separation of the data plane and the control plane according to an embodiment of the present disclosure
  • FIG. 5 is a block diagram of a data processing device according to an embodiment of the present disclosure.
  • FIG. 1 is a hardware structure block diagram of a computer device of the data processing method of the embodiment of the present disclosure.
  • the computer device may include one or more (only one is shown in FIG. 1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 104 for storing data, wherein the above-mentioned computer device may also include a transmission device 106 and an input and output device 108 for communication functions.
  • FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned computer device.
  • the computer device may also include more or fewer components than those shown in FIG. 1 , or have a configuration different from that shown in FIG. 1 .
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data processing method in the embodiment of the present disclosure.
  • the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the specific example of the above network may include a wireless network provided by a communication provider of the computer device.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • FIG. 2 is a flow chart of the data processing method according to an embodiment of the present disclosure. As shown in FIG. 2 , the flow chart includes the following steps:
  • Step S202 initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end;
  • Virtio in this embodiment is an abstraction layer located above the device in the paravirtualized Hypervisor.
  • the above step S202 may specifically include: receiving a configuration message of the virtio front-end device through the control plane; and returning corresponding data to the virtio front-end device to initialize the virtio front-end device.
  • Step S204 Process the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.
  • the virtio front-end device is initialized by interacting with the virtio front-end device through the control plane of the virtio back-end; the input data and output data of the virtio front-end device are processed through the data plane of the virtio back-end, which can solve the problem that device simulation will continue as long as there is output in the virtual machine, resulting in waste of computing resources in the related technology.
  • the virtio front-end device is initialized by the control plane to process the input data and/or output data of the virtio front-end device, so as to realize the separation of the control plane and the data plane of the virtio back-end device, and only the control plane of the virtio device and the data plane without function simulation are realized in the absence of user access, thereby avoiding unnecessary waste of resources.
  • FIG3 is a flow chart of a data processing method according to an optional embodiment of the present disclosure. As shown in FIG3 , the above step S204 specifically includes:
  • Step S302 receiving and discarding output data of the virtio front-end device through the first sub-data plane when no target user accesses the virtio front-end device;
  • Step S304 When a target user accesses the virtio front-end device, input data and/or output data of the virtio front-end device is received through the first sub-data plane, and the input data and/or output data is processed through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane.
  • the data plane in the disclosed embodiment includes the above-mentioned first sub-data plane and second sub-data plane.
  • the second sub-data plane is added when it is detected that the target user accesses the virtio front-end device.
  • the function set of the control plane and the first sub-data plane in this embodiment can be called an intermediate layer, which can be located in the same process of the Hypervisor or in other processes.
  • the method may further include: receiving a configuration message of the virtio front-end device through the control plane; returning corresponding data to the virtio front-end device to initialize the virtio front-end device, and driving the virtio front-end device to generate output data.
  • the above step S304 may specifically include: sending the output data to the second sub-data plane through the first sub-data plane and the virtio backend transport layer in sequence, and sending the output data to the target user through the second sub-data plane; and/or detecting the input data of the target user accessing the virtio front-end device through the second sub-data plane, and sending the input data to the virtio front-end device through the second sub-data plane, the virtio backend transport layer, and the first sub-data plane in sequence.
  • the method before the above step S302, the method further includes: determining whether it is detected that the target user accesses the virtio front-end device; and if the determination result is yes, adding a second sub-data plane corresponding to the first sub-data plane.
  • the method further includes: deleting the second sub-data plane when the target user stops accessing the virtio front-end device through the second sub-data plane.
  • This embodiment adds an intermediate layer (a functional set of the control plane and the first sub-data plane) to the virtio backend to separate the control plane and data plane of the virtio backend device.
  • an intermediate layer a functional set of the control plane and the first sub-data plane
  • the virtio device is still loaded. The guest has no perception of the actual separation of the control plane and data plane of the backend.
  • the control plane is mainly responsible for communicating with the guest virtual machine, initializing and loading the device, and ensuring that the corresponding virtio device in the guest can be loaded normally. Each device must implement the control plane.
  • the data plane is mainly responsible for communicating with the guest and for data transmission of virtio devices, such as the output of the console, the graphic frames of VNC, and other data.
  • the data plane implements an empty device by default, and the sent and received data can be directly discarded.
  • the corresponding virtio backend data plane simulation is dynamically added; when the user's access is over, the corresponding virtio backend data plane simulation is dynamically deleted. In this way, when the user does not access devices such as VNC/Console, the computing resource overhead of the actual device data plane simulation can be saved.
  • the data plane can be based on multiple transport layers, including but not limited to pcie/tcp/udp/vsock, etc.
  • Device simulation can select the appropriate transport layer to meet various business requirements, such as security reinforcement, security auditing, and cost savings.
  • FIG. 4 is a block diagram of the separation of the data plane and the control plane according to an embodiment of the present disclosure, as shown in Figure 4, including:
  • the Hypervisor prepares the control plane and the first sub-data plane corresponding to the virtio backend middle layer.
  • Each virtio backend middle layer has and only has one control plane and one first sub-data plane.
  • the GuestOS (the operating system of the client virtual machine) starts to start, and the device manager in the Guest traverses the virtio front-end devices and sends the configuration message of the virtio front-end devices to the control plane.
  • control plane After receiving the device configuration message, the control plane returns the corresponding data to the device manager in the Guest according to the type of virtio device.
  • the device manager in the Guest initializes the virio front-end device based on the data returned by the control plane and successfully loads the virtio front-end device driver.
  • the virtio front-end device starts generating output data and sends it to the first sub-data plane.
  • the second sub-data plane corresponding to the first sub-data plane does not exist yet, so the data is directly discarded and the correct response data is returned according to the virtio front-end device type.
  • the user needs to access the virtio front-end device of the Guest.
  • the second sub-data plane corresponding to the first sub-data plane is added according to the front-end device currently accessed.
  • the first sub-data plane and the second sub-data plane of each front-end device are in one-to-one correspondence.
  • the second sub-data plane will send the input data to the first sub-data plane through the virtio back-end transport layer, and then the first sub-data plane will send the input data to the virtio front-end device according to the virtio protocol.
  • the virtio front-end device If the virtio front-end device has output data, the virtio front-end device sends the output data to the first sub-data plane according to the virtio protocol, and then the first sub-data plane sends the output data to the second sub-data plane through the virtio back-end transport layer.
  • the user stops accessing the virtio front-end device of the Guest, and the second sub-data plane corresponding to the first sub-data plane is deleted and cleared.
  • the device manager in the guest includes but is not limited to the operating system kernel program, user-mode program, etc.
  • the virtio backend intermediate layer can be implemented as, but is not limited to, kernel-mode and user-mode programs.
  • Hypervisors include but are not limited to qemu, cloud-Hypervisor, etc.
  • Virtio protocols include but are not limited to virtiolagacy, virtio 1.0, virtio 1.1, virtio 1.2 and later virtio protocol versions released by OASIS, as well as other related protocols compatible with the standard virtio protocol.
  • Virtio device types include but are not limited to Console, VNC and other device types. In theory, any virtio device type can be supported.
  • the virtio backend transport layer only needs to support reading and writing data, including but not limited to pcie, rdma, dma, tcp, udp, vsock, etc.
  • the virtio device backend simulation can run any location accessible by the virito backend transport layer (such as physical machines, dedicated devices, virtual machines, etc.).
  • the computing resources of the virtual machine platform are saved.
  • the device does not The corresponding virtio backend data plane does not occupy computing resources.
  • a suitable transport layer such as TCP
  • the data plane of the virtio device can run on a server other than the hypervisor where the current virtual machine is located, thereby effectively reducing the threat of virtio device vulnerabilities and GuestOS vulnerabilities to the hypervisor.
  • TCP transport layer
  • the data plane of the virtio device can run on a server other than the hypervisor where the current virtual machine is located.
  • the data plane of the virtio device can be run on a cheaper server, saving costs.
  • FIG. 5 is a block diagram of the data processing device according to the embodiment of the present disclosure. As shown in FIG. 5 , the device includes:
  • An initialization module 52 is configured to initialize the virtio front-end device by interacting with the virtio front-end device through a virtio back-end control plane;
  • the processing module 54 is configured to process the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.
  • the initialization module is further configured to receive a configuration message of the virtio front-end device through the control plane; and return corresponding data to the virtio front-end device to initialize the virtio front-end device.
  • the processing module 54 includes:
  • a discarding submodule configured to receive and discard output data of the virtio front-end device through the first sub-data plane when no target user accesses the virtio front-end device;
  • a processing submodule configured to receive the input data and/or the output data of the virtio front-end device through a first sub-data plane when a target user accesses the virtio front-end device, and process the input data and/or the output data through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane;
  • the data plane includes the first sub-data plane and the second sub-data plane, and the second sub-data plane is added when it is detected that the target user accesses the virtio front-end device.
  • the device further comprises:
  • the return module is configured to return corresponding response data according to the device type of the virtio front-end device.
  • the processing submodule is further configured to send the output data to the second sub-data plane through the first sub-data plane and the virtio backend transport layer in sequence, and send the output data to the target user through the second sub-data plane; and/or detect through the second sub-data plane that the target user accesses the input data of the virtio front-end device; and send the input data to the virtio front-end device through the second sub-data plane, the virtio backend transport layer, and the first sub-data plane in sequence.
  • the device further comprises:
  • a judgment module is configured to judge whether the target user is detected to access the virtio front-end device
  • the adding module is configured to add the second sub-data plane corresponding to the first sub-data plane if the judgment result is yes.
  • the device further comprises:
  • the deletion module is configured to delete the second sub-data plane when the target user stops accessing the virtio front-end device through the second sub-data plane.
  • the embodiment of the present disclosure also provides a computer-readable storage medium storing a computer-readable storage medium.
  • a computer program wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
  • the above-mentioned computer-readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
  • An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
  • modules or steps of the present disclosure can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation.
  • the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data processing method and apparatus, and a storage medium and an electronic apparatus. The method comprises: initializing a virtio frontend device by means of a control plane at a virtio backend interacting with the virtio frontend device (S202); and processing input data and/or output data of the virtio frontend device by means of a data plane at the virtio backend (S204).

Description

一种数据处理方法、装置、存储介质及电子装置Data processing method, device, storage medium and electronic device

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本公开基于2023年02月15日提交的发明名称为“一种数据处理方法、装置、存储介质及电子装置”的中国专利申请CN202310152011.0,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。The present disclosure is based on Chinese patent application CN202310152011.0 filed on February 15, 2023, entitled “A data processing method, device, storage medium and electronic device”, and claims the priority of the patent application. All the contents disclosed therein are incorporated into the present disclosure by reference.

技术领域Technical Field

本公开实施例涉及计算机领域,具体而言,涉及一种数据处理方法、装置、存储介质及电子装置。The embodiments of the present disclosure relate to the computer field, and in particular, to a data processing method, device, storage medium, and electronic device.

背景技术Background Art

云计算目前已经在业内大规模部署,假设每个物理服务器上运行10台虚拟机,每个虚拟机1个虚拟网络控制台(Virtual Network Console,简称为VNC)和控制台Console设备,那将需要100万个VNC和Console设备。这些只要虚拟机中有输出就会持续进行设备模拟。假设每个设备的数据面模拟只占用0.1%的物理中央处理器(Central Processing Unit,简称为CPU),那么共需要1000个物理CPU来模拟这些设备。而绝大多数情况下,这些设备并没有被用户使用,在后台空转,从而导致计算资源的浪费。Cloud computing has been deployed on a large scale in the industry. Assuming that each physical server runs 10 virtual machines, and each virtual machine has 1 virtual network console (VNC) and console device, it will require 1 million VNC and console devices. These devices will continue to simulate as long as there is output in the virtual machine. Assuming that the data plane simulation of each device only occupies 0.1% of the physical central processing unit (CPU), a total of 1,000 physical CPUs are required to simulate these devices. In most cases, these devices are not used by users and are idling in the background, resulting in a waste of computing resources.

针对相关技术中只要虚拟机中有输出就会持续进行设备模拟,导致计算资源浪费的问题,尚未提出解决方案。There is no solution yet to the problem in related technologies that device simulation will continue as long as there is output in the virtual machine, resulting in a waste of computing resources.

发明内容Summary of the invention

本公开实施例提供了一种数据处理方法、装置、存储介质及电子装置,以至少解决相关技术中只要虚拟机中有输出就会持续进行设备模拟,导致计算资源浪费的问题。The embodiments of the present disclosure provide a data processing method, apparatus, storage medium and electronic device to at least solve the problem in the related art that device simulation will continue as long as there is output in the virtual machine, resulting in a waste of computing resources.

根据本公开的一个实施例,提供了一种数据处理方法,所述方法包括:通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。According to an embodiment of the present disclosure, a data processing method is provided, the method comprising: initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end; processing the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.

根据本公开的另一个实施例,还提供了一种数据处理装置,所述装置包括:初始化模块,设置为通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;处理模块,设置为通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。According to another embodiment of the present disclosure, a data processing device is also provided, comprising: an initialization module, configured to initialize the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio backend; and a processing module, configured to process input data and/or output data of the virtio front-end device through the data plane of the virtio backend.

根据本公开的又一个实施例,还提供了一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。 According to another embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本公开实施例的数据处理方法的计算机设备的硬件结构框图;FIG1 is a hardware structure block diagram of a computer device of a data processing method according to an embodiment of the present disclosure;

图2是根据本公开实施例的数据处理方法的流程图;FIG2 is a flow chart of a data processing method according to an embodiment of the present disclosure;

图3是根据本公开可选实施例的数据处理方法的流程图;FIG3 is a flow chart of a data processing method according to an optional embodiment of the present disclosure;

图4是根据本公开实施例的数据面和控制面分离的框图;FIG4 is a block diagram of the separation of the data plane and the control plane according to an embodiment of the present disclosure;

图5是根据本公开实施例的数据处理装置的框图。FIG. 5 is a block diagram of a data processing device according to an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

下文中将参考附图并结合实施例来详细说明本公开的实施例。Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

本公开实施例中所提供的方法实施例可以在计算机设备或者类似的运算装置中执行。以运行在计算机设备上为例,图1是本公开实施例的数据处理方法的计算机设备的硬件结构框图,如图1所示,计算机设备可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件等的处理装置)和用于存储数据的存储器104,其中,上述计算机设备还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述计算机设备的结构造成限定。例如,计算机设备还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of the present disclosure can be executed in a computer device or a similar computing device. Taking running on a computer device as an example, FIG. 1 is a hardware structure block diagram of a computer device of the data processing method of the embodiment of the present disclosure. As shown in FIG. 1 , the computer device may include one or more (only one is shown in FIG. 1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 104 for storing data, wherein the above-mentioned computer device may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those of ordinary skill in the art that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned computer device. For example, the computer device may also include more or fewer components than those shown in FIG. 1 , or have a configuration different from that shown in FIG. 1 .

存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的数据处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data processing method in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机设备的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

在本实施例中提供了一种运行于上述计算机设备的数据处理方法,图2是根据本公开实施例的数据处理方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a data processing method running on the above-mentioned computer device is provided. FIG. 2 is a flow chart of the data processing method according to an embodiment of the present disclosure. As shown in FIG. 2 , the flow chart includes the following steps:

步骤S202,通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;Step S202, initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end;

本实施例中的virtio是半虚拟化Hypervisor中位于设备之上的抽象层。Virtio in this embodiment is an abstraction layer located above the device in the paravirtualized Hypervisor.

本公开实施例中上述步骤S202具体可以包括:通过所述控制面接收所述virtio前端设备的配置消息;向所述virtio前端设备返回对应的数据,以初始化所述virtio前端设备。 In the embodiment of the present disclosure, the above step S202 may specifically include: receiving a configuration message of the virtio front-end device through the control plane; and returning corresponding data to the virtio front-end device to initialize the virtio front-end device.

步骤S204,通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。Step S204: Process the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.

通过上述步骤S202至S204,通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;通过virtio后端的数据面处理所述virtio前端设备的输入数据与输出数据,可以解决相关技术中只要虚拟机中有输出就会持续进行设备模拟,导致计算资源浪费的问题,通过控制面初始化virtio前端设备处理virtio前端设备的输入数据和/或输出数据,实现virtio后端设备的控制面和数据面分离,在无用户访问的情况下仅实现virtio设备的控制面和没有功能模拟的数据面,避免了不必要的资源浪费。Through the above steps S202 to S204, the virtio front-end device is initialized by interacting with the virtio front-end device through the control plane of the virtio back-end; the input data and output data of the virtio front-end device are processed through the data plane of the virtio back-end, which can solve the problem that device simulation will continue as long as there is output in the virtual machine, resulting in waste of computing resources in the related technology. The virtio front-end device is initialized by the control plane to process the input data and/or output data of the virtio front-end device, so as to realize the separation of the control plane and the data plane of the virtio back-end device, and only the control plane of the virtio device and the data plane without function simulation are realized in the absence of user access, thereby avoiding unnecessary waste of resources.

图3是根据本公开可选实施例的数据处理方法的流程图,如图3所示,上述步骤S204具体包括:FIG3 is a flow chart of a data processing method according to an optional embodiment of the present disclosure. As shown in FIG3 , the above step S204 specifically includes:

步骤S302,在不存在目标用户访问virtio前端设备的情况下,通过第一子数据面接收并丢弃virtio前端设备的输出数据;Step S302: receiving and discarding output data of the virtio front-end device through the first sub-data plane when no target user accesses the virtio front-end device;

步骤S304,在存在目标用户访问virtio前端设备的情况下,通过第一子数据面接收virtio前端设备的输入数据和/或输出数据,通过第一子数据面与第一子数据面对应的第二子数据面处理输入数据和/或输出数据。Step S304: When a target user accesses the virtio front-end device, input data and/or output data of the virtio front-end device is received through the first sub-data plane, and the input data and/or output data is processed through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane.

本公开实施例中的数据面包括上述的第一子数据面与第二子数据面,该第二子数据面是在检测到目标用户访问virtio前端设备时添加的,本实施例中的控制面与第一子数据面的功能集合可以称为中间层,该中间层可以位于Hypervisor的同进程中,也可以位于其他进程中。The data plane in the disclosed embodiment includes the above-mentioned first sub-data plane and second sub-data plane. The second sub-data plane is added when it is detected that the target user accesses the virtio front-end device. The function set of the control plane and the first sub-data plane in this embodiment can be called an intermediate layer, which can be located in the same process of the Hypervisor or in other processes.

在一实施例中,在上述步骤S302之后,还可以包括:通过控制面接收virtio前端设备的配置消息;向virtio前端设备返回对应的数据,以初始化virtio前端设备,并驱动virtio前端设备产生输出数据。In one embodiment, after the above step S302, the method may further include: receiving a configuration message of the virtio front-end device through the control plane; returning corresponding data to the virtio front-end device to initialize the virtio front-end device, and driving the virtio front-end device to generate output data.

本实施例中,上述步骤S304具体可以包括:依次通过第一子数据面、virtio后端传输层将输出数据发送给第二子数据面,通过第二子数据面将输出数据发送给目标用户;和/或通过第二子数据面检测到目标用户访问virtio前端设备的输入数据,依次通过第二子数据面、virtio后端传输层、第一子数据面将输入数据发送给virtio前端设备。In this embodiment, the above step S304 may specifically include: sending the output data to the second sub-data plane through the first sub-data plane and the virtio backend transport layer in sequence, and sending the output data to the target user through the second sub-data plane; and/or detecting the input data of the target user accessing the virtio front-end device through the second sub-data plane, and sending the input data to the virtio front-end device through the second sub-data plane, the virtio backend transport layer, and the first sub-data plane in sequence.

在一实施例中,上述步骤S302之前,所述方法还包括:判断是否检测到目标用户访问virtio前端设备;在判断结果为是的情况下,添加第一子数据面对应的第二子数据面。In one embodiment, before the above step S302, the method further includes: determining whether it is detected that the target user accesses the virtio front-end device; and if the determination result is yes, adding a second sub-data plane corresponding to the first sub-data plane.

在另一实施例中,所述方法还包括:在目标用户停止通过第二子数据面访问virtio前端设备的情况下,删除第二子数据面。In another embodiment, the method further includes: deleting the second sub-data plane when the target user stops accessing the virtio front-end device through the second sub-data plane.

本实施例在virtio后端的增加一个中间层(上述控制面与第一子数据面的功能集合),以实现virtio后端设备的控制面和数据面分离。对Guest来说,加载的仍然是virtio设备。对后端实际的控制面和数据面的分离实现毫无感知。This embodiment adds an intermediate layer (a functional set of the control plane and the first sub-data plane) to the virtio backend to separate the control plane and data plane of the virtio backend device. For the guest, the virtio device is still loaded. The guest has no perception of the actual separation of the control plane and data plane of the backend.

控制面主要负责和客户虚拟机Guest通信,负责设备的初始化和加载,保证Guest中对应的virtio设备可以正常加载的工作。控制面每个设备必须实现。The control plane is mainly responsible for communicating with the guest virtual machine, initializing and loading the device, and ensuring that the corresponding virtio device in the guest can be loaded normally. Each device must implement the control plane.

数据面主要负责和Guest通信,负责virtio设备的数据传输,比如Console的输出,VNC的图形帧等数据。数据面默认实现一个空的设备,收发数据直接丢弃即可。当用户有实际的设备访问需求时,动态添加对应virtio后端的数据面模拟;当用户访问结束后,动态删除对应的virtio后端的数据面模拟。这样当用户未访问VNC/Console等设备时,就可以节省实际的设备数据面模拟的计算资源开销。 The data plane is mainly responsible for communicating with the guest and for data transmission of virtio devices, such as the output of the console, the graphic frames of VNC, and other data. The data plane implements an empty device by default, and the sent and received data can be directly discarded. When the user has actual device access needs, the corresponding virtio backend data plane simulation is dynamically added; when the user's access is over, the corresponding virtio backend data plane simulation is dynamically deleted. In this way, when the user does not access devices such as VNC/Console, the computing resource overhead of the actual device data plane simulation can be saved.

进一步的,数据面可以基于多种传输层,包括但不限于pcie/tcp/udp/vsock等。设备模拟可以选择合适的传输层,可以实现多种业务需求,比如安全加固,安全审计,节约成本等。Furthermore, the data plane can be based on multiple transport layers, including but not limited to pcie/tcp/udp/vsock, etc. Device simulation can select the appropriate transport layer to meet various business requirements, such as security reinforcement, security auditing, and cost savings.

假如数据面基于IP传输层,就可以实现数据面在远程主机上模拟。假如集群中的计算节点上有100台虚拟机,但是运维人员或者云平台用户同一时间仅访问20台虚拟机的VNC/Console时,仅需要在某个管理节点模拟20个VNC/Console设备的数据面即可;在夜间,节假日等空闲时间,virtio后端设备可以基本不占用服务器的计算资源。图4是根据本公开实施例的数据面和控制面分离的框图,如图4所示,包括:If the data plane is based on the IP transport layer, the data plane can be simulated on the remote host. If there are 100 virtual machines on the computing nodes in the cluster, but the operation and maintenance personnel or cloud platform users only access the VNC/Console of 20 virtual machines at the same time, it is only necessary to simulate the data plane of 20 VNC/Console devices on a certain management node; at night, holidays and other idle time, the virtio backend device can basically not occupy the computing resources of the server. Figure 4 is a block diagram of the separation of the data plane and the control plane according to an embodiment of the present disclosure, as shown in Figure 4, including:

Hypervisor准备virtio后端中间层对应的控制面和第一子数据面。每个virtio后端中间层有且仅有一个控制面与第一子数据面。The Hypervisor prepares the control plane and the first sub-data plane corresponding to the virtio backend middle layer. Each virtio backend middle layer has and only has one control plane and one first sub-data plane.

GuestOS(客户虚拟机的操作系统)开始启动,Guest内的设备管理器遍历virtio前端设备,并向控制面发送该virtio前端设备的配置消息。The GuestOS (the operating system of the client virtual machine) starts to start, and the device manager in the Guest traverses the virtio front-end devices and sends the configuration message of the virtio front-end devices to the control plane.

控制面收到设备配置消息后,根据virtio设备的类型,返回对应的数据给Guest内的设备管理器。After receiving the device configuration message, the control plane returns the corresponding data to the device manager in the Guest according to the type of virtio device.

Guest内的设备管理器根据控制面返回的数据,对virio前端设备进行初始化,并成功加载virtio前端设备驱动。The device manager in the Guest initializes the virio front-end device based on the data returned by the control plane and successfully loads the virtio front-end device driver.

virtio前端设备开始产生输出数据,发送给第一子数据面。The virtio front-end device starts generating output data and sends it to the first sub-data plane.

第一子数据面收到输出数据后,此时第一子数据面对应的第二子数据面还不存在,因此直接丢弃该数据,并根据virtio前端设备类型返回正确的响应数据。After the first sub-data plane receives the output data, the second sub-data plane corresponding to the first sub-data plane does not exist yet, so the data is directly discarded and the correct response data is returned according to the virtio front-end device type.

用户需要访问Guest的virtio前端设备,此时根据当前访问的前端设备添加第一子数据面对应的第二子数据面,每个前端设备的第一子数据面和第二子数据面是一一对应的。The user needs to access the virtio front-end device of the Guest. At this time, the second sub-data plane corresponding to the first sub-data plane is added according to the front-end device currently accessed. The first sub-data plane and the second sub-data plane of each front-end device are in one-to-one correspondence.

如果用户想向virtio前端设备输入数据,此时第二子数据面就会将输入数据通过virtio后端传输层发送第一子数据面,然后第一子数据面将输入数据根据virtio协议发送给virtio前端设备。If the user wants to input data to the virtio front-end device, the second sub-data plane will send the input data to the first sub-data plane through the virtio back-end transport layer, and then the first sub-data plane will send the input data to the virtio front-end device according to the virtio protocol.

如果virtio前端设备有输出数据,此时virtio前端设备将输出数据根据virtio协议发送给第一子数据面,然后第一子数据面将输出数据通过virtio后端传输层发送给第二子数据面If the virtio front-end device has output data, the virtio front-end device sends the output data to the first sub-data plane according to the virtio protocol, and then the first sub-data plane sends the output data to the second sub-data plane through the virtio back-end transport layer.

用户停止对该Guest的virtio前端设备的访问,此时该第一子数据面对应的第二子数据面被删除和清理。The user stops accessing the virtio front-end device of the Guest, and the second sub-data plane corresponding to the first sub-data plane is deleted and cleared.

Guest内的设备管理器包括但不限于操作系统内核程序,用户态程序等。virtio后端中间层可以实现为包括但不限于内核态、用户态程序。Hypervisor包括但不限于qemu、cloud-Hypervisor等。virtio协议包括但不限于virtiolagacy、virtio 1.0、virtio 1.1、virtio 1.2及以后OASIS发布的virtio协议版本,以及其他兼容标准virtio协议的相关协议。virtio设备类型包括但不限于Console、VNC等设备类型,理论上任何virtio设备类型都可以支持,用户可以自身需求,仅实现部分virtio设备的后端的控制面和数据面分离。Guest os支持virtio设备的驱动即可,包括但不限于linux、windows等。virtio后端传输层支持读写数据即可,包括但不限于pcie、rdma、dma、tcp、udp、vsock等。virtio设备后端模拟可以运行任何virito后端传输层可达的位置(如物理机,专用设备,虚拟机等)。The device manager in the guest includes but is not limited to the operating system kernel program, user-mode program, etc. The virtio backend intermediate layer can be implemented as, but is not limited to, kernel-mode and user-mode programs. Hypervisors include but are not limited to qemu, cloud-Hypervisor, etc. Virtio protocols include but are not limited to virtiolagacy, virtio 1.0, virtio 1.1, virtio 1.2 and later virtio protocol versions released by OASIS, as well as other related protocols compatible with the standard virtio protocol. Virtio device types include but are not limited to Console, VNC and other device types. In theory, any virtio device type can be supported. Users can realize the separation of the control plane and data plane of the backend of only some virtio devices according to their own needs. Guest os only needs to support the driver of virtio devices, including but not limited to linux, windows, etc. The virtio backend transport layer only needs to support reading and writing data, including but not limited to pcie, rdma, dma, tcp, udp, vsock, etc. The virtio device backend simulation can run any location accessible by the virito backend transport layer (such as physical machines, dedicated devices, virtual machines, etc.).

通过本实施例,节省虚拟机平台的计算资源。用户未访问对应的设备时,该设备并没有 对应的virtio后端数据面,因此不占用计算资源。提升hypervisor的安全性。通过选择合适的传输层,比如tcp,virtio设备的数据面可以运行在当前虚拟机所在的hypervisor之外的服务器上,从而有效降低virtio设备漏洞及Guestos漏洞对hypervisor的威胁。降低云平台的服务器成本。通过选择合适的传输层,比如tcp,virtio设备的数据面可以运行在当前虚拟机所在的hypervisor之外的服务器上。virtio设备的数据面可以用更廉价的服务器来运行,从而节省成本。Through this embodiment, the computing resources of the virtual machine platform are saved. When the user does not access the corresponding device, the device does not The corresponding virtio backend data plane does not occupy computing resources. Improve the security of the hypervisor. By selecting a suitable transport layer, such as TCP, the data plane of the virtio device can run on a server other than the hypervisor where the current virtual machine is located, thereby effectively reducing the threat of virtio device vulnerabilities and GuestOS vulnerabilities to the hypervisor. Reduce the server cost of the cloud platform. By selecting a suitable transport layer, such as TCP, the data plane of the virtio device can run on a server other than the hypervisor where the current virtual machine is located. The data plane of the virtio device can be run on a cheaper server, saving costs.

根据本公开实施例的另一方面,还提供了一种数据处理装置,图5是根据本公开实施例的数据处理装置的框图,如图5所示,所述装置包括:According to another aspect of the embodiment of the present disclosure, a data processing device is further provided. FIG. 5 is a block diagram of the data processing device according to the embodiment of the present disclosure. As shown in FIG. 5 , the device includes:

初始化模块52,设置为通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;An initialization module 52 is configured to initialize the virtio front-end device by interacting with the virtio front-end device through a virtio back-end control plane;

处理模块54,设置为通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。The processing module 54 is configured to process the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end.

在一实施例中,上述初始化模块,还设置为通过所述控制面接收所述virtio前端设备的配置消息;向所述virtio前端设备返回对应的数据,以初始化所述virtio前端设备。In one embodiment, the initialization module is further configured to receive a configuration message of the virtio front-end device through the control plane; and return corresponding data to the virtio front-end device to initialize the virtio front-end device.

在一实施例中,所述处理模块54包括:In one embodiment, the processing module 54 includes:

丢弃子模块,设置为在不存在目标用户访问所述virtio前端设备的情况下,通过第一子数据面接收并丢弃所述virtio前端设备的输出数据;a discarding submodule, configured to receive and discard output data of the virtio front-end device through the first sub-data plane when no target user accesses the virtio front-end device;

处理子模块,设置为在存在目标用户访问所述virtio前端设备的情况下,通过第一子数据面接收所述virtio前端设备的所述输入数据和/或所述输出数据,通过所述第一子数据面与所述第一子数据面对应的第二子数据面处理所述输入数据和/或所述输出数据;a processing submodule, configured to receive the input data and/or the output data of the virtio front-end device through a first sub-data plane when a target user accesses the virtio front-end device, and process the input data and/or the output data through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane;

其中,所述数据面包括所述第一子数据面与所述第二子数据面,所述第二子数据面是在检测到所述目标用户访问所述virtio前端设备时添加的。The data plane includes the first sub-data plane and the second sub-data plane, and the second sub-data plane is added when it is detected that the target user accesses the virtio front-end device.

在一实施例中,所述装置还包括:In one embodiment, the device further comprises:

返回模块,设置为根据所述virtio前端设备的设备类型返回对应的响应数据。The return module is configured to return corresponding response data according to the device type of the virtio front-end device.

在一实施例中,所述处理子模块,还设置为依次通过所述第一子数据面、所述virtio后端传输层将所述输出数据发送给所述第二子数据面,通过所述第二子数据面将所述输出数据发送给所述目标用户;和/或通过所述第二子数据面检测到所述目标用户访问所述virtio前端设备的所述输入数据;依次通过所述第二子数据面、所述virtio后端传输层、所述第一子数据面将所述输入数据发送给所述virtio前端设备。In one embodiment, the processing submodule is further configured to send the output data to the second sub-data plane through the first sub-data plane and the virtio backend transport layer in sequence, and send the output data to the target user through the second sub-data plane; and/or detect through the second sub-data plane that the target user accesses the input data of the virtio front-end device; and send the input data to the virtio front-end device through the second sub-data plane, the virtio backend transport layer, and the first sub-data plane in sequence.

在一实施例中,所述装置还包括:In one embodiment, the device further comprises:

判断模块,设置为判断是否检测到所述目标用户访问所述virtio前端设备;A judgment module is configured to judge whether the target user is detected to access the virtio front-end device;

添加模块,设置为在判断结果为是的情况下,添加所述第一子数据面对应的所述第二子数据面。The adding module is configured to add the second sub-data plane corresponding to the first sub-data plane if the judgment result is yes.

在一实施例中,所述装置还包括:In one embodiment, the device further comprises:

删除模块,设置为在所述目标用户停止通过所述第二子数据面访问所述virtio前端设备的情况下,删除所述第二子数据面。The deletion module is configured to delete the second sub-data plane when the target user stops accessing the virtio front-end device through the second sub-data plane.

本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计 算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present disclosure also provides a computer-readable storage medium storing a computer-readable storage medium. A computer program, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.

本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present disclosure can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any specific combination of hardware and software.

以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。 The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (10)

一种数据处理方法,所述方法包括:A data processing method, the method comprising: 通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化;Initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end; 通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。The input data and/or output data of the virtio front-end device is processed through the data plane of the virtio back-end. 根据权利要求1所述的方法,其中,通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化包括:The method according to claim 1, wherein initializing the virtio front-end device by interacting with the virtio front-end device through the control plane of the virtio back-end comprises: 通过所述控制面接收所述virtio前端设备的配置消息;Receiving a configuration message of the virtio front-end device through the control plane; 向所述virtio前端设备返回对应的数据,以初始化所述virtio前端设备。Return corresponding data to the virtio front-end device to initialize the virtio front-end device. 根据权利要求1所述的方法,其中,通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据包括:The method according to claim 1, wherein processing the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end comprises: 在不存在目标用户访问所述virtio前端设备的情况下,通过第一子数据面接收并丢弃所述virtio前端设备的输出数据;In the case where there is no target user accessing the virtio front-end device, receiving and discarding output data of the virtio front-end device through the first sub-data plane; 在存在目标用户访问所述virtio前端设备的情况下,通过第一子数据面接收所述virtio前端设备的所述输入数据和/或所述输出数据,通过所述第一子数据面与所述第一子数据面对应的第二子数据面处理所述输入数据和/或所述输出数据;In the case where a target user accesses the virtio front-end device, receiving the input data and/or the output data of the virtio front-end device through the first sub-data plane, and processing the input data and/or the output data through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane; 其中,所述数据面包括所述第一子数据面与所述第二子数据面,所述第二子数据面是在检测到所述目标用户访问所述virtio前端设备时添加的。The data plane includes the first sub-data plane and the second sub-data plane, and the second sub-data plane is added when it is detected that the target user accesses the virtio front-end device. 根据权利要求3所述的方法,其中,在通过所述第一子数据面接收并丢弃所述virtio前端设备的输出数据之后,所述方法还包括:The method according to claim 3, wherein, after receiving and discarding the output data of the virtio front-end device through the first sub-data plane, the method further comprises: 根据所述virtio前端设备的设备类型返回对应的响应数据。Return corresponding response data according to the device type of the virtio front-end device. 根据权利要求3所述的方法,其中,通过所述第一子数据面与所述第一子数据面对应的第二子数据面处理所述输入数据和/或所述输出数据包括:The method according to claim 3, wherein processing the input data and/or the output data through the first sub-data plane and a second sub-data plane corresponding to the first sub-data plane comprises: 依次通过所述第一子数据面、所述virtio后端传输层将所述输出数据发送给所述第二子数据面,通过所述第二子数据面将所述输出数据发送给所述目标用户;和/或Sending the output data to the second sub-data plane through the first sub-data plane and the virtio backend transport layer in sequence, and sending the output data to the target user through the second sub-data plane; and/or 通过所述第二子数据面检测到所述目标用户访问所述virtio前端设备的所述输入数据,依次通过所述第二子数据面、所述virtio后端传输层、所述第一子数据面将所述输入数据发送给所述virtio前端设备。The target user accesses the input data of the virtio front-end device through the second sub-data plane, and the input data is sent to the virtio front-end device through the second sub-data plane, the virtio back-end transport layer, and the first sub-data plane in sequence. 根据权利要求3至5中任一项所述的方法,其中,在通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据之前,所述方法还包括:The method according to any one of claims 3 to 5, wherein, before processing the input data and/or output data of the virtio front-end device through the data plane of the virtio back-end, the method further comprises: 判断是否检测到所述目标用户访问所述virtio前端设备;Determining whether the target user is detected to access the virtio front-end device; 在判断结果为是的情况下,添加所述第一子数据面对应的所述第二子数据面。If the judgment result is yes, the second sub-data plane corresponding to the first sub-data plane is added. 根据权利要求6所述的方法,其中,所述方法还包括:The method according to claim 6, wherein the method further comprises: 在所述目标用户停止通过所述第二子数据面访问所述virtio前端设备的情况下,删除所述第二子数据面。When the target user stops accessing the virtio front-end device through the second sub-data plane, the second sub-data plane is deleted. 一种数据处理装置,所述装置包括:A data processing device, comprising: 初始化模块,设置为通过virtio后端的控制面与virtio前端设备进行交互的方式对所述virtio前端设备进行初始化; An initialization module, configured to initialize the virtio front-end device by interacting with the virtio front-end device through a virtio back-end control plane; 处理模块,设置为通过所述virtio后端的数据面处理所述virtio前端设备的输入数据和/或输出数据。A processing module is configured to process input data and/or output data of the virtio front-end device through a data plane of the virtio back-end. 一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至7任一项中所述的方法。A computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when run. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至7任一项中所述的方法。 An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 7.
PCT/CN2023/143717 2023-02-15 2023-12-30 Data processing method and apparatus, and storage medium and electronic apparatus Ceased WO2024169436A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310152011.0A CN118502826A (en) 2023-02-15 2023-02-15 Data processing method and device, storage medium and electronic device
CN202310152011.0 2023-02-15

Publications (1)

Publication Number Publication Date
WO2024169436A1 true WO2024169436A1 (en) 2024-08-22

Family

ID=92242243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/143717 Ceased WO2024169436A1 (en) 2023-02-15 2023-12-30 Data processing method and apparatus, and storage medium and electronic apparatus

Country Status (2)

Country Link
CN (1) CN118502826A (en)
WO (1) WO2024169436A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362523A (en) * 2019-07-12 2019-10-22 优刻得科技股份有限公司 A kind of interface and data processing method based on virtio agreement
US20200007405A1 (en) * 2018-06-29 2020-01-02 Juniper Networks, Inc. Monitoring and policy control of distributed data and control planes for virtual nodes
CN113472624A (en) * 2021-06-21 2021-10-01 烽火通信科技股份有限公司 Method for realizing virtual network data packet forwarding based on vDPA and application
CN113923259A (en) * 2021-08-24 2022-01-11 阿里云计算有限公司 Data processing method and system
US20220029929A1 (en) * 2020-12-08 2022-01-27 Intel Corporation Technologies that provide policy enforcement for resource access
CN114281472A (en) * 2019-04-26 2022-04-05 华为技术有限公司 Message processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200007405A1 (en) * 2018-06-29 2020-01-02 Juniper Networks, Inc. Monitoring and policy control of distributed data and control planes for virtual nodes
CN114281472A (en) * 2019-04-26 2022-04-05 华为技术有限公司 Message processing method and device
CN110362523A (en) * 2019-07-12 2019-10-22 优刻得科技股份有限公司 A kind of interface and data processing method based on virtio agreement
US20220029929A1 (en) * 2020-12-08 2022-01-27 Intel Corporation Technologies that provide policy enforcement for resource access
CN113472624A (en) * 2021-06-21 2021-10-01 烽火通信科技股份有限公司 Method for realizing virtual network data packet forwarding based on vDPA and application
CN113923259A (en) * 2021-08-24 2022-01-11 阿里云计算有限公司 Data processing method and system

Also Published As

Publication number Publication date
CN118502826A (en) 2024-08-16

Similar Documents

Publication Publication Date Title
EP3554025B1 (en) Method for forwarding packet and physical host
US8954997B2 (en) Resource affinity via dynamic reconfiguration for multi-queue network adapters
EP3982261B1 (en) Method and apparatus for processing io
CN110063051B (en) System and method for reconfiguring server and server
US7844810B2 (en) Computer system and booting method therefor and server used for streaming on-demand a remaining part of a boot-up main memory image that includes an operating system
CN111314799A (en) Terminal system architecture, communication system, communication method, and storage medium
US10331475B2 (en) Auto-adaptive virtual desktop persistence
US9811346B2 (en) Dynamic reconfiguration of queue pairs
CN100399274C (en) Method and device for dynamic allocation of input/output devices in a virtual machine system
US11635970B2 (en) Integrated network boot operating system installation leveraging hyperconverged storage
US8635632B2 (en) High performance and resource efficient communications between partitions in a logically partitioned system
US11929926B2 (en) Traffic service threads for large pools of network addresses
US12223342B2 (en) Dynamically switching a software service between stateful mode and stateless mode
US20150199205A1 (en) Optimized Remediation Policy in a Virtualized Environment
WO2024169436A1 (en) Data processing method and apparatus, and storage medium and electronic apparatus
US12314732B2 (en) Continuity of service for virtualized device after resumption from hibernation
US20250377931A1 (en) Container live migration method, processor, host, chip, and interface card
US20240427619A1 (en) Maintaining live state of virtual function during virtual machine save and restore operations
KR20240083796A (en) Storage device providing remote disk image with wireless function
WO2025246366A1 (en) Storage system and io request processing method
WO2025227768A1 (en) Data processing method in virtualized environment, and related device
CN105389133A (en) Virtual memory driving method and driver
CN116088998A (en) Method and device for redirecting Universal Serial Bus (USB) equipment

Legal Events

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

Ref document number: 23922551

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE