Data transmission method and device, equipment and storage medium

By merging and encapsulating the memory semantic data of small packets, the problem of low transmission efficiency of small packets in RDMA technology is solved, and data transmission efficiency is improved.

CN120508529APending Publication Date: 2025-08-19SHANGHAI SUIYUAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510594603.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In remote direct memory access (RDMA) technology, there are efficiency bottlenecks in memory semantic communication scenarios that process small data packets, especially due to the high proportion of header occupancy and the reduction in transmission efficiency caused by independent packet encapsulation.

Method used

By receiving local memory semantic data and obtaining queue identifiers, data with the same queue identifier and belonging to the same type are merged, a merged data block is generated, and then a header is added to the merged data block for encapsulation and sending, reducing the header overhead during the encapsulation process.

Benefits of technology

It realizes efficient transmission of small data packets, improves the transmission efficiency of payloads, and reduces the overhead of the packet in the packaging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508529A_ABST
    Figure CN120508529A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment and a storage medium, and the method comprises the steps: receiving different types of local memory semantic data sent locally, and obtaining a queue identifier corresponding to the local memory semantic data; merging the local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block; and adding a packet header to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and sending the encapsulated data to the remote equipment through the switch. Local memory semantic data with the same queue identifier and belonging to the same type are merged to obtain a local merged data block, and the local merged data block is packaged once and then sent to remote equipment, so that efficient transmission of memory semantic data of a small data packet is realized through queue merging; and after a plurality of small data packets are combined, the packet header only needs to be added once, so that the extra overhead of the packet header in the packaging process is reduced, and the transmission efficiency of the effective load is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular to a data transmission method, apparatus, device and storage medium. Background Art

[0002] With the rapid development of computer system architecture and high-performance computing, network communication efficiency has become a key factor affecting overall performance. Current Remote Direct Memory Access (RDMA) technology, despite its primary advantages of efficient and low-latency direct memory access, still faces significant efficiency bottlenecks in memory-semantic communication scenarios involving small data packets.

[0003] In artificial intelligence scenarios, since the data packets for memory semantic access are usually small packets of 128 bytes, each small packet requires additional header information. When high-frequency small data packet transmission is performed, the high proportion of header occupancy will significantly reduce the transmission efficiency of the effective load. In addition, since each memory semantic access is discrete, this unconnected access mode requires independent message encapsulation for each access, resulting in a decrease in overall transmission efficiency. Summary of the Invention

[0004] The present invention provides a data transmission method to improve the communication efficiency of memory semantic data.

[0005] According to a first aspect of the present invention, there is provided a data transmission method, comprising: receiving different types of local memory semantic data sent locally, and obtaining a queue identifier corresponding to the local memory semantic data;

[0006] Merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block;

[0007] A packet header is added to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and the encapsulated data is sent to a remote device through a switch.

[0008] According to another aspect of the present invention, there is provided a data transmission device, comprising: a local memory semantic data receiving module, configured to receive different types of local memory semantic data sent locally, and obtain a queue identifier corresponding to the local memory semantic data;

[0009] A data merging module is used to merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block;

[0010] The data encapsulation module is used to add a header to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and send the encapsulated data to a remote device through a switch.

[0011] According to another aspect of the present invention, an electronic device is provided, comprising:

[0012] at least one processor; and

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method described in any embodiment of the present invention when executed.

[0016] The technical solution of the embodiment of the present invention merges local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block, and encapsulates the local merged data block once and sends it to a remote device. Through queue merging, efficient transmission of memory semantic data of small data packets is achieved, and after multiple small data packets are merged, only one packet header needs to be added, thereby reducing the additional overhead of the packet header during the encapsulation process, thereby improving the transmission efficiency of the effective load.

[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 This is a flowchart of a data transmission method provided according to the first embodiment of the present invention;

[0020] Figure 2 1 is a schematic diagram of the principle of data merging according to the first embodiment of the present invention;

[0021] Figure 3 1 is a schematic diagram showing the comparison of packaging before and after data merging according to the first embodiment of the present invention;

[0022] Figure 4 This is a flowchart of a data transmission method provided according to the second embodiment of the present invention;

[0023] Figure 5 Schematic diagram of the principle of data interaction provided according to the second embodiment of the present invention;

[0024] Figure 6 This is a structural diagram of a data transmission device provided according to a fourth embodiment of the present invention;

[0025] Figure 7 It is a structural diagram of an electronic device provided by Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Example 1

[0029] Figure 1 A flowchart of a data transmission method is provided for the first embodiment of the present invention. This embodiment is applicable to situations where data is efficiently transmitted. The method can be executed by a data transmission device, which can be implemented in the form of hardware and / or software. Figure 1 As shown, the method includes:

[0030] Step S101: receiving different types of local memory semantic data sent locally, and obtaining queue identifiers corresponding to the local memory semantic data.

[0031] Optionally, different types of local memory semantic data sent locally are received, and queue identifiers corresponding to the local memory semantic data are obtained, including: receiving different types of local memory semantic data sent by a local bus master device through an on-chip network bus, wherein the types of local memory semantic data include local write requests, local read requests, or remote read responses; extracting the target address contained in the local memory semantic data, and querying an address queue relationship table according to the target address to obtain a queue identifier that matches the target address, wherein the address queue relationship table contains a correspondence between the target address and the queue identifier; and using the queried queue identifier as the queue identifier corresponding to the local memory semantic data.

[0032] Specifically, if Figure 2 The diagram shows the principle of data merging involved in this embodiment, and the data merging operation can be performed by a local device that needs to send data. In this embodiment, different types of local memory semantic data are received from a local bus device, such as a CPU or GPU, via an on-chip network bus. The local memory semantic data can be in the form of a message, and the type can include a local write request, a local read request, or a remote read response. Of course, this embodiment is only an example and does not limit the specific content of the local memory semantic data. In addition, the write request, read request, write response, and read response in this embodiment each use a standard memory semantic access message structure to reduce the additional overhead in the RDMA protocol encapsulation. For example, the message structure corresponding to the write request includes data attributes, a target address, and a data payload; the message structure corresponding to the read request includes data attributes and a target address; the message structure corresponding to the write response includes a response status; and the message structure corresponding to the read response includes data attributes, a response status, and a data payload. Of course, this embodiment is only an example and does not limit the specific form of the message structure corresponding to each type of memory semantic data.

[0033] In this embodiment, the target address contained in the local memory semantic data is extracted, and the address queue relationship table is queried according to the target address to obtain the queue identifier. The following Table 1 shows an example of the address queue relationship table:

[0034] Table 1

[0035] Destination Address Queue ID Address 1 Queue a Address 2 Queue b ... ...

[0036] Due to space limitations, Table 1 illustrates only two target addresses. In practice, there is no limit on the number of target addresses and queue identifiers included in the address-queue relationship table. Furthermore, queue identifiers can be used to identify remote devices. Therefore, local memory semantic data with the same queue identifier must be sent to the same remote device.

[0037] Step S102: merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block.

[0038] Optionally, local memory semantic data with the same queue identifier and belonging to the same type are merged to obtain a local merged data block, including: grouping the local memory semantic data of the same type according to the queue identifier in input order to obtain memory semantic data groups, wherein each memory semantic data group contains local memory semantic data with the same type and queue identifier; obtaining a merge setting condition, and merging the memory semantic data groups according to the merge setting condition to obtain original merged data, wherein the merge setting condition includes the maximum allowable number of merged packets and the maximum allowable merge duration; obtaining a data header based on the original merged data, and combining the original merged data with the data header to obtain a local merged data block, wherein the number of local merged data blocks corresponding to each memory semantic data group is at least one.

[0039] Optionally, obtaining a data header based on the original merged data includes: obtaining the quantity, type, and target address of the local memory semantic data in the original merged data; and combining the quantity, type, and target address to obtain the data header.

[0040] Specifically, this embodiment groups local memory semantic data according to queue identifier and type, merging data within the same queue to generate larger data blocks, thereby increasing the payload ratio. Furthermore, this embodiment uses independent write and read channels to merge local memory semantic data of different types, thereby achieving efficient data management. For example, when the received local memory semantic data are M, N, K, M+1, K+1, N+1, N+2, N+3, K+2, and M+2, and each of these local memory semantic data is of the same type, such as a local write request, in this case, the type difference does not need to be considered when grouping. Instead, the local memory semantic data need only be grouped according to the queue identifier in the order of input to obtain memory semantic data groups. For example, memory semantic data group 1 = {N N+1N+2N+3}, memory semantic data group 2 = {K K+1K+2K+3}, and memory semantic data group 3 = {M M+1M+2M+3}. In addition, in order to further improve the transmission efficiency, the present embodiment will pre-configure the merge setting conditions according to user needs. The merge setting conditions include the maximum allowed number of merged packets and the maximum allowed merge duration. The merge timeout mechanism is determined based on the maximum allowed merge duration. The timeout mechanism ensures that data that has not been merged within a certain period of time can be directly transmitted to avoid excessive system response delay, thereby meeting real-time requirements while ensuring efficient transmission. In addition, in the present embodiment, after weighing the transmission delay and the RDMA transmission efficiency corresponding to different merge numbers, the merge number selected by the user will be used as the maximum allowed number of merged packets according to the actual transmission requirements, so that when the memory semantic data groups are subsequently merged, the number of each merged data block must not exceed the set maximum allowed number of merged packets. In the present embodiment, after obtaining the memory semantic data groups, each memory semantic data group will be merged according to the above-mentioned merge setting conditions to obtain the original merged data.

[0041] Among them, in this embodiment, a data header is also obtained based on the original merged data, specifically, the number of local memory semantic data contained in the original merged data is extracted, such as 4, the type, such as local read request, and the target address, such as address 1, and the above-obtained number, type and target address are combined to obtain the data header, and the original merged data is combined with the data header to obtain a local merged data block.

[0042] Optionally, the memory semantic data group is merged according to the merge setting conditions to obtain the original merged data, including: when the maximum allowable merge time is reached before the data in the memory semantic data group is merged, the merging process is terminated, and the data merging result obtained at the termination moment is used as the original merged data; when the maximum allowable merge time is not reached before the data in the memory semantic data group is merged, the memory semantic data group is merged according to the maximum allowable number of merge packages to obtain the original merged data.

[0043] In a specific implementation, the above-mentioned semantic data group 1 = {N N+1N+2N+3} is merged as an example for explanation. When it is determined that the obtained setting conditions include the maximum allowed merging time of 1 microsecond and the maximum allowed number of merged packets of 5, when it is determined that the merging time is already 1 microsecond after the merging of N, N+1 and N+2, the merging of N+3 is no longer performed, and the merging result containing N, N+1 and N+2 is directly used as the original merged data, and the original merged data is directly sent after adding a packet header. Alternatively, if it is determined that the merging time only takes 0.5 microseconds when the merging of N, N+1, N+2 and N+3 is completed, then in the merging process, it is only necessary to consider whether the maximum allowed number of merged packets is exceeded, 5. Since the semantic data group 1 only contains 4 data, it is confirmed that the maximum allowed number of merged packets is not exceeded, so it is determined that N, N+1, N+2 and N+3 are merged to obtain the original merged data. In this embodiment, both the merging time and the merging quantity need to be considered when merging, thereby improving the data transmission efficiency while ensuring the real-time transmission.

[0044] Optionally, the memory semantic data groups are merged according to the merge setting conditions to obtain the original merged data, including: using a local write request merging component to merge the memory semantic data groups corresponding to the local write request type according to the merge setting conditions to obtain the local write request original merged data; using a local read request merging component to merge the memory semantic data groups corresponding to the local read request type according to the merge setting conditions to obtain the local read request original merged data; using a remote read response merging component to merge the memory semantic data groups corresponding to the remote read response type according to the merge setting conditions to obtain the remote read response original merged data.

[0045] Specifically, in this embodiment, different types of memory semantic data are merged separately using different merging components. For example, the local write request merging component only merges local write request memory semantic data, the local read request merging component only merges local read request memory semantic data, and the remote read response merging component only merges remote read response memory semantic data. In addition, each merging component can be executed independently and in parallel without affecting each other, thereby further improving the efficiency of data merging. Among them, local mainly refers to the sender of the request, and remote mainly refers to the receiver of the request. For a local device, it can correspond to multiple remote devices, that is, a local device can interact with multiple remote devices at the same time. This is not described in detail in this embodiment.

[0046] Step S103: adding a header to the local merged data block through the direct memory access (RDMA) component to obtain encapsulated data, and sending the encapsulated data to the remote device through the switch.

[0047] Optionally, adding a header to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data includes: determining an RDMA tunnel used in the RDMA component; and adding a header to the local merged data block based on the RDMA tunnel to obtain encapsulated data.

[0048] Optionally, adding a header to the local merged data block based on the RDMA tunnel to obtain encapsulated data includes: adding an RDMA header to the local merged data based on the RDMA packet component in the RDMA tunnel to obtain a first packet result; adding UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result; adding an Ethernet header to the second packet result based on the Ethernet component in the RDMA tunnel to obtain encapsulated data.

[0049] Specifically, after merging the local memory semantic data to obtain the local merged data block, in order to realize data transmission between different protocols, it is necessary to use the RDMA tunnel to add a header to the local merged data block for encapsulation, and send the obtained encapsulated data to the remote device through the switch. Figure 3 The following is a schematic diagram of the package comparison before and after data merging. Figure 3 It can be seen that by merging multiple small local memory semantic data before encapsulating them, only the packet header needs to be added once, which significantly reduces the proportion of encapsulated data occupied by the packet header and improves the transmission efficiency of the payload. In addition, by logically merging multiple discrete local memory semantic data, the number of packets transmitted per unit time is reduced, and the hardware requirements for packet processing performance are lowered. Under the premise of ensuring controlled latency, a reasonable merging strategy is used to reduce the hardware resource consumption of frequently transmitting small packets through the RDMA tunnel.

[0050] Optionally, the method also includes: receiving different types of remote merged data blocks sent by the RDMA component, wherein the remote merged data blocks contain remote memory semantic data and a data header with the same type and queue identifier; splitting the remote merged data blocks according to the data header to obtain remote memory semantic data, wherein the types of remote memory semantic data include remote write requests, remote read requests and local read responses; and sending the remote memory semantic data to the local bus master device or the local bus slave device through the on-chip network bus.

[0051] Optionally, the remote merged data block is split according to the data header to obtain the remote memory semantic data, including: using the remote write request splitting component to split the remote merged data block corresponding to the remote write request type according to the data header to obtain the remote memory semantic data; using the remote read request splitting component to split the remote merged data block corresponding to the remote read request type according to the data header to obtain the remote memory semantic data; using the local read response splitting component to split the remote merged data block corresponding to the local read response type according to the data header to obtain the remote memory semantic data.

[0052] Optionally, the remote memory semantic data is sent to the local bus master device or the local bus slave device through the on-chip network bus, including: when the type of the remote memory semantic data is a remote write request or a remote read request, the remote memory semantic data is sent to the local bus slave device, wherein the local bus slave device includes a memory; when the type of the remote memory semantic data is a local read response, the remote memory semantic data is sent to the local bus master device, wherein the local bus master device includes a processor.

[0053] Specifically, in this embodiment, on the one hand, the local memory semantic data can be merged, and the encapsulated data obtained by the merge encapsulation can be sent to the remote device. On the other hand, the encapsulated data sent by the remote device can be unpacked, and the different types of remote merged data blocks sent after the RDMA component is unpacked can be split, wherein the remote merged data block contains remote memory semantic data of the same type and queue identifier, and also contains a data header. When splitting the remote merged data block according to the data header to obtain the remote memory semantic data, different components are used for different types of merged data blocks. For example, the remote write request splitting component only splits the remote write request merged data block, the remote read request splitting component only splits the remote read request merged data block, and the local read response splitting component only splits the local read response merged data block, and each splitting component can be executed independently and in parallel without affecting each other, thereby further improving the efficiency of data splitting.

[0054] It should be noted that, in this embodiment, after different types of remote memory semantic data are obtained by splitting, the remote memory semantic data will be sent to the local bus master device or the local bus slave device through the on-chip network bus. For example, the remote memory semantic data of the remote write request type or the remote memory semantic data of the remote read request type will be sent to the local bus slave device, such as a memory, wherein the memory can be a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR) or a high bandwidth memory (High Bandwidth Memory, HBM). In addition, the remote memory semantic data of the local read response type will also be sent to the local bus master device, such as a processor, wherein the processor can include a central processing unit (CPU) or a graphics processing unit (GPU). In this embodiment, the specific types of the local bus master device and the local bus slave device are not limited. As long as the split remote memory semantic data can be received, they are all within the scope of protection of this application.

[0055] In an embodiment of the present application, local memory semantic data with the same queue identifier and belonging to the same type are merged to obtain a local merged data block, and the local merged data block is encapsulated once and sent to a remote device. Efficient transmission of memory semantic data of small data packets is achieved through queue merging, and only one packet header needs to be added after multiple small data packets are merged, thereby reducing the additional header overhead during the encapsulation process, thereby improving the transmission efficiency of the effective load.

[0056] Example 2

[0057] Figure 4 A flowchart of a data transmission method is provided in the second embodiment of the present invention. This embodiment is based on the above embodiment and specifically describes the step S103 in which a header is added to the local merged data block by the direct memory access RDMA component to obtain encapsulated data. Figure 4 As shown, the method includes:

[0058] Step S201: receiving different types of local memory semantic data sent locally, and obtaining queue identifiers corresponding to the local memory semantic data.

[0059] Optionally, different types of local memory semantic data sent locally are received, and queue identifiers corresponding to the local memory semantic data are obtained, including: receiving different types of local memory semantic data sent by a local bus master device through an on-chip network bus, wherein the types of local memory semantic data include local write requests, local read requests, or remote read responses; extracting the target address contained in the local memory semantic data, and querying an address queue relationship table according to the target address to obtain a queue identifier that matches the target address, wherein the address queue relationship table contains a correspondence between the target address and the queue identifier; and using the queried queue identifier as the queue identifier corresponding to the local memory semantic data.

[0060] Step S202: merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block.

[0061] Optionally, local memory semantic data with the same queue identifier and belonging to the same type are merged to obtain a local merged data block, including: grouping the local memory semantic data of the same type according to the queue identifier in input order to obtain memory semantic data groups, wherein each memory semantic data group contains local memory semantic data with the same type and queue identifier; obtaining a merge setting condition, and merging the memory semantic data groups according to the merge setting condition to obtain original merged data, wherein the merge setting condition includes the maximum allowable number of merged packets and the maximum allowable merge duration; obtaining a data header based on the original merged data, and combining the original merged data with the data header to obtain a local merged data block, wherein the number of local merged data blocks corresponding to each memory semantic data group is at least one.

[0062] Optionally, obtaining a data header based on the original merged data includes: obtaining the quantity, type, and target address of the local memory semantic data in the original merged data; and combining the quantity, type, and target address to obtain the data header.

[0063] Optionally, the memory semantic data group is merged according to the merge setting conditions to obtain the original merged data, including: when the maximum allowable merge time is reached before the data in the memory semantic data group is merged, the merging process is terminated, and the data merging result obtained at the termination moment is used as the original merged data; when the maximum allowable merge time is not reached before the data in the memory semantic data group is merged, the memory semantic data group is merged according to the maximum allowable number of merge packages to obtain the original merged data.

[0064] Optionally, the memory semantic data groups are merged according to the merge setting conditions to obtain the original merged data, including: using a local write request merging component to merge the memory semantic data groups corresponding to the local write request type according to the merge setting conditions to obtain the local write request original merged data; using a local read request merging component to merge the memory semantic data groups corresponding to the local read request type according to the merge setting conditions to obtain the local read request original merged data; using a remote read response merging component to merge the memory semantic data groups corresponding to the remote read response type according to the merge setting conditions to obtain the remote read response original merged data.

[0065] Step S203: Determine the RDMA tunnel used in the RDMA component.

[0066] Step S204: Add a header to the local merged data block based on the RDMA tunnel to obtain encapsulated data.

[0067] Optionally, adding a packet header to the local merged data block based on the RDMA tunnel to obtain encapsulated data includes: adding an RDMA packet header to the local merged data based on the RDMA packet component in the RDMA tunnel to obtain a first packet result; adding a UDP or IP packet header to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result; adding an Ethernet packet header to the second packet result based on the Ethernet component in the RDMA tunnel to obtain encapsulated data.

[0068] Specifically, in this embodiment, when adding a header to a local merged data block based on an RDMA tunnel, different packet components are used to add headers with different contents to the local merged data block. For example, an RDMA header is added through an RDMA packet component, a UDP or IP header is added through a UDP or IP packet component, and an Ethernet header is added through an Ethernet component. Therefore, the header in the obtained encapsulated data specifically includes three items: an RDMA header, a UDP and IP header, and an Ethernet header.

[0069] Among them, Figure 5 The figure shows a schematic diagram of the principle of data interaction, which mainly illustrates the data transmission between the local device - computing card A and the remote device - computing card B. In this embodiment, a completed write operation process and a complete read operation process are taken as examples to specifically illustrate the data interaction process between computing card A and computing card B.

[0070] In a specific implementation, when computing card A needs to write data to computing card B, it mainly involves the following two steps:

[0071] In step 1, Compute Card A receives the local original write request sent by the local bus master. The local write request merging component attempts to merge the data based on the queue identifier corresponding to the request. The merged local merged data block is dequeued and sent to the RDMA component through arbitration. After successful arbitration, the data flow splits into two paths: the first path is for the local merged data block to pass through the RDMA retransmission component and the encapsulation component to add a header, such as RDMA packet, UDP and IP packet, or Ethernet packet, and then transmit the encapsulated data; the second path is to notify the local write response splitting module that the local merged data block has been sent. In step 2, after Compute Card B receives the encapsulated data, it will use the RDMA component to check the legitimacy of the encapsulated data and remove the header, such as Ethernet packet parsing, UDP and IP packet parsing, and RDMA packet parsing, to obtain the merged write request from the remote end. The remote write request splitting component splits the merged data block from the remote end to obtain the original write request, and sends the original write request to the local bus slave. Upon receiving the remote original write response, the write request ends.

[0072] In another specific implementation, when computing card A needs to read data from computing card B, the following four steps are mainly involved: Step 1: Computing card A will receive the local original read request sent by the local bus device. The local read request merging component attempts to merge the data based on the queue identifier corresponding to the request. The merged local merged data block is arbitrated out of the queue and transmitted to the RDMA component. The local merged data block is added with a header through the RDMA retransmission component and the packet component, such as RDMA packet, UDP and IP packet, Ethernet packet, and then the encapsulated data is transmitted. Step 2: After computing card B receives the encapsulated data, it will use the RDMA component to check the legitimacy of the encapsulated data and remove the header, such as Ethernet packet parsing, UDP and IP packet parsing, and RDMA packet parsing, to obtain the merged read request from the remote end. The remote read request splitting component splits the merged data block from the remote end to obtain the original read request, and sends the original read request to the local bus slave device. In step 3, Compute Card B receives the remote original read response sent by the local bus slave device. The remote read response merging component attempts to merge the queue identifier corresponding to the response. The merged local merged data block is arbitrated out of the queue and sent to the RDMA component. The local merged data block is added with a header through the RDMA retransmission component and the packet component, such as RDMA packet, UDP and IP packet, and Ethernet packet, and then the encapsulated data is transmitted. In step 4, after Compute Card A receives the encapsulated data, it will check the legitimacy of the encapsulated data through the RDMA component and remove the header, such as Ethernet packet parsing, UDP and IP packet parsing, and RDMA packet parsing, to obtain the merged read response from Compute Card B. The local read response splitting component splits the merged data block from the remote end to obtain the local original read response, and sends the original read response to the local bus master device, thus completing the read request.

[0073] In an embodiment of the present application, local memory semantic data with the same queue identifier and belonging to the same type are merged to obtain a local merged data block, and the local merged data block is encapsulated once and sent to a remote device. Efficient transmission of memory semantic data of small data packets is achieved through queue merging, and only one packet header needs to be added after multiple small data packets are merged, thereby reducing the additional header overhead during the encapsulation process, thereby improving the transmission efficiency of the effective load.

[0074] Example 4

[0075] Figure 6 A schematic diagram of the structure of a data transmission device provided in the fourth embodiment of the present invention. Figure 6 As shown, the device includes: a local memory semantic data receiving module 310, a data merging module 320 and a data encapsulation module 330.

[0076] The local memory semantic data receiving module 310 is used to receive different types of local memory semantic data sent locally and obtain the queue identifier corresponding to the local memory semantic data;

[0077] A data merging module 320 is configured to merge local memory semantic data of the same type and with the same queue identifier to obtain a local merged data block;

[0078] The data encapsulation module 330 is configured to add a header to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and send the encapsulated data to a remote device through a switch.

[0079] Optionally, a local memory semantic data receiving module is used to receive different types of local memory semantic data sent by a local bus master device through an on-chip network bus, wherein the types of local memory semantic data include local write requests, local read requests, or remote read responses;

[0080] Extracting the target address contained in the local memory semantic data, and querying the address queue relationship table according to the target address to obtain the queue identifier that matches the target address, wherein the address queue relationship table contains the correspondence between the target address and the queue identifier;

[0081] The queried queue ID is used as the queue ID corresponding to the local memory semantic data.

[0082] Optionally, the data merging module includes: a grouping unit, configured to group local memory semantic data of the same type according to the queue identifier in the input order to obtain memory semantic data groups, wherein each memory semantic data group contains local memory semantic data of the same type and queue identifier;

[0083] A merging unit is used to obtain a merging setting condition and merge the memory semantic data group according to the merging setting condition to obtain the original merged data, wherein the merging setting condition includes a maximum number of allowed merged packages and a maximum allowed merge duration;

[0084] The data header combination unit is used to obtain a data header according to the original merged data, and combine the original merged data with the data header to obtain a local merged data block, wherein the number of local merged data blocks corresponding to each memory semantic data group is at least one.

[0085] Optionally, a data header combination unit, configured to obtain the number and type of local memory semantic data and the target addresses contained therein in the original merged data;

[0086] Combine the quantity, type, and destination address to obtain the data header.

[0087] Optionally, a merging unit is configured to terminate the merging process when a maximum allowed merging time is reached before the data in the memory semantic data group is completely merged, and use the data merging result obtained at the termination moment as the original merged data;

[0088] When the maximum allowed merging time is not reached before the data in the memory semantic data group is merged, the memory semantic data group is merged according to the maximum allowed number of merged packages to obtain original merged data.

[0089] Optionally, the data merging module is further configured to use the local write request merging component to merge the memory semantic data group corresponding to the local write request type according to the merge setting conditions to obtain the original merged data of the local write request;

[0090] The local read request merging component is used to merge the memory semantic data group corresponding to the local read request type according to the merge setting conditions to obtain the original merged data of the local read request;

[0091] The remote read response merging component is used to merge the memory semantic data groups corresponding to the remote read response types according to the merging setting conditions to obtain the original merged data of the remote read response.

[0092] Optionally, a data encapsulation module, configured to determine an RDMA tunnel used in the RDMA component;

[0093] A header is added to the locally merged data block based on the RDMA tunnel to obtain encapsulated data.

[0094] Optionally, the data encapsulation module is further configured to add an RDMA packet header to the local merged data based on the RDMA packet component in the RDMA tunnel to obtain a first packet result;

[0095] Adding UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result;

[0096] An Ethernet header is added to the second packet result based on the Ethernet component in the RDMA tunnel to obtain encapsulated data.

[0097] Optionally, the apparatus further includes: a remote merged data block receiving module, configured to receive remote merged data blocks of different types sent by the RDMA component, wherein the remote merged data blocks include remote memory semantic data and a data header having the same type and queue identifier;

[0098] A splitting module is used to split the remote merged data block according to the data header to obtain remote memory semantic data, wherein the types of remote memory semantic data include remote write request, remote read request and local read response;

[0099] The remote memory semantic data sending module is used to send the remote memory semantic data to the local bus master device or the local bus slave device through the on-chip network bus.

[0100] Optionally, a splitting module is used to use a remote write request splitting component to split the remote merged data block corresponding to the remote write request type according to the data header to obtain remote memory semantic data;

[0101] Use the remote read request splitting component to split the remote merged data blocks corresponding to the remote read request type according to the data header to obtain the remote memory semantic data;

[0102] The local read response splitting component is used to merge the remote data blocks corresponding to the local read response type, and split them according to the data header to obtain the remote memory semantic data.

[0103] Optionally, a remote memory semantic data sending module is used to send the remote memory semantic data to a local bus slave device when the type of the remote memory semantic data is a remote write request or a remote read request, wherein the local bus slave device includes a memory;

[0104] When the type of the remote memory semantic data is a local read response, the remote memory semantic data is sent to a local bus master device, wherein the local bus master device includes a processor.

[0105] The data transmission device provided in the embodiment of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0106] Example 5

[0107] Figure 7The present invention is a block diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0108] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card (RDMA component in the embodiment of the present application), a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0110] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors for running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data transmission method.

[0111] In some embodiments, the data transmission method may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data transmission method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data transmission method in any other suitable manner (e.g., by means of firmware).

[0112] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0114] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0116] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks (LANs) and wide area networks (WANs).

[0117] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0118] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0119] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A data transmission method, characterized in that: include: Receive different types of local memory semantic data sent locally, and obtain queue identifiers corresponding to the local memory semantic data; Merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block; A packet header is added to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and the encapsulated data is sent to a remote device through a switch.

2. The method according to claim 1, characterized in that The receiving of different types of local memory semantic data sent locally and obtaining queue identifiers corresponding to the local memory semantic data includes: Receiving different types of local memory semantic data sent by a local bus master through an on-chip network bus, wherein the types of the local memory semantic data include local write requests, local read requests, or remote read responses; Extracting a target address contained in the local memory semantic data, and querying an address queue relationship table according to the target address to obtain the queue identifier that matches the target address, wherein the address queue relationship table contains a correspondence between the target address and the queue identifier; The queried queue identifier is used as the queue identifier corresponding to the local memory semantic data.

3. The method according to claim 1, characterized in that The step of merging local memory semantic data having the same queue identifier and belonging to the same type to obtain a local merged data block includes: Grouping local memory semantic data of the same type in input order according to queue identifiers to obtain memory semantic data groups, wherein each of the memory semantic data groups contains local memory semantic data of the same type and queue identifier; Acquire a merge setting condition, and perform data merging on the memory semantic data group according to the merge setting condition to obtain original merged data, wherein the merge setting condition includes a maximum allowable number of merged packages and a maximum allowable merge duration; A data header is obtained according to the original merged data, and the original merged data and the data header are combined to obtain the local merged data block, wherein the number of local merged data blocks corresponding to each memory semantic data group is at least one.

4. The method according to claim 3, characterized in that The obtaining of a data header according to the original merged data includes: Obtaining the quantity, type, and target address of the local memory semantic data in the original merged data; The data header is obtained by combining the quantity, the type, and the target address.

5. The method according to claim 3, characterized in that Merging the memory semantic data group according to the merge setting condition to obtain original merged data includes: When the maximum allowed merging time is reached before the data in the memory semantic data group is completely merged, the merging process is terminated, and the data merging result obtained at the termination time is used as the original merged data; When the maximum allowed merging time is not reached before the data in the memory semantic data group is merged, the memory semantic data group is merged according to the maximum allowed number of merged packages to obtain the original merged data.

6. The method according to claim 5, characterized in that Merging the memory semantic data group according to the merge setting condition to obtain original merged data includes: Using a local write request merging component to merge the memory semantic data group corresponding to the local write request type according to the merging setting conditions to obtain original merged data of the local write request; Using a local read request merging component to merge the memory semantic data group corresponding to the local read request type according to the merging setting conditions to obtain the original merged data of the local read request; The remote read response merging component is used to merge the memory semantic data group corresponding to the remote read response type according to the merging setting conditions to obtain the remote read response original merged data.

7. The method according to claim 1, characterized in that The step of adding a header to the local merged data block to obtain encapsulated data through a direct memory access (RDMA) component includes: Determining an RDMA tunnel used in the RDMA component; A header is added to the local merged data block based on the RDMA tunnel to obtain the encapsulated data.

8. The method according to claim 7, characterized in that The adding a header to the local merged data block based on the RDMA tunnel to obtain the encapsulated data includes: Adding an RDMA packet header to the local merged data based on the RDMA packet component in the RDMA tunnel to obtain a first packet result; Adding UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result; An Ethernet header is added to the second packet result based on the Ethernet component in the RDMA tunnel to obtain the encapsulated data.

9. The method according to claim 1, characterized in that The method further comprises: Receiving different types of remote merged data blocks sent by the RDMA component, wherein the remote merged data blocks contain remote memory semantic data and a data header having the same type and queue identifier; Splitting the remote merged data block according to the data header to obtain remote memory semantic data, wherein the types of the remote memory semantic data include remote write requests, remote read requests, and local read responses; The remote memory semantic data is sent to a local bus master device or a local bus slave device via an on-chip network bus.

10. The method according to claim 9, characterized in that The step of splitting the remote merged data block according to the data header to obtain remote memory semantic data includes: Using a remote write request splitting component to split the remote merged data block corresponding to the remote write request type according to the data header to obtain the remote memory semantic data; Using a remote read request splitting component to split the remote merged data block corresponding to the remote read request type according to the data header to obtain the remote memory semantic data; A local read response splitting component is used to split the remote merged data block corresponding to the local read response type according to the data header to obtain the remote memory semantic data.

11. The method according to claim 9, characterized in that The sending of the remote memory semantic data to a local bus master device or a local bus slave device through an on-chip network bus includes: When the type of the remote memory semantic data is the remote write request or the remote read request, the remote memory semantic data is sent to the local bus slave device, wherein the local bus slave device includes a memory; When the type of the remote memory semantic data is the local read response, the remote memory semantic data is sent to the local bus master device, wherein the local bus master device includes a processor.

12. A data transmission device, characterized in that: include: A local memory semantic data receiving module is used to receive different types of local memory semantic data sent locally and obtain a queue identifier corresponding to the local memory semantic data; A data merging module is used to merge local memory semantic data with the same queue identifier and belonging to the same type to obtain a local merged data block; The data encapsulation module is used to add a header to the local merged data block through a direct memory access (RDMA) component to obtain encapsulated data, and send the encapsulated data to a remote device through a switch.

13. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program to be executed by the at least one processor, where the computer program is executed by the at least one processor so as to enable the at least one processor to perform the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 11 when the instructions are executed.

Citation Information

Cited By

  • Data packet processing method, system and equipment of network-on-chip

    CN121462515A