Data transmission method, cloud network system, computing device and computer storage medium
By employing an out-of-order mechanism in the virtual transport network and delaying the acknowledgment of message descriptor release, network congestion and jitter packet loss issues are resolved, memory resource utilization and system performance are improved, and the response speed and throughput of the virtualized cloud network are enhanced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIBABA CLOUD COMPUTING CO LTD
- Filing Date
- 2024-10-31
- Publication Date
- 2026-05-01
AI Technical Summary
Existing virtual transport networks suffer from jitter and packet loss due to network congestion, leading to increased latency and reduced throughput, as well as low memory resource utilization, which negatively impacts user experience, especially under high load conditions.
By adopting a virtual transmission out-of-order mechanism and releasing message descriptors through delayed acknowledgment, a bufferless reliable transmission layer is achieved, reducing memory buffer requirements and improving memory resource utilization.
It improves the response speed and throughput of the network system, solves the problems of network congestion and jitter packet loss, reduces system complexity and memory costs, and is suitable for resource-constrained virtualized cloud network environments.
Smart Images

Figure CN121967322A_ABST
Abstract
Description
Data transmission methods, cloud network systems, computing devices and computer storage media Technical Field
[0001] The embodiments in this specification relate to the technical field of computer networks, and in particular to a data transmission method, a cloud network system, a computing device, and a computer storage medium. Background Technology
[0002] With the development of computer network technology, Virtual Transport Network (Virtio) has enabled efficient communication between virtual machines and physical devices, featuring low latency and high performance, and has been widely used in network systems with device virtualization.
[0003] Currently, based on virtual transport networks, to avoid jitter and packet loss caused by network congestion, a reliable data transmission method is required. After the sending end obtains a message and sends it to the receiving end, it cannot release it immediately. Instead, it needs to store the message in a memory buffer first. It can only be released after receiving an acknowledgment message from the receiving end. That is, it is necessary to ensure that the sending order of the messages and the receiving order of the acknowledgment messages are consistent. Then, the buffered messages are released one by one based on the receiving order to ensure the reliability and integrity of data transmission.
[0004] However, this data transmission method increases response time but causes higher latency, reduces network throughput, and fails to fully utilize the sender's memory resources. Therefore, there is an urgent need for a data transmission method with high throughput, low response time, high reliability, and higher memory resource utilization. Summary of the Invention
[0005] In view of this, embodiments of this specification provide a data transmission method. One or more embodiments of this specification also relate to another data transmission method, a cloud network system, a data transmission device, another data transmission device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0006] According to a first aspect of the embodiments of this specification, a data transmission method is provided, applied to a sending end of a network system, wherein the network system further includes a receiving end, and the virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, including:
[0007] According to the record order of multiple descriptor indexes in the available table, retrieve the message descriptors corresponding to multiple descriptor indexes from the descriptor table and store them in the memory buffer;
[0008] According to the recorded order, obtain the target message corresponding to multiple message descriptors and send it to the receiving end;
[0009] Receive confirmation messages for multiple target messages from the receiving end;
[0010] According to the order in which multiple acknowledgment messages are received, record multiple descriptor indexes in the used table;
[0011] Release the message descriptors stored in the memory buffer according to the record order of the descriptor index in the used table.
[0012] According to a second aspect of the embodiments of this specification, a data transmission method is provided, applied to a receiving end of a network system, wherein the network system further includes a sending end, and the virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, including:
[0013] The receiver receives multiple target messages sent by the sender. The steps for sending multiple target messages at the sender include: retrieving message descriptors corresponding to multiple descriptor indices from the descriptor table and storing them in a memory buffer according to the record order of multiple descriptor indices in the available table; retrieving target messages corresponding to multiple message descriptors according to the record order and sending them to the receiver.
[0014] According to the receiving order of multiple target messages, the sender sends back acknowledgment messages for multiple target messages. The receiving steps of multiple acknowledgment messages at the sender include: receiving the acknowledgment messages for multiple target messages from the receiver; recording multiple descriptor indices in the used table according to the receiving order of the multiple acknowledgment messages; and releasing the message descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
[0015] According to a third aspect of the embodiments of this specification, a cloud network system is provided, including a first virtual machine instance and a second virtual machine instance, wherein the virtual buffer of the first virtual machine instance is provided with an available table, a used table and a descriptor table;
[0016] The first virtual machine instance is used to retrieve the message descriptors corresponding to the multiple descriptor indices in the descriptor table according to the record order of the multiple descriptor indices in the available table and store them in the memory buffer. It also retrieves the target message corresponding to the multiple message descriptors according to the record order and sends it to the second virtual machine instance.
[0017] The second virtual machine instance is used to receive multiple target messages sent by the first virtual machine instance, and to send back confirmation messages of receipt of the multiple target messages to the first virtual machine instance in the order in which the multiple target messages are received.
[0018] The first virtual machine instance is also used to receive confirmation messages for multiple target packets from the second virtual machine instance, record multiple descriptor indices in the used table according to the receiving order of the multiple confirmation messages, and release the packet descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
[0019] According to a fourth aspect of the embodiments of this specification, a data transmission apparatus is provided, applied at the transmitting end of a network system, wherein the network system further includes a receiving end, and the virtual buffer of the transmitting end is configured with an available table, a used table, and a descriptor table, including:
[0020] The first acquisition module is configured to retrieve the message descriptors corresponding to the multiple descriptor indices in the descriptor table and store them in the memory buffer according to the record order of the multiple descriptor indices in the available table;
[0021] The first sending module is configured to obtain the target message corresponding to multiple message descriptors in the order of the records and send it to the receiving end;
[0022] The first receiving module is configured to receive acknowledgment messages for multiple target messages fed back by the receiving end;
[0023] The first record module is configured to record multiple descriptor indexes into the used table according to the receiving order of multiple acknowledgment messages;
[0024] The first release module is configured to release message descriptors stored in the memory buffer according to the record order of the descriptor index in the used table.
[0025] According to a fifth aspect of the embodiments of this specification, another data transmission apparatus is provided, applied to a receiving end of a network system, wherein the network system further includes a sending end, and the virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, including:
[0026] The second receiving module is configured to receive multiple target messages sent by the sending end. The sending steps of multiple target messages at the sending end include: retrieving message descriptors corresponding to multiple descriptor indices from the descriptor table according to the record order of multiple descriptor indices in the available table and storing them in the memory buffer; retrieving target messages corresponding to multiple message descriptors according to the record order and sending them to the receiving end.
[0027] The second feedback module is configured to send back acknowledgment messages for multiple target messages to the sender in the order in which they are received. The steps for receiving multiple acknowledgment messages at the sender include: receiving the acknowledgment messages for multiple target messages from the receiver; recording multiple descriptor indices in a used table in the order in which they are received; and releasing the message descriptors stored in the memory buffer in the order in which the descriptor indices are recorded in the used table.
[0028] According to a sixth aspect of the embodiments of this specification, a computing device is provided, comprising:
[0029] A memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above-described data transmission method.
[0030] According to a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described data transmission method.
[0031] According to an eighth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data transmission method.
[0032] In one embodiment of this specification, a highly reliable data transmission is achieved at the sending end of the network system by employing an acknowledgment message mechanism. This not only effectively solves the problems of network congestion and jitter packet loss in the network system, but also decouples the sending and releasing order of messages by controlling the record order of descriptor indexes in the available and used tables. It allows for the release of some acknowledged message descriptors without waiting for acknowledgment messages to return for all messages, thus realizing out-of-order processing of virtual network transmissions and improving the response speed and throughput of the network system. Furthermore, it eliminates the need to cache the messages themselves, requiring only the maintenance of a small amount of information—the message descriptors—significantly saving memory cache at the sending end and improving the overall performance and resource utilization of the network system. Attached Figure Description
[0033] Figure 1 is a schematic diagram of the structure of a cloud network system;
[0034] Figure 2 is a schematic diagram of another cloud network system;
[0035] Figure 3 is a schematic diagram of a data transmission method applied to a cloud network system;
[0036] Figure 4 is a schematic diagram of the sequential processing of a data transmission method applied to a cloud network system;
[0037] Figure 5 is a schematic diagram of out-of-order processing of a data transmission method applied to a cloud network system;
[0038] Figure 6 is a flowchart of a data transmission method provided in one embodiment of this specification;
[0039] Figure 7 is a schematic flowchart of a data transmission method provided in one embodiment of this specification;
[0040] Figure 8 is a second schematic flowchart of a data transmission method provided in one embodiment of this specification;
[0041] Figure 9 is a third schematic flowchart of a data transmission method provided in one embodiment of this specification;
[0042] Figure 10 is a fourth schematic flowchart of a data transmission method provided in one embodiment of this specification;
[0043] Figure 11 is a flowchart of another data transmission method provided in one embodiment of this specification;
[0044] Figure 12 is a schematic flowchart of another data transmission method provided in one embodiment of this specification;
[0045] Figure 13 is a second schematic flowchart of another data transmission method provided in one embodiment of this specification;
[0046] Figure 14 is a third schematic flowchart of another data transmission method provided in one embodiment of this specification;
[0047] Figure 15 is a fourth schematic flowchart of another data transmission method provided in one embodiment of this specification;
[0048] Figure 16 is a schematic diagram of the structure of a cloud network system provided in one embodiment of this specification;
[0049] Figure 17 is a schematic diagram of a data transmission device provided in one embodiment of this specification;
[0050] Figure 18 is a schematic diagram of another data transmission device provided in one embodiment of this specification;
[0051] Figure 19 is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0052] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0053] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0054] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0055] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0056] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0057] Network system: A system consisting of multiple nodes (such as computers, routers, etc.) connected by communication links for the transmission and exchange of data.
[0058] Cloud network system: A network system based on cloud computing technology that uses virtualization technology to abstract physical network resources into virtual network resources, providing users with flexible and scalable network services as virtual machine instances.
[0059] Virtualization is a technology that abstracts physical resources (such as computing, storage, and networking) into virtual resources, enabling multiple virtual machines to share the same physical hardware resources.
[0060] Virtual Machine Instance (VM Instance): A virtual machine running on a virtualization platform. Each instance can run an independent operating system and applications.
[0061] Virtual Machine (VM, or Guest): A simulated computer system created on physical hardware using virtualization technology, capable of running its own operating system and applications.
[0062] Host: The physical computer that runs the virtualization platform and is responsible for managing multiple virtual machine instances.
[0063] Virtual Buffer: A buffer used in a virtual machine to temporarily store data, typically used for data transmission and processing.
[0064] Memory buffer (or simply buffer): A memory area used to temporarily store data. It is often used as intermediate storage during data transmission to improve the efficiency and reliability of data transmission.
[0065] Virtio: A standardized virtual device interface used to enable efficient communication between virtual machines and physical devices, featuring low latency and high performance.
[0066] Virtual transport network (Virtio-net): A virtual network device based on the Virtio standard, used to enable efficient communication between virtual machines and physical networks.
[0067] Virtual transport network driver: A driver in the virtual machine operating system used to manage and control virtual transport network devices to enable data transmission.
[0068] Virtual Ring Buffer (Vring): A data structure used in virtual transport to efficiently transfer data between the virtual machine and the host machine. It includes an available table, a descriptor table, and a used table.
[0069] Available table (Available Ring or Available Vring): A part of the virtual ring buffer used to record the descriptor indexes of messages to be processed, indicating which messages are available.
[0070] Descriptor table (Desc or Vring Desc): A part of the virtual circular buffer used to record message descriptors, which describe information such as the location and size of the message in memory.
[0071] Used Ring (or Used vring): A part of the virtual ring buffer used to record descriptor indices of processed messages, indicating which messages can be released.
[0072] Virtual network switch (Vswtich): A virtualized network switching device used to forward data packets between virtual machines. Common examples include Open vSwitch.
[0073] A packet is the basic unit of data transmission. It typically consists of a header and a payload. The header contains control information such as the source address and destination address, while the payload contains the actual data being transmitted.
[0074] Descriptor: A data structure that describes the location, size, and other relevant information of a message in memory, used for efficient management and transmission of messages.
[0075] Descriptor Index (idx): The index value in the descriptor table used to quickly locate and access a specific message descriptor.
[0076] Overlay: A virtual network layer built on top of the existing physical network. It uses tunneling technology to virtualize and isolate the network, providing more flexible network configuration and management.
[0077] Transmission Control Protocol (TCP): A connection-oriented, reliable transport layer protocol used to ensure the ordered transmission of data packets and error detection.
[0078] Internet Protocol (IP): A connectionless network layer protocol used to uniquely identify device addresses in a network and to route and transmit data packets.
[0079] Hyper-Text Transfer Protocol (HTTP): An application-layer protocol used for distributing content, primarily for sending data between web browsers and web servers. HTTP communication is based on the request / response cycle between the client and server.
[0080] Virtual Out-of-Order (VOOO) mechanism: An optimization mechanism that allows the sender to begin releasing packets after receiving acknowledgment messages for some packets, without waiting for acknowledgment messages for all packets, thereby improving transmission efficiency and resource utilization.
[0081] Out-of-order packet delivery: During transmission, packets may arrive in a different order than they were sent due to network conditions or other reasons. The receiving end needs to reorder the packets to restore the original order.
[0082] Inorder Completion: The process of reordering messages at the receiving end according to the sending order to complete processing, ensuring data integrity and reliability.
[0083] Transport Layer: Messages are processed in the transport layer's transport layer according to a "last-in, first-out" (LIFO) method, ensuring the order and integrity of data segments and achieving reliable data transmission.
[0084] VXLAN (Virtual Extensible LAN): A network virtualization technology used to build overlay virtual networks on top of existing physical networks. VXLAN extends the functionality of Virtual Local Area Networks (VLANs) by encapsulating Layer 2 Ethernet frames in Layer 3 UDP packets to achieve Layer 2 connections across multiple physical networks.
[0085] Currently, cloud network systems commonly use overlay virtual network technology (such as VXLAN) for implementation, while device virtualization typically employs virtual transmission technology, as shown in Figure 1.
[0086] Figure 1 shows a schematic diagram of the structure of a cloud network system:
[0087] The cloud network system comprises two virtual machine instances. The host machine of each virtual machine instance includes the virtual machine, the backend devices of the virtual machine instance, and a virtual network switch. At the sending end, user messages are appended with fields covering the virtual network to form network data packets. These packets are then sent to the receiving end via the network link through the virtual network switch, thus enabling data transmission on the virtualized overlay virtual network.
[0088] However, the cloud network system shown in Figure 1 may experience jitter and packet loss due to network congestion and other issues within the network cluster, leading to unstable data transmission, increased latency, and decreased service quality. These problems are particularly pronounced under high load conditions, potentially causing a significant drop in application performance and impacting user experience, such as stuttering in video streaming and latency or disconnections in online games.
[0089] To address the aforementioned issues, a reliable network transport layer similar to TCP is overlaid on the overlay virtual network. When congestion or packet loss occurs in the network link, traffic congestion control and fast retransmission are implemented to reduce packet loss rate and network latency, thereby improving the reliability and efficiency of network transmission. This layer can control the data transmission process by acknowledging received messages, avoiding long delays caused by network congestion. Furthermore, through the fast retransmission mechanism, once packet loss is detected, the lost data packets can be quickly retransmitted, reducing data transmission latency and further improving data transmission speed and stability. This improvement not only enhances the performance of the cloud network system but also improves the user experience, especially in applications with high real-time requirements, such as video conferencing and online games, as shown in Figure 2.
[0090] Figure 2 shows a schematic diagram of another cloud network system:
[0091] Based on the cloud network system shown in Figure 1, a reliable network transport layer is added between the backend device of any virtual machine instance and the virtual network switch. At the sending end, user messages need to have a reliable transport protocol field added to them to form network data packets, which are then sent to the receiving end via the network link through the virtual network switch, thereby achieving highly reliable data transmission on the virtualized overlay virtual network.
[0092] The cloud network system shown in Figure 2, compared to the cloud network system in Figure 1, can better control traffic congestion and perform fast retransmission to reduce the impact of the network on data transmission. It can also be combined with capabilities such as multiple data transmission paths to provide users with lower long-tail latency.
[0093] However, while achieving highly reliable data transmission, the cloud network system shown in Figure 2 introduces the problem of message memory buffering, as shown in Figure 3. Figure 3 illustrates a schematic diagram of a data transmission method applied to a cloud network system.
[0094] In the sending direction, in order to achieve reliable transmission, the sending end is driven by a virtual transmission network. After the backend device obtains and sends the message, it cannot release it immediately, but needs to cache the message in the memory buffer. It can only be released after receiving the confirmation message from the receiving end.
[0095] On the receiving side, in order to avoid out-of-order packets caused by factors such as multipathing, it is also necessary to cache the packets and complete the recording before submitting them to the virtual machine for processing.
[0096] Such high-reliability data transmission requires substantial memory buffers at both the sending and receiving ends. At the sending end, hardware needs to store unacknowledged messages, leading to insufficient memory. At the receiving end, hardware needs to store out-of-order messages, also resulting in insufficient memory. For already resource-constrained virtualized cloud network systems, this additional resource overhead leads to inefficient memory usage, increased costs, and increased system complexity. For example, a 100Gbps (Gigabits per second) network, with a 5ms round-trip time (RTT), requires a 1GB (Gigabyte) memory buffer, which is practically impractical for virtual network switches typically based on Smart Network Interface Cards (SmartNICs) / Data Processing Units (DPUs). This not only limits the scalability of cloud network systems but can also cause performance bottlenecks due to insufficient memory resources. Therefore, finding more efficient data transmission mechanisms and memory management strategies is crucial to solving this problem.
[0097] To address the aforementioned problems, this specification provides a data transmission method. This specification also relates to another data transmission method, a cloud network system, a data transmission device, another data transmission device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0098] In the embodiments described in this specification, by employing an out-of-order mechanism for virtual transmission on top of reliable transmission over a virtual network, and releasing message descriptors at the sending end through delayed acknowledgment, a bufferless mechanism for messages at both the sending and receiving ends is achieved at the reliable transport layer. This avoids the need for large memory buffers, reduces memory usage, and lowers system cost and complexity. This approach not only improves the efficiency of memory resource utilization but also solves performance bottlenecks that may be caused by insufficient memory resources, making it particularly suitable for resource-constrained virtualized cloud network environments. Furthermore, by reducing memory consumption, the overall system performance and response speed can be improved, providing better support for application scenarios with high real-time requirements.
[0099] Specifically, the out-of-order mechanism for virtual transmission is implemented as shown in Figure 5. For comparison, Figure 4 shows a schematic diagram of sequential processing for a data transmission method applied to a cloud network system.
[0100] The virtual transport sequencing mechanism means that the order in which message descriptors are consumed and the order in which they are released are consistent on the device side. The backend device retrieves message buffers from the available table in the order of 1, 2, 3, 4, and also refills the used table in the same order to allow the virtual machine to release the message descriptors stored in the memory buffer.
[0101] Conversely, Figure 5 illustrates a schematic diagram of out-of-order processing in a data transmission method applied to a cloud network system:
[0102] The out-of-order mechanism of virtual transport means that the order in which message descriptors are consumed and the order in which they are released on the device side are unrelated and can be inconsistent. The backend device retrieves the message buffer from the available table in the order of 1, 2, 3, 4, but fills the used table in the order of 4, 2, 3, 1. In this way, the virtual machine will also release the message descriptors stored in the memory buffer in the order of 3, 1, 4, 2.
[0103] Referring to Figure 6, which shows a flowchart of a data transmission method according to an embodiment of this specification, the method is applied to the sending end of a network system, wherein the network system also includes a receiving end. The virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, and includes the following specific steps:
[0104] Step 602: According to the record order of multiple descriptor indices in the available table, retrieve the message descriptors corresponding to multiple descriptor indices from the descriptor table and store them in the memory buffer.
[0105] A network system is a system composed of multiple nodes (such as computers and routers) connected by network links for data transmission. A network system can be a Local Area Network (LAN), a Wide Area Network (WAN), or the Internet. Network systems support various communication protocols, such as TCP / IP and HTTP, to enable data interaction between different devices. For example, a virtualized cloud network system includes multiple virtual machine instances. Another example is an internal enterprise network system, which may include servers, workstations, and personal computers from multiple departments, interconnected through switches and routers, supporting functions such as file sharing, printing services, and internal communication. Yet another example is a network system within a data center, composed of numerous servers, storage devices, and network equipment connected via high-speed networks, supporting large-scale data processing and storage tasks.
[0106] The sending end is the node responsible for sending data to the receiving end during network data transmission. The sending end is a device with network communication capabilities, such as a personal computer, server, or mobile device. The sending end needs to package data into messages and transmit them to the receiving end via a network link. For example, in a virtualized cloud network system, the sending end can be a virtual machine instance. The virtual machine instance packages user data into messages and sends them to another virtual machine instance or physical network via a virtual network switch. As another example, in an internal network system, the sending end can be a workstation or server. For instance, if a server within an enterprise needs to share files with workstations in other departments, the server will package the file data into messages and send them to the target workstation via internal network switches and routers. As yet another example, in a data center network system, if a server within the data center needs to back up large amounts of data to storage devices, the server will package the data into messages and send them to the storage devices via a high-speed network connection. Upon receiving the messages, the storage devices will store the data in a designated location.
[0107] The receiving end is a node responsible for receiving data from the sending end during network data transmission. It is a device with network communication capabilities, such as a personal computer, server, or mobile device. The receiving end receives data packets from the network link, decodes and processes them, and then presents them to the user or performs further processing. For example, in a virtualized cloud network system, the receiving end can be a virtual machine instance. The virtual machine instance receives data packets from another virtual machine instance or the physical network, unpacks them, and processes them. As another example, in an internal network system, the receiving end can be a workstation or server, receiving file-sharing data from the server, unpacking it, and saving the files. Yet another example is a network system within a data center, where the receiving end can be a storage device. The storage device receives data backup messages from servers within the data center, unpacks them, and stores the data in a designated location.
[0108] A virtual buffer is a buffer used in a virtual machine to temporarily store data, typically for data transfer and processing. Virtual buffers are implemented in virtualization environments to alleviate performance bottlenecks caused by direct access to physical resources. A virtual buffer is an area in memory used to temporarily store data until it is further processed or transferred. For example, a virtual circular buffer.
[0109] The availability table, a part of the virtual buffer, records the descriptor indices of packets awaiting processing, indicating which packets are available and notifying backend devices that these packets are ready for transmission and processing. The descriptor index is an index value in the descriptor table used for quick location and access to a specific packet descriptor. The descriptor index is an integer value that points to a specific entry in the descriptor table, enabling the virtual machine or backend device to quickly find the packet descriptor for a particular packet. For example, in a virtualized cloud network system, if a virtual machine is preparing to send four packets with descriptor indices 1, 2, 3, and 4, these four indices will be written sequentially into the availability table, indicating that these packets are ready and awaiting data transmission.
[0110] The used table, a part of the virtual buffer, records the descriptor indices of processed packets, indicating which packets can be released and their associated memory resources freed. For example, in a virtualized cloud network system, if a backend device processes the 4th packet first, followed by the 2nd, 3rd, and 1st packets, the used table will record the indices 4, 2, 3, and 1 respectively, indicating that these packets have been transmitted and the virtual machine can release the corresponding memory.
[0111] The descriptor table, a part of the virtual buffer, records message descriptors that describe information such as the message's location and size in memory. It's a crucial structure for transmitting message information between the virtual machine and backend devices. Each entry corresponds to a message descriptor, containing key information such as the message's starting address and length in memory, enabling the backend device to accurately locate and process these messages. For example, in a virtualized cloud network system, if a message is located at memory address 0x1000 and has a length of 1024 bytes, then the descriptor table will contain an entry recording the message's starting address (0x1000) and length (1024 bytes).
[0112] The record order of multiple descriptor indexes is the record order of the descriptor index in the available table, reflecting the order in which messages are transmitted and processed.
[0113] A memory buffer is a memory area used to temporarily store data, often used as intermediate storage during data transmission to improve efficiency and reliability. Memory buffers can reduce frequent disk I / O operations, increase data processing speed, and also prevent data loss to some extent, enhancing data transmission reliability. For example, during network data transmission, the sending end temporarily stores the data to be sent in a memory buffer until it is successfully transmitted.
[0114] Before retrieving the message descriptors corresponding to the multiple descriptor indices from the descriptor table and storing them in the memory buffer, according to the record order of the multiple descriptor indices in the available table, the following specific steps are also included: retrieving multiple descriptor indices from the available table.
[0115] For example, in a virtualized cloud network system, virtual machine instance A packages user data into packets and writes the descriptor indices (1, 2, 3, 4, 5, 6) of these packets into an availability table. The backend device of virtual machine instance A retrieves six descriptor indices from the availability table: 1, 2, 3, 4, 5, 6. Following the record order of the six descriptor indices in the availability table (1, 2, 3, 4, 5, 6), it retrieves the packet descriptors corresponding to the six descriptor indices from the descriptor table (Packet 1 descriptor: memory address: 0x1000, length: 1024 bytes, other information: checksum, flag bits; Packet 2 descriptor: ...). Message 3 descriptor: Memory address: 0x2000, length: 512 bytes, other information: checksum, flag; Message 4 descriptor: Memory address: 0x3000, length: 768 bytes, other information: checksum, flag; Message 5 descriptor: Memory address: 0x4000, length: 2048 bytes, other information: checksum, flag; Message 6 descriptor: Memory address: 0x5000, length: 1280 bytes, other information: checksum, flag; Message 6 descriptor: Memory address: 0x6000, length: 256 bytes, other information: checksum, flag) and stored in the memory buffer.
[0116] According to the record order of multiple descriptor indexes in the available table, the message descriptors corresponding to multiple descriptor indexes are obtained from the descriptor table and stored in the memory buffer, which improves the efficiency and reliability of data transmission. By obtaining and storing message descriptors in advance, memory usage is reduced and the utilization efficiency of memory resources is improved. At the same time, the sending order of messages is determined for subsequent transmission.
[0117] Step 604: Obtain the target message corresponding to multiple message descriptors according to the record order, and send it to the receiving end.
[0118] A target message refers to a data packet that the sending end retrieves from its memory buffer and prepares to send to the receiving end. A target message is a processed and encapsulated data unit, typically containing header information and payload data. The sending end retrieves the corresponding message descriptor from the memory buffer according to the descriptor index order recorded in the available table, and then retrieves the corresponding message data based on the message descriptor to form the target message and send it. For example, the descriptor of message 1 indicates that the message is located at memory address 0x1000 and has a length of 1024 bytes. The backend device retrieves the message data of message 1 from the memory buffer based on this information, forming target message 1: Header information: source address, destination address, protocol type; Payload data: message data starting from memory address 0x1000 with a length of 1024 bytes.
[0119] According to the recording order, the target packets corresponding to multiple message descriptors can be obtained. One possible method is to obtain the corresponding message descriptors from the memory buffer according to the recording order, obtain the corresponding message data according to the message descriptors, and construct the target packets corresponding to multiple message descriptors according to the message data.
[0120] One possible method for sending packets to the receiving end is via a network link. For example, the target packet can be sent to a virtual machine instance at the receiving end via a virtual network switch (Vswitch). Another example is using VXLAN to encapsulate Layer 2 Ethernet frames within Layer 3 UDP packets, enabling Layer 2 connections across multiple physical networks to send the target packet to the receiving end.
[0121] For example, the backend device, following the recording order, retrieves 1024-byte packet data starting from memory address 0x1000, constructing target packet 1. Similarly, it obtains six target packets: Target packet 1: Header information: source address, destination address, protocol type; Payload data: 1024-byte packet data starting from memory address 0x1000; Target packet 2: Header information: source address, destination address, protocol type; Payload data: 512-byte packet data starting from memory address 0x2000; Target packet 3: Header information: source address... The destination packet consists of six packets: 1. Destination address, 2. Protocol type, and 3. Payload data: 768 bytes starting from memory address 0x3000; 3. Destination packet 4: Header information: source address, destination address, protocol type, and 2048 bytes of payload data starting from memory address 0x4000; 4. Destination packet 5: Header information: source address, destination address, protocol type, and 1280 bytes of payload data starting from memory address 0x5000; 5. Destination packet 6: Header information: source address, destination address, protocol type, and 256 bytes of payload data starting from memory address 0x6000. Virtual machine instance A sends these packets sequentially through a virtual network switch.
[0122] According to the recording order, the target messages corresponding to multiple message descriptors are obtained and sent to the receiving end, which improves the efficiency and reliability of data transmission, reduces memory usage, and reduces data transmission delay and out-of-order problems according to the sending order of messages, thereby improving the reliability and response speed of data transmission and improving the system's response speed and throughput.
[0123] Step 606: Receive confirmation messages for multiple target messages from the receiving end.
[0124] An acknowledgment message for a target packet is generated and sent by the receiving end to the sending end after successfully receiving the target packet. It confirms that the target packet has been successfully received. The acknowledgment message typically contains the descriptor index or other unique identifier of the target packet so that the sending end can accurately identify and process the acknowledgment message. The acknowledgment message ensures the reliability and integrity of data transmission. By receiving the acknowledgment message, the sending end can confirm which packets have been successfully received, thereby releasing corresponding memory resources, enabling retransmission while avoiding duplicate transmissions, and achieving highly reliable data transmission. An acknowledgment message typically contains the following information: Descriptor index: used to identify the received packet. Sequence number: used to identify the transmission order of the packet. Status code: indicates the status of packet reception, such as successful reception or reception failure. Other metadata: such as checksums and timestamps, used to further verify the integrity and accuracy of the packet.
[0125] One possible way to receive acknowledgment messages for multiple target packets from the receiving end is through a network link. For example, this can be done via a virtual network switch (Vswitch). Another example is using VXLAN to encapsulate Layer 2 Ethernet frames within Layer 3 UDP (User Datagram Protocol) packets, enabling Layer 2 connections across multiple physical networks to receive acknowledgment messages for multiple target packets.
[0126] For example, the virtual network switch receives acknowledgment messages for multiple target packets from virtual machine instance B: Acknowledgment message 1: Descriptor index: 4, Sequence number: 4, Status code: Successfully received, Checksum: 0x12345678, Timestamp: 2024-10-2019:25:00; Acknowledgment message 2: Descriptor index: 2, Sequence number: 2, Status code: Successfully received, Checksum: 0x87654321, Timestamp: 2024-10-2019:25:01; Acknowledgment message 3: Descriptor index: 3, Sequence number: 3, Status code: Successfully received, Checksum: 0x11223344, Timestamp Message 4: Descriptor Index: 1, Serial Number: 1, Status Code: Successfully Received, Checksum: 0x44332211, Timestamp: 2024-10-2019:25:03; Message 5: Descriptor Index: 5, Serial Number: 5, Status Code: Successfully Received, Checksum: 0x55667788, Timestamp: 2024-10-2019:25:04; Message 6: Descriptor Index: 6, Serial Number: 6, Status Code: Successfully Received, Checksum: 0x88776655, Timestamp: 2024-10-2019:25:05.
[0127] The receipt of acknowledgment messages for multiple target messages from the receiving end provides support for the receiving order when subsequent record descriptors are indexed into the used table.
[0128] Step 608: Record multiple descriptor indexes into the used table according to the order in which multiple acknowledgment messages are received.
[0129] The receiving order of multiple acknowledgment messages is the chronological order in which the sender receives them. This receiving order may differ from the sending order of the messages because network links between the sender and receiver may experience delays, out-of-order delivery, or other issues during data transmission. The receiving order of acknowledgment messages determines when the sender can safely release message descriptors from its memory buffer without retransmission. It also allows for the gradual release of message descriptors stored in the memory buffer without waiting for all acknowledgment messages to return, thus reducing memory usage and improving system response speed and throughput. For example, the receiving order of acknowledgment messages could be: Acknowledgment message 1, Acknowledgment message 5, Acknowledgment message 2, Acknowledgment message 4, Acknowledgment message 6, Acknowledgment message 3.
[0130] For example, the backend device records the six descriptor indices 1, 5, 2, 4, 6, and 3 in the used table according to the order in which the confirmation messages are received (confirmation message 1, confirmation message 5, confirmation message 2, confirmation message 4, confirmation message 6, confirmation message 3).
[0131] According to the receiving order of multiple acknowledgment messages, multiple descriptor indices are recorded in the used table, which provides support for the release order of message descriptors stored in the memory buffer in the future.
[0132] Step 610: Release the message descriptors stored in the memory buffer according to the record order of the descriptor index in the used table.
[0133] For example, the backend device releases the message descriptors stored in the memory buffer according to the record order of the descriptor index in the used table (1, 5, 2, 4, 6, 3): message 1 descriptor, message 5 descriptor, message 2 descriptor, message 4 descriptor, message 6 descriptor, and message 3 descriptor.
[0134] In the embodiments of this specification, a highly reliable data transmission is achieved at the sending end of the network system by employing an acknowledgment message mechanism. This not only effectively solves the problems of network congestion and jitter packet loss in the network system, but also decouples the sending and releasing order of messages by controlling the record order of the descriptor index in the available and used tables. It allows for the release of some acknowledged message descriptors without waiting for acknowledgment messages to return for all messages, thus realizing out-of-order processing of virtual network transmissions and improving the response speed and throughput of the network system. Furthermore, it eliminates the need to cache the messages themselves, requiring only the maintenance of a small amount of information—the message descriptor—significantly saving memory cache at the sending end and improving the overall performance and resource utilization of the network system.
[0135] In one optional embodiment of this specification, the sending end is deployed with a network transport layer, which includes a transport layer protocol stack; before step 604, the following specific steps are also included: caching multiple message descriptors into the transport layer protocol stack according to the recording order; correspondingly, step 604 includes the following specific steps: obtaining the target message corresponding to the multiple message descriptors according to the caching order of the multiple message descriptors in the transport layer protocol stack, and sending it to the receiving end.
[0136] The network transport layer is the logical layer responsible for data transmission in a network system, and it can reside between the application layer and the network layer. The network transport layer ensures reliable and ordered data transmission between the sender and receiver. It uses various transport protocols (such as TCP and UDP) to segment, encapsulate, transmit, decapsulate, and reassemble data, ensuring data integrity and reliability. Specifically, reliability is achieved through acknowledgment mechanisms, retransmission mechanisms, and flow control to ensure messages reliably reach the receiver. Ordered transmission ensures messages arrive at the receiver in the order they were sent, even if out-of-order transmission occurs in the network. Flow control prevents the sender from sending messages too quickly, overwhelming the receiver. Congestion control prevents network performance degradation by detecting and responding to network congestion.
[0137] The transport layer protocol stack is a collection of protocols and mechanisms implemented in the network transport layer to manage and control the data transmission process. The transport layer protocol stack typically consists of multiple layers, each responsible for different functions, working together to ensure reliable data transmission. The main functions of the transport layer protocol stack can include: message management: managing message buffering, retrieval, and processing; connection management: establishing and maintaining connections between the sender and receiver; acknowledgment mechanism: generating and processing acknowledgment messages to ensure reliable message transmission; retransmission mechanism: detecting lost messages and retransmitting them; flow control: controlling the transmission rate to prevent receiver overload; and congestion control: detecting and responding to network congestion to avoid performance degradation. For example, in virtualized network transport (Virtio), the transport layer protocol stack needs to maintain a descriptor buffer linked list. This descriptor buffer linked list is at the virtual circular buffer granularity and can be shared by multiple virtual machines. When a descriptor buffer linked list is full, it will cause a head-of-line blocking (HOL blocking) problem because messages cannot be retrieved, and subsequent messages need to bypass the network transport layer.
[0138] One option is to cache multiple message descriptors in the transport layer protocol stack according to the recording order.
[0139] According to the caching order of multiple message descriptors in the transport layer protocol stack, the target message corresponding to multiple message descriptors can be obtained. One possible approach is to obtain the corresponding message descriptor according to the caching order of multiple message descriptors in the descriptor cache linked list of the transport layer protocol stack, obtain the corresponding message data according to the message descriptor, and construct the target message corresponding to multiple message descriptors according to the message data.
[0140] For example, multiple message descriptors are cached in the descriptor cache linked list of the transport layer protocol stack according to the recording order. Following the caching order of the multiple message descriptors in the transport layer protocol stack's descriptor cache linked list, starting from memory address 0x1000 with a length of 1024 bytes, the sending end retrieves 1024 bytes of message data from memory address 0x1000 to construct target message 1. Similarly, six target messages are obtained: Target message 1: Header information: source address, destination address, protocol type; Payload data: 1024 bytes of message data starting from memory address 0x1000; Target message 2: Header information: source address, destination address, protocol type; Payload data: 512 bytes of message data starting from memory address 0x2000; Target message 3: ... Header information: source address, destination address, protocol type; payload data: 768 bytes in length, starting from memory address 0x3000; Destination packet 4: Header information: source address, destination address, protocol type; payload data: 2048 bytes in length, starting from memory address 0x4000; Destination packet 5: Header information: source address, destination address, protocol type; payload data: 1280 bytes in length, starting from memory address 0x5000; Destination packet 6: Header information: source address, destination address, protocol type; payload data: 256 bytes in length, starting from memory address 0x6000. The sending end sends destination packets 1, 2, 3, 4, 5, and 6 sequentially through a virtual network switch.
[0141] In the embodiments described in this specification, by deploying a transport layer protocol stack in the network transport layer, ordered caching and processing of message descriptors are achieved, effectively solving network congestion and head blocking problems, ensuring the reliability and orderliness of data transmission, reducing memory usage, improving system response speed and throughput, and enhancing overall performance and resource utilization.
[0142] In one optional embodiment of this specification, after step 602, the following specific step is further included: updating the multiple descriptor indexes recorded in the available table.
[0143] It should be noted that after retrieving the message descriptor from the descriptor table according to the record order of the descriptor index in the available table, the used table is not updated temporarily (i.e., no completion event is generated). The available descriptor index can be updated at this time, and the slots in the available table can be overwritten without waiting for the used table to be updated.
[0144] For example, after retrieving descriptor indexes 1, 2, 3, 4, 5, and 6 from the available table, the aforementioned descriptor indexes can be updated so that these slots can be covered by the new descriptor indexes.
[0145] In the embodiments of this specification, by updating the descriptor index in the available table immediately after extracting the message descriptor, without waiting for the update of the used table, memory usage is effectively reduced, the response speed and throughput of the network system are improved, delays caused by waiting for the update of the used table are avoided, the rapid processing and transmission of messages are ensured, and the overall performance and resource utilization are improved. In particular, in high-load and resource-constrained network systems, the efficiency and reliability of data transmission are significantly improved.
[0146] In one optional embodiment of this specification, after step 604, the following specific steps are further included: if no acknowledgment message for receiving the first target message is received, the first target message is obtained and sent to the receiving end, wherein the first target message is any one of a plurality of target messages.
[0147] The first destination message is any one of the multiple destination messages sent by the sender during network data transmission that has not received an acknowledgment message. Retransmission of the first destination message ensures the reliability of data transmission.
[0148] The acknowledgment message for the first destination message is generated and sent by the receiving end to the sending end after successfully receiving the first destination message. It confirms that the first destination message has been successfully received. The acknowledgment message typically contains the descriptor index or other unique identifier of the first destination message so that the sending end can accurately identify and process the acknowledgment message; see the description above for details.
[0149] If no acknowledgment message for the first target message is received, one possible way to obtain the first target message is to retrieve the message descriptor corresponding to the first target message from the memory buffer, obtain the corresponding message data based on the message descriptor, and construct the first target message corresponding to the message descriptor based on the message data.
[0150] For example, if the target message 3 is lost during transmission, causing virtual machine instance A to not receive its acknowledgment message within a predetermined time, the backend device will retrieve the message data of message 3 again based on the cached descriptor information, construct and send the retransmitted target message 3. Only when virtual machine instance A receives the acknowledgment message of message 3 will the descriptor index of message 3 be recorded in the used table, thus completing the processing of the message.
[0151] In the embodiments described in this specification, by reacquiring and retransmitting the first target message when no acknowledgment message is received, the reliability and integrity of data transmission are ensured. The retransmission mechanism effectively reduces data transmission failures caused by network packet loss or delay, improves the system's response speed and throughput, and at the same time, timely retransmission of unacknowledged messages avoids unnecessary resource waste and improves overall performance and resource utilization. Especially in high-load and resource-constrained network environments, it significantly improves the efficiency and reliability of data transmission.
[0152] Taking virtualized network transmission as an example, Figures 7-10 will be used to illustrate the embodiment of the description in Figure 6 above. Figure 7 shows one of the schematic flowcharts of a data transmission method provided in one embodiment of this specification:
[0153] The sending end includes two network flow packets: a vertical background color identifies network flow A, and a horizontal background color identifies network flow B. The descriptor indexes of the two network flow packets are recorded in an availability table for retrieval by the backend device.
[0154] The backend device retrieves the descriptor indexes according to the descriptor index order recorded in the available table: 1, 2, 3, 4, 5, 6, and obtains the corresponding packet descriptor from the descriptor table according to the record order of the descriptor indexes.
[0155] Figure 8 shows a second schematic flowchart of a data transmission method provided in one embodiment of this specification:
[0156] In the transport layer protocol stack, a descriptor cache linked list needs to be maintained. This descriptor cache linked list is a virtualized circular buffer granularity that can be shared by multiple virtual machines. When a descriptor cache linked list becomes full, a header blocking problem will occur because packets cannot be retrieved, and subsequent packets will need to bypass the network transport layer.
[0157] Once the message descriptor is removed from the descriptor table, the used table is not updated temporarily (i.e., no completion event is generated). The available descriptor index can be updated at this time, meaning that the slots in the used table can be overwritten without waiting for the used table to be updated.
[0158] Figure 9 shows a third schematic flowchart of a data transmission method provided in one embodiment of this specification:
[0159] In the transport layer protocol stack, a message is sent and an acknowledgment message is awaited. If the acknowledgment message reception order is 1, 5, 2, 4, 6, the transport layer protocol stack notifies the backend device to update the used table according to this reception order. At this point, the virtual machine kernel can reclaim and release the memory buffer corresponding to descriptors 1, 2, 4, 5, and 6.
[0160] Figure 10 shows a fourth schematic flowchart of a data transmission method provided in one embodiment of this specification:
[0161] The loss of packet 3 in network data stream A causes a timeout. The transport layer protocol stack, based on the cached packet descriptor, notifies the backend device to retrieve the packet data from the virtual machine, construct packet 3, and retransmit it. This continues until an acknowledgment message for packet 3 is received. The transport layer protocol stack then notifies the backend device to record the descriptor index of packet 3 in the used table (generating a completion event).
[0162] As shown in Figures 7 to 10, by maintaining only message descriptors at the network transport layer and not the message data, the memory cache at the sending end is greatly saved, and the overall performance and resource utilization of the network system are improved.
[0163] Referring to Figure 11, which shows a flowchart of another data transmission method provided in an embodiment of this specification, the method is applied to the receiving end of a network system. The network system also includes a sending end, whose virtual buffer contains an available table, a used table, and a descriptor table. The method includes the following specific steps:
[0164] Step 1102: Receive multiple target messages sent by the sender. The sending steps of multiple target messages at the sender include: obtaining the message descriptors corresponding to the multiple descriptor indices in the descriptor table according to the record order of the multiple descriptor indices in the available table and storing them in the memory buffer; obtaining the target messages corresponding to the multiple message descriptors according to the record order and sending them to the receiver.
[0165] One possible way to receive multiple target packets sent by a sender is through a network link. For example, this can be done via a virtual network switch (Vswitch). Another example is using VXLAN to encapsulate Layer 2 Ethernet frames within Layer 3 UDP packets, enabling Layer 2 connections across multiple physical networks and receiving multiple target packets from the sender.
[0166] For example, in a virtualized cloud network system, virtual machine instance B receives six target packets sent by virtual machine instance A: Target packet 1: Header information: source address, destination address, protocol type; Payload data: 1024 bytes of data starting from memory address 0x1000; Target packet 2: Header information: source address, destination address, protocol type; Payload data: 512 bytes of data starting from memory address 0x2000; Target packet 3: Header information: source address, destination address, protocol type; Payload data: 512 bytes of data starting from memory address 0x3000. Message 4: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x4000, 2048 bytes in length; Message 5: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x5000, 1280 bytes in length; Message 6: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x6000, 256 bytes in length.
[0167] It receives multiple target messages sent by the sending end, providing sequential support for subsequently sending confirmation messages of receipt of multiple target messages back to the sending end.
[0168] Step 1104: According to the receiving order of multiple target messages, send back confirmation messages of multiple target messages to the sending end. The receiving steps of multiple confirmation messages at the sending end include: receiving the confirmation messages of multiple target messages sent back by the receiving end; recording multiple descriptor indices in the used table according to the receiving order of multiple confirmation messages; and releasing the message descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
[0169] The receiving order of multiple target packets is the chronological order in which the receiving end receives them. This receiving order may differ from the sending order because network delays and out-of-order delivery may occur during data transmission between the receiving and sending ends. The receiving order of target packets determines when to send acknowledgment messages for multiple target packets. Furthermore, the sending end determines when it can safely release the packet descriptors in the memory buffer without retransmission. It can also gradually release the packet descriptors stored in the memory buffer without waiting for all acknowledgment messages to return, thus reducing memory usage and improving system response speed and throughput. For example, the receiving order of target packets might be: Target Packet 1, Target Packet 5, Target Packet 2, Target Packet 4, Target Packet 6, Target Packet 3.
[0170] One possible approach is to send acknowledgment messages for multiple target messages to the sender in the order in which they are received.
[0171] For example, based on the receiving order: target message 1, target message 5, target message 2, target message 4, target message 6, target message 3, virtualization instance B generates and sends back confirmation messages: Confirmation Message 1: Descriptor Index: 1, Sequence Number: 1, Status Code: Successfully Received, Checksum: 0x44332211, Timestamp: 2024-10-2019:25:03; Confirmation Message 5: Descriptor Index: 5, Sequence Number: 5, Status Code: Successfully Received, Checksum: 0x55667788, Timestamp: 2024-10-2019:25:04; Confirmation Message 2: Descriptor Index: 2, Sequence Number: 2, Status Code: Successfully Received, Checksum: 0 x87654321, timestamp: 2024-10-2019:25:01; Acknowledgment message 4: Descriptor index: 4, sequence number: 4, status code: successful reception, checksum: 0x12345678, timestamp: 2024-10-2019:25:00; Acknowledgment message 6: Descriptor index: 6, sequence number: 6, status code: successful reception, checksum: 0x88776655, timestamp: 2024-10-2019:25:05; Acknowledgment message 3: Descriptor index: 3, sequence number: 3, status code: successful reception, checksum: 0x11223344, timestamp: 2024-10-2019:25:02.
[0172] The embodiments in this specification and the examples in Figure 6 above are based on the same inventive concept, respectively, and represent the implementation of the data transmission method at the sending end and receiving end of the network system. For details not described in detail, please refer to the description of the embodiments in Figure 6 above.
[0173] In the embodiments of this specification, a highly reliable data transmission is achieved at the receiving end of the network system by employing an acknowledgment message mechanism. This not only effectively solves the problems of network congestion and jitter packet loss in the network system, but also, in conjunction with the sending end of the network system, decouples and separates the sending order and release order of packets by controlling the record order of descriptor indexes in the available and used tables. It allows for the release of some acknowledged packet descriptors without waiting for acknowledgment messages to return for all packets, realizing out-of-order processing of virtual network transmissions, improving the response speed and throughput of the network system. Furthermore, it eliminates the need to cache the packets themselves, requiring only the maintenance of a small amount of information—the packet descriptors—significantly saving memory cache at the sending end and improving the overall performance and resource utilization of the network system.
[0174] In one optional embodiment of this specification, the virtual buffer of the receiving end is provided with an availability table and a descriptor table; before step 1104, the following specific steps are also included: according to the receiving order of multiple target packets, the descriptor indices corresponding to the multiple target packets are recorded in the availability table, and the packet descriptors corresponding to the multiple descriptor indices are recorded in the descriptor table.
[0175] For example, in a virtualized cloud network system, virtual machine instance B receives six target packets sent by virtual machine instance A in the following order: target packet 1, target packet 5, target packet 2, target packet 4, target packet 6, and target packet 3. Based on this order, virtual machine instance B performs the following operations: Upon receiving target packet 1, it records descriptor index 1 in the available table and records the descriptor of target packet 1 (memory address 0x1000, length 1024 bytes, etc.) in the descriptor table. Upon receiving target packet 5, it records descriptor index 5 in the available table and records the descriptor of target packet 5 (memory address 0x5000, length 1280 bytes, etc.) in the descriptor table. Upon receiving target packet 2, it records descriptor index 2 in the available table and records the descriptor of target packet 2 (memory address 0x2000, length 512 bytes, etc.) in the descriptor table. Upon receiving target packet 4, descriptor index 4 is recorded in the availability table, and the descriptor of target packet 4 (memory address 0x4000, length 2048 bytes, etc.) is also recorded in the descriptor table. Upon receiving target packet 6, descriptor index 6 is recorded in the availability table, and the descriptor of target packet 6 (memory address 0x6000, length 256 bytes, etc.) is also recorded in the descriptor table. Upon receiving target packet 3, descriptor index 3 is recorded in the availability table, and the descriptor of target packet 3 (memory address 0x3000, length 768 bytes, etc.) is also recorded in the descriptor table.
[0176] In the embodiments of this specification, by setting up an availability table and a descriptor table in the virtual buffer of the receiving end, and after receiving multiple target messages, recording the descriptor index of the target messages in the availability table according to the receiving order, and recording the descriptor information in the descriptor table, efficient management and tracking of message receiving status are achieved, thereby improving the efficiency and reliability of data transmission.
[0177] In one optional embodiment of this specification, the virtual buffer of the receiving end is further provided with a used table; after recording the descriptor indexes corresponding to the multiple target packets into the available table according to the receiving order of the multiple target packets, the following specific steps are also included: determining whether the multiple received target packets are all the target packets in the network data stream to which they belong; if so, based on the descriptor indexes corresponding to the multiple target packets in the descriptor table, storing the packet descriptors corresponding to the multiple target packets into the memory buffer, and recording the descriptor indexes corresponding to the multiple target packets into the used table.
[0178] A network data stream is a series of consecutive data packets transmitted from the sender to the receiver during network transmission. These packets belong to the same data transmission session or connection and typically share identifiers such as source address, destination address, and protocol type. For example, in a network system, if the sender needs to transmit a large file to the receiver, this file is divided into multiple smaller packets, each transmitted as an independent data unit. These packets constitute a network data stream: Source address: the sender's IP address; Destination address: the IP address of virtual machine instance B; Protocol type: TCP; Message 1: Header information: source address, destination address, protocol type; Payload data: 1024 bytes of data starting from memory address 0x1000; Message 2: Header information: source address, destination address, protocol type; Payload data: 512 bytes of data starting from memory address 0x2000; Message 3: Header information: source address, destination address, protocol type; Payload data: 512 bytes of data starting from memory address 0x2000; Message 4: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x4000, with a length of 768 bytes; Message 5: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x5000, with a length of 1280 bytes; Message 6: Header information: source address, destination address, protocol type; Payload data: starting from memory address 0x6000, with a length of 256 bytes.
[0179] One possible way to determine whether multiple received target packets constitute all target packets in the network data stream is to use sequence numbers and / or end flags recorded in the transport layer protocol stack. For example, check if the sequence numbers in the descriptor table are consecutive. Sequence number continuity ensures packet integrity and order. If the received packets have sequence numbers 1, 2, 3, 4, 5, and 6, and none are missing, then these packets constitute a complete network data stream. Another method is to check if the last packet contains an end flag. Some protocols (such as TCP) include a special end flag (such as the FIN flag) in the last packet; this flag can be checked to confirm the end of the data stream.
[0180] For example, based on the sequence number and / or end marker recorded in the transport layer protocol stack, it is determined that the six received target packets are all target packets in the network data stream (network data stream A: target packet 1, target packet 3, target packet 5; network data stream: target packet 2, target packet 4, target packet 6). Based on the descriptor index corresponding to the six target packets in the descriptor table, the packet descriptors corresponding to the six target packets (the descriptor of target packet 1 (memory address 0x1000, length 1024 bytes, etc.), the descriptor of target packet 5 (memory address 0x1000, length 1024 bytes, etc.) are used to determine the target packets. The descriptors of target packets 1 (memory address 0x5000, length 1280 bytes, etc.), 2 (memory address 0x2000, length 512 bytes, etc.), 4 (memory address 0x4000, length 2048 bytes, etc.), 6 (memory address 0x6000, length 256 bytes, etc.), and 3 (memory address 0x3000, length 768 bytes, etc.) are stored in the memory buffer, and the descriptor indices (1, 5, 2, 4, 6, 3) corresponding to the six target packets are recorded in the used table.
[0181] In the embodiments of this specification, by setting a used table in the virtual buffer at the receiving end, and after receiving multiple target packets, determining whether these packets are all packets in the network data stream to which they belong, if so, the descriptors of these packets are stored in the memory buffer, and the descriptor index is recorded in the used table, the order management of received packets is realized, ensuring the integrity and order of data, improving the reliability of data transmission, optimizing the use of memory resources, improving the system's response speed and throughput, and ensuring the stability and efficient operation of the system.
[0182] In one optional embodiment of this specification, after determining whether multiple target packets are all packets in the network data stream, the following specific steps are further included: if not, wait to receive the remaining target packets in the network data stream.
[0183] For example, target packet 1 of network data stream B has not yet arrived, and target packet 2 of network data stream B has not yet arrived. The system waits to receive the remaining target packets in the network data stream. After receiving target packet 1 and target packet 2, the system returns to determine whether the six received target packets are all the target packets in the network data stream. Then, based on the descriptor indexes of the six target packets in the descriptor table, the system stores the packet descriptors corresponding to the six target packets in the memory buffer and records the descriptor indices (1, 5, 2, 4, 6, 3) corresponding to the six target packets in the used table.
[0184] In the embodiments of this specification, by setting a used table in the virtual buffer of the receiving end, and after receiving multiple target packets, determining whether these packets are all the packets in the network data stream, if not, waiting to receive the remaining target packets in the network data stream, the order management of the received packets is realized, ensuring the integrity and order of the data, improving the reliability of data transmission, optimizing the use of memory resources, improving the system's response speed and throughput, and ensuring the stability and efficient operation of the system.
[0185] In one optional embodiment of this specification, the receiving end is equipped with a network transport layer, which includes a transport layer protocol stack; before step 1104, the following specific steps are also included: according to the receiving order of multiple target packets, the packet descriptors corresponding to the multiple target packets are stored in the transport layer protocol stack.
[0186] Correspondingly, step 1104 includes the following specific steps: according to the caching order of multiple message descriptors in the transport layer protocol stack, record the descriptor indexes corresponding to multiple target messages in the available table.
[0187] According to the receiving order of multiple target packets, the packet descriptors corresponding to multiple target packets are stored in the transport layer protocol stack. One possible approach is to cache the descriptor indexes corresponding to multiple target packets in the descriptor cache linked list of the transport layer protocol stack according to the receiving order of multiple target packets.
[0188] According to the caching order of multiple message descriptors in the transport layer protocol stack, the descriptor indices corresponding to multiple target messages are recorded in the available table. One possible approach is to record the descriptor indices corresponding to multiple target messages in the available table according to the caching order of multiple message descriptors in the descriptor cache linked list of the transport layer protocol stack.
[0189] For example, virtual machine instance B receives six target packets sent by virtual machine instance A, in the following order: target packet 1, target packet 5, target packet 2, target packet 4, target packet 6, and target packet 3. Upon receiving target packet 1, the descriptor of target packet 1 (memory address 0x1000, length 1024 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Upon receiving target packet 5, the descriptor of target packet 5 (memory address 0x5000, length 1280 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Upon receiving target packet 2, the descriptor of target packet 2 (memory address 0x2000, length 512 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Upon receiving target packet 4, the descriptor of target packet 4 (memory address 0x4000, length 2048 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Upon receiving target packet 6, the descriptor of target packet 6 (memory address 0x6000, length 256 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Upon receiving target packet 3, the descriptor of target packet 3 (memory address 0x3000, length 768 bytes, etc.) is cached in the descriptor cache list of the transport layer protocol stack. Following the caching order of multiple packet descriptors in the descriptor cache list of the transport layer protocol stack, the descriptor index 1 of target packet 1 is recorded in the available table, the descriptor index 5 of target packet 5 is recorded in the available table, the descriptor index 2 of target packet 2 is recorded in the available table, the descriptor index 4 of target packet 4 is recorded in the available table, the descriptor index 6 of target packet 6 is recorded in the available table, and the descriptor index 3 of target packet 3 is recorded in the available table.
[0190] In the embodiments of this specification, by deploying a network transport layer at the receiving end, including a transport layer protocol stack, the message descriptors are cached in the transport layer protocol stack according to the receiving order, and the descriptor indexes are recorded in the available table according to the caching order. This achieves orderly management and efficient processing of multiple target messages and their descriptors, improves data processing efficiency, ensures data integrity and order, optimizes the use of memory resources, improves system response speed and throughput, and ensures system stability and efficient operation.
[0191] Taking virtualized network transmission as an example, Figures 12-15 will be used to illustrate the embodiment of the specification in Figure 11 above. Figure 12 shows one of the schematic flowcharts of another data transmission method provided by an embodiment of this specification:
[0192] At the receiving end, there are two network flow packets: the vertical background color identifies the packet of network flow data A, and the horizontal background color identifies the packet of network flow data B.
[0193] When the transport layer protocol stack receives a message, it needs to wait for the message to be successfully placed into the virtual machine queue before it can reply with an acknowledgment message to the sender. Since messages may be out of order during transmission, network data stream A is sent in the order of messages 1, 3, 5, but arrives at the receiver in the order of 3, 5, 1. Network data stream B is sent in the order of messages 2, 4, 6, but arrives in the order of 2, 6, 4. At this time, message 1 of network data stream A has not yet arrived, and message 4 of network data stream B has not yet arrived.
[0194] Figure 13 shows a second schematic flowchart of another data transmission method provided in one embodiment of this specification:
[0195] At this point, in order to avoid caching packets, the transport layer protocol stack directly puts the descriptor index corresponding to the packet into the available table of the receiving end in the order of receipt, and replies to the sending end with the corresponding acknowledgment message. However, for network data A, packet 1 has not yet arrived, so the virtual machine cannot be notified to receive packets 2 and 3, otherwise it will lead to out-of-order delivery. Similarly, for network data stream B, packet 4 has not yet arrived, so the transport layer protocol stack can only cache the descriptor index of packet 1. Therefore, it only updates the completion event of the packet descriptor corresponding to packet 2 of network data stream B in the used table.
[0196] Figure 14 shows a third schematic flowchart of another data transmission method provided in one embodiment of this specification:
[0197] Next, packet 1 from network data stream A arrives. The transport layer protocol stack first places packet 1 into the virtual machine through the backend device and updates the available table. At the same time, since packets 1, 3, and 5 from network data stream A have all arrived in sequence, the used table is updated.
[0198] Figure 15 shows a fourth schematic flowchart of another data transmission method provided in one embodiment of this specification:
[0199] Next, packet 4 from network data stream B arrives. The transport layer protocol stack first places packet 4 into the virtual machine through the backend device and updates the available table. Simultaneously, since packets 2, 4, and 6 from network data stream B have all arrived in sequence, the used table is updated.
[0200] As shown in Figures 12 to 15, the effect of out-of-order message transmission and sequential completion is achieved. This avoids buffering a large number of messages at the network transport layer in order for the virtual machine to perceive out-of-order messages. Instead, only the descriptor index and message descriptor need to be cached, which greatly saves the memory cache of the receiving end and improves the overall performance and resource utilization of the network system.
[0201] Corresponding to the above method embodiments, this specification also provides a cloud network system embodiment. Figure 16 shows a schematic diagram of the structure of a cloud network system provided in one embodiment of this specification. As shown in Figure 16, the cloud network system 1600 includes a first virtual machine instance 1610 and a second virtual machine instance 1620. The virtual buffer of the first virtual machine instance 1610 is provided with an available table, a used table, and a descriptor table.
[0202] The first virtual machine instance 1610 is used to retrieve the message descriptors corresponding to the multiple descriptor indices in the descriptor table according to the record order of the multiple descriptor indices in the available table and store them in the memory buffer. It also retrieves the target message corresponding to the multiple message descriptors according to the record order and sends it to the second virtual machine instance 1620.
[0203] The second virtual machine instance 1620 is used to receive multiple target messages sent by the first virtual machine instance 1610, and to send back confirmation messages of receiving multiple target messages to the first virtual machine instance 1610 in the order of receiving the multiple target messages.
[0204] The first virtual machine instance 1610 is also used to receive confirmation messages of multiple target messages fed back by the second virtual machine instance 1620, record multiple descriptor indices in the used table according to the receiving order of the multiple confirmation messages, and release the message descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
[0205] In the embodiments described in this specification, a message acknowledgment mechanism is used to achieve highly reliable data transmission. This not only effectively solves the problems of network congestion and jitter packet loss in the cloud network system, but also decouples the sending and releasing order of messages by controlling the record order of the descriptor index in the available and used tables. It can start releasing some confirmed message descriptors without waiting for the return of acknowledgment messages for all messages, realizing out-of-order processing of virtual network transmission, improving the response speed and throughput of the cloud network system. At the same time, it does not require caching the messages themselves, but only needs to maintain the small amount of information of message descriptors, which greatly saves the memory cache of the first virtualization instance and improves the overall performance and resource utilization of the cloud network system.
[0206] The above is an illustrative scheme of a cloud network system according to this embodiment. It should be noted that the technical solution of this cloud network system and the technical solution of the above-described data transmission method belong to the same concept. For details not described in detail in the technical solution of the cloud network system, please refer to the description of the technical solution of the above-described data transmission method.
[0207] Corresponding to the above method embodiments, this specification also provides embodiments of a data transmission device. Figure 17 shows a schematic diagram of the structure of a data transmission device provided in one embodiment of this specification. As shown in Figure 17, this device is applied to the sending end of a network system, wherein the network system also includes a receiving end. The virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, including:
[0208] The first acquisition module 1702 is configured to retrieve the message descriptors corresponding to the multiple descriptor indices from the descriptor table and store them in the memory buffer according to the record order of the multiple descriptor indices in the available table.
[0209] The first sending module 1704 is configured to obtain the target message corresponding to multiple message descriptors in the order of recording and send it to the receiving end;
[0210] The first receiving module 1706 is configured to receive acknowledgment messages for multiple target messages fed back by the receiving end;
[0211] The first record module 1708 is configured to record multiple descriptor indexes into the used table according to the receiving order of multiple acknowledgment messages;
[0212] The first release module 1710 is configured to release message descriptors stored in the memory buffer according to the record order of the record descriptor index in the used table.
[0213] Optionally, the sending end is equipped with a network transport layer, which includes a transport layer protocol stack; the device further includes: a first buffer module, configured to buffer multiple message descriptors into the transport layer protocol stack in the order of recording;
[0214] Correspondingly, the first sending module 1704 is further configured to: obtain the target message corresponding to the multiple message descriptors according to the cache order of the multiple message descriptors in the transport layer protocol stack, and send it to the receiving end.
[0215] Optionally, the apparatus further includes a first update module configured to update multiple descriptor indexes of records in the available table.
[0216] Optionally, the device further includes: a first retransmission module, configured to acquire the first target message and send it to the receiving end if no acknowledgment message for receiving the first target message is received, wherein the first target message is any one of a plurality of target messages.
[0217] In the embodiments of this specification, a highly reliable data transmission is achieved at the sending end of the network system by employing an acknowledgment message mechanism. This not only effectively solves the problems of network congestion and jitter packet loss in the network system, but also decouples the sending and releasing order of messages by controlling the record order of the descriptor index in the available and used tables. It allows for the release of some acknowledged message descriptors without waiting for acknowledgment messages to return for all messages, thus realizing out-of-order processing of virtual network transmissions and improving the response speed and throughput of the network system. Furthermore, it eliminates the need to cache the messages themselves, requiring only the maintenance of a small amount of information—the message descriptor—significantly saving memory cache at the sending end and improving the overall performance and resource utilization of the network system.
[0218] The above is an illustrative scheme of a data transmission device according to this embodiment. It should be noted that the technical solution of this data transmission device and the technical solution of the data transmission method described above belong to the same concept. For details not described in detail in the technical solution of the data transmission device, please refer to the description of the technical solution of the data transmission method described above.
[0219] Corresponding to the above method embodiments, this specification also provides embodiments of data transmission devices. Figure 18 shows a schematic diagram of another data transmission device provided in one embodiment of this specification. As shown in Figure 18, this device is applied to the receiving end of a network system, wherein the network system also includes a sending end. The virtual buffer of the sending end is configured with an available table, a used table, and a descriptor table, including:
[0220] The second receiving module 1802 is configured to receive multiple target messages sent by the sending end. The sending steps of the multiple target messages at the sending end include: retrieving the message descriptors corresponding to the multiple descriptor indices in the descriptor table according to the record order of the multiple descriptor indices in the available table and storing them in the memory buffer; retrieving the target messages corresponding to the multiple message descriptors according to the record order and sending them to the receiving end.
[0221] The second feedback module 1804 is configured to send back acknowledgment messages for multiple target messages to the sender in the order in which they are received. The steps for receiving the multiple acknowledgment messages at the sender include: receiving the acknowledgment messages for multiple target messages from the receiver; recording multiple descriptor indices in a used table in the order in which the acknowledgment messages are received; and releasing the message descriptors stored in the memory buffer in the order in which the descriptor indices are recorded in the used table.
[0222] Optionally, the virtual buffer at the receiving end is configured with an availability table and a descriptor table; the device further includes: a second recording module, configured to record the descriptor indices corresponding to the multiple target packets into the availability table and the packet descriptors corresponding to the multiple descriptor indices into the descriptor table according to the receiving order of the multiple target packets.
[0223] Optionally, the virtual buffer at the receiving end is further provided with a used table; the device also includes: a second storage module, configured to determine whether the multiple received target packets are all the target packets in the network data stream to which they belong; if so, based on the descriptor indexes corresponding to the multiple target packets in the descriptor table, the packet descriptors corresponding to the multiple target packets are stored in the memory buffer, and the descriptor indexes corresponding to the multiple target packets are recorded in the used table.
[0224] Optionally, the device further includes a second waiting module configured to wait to receive the remaining target packets in the network data stream if no.
[0225] Optionally, the receiving end is equipped with a network transport layer, which includes a transport layer protocol stack; the device further includes: a second buffer module, configured to store the message descriptors corresponding to the multiple target messages in the transport layer protocol stack according to the receiving order of the multiple target messages;
[0226] Correspondingly, the second recording module is further configured to record the descriptor indexes corresponding to multiple target packets into the available table according to the caching order of multiple packet descriptors in the transport layer protocol stack.
[0227] In the embodiments of this specification, a highly reliable data transmission is achieved at the receiving end of the network system by employing an acknowledgment message mechanism. This not only effectively solves the problems of network congestion and jitter packet loss in the network system, but also, in conjunction with the sending end of the network system, decouples and separates the sending order and release order of packets by controlling the record order of descriptor indexes in the available and used tables. It allows for the release of some acknowledged packet descriptors without waiting for acknowledgment messages to return for all packets, realizing out-of-order processing of virtual network transmissions, improving the response speed and throughput of the network system. Furthermore, it eliminates the need to cache the packets themselves, requiring only the maintenance of a small amount of information—the packet descriptors—significantly saving memory cache at the sending end and improving the overall performance and resource utilization of the network system.
[0228] The above is an illustrative scheme of a data transmission device according to this embodiment. It should be noted that the technical solution of this data transmission device and the technical solution of the data transmission method described above belong to the same concept. For details not described in detail in the technical solution of the data transmission device, please refer to the description of the technical solution of the data transmission method described above.
[0229] Figure 19 shows a structural block diagram of a computing device according to an embodiment of this specification. The components of the computing device 1900 include, but are not limited to, a memory 1910 and a processor 1920. The processor 1920 is connected to the memory 1910 via a bus 1930, and a database 1950 is used to store data.
[0230] The computing device 1900 also includes an access device 1940, which enables the computing device 1900 to communicate via one or more networks 1960. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1940 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or Near Field Communication (NFC).
[0231] In one embodiment of this specification, the aforementioned components of the computing device 1900, as well as other components not shown in FIG19, may be interconnected, for example, via a bus. It should be understood that the block diagram of the computing device shown in FIG19 is merely for illustrative purposes and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0232] The computing device 1900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 1900 can also be a mobile or stationary server.
[0233] The processor 1920 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described data transmission method.
[0234] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described data transmission method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described data transmission method.
[0235] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described data transmission method.
[0236] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-described data transmission method belong to the same concept, and all details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the above-described data transmission method.
[0237] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data transmission method.
[0238] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above-described data transmission method belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the above-described data transmission method.
[0239] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0240] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0241] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0242] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0243] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A data transmission method applied at the sending end of a network system, wherein, The network system further includes a receiving end. The sending end's virtual buffer is configured with an available table, a used table, and a descriptor table, including: retrieving message descriptors corresponding to the multiple descriptor indices in the descriptor table according to the recording order of the multiple descriptor indices in the available table and storing them in a memory buffer; retrieving target packets corresponding to the multiple message descriptors according to the recording order and sending them to the receiving end; receiving acknowledgment messages for the multiple target packets from the receiving end; recording the multiple descriptor indices in the used table according to the receiving order of the multiple acknowledgment messages; and releasing the message descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
2. The method according to claim 1, wherein the sending end is equipped with a network transport layer, the network transport layer including a transport layer protocol stack; and before obtaining the target packets corresponding to multiple message descriptors according to the recording order and sending them to the receiving end, the method further includes: According to the recorded order, multiple message descriptors are cached in the transport layer protocol stack; The step of obtaining target packets corresponding to multiple message descriptors according to the recorded order and sending them to the receiving end includes: obtaining target packets corresponding to multiple message descriptors according to the cached order of the multiple message descriptors in the transport layer protocol stack and sending them to the receiving end.
3. The method according to claim 1, after obtaining the message descriptors corresponding to the plurality of descriptor indices from the descriptor table according to the record order of the plurality of descriptor indices in the available table and storing them in the memory buffer, further includes: Update the indexes of the descriptors recorded in the available tables.
4. The method according to any one of claims 1-3, further comprising, after obtaining the target message corresponding to the plurality of message descriptors according to the recording order and sending it to the receiving end: If no acknowledgment message for receiving the first target message is received, the first target message is acquired and sent to the receiving end, wherein the first target message is any one of the plurality of target messages.
5. A data transmission method applied at the receiving end of a network system, wherein, The network system further includes a sending end. The sending end's virtual buffer contains an available table, a used table, and a descriptor table. The system includes: receiving multiple target packets sent by the sending end; wherein the sending steps of the multiple target packets at the sending end include: retrieving packet descriptors corresponding to the multiple descriptor indices from the descriptor table according to the recording order of the multiple descriptor indices in the available table and storing them in a memory buffer; retrieving target packets corresponding to the multiple packet descriptors according to the recording order and sending them to the receiving end; and feeding back acknowledgment messages of the multiple target packets to the sending end according to the receiving order of the multiple target packets. The receiving steps of the multiple acknowledgment messages at the sending end include: receiving the acknowledgment messages of the multiple target packets fed back by the receiving end; recording the multiple descriptor indices in the used table according to the receiving order of the multiple acknowledgment messages; and releasing the packet descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
6. The method according to claim 5, wherein the virtual buffer of the receiving end is provided with an availability table and a descriptor table; and before feeding back acknowledgment messages of the plurality of target messages to the sending end in the order of receiving the plurality of target messages, the method further includes: According to the receiving order of the multiple target packets, the descriptor indexes corresponding to the multiple target packets are recorded in the available table, and the packet descriptors corresponding to the multiple descriptor indices are recorded in the descriptor table.
7. The method according to claim 6, wherein the virtual buffer of the receiving end further includes a used table; after recording the descriptor indices corresponding to the plurality of target packets into the used table according to the receiving order of the plurality of target packets, the method further includes: Determine whether the received multiple target packets are all the target packets in the network data stream to which they belong; If so, based on the descriptor indexes corresponding to the multiple target packets in the descriptor table, the packet descriptors corresponding to the multiple target packets are stored in the memory buffer, and the descriptor indexes corresponding to the multiple target packets are recorded in the used table.
8. The method according to claim 7, further comprising, after determining whether the plurality of target packets are all packets in the network data stream: If not, wait to receive the remaining target packets in the network data stream.
9. The method according to any one of claims 6-8, wherein the receiving end is equipped with a network transport layer, and the network transport layer includes a transport layer protocol stack; Before recording the descriptor indices corresponding to the plurality of target packets into the available table according to the receiving order of the plurality of target packets, the method further includes: storing the descriptor indices corresponding to the plurality of target packets into the transport layer protocol stack according to the receiving order of the plurality of target packets; the step of recording the descriptor indices corresponding to the plurality of target packets into the available table according to the receiving order of the plurality of target packets includes: recording the descriptor indices corresponding to the plurality of target packets into the available table according to the cache order of the plurality of packet descriptors in the transport layer protocol stack.
10. A cloud network system, comprising a first virtual machine instance and a second virtual machine instance, wherein the first virtual machine instance has a virtual buffer containing an availability table, a used table, and a descriptor table; the first virtual machine instance is configured to retrieve packet descriptors corresponding to multiple descriptor indices in the descriptor table according to the recording order of multiple descriptor indices in the availability table and store them in a memory buffer, and retrieve target packets corresponding to multiple packet descriptors according to the recording order and send them to the second virtual machine instance; the second virtual machine instance is configured to receive the multiple target packets sent by the first virtual machine instance, and send back acknowledgment messages of the multiple target packets to the first virtual machine instance according to the receiving order of the multiple target packets; the first virtual machine instance is further configured to receive the acknowledgment messages of the multiple target packets sent back by the second virtual machine instance, record the multiple descriptor indices in the used table according to the receiving order of the multiple acknowledgment messages, and release the packet descriptors stored in the memory buffer according to the recording order of the descriptor indices in the used table.
11. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.