Data selection retransmission method, related device and medium

By filtering and caching RDMA data packets in the switch, and using the response information of normal data packets to carry information about the data packets to be discarded, and directly applying for retransmission to the data source, the excessive transmission delay in RDMA selective retransmission technology is solved. problem, achieving a more efficient retransmission process and resource utilization.

CN118611833APending Publication Date: 2024-09-06PENG CHENG LAB +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410749157.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The existing RDMA selective retransmission technology suffers from excessive transmission delays in long-distance wide area networks, especially because lost packets must be retransmitted for at least one RTT before they can be retransmitted, resulting in wasted bandwidth and increased delays.

Method used

Filter and cache RDMA data packets that may be discarded in the switch, and use the response information of normal data packets to carry the identification and number of the data packets to be discarded to construct negative response information, and directly apply for retransmission from the data source to reduce retransmission. The number of times the transmission process and negative response information are constructed.

Benefits of technology

It shortens the RDMA transmission delay, saves the retransmission process, reduces the number of negative response messages and bandwidth waste, and improves system resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611833A
    Figure CN118611833A
Patent Text Reader

Abstract

The embodiment of the invention provides a data selection retransmission method, a related device and a medium. The method comprises the following steps: receiving a to-be-detected data packet sent by a data source end; if the data packet to be detected is the data packet to be discarded, judging the type of the data packet to be discarded; when it is determined that the type of the data packet to be discarded is a remote direct data storage data packet, caching and counting the remote direct data storage data packet to be discarded; and until it is detected that the newly received data packet to be detected is not the data packet to be discarded, acquiring discarding information obtained by caching and counting the remote direct data storage data packet to be discarded, and constructing negative response information of the data packet to be detected according to the discarding information and sending the negative response information, and the data source end is notified to resend the remote direct data storage data packet to be discarded. According to the embodiment of the invention, the RDMA transmission delay can be reduced. The embodiment of the invention can be applied to scenes of data center networks, cloud computing, machine learning, distributed storage and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communications, and in particular to a data selective retransmission method, a related device and a medium. Background Art

[0002] Remote Direct Memory Access (RDMA) is an efficient network communication technology that allows computers on the network to exchange data directly in each other's memory without the intervention of the CPU, which greatly improves the speed of data transmission and reduces latency. RDMA technology is a key component in modern data centers and high-performance computing environments, especially in scenarios that require high throughput and low-latency networks.

[0003] In the related technologies, RDMA selective retransmission technology is mainly implemented on the receiving end RNIC network card to improve the bandwidth waste and delay increase problem of the Go-Back-N (GBN) algorithm. Since the lost message in the selective retransmission technology based on the RNIC network card must wait for at least 1 RTT time before retransmission can start, the transmission delay is too large, especially on long-distance wide area networks. How to reduce RDMA transmission delay is an issue that needs to be discussed urgently. Summary of the invention

[0004] The embodiments of the present disclosure provide a data selective retransmission method, a related device and a medium, aiming to reduce RDMA transmission delay.

[0005] In a first aspect, an embodiment of the present disclosure provides a data selection retransmission method, the method comprising:

[0006] Receive the data packet to be detected sent by the data source;

[0007] If the data packet to be detected is a data packet to be discarded, determining the type of the data packet to be discarded;

[0008] When it is determined that the type of the data packet to be discarded is a remote direct data storage data packet, buffering and counting the remote direct data storage data packet to be discarded;

[0009] Until it is detected that the newly received data packet to be detected is not a data packet to be discarded, obtaining the information to be discarded obtained by caching and counting the remote direct data storage data packet to be discarded, and constructing negative response information of the data packet to be detected according to the information to be discarded;

[0010] The negative acknowledgement information is sent to the data source end, and the negative acknowledgement information is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

[0011] In a second aspect, an embodiment of the present disclosure provides a data selection and retransmission device, including:

[0012] A data packet acquisition unit, used for receiving a data packet to be detected sent by a data source;

[0013] A type determination unit, configured to determine the type of the data packet to be discarded if the data packet to be detected is a data packet to be discarded;

[0014] An information caching unit, configured to cache and count the remote direct data storage data packets to be discarded when it is determined that the type of the data packets to be discarded is a remote direct data storage data packet;

[0015] An information construction unit is used to obtain the intended discard information obtained by caching and counting the remote direct data storage data packets to be discarded until it is detected that the newly received data packet to be detected is not the intended discard data packet, and construct negative response information of the data packet to be detected according to the intended discard information;

[0016] The response sending unit is used to send the negative response information to the data source end, and the negative response information is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

[0017] Optionally, the information cache unit is specifically used for:

[0018] Whenever a remote direct data storage data packet to be discarded is identified, extracting the identifier of the remote direct data storage data packet to be discarded;

[0019] The identifier is placed in a cache queue, and the count number of the remote direct data storage data packets to be discarded is increased by one.

[0020] Optionally, the information construction unit is specifically used to:

[0021] Taking out all the identifiers from the cache queue;

[0022] Obtaining the counted number when constructing the negative response information;

[0023] Constructing the negative response information according to all the identifiers and the counted quantities;

[0024] The information construction unit is further specifically used for:

[0025] Clearing the cache queue;

[0026] The count quantity is set to 0.

[0027] Optionally, the information construction unit is specifically used to:

[0028] When the counted number is greater than a preset threshold, receiving the next data packet sent by the data source;

[0029] If the next data packet is a data packet to be discarded, determining the type of the data packet to be discarded;

[0030] When the data packet to be discarded is the remote direct data storage data packet, obtaining all the identifiers in the cache queue, obtaining the current count quantity and adding one to obtain a first quantity, and constructing the negative response information of the next data packet according to all the identifiers and the first quantity;

[0031] If the next data packet is not a data packet to be discarded, all the identifiers in the cache queue are obtained, the current count quantity is obtained, and the negative response information of the next data packet is constructed according to all the identifiers and the count quantity.

[0032] Optionally, the information construction unit is specifically used to:

[0033] When the cache queue is full, obtaining the current remote direct data storage data packet to be discarded;

[0034] Constructing the negative response information of the current remote direct data storage data packet to be discarded according to all the identifiers and the counted quantities in the cache queue;

[0035] Clear the cache queue and set the count to 0.

[0036] Optionally, the device further comprises a discard marking unit, wherein the discard marking unit is configured to:

[0037] Calculate the probability of discarding the data packet to be detected according to the current network congestion situation;

[0038] When the probability of being discarded is greater than the probability threshold, a flag of being discarded is added to the header of the data packet to be detected, and the flag of being discarded is used to indicate that the data packet to be detected corresponding to the switch will be discarded.

[0039] Optionally, the type determination unit is specifically used to:

[0040] Parsing the data packet to be discarded to obtain the Ethernet type of the data packet to be discarded;

[0041] If the Ethernet type matches the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, determining that the data packet to be discarded is the remote direct data storage data packet;

[0042] If the Ethernet type does not match the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, determining whether the Ethernet type matches the IPv4 or IPv6 type;

[0043] If the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type, obtaining the Internet Protocol header of the data packet to be discarded to determine whether it is a User Datagram Protocol header;

[0044] If the Internet Protocol header is followed by the User Datagram Protocol header, obtaining a destination port address in the User Datagram Protocol header;

[0045] If the destination port address matches the remote direct data storage type of the second version of the remote direct memory access protocol based on Ethernet, it is determined that the data packet to be discarded is the remote direct data storage data packet.

[0046] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data selection and retransmission method in the first aspect is implemented.

[0047] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer executes the computer program, the data selection and retransmission method as in the first aspect is implemented.

[0048] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device performs the data selection and retransmission method as in the first aspect.

[0049] In the embodiment of the present disclosure, the data packets sent by the data source are filtered and screened in the switch, and the remote direct data storage data packets that may be discarded are filtered out, and the RDMA data retransmission is requested from the sending data source at the switch. Compared with the prior art in which the data receiving end sends response information and negative response information one by one according to the received data packets to notify the data sending end which data has been lost and needs to be retransmitted, the present disclosure can save the retransmission process and shorten the retransmission time by filtering out the remote direct data storage data packets that may be lost by the data receiving end in the switch to request retransmission from the data source, and it is not necessary to wait until the data reaches the data receiving end to determine whether retransmission is required, thereby reducing RDMA transmission delay. The present disclosure also caches and counts the remote direct data storage data packets to be discarded, and then generates negative response information by adding the discarded information corresponding to the remote direct data storage data packets to be discarded received before the normal data packet to the reception response of the normal data packet. In this way, a response message carries the information corresponding to the multiple remote direct data storage data packets to be discarded to notify the data source to retransmit the data. Compared with constructing the negative response information of the remote direct data storage data packets to be discarded one by one, the number of times the negative response information is constructed is reduced, system resources are saved, and the number of negative response information is reduced, thereby reducing bandwidth waste.

[0050] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A system architecture diagram for a data selection retransmission method according to an embodiment of the present disclosure;

[0052] Figure 2 This is a schematic diagram of an embodiment of the present disclosure applied in a scenario of Ethernet end-to-end communication;

[0053] Figure 3 A flowchart of a method for selecting and retransmitting data according to an embodiment of the present disclosure;

[0054] Figure 4 for Figure 3 Flow chart of adding a flag to be discarded after step 310;

[0055] Figure 5 for Figure 4 Schematic diagram of the RDMA data packet format after adding the intended discard flag;

[0056] Figure 6 for Figure 3Step 320 is a flowchart of determining the type of the data packet to be discarded;

[0057] Figure 7 A schematic diagram of an RDMA data packet format according to an embodiment of the present disclosure;

[0058] Figure 8 for Figure 7 Schematic diagram of the Ethernet header format in the RDMA packet format;

[0059] Fig. 9 for Figure 7 Schematic diagram of the UDP header format in the RDMA packet format;

[0060] Fig.10 for Figure 6 A schematic diagram of determining the type of data packets to be discarded;

[0061] Fig.11 for Figure 3 Flowchart of caching and counting remote direct data storage data packets to be discarded in step 330;

[0062] Fig.12 for Figure 3 Step 340 acquires the information to be discarded obtained by caching and counting the remote direct data storage data packets to be discarded, and constructs a flowchart of negative response information of the data packets to be detected according to the information to be discarded;

[0063] Fig.13 is a module diagram of a data selection and retransmission device according to an embodiment of the present disclosure;

[0064] Fig.14 According to the embodiment of the present disclosure Figure 3 The terminal structure diagram of the data selection retransmission method shown;

[0065] Fig.15 According to the embodiment of the present disclosure Figure 3 The server structure diagram of the data selection retransmission method is shown. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical methods and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present disclosure and are not used to limit the present disclosure.

[0067] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0068] In the description of the embodiments of the present disclosure, unless otherwise clearly defined, words such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above words in the embodiments of the present disclosure in combination with the specific content of the technical solution. In the embodiments of the present disclosure, words such as "further", "exemplarily" or "optionally" are used to indicate examples, illustrations or explanations, and should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. The use of words such as "further", "exemplarily" or "optionally" is intended to present related concepts in a specific way.

[0069] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:

[0070] Ethernet: Ethernet is the most common computer network in the real world. There are two types of Ethernet: the first is classic Ethernet, and the second is switched Ethernet, which uses a device called a switch to connect different computers. Classic Ethernet is the original form of Ethernet, running at speeds ranging from 3 to 10 Mbps; while switched Ethernet is the widely used Ethernet, which can run at high speeds such as 100, 1000 and 10000 Mbps, and is presented in the form of Fast Ethernet, Gigabit Ethernet and 10 Gigabit Ethernet respectively.

[0071] Internet Protocol version 4 (IPv4): Also known as the fourth version of the Internet Protocol, it is the fourth revision of the Internet Protocol in its development process and the first widely deployed version of the protocol. IPv4 is the core of the Internet and is the most widely used version of the Internet Protocol. Its successor is IPv6. IPv4 is a connectionless protocol that operates on a link layer that uses packet switching (such as Ethernet). This protocol makes a best effort to deliver packets, which means that it does not guarantee that any packet will be delivered to the destination, nor does it guarantee that all packets will arrive in the correct order without duplication. These aspects are handled by upper-layer transport protocols (such as the Transmission Control Protocol).

[0072] Internet Protocol Version 6 (IPv6): It is the next generation IP protocol designed by the Internet Engineering Task Force to replace IPv4. The biggest problem with IPv4 is the lack of network address resources, which seriously restricts the application and development of the Internet. The use of IPv6 can not only solve the problem of the number of network address resources, but also solve the obstacles for various access devices to connect to the Internet.

[0073] Remote Direct Memory Access (RDMA): RDMA transfers data directly to the computer's storage area over the network, quickly moving data from one system to the remote system's memory without any impact on the operating system, which does not require much computer processing power. It eliminates the overhead of external memory copying and context switching, thereby freeing up memory bandwidth and central processing unit (CPU) cycles to improve application system performance.

[0074] RoCE (RDMA over Converged Ethernet): is an Ethernet-based RDMA (Remote Direct Memory Access) protocol that allows efficient data transmission and memory access on Ethernet networks. The emergence of the RoCE protocol enables Ethernet networks to be used not only for traditional data transmission, but also for high-performance computing and storage applications, greatly expanding the application scope of Ethernet networks. There are two versions of the RoCE protocol, RoCEv1 and RoCEv2.

[0075] Round-Trip Time (RTT): refers to the time required for data to travel from the sender to the receiver and then back to the sender. It is an important indicator for measuring network latency.

[0076] In the related technologies, Remote Direct Memory Access (RDMA) is an efficient network communication technology that allows computers on the network to exchange data directly in each other's memory without the intervention of the CPU, which greatly improves the speed of data transmission and reduces latency. RDMA technology is a key component in modern data centers and high-performance computing environments, especially in scenarios that require high throughput and low-latency networks.

[0077] The existing RDMA technology-related protocol specifications stipulate that the Go-Back-N (GBN) selective retransmission algorithm is used for packet retransmission when packets are lost. However, in the case of disorder (RDMA packets have a sequence number, and the packets do not arrive at the receiving end according to the sequence number) and packet loss (data packets are lost in the network or arrive beyond the specified time), the GBN algorithm will cause N packets that have arrived at the receiving end to be retransmitted, resulting in bandwidth waste and performance problems such as significant increase in average transmission delay under conditions of disordered packets and a small number of packet losses. The existing RDMA selective retransmission technology is mainly implemented on the receiving end RNIC (RDMA Network Interface Card, a network card that supports the RDMA protocol) network card to improve the bandwidth waste and delay increase problems of the GBN algorithm. Since the lost packets in the selective retransmission technology based on the RNIC network card must wait for at least 1 RTT time before retransmission can begin, the transmission delay is still too large; especially on long-distance wide area networks, this technology still has the defect of excessive transmission delay.

[0078] Based on this, the embodiments of the present disclosure provide a data selection retransmission method, related devices and media. The data selection retransmission method provided by the embodiments of the present disclosure filters and caches the RDMA data packets that may be discarded in the switch, and then uses the response information of the normal data packets to carry the identification and number of the filtered RDMA data packets to be discarded to form a negative response information, and sends the negative response information to the data source end to make it perform the retransmission of the RDMA data packet. In this way, there is no need to wait for the data to reach the receiving end and then the receiving end to feedback whether retransmission is required, which can save the retransmission process, shorten the retransmission time, and reduce the RDMA transmission delay.

[0079] System architecture and scenario description of the application of the disclosed embodiments

[0080] Figure 1 1 is a system architecture diagram for the data selective retransmission method according to an embodiment of the present disclosure, which includes a transmitting end 110, a switch 120, a receiving end 130, and the like.

[0081] The sending end 110 refers to a computer system that can provide data transmission services to the switch 120 and the receiving end 130 and send data packets according to demand. The sending end 110 is usually a server, and the server has higher requirements in terms of stability, security, performance, etc. The sending end 110 can also be a database that can provide data acquisition services to the switch 120 and the receiving end 130. The server can be a high-performance computer in the network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. The sending end 110 can also communicate with the switch 130 in a wired or wireless manner to exchange data.

[0082] The switch 120 refers to a network device that can provide data forwarding and filtering services to the sending end 110 and the receiving end 130. The data sent by the sending end 110 is sent to the corresponding receiving end 130 through the switch 120.

[0083] The receiving end 130 refers to a computer system for receiving data sent by the sending end 110 through the switch 120. The receiving end 130 can be a server or a terminal. When the receiving end 130 is a terminal, it can include various forms such as a desktop computer, a laptop computer, a PDA (personal digital assistant), a mobile phone, a car terminal, a home theater terminal, a dedicated terminal, a digital tablet, etc. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network and share a display device to work together, forming a terminal. The receiving end 130 can also communicate with the switch 120 in a wired or wireless manner to exchange data.

[0084] It should be noted that the sending end 110 and the receiving end 130 can be the sender and the receiver of each other, and the sending end 100, the switch 120, and the receiving end 130 perform data transmission through the RDMA technology.

[0085] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 2 The schematic diagram shown is a schematic diagram of an application in a scenario of Ethernet end-to-end communication.

[0086] like Figure 2 As shown, there are two servers communicating with the sending end and the receiving end respectively, and the sending end and the receiving end transmit and filter data through a switch.

[0087] The sender sends an Ethernet frame to the switch. The switch predicts the discard of the Ethernet frame based on the cache conditions of its own receiving port and sending port and the network congestion situation, and adds a discard flag to the Ethernet frame that may be discarded.

[0088] The switch first checks the flags of the Ethernet frame to determine whether the Ethernet frame has a flag to be discarded. If the flag does not exist, the Ethernet frame is forwarded normally to the corresponding receiving end. If the flag to be discarded exists, the type of the Ethernet frame to be discarded is checked to determine whether the data packet corresponding to the Ethernet frame is an RDMA data packet. If so, it is cached and counted through the register. If not, the data packet is directly discarded.

[0089] When the switch receives multiple RDMA data packets to be discarded continuously, if a normal Ethernet frame without a discard flag is received, a negative response information of the normal Ethernet frame is constructed based on the characteristic identifier and count number of the RDMA data packets to be discarded cached in the register, and the negative response information is sent to the sending end.

[0090] After receiving the negative acknowledgement information, the sending end determines the RDMA data packets that need to be retransmitted according to the quantity and characteristic identifier carried in the negative acknowledgement information, and performs the retransmission.

[0091] In the above example, the data packets sent by the sender are filtered and screened in the switch, and the RDMA data packets that may be discarded are filtered out, and the switch side requests the sender to retransmit the RDMA data. Compared with the prior art in which the receiving end sends response information and negative response information one by one according to the received data packets to notify the data sender which data has been lost and needs to be retransmitted, this example can save the retransmission process and shorten the retransmission time by filtering out the RDMA data packets that may be lost at the receiving end in the switch to request retransmission from the sending end, and it is not necessary to wait until the data reaches the data receiving end to determine whether it needs to be retransmitted, thereby reducing the RDMA transmission delay. In this example, the RDMA data packets to be discarded are cached and counted, and then the information to be discarded corresponding to the RDMA data packets to be discarded received before the normal data packet is added to the reception response of the normal data packet, and a negative response information is generated. In this way, a response message carries the information corresponding to the RDMA data packets to be discarded to notify the sender to retransmit the data. Compared with constructing the negative response information of the RDMA data packets to be discarded one by one, the number of times the negative response information is constructed is reduced, system resources are saved, and the number of negative response information is reduced, thereby reducing bandwidth waste.

[0092] It should be understood that the above content only illustrates some application scenarios of the present disclosure. The business scenarios to which the present disclosure can be applied may include but are not limited to the specific embodiments listed above.

[0093] General description of the disclosed embodiments

[0094] It should be emphasized that the embodiments of the present disclosure can be applied to a variety of application scenarios, such as data center networks, cloud computing, machine learning, distributed storage, etc. In the related art, the lost message in the selective retransmission technology based on the RNIC network card must go through at least 1 RTT time before retransmission can start, and the transmission delay is too large, especially on long-distance wide area networks. Some embodiments of the present disclosure provide a data selective retransmission method, related devices and media, which are intended to reduce RDMA transmission delay.

[0095] The data selective retransmission method is a method of selecting data for retransmission in the process of end-to-end data communication interaction based on RDMA technology, in response to situations such as packet loss and disorder caused by network congestion.

[0096] The data selection and retransmission method of the embodiment of the present disclosure may be executed in a server or in a terminal, or may be executed partially in a server and partially in a terminal.

[0097] like Figure 3 As shown, according to an embodiment of the present disclosure, applied to a switch, the data selection retransmission method includes:

[0098] Step 310: receiving a data packet to be detected sent by a data source;

[0099] Step 320: If the data packet to be detected is a data packet to be discarded, determine the type of the data packet to be discarded;

[0100] Step 330: When it is determined that the type of the data packet to be discarded is a remote direct data storage data packet, the remote direct data storage data packet to be discarded is cached and counted;

[0101] Step 340: until it is detected that the newly received data packet to be detected is not a data packet to be discarded, obtain the information to be discarded obtained by caching and counting the remote direct data storage data packets to be discarded, and construct negative response information of the data packet to be detected according to the information to be discarded;

[0102] Step 350: Send a negative acknowledgment message to the data source end, where the negative acknowledgment message is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

[0103] Steps 310 to 350 are briefly described below.

[0104] In step 310, the data source refers to a server or terminal that sends data. The data packet to be detected refers to a data packet sent from the data source to the switch and has not yet been flag-judged or type-judged.

[0105] In step 320, the data packets to be discarded are the data packets that may be discarded after the switch filters and identifies the data packets sent by the data source. For the data packets that are not to be discarded, they are directly forwarded by the switch to the corresponding data receiving end according to the general communication process.

[0106] In step 330, since the present disclosure is directed to a scenario of data transmission based on the RDMA protocol and is based on the RDMA selective retransmission improvement, the type of the data packet to be discarded is determined. When it is determined that the data packet to be discarded is an RDMA data packet, it needs to be retransmitted, so that the characteristic identifiers of these RDMA data packets to be discarded are cached for subsequent construction of negative acknowledgment information, so that the data source end can determine which RDMA data packets to retransmit from the negative acknowledgment information.

[0107] Counting means counting multiple RDMA data packets to be discarded when they are received consecutively. The counting is used to construct negative acknowledgment information later, so that the data source can determine the number of RDMA data packets that need to be retransmitted from the negative acknowledgment information.

[0108] In this step, the data packets to be discarded that are not RDMA data packets are directly discarded.

[0109] In step 340, the newly received data packet to be detected is not a data packet to be discarded, which means that the data packet newly received by the switch is a data packet to be forwarded normally. The information to be discarded refers to the information integrating the characteristic identification and counting information of all RDMA data packets to be discarded between the newly received normal data packet and the last received normal data packet.

[0110] Negative acknowledgment information refers to negative acknowledgment information generated by adding the intended discard information to the response information of the newly received normal data packet, and is used to inform the data source end which RDMA data packets are discarded and need to be retransmitted.

[0111] In step 350, after receiving the negative acknowledgment information, the data source can determine the RDMA data packets to be discarded obtained by the switch filtering according to the negative acknowledgment information, and resend the RDMA data packets to be discarded to the switch.

[0112] In the above-mentioned embodiment of step 310 to step 350, the data packets sent by the data source are filtered and screened in the switch, and the RDMA data packets that may be discarded are filtered out, and the RDMA data retransmission is requested from the sending data source at the switch. Compared with the prior art in which the data receiving end sends response information and negative response information one by one according to the received data packets to notify the data sending end which data has been lost and needs to be retransmitted, the embodiment of the present disclosure can save the retransmission process and shorten the retransmission time by filtering out the RDMA data packets that may be lost by the data receiving end in the switch to request retransmission from the data source, and it is not necessary to wait until the data reaches the data receiving end to determine whether retransmission is required, thereby reducing the RDMA transmission delay. The embodiment of the present disclosure also generates negative response information by caching and counting the RDMA data packets to be discarded, and then adding the discarded information corresponding to the RDMA data packets to be discarded received before the normal data packet to the reception response of the normal data packet. In this way, a response message carries the information corresponding to the RDMA data packets to be discarded to notify the data source to retransmit the data. Compared with constructing the negative response information of the RDMA data packets to be discarded one by one, the number of times the negative response information is constructed is reduced, system resources are saved, and the number of negative response information is reduced, thereby reducing bandwidth waste.

[0113] The above is a general description of steps 310 to 350 . The specific implementation process of steps 310 , 320 , 330 , and 340 will be described in detail below.

[0114] In step 310, a data packet to be detected sent by a data source is received.

[0115] In one embodiment, referring to Figure 4 After step 310, the data selection retransmission method further includes:

[0116] Step 410: Calculate the probability of discarding the data packet to be detected according to the current network congestion situation;

[0117] Step 420: When the probability of the packet to be discarded is greater than the probability threshold, a flag of the packet to be discarded is added to the header of the packet to be detected. The flag of the packet to be discarded is used to indicate that the packet to be detected corresponding to the switch will be discarded.

[0118] In step 410, network congestion refers to the situation where the network transmission performance is degraded due to limited resources of the store-and-forward node when too many packets are transmitted in the packet switching network. The current network congestion situation refers to the network congestion situation when the switch receives the data packet to be detected.

[0119] Network congestion can be indicated by:

[0120] (1) It is represented by the ratio of the data transmission volume in the network to the bandwidth capacity of the network. For example, a linear function can be constructed to calculate the discard probability of the data packet to be detected according to the ratio, wherein the larger the ratio, the greater the discard probability.

[0121] (2) The remaining buffer space of the switch input port and output port is used to indicate the network congestion. When the remaining buffer space is 0, the discard probability is considered to be 100%.

[0122] In step 420, the probability threshold refers to a preset probability. When the probability of intended discarding is greater than the preset probability, it can be considered that the corresponding data packet to be detected will be discarded, so a proposed discarding flag is added to the header of the data packet to be detected.

[0123] The flag to be discarded refers to the additional control flag header added to the header of the data packet, which is used to indicate that the data packet to which the flag belongs is a data packet to be discarded. For example, the format of the data packet with the flag to be discarded is as follows: Figure 5 shown.

[0124] In one example, when receiving an arbitrary Ethernet frame header and an additional control flag header of an operation item added in the early processing of the switch, the flag judgment module of the switch extracts the additional control flag header of the Ethernet frame to judge whether the Ethernet frame is a frame to be discarded. If it is a frame to be discarded, it enters the type judgment process.

[0125] The above steps 410 and 420 determine the probability that the data packet to be detected may be discarded according to the network congestion situation, and add a discard flag to the packet header of the data packet to be detected that is determined to be discarded, so that the filtering judgment of the data packet to be discarded can be quickly performed later.

[0126] In step 320, if the data packet to be detected is a data packet to be discarded, the type of the data packet to be discarded is determined.

[0127] In one embodiment, referring to Figure 6 , step 320 includes:

[0128] Step 610: parse the data packet to be discarded to obtain the Ethernet type of the data packet to be discarded;

[0129] Step 620: If the Ethernet type matches the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, then determine that the data packet to be discarded is a remote direct data storage data packet;

[0130] Step 630: If the Ethernet type does not match the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, determine whether the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type;

[0131] Step 640: If the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type, obtain the Internet Protocol header of the data packet to be discarded to determine whether it is a User Datagram Protocol header;

[0132] Step 650: If the Internet Protocol header is followed by a User Datagram Protocol header, obtain the destination port address in the User Datagram Protocol header;

[0133] Step 660: If the destination port address matches the remote direct data storage type of the second version of the remote direct memory access protocol based on Ethernet, it is determined that the data packet to be discarded is a remote direct data storage data packet.

[0134] In step 610, if Figure 7 As shown, in general, the RDMA data packet structure includes: an Ethernet header, an IP header, a User Datagram Protocol (UDP) header, an RDMA header, an RDMA payload, and a check code.

[0135] Among them, refer to Figure 8 The Ethernet header includes the source address, the destination address, and the Ethernet type (i.e., the Ethernet type). The Ethernet type can be used to determine the frame data field protocol of the data packet to be detected.

[0136] In step 620, the first version of the remote direct data storage based on Ethernet remote direct memory access protocol refers to the RoCEv1 protocol. Whether a match is detected is determined by determining whether the specific value of the Ethernet type field of the packet to be discarded is the same as the corresponding value of the RoCEv1 protocol.

[0137] In step 630, Internet Protocol Version 4 refers to IPv4 protocol, and Internet Protocol Version 6 refers to IPv6 protocol. If the Ethernet type does not match the IPv4 or IPv6 type, it means that the data packet to be discarded cannot be an RDMA data packet, so the data packet to be discarded is directly discarded.

[0138] In step 640, the User Datagram Protocol header is a UDP header. Figure 7 As shown, in the general RDMA data packet format, the IP header is followed by the UPD header field. Therefore, when it is determined that the Ethernet type of the data packet to be discarded is IPv4 or IPv6, by judging whether the IP header is followed by the UPD header, it can be judged whether the format of the data packet to be discarded conforms to the format of the RDMA data packet.

[0139] If the IP header is not followed by a UPD header, it indicates that the format of the data packet to be discarded does not conform to the format of an RDMA data packet and is not an RDMA data packet, so it is directly discarded.

[0140] In step 650, when it is determined that the IP header of the packet to be discarded is followed by a UPD header, it can be preliminarily determined that it complies with the RDMA packet format specification. The destination port address in the UPD header is further extracted to ultimately determine whether it is an RDMA packet.

[0141] In step 660, the second version of the remote direct data storage based on Ethernet remote direct memory access protocol refers to the RoCEv2 protocol. Whether a match is detected is determined by determining whether the specific value of the destination port address field of the packet to be discarded is the same as the corresponding value of the RoCEv2 protocol.

[0142] Reference Fig.10 , combined with Fig.10 The process of determining whether a data packet is an RDMA data packet is explained.

[0143] (1) When the switch type determination module receives an Ethernet frame, it first determines whether its Ethernet type is 0x8915. This type is the RDMA data packet type specified by the RoCE v1 protocol. If the type matches, execute step (2); if the type does not match, execute step (3).

[0144] (2) If the Ethernet type matches the RDMA packet type specified by the RoCEv1 protocol, the packet is an RDMA packet.

[0145] (3) If the Ethernet type does not match the RDMA data packet type specified by the RoCE v1 protocol, then determine whether its Ethernet type is 0x0800, that is, IPv4 type. If it is an IPv4 data packet, execute step (6); otherwise, execute step (4).

[0146] (4) If the Ethernet type is not IPv4, it is necessary to determine whether the Ethernet type is 0x86DD, i.e., IPv6 type. If not, execute step (5); if so, execute step (6).

[0147] (5) If the Ethernet type of the data packet is not IPv4 or IPv6, the data packet cannot be an RDMA data packet specified by the RDMA protocol and is therefore discarded.

[0148] (6) If the data packet is of IPv4 or IPv6 type, determine whether its next field is a UDP header (determine whether the Protocol field of IPv4 is 17, and whether the Next header field of IPv6 is 17). If so, execute step (8); if not, execute step (7). Among them, the Protocol field is used to indicate the upper layer protocol type encapsulated in the IP data packet, that is, the transport layer protocol type; the Next Header field is an 8-bit field used to identify the type of the next header.

[0149] (7) If the IP header of the data packet is not followed by a UDP header, the data packet is not an RDMA data packet and is discarded.

[0150] (8) If the IP header of the data packet is followed by a UDP header, determine whether the destination port address in the UDP header is 4791, which is the RDMA data packet type specified by the RoCEv2 protocol. If so, the data packet is an RDMA data packet. Otherwise, the data packet is not an RDMA data packet based on the RoCEv2 protocol and is discarded.

[0151] The embodiment of the above steps 610 to 660 can be compatible with all RoCE protocols and accurately filter out the RDMA data packets to be discarded by performing type matching according to each field of the data packet to be discarded.

[0152] In step 330, when it is determined that the type of the data packet to be discarded is a remote direct data storage data packet, the remote direct data storage data packet to be discarded is buffered and counted.

[0153] In one embodiment, referring to Fig.11 , step 330 includes:

[0154] Step 1110, whenever a remote direct data storage data packet to be discarded is identified, extracting the identifier of the remote direct data storage data packet to be discarded;

[0155] Step 1120: Put the identifier into the cache queue, and increase the count of the number of remote direct data storage data packets to be discarded by one.

[0156] In step 1110, the identifier of the remote direct data storage data packet to be discarded refers to the characteristic field used to represent it in the RDMA data packet to be discarded. For example, there is a BTH (BaseTransport Header) field in the RDMA data packet of the RoCEv2 protocol, and the sequence value therein can be used as the identifier of the RDMA data packet.

[0157] In step 1120, the cache queue refers to a data space in the switch for temporarily storing the identifier of the RMDA data to be discarded. Exemplarily, a register can be set in the switch to cache the identifier and the count number of caches.

[0158] In the embodiment of the above steps 1110 to 1120, the identifiers of the filtered RDMA data packets to be discarded are cached and counted for subsequent construction of negative acknowledgment information. Compared with constructing a negative acknowledgment information for each RDMA data packet to be discarded, the number of constructed negative acknowledgment information is reduced, system resources are saved, and the bandwidth occupied by sending negative acknowledgment information is reduced.

[0159] In step 340, until it is detected that the newly received data packet to be detected is not a data packet to be discarded, the information to be discarded obtained by caching and counting the remote direct data storage data packets to be discarded is obtained, and negative response information of the data packet to be detected is constructed according to the information to be discarded.

[0160] In one embodiment, referring to Fig.12 , step 340 includes:

[0161] Step 1210: Take out all identifiers from the cache queue;

[0162] Step 1220, obtaining the count number when constructing negative response information;

[0163] Step 1230: construct negative response information according to all identifiers and counted quantities;

[0164] After step 340, the method further includes:

[0165] Step 1240: Clear the cache queue;

[0166] Step 1250, set the count quantity to 0.

[0167] In step 1210, the identifier refers to the characteristic identifier of the previously cached RDMA data packet to be discarded. All identifiers refer to the identifiers of multiple RDMA data packets to be discarded received between the currently received normal data packet and the last received normal data packet.

[0168] In step 1220, the counted number refers to the number of multiple RDMA data packets to be discarded that are received between the currently received normal data packet and the last received normal data packet.

[0169] In step 1230, in RDMA transmission, when the data receiving end receives the data sent by the sending end, it returns a response message to inform the sending end that the corresponding data has been received. The disclosed embodiment uses the response information of the normal data packet, adds the identifier and count number of the RDMA data packet to be discarded to generate a negative response message, and does not increase the amount of additional information sent.

[0170] In step 1240 and step 1250, after the negative response information is constructed, the cache queue is cleared and the count is reset to zero, so as to restart a new round of caching and counting of the newly received RDMA data to be discarded until the next new normal data packet is received. The normal data packet in the embodiment of the present disclosure refers to a data packet without a flag to be discarded.

[0171] Exemplarily, it is assumed that there are 1-11 data packets, of which data packets 1 to 5 are RDMA data packets to be discarded, data packet 6 is a normal data packet, data packets 7 to 9 are RDMA data packets to be discarded, and data packets 10 and 11 are normal data packets. When the switch receives data packets 1 to 5, it identifies them as RDMA data packets to be discarded, and puts the identifiers of data packets 1 to 5 into the cache queue, and the count quantity is 5 at this time. When the switch receives data packet 6, it identifies data packet 6 as a normal data packet. At this time, the identifiers of data packets 1 to 5 in the cache queue are taken out, and the count quantity is 5. The switch adds the identifiers of data packets 1 to 5 and the count quantity 5 on the basis of the response information of data packet 6, and generates a negative response information. At the same time, the cache queue is cleared, and the count quantity is set to 0. The switch sends the negative response information to the data source end. The data source end can know that there are 5 RDMA data packets that need to be retransmitted according to the negative response information, namely data packets 1 to 5. The switch continues to receive data packets, receives data packets 7 to 9, and identifies them as RDMA data packets to be discarded, and puts the identifiers of data packets 7 to 9 into the cache queue, and the count quantity is 3 at this time.

[0172] In the embodiment of step 1210 to step 1250, by caching and counting the RDMA data packets to be discarded, and then adding the discarded information corresponding to the RDMA data packets to be discarded received before the normal data packet to the reception response of the normal data packet, a negative response message is generated. In this way, one response message carries the discarded information corresponding to the previous multiple RDMA data packets to be discarded to notify the data source end to retransmit the data. Compared with constructing the negative response information of the RDMA data packets to be discarded one by one, the number of times the negative response information is constructed is reduced, system resources are saved, and the number of negative response information is reduced, thereby reducing bandwidth waste.

[0173] In one embodiment, the data selection and retransmission method further includes:

[0174] When the counted number is greater than a preset threshold, receiving the next data packet sent by the data source;

[0175] If the next data packet is a data packet to be discarded, the type of the data packet to be discarded is determined;

[0176] When the data packet to be discarded is an RDMA data packet, all identifiers in the cache queue are obtained, the current count quantity is obtained and added by one to obtain a first quantity, and negative response information of the next data packet is constructed according to all identifiers and the first quantity;

[0177] If the next data packet is not a data packet to be discarded, all identifiers in the cache queue are obtained, the current count quantity is obtained, and negative response information of the next data packet is constructed according to all identifiers and the count quantity.

[0178] In the embodiments of the present disclosure, the preset threshold refers to a preset maximum number of RDMA data packets to be discarded; the preset threshold can be set based on expert experience or the requirements of an actual network environment.

[0179] When the counted number is greater than the preset threshold, it means that the number of RDMA data packets that are currently cached and counted and are to be discarded has reached the preset upper limit, and it is necessary to request data retransmission from the data source.

[0180] If the next data packet received is a data packet to be discarded but is not an RDMA data packet, it is directly discarded and the next data packet is received.

[0181] If the next data packet received is an RDMA data packet to be discarded, the identifier of the RDMA data packet to be discarded is added together with the identifier in the cache queue, and one is added to the count to construct negative response information of the RDMA data packet to be discarded.

[0182] If the next data packet received is a normal data packet, all identifiers and the current count quantity are taken out from the cache queue to construct negative response information of the normal data packet.

[0183] For example, it is assumed that there are currently data packets 1 to 6, wherein data packets 1 to 5 are RDMA data packets to be discarded. The preset threshold is 4.

[0184] The switch receives data packets 1 to 5 and identifies them as RDMA data packets to be discarded, and puts the identifiers of data packets 1 to 5 into the cache queue, and the count quantity is 5. Since the count quantity is 5, it exceeds the preset threshold value 4.

[0185] The switch receives data packet 6. If data packet 6 is an RDMA data packet to be discarded, the identifiers of data packets 1 to 5 are taken out from the cache queue, the count is increased by 1 (6), and a negative response message of data packet 6 is constructed based on the identifiers of data packets 1 to 6 and the number 6.

[0186] If data packet 6 is a normal data packet, the identifiers of data packets 1 to 5 are taken out from the cache queue, and the count quantity is determined to be 5, and the negative response information of data packet 6 is constructed according to the identifiers of data packets 1 to 5 and the quantity 5.

[0187] The above embodiment triggers the retransmission request of the RDMA data packet by setting a counting threshold, thereby avoiding the situation where, due to extreme network congestion, the switch always receives RDMA data packets to be discarded and fails to receive normal data packets, thereby failing to trigger the construction of negative response information of the RDMA data packets to be discarded, resulting in an excessively large cache queue and too many RDMA data packets requesting retransmission.

[0188] In one embodiment, the data selection and retransmission method further includes:

[0189] When the cache queue is full, obtain the current remote direct data storage data packet to be discarded;

[0190] Constructing negative response information according to all identifiers and counts in the cache queue;

[0191] Clear the cache queue and set the count to 0.

[0192] In the embodiment of the present disclosure, the current remote direct data storage data packet to be discarded refers to the RDMA data packet to be discarded corresponding to the last identifier in the cache queue.

[0193] Exemplarily, it is assumed that there are currently data packets 1 to 6, where data packets 1 to 6 are RDMA data packets to be discarded, and the upper limit of the identifiers that can be stored in the cache queue is 5, that is, after storing 5 identifiers, the cache queue is in a full queue state.

[0194] The switch receives data packets 1 to 5 and identifies them as RDMA data packets to be discarded, and puts the identifiers of data packets 1 to 5 into the cache queue, and the count quantity is 5. At this time, the cache queue is in a full queue state.

[0195] At this time, the current RDMA data packet to be discarded is data packet 5. The switch takes out the identifiers of data packets 1 to 5 from the cache queue, determines that the count quantity is 5, constructs the negative response information of data packet 5 according to the identifiers of data 1 to 5 and the quantity 5, and clears the cache queue, setting the count quantity to 0.

[0196] The switch receives data packet 6, identifies that data packet 6 is an RDMA data packet to be discarded, and puts the identifier of data packet 6 into the cache queue. Since the cache queue has been cleared before, the identifier of data packet 6 is placed first in the cache queue. The count quantity at this time is 1.

[0197] The above embodiment triggers the retransmission request of the RDMA data packet by judging whether the cache queue is full, thereby avoiding the situation where, due to extreme network congestion, the switch always receives RDMA data packets to be discarded and fails to receive normal data packets, thereby failing to trigger the construction of negative response information of the RDMA data packets to be discarded, resulting in the cache queue being too large and too many RDMA data packets requesting retransmission.

[0198] Description of the apparatus and device of the present disclosure

[0199] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0200] Fig.13 The structure diagram of the data selection and retransmission device provided in the embodiment of the present disclosure is as follows. The data selection and retransmission device 1300 includes:

[0201] The data packet acquisition unit 1310 is used to receive the data packet to be detected sent by the data source end;

[0202] A type determination unit 1320 is configured to determine the type of the data packet to be discarded if the data packet to be detected is a data packet to be discarded;

[0203] The information cache unit 1330 is used to cache and count the remote direct data storage data packets to be discarded when it is determined that the type of the data packets to be discarded is a remote direct data storage data packet;

[0204] The information construction unit 1340 is used to detect that the newly received data packet to be detected is not a data packet to be discarded, obtain the information to be discarded obtained by caching and counting the remote direct data storage data packets to be discarded, and construct negative response information of the data packet to be detected according to the information to be discarded;

[0205] The response sending unit 1350 is used to send negative response information to the data source end, and the negative response information is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

[0206] Optionally, the information cache unit 1330 is specifically used for:

[0207] Whenever a remote direct data storage data packet to be discarded is identified, extracting an identifier of the remote direct data storage data packet to be discarded;

[0208] The identifier is placed in the cache queue and the count of the number of remote direct data storage packets to be discarded is increased by one.

[0209] Optionally, the information construction unit 1340 is specifically configured to:

[0210] Take all identifiers from the cache queue;

[0211] Get the count number when constructing negative response information;

[0212] Constructing negative response information based on all identifiers and counted quantities;

[0213] The information construction unit 1340 is further specifically used for:

[0214] Clear the cache queue;

[0215] Set the count to 0.

[0216] Optionally, the information construction unit 1340 is specifically configured to:

[0217] When the counted number is greater than a preset threshold, receiving the next data packet sent by the data source;

[0218] If the next data packet is a data packet to be discarded, the type of the data packet to be discarded is determined;

[0219] When the data packet to be discarded is a remote direct data storage data packet, all identifiers in the cache queue are obtained, the current count quantity is obtained and added by one to obtain a first quantity, and negative response information of the next data packet is constructed according to all identifiers and the first quantity;

[0220] If the next data packet is not a data packet to be discarded, all identifiers in the cache queue are obtained, the current count quantity is obtained, and negative response information of the next data packet is constructed according to all identifiers and the count quantity.

[0221] Optionally, the information construction unit 1340 is specifically configured to:

[0222] When the cache queue is full, obtain the current remote direct data storage data packet to be discarded;

[0223] Constructing negative response information of the current remote direct data storage data packet to be discarded according to all the identifiers and count quantities in the cache queue;

[0224] Clear the cache queue and set the count to 0.

[0225] Optionally, the data selective retransmission device 1300 further includes a discard marking unit (not shown in the figure), and the discard marking unit is used to:

[0226] Calculate the probability of discarding the data packet to be detected according to the current network congestion situation;

[0227] When the probability of being discarded is greater than the probability threshold, a flag of being discarded is added to the header of the data packet to be detected. The flag of being discarded is used to indicate that the data packet to be detected corresponding to the switch will be discarded.

[0228] Optionally, the type determination unit 1320 is specifically configured to:

[0229] Parsing the data packet to be discarded to obtain the Ethernet type of the data packet to be discarded;

[0230] If the Ethernet type matches the remote direct data storage type of the first version of the remote direct memory access protocol over Ethernet, determining that the packet to be discarded is a remote direct data storage packet;

[0231] If the Ethernet type does not match the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, determine whether the Ethernet type matches the IPv4 or IPv6 type;

[0232] If the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type, obtaining the Internet Protocol header of the data packet to be discarded to determine whether it is a User Datagram Protocol header;

[0233] If the Internet Protocol header is followed by a User Datagram Protocol header, obtaining a destination port address in the User Datagram Protocol header;

[0234] If the destination port address matches the remote direct data storage type of the second version of the remote direct memory access protocol over Ethernet, it is determined that the data packet to be discarded is a remote direct data storage data packet.

[0235] Reference Fig.14 , Fig.14The structural block diagram of the terminal part for implementing the data selection retransmission method of the embodiment of the present disclosure is as follows: the terminal includes: a radio frequency (RF) circuit 1410, a memory 1414, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art can understand that Fig.14 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0236] The RF circuit 1410 may be used for receiving and sending signals during information transmission or communication or during a call. In particular, after receiving downlink information from a base station, the information is sent to the processor 1480 for processing. In addition, the uplink data is sent to the base station.

[0237] The memory 1414 may be used to store software programs and modules. The processor 1480 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 1414 .

[0238] The input unit 1430 may be used to receive input digital or character information and generate key signal input related to the setting and function control of the content terminal. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .

[0239] The display unit 1440 may be used to display input information or provided information and various menus of the content terminal. The display unit 1440 may include a display panel 1414.

[0240] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 may provide an audio interface.

[0241] In this embodiment, the processor 1480 included in the terminal can execute the data selection and retransmission method of the previous embodiment.

[0242] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present disclosure can be applied to various scenarios, including but not limited to content recommendation, data screening, etc.

[0243] Fig.15A block diagram of the structure of a portion of a server for implementing the data selection retransmission method of an embodiment of the present disclosure. The server may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) storing application programs 1515 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be short-term storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 and execute a series of instruction operations in the storage medium 1530 on the server.

[0244] The server may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0245] The central processor 1522 in the server can be used to execute the data selection and retransmission method of the embodiment of the present disclosure.

[0246] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the data selection and retransmission methods of the aforementioned embodiments.

[0247] The embodiment of the present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned data selection and retransmission method.

[0248] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar contents, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.

[0249] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated content, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the associated content before and after is in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0250] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0251] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0252] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0253] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0254] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0255] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0256] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A data selective retransmission method, characterized in that: Applied to a switch, the method comprises: Receive the data packet to be detected sent by the data source; If the data packet to be detected is a data packet to be discarded, determining the type of the data packet to be discarded; When it is determined that the type of the data packet to be discarded is a remote direct data storage data packet, buffering and counting the remote direct data storage data packet to be discarded; Until it is detected that the newly received data packet to be detected is not a data packet to be discarded, obtaining the information to be discarded obtained by caching and counting the remote direct data storage data packet to be discarded, and constructing negative response information of the data packet to be detected according to the information to be discarded; The negative acknowledgement information is sent to the data source end, and the negative acknowledgement information is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

2. The method according to claim 1, characterized in that The step of caching and counting the remote direct data storage data packets to be discarded comprises: Whenever a remote direct data storage data packet to be discarded is identified, extracting the identifier of the remote direct data storage data packet to be discarded; The identifier is placed in a cache queue, and the count number of the remote direct data storage data packets to be discarded is increased by one.

3. The method according to claim 2, characterized in that The acquiring the information to be discarded obtained by caching and counting the remote direct data storage data packets to be discarded, and constructing the negative response information of the data packet to be detected according to the information to be discarded, comprises: Taking out all the identifiers from the cache queue; Obtaining the counted number when constructing the negative response information; Constructing the negative response information according to all the identifiers and the counted quantities; After constructing negative response information of the data packet to be detected according to the information to be discarded, the method further includes: Clearing the cache queue; The count quantity is set to 0.

4. The method according to claim 2, characterized in that: The method further comprises: When the counted number is greater than a preset threshold, receiving the next data packet sent by the data source; If the next data packet is a data packet to be discarded, determining the type of the data packet to be discarded; When the data packet to be discarded is the remote direct data storage data packet, obtaining all the identifiers in the cache queue, obtaining the current count quantity and adding one to obtain a first quantity, and constructing the negative response information of the next data packet according to all the identifiers and the first quantity; If the next data packet is not a data packet to be discarded, all the identifiers in the cache queue are obtained, the current count quantity is obtained, and the negative response information of the next data packet is constructed according to all the identifiers and the count quantity.

5. The method according to claim 2, characterized in that: The method further comprises: When the cache queue is full, obtaining the current remote direct data storage data packet to be discarded; Constructing the negative response information of the current remote direct data storage data packet to be discarded according to all the identifiers and the counted quantities in the cache queue; Clear the cache queue and set the count to 0.

6. The method according to claim 1, characterized in that After receiving the data packet sent by the data source, the method further includes: Calculate the probability of discarding the data packet to be detected according to the current network congestion situation; When the probability of being discarded is greater than the probability threshold, a flag of being discarded is added to the header of the data packet to be detected, and the flag of being discarded is used to indicate that the data packet to be detected corresponding to the switch will be discarded.

7. The method according to claim 1, characterized in that The step of determining the type of the data packet to be discarded includes: Parsing the data packet to be discarded to obtain the Ethernet type of the data packet to be discarded; If the Ethernet type matches the remote direct data storage type of the first version of the remote direct memory access protocol based on Ethernet, determining that the data packet to be discarded is the remote direct data storage data packet; If the Ethernet type does not match the remote direct data storage type of the first version of the Ethernet-based remote direct memory access protocol, determining whether the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type; If the Ethernet type matches the Internet Protocol version 4 or Internet Protocol version 6 type, obtaining the Internet Protocol header of the data packet to be discarded to determine whether it is a User Datagram Protocol header; If the Internet Protocol header is followed by the User Datagram Protocol header, obtaining a destination port address in the User Datagram Protocol header; If the destination port address matches the remote direct data storage type of the second version of the remote direct memory access protocol based on Ethernet, it is determined that the data packet to be discarded is the remote direct data storage data packet.

8. A data quality improvement device, characterized in that: The device comprises: A data packet acquisition unit, used for receiving a data packet to be detected sent by a data source; A type determination unit, configured to determine the type of the data packet to be discarded if the data packet to be detected is a data packet to be discarded; An information caching unit, configured to cache and count the remote direct data storage data packets to be discarded when it is determined that the type of the data packets to be discarded is a remote direct data storage data packet; An information construction unit is used to obtain the intended discard information obtained by caching and counting the remote direct data storage data packets to be discarded until it is detected that the newly received data packet to be detected is not the intended discard data packet, and construct negative response information of the data packet to be detected according to the intended discard information; The response sending unit is used to send the negative response information to the data source end, and the negative response information is used to notify the data source end to resend the remote direct data storage data packet to be discarded.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data selective retransmission method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer can implement the data selective retransmission method according to any one of claims 1 to 7 when executing the computer program.

11. A computer program product comprising a computer program or computer instructions, characterized in that The computer program or the computer instructions are stored in a computer-readable storage medium, and a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium. The processor executes the computer program or the computer instructions, so that the computer device executes the data selection and retransmission method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Packet-based lossy RDMA network low-overhead retransmission system

    CN121261854A

  • Selective retransmission function test method, device and system for remote direct memory access, medium and product

    CN121441800A