Method, device, equipment, storage medium and program for transmitting virtual data packet

By adding a private field for remote direct data access and dynamically generating a global identifier to the communication port of the virtual switch, the problem that the virtual switch cannot support the RDMA protocol is solved, and efficient data transmission and network management optimization are achieved.

CN121396927BActive Publication Date: 2026-03-31JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing OVS virtual switches cannot directly support the high-performance features of the RDMA protocol, preventing virtual machines from utilizing the high-performance features of RDMA technology.

Method used

Add a private field for remote direct data access functionality to the communication port structure field of the virtual switch. Use dynamic generation of global identifiers and intelligent algorithms to determine the transmission path of data packets to support efficient transmission of the RDMA protocol.

Benefits of technology

It enables native support of the RDMA protocol for virtual switches, reduces network latency, increases data transmission throughput, reduces the configuration and management burden on network administrators, and improves the efficiency of data center network operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396927B_ABST
    Figure CN121396927B_ABST
Patent Text Reader

Abstract

The application discloses a virtual data packet transmission method, device, equipment, storage medium and program, and relates to the technical field of computers, and comprises the following steps: determining a plurality of communication ports on a virtual interaction machine for supporting communication with an external network; performing extension processing on a structure field corresponding to the plurality of communication ports to obtain an extended structure field, and determining a global identifier corresponding to each communication port according to layered address information corresponding to the virtual interaction machine, wherein the extension processing is adding a private field corresponding to a remote direct data access function in the structure field; in the case that the virtual interaction machine receives a virtual data packet to be stored through a virtual machine through a network interface, analyzing a packet header of the virtual data packet through the extended structure field; determining whether to perform conversion processing on the virtual data packet according to the analysis result, and performing transmission of target data corresponding to the virtual data packet according to a mapping relationship between the plurality of communication ports and a physical storage device and the global identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, device, storage medium, and program for transmitting virtual data packets. Background Technology

[0002] With the rapid development of cloud computing and data center technologies, virtualized networks have become a core infrastructure of modern data centers. OpenvSwitch (OVS), as a switch in Software Defined Networking (SDN), carries the traffic forwarding tasks for a large number of virtual machines in the data center. Meanwhile, with the continuous growth of high-performance computing and storage demands, Remote Direct Memory Access (RDMA) technology, due to its low latency and high throughput characteristics, is widely used in high-performance network applications.

[0003] However, existing OVS virtual switches are mainly based on the traditional Transmission Control Protocol / Internet Protocol (TCP / IP) stack, which cannot directly support the high-performance features of the RDMA protocol. In addition, virtual machines cannot directly utilize the high-performance features of RDMA technology.

[0004] There is currently no effective solution to the problem that virtual switches cannot support remote direct data access in related technologies. Summary of the Invention

[0005] This application provides a method, apparatus, device, storage medium, and program for transmitting virtual data packets, to at least solve the problem in related technologies that virtual switches cannot support remote direct data access functionality.

[0006] According to one embodiment of this application, a method for transmitting virtual data packets is provided, comprising: determining multiple communication ports on a virtual interactive machine for supporting communication with an external network; extending the structure fields corresponding to the multiple communication ports to obtain extended structure fields, and determining a global identifier corresponding to each communication port according to the hierarchical address information corresponding to the virtual interactive machine, wherein the extension process involves adding a private field corresponding to a remote direct data access function to the structure fields; when the virtual interactive machine receives a virtual data packet to be transferred through a virtual machine via a network interface, parsing the header of the virtual data packet through the extended structure fields; determining whether to perform conversion processing on the virtual data packet based on the parsing result, and transmitting the target data corresponding to the virtual data packet according to the conversion result, the mapping relationship between the multiple communication ports and physical storage devices, and the global identifier.

[0007] According to another embodiment of this application, a virtual data packet transmission device is provided, comprising: a determining module, configured to determine multiple communication ports on a virtual interactive machine for supporting communication with an external network; a processing module, configured to extend the structure fields corresponding to the multiple communication ports to obtain extended structure fields, and determine a global identifier corresponding to each communication port according to the hierarchical address information corresponding to the virtual interactive machine, wherein the extension processing involves adding a private field corresponding to a remote direct data access function to the structure fields; a parsing module, configured to parse the header of the virtual data packet through the extended structure fields when the virtual interactive machine receives a virtual data packet to be transferred through a virtual machine via a network interface; and a transmission module, configured to determine whether to perform conversion processing on the virtual data packet based on the parsing result, and transmit the target data corresponding to the virtual data packet according to the conversion result, the mapping relationship between the multiple communication ports and physical storage devices, and the global identifier.

[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0009] According to yet another embodiment of this application, an electronic device is also 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 perform the steps in any of the above method embodiments.

[0010] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0011] This application identifies all virtual ports participating in external network communication based on the configuration and operational status of the virtual interactive machine. These ports serve as the entry and exit points for data transmission and must be capable of processing RDMA data packets. Private fields specifically designed to support RDMA functionality are added to the structure fields of each communication port. These fields include at least key information from the RDMA protocol, such as subnet prefix, interface identifier, service level, and Quality of Service (QoS) parameters, to ensure correct data packet parsing and efficient transmission. The Global Identifier (GID) for each communication port is generated using a dynamic identification algorithm based on hierarchical address information, including the unique ID (Identity Document) of the data center where the virtual interactive machine resides, the virtual LAN identifier, the Media Access Control Address (MAC) address, the port ID, and the timestamp. The GID serves as the unique identifier for RDMA communication, ensuring the uniqueness and security of data packet routing. When the virtual interactive machine receives virtual data packets to be transferred through the virtual machine via the network interface, it uses the RDMA-related information in the extended structure fields to parse the header of the virtual data packet and extract key transmission information, including the target GID. Based on the parsing results, it is determined whether virtual data packets need to be converted into physical RDMA data packets. If the target of the data packet is an RDMA-compatible device, conversion processing will be performed to ensure efficient data transmission via the RDMA protocol. Based on the conversion results, the mapping relationship between multiple communication ports and physical storage devices, and global identifiers, an intelligent algorithm determines the optimal transmission path. This solves the problem in related technologies where virtual switches cannot support remote direct data access. Furthermore, by natively supporting the RDMA protocol, network latency is significantly reduced, and data transmission throughput is improved. Moreover, the seamless integration of the virtual switch with external RDMA networks reduces the configuration and management burden on network administrators, improving the efficiency and convenience of data center network operation and maintenance. Attached Figure Description

[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of an application environment for a virtual data packet transmission method according to an embodiment of this application;

[0014] Figure 2This is a flowchart of a virtual data packet transmission method according to an embodiment of this application;

[0015] Figure 3 This is a schematic diagram of the layered architecture of a virtualized network system according to an embodiment of this application;

[0016] Figure 4 This is a schematic diagram of the data flow according to an embodiment of this application;

[0017] Figure 5 This is a schematic diagram defining the extended data structure according to an embodiment of this application;

[0018] Figure 6 This is a flowchart of a global identifier generation algorithm according to an embodiment of this application;

[0019] Figure 7 This is a schematic diagram of the global identifier management data structure according to an embodiment of this application;

[0020] Figure 8 This is a schematic diagram of the device discovery and registration process according to an embodiment of this application;

[0021] Figure 9 This is a schematic diagram illustrating the selection of a multi-factor intelligent mapping algorithm according to an embodiment of this application;

[0022] Figure 10 This is a schematic diagram of a data packet processing pipeline according to an embodiment of this application;

[0023] Figure 11 This is a schematic diagram of zero-copy optimization according to an embodiment of this application;

[0024] Figure 12 This is a schematic diagram of batch processing according to an embodiment of this application;

[0025] Figure 13 This is a schematic diagram of a multi-level fault detection structure according to an embodiment of this application;

[0026] Figure 14 This is a schematic diagram of the fault recovery process according to an embodiment of this application;

[0027] Figure 15 This is a structural block diagram of a virtual data packet transmission apparatus according to an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0029] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0030] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0031] As an optional implementation, the method embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, the application will be described below with reference to embodiments:

[0032] According to one aspect of the embodiments of this application, a method for transmitting virtual data packets is provided. Optionally, in this embodiment, the above-described method for transmitting virtual data packets can be applied to, for example... Figure 1 The hardware environment shown consists of physical storage device 101 and server 103 where the virtual interactive machine is located. Figure 1 This is a schematic diagram of an application environment for a virtual data packet transmission method according to an embodiment of this application, such as... Figure 1As shown, the physical storage device 101 is connected to the server 103 where the virtual interactive machine is located via a network. It can be used to provide services to the server 103 or the application 107 installed on the server 103. The application 107 can be an application for virtual data packet transmission, etc. A database 105 can be set up on or independently of the physical storage device 101 to provide data storage services for the physical storage device 101. For example, it can be a data packet storage server or an environmental data storage server. The network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication. The server 103 where the virtual interactive machine is located can be a terminal configured with an application, including but not limited to a server terminal. The physical storage device 101 can be a single physical storage device or a storage cluster composed of multiple physical storage devices. The application 107 using the virtual data packet transmission method is displayed through the server 103 or other connected display devices.

[0033] Combination Figure 1 As shown, the above-mentioned method for transmitting virtual data packets can be implemented on server 103 where the virtual interactive machine is located, through methods such as... Figure 2 Steps S202-S208 are implemented as follows:

[0034] Optionally, in this embodiment, the above-described method for transmitting virtual data packets can also be implemented via a server, for example, Figure 1 It can be implemented in the virtual interactive machine shown; or it can be implemented by the virtual interactive machine and the server together.

[0035] The above is merely an example, and this embodiment does not impose any specific limitations.

[0036] This embodiment provides a method for transmitting virtual data packets. Figure 2 This is a flowchart of a virtual data packet transmission method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0037] Step S202: Determine the multiple communication ports on the virtual interactive machine used to support communication with external networks;

[0038] Step S204: Extend the structure fields corresponding to the multiple communication ports to obtain extended structure fields, and determine the global identifier corresponding to each communication port according to the hierarchical address information corresponding to the virtual interactive machine. The extension process is to add a private field corresponding to the remote direct data access function to the structure fields.

[0039] Optionally, the extended fields adopt a hierarchical structure, including a first subfield corresponding to the basic attributes, a second subfield corresponding to the remote direct data access - global identifier attribute, a third subfield corresponding to the quality of service (QoS) and routing attributes, and a fourth subfield corresponding to the physical device mapping information.

[0040] Step S206: When the virtual interactive machine receives the virtual data packet to be transferred through the virtual machine via the network interface, the header of the virtual data packet is parsed through the extended structure field;

[0041] Step S208: Determine whether to perform conversion processing on the virtual data packet based on the parsing result, and transmit the target data corresponding to the virtual data packet based on the conversion result, the mapping relationship between the multiple communication ports and the physical storage device, and the global identifier.

[0042] Using the methods described above, all virtual ports participating in external network communication are determined based on the configuration and operational status of the virtual interactive machine. These ports serve as the entry and exit points for data transmission and need to be capable of processing remote direct data access (RDA) packets. Private fields specifically designed to support RDA functionality are added to the structure fields of each communication port. These fields include at least key information from the RDA protocol, such as subnet prefix, interface identifier, service level, and QoS parameters, to ensure correct packet parsing and efficient transmission. The global identifier for each communication port is generated using a dynamic identification algorithm based on hierarchical address information such as the data center ID, virtual LAN identifier, MAC address, port ID, and timestamp of the virtual interactive machine. This global identifier serves as a unique identifier for RDA communication, ensuring the routing uniqueness and security of data packets. When the virtual interactive machine receives a virtual data packet to be transferred through the virtual machine via the network interface, it uses the RDA-related information in the extended structure fields to parse the header of the virtual data packet, extracting key transmission information, including the target global identifier. Based on the parsing results, it determines whether the virtual data packet needs to be converted into a physical RDA data packet. If the data packet's destination is a Remote Direct Data Access (RDD) compatible device, a conversion process will be performed to ensure efficient data transmission via the RDD protocol. Based on the conversion result, the mapping relationship between multiple communication ports and physical storage devices, and global identifiers, an intelligent algorithm determines the optimal transmission path. This solves the problem of virtual switches not supporting RDD functionality in related technologies. Furthermore, by natively supporting the RDD protocol, network latency is significantly reduced, and data transmission throughput is improved. Moreover, seamless integration of the virtual switch with external RDD networks reduces the configuration and management burden on network administrators, improving the efficiency and convenience of data center network operation and maintenance.

[0043] In one exemplary embodiment, determining the global identifier corresponding to each communication port based on the hierarchical address information corresponding to the virtual interactive machine includes: when it is determined that the structure field in the communication port is updated using an extended structure field, extracting multiple address parameters from the hierarchical address information, wherein the multiple address parameters include at least: the local area code of the virtual local area network where the virtual interactive machine is located, the local area network address corresponding to the virtual interactive machine, and the center code corresponding to the data center associated with the virtual machine; and calculating and processing the multiple address parameters using a dynamic identification algorithm to obtain the global identifier corresponding to each communication port in the virtual interactive machine.

[0044] In an exemplary embodiment, a global identifier corresponding to each communication port in the virtual interactive machine is obtained by calculating and processing multiple address parameters through a dynamic identification algorithm. This includes: substituting the local area code, local area network address, and center code into the first-order operation formula to obtain the subnet prefix corresponding to the virtual interactive machine. The first-order operation formula is used to perform a bitwise OR operation on the center code shifted left by 48 bits, the local area code shifted left by 32 bits, and the subnet mask of the local area network address, i.e.: (center code << 48) | (local area code << 32) | subnet mask of the local area network address, where (center code << 48) represents shifting the center code left by 48 bits, and (local area code << 32) represents shifting the local area code left by 32 bits; obtaining the port code of the communication port and the call timestamp of the communication port corresponding to the port code; performing a hash calculation on the port code, local area network address, and call timestamp to obtain the interface identifier; and summing the subnet prefix and interface identifier to determine the global identifier.

[0045] Understandably, in virtualization and cloud computing infrastructures, network communication typically needs to occur at different network layers, including the data center level, the Virtual Local Area Network (VLAN) level, and the Virtual Machine (VM) level. Layered address information refers to a data structure containing information such as data center code, VLAN code, and LAN address; this information together constitutes a virtual machine's location identifier within the network. A global identifier is a unique identifier used to identify a communication endpoint in a Remote Direct Memory Access (RDA) network. In RDA technologies such as InfiniBand and Remote Direct Memory Access over Converged Ethernet (RoCE), global identifiers guide how data packets are correctly routed and delivered to their destination endpoint within the network.

[0046] Optionally, the dynamic global identifier generation mechanism is as follows:

[0047] Step S1: Identify the address parameters in the virtualization environment. Virtual LAN Local Area Code: This is the unique identifier of the virtual LAN where the virtual switch resides, used to distinguish different network isolation areas. Virtual Switch Local Area Address: The IP address or MAC address of the virtual switch within the LAN, serving as its identity identifier in the network. Data Center Code: The code of the data center within the overall network architecture, used to distinguish different data centers or network clusters. By extracting these address parameters, the specific location and identity of each communication port at the network layer can be identified.

[0048] Step S2: Apply a dynamic identifier algorithm for calculation. This algorithm is specifically designed for virtualization environments and can dynamically generate a global identifier based on real-time network status and virtual machine configuration. The algorithm considers the address information of the data center, VLANs, and virtual machines, ensuring that the generated global identifier conforms to the specifications of remote direct data access networks while adapting to the dynamic and complex nature of the virtualization environment. The calculation process of the dynamic identifier algorithm may include: shifting the data center code left by 48 bits and the VLAN code left by 32 bits, then performing a bitwise OR operation with the subnet mask of the LAN address to obtain the subnet prefix. Performing a hash operation on the MAC address, port number, and current timestamp of the virtual switch communication port to generate a random and unique interface identifier. Concatenating the subnet prefix and the interface identifier to form the final global identifier.

[0049] Step S3: Update the extended structure field. The extended structure field is a private field related to remote direct data access added to the data structure of the communication port. It is used to store the remote direct data access context information of the communication port, including global identifiers, service levels, and quality of service (QoS) parameters. The update process is as follows: after the dynamic identification algorithm calculates the global identifier for each communication port, it stores this global identifier information in the extended structure field and binds it to the communication port.

[0050] The above steps enable the dynamic generation of global identifiers for each communication port of the virtual switch. These global identifiers not only comply with the Remote Direct Data Access (RDA) network protocol but also adapt to rapid changes in network configuration within the virtualization environment, ensuring correct routing and efficient transmission of data packets. This avoids the tediousness and errors of manually configuring global identifiers, while also improving network resource utilization and management efficiency.

[0051] In an exemplary embodiment, after determining the global identifier by summarizing the subnet prefix and interface identifier, the method further includes: obtaining the global identifier allocation table corresponding to the virtual interactive machine; matching the global identifier with other global identifiers in the global identifier allocation table; determining whether there is an identifier conflict based on the matching result; and, if there is an identifier conflict, reducing the target number of bits in the interface identifier of the global identifier.

[0052] Optionally, a database or data structure that tracks and manages all generated global identifiers can be used through a global identifier allocation table to ensure that there are no duplicate global identifiers in the network. This table stores the global identifiers and their associated information for all communication ports within the data center, such as port ID, VLAN, and MAC address. It is used for global identifier allocation and conflict detection. The newly generated global identifier is then compared with all records in the global identifier allocation table to check for duplicates, ensuring that each communication port has a unique global identifier. This avoids misrouting of data packets and communication chaos in the network. When a global identifier conflict is detected, the interface identifier portion is modified, typically by reducing its random number of bits, thereby changing the final combination of global identifiers. Once the conflict is resolved, the new global identifier is registered in the global identifier allocation table, and relevant components and virtual machines are then notified to update their routing tables and configuration information to ensure uninterrupted network communication.

[0053] Through the above process, this embodiment provides a mechanism that can automatically generate global identifiers in a virtualized environment while ensuring the uniqueness of these identifiers within the network. This ensures the normal operation of the network even in a highly dynamic cloud environment and avoids communication errors caused by duplicate global identifiers.

[0054] In an exemplary embodiment, a hash calculation is performed on the port code, local area network address, and call timestamp to obtain an interface identifier, including: substituting the port code, local area network address, and call timestamp into a preset hash formula to obtain the interface identifier, wherein the preset hash formula is used to perform a hash calculation on the local area network address, port code, and call timestamp, and select the first eight bytes from the calculation result, namely SHA(local area network address + port code + call timestamp) × [0:8].

[0055] Optionally, the port code is a unique code for the communication port, used to distinguish different ports on the same virtual switch. The LAN address typically refers to the MAC address or IP address, serving as the network-level identifier for the communication port. The call timestamp represents the system timestamp when the global identifier was generated, introducing a time factor to ensure the generated global identifier has temporal randomness and uniqueness. A Secure Hash Algorithm (SHA) is used to calculate the port code, LAN address, and call timestamp. Specifically, the port code, LAN address, and call timestamp are concatenated into a continuous string, which is then passed as input to the hash function in the SHA algorithm. The SHA algorithm transforms an input of arbitrary length into a fixed-length output (hash value). It should be noted that the generated hash value may be longer than the required interface identifier, therefore a portion needs to be truncated as the interface identifier. The first 8 bytes (64 bits) of the SHA hash value, i.e., bits 0 to 63, can be used as the interface identifier. A length of 64 bits is long enough for most network applications to ensure good randomness and uniqueness of the interface identifier generated in a large-scale virtualization environment. Meanwhile, considering computational resources and performance, using the first 8 bytes of the hash value can reduce processing overhead while ensuring security and uniqueness. Through the above steps, a 64-bit hash value fragment is finally obtained, which will be used as the interface identifier for subsequent global identifier generation. The interface identifier, combined with the subnet prefix, forms the complete 128-bit global identifier.

[0056] In an exemplary embodiment, after determining the global identifier by summarizing the subnet prefix and interface identifier, the method further includes: registering the global identifier in the routing table; and, if the registration is completed, updating the data structure corresponding to the communication port and sending a prompt message to the management component indicating that the global identifier allocation is complete.

[0057] Once the subnet prefix and interface identifier are determined, and the corresponding global identifier is generated, this global identifier and its associated routing information need to be registered in the routing table. The routing table is a data structure used by network devices to determine how data packets are forwarded; it stores the global identifiers of all known endpoints in the network, their corresponding physical paths, and quality of service parameters. After completing the global identifier registration, the data structure associated with the communication port needs to be updated to reflect the current global identifier status. This typically includes the remote direct data access context information of the communication port, such as the global identifier mapping table, QoS configuration, and device mapping. Simultaneously, a signal is sent to the network management component (such as OVSDB Manager or SDN Controller) to notify that the global identifier has been successfully allocated and registered. This signal typically contains the new global identifier, the communication port ID, and other configuration information related to the global identifier.

[0058] In summary, the above process ensures that in a virtualized environment, the global identifier for each communication port is not only generated uniquely and randomly, but also correctly registered in the routing system, thereby allowing remote direct data access packets to be correctly forwarded in the network. Sending a signal to the management component indicating that the global identifier allocation is complete further promotes centralized management and automated configuration of network resources. This not only improves the efficiency and reliability of network communication, but also simplifies the complexity of network management, allowing network administrators to focus more on business needs without having to worry too much about the details of the underlying network configuration.

[0059] In an exemplary embodiment, in the event of an identifier conflict, after reducing the target number of the interface identifier in the global identifier, the above method further includes: adding the global identifier to the global identifier allocation table to obtain an updated target allocation table, wherein the target allocation table uses a hash bucket array to organize the identifier entries in the target allocation table, the hash bucket array contains at least one linked list structure for handling hash collisions, and the target allocation table determines the entry structure based on the extended structure field and the structure field.

[0060] The global identifier allocation table uses a hash bucket array to organize global identifier entries. A hash bucket array is an efficient hash data structure that allows for quick location of global identifiers using a hash function. Each "bucket" contains one or more global identifier entries. When a hash function points different global identifiers to the same bucket, a hash collision occurs. The system uses a linked list structure to handle these collisions, ensuring that each global identifier is correctly stored in its bucket. Each entry in the target allocation table contains the global identifier, associated extended structure fields (such as dedicated fields for remote direct data access stored in the OVS internal port), basic structure fields (such as port ID, VLAN ID, etc.), and other necessary metadata (such as allocation time, status information, etc.). After adjusting the interface identifier in the global identifier and resolving collisions, the new global identifier is added to the global identifier allocation table, forming an updated target allocation table. This process involves updating the corresponding linked lists in the hash bucket array to ensure that the new global identifier is correctly inserted and does not conflict with other global identifiers.

[0061] In summary, through the above implementation methods, the global identifier allocation table is carefully managed to ensure that it can efficiently handle the query and insertion of global identifiers while maintaining the uniqueness of global identifiers.

[0062] In an exemplary embodiment, before determining the target device for storing physical remote direct data access packets based on the mapping relationship between multiple communication ports and physical storage devices and global identifiers, the method further includes: scanning the physical storage devices to obtain device attribute parameters of the physical storage devices, wherein the device attribute parameters include at least one of the following: device type, number of ports corresponding to the device, and protocols supported by the device; in the case of multiple physical storage devices, sorting them based on device type and transmission performance between each physical storage device and the virtual interactive machine to obtain a device capability table; and starting a monitoring thread for the communication ports based on the device capability table.

[0063] Optionally, in a virtualized environment, physical storage devices may be dynamically added or removed. Therefore, the system needs to periodically or at startup scan the presence status of physical devices and obtain their attribute information. Optionally, device attribute parameters include, but are not limited to, determining the device type (e.g., InfiniBand, RDMA Ethernet Coherence RoCE, or other remote direct data access types); the number of available physical ports on the device; and confirming the remote direct data access protocols supported by the device, which affect packet format and processing, as well as compatibility with virtual machine communication. Physical storage devices are sorted based on parameters such as device type and transmission performance between the device and the virtual switch. Performance evaluation may involve transmission rate, latency, etc. The sorted list lists all physical storage devices and their capabilities, facilitating the selection of the optimal device for data storage operations. Furthermore, a monitoring thread continuously monitors the data traffic and performance status of communication ports to ensure timely response and adjustment in case of device performance fluctuations, failures, or other anomalies.

[0064] In summary, the above methods enable automatic discovery and evaluation of physical storage devices, establish a device capability table, and continuously monitor the status of communication ports through a monitoring thread. This ensures that data packets are efficiently routed to the target physical storage device based on the latest network conditions and device performance. This improves data storage and access performance, enhances stability, and strengthens the ability to handle unexpected failures.

[0065] In an exemplary embodiment, after starting a monitoring thread for the communication port based on the device capability table, the method further includes: determining the network topology distance between each physical storage device and the virtual interactive machine based on the monitoring results; determining the load percentage of each physical storage device based on the monitoring results; determining the matching degree between the service quality of each physical storage device and the required quality of service of the virtual interactive machine based on the monitoring results; determining the availability of data transmitted between each physical storage device and the virtual interactive machine based on the monitoring results; and performing a mapping score for data packet storage based on the network topology distance, load percentage, matching degree, and availability.

[0066] Understandably, the process begins by initiating a monitoring thread for the communication ports based on the device capability table to continuously collect network status information. Next, based on the data fed back by the monitoring thread, the network topology distance between each physical storage device and the virtual interactive machine is precisely calculated. This topology distance assessment comprehensively considers the actual physical distance, link status, hop count, and potential network congestion. By quantifying these factors, data transmission latency can be effectively predicted, thus prioritizing devices with shorter distances in data storage mapping decisions.

[0067] Real-time monitoring of the load percentage of physical storage devices is a crucial step in preventing network bottlenecks and device overload. By monitoring threads, key metrics such as the current number of active connections, the amount of data being processed, and CPU and memory usage for each device are obtained, allowing for the calculation of the device's load percentage. High-load devices can cause data transmission latency and decreased throughput; therefore, monitoring the load percentage enables real-time adjustments to packet storage mapping strategies, ensuring even data distribution and preventing hotspots.

[0068] The assessment of QoS matching focuses on whether the service level provided by physical storage devices meets the specific needs of computing resources such as virtual machines or containers on virtual interactive machines. It compares the QoS characteristics of the devices, such as bandwidth guarantees, latency control, and priority queue settings, with the actual needs of the virtual machines to quantify the degree of matching. By considering QoS matching, it is possible to ensure that the priority and service level of data transmission are precisely controlled, meeting the differentiated performance requirements of different types of virtual machines.

[0069] Data transmission availability directly reflects the stability and reliability of physical storage devices during data storage and transmission. Based on historical fault records, mean time between failures (MTBF), and current device status, the data transmission availability of each device is comprehensively evaluated. Devices with high availability will be prioritized to reduce packet loss rates and improve the integrity and security of overall network data transmission.

[0070] Finally, the storage target for data packets is determined by calculating a comprehensive score based on network topology distance, load share, quality of service matching degree, and data transmission availability. This scoring process employs a weighted scoring algorithm, quantifying the performance of the above four dimensions according to pre-set weights (e.g., network topology distance 40%, load share 30%, quality of service matching degree 20%, and data transmission availability 10%). The top-scoring physical storage devices are considered the best candidates, and further, based on the specific scenario and immediate needs, the most suitable device is selected as the storage target for the data packets.

[0071] By implementing the exemplary method of this application, data center networks can achieve intelligent selection of packet storage mappings, significantly improving network performance and resource utilization efficiency. First, optimized network topology distance helps reduce data transmission latency, which is particularly important for real-time and high-frequency transaction systems. Second, considerations of load balancing and QoS matching ensure that packets are allocated to the best-performing physical devices that best meet service requirements, avoiding resource waste and network congestion. Finally, guaranteed data transmission availability enhances stability and reliability.

[0072] In one exemplary embodiment, determining whether to perform conversion processing on the virtual data packet based on the parsing result includes: determining not to perform conversion processing on the virtual data packet if the parsing result indicates that the port protocol containing the extended structure field cannot recognize the packet header; and determining to perform conversion processing on the virtual data packet if the parsing result indicates that the port protocol containing the extended structure field has recognized the packet header.

[0073] When a virtual data packet arrives at a processing node in the network (such as an OpenvSwitch virtual switch), its header is first parsed to extract key network protocol information and destination address. Then, based on the parsing result, it is checked whether the header information matches the protocol information in the extended structure field of the current port. This field contains metadata about the virtual port's support for remote direct data access. If the parsing result indicates that the virtual data packet's header information cannot be recognized by the protocol in the port's extended structure field, it means the packet does not belong to remote direct data access or is incompatible with the protocol configured for the current virtual port. In this case, the conversion process is skipped, and the data packet is not modified or rewritten. This avoids misprocessing of non-remote direct data access packets, reduces unnecessary overhead, and maintains efficient network operation. Conversely, if the header information has been recognized and matches the protocol in the port's extended structure field, then the virtual data packet needs to be converted. Conversion typically includes updating the virtual network identifier in the header to the corresponding physical network identifier, such as replacing the virtual global identifier with a global identifier recognizable by the physical device, updating routing information, and possible checksum recalculation steps. This process ensures that virtual data packets conform to the communication protocols of the physical network when they enter the network for transmission, thereby achieving transparent and efficient transmission of data packets.

[0074] In summary, by implementing the exemplary method of this application, data center networks can achieve precise control over the transformation and processing of virtual data packets, significantly improving network performance and data transmission reliability. On the one hand, for incompatible non-remote direct access protocol data packets, unnecessary transformation processing can be avoided, reducing the burden on network processing nodes and improving the overall network processing efficiency. On the other hand, for remote direct access protocol data packets, intelligent parsing and transformation processing ensures that data packets can be smoothly transmitted between the virtualized environment and the physical network, meeting the requirements of high-performance computing and storage applications for low-latency, high-throughput networks.

[0075] In one exemplary embodiment, determining to perform transformation processing on virtual data packets includes: determining a target global identifier corresponding to the virtual data packet; replacing the target global identifier with a physical network address corresponding to a physical storage device, and determining updated routing information corresponding to the physical network address; and transforming the virtual data packet into a physical data packet based on the physical network address and the updated routing information.

[0076] In an exemplary embodiment, after determining that the virtual data packet needs to be transformed, the method further includes: searching for the target mapping relationship of the target global target corresponding to the application virtual data packet in the mapping relationship; and determining the physical remote direct data access device for sending the transformed data packet based on the target mapping relationship.

[0077] Optionally, when it is determined that a virtual data packet needs to be transformed, the header information of the virtual data packet must first be parsed to determine its target global identifier. This global identifier is the destination address specified for the data packet in the virtualization environment, but physical remote direct data access devices cannot directly recognize the virtual global identifier. Therefore, a further transformation step is required to replace the virtual global identifier with its mapped physical network address. This step is called physical network address translation of the target global identifier.

[0078] After physical network address translation (PNAT) is complete, updated routing information needs to be determined. This involves recalculating the routing path based on the new physical address to ensure that data packets arrive at the target physical storage device along the optimal path. Once the physical network address and updated routing information are determined, the virtual data packet can be converted into a physical data packet under guidance. This means the format and header information are adjusted according to the physical network protocol requirements, ready for transmission over the physical network. After the conversion, the crucial next step is to direct the physical data packet to the correct physical remote direct data access device (PDD). This process relies on a pre-established mapping relationship—the correspondence between virtual global identifiers (VGAs) and physical DDDs. By searching the mapping database for the target VGA corresponding to the virtual data packet, the corresponding physical DDD can be quickly located.

[0079] Based on the target mapping relationship, the physical remote direct data access device is determined. This typically includes the device type, physical address, and possible redundant path information. With this information, the converted physical data packets can be sent through the selected physical remote direct data access device, achieving high-speed, low-latency data transmission.

[0080] In an exemplary embodiment, after determining the physical remote direct data access device (PDR) for sending the transformed data packets based on the target mapping relationship, the method further includes: determining scheduling information corresponding to the PDR, wherein the scheduling information includes at least: a priority queue for data packet transmission, bandwidth control of the PDR, and the traffic size of the PDR; and controlling the transmission time of the forwarded data packets according to the scheduling information.

[0081] In an exemplary embodiment, after determining the physical remote direct data access device for sending the converted data packet based on the target mapping relationship, the method further includes: if it is determined that the transmission of the converted data packet is completed through the physical remote direct data access device, synchronizing a completion message to the virtual interactive machine; and controlling the virtual interactive machine to display that the virtual data packet has been processed.

[0082] Once it's determined that the transformed data packets will be sent via a physical remote direct data access device, the next step is to determine the device's scheduling information. Scheduling information is crucial in determining how data packets are transmitted effectively and primarily includes three core elements:

[0083] Priority queues: Data packets are assigned to different priority queues according to their business nature and urgency. Data packets in high-priority queues will be processed and sent first, which helps to ensure the communication latency and stability of critical business.

[0084] Bandwidth control: The bandwidth resources of physical remote direct data access devices are limited. Through bandwidth control strategies, bandwidth resources can be allocated reasonably to ensure that the transmission rate of each data stream meets the predetermined Service Level Agreement (SLA) while avoiding network congestion.

[0085] Traffic volume: Monitor and limit the traffic volume of data packets sent to physical devices to prevent sudden large data packet transmissions from impacting the network and maintaining the stability of network communication.

[0086] Based on the above scheduling information, the transmission time of the transformed data packets can be controlled. Through priority queue scheduling, bandwidth control, and traffic management, it can be ensured that data packets can be transmitted at the optimal time and along the optimal path, thereby maximizing network performance.

[0087] After the transformed data packet is successfully sent via a physical remote direct data access device, a synchronization message is sent to the original virtual interactive machine, such as OpenvSwitch. This process is achieved through an internal message passing mechanism, ensuring that the virtual interactive machine is aware of the data packet processing status in a timely manner. The synchronization completion message not only includes basic confirmation information about whether the data packet has been sent, but may also include detailed sending results, such as the sending timestamp, data packet size, and transmission rate.

[0088] Controlling the virtual interactive console to display that data packets have been processed is crucial for maintaining transparency in network communication and improving overall responsiveness. The virtual interactive console can update its internal data processing status based on received status synchronization information and report the data packet transmission results to higher network management components or the requesting virtual machine. This mechanism not only optimizes the data transmission process but also strengthens collaboration and communication between different layers in the virtualized network architecture.

[0089] In an exemplary embodiment, before controlling the transmission time of forwarded data packets according to the scheduling information, the method further includes: if the number of data packets in the priority queue in the scheduling information is greater than or equal to a preset queue threshold, controlling the virtual interactive machine to start a batch processing mode; if the number of data packets in the priority queue in the scheduling information is less than the preset queue threshold, obtaining the transmission time of each data packet in the priority queue, and adjusting target data packets whose transmission time is greater than the preset transmission time into data packets to be retransmitted.

[0090] When the number of data packets in the priority queue of a physical remote direct data access device reaches or exceeds a preset queue threshold, batch processing mode will be automatically activated. This threshold is set based on a comprehensive consideration of factors such as network load and device processing capacity, aiming to find a balance between data packet processing efficiency and latency.

[0091] The activation of batch processing mode means that data packets in the priority queue will be processed in batches, rather than one by one as in the traditional method. This strategy significantly reduces the overhead of calls and function executions during data packet processing, improving the device's processing throughput, especially for large-scale data transmission scenarios.

[0092] Conversely, if the number of packets in the priority queue is less than a preset queue threshold, the system enters a fine-grained management phase for individual packets. In this phase, the transmission time of each packet in the queue is monitored. If a packet's transmission time exceeds a preset time (which is typically dynamically adjusted based on business needs and network conditions), the packet is marked as a packet to be retransmitted.

[0093] The implementation of the intelligent retransmission strategy ensures the integrity and timeliness of data packets even under network congestion or equipment performance fluctuations. This strategy dynamically adjusts the data packet transmission strategy, automatically retransmitting data packets that have failed to be transmitted for an extended period, thereby avoiding data loss and improving the reliability of network communication.

[0094] By implementing batch processing and intelligent retransmission strategies, the data processing efficiency and transmission reliability of data center networks can be significantly improved. Batch processing optimizes the packet processing flow under high load scenarios, reducing overhead and increasing device throughput. Intelligent retransmission strategies, by dynamically monitoring and adjusting packet transmission strategies, ensure the integrity and timeliness of data transmission. Especially in unstable network environments, they effectively prevent packet loss, improving network robustness and user experience.

[0095] In an exemplary embodiment, after transmitting the target data corresponding to the virtual data packet based on the conversion result, the mapping relationship between multiple communication ports and the physical storage device, and the global identifier, the method further includes: detecting first fault information corresponding to the hardware status of the physical storage device; detecting second fault information corresponding to the network between the physical storage device and the virtual interactive machine; detecting third fault information corresponding to the operating status of the virtual interactive machine; and switching the transmission path for transmitting the target data between the virtual interactive machine and the physical storage device based on the first fault information, the second fault information, and the third fault information.

[0096] First, continuously monitor the hardware status of the physical storage device for critical fault information, including but not limited to key indicators such as device health, temperature, power consumption, and hardware error counters. These indicators reflect the device's current operating status and potential hardware failure risks. Continuous monitoring of the hardware status allows for timely detection of device-level problems, providing necessary information for subsequent transmission path switching.

[0097] Secondly, real-time monitoring of the network connection quality between the physical storage device and the virtual interactive machine is performed to obtain secondary fault information. This covers dynamic network parameters such as network latency, packet loss rate, and connection status, revealing the instantaneous performance of the network path and potential network failure risks. Real-time tracking of network connection quality helps to quickly identify network-level anomalies and provides real-time data support for dynamically switching transmission paths.

[0098] Furthermore, monitoring the third type of fault information corresponding to the virtual machine's operating status, including CPU utilization, memory usage, and logs, helps to understand the current operating status of the virtual machine and potential software faults. This monitoring mechanism helps to comprehensively grasp the operating status at the virtualization layer, promptly detect and respond to software-level faults, and ensure the continuity of data packet processing.

[0099] Finally, based on the collected first, second, and third fault information, an intelligent decision can be made to switch the path for transmitting the target data between the virtual machine and the physical storage device. This process includes, but is not limited to, redirecting the data stream to a backup physical storage device, selecting a better network path, or restarting relevant services on the virtual machine. The switching strategy is designed to fully consider the type of fault, its scope of impact, and recovery time, striving to restore data transmission in the shortest possible time and minimize the impact of the fault on network communication.

[0100] By implementing the fault monitoring and transmission path switching method of this application, data center networks can achieve high reliability and stability in the transmission of virtual data packets. Hardware status monitoring helps to provide early warning of equipment failures, network connection quality tracking enables timely adjustment of data transmission strategies, and in-depth observation of the virtual interactive machine's operating status strengthens the prevention and control of software-level anomalies. Overall, this method greatly enhances the self-healing capability and dynamic adaptability of data center networks, reduces network outage time and data loss risks caused by faults, and improves user experience and business continuity.

[0101] The entities that perform the above steps can be servers, terminals, etc., but are not limited to these.

[0102] To facilitate understanding of the implementation methods of this application, relevant scenarios are explained below, but these explanations do not limit the scope of this application.

[0103] As an optional implementation method, this application proposes a virtualized network implementation method that integrates OpenvSwitch and RDMA technology. By extending private fields in the virtual internal port of the software-defined network virtual switch and combining it with the kernel adaptation module, the remote direct data access (RDMA) capability of the virtual interface and the transparent mapping of the physical RDMA device are realized.

[0104] Optionally, this application adopts a layered architecture design. Figure 3 This is a schematic diagram of the layered architecture of a virtualized network system according to an embodiment of this application. The system is divided into four logical layers: the application layer carries computing resources such as virtual machines and containers; the virtual network layer takes virtual switches (OVS) as the core and extends RDMA capabilities; the kernel adaptation layer realizes the mapping and conversion from virtual to physical; and the physical device layer provides real RDMA transmission capabilities.

[0105] The system architecture enables inter-layer communication through standardized interfaces. The application layer does not need to be aware of the complexity of the underlying RDMA. The virtual network layer has complete RDMA context management capabilities. The kernel adaptation layer is responsible for GID management, device mapping, and data forwarding optimization. The physical device layer supports multiple RDMA protocols such as InfiniBand, RoCE, and iWARP.

[0106] As an optional implementation method, Figure 4 This is a schematic diagram of data flow according to an embodiment of this application; the data flow in the system follows a strict processing procedure to ensure that the semantic integrity and performance characteristics of the RDMA protocol are maintained.

[0107] When a virtual machine initiates an RDMA data transfer request, the system first performs preliminary processing at the virtual RDMA interface layer, extracting key routing information such as the target GID and service level. Subsequently, the virtual switch / bridge (OVS Bridge) matches data according to pre-configured flow table rules to determine the data forwarding path. The RDMA adaptation module is a crucial part of data processing, responsible for mapping the virtual RDMA request to a specific physical device. This process includes complex GID resolution, device selection, and load balancing decisions. After mapping, the system performs necessary format conversions on the data packets, transforming the packet header information from the virtual environment into a format understandable by the physical network. Finally, the processed data is sent to the target node through the selected physical RDMA network interface card.

[0108] Optionally, virtual interface RDMA attribute extensions include: adding dedicated RDMA context information to the OVS internalport data structure, enabling the virtual port to understand and process the RDMA protocol. The extension design follows compatibility principles to ensure no impact on existing OVS functionality; it employs a compact data structure and cache-friendly memory layout to minimize performance overhead; it reserves extension space to adapt to RDMA technology development; and it strictly adheres to InfiniBand and RoCE protocol specifications to ensure interoperability. The extension fields adopt a hierarchical structure, managing basic attributes, RDMA GID attributes, QoS and routing attributes, and physical device mapping information respectively. Optional, Figure 5This is a schematic diagram of the extended data structure definition according to an embodiment of this application. Specifically, a 128-byte private field is extended in the virtual internal port data structure of OpenVSwitch, and this 128-byte private field is aligned to a 64-byte boundary. The private field includes: 32 bytes of basic attributes for storing information such as port identifier, virtual LAN identifier, and port status; 32 bytes of remote direct data access global identifier attribute for storing information such as subnet prefix and interface identifier; 32 bytes of quality of service and routing attributes for storing storage service level and partition key; and 32 bytes of physical device mapping information for storing primary and backup device identifiers and mapping weights.

[0109] Optionally, dynamic GID generation algorithms are a core technology for RDMA address management in virtualized environments. In traditional RDMA networks, GIDs are typically configured manually, which cannot adapt to the dynamic requirements of virtualized environments. This application adopts a hierarchical address structure, dividing the 128-bit GID into a 64-bit subnet prefix and a 64-bit interface identifier. The algorithm fully considers the special needs of virtualization: the subnet prefix encodes the data center identifier and VLAN information, achieving network isolation and hierarchical management; the interface identifier is generated using a SHA256 hash function combined with the MAC address, port ID, and timestamp, ensuring randomness and uniqueness; the global identifier allocation table maintains address uniqueness, automatically adjusting and re-verifying when conflicts are detected.

[0110] Figure 6This is a flowchart of the global identifier generation algorithm according to an embodiment of this application. It mainly includes: 1. Port creation request; 2. Extracting configuration parameters: Virtual LAN identifier (VLAN-ID); MAC address; port identifier; timestamp, for example, inputting: Virtual LAN identifier (VLAN-ID); MAC address; data center identifier; 3. Calculating the subnet prefix (subnet-prefix=64 bits), the algorithm is: (Data center identifier corresponding to DC-ID << 48 | Virtual LAN corresponding to VLAN code << 32) | Subnet mask. 4. Generate interface identifier (interface-id=64 bits), the algorithm is: SHA(LAN address MAC + port code PORT-ID + call timestamp)×[0:8]. For example, MAC=00:50:56:12:34:56, PORT=1, timestamp=1634567890123, the result is 0xa1b2c3d4e5f60708. 5. Combine the complete global identifier (GID=128 bits), that is, concatenate the subnet prefix and the interface identifier. The above example combination is: 0x0100064000000000xa1b2c3d4e5f60708. 6. Global identifier uniqueness check; In order to prevent surface conflicts, the global identifier allocation table is queried. If there is a conflict, the lower 8 bits of the interface identifier can be adjusted. 7. Register the updated data structure in the routing table. Specifically, update the mapping table between global identifiers and ports, and notify relevant modules that the global identifier allocation is complete.

[0111] Optional, Figure 7 This is a schematic diagram of the global identifier management data structure according to an embodiment of this application. It should be noted that the global identifier management data structure is the infrastructure supporting the entire address management system. The design of the data structure must strike a balance between multiple dimensions such as lookup efficiency, memory usage, and concurrent access. This application adopts a multi-level index structure, providing fast GID lookup capabilities through a hash table and supporting efficient routing information management through a prefix tree.

[0112] The global identifier allocation table uses hash bucket arrays to organize global identifier entries. The global identifier allocation table structure contains multiple hash bucket arrays, and each hash bucket contains a linked list structure for handling hash collisions. The choice of hash function takes into account the distribution characteristics of global identifiers, striving to achieve a uniform load distribution. The entry structure not only stores the value of the global identifier entry itself, but also contains rich metadata, such as allocation time, reference count, and state information, which are crucial for the lifecycle management of global identifiers.

[0113] For example, a global identifier entry may include, but is not limited to: global identifier (gid-16): a 128-bit global identifier value; port identifier (port-id): the associated virtual port identifier; virtual LAN identifier (vlan-id); allocation timestamp (Allocation-time); reference count (Reference-count); state ((Active / inActive / pending)); and a pointer to the next entry (Next).

[0114] The routing information table uses a trie structure, which is particularly suitable for handling hierarchical network addresses. The trie supports efficient longest prefix match lookup, which is crucial for RDMA routing decisions. The tree's node design supports dynamic insertion and deletion operations, adapting to frequent changes in network topology in virtualized environments.

[0115] Optionally, embodiments of this application also provide an intelligent device mapping mechanism that dynamically selects the optimal physical device to provide services for the virtual interface through a multi-dimensional evaluation system. The multi-dimensional evaluation includes: considering network topology correlation to ensure optimal data transmission paths; load balancing strategies to avoid hotspot devices; QoS matching mechanisms to ensure the quality of service requirements of virtual machines; and availability considerations to improve fault tolerance through redundancy design. Furthermore, a weighted scoring algorithm can be used, with topology distance, load balancing, QoS quality matching, and availability accounting for 40%, 30%, 20%, and 10% of the weights, respectively.

[0116] Figure 8 This is a schematic diagram of the device discovery and registration process according to an embodiment of this application. It includes the following steps:

[0117] Step 802: System startup / hot-plugging;

[0118] Step 804: Scan for remote direct data access (RDMA) devices / dev / infiniband, for example: traverse: path / sys / class / infiniband; discover devices: mlx5-0, mlx5-1, qedr-0, etc.

[0119] Step 806: Query device attributes including but not limited to: Device caps; Port caps; Global identifier table (Cid table).

[0120] For example, when obtaining information such as device type, number of ports, and supported protocols, it could be: Infiniband / Ethernet Converged Remote Direct Memory Access Roce / Internet Wide Area Remote Direct Memory Access Protocol iwarp, with a speed of 25 / 50 / 100 / 200Gbps; and port status: Active / Down / initialized.

[0121] Step 808: Build the device capability table deviceregistry, for example, store: device identifier, port, global identifier table, status, and set indexes: sort by device type and performance.

[0122] Step 810: Start the monitoring thread Device Monitor, for example, to monitor: port status changes, device plugging and unplugging; check once every 100ms.

[0123] Optionally, a multi-factor mapping algorithm is the core of the mapping mechanism. The algorithm comprehensively evaluates multiple key factors, calculates a comprehensive score for each available physical device, and then selects the device with the highest score as the mapping target. This multi-factor evaluation method is more scientific and reliable than a single-index selection strategy.

[0124] The topology distance factor considers the network topology between virtual machines and physical devices. In servers with Non-Uniform Memory Access (NUMA) architecture, memory access across NUMA domains incurs additional latency overhead. The algorithm prioritizes RDMA devices located in the same NUMA domain as the virtual machine to reduce memory access latency. Simultaneously, the algorithm also considers the PCIe bus topology to prevent PCIe bandwidth from becoming a performance bottleneck.

[0125] Load balancing ensures even traffic distribution by monitoring the current load on each physical device. Load is measured not only by the number of active connections but also by multiple dimensions such as bandwidth utilization and CPU usage. The algorithm tends to select devices with lighter loads, avoiding the emergence of hotspots.

[0126] The Quality of Service (QoS) matching factor ensures that the QoS requirements of virtual machines are met. Different RDMA devices may support different QoS characteristics, such as the number of service levels and priority queue depth. The algorithm checks whether the device's QoS capabilities meet the virtual machine's needs and prioritizes devices that can provide better QoS guarantees.

[0127] Availability factor takes into account the reliability and stability of equipment. The algorithm analyzes reliability metrics such as historical failure records and mean time between failures (MTBF) of equipment, and prioritizes more stable and reliable equipment.

[0128] Figure 9 This is a schematic diagram of the selection of the multi-factor intelligent mapping algorithm according to the embodiments of this application; it involves device Mlx5-0:1, device Mlx5-0:2, device Mlx5-1:1, and device qedr-0:1, and scores are calculated from four perspectives: topology distance (weight 40%), load balancing (weight 30%), service quality matching (weight 20%), and availability (weight 10%).

[0129] Optionally, embodiments of this application provide a method for optimizing data forwarding paths. The core idea of ​​the optimization strategy is to reduce latency and overhead in the data processing path. Through a pipelined processing architecture, packet processing is decomposed into multiple parallel execution stages, improving processing throughput. Then, zero-copy technology is employed to avoid unnecessary memory copy operations, reducing CPU and memory bandwidth consumption. Next, a batch processing mechanism is used to merge multiple packets for processing, amortizing the processing overhead of a single packet. Finally, the cache optimization and vectorized instruction features of modern processors are utilized to further improve processing efficiency.

[0130] Figure 10 This is a schematic diagram of a data packet processing pipeline according to an embodiment of this application, including the following:

[0131] Phase 1: Packet Reception and Identification. This phase receives data packets from the network interface and performs initial protocol identification. It utilizes efficient interrupt handling mechanisms and Direct Data Access (DMA) transfer technologies, such as DMA copy, to ensure data can be quickly transferred from the network card buffer to system memory. Protocol identification is based on the packet header information to quickly determine whether the data packet is related to remote direct data access.

[0132] Phase 2: Global identifier resolution and lookup is a processing step unique to remote direct data access. The system extracts the target global identifier information from the data packet and looks up the corresponding forwarding information in the routing table. To improve lookup efficiency, a multi-level caching mechanism is used to cache frequently used routing information in a high-speed cache for rapid cache hit checks.

[0133] Phase 3: Device Mapping Selection. Based on the routing lookup results, this phase includes: querying the mapping table, load balancing, and device status checks, to determine which physical remote direct data access device (DRG) the data packets should be sent through. This phase considers load balancing and quality of service requirements to select the most suitable physical port.

[0134] Phase 4: Header translation and rewriting is a crucial step in virtualization, including: virtual global identifier replacement, physical address filling, and checksum updating. This replaces the virtual global identifier in the data packet with the physical network address, updates routing information, and recalculates the checksum. This process must maintain the semantic integrity of the Remote Direct Data Access Protocol (RDP).

[0135] Phase 5: Quality of Service (QoS) Processing and Scheduling. Data packets are classified and scheduled according to QoS requirements, including priority queuing, bandwidth control, and traffic shaping. Multiple priority queues are maintained to ensure that high-priority packets receive priority processing. Simultaneously, transmission adjustments are made through traffic shaping and congestion control mechanisms.

[0136] Phase 6: Physical Device Transmission. The processed data packets are sent out through the selected physical device, including: Direct Data Access (DMA) transmission, transmission queue, and completion notification. It should be noted that this phase uses DMA technology to directly transfer data to the network interface card (NIC), reducing CPU involvement.

[0137] Optional, Figure 11 This diagram illustrates zero-copy optimization according to an embodiment of this application. The core of zero-copy optimization is to use memory mapping technology to allow applications, the virtualization layer, and physical devices to share the same memory region. When an application needs to send data, the system does not copy the data content but directly passes the memory page mapping relationship to the physical RDMA device. This approach not only avoids the overhead of data copying but also reduces memory bandwidth usage.

[0138] Optional, Figure 12 This diagram illustrates batch processing according to an embodiment of this application. Batch processing optimization is another important performance improvement technique. In high-speed network environments, the processing overhead of a single data packet is often dominated by fixed overhead such as system calls and function calls. By merging multiple data packets for processing, these fixed overheads can be significantly reduced, improving the overall processing efficiency of the system.

[0139] The batch processing trigger mechanism incorporates multiple conditions to ensure optimal performance under varying load conditions. When the number of data packets in the receive queue reaches a preset threshold, the system initiates batch processing mode. Simultaneously, a timeout mechanism is implemented to ensure that data packets do not experience excessive delays while waiting for batch processing. Furthermore, the system monitors CPU utilization and more aggressively employs batch processing strategies when CPU load is low.

[0140] Optionally, this application also relates to a fault detection and automatic recovery mechanism to ensure the high availability of the RDMA virtualization system. Faults can occur at any level in a complex virtualization environment, requiring a comprehensive, multi-layered fault detection system to promptly identify various types of faults and take corresponding recovery measures.

[0141] Figure 13 This is a schematic diagram of a multi-layered fault detection structure according to an embodiment of this application. The detection system adopts a layered detection principle: hardware layer fault detection focuses on the health status of physical devices and uses a high-frequency detection of 100ms; network layer fault detection focuses on network connection quality and availability and uses a medium-frequency detection of 1s; application layer fault detection focuses on the operating status and performance of upper-layer applications and uses a low-frequency detection of 5s. Combining active detection, passive detection, and predictive detection improves the accuracy and timeliness of fault detection.

[0142] Optional, Figure 14 This is a schematic diagram of the fault recovery process according to an embodiment of this application. The automatic fault recovery mechanism is the core function of fault management; it can automatically take recovery measures after a fault is detected, minimizing the impact of the fault on the system. The design of the recovery strategy considers multiple factors such as fault type, scope of impact, and recovery time, striving to restore the system to normal operation in the shortest possible time.

[0143] Hardware failure recovery strategies are primarily implemented through device redundancy and failover. When a failure of a primary physical device is detected, the system automatically switches traffic to the backup device. The failover process includes steps such as updating the mapping table, reallocating global identifiers, and notifying relevant virtual machines. To ensure a smooth failover, the system maintains complete backup device status information, including the global identifier table, routing information, and Quality of Service (QoS) configuration.

[0144] Network fault recovery strategies are primarily implemented through path recalculation and load redistribution. When a problem is detected in a network path, the system recalculates the optimal path and redistributes the affected traffic to healthy paths. Path recalculation uses the shortest path algorithm while considering factors such as link quality, bandwidth capacity, and latency.

[0145] Software fault recovery strategies are primarily implemented through service restarts and state resets. When an anomaly is detected in a software component, the system attempts to restart the relevant service and reset its state to a healthy state. During the restart process, the system saves critical state information to ensure that the service can continue to provide normal functionality after recovery.

[0146] In summary, by deeply integrating OVS virtual switches and RDMA technology, significant performance improvements were achieved, including the following effects:

[0147] Network latency optimization: The end-to-end latency of the traditional TCP / IP protocol stack is typically in the range of 50-100 microseconds. However, this application reduces the latency to below 5 microseconds by introducing RDMA technology, resulting in a performance improvement of 10-20 times. This significant reduction in latency is of great importance for latency-sensitive applications such as high-frequency trading and real-time data processing.

[0148] Throughput Performance: This application fully utilizes the high bandwidth characteristics of RDMA technology, enabling the system to achieve near-line-speed data transmission in a 100Gbps network environment. Compared to traditional virtualized network solutions, throughput is improved by 3-5 times. This performance improvement is mainly attributed to zero-copy technology that bypasses the kernel protocol stack and batch processing optimization.

[0149] CPU utilization optimization: A key advantage of RDMA technology is reducing the CPU's involvement in network data processing. This application maintains this advantage through optimized virtualization layer design. Under the same network load, CPU utilization is reduced by more than 60%, freeing up CPU resources to run more business applications.

[0150] Unified Management Interface: This application enables unified management of traditional Ethernet and RDMA networks. Network administrators only need to maintain one network infrastructure, eliminating the need to manage two separate network systems. This unified management model reduces the number of management nodes by 70%, significantly reducing operational complexity.

[0151] Automated configuration capabilities: The system provides a complete automated configuration mechanism, including automatic GID allocation, automatic device discovery, and automatic establishment of mapping relationships. These automated functions greatly reduce the workload of manual configuration and lower the probability of configuration errors. Statistics show that automated configuration can reduce manual configuration work by more than 90%.

[0152] Intelligent fault handling: This application's multi-layered fault detection and automatic recovery mechanism can handle most common faults without manual intervention. This not only improves system availability but also reduces the workload of maintenance personnel. Automatic fault handling covers more than 80% of common fault scenarios.

[0153] Device sharing effect: In traditional deployment models, each virtual machine typically needs to exclusively occupy a physical RDMA port, resulting in low resource utilization. This application enables multiple virtual machines to share a physical RDMA device through an intelligent mapping mechanism. In a typical virtualization environment, physical device utilization increases from 30% to over 85%.

[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0155] This embodiment also provides a virtual data packet transmission device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0156] Figure 15 This is a structural block diagram of a virtual data packet transmission apparatus according to an embodiment of this application, such as... Figure 12 As shown, the device includes:

[0157] The module 1502 is used to determine multiple communication ports on the virtual interactive machine that support communication with external networks;

[0158] The processing module 1504 is used to extend the structure fields corresponding to the multiple communication ports to obtain extended structure fields, and to determine the global identifier corresponding to each communication port according to the hierarchical address information corresponding to the virtual interactive machine. The extension process is to add a private field corresponding to the remote direct data access function to the structure fields.

[0159] The parsing module 1506 is used to parse the header of the virtual data packet through the extended structure field when the virtual interactive machine receives the virtual data packet to be transferred through the virtual machine via the network interface;

[0160] The transmission module 1508 is used to determine whether to perform conversion processing on the virtual data packet based on the parsing result, and to transmit the target data corresponding to the virtual data packet based on the conversion result, the mapping relationship between the multiple communication ports and the physical storage device, and the global identifier.

[0161] Using the aforementioned device, all virtual ports participating in external network communication are determined based on the configuration and operating status of the virtual interactive machine. These ports serve as the entry and exit points for data transmission and must be capable of processing RDMA data packets. Private fields specifically designed to support RDMA functionality are added to the structure fields of each communication port. These fields include at least key information from the RDMA protocol, such as subnet prefix, interface identifier, service level, and QoS parameters, to ensure correct data packet parsing and efficient transmission. The Global Identifier (GID) for each communication port is generated using a dynamic identification algorithm based on hierarchical address information such as the data center ID, virtual LAN identifier, MAC address, port ID, and timestamp of the virtual interactive machine. The GID serves as a unique identifier for RDMA communication, ensuring the routing uniqueness and security of data packets. When the virtual interactive machine receives a virtual data packet to be transferred through the virtual machine via the network interface, it uses the RDMA-related information in the extended structure fields to parse the header of the virtual data packet, extracting key transmission information, including the target GID. Based on the parsing results, it determines whether the virtual data packet needs to be converted into a physical RDMA data packet. If the target of the data packet is an RDMA-compatible device, conversion processing is performed to ensure efficient data transmission via the RDMA protocol. Based on the conversion results, the mapping relationship between multiple communication ports and physical storage devices, and global identifiers, the intelligent algorithm determines the optimal transmission path. This solves the problem in related technologies where virtual switches cannot support remote direct data access. Furthermore, by natively supporting the RDMA protocol, it significantly reduces network latency and increases data transmission throughput. Moreover, through seamless integration of the virtual switch with external RDMA networks, it reduces the configuration and management burden on network administrators, improving the efficiency and convenience of data center network operation and maintenance.

[0162] In an exemplary embodiment, the above-described processing module is further configured to, when it is determined that the structure field in the communication port is updated using the extended structure field, extract multiple address parameters from the hierarchical address information, wherein the multiple address parameters include at least: the local area code of the virtual LAN where the virtual interactive machine is located, the local area network address corresponding to the virtual interactive machine, and the center code corresponding to the data center associated with the virtual machine; and calculate and process the multiple address parameters through a dynamic identification algorithm to obtain a global identifier corresponding to each communication port in the virtual interactive machine.

[0163] In an exemplary embodiment, the above-mentioned processing module is further configured to substitute the local area code, local area network address, and center code into the first-order operation formula to obtain the subnet prefix corresponding to the virtual interactive machine. The first-order operation formula is used to perform a bitwise OR operation on the center code shifted left by 48 bits, the local area code shifted left by 32 bits, and the subnet mask of the local area network address, i.e.: (center code << 48) | (local area code << 32) | subnet mask of the local area network address, where (center code << 48) represents shifting the center code left by 48 bits, and (local area code << 32) represents shifting the local area code left by 32 bits. The module also obtains the port code of the communication port and the call timestamp of the corresponding communication port; performs a hash calculation on the port code, local area network address, and call timestamp to obtain the interface identifier; and summarizes the subnet prefix and interface identifier to determine the global identifier.

[0164] In an exemplary embodiment, the above-mentioned processing module further includes: an identification unit, configured to obtain a global identifier allocation table corresponding to the virtual interactive machine after summarizing the subnet prefix and interface identifier to determine the global identifier; match the global identifier with other global identifiers in the global identifier allocation table; determine whether there is an identifier conflict based on the matching result; and, if there is an identifier conflict, reduce the target number of bits in the interface identifier of the global identifier.

[0165] In an exemplary embodiment, the above-mentioned processing module is further configured to substitute the port code, local area network address, and call timestamp into a preset hash formula to obtain an interface identifier. The preset hash formula is used to perform hash calculation on the local area network address, port code, and call timestamp, and select the first eight bytes from the calculation result, i.e., SHA(local area network address + port code + call timestamp) × [0:8].

[0166] In an exemplary embodiment, the above-described processing module further includes: a prompting unit, configured to register the global identifier in the routing table after summarizing the subnet prefix and interface identifier to determine the global identifier; and, if the registration is completed, update the data structure corresponding to the communication port and send a prompt message to the management component indicating that the global identifier allocation is complete.

[0167] In an exemplary embodiment, the above-mentioned processing module further includes: an adding unit, configured to, in the event of an identifier conflict, reduce the target number of the interface identifier in the global identifier and add the global identifier to the global identifier allocation table to obtain an updated target allocation table, wherein the target allocation table uses a hash bucket array to organize the identifier entries in the target allocation table, the hash bucket array contains at least one linked list structure for handling hash collisions, and the target allocation table determines the entry structure based on the extended structure field and the structure field.

[0168] In an exemplary embodiment, the above apparatus further includes: a monitoring module, configured to scan the physical storage device according to the conversion result, the mapping relationship between the plurality of communication ports and the physical storage device, and the global identifier before transmitting the target data corresponding to the virtual data packet, to obtain device attribute parameters of the physical storage device, wherein the device attribute parameters include at least one of the following: device type, number of ports corresponding to the device, and protocols supported by the device; in the case of multiple physical storage devices, to sort them according to device type and transmission performance between each physical storage device and the virtual interactive machine to obtain a device capability table; and to start a monitoring thread for the communication ports based on the device capability table.

[0169] In an exemplary embodiment, the monitoring module further includes: a scoring unit, configured to, after initiating a monitoring thread for the communication port based on the device capability table, determine the network topology distance between each physical storage device and the virtual interactive machine based on the monitoring results; determine the load percentage of each physical storage device based on the monitoring results; determine the matching degree between the service quality of each physical storage device and the required quality of the virtual interactive machine based on the monitoring results; determine the availability of data transmitted between each physical storage device and the virtual interactive machine based on the monitoring results; and perform a mapping score for data packet storage based on the network topology distance, load percentage, matching degree, and availability.

[0170] In an exemplary embodiment, the transmission module is further configured to determine that no conversion processing is performed on the virtual data packet if the parsing result indicates that the port protocol containing the extended structure field cannot recognize the packet header; and to determine that the virtual data packet is converted if the parsing result indicates that the port protocol containing the extended structure field has recognized the packet header.

[0171] In one exemplary embodiment, the transmission module is further configured to determine the target global identifier corresponding to the virtual data packet; replace the target global identifier with the physical network address corresponding to the physical storage device, and determine the update routing information corresponding to the physical network address; and convert the virtual data packet into a physical data packet based on the physical network address and the update routing information.

[0172] In an exemplary embodiment, the transmission module further includes: a determining unit, configured to determine, after the virtual data packet is transformed, the target mapping relationship of the target global target corresponding to the application virtual data packet is searched in the mapping relationship; and based on the target mapping relationship, determine the physical remote direct data access device for sending the transformed data packet.

[0173] In an exemplary embodiment, the transmission module further includes: a control unit, configured to determine, after determining the physical remote direct data access device for sending the converted data packets based on the target mapping relationship, scheduling information corresponding to the physical remote direct data access device, wherein the scheduling information includes at least: a priority queue for data packet transmission, bandwidth control of the physical remote direct data access device, and traffic volume of the physical remote direct data access device; and to control the transmission time of the forwarded data packets according to the scheduling information.

[0174] In one exemplary embodiment, the transmission module further includes: a synchronization unit, configured to, after determining the physical remote direct data access device for sending the converted data packet based on the target mapping relationship, synchronize a completion message to the virtual interactive machine if it is determined that the transmission of the converted data packet has been completed through the physical remote direct data access device; and control the virtual interactive machine to display that the virtual data packet has been processed.

[0175] In an exemplary embodiment, the transmission module further includes: an acquisition unit, configured to, before controlling the transmission time of forwarded data packets according to the scheduling information, control the virtual interactive machine to start batch processing mode if the number of data packets in the priority queue in the scheduling information is greater than or equal to a preset queue threshold; and if the number of data packets in the priority queue in the scheduling information is less than the preset queue threshold, acquire the transmission time of each data packet in the priority queue, and adjust the target data packets whose transmission time is greater than the preset transmission time to data packets to be retransmitted.

[0176] In an exemplary embodiment, the above apparatus further includes: a switching module, configured to, after transmitting the target data corresponding to the virtual data packet according to the conversion result, the mapping relationship between multiple communication ports and the physical storage device, and the global identifier, detect first fault information corresponding to the hardware status of the physical storage device; detect second fault information corresponding to the network between the physical storage device and the virtual interactive machine; detect third fault information corresponding to the operating status of the virtual interactive machine; and switch the transmission path for transmitting the target data between the virtual interactive machine and the physical storage device based on the first fault information, the second fault information, and the third fault information.

[0177] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same target processor; or, the above modules are located in different target processors in any combination.

[0178] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0179] Embodiments of this application also provide an electronic device, including a target memory and a target processor, wherein the target memory stores a computer program and the target processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0180] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0181] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0182] Embodiments of this application also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.

[0183] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0184] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0185] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of N computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or N modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0186] The foregoing has provided a detailed description of a virtual data packet transmission method, apparatus, device, storage medium, and program provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method of transmitting a virtual data packet, characterized by, The method comprises the steps of: determining a plurality of communication ports on a virtual interaction machine for supporting communication with an external network; extending a structure field corresponding to the plurality of communication ports to obtain an extended structure field, and determining a global identifier corresponding to each communication port according to hierarchical address information corresponding to the virtual interaction machine, wherein the extension processing is adding a private field corresponding to a remote direct data access function in the structure field; in the case that the virtual interaction machine receives a virtual data packet to be transferred through a virtual machine through a network interface, parsing a packet header of the virtual data packet through the extended structure field; determining whether to perform conversion processing on the virtual data packet according to the parsing result, and performing transmission of target data corresponding to the virtual data packet according to the conversion result, a mapping relationship between the plurality of communication ports and a physical storage device, and the global identifier; wherein, determining a global identifier corresponding to each communication port according to hierarchical address information corresponding to the virtual interaction machine comprises: in the case of determining to update the structure field of the communication port using the extended structure field, extracting a plurality of address parameters in the hierarchical address information, wherein the plurality of address parameters at least include: local area code of a virtual local area network where the virtual interaction machine is located, local area network address corresponding to the virtual interaction machine, and center code corresponding to a data center associated with the virtual interaction machine; performing calculation processing on the plurality of address parameters through a dynamic identification algorithm to obtain a global identifier corresponding to each communication port in the virtual interaction machine, wherein the dynamic identification algorithm is used to dynamically generate a global identifier according to real-time network state and virtual machine configuration; the calculation processing flow of the dynamic identification algorithm comprises: left shifting the center code by 48 bits, left shifting the local area code by 32 bits, and then performing bit or operation with the subnet mask of the local area network address to obtain a subnet prefix; performing hash operation on the local area network address of the virtual switch communication port, the port code and the call timestamp of the current communication port to generate a random and unique interface identifier; concatenating the subnet prefix and the interface identifier to form the final global identifier.

2. The method of claim 1, wherein, After concatenating the subnet prefix and the interface identifier to form the final global identifier, the method further comprises: obtaining a global identifier allocation table corresponding to the virtual interaction machine; matching the global identifier with other global identifiers in the global identifier allocation table; determining whether there is an identifier conflict according to the matching result; in the case that there is the identifier conflict, lowering the target bit number of the interface identifier in the global identifier.

3. The method of claim 1, wherein, performing hash operation on the local area network address of the virtual switch communication port, the port code and the call timestamp of the current communication port to generate a random and unique interface identifier, comprising: substituting the port code, the local area network address and the call timestamp into a preset hash formula to obtain the interface identifier, wherein the preset hash formula is used to perform hash calculation on the local area network address, the port code and the call timestamp, and select the first eight bytes from the calculation result.

4. The method of claim 1, wherein, After the subnet prefix and the interface identifier are concatenated to form the final global identifier, the method further comprises: registering the global identifier in a routing table; in the case of determining that the registration is completed, updating a data structure corresponding to the communication port, and sending a prompt information to a management component that the global identifier allocation is completed.

5. The method of claim 2, wherein, In the case of the existence of the identifier conflict, the method further comprises: adding the global identifier to the global identifier allocation table to obtain an updated target allocation table, wherein the target allocation table uses a hash bucket array to organize identifier entries in the target allocation table, the hash bucket array at least contains a linked list structure for processing hash conflicts, and the target allocation table determines the entry structure based on the extension structure field and the structure field.

6. The method of claim 1, wherein, Before the transmission of the target data corresponding to the virtual data packet according to the conversion result, the mapping relationship between the plurality of communication ports and the physical storage device, and the global identifier, the method further comprises: scanning the physical storage device to obtain device attribute parameters of the physical storage device, wherein the device attribute parameters at least include one of the following: device type, number of ports corresponding to the device, and protocol supported by the device; in the case of the existence of a plurality of physical storage devices, sorting based on the device type and transmission performance between each physical storage device and the virtual interactive machine to obtain a device capability table; starting a monitoring thread for the communication port based on the device capability table.

7. The method of claim 6, wherein, After starting the monitoring thread for the communication port based on the device capability table, the method further comprises: determining a network topology distance between each physical storage device and the virtual interactive machine according to the monitoring result; determining a load proportion of each physical storage device according to the monitoring result; determining a matching degree of a service quality of each physical storage device and a demand quality of the virtual interactive machine according to the monitoring result; determining an availability of data transmission between each physical storage device and the virtual interactive machine according to the monitoring result; performing a mapping score of the data packet storage based on the network topology distance, the load proportion, the matching degree, and the availability.

8. The method of claim 1, wherein, Determining whether to perform conversion processing on the virtual data packet according to the analysis result, comprising: in the case that the analysis result indicates that the port protocol containing the extension structure field cannot recognize the packet header, determining not to perform conversion processing on the virtual data packet; in the case that the analysis result indicates that the port protocol containing the extension structure field has recognized the packet header, determining to perform conversion processing on the virtual data packet.

9. The method of claim 8, wherein, Determining to perform conversion processing on the virtual data packet, comprising: determining a target global identifier corresponding to the virtual data packet; replacing the target global identifier with a physical network address corresponding to the physical storage device, and determining updated routing information corresponding to the physical network address; converting the virtual data packet into a physical data packet based on the physical network address and the updated routing information.

10. The method of claim 8, wherein, After determining the transformation of the virtual data packet, the method further comprises: finding a target mapping relationship corresponding to the target global target of the virtual data packet in the mapping relationship; determining a physical remote direct data access device for sending the transformed data packet based on the target mapping relationship.

11. The method of claim 10, wherein, After determining the physical remote direct data access device for sending the transformed data packet based on the target mapping relationship, the method further comprises: determining the scheduling information corresponding to the physical remote direct data access device, wherein the scheduling information at least includes: priority queue of data packet sending, bandwidth control of the physical remote direct data access device, and traffic size of the physical remote direct data access device; controlling the sending time of the forwarded data packet according to the scheduling information.

12. The method of claim 10, wherein, After determining the physical remote direct data access device for sending the transformed data packet based on the target mapping relationship, the method further comprises: in the case of completing the sending of the transformed data packet through the physical remote direct data access device, synchronizing the completion message to the virtual interactive machine; controlling the virtual interactive machine to display that the virtual data packet has been processed.

13. The method of claim 11, wherein, Before controlling the sending time of the forwarded data packet according to the scheduling information, the method further comprises: in the case that the number of data packets in the priority queue in the scheduling information is greater than or equal to the preset queue threshold, controlling the virtual interactive machine to start the batch processing mode; in the case that the number of data packets in the priority queue in the scheduling information is less than the preset queue threshold, obtaining the transmission time of each data packet in the priority queue, and adjusting the target data packet with the transmission time greater than the preset transmission time as the data packet to be retransmitted.

14. The method of claim 1, wherein, After the transmission of the target data corresponding to the virtual data packet according to the transformation result, the mapping relationship between the plurality of communication ports and the physical storage device, and the global identifier, the method further comprises: detecting first fault information of the hardware state corresponding to the physical storage device; detecting second fault information corresponding to the network between the physical storage device and the virtual interactive machine; detecting third fault information corresponding to the running state of the virtual interactive machine; switching the transmission path of the transmission target data between the virtual interactive machine and the physical storage device based on the first fault information, the second fault information, and the third fault information.

15. An apparatus for transmitting a virtual data packet, the apparatus comprising: a processor configured to generate a virtual data packet; and a transmitter configured to transmit the virtual data packet. comprises: a determination module for determining a plurality of communication ports on a virtual interactive machine for supporting communication with an external network; a processing module for performing extension processing on a structure field corresponding to the plurality of communication ports to obtain an extended structure field, and determining a global identifier corresponding to each communication port according to hierarchical address information corresponding to the virtual interactive machine, wherein the extension processing is to add a private field corresponding to a remote direct data access function in the structure field; an analysis module for, in the case that the virtual interactive machine receives a virtual data packet to be stored through a virtual machine through a network interface, analyzing the packet header of the virtual data packet through the extended structure field; The transmission module is configured to determine whether to perform conversion processing on the virtual data packet according to the analysis result, and perform transmission of the target data corresponding to the virtual data packet according to the conversion result, a mapping relationship between the plurality of communication ports and the physical storage device, and the global identifier. The processing module is further configured to, in a case where it is determined to update the structure field in the communication port using the extended structure field, extract a plurality of address parameters in the hierarchical address information, wherein the plurality of address parameters at least include a local area code of a virtual local area network where the virtual interaction machine is located, a local area network address corresponding to the virtual interaction machine, and a center code corresponding to a data center associated with the virtual machine; and obtain the global identifier corresponding to each communication port in the virtual interaction machine by performing calculation processing on the plurality of address parameters through a dynamic identification algorithm, wherein the dynamic identification algorithm is configured to dynamically generate the global identifier according to a real-time network state and a virtual machine configuration; and a calculation processing procedure of the dynamic identification algorithm includes: left shifting the center code by 48 bits and left shifting the local area code by 32 bits, and then performing a bit-or operation with a subnet mask of the local area network address to obtain a subnet prefix; performing hash operation on the local area network address of the virtual switch communication port, a port code, and a call time stamp of the current communication port to generate a random and unique interface identifier; and splicing the subnet prefix and the interface identifier to form the final global identifier.

16. An electronic device, comprising: The computer program is configured to, when executed by the processor, implement the steps of the virtual data packet transmission method according to any one of claims 1 to 14. The computer program is configured to, when executed by the processor, implement the steps of the virtual data packet transmission method according to any one of claims 1 to 14. The computer program is configured to, when executed by the processor, implement the steps of the virtual data packet transmission method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that, ​ 18. A computer program product comprising a computer program, characterized in that, ​

Citation Information

Patent Citations

  • Virtual exchange method, related device and computer system

    CN103346981A

  • Message transmission method and related device

    CN115701060A