CN113300818A - Data transmission system and method - Google Patents

Data transmission system and method Download PDF

Info

Publication number
CN113300818A
CN113300818A CN202110179976.XA CN202110179976A CN113300818A CN 113300818 A CN113300818 A CN 113300818A CN 202110179976 A CN202110179976 A CN 202110179976A CN 113300818 A CN113300818 A CN 113300818A
Authority
CN
China
Prior art keywords
request
transmission
completion
data
order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110179976.XA
Other languages
Chinese (zh)
Other versions
CN113300818B (en
Inventor
邱昊楠
李强
高翼枭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202110179976.XA priority Critical patent/CN113300818B/en
Publication of CN113300818A publication Critical patent/CN113300818A/en
Application granted granted Critical
Publication of CN113300818B publication Critical patent/CN113300818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1825Adaptation of specific ARQ protocol parameters according to transmission conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present specification provides a data transmission system and method, wherein the data transmission system includes: a transmission module and a processing module; the transmission module is configured to receive a plurality of data packets submitted by the sending server aiming at the target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on a plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue; the processing module is configured to extract the completion request from the completion queue and analyze the completion request to obtain an out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to a transmission module; the transmission module is further configured to send a retransmission response request to the sending server, where the retransmission response request is used to request the sending server to retransmit the data packet corresponding to the target transmission request.

Description

Data transmission system and method
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data transmission system and method.
Background
With the development of internet technology, data center networks pay more and more attention to the high efficiency of data transmission, and in the process of data transmission, packet loss (packet drop) is a common phenomenon in the transmission process; the network transmission congestion is one of the main reasons for the packet loss rate, RDMA (Remote Direct Memory Access) reliable connection rc (reusable connection) can complete the transmission process under the condition of good packet loss rate due to the Go-Back-N retransmission mechanism, but the process has large resource consumption and low transmission efficiency; in the prior art, in order to improve transmission efficiency, usually RDMA unreliable connection uc (unreliable connection) is used to provide a network service that can tolerate packet loss for an application, but when an existing mechanism of RDMA unreliable connection faces packet loss, a silent processing is performed on a network to discard all data packets included in a current RDMA request, and at this time, in order to ensure reliable transmission of data, a layer of reliable mechanism needs to be designed on software to identify packet loss and ensure retransmission, and whether a software detection request is lost or not needs to be started when a receiver receives a next request, which causes problems of slow retransmission start, low efficiency, long consumed time, and the like.
Disclosure of Invention
In view of this, the present specification provides a data transmission system. The present specification relates to two data transmission methods, a data transmission apparatus, a computing device, and a computer-readable storage medium, so as to solve the technical defects in the prior art.
According to a first aspect of the embodiments of the present specification, there is provided a data transmission system, applied to a receiving server, including:
a transmission module and a processing module;
the transmission module is configured to receive a plurality of data packets submitted by a sending server aiming at a target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
the processing module is configured to extract the completion request from the completion queue, and analyze the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module;
the transmission module is further configured to send the retransmission response request to the sending server, where the retransmission response request is used to request the sending server to retransmit the data packet corresponding to the target transmission request.
Optionally, the transmission module is further configured to:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number; and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
Optionally, the transmission module is further configured to:
deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
Optionally, the transmission module is further configured to:
under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
accordingly, the processing module is further configured to:
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
Optionally, the transmission module is further configured to:
and under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule, creating the completion request based on the out-of-order operation code, and adding the completion request containing the out-of-order operation code into the completion queue.
Optionally, the processing module is further configured to:
analyzing the completion request to obtain the out-of-order operation code, inquiring the preset request number table based on the out-of-order operation code to determine an expected request number, and determining the request number corresponding to the target transmission request according to the expected request number.
Optionally, the processing module is further configured to:
determining a sequence number corresponding to the unreceived data packet according to the request number and the out-of-order operation code, and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet; and sending the retransmission response request to the transmission module.
According to a second aspect of the embodiments of the present specification, there is provided a data transmission method, applied to a receiving server, including:
a transmission module receives a plurality of data packets submitted by a sending server aiming at a target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
the processing module extracts the completion request from the completion queue and analyzes the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module;
and the transmission module sends the retransmission response request to the sending server, wherein the retransmission response request is used for requesting the sending server to retransmit the data packet corresponding to the target transmission request.
According to a third aspect of embodiments herein, there is provided a data transmission method including:
receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number;
in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
and determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
Optionally, the performing out-of-order detection on the plurality of data packets according to the sequence number includes:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number;
and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
Optionally, after the step of performing out-of-order detection on the plurality of data packets according to the sequence number is executed, the method further includes:
deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
Optionally, after the step of performing out-of-order detection on the plurality of data packets according to the sequence number is executed, the method further includes:
under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
Optionally, in the case that the detection fails, adding a completion request containing an out-of-order detection result to the completion queue includes:
under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule;
creating the completion request based on the out-of-order opcode, adding the completion request including the out-of-order opcode to the completion queue.
Optionally, the determining, according to the out-of-order detection result, a request number corresponding to the target transmission request includes:
analyzing the completion request to obtain the out-of-order operation code, and inquiring the preset request number table to determine an expected request number based on the out-of-order operation code;
and determining the request number corresponding to the target transmission request according to the expected request number.
Optionally, the generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server includes:
determining a sequence number corresponding to the data packet which is not received according to the request number and the out-of-order operation code;
and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet, and sending the retransmission response request to the sending server.
According to a fourth aspect of embodiments herein, there is provided a data transmission apparatus including:
the receiving module is configured to receive a plurality of data packets submitted by the sending server aiming at the target transmission request;
the detection module is configured to extract a sequence number contained in each data packet and carry out-of-order detection on the plurality of data packets according to the sequence number;
an adding module configured to add a completion request containing an out-of-order detection result to a completion queue in the event of a detection failure;
the extracting module is configured to extract the completion request from the completion queue and analyze the completion request to obtain the out-of-order detection result;
and the sending module is configured to determine a request number corresponding to the target transmission request according to the out-of-order detection result, generate a retransmission response request based on the request number, and send the retransmission response request to the sending server.
According to a fifth aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is to store computer-executable instructions, and the processor is to execute the computer-executable instructions to:
receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number;
in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
and determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
According to a sixth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the data transmission method.
In the data transmission system provided by the present specification, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, and a plurality of data packets are subjected to out-of-order detection according to the sequence number, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to know the packet loss condition is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
Drawings
Fig. 1 is a schematic diagram of a process of retransmitting a data packet according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a data transmission system provided in an embodiment of the present specification;
fig. 3 is a schematic diagram of another procedure for retransmitting a data packet according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a data transmission method provided in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of a data transmission system applied in a data packet transmission scenario according to an embodiment of the present disclosure;
fig. 6 is a flowchart of another data transmission method provided in an embodiment of the present specification;
fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present disclosure;
fig. 8 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
RDMA: (Remote Direct Memory Access) is generated for solving the delay of server-side data processing in network transmission; RDMA transfers data directly to the storage area of a computer through a network, and quickly moves data from a system to a remote system memory without any influence on an operating system, so that the processing function of the computer is not needed; RDMA supports three queues, Send Queue (SQ) and Receive Queue (RQ), Completion Queue (CQ). Wherein the transmit Queue and receive Queue are typically created in Pairs, called Queue Pairs (QPs).
Cq (completion queue): a queue containing CQEs; CQE (completion Queue entry), a record in CQ that describes the information (status, size, etc.) of the WR that has been completed; wr (work request), a request submitted by a user to a WQ (work queue); one of WQ (work queue), SQ or RQ; WQE (work Queue element), an element in WQ.
RC (Reliable Connection): based on the connection-oriented QP transmission service, one QP is associated with another QP, and information transmission between the two is reliable, particularly in terms of correctness and sequence of data.
UC (Unreliable connection): based on the connection-oriented QP transmission service, one QP is associated with another QP, and information transmission between the two QPs is unreliable, particularly due to data inaccuracy, non-sequence, packet loss tolerance and the like.
Go-Back-N: RDMA packet loss retransmission mechanism that retransmits all packets starting from the first dropped packet; and (3) POD: a data center deployment unit; psn (package serial number): packet sequence number of the data packet.
Ack (acknowledge character): confirming the received packet sequence number, and transmitting a transmission control character to a transmitting station by a receiving station in data communication; indicating that the transmitted data is received without errors.
Nak (negative acknowledgement): a packet sequence number, which acknowledges non-receipt, is a signal used in digital communications to acknowledge receipt of data but with small errors; OOS: and (4) disorder.
In the present specification, a data transmission system is provided, and the present specification relates to two data transmission methods, a data transmission apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
In practical application, in order to adapt to the characteristic of large-scale network communication packet loss of a data center POD, a network which can tolerate packet loss is provided for application by using an RDMA Unreliable Connection (UC) is a better choice, but when the connection is established by using the existing technology of the RDMA unreliable connection, a pair of initial sending PSN and receiving PSN is negotiated for the RDMA unreliable connections at two sides, a receiver determines whether to receive a data packet transmitted on the next network on the RDMA unreliable connection or not according to the PSN negotiated with the sender, if so, the data packet is normally received, and a completion queue element CQE is generated in the corresponding RDMA unreliable connection after the receiving is finished to inform the receiver application of receiving complete data.
Otherwise, all data packets after the RDMA request are discarded (each request has a start mark and an end mark in the data packet for indicating the request corresponding to the data packet), and the PSN is updated to the PSN of the next received request on the RDMA unreliable connection of the receiving party, unlike the situation that any completion or error prompt is generated in the corresponding RDMA unreliable connection, namely the application of the receiving party is not informed; at this time, in order to ensure reliable transmission of data (data integrity), only one table < req > can be maintained for each RDMA unreliable connection through software, when establishing connection, an initial sending request number SendSeq (belonging to the sending party) and RecvSeq (belonging to the receiving party) are negotiated between the sending party and the receiving party, a request sequence number Seq < req > is marked on each RDMA request req, the reliable delivery state of each RDMA request req is tracked, whether a sequence number Seq < req > contained in each received RDMA request req is a next request expected to be received is detected on the software of the receiving party, then corresponding software ACK and NAK processing is carried out, and the sending party selectively retransmits the RDMA request discarded due to network packet loss according to ACK or NAK fed back by the receiving party, thereby ensuring end-to-end reliable data delivery service.
Referring to fig. 1, however, the reliability mechanism requires that the sending application process maintain a table for each RDMA unreliable connection to retransmit dropped RDMA requests, and that the receiving application process maintain an nrs (nextreqseq) for each RDMA connection to detect if any requests are lost. When a request is lost (step 1 in fig. 1), the receiving party can only wait for the network card to discard all current data packets until the network card receives the next complete RDMA request and notifies the upper layer application (step 2 and step 3 in fig. 1), the receiving party application can not enter a packet loss detection and NAK feedback sending flow (step 4 in fig. 1), and retransmission needs to wait for a long time to start (step 5 to step 7 in fig. 1), resulting in low retransmission efficiency; therefore, it is important to improve the retransmission efficiency significantly.
In the data transmission system provided by the present specification, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, and a plurality of data packets are subjected to out-of-order detection according to the sequence number, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to know the packet loss condition is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
Fig. 2 is a schematic structural diagram of a data transmission system 200 provided in an embodiment of the present specification, where the data transmission system 200 is applied to a receiving server and includes a transmission module 220 and a processing module 240;
the transmission module 220 is configured to receive a plurality of data packets submitted by the sending server for the target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
the processing module 240 is configured to extract the completion request from the completion queue, and parse the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module 220;
the transmission module 220 is further configured to send the retransmission response request to the sending server, where the retransmission response request is used to request the sending server to retransmit the data packet corresponding to the target transmission request.
Specifically, the sending server specifically refers to any server that can perform data transmission in a data center, and correspondingly, the receiving server specifically refers to a server that has a network transmission relationship with the sending server, before performing network transmission, the sending server and the receiving server establish an unreliable RDMA connection, so that a certain packet loss rate can be tolerated while the network transmission performance is improved; in the process, in order to further improve the transmission reliability while ensuring the network transmission performance, a sending request number and a receiving request with an association relationship are created at the sending server and the receiving server at the same time, so that when the sending server sends a data packet to the receiving server, the sending server transmits the data packet by taking the request as a response, namely, the identifier of the RDMA request is added to the initial data packet and the end data packet corresponding to each RDMA request, so that the receiving server can know that the data packet acquired at the current stage belongs to the RDMA request, and the related information of the data packet corresponding to the request, such as the quantity and the like, can be obtained by the receiving request number.
If a packet loss occurs in the process of receiving the data packet corresponding to the request, in order to ensure the integrity of the data packet corresponding to the request, the receiving server may request the sending server to send the data packet corresponding to the request again, at this time, the receiving server may determine the request number corresponding to the request according to the receiving request number to obtain the data packet corresponding to the request, and request the sending server to send the data packet corresponding to the RDMA request corresponding to the request number again, the sending server may also determine the data packet to be sent again according to the request number, and the operation of supplementing the data packet again may be completed by sending the data packet corresponding to the RDMA request again, so that the sending server may send the complete data packet again, and the receiving server may write the complete data packet into the receiving memory.
Based on this, the transmission module 220 specifically refers to a network card of a receiving party in the receiving server, the transmission module 220 is a hardware module, correspondingly, the processing module 240 specifically refers to an application of the receiving party in the receiving server, the processing module 240 is a software module, and it should be noted that the application of the sending party also has a transmission module (a network card of the sending party) and a processing module (an application of the sending party); the target transmission request is a request which needs to be processed at the current moment, namely a data packet of the target transmission request needs to be transmitted (sent to a receiving server by a sending server for storage); the data packet is specifically a data packet which needs to be written from a sending memory in a sending server to a receiving memory in a receiving server; correspondingly, the sequence number specifically refers to a sequence number of each data packet, and the sequence number is continuous and incremental and is used for indicating the number and the orderliness of the data packets corresponding to each transmission request; the out-of-order detection specifically refers to a detection condition for detecting whether packet loss or out-of-order occurs to a data packet corresponding to a target transmission request, and the Completion Queue (CQ) specifically refers to a queue written with a completion request (CQE) and is used for ordering the completion requests to wait for processing by a receiver application.
Further, the request number is the above-mentioned receiving request number, and the request number grows one by one with the growth of the request, and the request numbers are continuous, the request number at the sending server is the number corresponding to the transmission request sent, and the request number at the receiving server is the number corresponding to the transmission request expected to be received; correspondingly, the retransmission response request specifically refers to a request that the receiving server re-requests to send a data packet in response to the transmission request that has lost the packet when a packet loss event occurs.
Referring to fig. 3, taking the data transmission method applied to the receiving party as an example, the processing module is applied to the receiving party, the transmission module is a network card of the receiving party, and the data transmission method is described; under the condition that a sender sends a target transmission request to a receiver, the network card of the sender sends the target transmission request to the network card of the receiver according to the condition that the sender needs to write a data packet into a receiving memory applied by the receiver, and the step 1 is executed: sending a plurality of data packets (packets) corresponding to the target transmission request1,packet2……packetn) And each data packet contains a target transmission request flag req 1; receiving side network card receivingAfter a plurality of data packets arrive, in order to ensure the integrity of the data packets corresponding to the target transmission request, the sequence number PSN corresponding to each data packet is extracted, and the packet of the data packet is determined1Corresponding PSN1Packet of data2Corresponding PSN2… … packetnCorresponding PSNn
Based on this, in order to improve the network transmission efficiency of the sending party and the receiving party, the PSN is determined according to the sequence number1,PSN2……PSNnPerforming disorder detection on data packets corresponding to the target transmission request, under the condition that a disorder detection result is failed, explaining the condition that a plurality of data packets corresponding to the target transmission request are lost, adding a completion request CQE containing the disorder detection result in a completion queue CQ, executing the step 2 to inform a receiving party application, extracting the completion request CQE containing the disorder detection result from the completion queue by the receiving party application, and determining a request number Seq corresponding to the target transmission request according to the disorder detection result1<req>At this time, the application of the receiving party generates NAK to request the sending party to resend a plurality of data packets corresponding to the target transmission request by executing the step 3, and meanwhile, in order to ensure the data transmission efficiency, the network card of the receiving party also executes the step 3 at the same time to continue receiving the next transmission request req sent by the network card of the sending party2A corresponding plurality of data packets.
After the network card of the sending party receives the NAK, step 4 is executed, namely the network card of the sending party feeds back a plurality of data packet requests corresponding to the retransmission target transmission request to the sending party, and the sending party applies the Tabl maintained through checking<req>Table, determining number of retransmission request required to be req1Corresponding data packet (packet)1~packetn) At this time, step 5 is executed to inform the sending side network card of retransmitting a plurality of data packets corresponding to the target transmission request, and step 6 is executed to execute step 6 to resend the data packets (packets) corresponding to the target transmission request to the receiving side network card by the sending side network card1~packetn) The data packet is retransmitted aiming at the target transmission request, the data packet written into the receiving memory by the application of the receiving party is ensured to be complete, and the retransmission efficiency is ensured。
In summary, when the transmission module determines that a packet corresponding to the target transmission request is lost by detecting the sequence number, the transmission module sends a completion request including an out-of-order detection result to the processing module in time, so that the processing module can know a loss event in time and request the sending server to retransmit the packet corresponding to the target transmission request, and in this process, the transmission module receives multiple packets sent by the sending server for a next transmission request at the same time, so as to save the request time for retransmitting the packets, thereby improving the retransmission efficiency and ensuring the integrity of the packets written into the memory by the receiving server.
Further, in order to save the time for requesting retransmission of the data packet, the transmission module 220 performs out-of-order detection on the plurality of data packets according to the sequence numbers, and in this process, in order to ensure the accuracy of the out-of-order detection, the out-of-order detection is completed according to the expected sequence number and the sequence numbers corresponding to the plurality of data packets, in this embodiment, the transmission module 220 is further configured to: determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number; and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
Specifically, the expected sequence number refers to a number of a data packet corresponding to each transmission request pre-stored by the receiving server, and the condition of packet loss can be determined by comparing the sequence number of the received data packet with the expected sequence number, the out-of-order detection refers to a detection manner for detecting whether the data packet is lost, and the detection result is the occurrence of packet loss or non-occurrence of packet loss.
Based on this, after the transmission module 220 of the receiving server receives the plurality of data packets, the sequence number included in each data packet is extracted, and the expected sequence number corresponding to the target transmission request is determined, at this time, the expected sequence number is compared with the extracted sequence number, and according to the comparison result, whether packet loss occurs or not can be determined, if the expected sequence number is completely consistent with the sequence number, it indicates that packet loss does not occur, and if the expected sequence number is not consistent with the sequence number, it indicates that packet loss occurs.
Further, in a case of packet loss, at this time, it is described that retransmission needs to be performed on a plurality of data packets corresponding to the target transmission request, and meanwhile, since the data packet transmission is completed under an RDMA unreliable connection, the data packet that has been buffered in the transmission module 220 needs to be deleted, in this embodiment, the transmission module 220 is further configured to: deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
Specifically, because the sending server and the receiving server lose packets of the target transmission request, in order to improve the transmission efficiency of the data packets, the multiple data packets that have been transmitted are deleted, that is, the multiple data packets that have been transmitted are clear from the cache of the transmission module 220, and then a new data packet transmission request is sent to the sending server, that is, a data packet corresponding to a next transmission request of the target transmission request is sent by the sending server, so that uninterrupted transmission of the data packets is realized, and the network transmission efficiency is improved while the retransmission process of the subsequent target transmission request is not affected.
Further, under the condition that packet loss does not occur, at this time, it is described that the plurality of data packets transmitted by the sending server for the target transmission request are complete, the transmission module 220 may generate a completion request according to the plurality of data packets that are completely transmitted, and add the completion request to the completion queue, so as to inform the processing module 240 that the plurality of data packets corresponding to the target transmission request may be stored, in the real-time flow, the transmission module 220 is further configured to: under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
accordingly, the processing module 240 is further configured to: and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
Specifically, the transmission completion request is a request generated after the sending server sends a data packet to the receiving server for the target transmission request, and based on this, when the detection result is that the detection is passed, it indicates that a plurality of data packets sent by the sending server to the receiving server for the target transmission request are complete, and at this time, the transmission module 220 of the receiving server may notify the processing module to store the plurality of data packets, that is, the transmission module 220 creates a transmission completion request according to the target transmission request, and writes the transmission completion request into the completion queue; when the processing module 240 starts to process the transmission completion request, the transmission completion request is extracted from the completion queue, and the data packet carrying the tag corresponding to the target transmission request in the cache of the transmission module 220 is written into the received content according to the transmission completion request, so as to implement storage of the data packet.
For example, the network card at the receiving side receives a plurality of packets corresponding to the target transmission request req1, and the packets are packets respectively1,packet2And packet4Determining a packet of data1Corresponding sequence number is PSN1Packet of data2Corresponding sequence number is PSN2Packet of data4Corresponding sequence number is PSN4And the network card of the receiving party determines the expected sequence number as the PSNs according to the target transmission request req11,PSNs2,PSNs3And PSNs4Determining the missing sequence number PSN by comparing the extracted sequence number with the expected sequence number3When the transmission side transmits a plurality of packets corresponding to the destination transmission request req1 to the reception side, packet loss (sequence number PSN) occurs3Corresponding packet of data3Loss occurs), the detection result of performing out-of-order detection on the plurality of data corresponding to the target transmission request req1 is determined to be packet loss according to the comparison result, and at this time, the packet buffered by the network card of the receiving party can be deleted1,packet2And packet4And is combined withThe request sender continues to send the data packet corresponding to the next transmission request req 2.
If the plurality of data packets corresponding to the target transmission request req1 are packets respectively1,packet2,packet3And packet4Determining a packet of data1Corresponding sequence number is PSN1Packet of data2Corresponding sequence number is PSN2Packet of data3Corresponding sequence number is PSN3Packet of data4Corresponding sequence number is PSN4And the network card of the receiving party determines the expected sequence number as the PSNs according to the target transmission request req11,PSNs2,PSNs3And PSNs4Comparing the extracted sequence number with the expected sequence number to determine that the expected sequence number corresponds to the sequence number one to one, and showing that no packet loss occurs when a plurality of data packets corresponding to the target transmission request req1 are sent to the receiver by the sender, a transmission completion request can be generated according to the target transmission request req1 and written into a completion queue, and when the receiver application starts to process the transmission completion request, the data packet carrying req1 is extracted from the network card cache of the receiver1,packet2,packet3And packet4And writes the four packets to the received content, implementing the packet store operation for the target transfer request req 1.
In summary, the expected sequence number is compared with the sequence number to complete out-of-order detection, so that the receiving server can accurately detect the packet loss event through the transmission module, and thus the receiving server can respond to the processing module quickly, and the retransmission efficiency of a plurality of data packets corresponding to the subsequent retransmission target transmission request is improved.
Further, in a case that the detection fails, in order to quickly respond to the processing module 240 at this time to save time for requesting retransmission of the data packet, a completion request including an out-of-order operation code is created according to a preset out-of-order detection rule, so that the processing module 240 can directly send a request for retransmitting the data packet corresponding to the target transmission request to the sending server through the transmission module 220 when processing the request, in this embodiment, the transmission module 220 is further configured to:
and under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule, creating the completion request based on the out-of-order operation code, and adding the completion request containing the out-of-order operation code into the completion queue.
Specifically, the out-of-order operation code may be configured to generate a completion request added to a completion queue when packet loss occurs, and the completion request may notify the processing module 220 that the packet loss occurs when the data packet corresponding to the target transmission request is sent, so that the processing module 240 may directly request to retransmit a plurality of data packets corresponding to the target transmission request, and avoid wasting time spent on performing retransmission response after the data packet of the next transmission request is completely transmitted; based on this, after determining that a plurality of data packets corresponding to the target transmission request are lost, the out-of-order operation code can be created according to the out-of-order detection rule at this time, and meanwhile, the request for creating the out-of-order operation code is provided, and the completion request including the out-of-order operation code is added to the completion queue, so that the processing module 240 can process the completion request including the out-of-order operation code in time when processing the completion request in the completion queue, thereby improving the efficiency of retransmission response and saving the time for recurring response.
Further, after the completion request including the out-of-order operation code is written into the completion queue, the processing module 240 finds the out-of-order operation code when processing the completion request, and at this time, the processing module 240 knows that the plurality of data packets corresponding to the target transmission request are lost, and needs to request the sending server to retransmit the data packet corresponding to the target transmission request, in this embodiment, the processing module 240 is further configured to: analyzing the completion request to obtain the out-of-order operation code, inquiring the preset request number table based on the out-of-order operation code to determine an expected request number, and determining the request number corresponding to the target transmission request according to the expected request number; determining a sequence number corresponding to the unreceived data packet according to the request number and the out-of-order operation code, and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet; and sending the retransmission response request to the transmission module.
Specifically, the request number table is a data table that is maintained by the processing module in advance and records request numbers, and a number corresponding to each transmission request can be determined through the data table, where the expected request number specifically refers to a number corresponding to a transmission request expected to be received at the current stage, that is, a number corresponding to a target transmission request expected to be received.
Based on this, at the time when the processing module 240 starts to process the completion request containing the out-of-order operation code, the completion request is extracted from the completion queue, and the completion request is analyzed to obtain the out-of-order operation code, at this time, the processing module 240 queries the preset request number according to the out-of-order operation code, so as to determine the expected request number corresponding to the target transmission request, that is, determine the number corresponding to the expected received transmission request, simultaneously determine all the serial numbers corresponding to the received data packets according to the request number, determine the serial numbers corresponding to the data packets which are not received for the target transmission request by combining the out-of-order operation code, finally generate the retransmission response request based on the serial numbers corresponding to the data packets which are not received, send the retransmission response request to the transmission module 220, and send the retransmission response request to the sending server by the transmission module 220, and reminding the sending server to resend the data packet according to the target transmission request, and finishing retransmission operation of the data packet.
Along the above example, under the condition of determining packet loss, a complete request CQE containing OOS error information is generated at the moment and written into a completion queue; when the receiving side application starts to process the completion request CQE containing OOS error information, the receiving side application can inquire a preset request number table according to the OOS error information to determine that the expected request number is req1, and simultaneously determine that the sequence number corresponding to the unreceived data packet is PSN according to the OOS error information and the request number req13And finally PSN based on sequence number3Generates a retransmission response request NAK according to the request number req1, and transmits the retransmission response request NAK through the network card of the receiving partyAsk for and send to the network card of the sender, tell the network card of the sender to need to resend the packet of data to the transmission request of the goal1,packet2,packet3And packet4(ii) a After receiving a NAK response transmitted by a receiver application on an unreliable RDMA connection, a sender application analyzes a request number req1 contained in the response, and can determine that a data packet corresponding to a target transmission request req1 is required1,packet2,packet3And packet4Performs retransmission and aims at packet1,packet2,packet3And packet4. And (5) retransmitting.
In addition, in order to improve retransmission efficiency, the sending server also maintains a table of table < Seq > to realize that after analyzing the retransmission response request, the sending server can determine the data packet corresponding to the request needing retransmission according to the request number contained in the retransmission response request, thereby improving the efficiency of retransmitting the data packet by the sending server and the receiving server.
In the data transmission system provided by the present specification, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, and a plurality of data packets are subjected to out-of-order detection according to the sequence number, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to know the packet loss condition is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
Corresponding to the foregoing system embodiment, the present specification further provides an embodiment of a data transmission method, which is applied to a receiving server, and fig. 4 shows a processing flow chart of a data transmission method provided according to an embodiment of the present specification, and specifically includes the following steps:
step S402, a transmission module receives a plurality of data packets submitted by a sending server aiming at a target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
step S404, the processing module extracts the completion request from the completion queue and analyzes the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module;
step S406, the transmission module sends the retransmission response request to the sending server, where the retransmission response request is used to request the sending server to retransmit the data packet corresponding to the target transmission request.
In an optional embodiment, the transmission module determines an expected sequence number corresponding to the target transmission request, and compares the expected sequence number with the sequence number; and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
In an optional embodiment, the transmission module deletes the plurality of data packets and sends a data packet transmission request to the sending server, if the detection result indicates that the data packet transmission request passes the detection; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
In an optional embodiment, the transmission module generates a transmission completion request according to the target transmission request and adds the transmission completion request to the completion queue when the detection result is that the detection is passed;
correspondingly, the processing module extracts the transmission completion request from the completion queue and writes the plurality of data packets into a receiving memory according to the transmission completion request.
In an optional embodiment, the transmission module creates an out-of-order operation code according to a preset out-of-order detection rule under the condition that the detection fails, creates the completion request based on the out-of-order operation code, and adds the completion request including the out-of-order operation code to the completion queue.
In an optional embodiment, the processing module parses the completion request to obtain the out-of-order operation code, queries the preset request number table based on the out-of-order operation code to determine an expected request number, and determines the request number corresponding to the target transmission request according to the expected request number.
In an optional embodiment, the processing module determines, according to the request number and the out-of-order operation code, a sequence number corresponding to an unreceived data packet, and generates the retransmission response request based on the sequence number corresponding to the unreceived data packet; and sending the retransmission response request to the transmission module.
In the data transmission method provided by the present specification, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, and a plurality of data packets are subjected to out-of-order detection according to the sequence number, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to know the packet loss condition is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
The above is a schematic scheme of a data transmission system of this embodiment. It should be noted that the technical solution of the data transmission method and the technical solution of the data transmission system belong to the same concept, and details that are not described in detail in the technical solution of the data transmission method can be referred to the description of the technical solution of the data transmission system.
The following describes the data transmission system further by taking an application of the data transmission system provided in this specification in a data packet transmission scenario as an example, with reference to fig. 5. Fig. 5 shows a schematic structural diagram of a data transmission system applied in a data packet transmission scenario, where the system includes a sender application, a sender network card, a receiver application, and a receiver network card, and specifically includes the following steps:
step S502, the sender application sends a target transmission request to the sender network card.
Step S504, the network card of the sending party receives the target transmission request and sends a plurality of data packets to the network card of the receiving party according to the target transmission request.
Step S506, the network card of the receiving party receives the multiple data packets corresponding to the target transmission request, and extracts the sequence number included in each data packet.
Step S508, the network card of the receiving party determines an expected sequence number corresponding to the target transmission request, and performs out-of-order detection on the multiple data packets according to the expected sequence number and the sequence number.
Step S510, when the disorder detection result of the receiving network card fails, the receiving network card generates a CQE containing OOS error information and writes the CQE into the completion queue.
In step S512, the network card on the receiving side deletes a plurality of data packets from the cache.
If the out-of-order detection result fails, step S510 and step S512 are performed simultaneously, that is, a plurality of packets corresponding to the target transmission request are deleted while generating a CQE including OOS error information.
In step S514, the recipient application extracts the CQE from the completion queue.
Step S516, the application of the receiving party analyzes the CQE to obtain OOS error information.
In step S518, the recipient application generates a NAK response based on the OOS error information and the expected request number.
Step S520, the receiving side application sends the NAK response to the receiving side network card.
Step S522, the network card of the receiving side receives the NAK response, and sends the NAK response to the network card of the sending side.
Step S524, the network card of the sender receives the NAK response and sends the NAK response to the sender application.
In step S526, the sending application receives the NAK response and parses the NAK response to obtain the expected request number.
In step S528, the sending side generates a retransmission request for retransmitting the data packet corresponding to the target transmission request according to the expected request number, and sends the retransmission request to the sending side network card.
Step S530, the network card of the sender receives the retransmission request, and sends a plurality of data packets corresponding to the target transmission request to the network card of the receiver according to the retransmission request.
Step S532, the receiving-side network card receives the plurality of data packets, determines that the plurality of data packets are complete, and adds a transmission completion request to the completion queue.
In step S534, the receiving application extracts the transmission completion request from the completion queue.
In step S536, the receiving side application writes the plurality of data packets into the receiving side memory.
In summary, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, the data packets are subjected to out-of-order detection according to the sequence numbers, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when a packet loss is found, and the time for the processing module to know the packet loss is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
The present specification further provides another embodiment of a data transmission method, and fig. 6 shows a processing flow chart of another data transmission method provided in an embodiment of the present specification, and as shown in fig. 6, the method specifically includes the following steps:
step S602, receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
step S604, extracting the sequence number contained in each data packet, and performing out-of-order detection on the plurality of data packets according to the sequence number;
step S606, adding a completion request containing the out-of-order detection result to the completion queue under the condition that the detection fails;
step S608, extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
step S610, determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
In an optional embodiment, the performing out-of-order detection on the plurality of data packets according to the sequence number includes:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number;
and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
In an optional embodiment, after the step of performing out-of-order detection on the plurality of data packets according to the sequence number is performed, the method further includes:
deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
In an optional embodiment, after the step of performing out-of-order detection on the plurality of data packets according to the sequence number is performed, the method further includes:
under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
In an optional embodiment, the adding, to the completion queue, a completion request including an out-of-order detection result in the case that the detection fails includes:
under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule;
creating the completion request based on the out-of-order opcode, adding the completion request including the out-of-order opcode to the completion queue.
In an optional embodiment, the determining, according to the out-of-order detection result, a request number corresponding to the target transmission request includes:
analyzing the completion request to obtain the out-of-order operation code, and inquiring the preset request number table to determine an expected request number based on the out-of-order operation code;
and determining the request number corresponding to the target transmission request according to the expected request number.
In an optional embodiment, the generating a retransmission response request based on the request number and sending the retransmission response request to the sending server includes:
determining a sequence number corresponding to the data packet which is not received according to the request number and the out-of-order operation code;
and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet, and sending the retransmission response request to the sending server.
In summary, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a sequence number included in each data packet is extracted, the data packets are subjected to out-of-order detection according to the sequence numbers, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to acquire the packet loss is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
Corresponding to the above method embodiment, the present specification further provides an embodiment of a data transmission device, and fig. 7 shows a schematic structural diagram of the data transmission device provided in an embodiment of the present specification. As shown in fig. 7, the apparatus includes:
a receiving module 702 configured to receive a plurality of data packets submitted by a sending server for a target transmission request;
a detection module 704 configured to extract a sequence number included in each data packet, and perform out-of-order detection on the plurality of data packets according to the sequence number;
an adding module 706 configured to add a completion request containing an out-of-order detection result to the completion queue in the event of a detection failure;
an extracting module 708 configured to extract the completion request from the completion queue, and parse the completion request to obtain the out-of-order detection result;
the sending module 710 is configured to determine a request number corresponding to the target transmission request according to the out-of-order detection result, generate a retransmission response request based on the request number, and send the retransmission response request to the sending server.
In an optional embodiment, the detection module 704 is further configured to:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number; and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
In an optional embodiment, the data transmission apparatus further includes:
the deleting module is configured to delete the plurality of data packets and send a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
In an optional embodiment, the data transmission apparatus further includes:
the write-in module is configured to generate a transmission completion request according to the target transmission request and add the transmission completion request to the completion queue when the detection result is that the detection is passed;
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
In an optional embodiment, the adding module 706 is further configured to:
under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule; creating the completion request based on the out-of-order opcode, adding the completion request including the out-of-order opcode to the completion queue.
In an optional embodiment, the sending module 710 is further configured to:
analyzing the completion request to obtain the out-of-order operation code, and inquiring the preset request number table to determine an expected request number based on the out-of-order operation code; and determining the request number corresponding to the target transmission request according to the expected request number.
In an optional embodiment, the sending module 710 is further configured to:
determining a sequence number corresponding to the data packet which is not received according to the request number and the out-of-order operation code; and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet, and sending the retransmission response request to the sending server.
In the data transmission device provided by the present specification, after receiving a plurality of data packets submitted by a sending server for a target transmission request, a serial number included in each data packet is extracted, and a plurality of data packets are subjected to out-of-order detection according to the serial numbers, and a completion request including an out-of-order detection result is added to a completion queue under the condition that the detection fails, so that a processing module is directly notified when packet loss is found, and the time for the processing module to know the packet loss condition is shortened; and then the processing module extracts a completion request containing the out-of-order detection result from the completion queue according to the processing sequence, determines a request number corresponding to the target transmission request based on the out-of-order detection result, and generates a retransmission response request based on the request number, so that the data packet corresponding to the target transmission request is requested to be sent to the sending server again through the retransmission response request, thereby ensuring that the time for retransmitting the data packet can be advanced under the condition that the data packet corresponding to the target transmission request is completely retransmitted, and further promoting the processing efficiency of the receiving server for processing the data packet.
The above is a schematic scheme of the data transmission apparatus of this embodiment. It should be noted that the technical solution of the data transmission apparatus and the technical solution of the other data transmission method belong to the same concept, and details that are not described in detail in the technical solution of the data transmission apparatus can be referred to the description of the technical solution of the data transmission method.
Fig. 8 illustrates a block diagram of a computing device 800 provided in accordance with an embodiment of the present description. The components of the computing device 800 include, but are not limited to, memory 810 and a processor 820. The processor 820 is coupled to the memory 810 via a bus 830, and the database 850 is used to store data.
Computing device 800 also includes access device 840, access device 840 enabling computing device 800 to communicate via one or more networks 860. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 840 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 800, as well as other components not shown in FIG. 8, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 8 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 800 may also be a mobile or stationary server.
Wherein, the processor 820 is configured to execute the following computer-executable instructions:
receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number;
in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
and determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the another data transmission method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the another data transmission method.
An embodiment of the present specification also provides a computer readable storage medium storing computer instructions that, when executed by a processor, are operable to:
receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number;
in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
and determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the another data transmission method belong to the same concept, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the another data transmission method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present disclosure is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present disclosure. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for this description. In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the specification and its practical application, to thereby enable others skilled in the art to best understand the specification and its practical application. The specification is limited only by the claims and their full scope and equivalents.

Claims (18)

1. A data transmission system is applied to a receiving server and comprises:
a transmission module and a processing module;
the transmission module is configured to receive a plurality of data packets submitted by a sending server aiming at a target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
the processing module is configured to extract the completion request from the completion queue, and analyze the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module;
the transmission module is further configured to send the retransmission response request to the sending server, where the retransmission response request is used to request the sending server to retransmit the data packet corresponding to the target transmission request.
2. The data transmission system of claim 1, the transmission module further configured to:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number; and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
3. The data transmission system of claim 2, the transmission module further configured to:
deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
4. The data transmission system of claim 2, the transmission module further configured to:
under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
accordingly, the processing module is further configured to:
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
5. The data transmission system of claim 1, the transmission module further configured to:
and under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule, creating the completion request based on the out-of-order operation code, and adding the completion request containing the out-of-order operation code into the completion queue.
6. The data transmission system of claim 5, the processing module further configured to:
analyzing the completion request to obtain the out-of-order operation code, inquiring the preset request number table based on the out-of-order operation code to determine an expected request number, and determining the request number corresponding to the target transmission request according to the expected request number.
7. The data transmission system of claim 6, the processing module further configured to:
determining a sequence number corresponding to the unreceived data packet according to the request number and the out-of-order operation code, and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet; and sending the retransmission response request to the transmission module.
8. A data transmission method is applied to a receiving server and comprises the following steps:
a transmission module receives a plurality of data packets submitted by a sending server aiming at a target transmission request; extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number; in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
the processing module extracts the completion request from the completion queue and analyzes the completion request to obtain the out-of-order detection result; determining a request number corresponding to the target transmission request according to the out-of-order detection result; generating a retransmission response request based on the request number, and sending the retransmission response request to the transmission module;
and the transmission module sends the retransmission response request to the sending server, wherein the retransmission response request is used for requesting the sending server to retransmit the data packet corresponding to the target transmission request.
9. A method of data transmission, comprising:
receiving a plurality of data packets submitted by a sending server aiming at a target transmission request;
extracting a sequence number contained in each data packet, and carrying out disorder detection on the plurality of data packets according to the sequence number;
in the event of a failure of a test, adding a completion request containing an out-of-order test result to a completion queue;
extracting the completion request from the completion queue, and analyzing the completion request to obtain the out-of-order detection result;
and determining a request number corresponding to the target transmission request according to the out-of-order detection result, generating a retransmission response request based on the request number, and sending the retransmission response request to the sending server.
10. The data transmission method according to claim 9, wherein the out-of-order detecting the plurality of data packets according to the sequence numbers comprises:
determining an expected sequence number corresponding to the target transmission request, and comparing the expected sequence number with the sequence number;
and determining a detection result for carrying out disorder detection on the plurality of data packets according to the comparison result.
11. The data transmission method according to claim 10, after the step of performing out-of-order detection on the plurality of data packets according to the sequence numbers is performed, further comprising:
deleting the plurality of data packets and sending a data packet transmission request to the sending server side under the condition that the detection result is that the data packets are not detected to pass; the data packet transmission request is used for requesting a data packet corresponding to a next transmission request of the target transmission request from the sending server.
12. The data transmission method according to claim 10, after the step of performing out-of-order detection on the plurality of data packets according to the sequence numbers is performed, further comprising:
under the condition that the detection result is that the detection is passed, generating a transmission completion request according to the target transmission request, and adding the transmission completion request to the completion queue;
and extracting the transmission completion request from the completion queue, and writing the plurality of data packets into a receiving memory according to the transmission completion request.
13. The data transmission method according to claim 9, wherein the adding a completion request containing an out-of-order detection result to a completion queue in case of a failure of detection comprises:
under the condition that the detection fails, creating an out-of-order operation code according to a preset out-of-order detection rule;
creating the completion request based on the out-of-order opcode, adding the completion request including the out-of-order opcode to the completion queue.
14. The data transmission method according to claim 13, wherein the determining a request number corresponding to the target transmission request according to the out-of-order detection result includes:
analyzing the completion request to obtain the out-of-order operation code, and inquiring the preset request number table to determine an expected request number based on the out-of-order operation code;
and determining the request number corresponding to the target transmission request according to the expected request number.
15. The data transmission method according to claim 14, wherein the generating a retransmission response request based on the request number and sending the retransmission response request to the sending server includes:
determining a sequence number corresponding to the data packet which is not received according to the request number and the out-of-order operation code;
and generating the retransmission response request based on the sequence number corresponding to the unreceived data packet, and sending the retransmission response request to the sending server.
16. A data transmission apparatus comprising:
the receiving module is configured to receive a plurality of data packets submitted by the sending server aiming at the target transmission request;
the detection module is configured to extract a sequence number contained in each data packet and carry out-of-order detection on the plurality of data packets according to the sequence number;
an adding module configured to add a completion request containing an out-of-order detection result to a completion queue in the event of a detection failure;
the extracting module is configured to extract the completion request from the completion queue and analyze the completion request to obtain the out-of-order detection result;
and the sending module is configured to determine a request number corresponding to the target transmission request according to the out-of-order detection result, generate a retransmission response request based on the request number, and send the retransmission response request to the sending server.
17. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions to implement the steps of the data transmission method of any one of claims 8 or 9 to 15.
18. A computer readable storage medium storing computer instructions which, when executed by a processor, carry out the steps of the data transmission method of any one of claims 8 or 9 to 15.
CN202110179976.XA 2021-02-08 2021-02-08 Data transmission system and method Active CN113300818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110179976.XA CN113300818B (en) 2021-02-08 2021-02-08 Data transmission system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110179976.XA CN113300818B (en) 2021-02-08 2021-02-08 Data transmission system and method

Publications (2)

Publication Number Publication Date
CN113300818A true CN113300818A (en) 2021-08-24
CN113300818B CN113300818B (en) 2023-04-28

Family

ID=77319004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110179976.XA Active CN113300818B (en) 2021-02-08 2021-02-08 Data transmission system and method

Country Status (1)

Country Link
CN (1) CN113300818B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221918A (en) * 2022-02-22 2022-03-22 南京大学 RDMA network RC communication mode data stream long tail optimization method
CN115982090A (en) * 2023-03-17 2023-04-18 珠海星云智联科技有限公司 Method and device for realizing remote memory access by cooperation of software and hardware

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111498A1 (en) * 2002-12-10 2004-06-10 Fujitsu Limited Apparatus and the method for integrating NICs with RDMA capability but no hardware memory protection in a system without dedicated monitoring processes
CN101009537A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A data retransfer method and system
CN101068170A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Message abnormal receiving detecting method, system and device thereof
CN104065465A (en) * 2014-06-06 2014-09-24 华为技术有限公司 Message retransmitting method, request end, response end and system
CN104270287A (en) * 2014-09-30 2015-01-07 北京华为数字技术有限公司 Message disorder detecting method and device
CN106330930A (en) * 2016-08-29 2017-01-11 烽火通信科技股份有限公司 System for secondary retransmission based on streaming media packet loss and method of system
CN107979449A (en) * 2016-10-25 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of data transmission method and device
CN110557677A (en) * 2019-09-27 2019-12-10 北京西山居互动娱乐科技有限公司 Video transmission method and device
CN111711566A (en) * 2020-07-03 2020-09-25 西安电子科技大学 Receiving end disorder rearrangement method under multipath routing scene
CN111786748A (en) * 2019-08-29 2020-10-16 北京京东尚科信息技术有限公司 Data retransmission method and system, network card, device, server and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111498A1 (en) * 2002-12-10 2004-06-10 Fujitsu Limited Apparatus and the method for integrating NICs with RDMA capability but no hardware memory protection in a system without dedicated monitoring processes
CN101009537A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A data retransfer method and system
CN101068170A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Message abnormal receiving detecting method, system and device thereof
CN104065465A (en) * 2014-06-06 2014-09-24 华为技术有限公司 Message retransmitting method, request end, response end and system
CN104270287A (en) * 2014-09-30 2015-01-07 北京华为数字技术有限公司 Message disorder detecting method and device
CN106330930A (en) * 2016-08-29 2017-01-11 烽火通信科技股份有限公司 System for secondary retransmission based on streaming media packet loss and method of system
CN107979449A (en) * 2016-10-25 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of data transmission method and device
CN111786748A (en) * 2019-08-29 2020-10-16 北京京东尚科信息技术有限公司 Data retransmission method and system, network card, device, server and storage medium
CN110557677A (en) * 2019-09-27 2019-12-10 北京西山居互动娱乐科技有限公司 Video transmission method and device
CN111711566A (en) * 2020-07-03 2020-09-25 西安电子科技大学 Receiving end disorder rearrangement method under multipath routing scene

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221918A (en) * 2022-02-22 2022-03-22 南京大学 RDMA network RC communication mode data stream long tail optimization method
CN115982090A (en) * 2023-03-17 2023-04-18 珠海星云智联科技有限公司 Method and device for realizing remote memory access by cooperation of software and hardware

Also Published As

Publication number Publication date
CN113300818B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
JP6013573B2 (en) Segmented data transfer using the resume function
US20130195106A1 (en) Multi-Path Data Transfer Using Network Coding
US9866351B2 (en) Communication method and communication apparatus
CN102217258B (en) Detection processing method, data sending terminal, data receiver and communication system
WO2023093879A1 (en) Data transmission method and apparatus, device, and storage medium
CN113300818A (en) Data transmission system and method
WO2019242496A1 (en) Method and device for data transmission
CN113765976A (en) Communication method and system
CN105490773B (en) The method and apparatus of transmitting multimedia data
CN103684707A (en) Server-side and user-side message transmission processing method, message transmission method and message transmission system
WO2022083371A1 (en) Data transmission method and device
CN109120385B (en) Data transmission method, device and system based on data transmission system
US20160359950A1 (en) Systems and methods for improved trivial file transfer protocol
WO2014194493A1 (en) Method, device and system for reducing confirmation packets at transmission control layer
JP2017092692A (en) Data transmission control system and method, and data transmission control program
Phung et al. Enhancing rest http with random linear network coding in dynamic edge computing environments
JP2009212796A (en) Transmitter, data transfer system, data transfer method, and data transfer program
US10476919B2 (en) System and method for reliable messaging between application sessions across volatile networking conditions
US9059847B2 (en) Reliable multicast broadcast in wireless networks
CN113300874B (en) Network performance detection system and method
CN104243107A (en) Data transmission method, device, terminal, server and system
EP1427127A2 (en) Communication control method, communication system and communication apparatus that can improve throughput
WO2012024870A1 (en) Method and system for data retransmission
CN107633348A (en) Offline inspection data processing method and system
WO2024199031A1 (en) Communication method and communication apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40058641

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant