Data transmission method, device and system, host equipment and storage medium

By using packet filters and shared memory technology in a cloud computing environment, the problem of high memory footprint and low efficiency when DPU handles IO communication between the same node virtual machine, achieving more efficient data forwarding and memory utilization.

CN119854210AActive Publication Date: 2025-04-18CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202412000397.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-18
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In a cloud computing environment, when DPU processes IO communications between virtual machines of the same node, it needs to copy data in the kernel state of the node, resulting in excessive memory usage and low data forwarding efficiency.

Method used

The packet to be forwarded is intercepted and parsed through the packet filter, determine its destination address information, and match it with the device information table virtual machine. If the match is successful, the packet is stored in shared memory for the target virtual machine to obtain through shared memory.

Benefits of technology

It reduces the consumption of node memory resources, improves the data forwarding efficiency of virtual machines in the same node, and simplifies the communication method between virtual machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854210A_ABST
    Figure CN119854210A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device and system, host equipment and a storage medium, and the data transmission method comprises the steps: entering a kernel of the host equipment in response to a to-be-forwarded data packet, intercepting and analyzing the to-be-forwarded data packet through a data packet filter, and determining the destination address information of the to-be-forwarded data packet; performing virtual machine matching on the destination address information and the equipment information table through the data packet filter, and determining a virtual machine matching result; and under the condition that the virtual machine matching result is successful, determining a target virtual machine in the host equipment through the data packet filter, storing the to-be-forwarded data packet to the shared memory, and controlling the target virtual machine to obtain the to-be-forwarded data packet through the shared memory. Therefore, the communication mode can be simplified, the data forwarding efficiency of the virtual machines of the same node is improved, the occupation of memory resources is reduced, and the performance of the node is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a data transmission method, apparatus, system, host device and storage medium. Background Art

[0002] The Data Processing Unit (DPU) serves cloud computing and is used to perform data input / output (IO) tasks for virtual machines across nodes or on the same node in a data center environment. The DPU can forward data packets through virtual IO paths without occupying additional computing resources in the data center.

[0003] In the related technology, when the DPU processes the IO communication of the virtual machine on the same node, it copies the data once in the kernel state of the node, and then forwards it to the user state and forwards it by the DPU. This not only occupies too much memory of the node, but also reduces the efficiency of data forwarding. Summary of the invention

[0004] The present application provides a data transmission method, apparatus, system, host device and storage medium, which can not only simplify the communication method and accelerate the efficiency of data forwarding of virtual machines on the same node, but also reduce the occupancy of memory resources and improve the performance of the node.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a data transmission method, the data transmission method comprising:

[0007] In response to the data packet to be forwarded entering the kernel of the host device, intercepting and parsing the data packet to be forwarded through a data packet filter to determine the destination address information of the data packet to be forwarded;

[0008] The destination address information is matched with the device information table through the data packet filter to determine the result of the virtual machine match;

[0009] When the result of the virtual machine matching is successful, the target virtual machine in the host device is determined through the data packet filter, the data packet to be forwarded is stored in the shared memory, and the target virtual machine is controlled to obtain the data packet to be forwarded through the shared memory.

[0010] In a second aspect, an embodiment of the present application provides a data transmission device, the data transmission device comprising:

[0011] A parsing module, configured to intercept and parse the data packet to be forwarded through a data packet filter in response to the data packet to be forwarded entering the kernel of the host device, and determine the destination address information of the data packet to be forwarded;

[0012] A determination module, used to match the destination address information with the device information table for virtual machines through a data packet filter, and determine the result of the virtual machine matching;

[0013] The storage module is used to determine the target virtual machine in the host device through the data packet filter when the virtual machine matching result is successful, store the data packet to be forwarded in the shared memory, and control the target virtual machine to obtain the data packet to be forwarded through the shared memory.

[0014] In a third aspect, an embodiment of the present application provides a host device, the host device comprising at least one virtual machine, a data packet filter and a shared memory; wherein:

[0015] A data packet filter is used to intercept and parse the data packet to be forwarded in response to the data packet to be forwarded entering the kernel of the host device, determine the destination address information of the data packet to be forwarded; match the destination address information with the device information table for a virtual machine, and determine the result of the virtual machine matching; and if the result of the virtual machine matching is successful, determine the target virtual machine in the host device, and store the data packet to be forwarded in the shared memory;

[0016] The virtual machine is used to read the shared memory to obtain the data packet to be forwarded.

[0017] In a fourth aspect, an embodiment of the present application provides a data transmission system, the data transmission system comprising at least one host device as described in the third aspect; wherein:

[0018] A host device is used to execute the data transmission method as described in the first aspect.

[0019] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the data transmission method described in the first aspect is implemented.

[0020] The present application provides a data transmission method, device, system, host device and storage medium. First, after the data packet to be forwarded enters the kernel, the data packet to be forwarded is intercepted and parsed by the data packet filter to determine the destination address information of the data packet to be forwarded. In this way, the data packet to be forwarded is not copied in the kernel state of the node, thereby reducing the occupation of the node's memory resources and improving the performance of the node. Secondly, the data packet filter matches the destination address information with the device information table for virtual machines, and if the virtual machine matches successfully, the data packet to be forwarded is stored in the shared memory, and then the target virtual machine obtains the data packet to be forwarded through the shared memory. In this way, the data packets transmitted by the virtual machines of the same node can be separated and directly transmitted by the shared memory, which simplifies the communication method between the virtual machines of the same node, improves the efficiency of data forwarding of the virtual machines of the same node, and avoids affecting the communication of the virtual machines across nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a data transmission process;

[0022] Figure 2 A schematic diagram of a data transmission method according to an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of the structure of a host device in an embodiment of the present application Figure 1 ;

[0025] Figure 5 A schematic diagram of the structure of a host device provided in an embodiment of the present application Figure 2 ;

[0026] Figure 6 A schematic diagram of the structure of a data transmission system provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of the execution flow of a data transmission system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0032] In the process of gradual evolution of cloud computing technology, in order to meet the functional requirements of different businesses, the cluster size of data centers has increased, the structure has become more complex, and the IO burden of nodes has become heavier. In the implementation of traditional technical architecture, data forwarding work depends on the central processing unit (CPU) on the node, which creates a bottleneck in the computing power of the data center. Before the business is running, just accessing network data consumes a lot of computing resources, and this performance overhead is unbearable. Therefore, with the evolution of technology, DPU is applied to cloud computing. DPU is better at basic layer application tasks, such as network protocol processing, switching routing calculations, and other data forwarding tasks are offloaded from the CPU to itself. DPU uses its computing power to accelerate these tasks, thereby reducing the burden on the CPU and reducing the performance loss of the data center.

[0033] DPU is a new type of programmable multi-core processor, generally a system-on-chip (SoC). In the current DPU virtual network architecture, data IO tasks are uniformly handled by the DPU. The host (Host), or node, uses the virtio data path acceleration (vDPA) solution. vDPA is a virtual IO path acceleration solution based on virtio offload. The solution decouples the data path and control path between the front and back ends of virtio, offloads the back end of the data path to the physical network card, and retains the back end of the control path in the kernel or DPDK, achieving zero loss of the virtual IO path without occupying additional host computing resources.

[0034] When there are multiple hosts in the network topology, data transmission becomes more complicated. When a data packet enters the host, it triggers a system interrupt, places the data packet in the buff buffer, and notifies the kernel. The kernel protocol stack takes the network frame from the buffer and processes it layer by layer. Figure 1 Figure 1 is a schematic diagram of a data transmission process. Figure 1 As shown, when virtual machines across nodes communicate, they will pass through the host's physical network card and virtual network card one more time. For example, when virtual machine 1 1011 in host 1 101 sends a data packet to virtual machine 3 1021 in host 2 102, it is first copied once in kernel mode, then forwarded to user-mode system-level chip 1014 through data path acceleration process 1013, that is, vDPA process, and finally sent to host 2 102 by virtual network card of host 1 101. After receiving the data packet, host 2 102 also executes the step of copying once in kernel mode, and then forwards it to data path acceleration process of host 2 102, and then sends it to corresponding virtual machine 3 1021 through virtual network card by data path acceleration process. Alternatively, when virtual machine 1 1011 in host 1 101 sends a data packet to virtual machine 2 1012 in host 1 101, it also needs to be copied once in the kernel state of host 1 101, and then forwarded to system-level chip 1014 in user state through data path acceleration process 1013, and then forwarded to virtual machine 2 102 in kernel state. It should be understood that virtual machine 3 1021 and virtual machine 4 1022 in host 2 102 forward data to each other in the same way. It can be seen that whether it is cross-node or same-node virtual machine communication, it will pass through the host kernel state, copy the data once, and then forward it to the user state, and finally reach the inside of the virtual machine through the virtual IO path of the data processor process.

[0035] In such a scenario, due to the characteristics of the virtual machine itself, when multiple virtual machines on the same host machine communicate internally or when virtual machines across nodes communicate, data will be copied in the host machine kernel, and multiple memory access operations will be performed, reducing efficiency; at the same time, both intra-node and inter-node IO access need to go through the DPU virtual IO path, which is costly for intra-node IO access.

[0036] Based on this, the embodiment of the present application provides a data transmission method, device, system, host device and storage medium. First, after the data packet to be forwarded enters the kernel, the data packet to be forwarded is intercepted and parsed by the data packet filter to determine the destination address information of the data packet to be forwarded. In this way, the data packet to be forwarded is not copied in the kernel state of the node, thereby reducing the occupation of the node's memory resources and improving the performance of the node. Secondly, the data packet filter matches the destination address information with the device information table for virtual machines, and when the virtual machine matches successfully, the data packet to be forwarded is stored in the shared memory, and then the target virtual machine obtains the data packet to be forwarded through the shared memory. In this way, the data packets transmitted by the virtual machines of the same node can be separated and directly transmitted by the shared memory, which simplifies the communication method between the virtual machines of the same node, improves the efficiency of data forwarding of the virtual machines of the same node, and avoids affecting the communication of the virtual machines across nodes.

[0037] The present application is further described in detail below through the accompanying drawings and specific embodiments.

[0038] In one embodiment of the present application, Figure 2 The following is a flow chart of the steps of a data transmission method provided in an embodiment of the present application. The method can be applied to any host device in the following data transmission system. Figure 2 As shown, the data transmission method may include:

[0039] S201, in response to a data packet to be forwarded entering a kernel of a host device, intercepting and parsing the data packet to be forwarded through a data packet filter to determine destination address information of the data packet to be forwarded.

[0040] It should be noted that user state and kernel state are two operating states of the operating system. A process or program in kernel state can access any data, while a process or program in user state can only access restricted resources. In an embodiment of the present application, at least one virtual machine runs in the kernel state of the host device. Based on the implementation process of the operating system, when a virtual machine inside the host device or other hosts outside the host device send a data packet to be forwarded, they first enter the kernel state of the host device.

[0041] In the embodiment of the present application, the data packet filter may refer to an extended Berkeley packet filter (eBPF), which runs in kernel state and user state as a process and can be packaged as a service for the CPU or other processing modules in the host device to call. When the data packet to be forwarded enters the kernel state of the host device, it can be intercepted by the eBPF service, and the intercepted data packet to be forwarded will not be copied in the host kernel, thereby reducing the occupation of memory resources.

[0042] Furthermore, the eBPF service parses the data packet to be forwarded, and based on the preset communication protocol for communication between virtual machines in the host device or between virtual machines across nodes, parses the data packet to be forwarded, and extracts the destination address information of the data packet to be forwarded. The destination address information may refer to the Internet Protocol (IP) information of the virtual machine or host receiving the data packet to be forwarded.

[0043] S202, performing virtual machine matching on the destination address information and the device information table through a data packet filter to determine a virtual machine matching result.

[0044] In an embodiment of the present application, the device information table is an information table maintained by a host device, including relevant information of some virtual machine devices or other virtual devices in the host device, such as the IP address information corresponding to the virtual machine.

[0045] The packet filter, i.e., the eBPF service, can further perform virtual machine matching on the destination address information extracted from the packet to be forwarded and the information in the device information table to determine the result of the virtual machine matching.

[0046] Among them, virtual machine matching can refer to the eBPF service searching the host device for a virtual machine that receives the data packet to be forwarded and is in working state and can read and write the shared memory connection normally based on the destination address information of the data packet to be forwarded. It should be understood that if the result of the virtual machine matching is successful, the virtual machine is determined, and if the result of the virtual machine matching is failed, the virtual machine is not determined.

[0047] S203, when the result of the virtual machine matching is successful, determine the target virtual machine in the host device through the data packet filter, store the data packet to be forwarded in the shared memory, and control the target virtual machine to obtain the data packet to be forwarded through the shared memory.

[0048] In the embodiment of the present application, shared memory refers to the memory space that can be directly accessed by each virtual machine, eBPF service and virtual network card. Among them, the host device includes at least one virtual machine. After each virtual machine is configured and powered on, the processing module in the host device controls the powered-on virtual machine to establish a connection with the shared memory and notifies the host device. In addition, when the connection relationship between the virtual machine and the shared memory changes, the host device is also notified.

[0049] When the result of the virtual machine matching is successful, that is, the eBPF service determines that the virtual machine that receives the data packet to be forwarded is in the host device, that is, the target virtual machine, and the target virtual machine is normally connected to the shared memory, the data packet filter can store the data packet to be forwarded in the shared memory, and the processing module in the host device, or the data packet filter notifies the target virtual machine, so that the target virtual machine reads the data packet to be forwarded in the shared memory.

[0050] It should be noted that after the configuration of the virtual machine is completed, its IP address is maintained by the host device and notified to other virtual machines in the same host device through broadcasting. Based on different specific implementations, in bridge mode, other host devices can obtain the IP address of the virtual machine in the host device; in other modes, such as NAT mode, the network of the virtual machine and the host machine are isolated. In an embodiment of the present application, the host device can be similar to the NAT mode, where a set of IP addresses of the virtual machines is maintained inside the host, and the external host accesses the virtual machines in the host device through a specific port. In this way, the external host device cannot obtain the IP address of the virtual machine in the host device, and the result after executing the virtual machine matching is failure. In other words, only virtual machines in the same node can know each other's IP addresses and transmit data packets through shared memory.

[0051] Alternatively, in some embodiments, the host device may, in some modes, notify other host devices of the IP address of its virtual machine, so that other host devices transmit data packets to it based on the known IP address of the virtual machine. In this case, the virtual machine matching result is successful, and other host devices may also send data packets to the virtual machine of the host device through shared memory.

[0052] The embodiment of the present application provides a data transmission method. First, after the data packet to be forwarded enters the kernel, the data packet to be forwarded is intercepted and parsed by the data packet filter to determine the destination address information of the data packet to be forwarded. In this way, the data packet to be forwarded is not copied in the kernel state of the node, thereby reducing the occupation of the node's memory resources and improving the performance of the node. Secondly, the data packet filter matches the destination address information with the device information table for virtual machines, and in the case of successful virtual machine matching, the data packet to be forwarded is stored in the shared memory, and then the target virtual machine obtains the data packet to be forwarded through the shared memory. In this way, the data packets transmitted by the virtual machines of the same node can be separated and directly transmitted by the shared memory, which simplifies the communication method between the virtual machines of the same node, improves the efficiency of data forwarding of the virtual machines of the same node, and avoids affecting the communication of the virtual machines across nodes.

[0053] In another embodiment of the present application, in the aforementioned step S202, before the destination address information is matched with the device information table by the data packet filter, the data transmission method may further include:

[0054] S301: For at least one virtual machine in a host device, obtain a connection status between each virtual machine and a shared memory.

[0055] In the embodiment of the present application, the host device includes at least one virtual machine. As mentioned above, after the virtual machine is started, it is necessary to establish a connection with the shared memory. Moreover, after the host device allocates the shared memory for the virtual network card, each virtual machine needs to notify the host device after connecting to the shared memory, or when the connection status between the virtual machine and the shared memory changes, so that the processing module in the host device obtains the current connection status between each virtual machine and the shared memory.

[0056] The connection status between the virtual machine and the shared memory may include active, disconnected, and unknown.

[0057] S302: assign a number and address information to each virtual machine.

[0058] In an embodiment of the present application, after the virtual machine is successfully connected to the shared memory, the processing module in the host device can assign corresponding information to it, such as a number, which can also be called an identification code (Identity Document or Identification, ID), address information (IP), connection status (Status), etc.

[0059] It should be noted that the number and address information assigned by the host device to the virtual machine do not overlap with the number and address information corresponding to the existing virtual machine. After the assignment is completed, the host device can notify other virtual machines in the host device of the address of the virtual machine by broadcasting.

[0060] S303: construct a device information table based on the connection status of each virtual machine and the shared memory, the corresponding number and the corresponding address information.

[0061] It should be noted that a piece of device information (Device Info) corresponding to each virtual machine, including the number, address information, connection status, etc., can be used as a piece of information corresponding to the virtual machine in the device information table, and the number and address information in the information are unique in the device information table.

[0062] In the embodiment of the present application, the host device internally records and maintains the device information table for recording and maintaining the internal virtual machines that need to communicate through shared memory. If a virtual machine that needs to communicate through shared memory appears in the host device, a virtual machine can be selected from the list for data transmission.

[0063] For example, when the host device includes four virtual machines, the device information table may be as shown in Table 1 below:

[0064] Table 1

[0065] serial number Address Information Connection Status 001 1.1.1.1 active 002 1.1.1.2 active 003 1.1.1.3 active 004 1.1.1.4 disconnect … … …

[0066] It can be seen that in the device information table, the number assigned to virtual machine 1 is 001, the address information is 1.1.1.1, and the connection status with the shared memory is active; the number assigned to virtual machine 2 is 002, the address information is 1.1.1.2, and the connection status with the shared memory is active; the number assigned to virtual machine 3 is 003, the address information is 1.1.1.3, and the connection status with the shared memory is active; the number assigned to virtual machine 4 is 004, the address information is 1.1.1.4, and the connection status with the shared memory is disconnected. It should be understood that other virtual machines can also be configured in the device information table, and the information corresponding to the newly configured virtual machine can be added to the device information table in accordance with the above method.

[0067] The embodiment of the present application provides a data transmission method, in which a host device assigns a number and address information to each virtual machine, determines its connection status with a shared memory, and uses it as device information data corresponding to the virtual machine, and constructs a device information table based on the device information data corresponding to all virtual machines. In this way, the host device can timely learn the current connection status of each virtual machine, and realizes the precise control of the host device over the data forwarding path.

[0068] In some embodiments, in the above step S301, obtaining the connection status between each virtual machine and the shared memory may include:

[0069] S401, sending a status query message to each virtual machine.

[0070] In an embodiment of the present application, after constructing the device information table, the processing module in the host device can also monitor the connection status between the virtual machine in the host device and the shared memory. Specifically, the host device can send a status query message to each virtual machine at a first preset time interval. The status query message may include a query instruction for querying whether the virtual machine can currently read and write the shared memory normally.

[0071] S402: Determine the connection status between each virtual machine and the shared memory based on the message reply status of each virtual machine.

[0072] In the embodiment of the present application, after the processing module in the host device sends a status query message, each virtual machine must reply to the host device based on the reply message within the second preset time. The host device can determine the connection status of each virtual machine with the shared memory based on the message reply of each virtual machine, such as whether to reply and the content of the reply message.

[0073] It should be noted that, for a virtual machine normally connected to the shared memory, if it normally sends a reply message to the host device within the second preset time and the message content is active, the host device determines that the connection status between the virtual machine and the shared memory is active.

[0074] It should also be noted that, for a virtual machine disconnected from the shared memory, a reply message can be normally sent to the host device within the second preset time, and the message content is disconnected, then the host device determines that the connection state between the virtual machine and the shared memory is disconnected. In addition, the virtual machine can generally be disconnected from the shared memory by actively initiating the virtual machine to release the association with the shared memory and actively notify the host device so that the host device changes the connection state between the virtual machine and the shared memory to disconnected.

[0075] It should also be noted that when insufficient memory resources or unexpected shutdown of the virtual machine occurs, the host device cannot send a reply message to the host device within the second preset time to feedback the connection status with the shared memory. The host device can determine that the connection status with the shared memory is unknown.

[0076] In some embodiments, the data transmission method may further include: updating the device information table based on the connection status between each virtual machine and the shared memory.

[0077] Therefore, the processing module or data packet filter in the host device determines the connection status of each virtual machine with the shared memory based on the message reply of each virtual machine, including the aforementioned active, disconnected, unknown, etc. The host device can compare the newly determined connection status of each virtual machine with the shared memory with the connection status of each virtual machine with the shared memory in the device information table. When there is a discrepancy, the connection status of the virtual machine with the shared memory in the device information table is replaced with the newly determined connection status. Alternatively, the connection status of all virtual machines with the shared memory in the device information table can be directly replaced with the newly determined connection status according to the corresponding relationship with the virtual machine.

[0078] It should also be noted that, in some other cases, such as the aforementioned, when the virtual machine actively disconnects from the shared memory and its connection state changes, the host device synchronously updates the device information table upon receiving a notification from the virtual machine.

[0079] The embodiment of the present application provides a data transmission method, wherein the host device sends a status query message to the virtual machine to achieve real-time monitoring of the connection status of each virtual machine and the shared memory. In this way, the host device can determine the connection status of the virtual machine in a timely manner, avoiding the storage of the data packet to be forwarded in the shared memory when the virtual machine cannot read or write to the shared memory, resulting in the loss of the data packet to be forwarded, thereby improving the reliability of data transmission.

[0080] In another embodiment of the present application, for the above step S202, performing virtual machine matching on the destination address information and the device information table through a data packet filter, and determining the result of the virtual machine matching may include:

[0081] S501, performing address matching on the address information in the device information table and the destination address information in sequence through a data packet filter to determine the result of the address matching.

[0082] As mentioned above, the device information table contains information such as the number, address information, and connection status corresponding to the virtual machine. In the embodiment of the present application, the eBPF service in the host device traverses the address information corresponding to each virtual machine in the device information table, and performs address matching with the destination address information in the device information table from top to bottom, that is, comparing whether there is address information consistent with the destination address information in the device information table.

[0083] It should be understood that, if the result of the address matching is successful, it is determined that the data packet to be forwarded is sent from a virtual machine in the same node to another virtual machine in the same node, and then step S502 can be further performed to determine the result of the virtual machine matching. If the result of the address matching is failed, it is determined that the data packet to be forwarded is sent across nodes, for example, other nodes send it to the virtual machine in the host device, or the virtual machine in the host device sends it to the virtual machine in other nodes, then the virtual machine matching fails, and communication is not performed through shared memory.

[0084] S502, when the result of address matching is successful, using the data packet filter to use the address information in the device information table that matches the destination address information as the address information of the target virtual machine, and obtaining the connection status between the target virtual machine and the shared memory in the device information table.

[0085] In an embodiment of the present application, further, if the result of the address matching is a successful match, the eBPF service in the host device can also determine the address information of the successful match, and the virtual machine corresponding to the address information is the target virtual machine, and according to the correspondence between the address information and the number and connection status in the device information table, read the connection status between the target virtual machine and the shared memory in the device information table, and determine whether the connection status is active.

[0086] S503, based on the address matching result and the connection status between the target virtual machine and the shared memory, determine the virtual machine matching result through the data packet filter.

[0087] In an embodiment of the present application, the eBPF service in the host device can perform address matching based on the aforementioned steps, and determine the result of the virtual machine matching based on the result of the address matching. Exemplarily, as mentioned above, when the result of the address matching is successful, and the connection status between the target virtual machine and the shared memory is active, it is considered that the destination address of the data packet to be forwarded is the target virtual machine on the same node, and can communicate through the shared memory, then the result of the virtual machine matching is successful, and the data packet to be forwarded is copied and stored in the shared memory.

[0088] Alternatively, when the result of address matching is successful, and the connection status between the target virtual machine and the shared memory is not active, such as disconnected or unknown, it is considered that the communication between the target virtual machine and the shared memory is abnormal, and the result of virtual machine matching is determined to be a failure; or, when the result of address matching is a failure, the target virtual machine in the device status table cannot be determined, and the result of virtual machine matching can also be determined to be a failure. When the result of virtual machine matching is a failure, the data packet to be forwarded is no longer separated and entered into the shared memory, but based on the process in the following embodiment, the kernel state is entered to copy the data and then forward it.

[0089] The embodiment of the present application provides a data transmission method, in which a data packet filter matches the address information in the device information table with the destination address information, and determines the connection status of the matching target virtual machine and the shared memory after the match is successful. In this way, the data packet to be forwarded is stored in the shared memory only when and only when the target virtual machine is connected to the shared memory normally, so as to avoid the target virtual machine being unable to read normally after being stored in the shared memory, resulting in the loss of the data packet to be forwarded, thereby improving the accuracy and reliability of data transmission.

[0090] In another embodiment of the present application, in the above step S203, controlling the target virtual machine to obtain the data packet to be forwarded through the shared memory may include:

[0091] S601: Send a notification message to a target virtual machine.

[0092] In an embodiment of the present application, after the eBPF service in the host device stores the data packet to be forwarded in the shared memory, a notification message may be sent to the target virtual machine. Exemplarily, the notification message may include address information of the data packet to be forwarded in the shared memory.

[0093] S602 , in response to the notification message, read the shared memory through the target virtual machine to obtain the data packet to be forwarded.

[0094] In an embodiment of the present application, after receiving the notification message, the target virtual machine parses the notification message to obtain the address information of the data packet to be forwarded in the shared memory, and reads the data packet to be forwarded in the shared memory based on the address information.

[0095] It should be understood that in order to avoid occupying the shared memory, after the target virtual machine has finished reading the data packet to be forwarded, the data packet to be forwarded in the shared memory may be deleted.

[0096] The embodiment of the present application provides a data transmission method, wherein after the target virtual machine stores the data packet to be forwarded in the shared memory, the target virtual machine sends a notification message to the target virtual machine so that the target virtual machine reads the data packet to be forwarded in the shared memory. In this way, the target virtual machine can correctly and timely obtain the data packet to be forwarded in the shared memory, thereby ensuring the timeliness of data transmission.

[0097] In another embodiment of the present application, when the result of the virtual machine matching is failure, the data transmission method may further include:

[0098] S701, sending the data packet to be forwarded to the data processor.

[0099] In the embodiment of the present application, the data processor may refer to a DPU service, which can send the data packet to be forwarded to the data processor for processing by the data packet filter (eBPF service) when the result of the virtual machine matching fails, that is, when the data packet to be forwarded is not data forwarded between virtual machines in the same node. The data processor may be a service running in user mode.

[0100] S702, storing the data packet to be forwarded in the forwarding memory through the data processor.

[0101] It should be noted that the host device allocates two direct memory access (DMA) memories for the virtual network card, which are used for cross-node access, namely forwarding memory, and same-node access, namely shared memory.

[0102] The data processor stores the data in the forwarding memory, and further notifies the virtual network card to read the data packet to be forwarded in the forwarding memory and send it to the target virtual machine.

[0103] S703, reading the data packet to be forwarded in the forwarding memory through the virtual network card, and sending the data packet to be forwarded to the corresponding virtual machine based on the destination address information of the data packet to be forwarded.

[0104] It should also be noted that the data processor can extract the destination address information in the data packet to be forwarded and notify the virtual network card of the destination address information; or the virtual network card directly obtains the destination address information. As mentioned above, the destination address information may be a virtual machine in the same node that is not connected to the shared memory, or a virtual machine across nodes, or a virtual machine whose source node is a virtual machine across nodes.

[0105] Furthermore, the virtual network card sends the destination address information to the corresponding virtual machine or node based on the acquired destination address information.

[0106] The embodiment of the present application provides a data transmission method, when the virtual machine matching fails, the data processor forwards the data packet to be forwarded to the target virtual machine through the virtual network card based on the forwarding memory. In this way, it can ensure that all the data packets to be forwarded in the host device can be forwarded in time, and the fault tolerance of the method is improved.

[0107] In another embodiment of the present application, the data transmission method may further include:

[0108] S801, obtaining filter data traffic forwarded by a data packet filter, shared memory data traffic stored in a shared memory by a data packet filter, and forwarding memory data traffic forwarded by a data processor.

[0109] In the embodiment of the present application, the filter data flow may refer to the number of packets to be forwarded that are processed by the packet filter (eBPF service). As can be seen from the above embodiments, whether the packets to be forwarded are sent by a virtual machine on the same node or by a virtual machine across nodes, they first enter the kernel state of the host device and are intercepted and parsed by the packet filter. Therefore, the filter data flow represents the flow of all packets processed by the host device.

[0110] In an embodiment of the present application, shared memory data traffic may refer to the number of data packets to be forwarded stored in the shared memory by the data packet filter when the virtual machine matches successfully, that is, the sum of the number of data packets to be forwarded read by all virtual machines in the host device through the shared memory.

[0111] In an embodiment of the present application, forwarding memory data traffic may refer to the number of data packets to be forwarded that are processed by a data processor (DPU service) and forwarded to a target virtual machine through shared memory when a virtual machine match fails.

[0112] S802, based on the filter data flow, the shared memory data flow and the forwarding memory data flow, determine whether the data flow of the host device is normal through a data consistency maintenance process.

[0113] As mentioned above, the quantitative relationship between the above three types of traffic should be: the filter data traffic is equal to the sum of the shared memory data traffic and the forwarding memory data traffic.

[0114] In an embodiment of the present application, a data consistency maintenance process is generally run in user mode. The process is used to obtain the above three types of traffic, monitor and count the three types of traffic, and based on the above quantitative relationship, ensure that no data is missed or forwarded repeatedly, thereby ensuring the data consistency and stability of the host device.

[0115] It should be noted that the data consistency maintenance process can also be used to obtain other traffic from the host device, such as data traffic entering the virtual network card, data traffic processed and forwarded by the data processor (DPU service), etc., which are not specifically limited here. Further corresponding quantitative relationships are constructed based on these traffic to ensure data consistency.

[0116] An embodiment of the present application provides a data transmission method, which monitors and counts the host device through a data consistency maintenance process to ensure that no data omission or repeated forwarding occurs, thereby ensuring the data consistency and stability of the host device.

[0117] In another embodiment of the present application, Figure 3 The following is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application. Figure 3 As shown, the data transmission device may include:

[0118] The parsing module 3001 is used for intercepting and parsing the data packet to be forwarded through a data packet filter in response to the data packet to be forwarded entering the kernel of the host device, and determining the destination address information of the data packet to be forwarded;

[0119] The determination module 3002 is used to match the destination address information with the device information table through a data packet filter to determine the result of the virtual machine matching;

[0120] The storage module 3003 is used to determine the target virtual machine in the host device through the data packet filter when the virtual machine matching result is successful, store the data packet to be forwarded in the shared memory, and control the target virtual machine to obtain the data packet to be forwarded through the shared memory.

[0121] In some embodiments, the determination module 3002 is also used to obtain the connection status of each virtual machine and the shared memory for at least one virtual machine in the host device; assign a number and address information to each virtual machine; and construct a device information table based on the connection status of each virtual machine and the shared memory, the corresponding number and the corresponding address information.

[0122] In some embodiments, the determination module 3002 is also used to send a status query message to each virtual machine; based on the message reply of each virtual machine, determine the connection status of each virtual machine with the shared memory; and based on the connection status of each virtual machine with the shared memory, update the device information table.

[0123] In some embodiments, the determination module 3002 is also used to match the address information in the device information table with the destination address information in sequence through a data packet filter to determine the result of the address matching; when the result of the address matching is successful, the address information in the device information table that matches the destination address information is used as the address information of the target virtual machine through the data packet filter, and the connection status between the target virtual machine and the shared memory in the device information table is obtained; based on the result of the address matching and the connection status between the target virtual machine and the shared memory, the result of the virtual machine matching is determined through the data packet filter.

[0124] In some embodiments, the storage module 3003 is further used to send a notification message to the target virtual machine; in response to the notification message, the target virtual machine reads the shared memory to obtain the data packet to be forwarded.

[0125] In some embodiments, the storage module 3003 is also used to send the data packets to be forwarded to the data processor; store the data packets to be forwarded in the forwarding memory through the data processor; read the data packets to be forwarded in the forwarding memory through the virtual network card, and send the data packets to be forwarded to the corresponding virtual machine based on the destination address information of the data packets to be forwarded.

[0126] In some embodiments, the determination module 3002 is also used to obtain the filter data traffic forwarded by the data packet filter, the shared memory data traffic stored by the data packet filter to the shared memory, and the forwarding memory data traffic forwarded by the data processor; based on the filter data traffic, the shared memory data traffic, and the forwarding memory data traffic, determine whether the data traffic of the host device is normal through the data consistency maintenance process.

[0127] In another embodiment of the present application, Figure 4 A schematic diagram of the structure of a host device in an embodiment of the present application Figure 1 .like Figure 4 As shown, the host device 40 includes at least one virtual machine, a packet filter 402 and a shared memory 403; wherein:

[0128] The data packet filter 402 is used to intercept and parse the data packet to be forwarded in response to the data packet to be forwarded entering the kernel of the host device 40, determine the destination address information of the data packet to be forwarded; match the destination address information with the device information table for a virtual machine, and determine the result of the virtual machine matching; and when the result of the virtual machine matching is successful, determine the target virtual machine in the host device 40, and store the data packet to be forwarded in the shared memory 403;

[0129] The virtual machine is used to read the shared memory to obtain the data packet to be forwarded.

[0130] Among them, Figure 4 As shown, the host device 40 includes at least one virtual machine, such as a first virtual machine 4011, a second virtual machine 4012, ..., an Nth virtual machine 4013, etc. All virtual machines are connected to a packet filter 402 and a shared memory 403, and N is a positive integer greater than or equal to 1.

[0131] As mentioned above, shared memory 403 is the fastest of many process communication methods. Data communication through shared memory 403 can achieve a significant speed-up effect. When multiple virtual machines based on DPU communicate, the transmission method is relatively complicated, relying on the DPU virtual network card of the host machine and the related processing of the kernel state. Data transmission through shared memory can significantly improve the IO access rate. Moreover, the packet filter needs to copy data through the virtual machine kernel, and does not need to go through the complex DPU virtual IO path, which reduces the resource occupation of the virtual machine on the host machine and also improves the transmission rate.

[0132] Thus, in the embodiment of the present application, by allocating shared memory to the virtual network card on the host device and deploying an independent traffic management process on the host device, the service manages all virtual machines and vDPA devices of this node. The service uses a packet filter based on eBPF technology to filter the data stream and separate the same-node data. The same-node data no longer passes through the DPU virtual IO path, but communicates directly through the shared memory on the host machine, so as to achieve the effect of accelerating the communication rate of the same-node virtual machines.

[0133] In some embodiments, Figure 5 A schematic diagram of the structure of a host device provided in an embodiment of the present application Figure 2 .like Figure 5 As shown, the host device also includes a data processor 404, a forwarding memory 405 and a virtual network card 406; wherein:

[0134] The data processor 404 is used to receive and store the data packet to be forwarded into the forwarding memory when the result of the virtual machine matching is failure;

[0135] The virtual network card 406 is used to read the data packet to be forwarded in the forwarding memory 405, and send the data packet to be forwarded to the corresponding virtual machine based on the destination address information of the data packet to be forwarded.

[0136] The forwarding memory 405 is connected to the data processor 404 and the virtual network card 406 respectively, and the virtual network card 406 is connected to at least one virtual machine respectively.

[0137] It should also be noted that the host device 40 can be used to execute any of the methods provided in the above embodiments, and the two belong to the same inventive concept. Therefore, the host device 40 can also include any other possible elements, units or devices to respectively execute any steps in the above methods, so that the host device 40 can achieve corresponding functions.

[0138] The embodiment of the present application provides a host device, which will effectively improve the existing technical solution, which has the problem of large memory usage and slow data communication speed caused by data copying in kernel state. At the same time, by separating the data packets on the virtual network card and monitoring their direction, the data transmission rate between virtual machines on the same node is effectively improved, while ensuring data consistency.

[0139] In another embodiment of the present application, Figure 6 A schematic diagram of the structure of a data transmission system provided in an embodiment of the present application. Figure 6 As shown, the data transmission system 50 includes at least one host device in the aforementioned embodiments; wherein: the host device is used to execute the method in the aforementioned embodiments.

[0140] like Figure 6 As shown, in at least one host device, each host device is connected to the remaining host devices in communication. For example, the first host device 501 is connected to the second host device 502 to the Mth host device 503 in communication. Wherein, M is a positive integer greater than or equal to 1.

[0141] In the embodiment of the present application, the host device deploys a management service on the host machine, realizes kernel-state data separation through eBPF technology, screens out data transmitted by virtual machines within the same host machine, allocates shared memory for the virtual network card, and virtual machines on the same node no longer go through the DPU virtual IO path, but directly communicate through shared memory. This changes the communication mode of virtual machines on the same node, speeds up the communication rate, and does not interfere with cross-node virtual machine communication, thereby effectively improving the IO access rate of virtual machines on the same node, and also improving the overall network communication rate of the system.

[0142] The embodiment of the present application provides a data transmission system, in which the communication between virtual machines in the same node in the system no longer passes through the DPU virtual IO path, but performs IO access through shared memory. The system allocates two DMA memories to the virtual network card in each host device, which are used for cross-node access and same-node access respectively, and the memory accessed by the same node is shared memory. The host deploys a management process, filters out the same-node data, and transmits it directly through shared memory, so as to improve the IO access rate of the same node.

[0143] In another embodiment of the present application, Figure 7 The following is a schematic diagram of the execution flow of a data transmission system provided in an embodiment of the present application. Figure 7 As shown, in order to achieve the purpose of improving the communication rate of virtual machines in the same node, an IO path management process and a DPU traffic monitoring device are designed. The details are as follows:

[0144] First, the host IO path management process. In order to manage the DPU virtual machines on the same node and ensure that they can communicate through shared memory, an IO path management process on the host is designed to manage the connection between all DPU virtual machines on this node and the shared memory, and to separate the data traffic of this node, so that it no longer passes through the DPU virtual IO path, but directly communicates through shared memory. The traffic management process has the following mechanisms:

[0145] (1) Device information (Device Info) marking mechanism. When a virtual machine successfully connects to the shared memory, it is assigned device information (Device Info), including the number (ID), address information (IP) and connection status (Status) information. Each Device Info exists uniquely in a host. The host records this device information table (Info list) internally to record and maintain the virtual machines that need to communicate through shared memory. After the host allocates shared memory for the virtual network card, each virtual machine must notify the host when connecting to this shared memory. At this time, the host records the device information of the virtual machine, indicating that the virtual machine has been connected to the shared memory. If a virtual machine that needs to communicate through shared memory appears later, only one virtual machine is selected from the list for data transmission.

[0146] While recording device information, the host also monitors their status. The status here specifically refers to whether the shared memory can be read and written normally. The host records a status value based on the connection status of each host device and the shared memory. The recording logic is:

[0147] For VMs that are normally connected to the shared memory, the host records the Device Info and sets its status to active.

[0148] For disconnected virtual machines (usually the virtual machines themselves actively initiate the disassociation with shared memory), the host marks their status as disconnected (inactive);

[0149] When insufficient memory resources or unexpected shutdown of a virtual machine occurs, and the host cannot receive feedback on the shared memory status of the connection from the virtual machine within the timeout period, the host marks its status as unknown.

[0150] (2) Communication retrieval mechanism. Based on the above Device Info marking mechanism, the corresponding address of the virtual machine and the status of the connection shared memory can be found. The communication retrieval algorithm of this application is as follows:

[0151] Traverse the Device Info list, such as the information in Table 1 above, match the destination address information (destIP, DIP) in the data packet with the address information in the list (Device IP). If there is no match, it is considered that the data packet is sent to a cross-node virtual machine and does not communicate through shared memory.

[0152] After matching the IP, determine whether the shared memory connection status corresponding to the IP is active.

[0153] If the status is active, it is considered that the destination address of this data packet is a virtual machine on the same node and can communicate through shared memory, and the data packet will be copied to the shared memory;

[0154] If the status is not active, it is considered that the communication between the node and the shared memory is abnormal. At this time, the data packet is no longer separated and entered into the shared memory. Instead, the kernel state is entered to copy the data according to the previous process and then forwarded.

[0155] (3) eBPF packet separation mechanism. Figure 7 As shown, in order to reduce kernel-state data copying, this application designs an eBPF data packet separation mechanism. Figure 7 In the description, the data transmission system 50 includes a first host device 501 and a second host device 502, and the first host device includes a shared memory 403, a first virtual machine 4011 and a second virtual machine 4012 connected to the shared memory 403, a data packet filter 402 connected to the shared memory 403, and a data processor 404 connected to the data packet filter 402; the second host device 502 includes a third virtual machine 4014 and a fourth virtual machine 4015. It should be understood that Figure 7 The internal structures of the first host device 501 and the second host device 502 are simplified. The complete internal structures can be found in the foregoing embodiments. Figure 5 .

[0156] When a data packet enters the host kernel, it is intercepted and parsed by the data packet filter 402 (eBPF service). Based on the communication retrieval algorithm mentioned above, the IP is searched and matched. If the virtual machine corresponding to the destination address DIP of the data packet is in the current host, the data is placed in the shared memory 403 and read by the target virtual machine, that is, the first virtual machine 4011 and the second virtual machine 4012; if DIP is not in the current host, the original process is entered, the kernel copies and forwards the data, and then enters the user state, enters the data processor (DPU) 404 to process and forward it to the third virtual machine 4014 or the fourth virtual machine 4015. The specific algorithm process is as follows:

[0157] When data enters the host, the data packet filter 402 determines whether the data packet is same-node data. If it is same-node data, it traverses the information in the Device Info list according to the communication retrieval algorithm and matches the DIP in the data packet with the Device IP in the list in sequence.

[0158] If a matching IP is successfully found, the data is stored in shared memory 403. The target virtual machine can read the 403 data in the shared memory to complete the communication.

[0159] If the match fails, it may be a cross-node virtual machine, or the virtual machine on the same node is not normally connected to the shared memory 403. At this time, the data packet is transmitted according to the virtual IO path of the normal data processor 404, and the data packet filter 402 does not need to separate the data packet.

[0160] The cross-border point data is processed by the data processor 404 and then forwarded to other external nodes.

[0161] Secondly, the present application also sets up a data consistency maintenance process as a monitoring device, which monitors and counts the data flow entering the virtual network card, the data flow forwarded on the shared memory, the data flow passing through the DPU virtual IO path, the filter data flow forwarded by the packet filter, the shared memory data flow forwarded by the shared memory, and the forwarded memory data flow forwarded by the data processor, etc., to ensure that no data omission or repeated data forwarding occurs, and to ensure that in the event of an abnormality in the shared memory, the DPU IO path can still operate normally and the entire network link will not be interrupted, thereby ensuring data consistency and stability within the entire system.

[0162] The present application provides a data transmission system, in which the host device includes an IO path management process, which can separate the same-node data through the eBPF technology and establish a shared memory communication channel for the same-node DPU virtual machine, so that the same-node traffic no longer needs to pass through the DPU virtual IO path, simplifying the communication method. Inside the management process, the virtual machine and shared memory of this node are managed through the device information table marking mechanism and the communication retrieval mechanism; through the eBPF data packet separation mechanism, the data traffic of the same node is filtered out, and communication is carried out directly through the shared memory without DPU processing. The host device also includes a data consistency maintenance process, through which the total data traffic on the virtual network card, the data traffic entering the shared memory, and the data traffic passing through the DPU virtual IO path can be monitored.

[0163] It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.

[0164] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0165] Therefore, this embodiment provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by at least one processor, the steps of the method described in any one of the above embodiments are implemented.

[0166] The above is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0167] An embodiment of the present application also provides a computer program product comprising instructions, including a computer program or instructions, which, when executed by a processor, implements the steps in the method provided in the above method embodiment.

[0168] It should be understood that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0169] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0170] It should also be noted that in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0171] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0172] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0173] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0174] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0176] The above is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A data transmission method, characterized in that: The data transmission method comprises: In response to a data packet to be forwarded entering a kernel of a host device, intercepting and parsing the data packet to be forwarded through a data packet filter to determine destination address information of the data packet to be forwarded; Performing virtual machine matching on the destination address information and the device information table through the data packet filter, and determining the result of the virtual machine matching; When the virtual machine matching result is successful, the target virtual machine in the host device is determined through the data packet filter, the data packet to be forwarded is stored in the shared memory, and the target virtual machine is controlled to obtain the data packet to be forwarded through the shared memory.

2. The data transmission method according to claim 1, characterized in that: Before the destination address information is matched with the device information table by the data packet filter, the data transmission method further includes: For at least one virtual machine in the host device, obtaining a connection status between each of the virtual machines and the shared memory; Assigning a number and address information to each of the virtual machines; The device information table is constructed based on the connection status, corresponding number and corresponding address information of each of the virtual machines and the shared memory.

3. The data transmission method according to claim 2, characterized in that: The obtaining of the connection status between each of the virtual machines and the shared memory includes: Sending a status query message to each of the virtual machines; Determine the connection status between each virtual machine and the shared memory based on the message reply status of each virtual machine; The data transmission method further comprises: The device information table is updated based on the connection status between each of the virtual machines and the shared memory.

4. The data transmission method according to claim 1, characterized in that: The step of performing virtual machine matching on the destination address information and the device information table through the data packet filter to determine the result of the virtual machine matching includes: Performing address matching on the address information in the device information table and the destination address information in sequence through the data packet filter to determine the result of the address matching; If the result of the address matching is successful, using the data packet filter to take the address information in the device information table that matches the destination address information as the address information of the target virtual machine, and obtaining the connection status between the target virtual machine and the shared memory in the device information table; Based on the result of the address matching and the connection status between the target virtual machine and the shared memory, the result of the virtual machine matching is determined through the data packet filter.

5. The data transmission method according to claim 1, characterized in that: The controlling the target virtual machine to obtain the to-be-forwarded data packet through the shared memory includes: Sending a notification message to the target virtual machine; In response to the notification message, the shared memory is read through the target virtual machine to obtain the data packet to be forwarded.

6. The data transmission method according to any one of claims 1 to 5, characterized in that: When the result of the virtual machine matching is failure, the data transmission method further includes: Sending the data packet to be forwarded to a data processor; The data processor stores the data packet to be forwarded in a forwarding memory; The data packet to be forwarded in the forwarding memory is read through the virtual network card, and the data packet to be forwarded is sent to the corresponding virtual machine based on the destination address information of the data packet to be forwarded.

7. The data transmission method according to claim 6, characterized in that: The data transmission method further comprises: Acquire filter data traffic forwarded by the data packet filter, shared memory data traffic stored by the data packet filter to the shared memory, and forwarded memory data traffic forwarded by the data processor; Based on the filter data traffic, the shared memory data traffic and the forwarding memory data traffic, it is determined whether the data traffic of the host device is normal through a data consistency maintenance process.

8. A data transmission device, characterized in that: The data transmission device comprises: A parsing module, configured to intercept and parse the data packet to be forwarded through a data packet filter in response to the data packet to be forwarded entering the kernel of the host device, and determine the destination address information of the data packet to be forwarded; A determination module, configured to perform virtual machine matching on the destination address information and the device information table through the data packet filter, and determine a result of the virtual machine matching; The storage module is used to determine the target virtual machine in the host device through the data packet filter when the result of the virtual machine matching is successful, store the data packet to be forwarded in the shared memory, and control the target virtual machine to obtain the data packet to be forwarded through the shared memory.

9. A host device, characterized in that: The host device includes at least one virtual machine, a data packet filter and a shared memory; wherein: The data packet filter is used to intercept and parse the data packet to be forwarded in response to the data packet to be forwarded entering the kernel of the host device, determine the destination address information of the data packet to be forwarded; perform virtual machine matching on the destination address information and the device information table to determine the result of the virtual machine matching; and if the result of the virtual machine matching is successful, determine the target virtual machine in the host device, and store the data packet to be forwarded in the shared memory; The virtual machine is used to read the shared memory to obtain the data packet to be forwarded.

10. The host device according to claim 9, characterized in that: The host device also includes a data processor, a forwarding memory and a virtual network card; wherein: The data processor is used for receiving and storing the to-be-forwarded data packet in a forwarding memory when the result of the virtual machine matching is failure; The virtual network card is used to read the data packet to be forwarded in the forwarding memory, and send the data packet to be forwarded to the corresponding virtual machine based on the destination address information of the data packet to be forwarded.

11. A data transmission system, characterized in that: The data transmission system comprises at least one host device as claimed in claim 9 or 10; wherein: The host device is used to execute the data transmission method according to any one of claims 1 to 7.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Virtual machine data transmission method and device based on eBPF, equipment and storage medium

    CN115589383A

  • Signaling processing method, system and device and storage medium

    CN118301562A

  • Network flow management

    US11140132B1

  • Scalable evolved packet core

    WO2018152386A1