WO2011100911A2 - Detection processing method, data transmitter, data receiver and communication system - Google Patents

Detection processing method, data transmitter, data receiver and communication system Download PDF

Info

Publication number
WO2011100911A2
WO2011100911A2 PCT/CN2011/072673 CN2011072673W WO2011100911A2 WO 2011100911 A2 WO2011100911 A2 WO 2011100911A2 CN 2011072673 W CN2011072673 W CN 2011072673W WO 2011100911 A2 WO2011100911 A2 WO 2011100911A2
Authority
WO
WIPO (PCT)
Prior art keywords
data
message
sending
packet
receiving end
Prior art date
Application number
PCT/CN2011/072673
Other languages
French (fr)
Chinese (zh)
Other versions
WO2011100911A3 (en
Inventor
任健
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201180000753.7A priority Critical patent/CN102217258B/en
Priority to PCT/CN2011/072673 priority patent/WO2011100911A2/en
Publication of WO2011100911A2 publication Critical patent/WO2011100911A2/en
Publication of WO2011100911A3 publication Critical patent/WO2011100911A3/en

Links

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/1607Details of the supervisory signal
    • H04L1/1642Formats specially adapted for sequence numbers
    • 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/1867Arrangements specially adapted for the transmitter end
    • H04L1/1874Buffer management
    • 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/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a probe processing method, a data sending end, a data receiving end, and a communication system. Background technique
  • the cluster router has the characteristics of low cost and large capacity. It can well expand the network and support larger and higher performance networks. It is easy to provide various services and interfaces. It is widely used for broadband services and high bandwidth applications. Popularization has created a material foundation, which has been widely recognized as the development trend of core network equipment in the future. It can meet the needs of the development of the new generation of the Internet and has a very broad space for development.
  • Embodiments of the present invention provide a detection processing method, a data transmitting end, a data receiving end, and a communication system, to provide simple and efficient reliability communication.
  • An embodiment of the present invention provides a detection processing method, including:
  • the data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data packet in the sending queue.
  • the sending queue is not empty, sending a probe message carrying the probe type identifier in the packet header to the data receiving end;
  • the data receiving end After receiving the probe message, acquires the serial number of the last data packet received from the data sending end in sequence according to the received data packet information, generates a probe reply message, and sends the probe response message to the data sending end.
  • the packet header of the probe reply message carries the sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
  • An embodiment of the present invention further provides a data sending end, including:
  • a first message sending module configured to: when the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send the sending queue If any of the data packets and the transmission queue is not empty, the detection message carrying the detection type identifier in the packet header is sent to the data receiving end;
  • the first message receiving module is configured to receive a probe reply message returned by the data receiving end, where the packet header of the probe reply message carries a sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
  • An embodiment of the present invention further provides a data receiving end, including:
  • a third message receiving module configured to receive a probe message carrying a detection type identifier in a packet header sent by the data sending end;
  • a packet sequence number obtaining module configured to obtain, according to the received data packet information, a serial number of the last data packet received from the data transmitting end in sequence
  • a third message sending module configured to generate a probe reply message, and send the message to the data sending end, where the packet header of the probe reply message carries the last data packet received by the data receiving end in sequence from the data sending end serial number.
  • the embodiment of the invention further provides a communication system, comprising the above data sending end and data connection Received.
  • the data sending end actively sends a probe message to the data receiving end, and the probe message triggers the data receiving end to detect the data packet receiving condition, and carries the packet in the header of the returned probe reply message.
  • the serial number of the last data packet received continuously, so that the data sending end performs the transmission window adjustment according to the serial number, deletes the data packet that has been successfully sent in the sending queue, and avoids deleting the data packet that is not successfully sent in the sending queue, ensuring Transmission quality
  • the technical solution provided by the above embodiments of the present invention can provide simple and efficient reliability communication.
  • Embodiment 1 is a schematic flow chart of Embodiment 1 of a detection processing method according to the present invention.
  • Embodiment 2 is a schematic flowchart of Embodiment 2 of a detection processing method according to the present invention
  • FIG. 3 is a schematic diagram showing changes of a state machine when a connection is established according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a change of a state machine when a connection is closed according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of a data transmitting end according to the present invention.
  • Embodiment 2 of a data transmitting end according to the present invention
  • Embodiment 7 is a schematic structural diagram of Embodiment 1 of a data receiving end according to the present invention.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of a data receiving end according to the present invention. detailed description
  • FIG. 1 is a schematic flowchart of the first embodiment of the detection processing method of the present invention, as shown in FIG. 1 . As shown, the method includes the following steps:
  • Step 1 01 The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data in the sending queue.
  • the packet When the packet is not empty, the packet sends a probe message carrying the probe type identifier to the data receiver. In this step, the data sender sends a probe message to the data receiver after sending the data packet.
  • the probe type identifier may be carried in the packet header to indicate that it is a probe message, and the foregoing probe message can confirm the received status of the sent data packet at the data receiving end, and can timely adjust the sending queue, and the foregoing sending probe
  • the timing of the message may be that the predetermined detection time has been reached according to the timer, and when the transmission queue corresponding to the data receiving end is detected to be full, the detection message is sent to the data receiving end, or the detection is performed according to the timer, according to the timing.
  • the sending queue does not send any data packets and the sending queue is not empty, sending a probe message to the data receiving end.
  • the data receiving end After receiving the probe message, acquires the sequence number of the last data packet received from the data sending end in sequence according to the received data packet information, generates a probe reply message, and sends the probe message to the data packet.
  • the data sending end carries the sequence number of the last data packet received from the data sending end received in sequence in the packet header of the probe reply message.
  • the data sending end may confirm that the data receiving end has received the data packet before the serial number of the last data packet received in sequence, and the data transmitting end may further The transmission window is moved according to the serial number described above.
  • the probe reply message in this embodiment may be a specially set probe reply message, which only includes the message header, and The message body identifier is not set, and the message type identifier of the probe reply message is included in the packet header, and the sequence number of the last data packet received by the data receiving end in sequence.
  • the data sending end actively sends a probe message to the data receiving end, triggering the data receiving end to detect the data packet receiving condition, and carrying the last received consecutively in the header of the returned probe reply message.
  • the serial number of a data packet so that the data receiving end performs the transmission window adjustment according to the serial number, deletes the data packet that has been successfully sent in the sending queue, avoids deleting the data packet that is not successfully sent in the sending queue, and ensures the transmission quality, and the present invention
  • the technical solution provided by the foregoing implementation is applied to communication between cluster routes, and can provide simple and efficient reliable communication.
  • FIG. 2 is a schematic flowchart of the second embodiment of the probe processing method of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step 201 The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data packet in the sending queue.
  • the sending queue is not empty, the sending of the probe message carrying the probe type identifier in the packet header is sent to the data receiving end, and the packet header of the probe message further carries the data sending end before sending the probe message to the end.
  • Step 202 After receiving the probe message sent by the data sending end, the data receiving end sends a sequence number of the data packet sent by the data sending end to the data receiving end according to the probe message. And the received data packet information, the sequence number of the data packet sent by the data sending end and not received by the data receiving end, the retransmission request message is generated and sent to the data sending end, where the re-requesting message carries the data The serial number of the data packet that has been sent by the sender but not received by the data receiver;
  • Step 203 After the data sending end receives the retransmission request message from the data receiving end, The data packet not received by the data receiving end is retransmitted according to the packet sequence number of the data packet that the data transmitting end carried in the retransmission request message has sent but not received by the data receiving end.
  • the data sending end sends the probe message, and performs the probe acknowledgement and the probe retransmission.
  • the identifier of the message type may be carried in the packet header of the probe message to indicate the probe.
  • the function of the message is for detecting, and after receiving the above message, the data receiving end can explicitly need to perform the probe reply, and return to the data transmitting end to return the data packet from the data transmitting end that has been received in order by the data receiving end.
  • the serial number of a packet is for detecting, and after receiving the above message, the data receiving end can explicitly need to perform the probe reply, and return to the data transmitting end to return the data packet from the data transmitting end that has been received in order by the data receiving end.
  • the sequence header of the data packet sent by the data sending end to the corresponding data receiving end may be carried in the packet header of the probe message.
  • the data receiving end may be based on the data.
  • the sequence number of the data packet finally sent by the transmitting end to the data receiving end and the received data packet information acquires the data packet that the data transmitting end has sent to the data receiving end but the data receiving end does not receive.
  • the packet header of all the probe messages may carry the sequence number of the data packet sent by the data sending end to the data receiving end, that is, support detection and support, and support detection Pass, can achieve reliable transmission of data packets, and can easily and efficiently meet the requirements of inter-cluster process communication.
  • the existing UDP technical solution can be used to encapsulate a layer on the UDP communication protocol layer, that is, upload and encapsulate a layer header in the original UDP data packet, and provide an application suitable for the user process.
  • the program programming interface (App Li ca ti on Programming Interface, hereinafter referred to as API)
  • the process can communicate with each other through the AP I.
  • the data sending end encapsulates the user process data to be sent by the data sending end, and then sends the packet through the standard UDP port. After receiving the message through the standard UDP port, the data receiving end parses the message header to find the corresponding receiving process.
  • the data transmitting end and the data receiving end may be different routers in the same communication process.
  • the layer header encapsulated in the UDP packet may include information such as a source port number, a destination port number, a current sequence number, a confirmation sequence number, a window size, a message type, and a message length.
  • the specific message types can be divided into connection (SYN) message, connection response (SYN_ACK) message, data packet (DATA) message, probe (PROBE) message, acknowledgement (ACK) message, retransmission request (NACK) message, and close (FIN). ) Messages, Close Response (FIN_ACK) messages, and Probe Reply (PR0BE_ACK) messages, etc.
  • the source port number and the destination port number are used to identify the application process of the data sending end and the data receiving end, which is similar to the prior art; and the current serial number is used to identify each message sent from the sending end to the receiving end.
  • the specific serial number is to ensure that the message arrives in an orderly and reliable manner, and is sorted based on the packet.
  • each message is added based on the order of the packet; for other message type packets, the serial number of the packet It is the same as the serial number of the previous packet, and is not incremented by 1. Therefore, when a connection is established and several DATA messages are sent, the serial number carried in the header of the sent PROBE message is the transmitted DATA.
  • the number of messages that is, the sequence number of the data packet that the data transmitting end finally sends to the data receiving end.
  • the data sent by one DATA message is called a data packet.
  • the confirmation serial number is the serial number of the last data packet that the above-mentioned data receiving end has received in order.
  • the window size is used to indicate the maximum number of packets that the data receiver can receive.
  • the message length is the total length of the entire message.
  • the foregoing SYN message, SYIACK message, PROBE message, ACK message, FIN message, F HACK message, and PROBE_ACK message may be only a message header, and for a DATA message, a NACK message needs to include a message body, a DATA message.
  • the body is specifically transmitted data, for example, may be a UDP packet, and the message body of the NACK message may be a sequence number of a data packet that needs to be retransmitted.
  • the data sending end and the data receiving end can establish a connection and close the connection by means of a second handshake, using a serial number, an acknowledgment technology, a retransmission mechanism, a sliding window, and a flow control mechanism, and timing.
  • the policy ensures that messages arrive in order and reliably.
  • FIG. 3 is a schematic diagram of a state machine change when the connection is established according to the embodiment of the present invention.
  • the client (Cl ient ) is first turned off (CLOSE)
  • the client The end sends a connection establishment (SYN) message with the initial sequence number to the server
  • the client state transitions to the wait state (SYN SENT)
  • the server-side master port (Mas ter EP) is in the listening state (LI STEN).
  • a slave port (S lave EP) is derived to communicate with the client, and an acknowledgement message (SYN_ACK) for the SYN message is sent as a response, and the state of the standby port is converted to the established state (ESTABLISHED)
  • SYN_ACK acknowledgement message
  • the client After the client receives the above confirmation message, it also converts the state to the established state (ESTABLI SHED). In this way, the client and the sender complete the establishment of the connection.
  • the initial sequence number changes over time, ensuring that each connection has a different initial sequence number.
  • the acknowledgment technology refers to that when the data receiving end receives the data of the data sending end, it sends an acknowledgment message to the data transmitting end that has been received in order.
  • the implementation of the acknowledgment technology directly affects the performance of the transmission mode. If the acknowledgment is too slow, the data sender may stop transmitting because it fails to receive the acknowledgment information in time. If the acknowledgment is too frequent, the system bandwidth will be affected.
  • the foregoing embodiment of the present invention provides a technical solution for detecting and confirming, that is, a timer can be started at the data sending end, and the detecting is performed at intervals, but if the sending queue is full, it indicates that the data sending end may be timely.
  • the sending queue is full. Therefore, a probe message is sent to the peer end to wait for the probe response message of the peer end. In the probe response message, the peer end confirmation message is obtained.
  • the probe clock expires, the data sender does not send any packets and the send queue is not empty. At this time, the data sender may stop sending because it does not receive the acknowledgement information from the peer in time, so it will also send to the data receiver. Probe the message and wait for the probe reply message from the receiver.
  • the technical solution of the detection confirmation ensures that the confirmation information of the opposite end can be obtained in time when needed, and the unnecessary repetition of the confirmation is avoided. Send, improve network performance and save bandwidth.
  • the data receiving end receives a data packet.
  • the confirmation message is sent for a while, but it cannot be delayed indefinitely.
  • the acknowledgement information may be sent after the 16 consecutive data packets are received, and the acknowledgement information may be the serial number of the data packet, indicating that all data packets before the serial number have been accumulated by the data receiving end.
  • the data receiving end when the data receiving end returns the confirmation information to the data sending end, the data receiving end may take the piggybacking manner and carry the acknowledgement information in the data packet message, and specifically detect the reply message for the technical solution of the detection and confirmation. It is not necessary to separately set, but to extend the packet message, and carry the sequence number of the last data packet received by the data receiving end in sequence from the data receiving end in the packet header of the data packet message as the probe reply message. Use, to implement the probe confirmation mechanism, which can improve the communication efficiency of the network and save bandwidth.
  • the message may be lost. There must be a retransmission mechanism to ensure that the message can arrive reliably.
  • the probe trigger retransmission mechanism provided by the embodiment of the present invention can be used in combination with request retransmission.
  • the request retransmission is that the data receiving end receives the data packet received in order into the receiving queue, and puts the received out-of-order data packet into the out-of-sequence queue. Then, when the size of the out-of-sequence queue reaches 16 data packets or other quantities, the data receiving end sends a retransmission request message to request the other party to retransmit, and the data receiving end obtains the sequence of the unreceived data packet by viewing the receiving queue and the out-of-sequence queue.
  • the retransmission request message sent by the data receiving end to the peer end carries the sequence number of the data packet that is not received by the data receiving end, so that after receiving the retransmission request message, the data transmitting end can extract the retransmission request message.
  • the data receiving end does not receive the serial number of the data packet, that is, the serial number of the data packet lost by the data receiving end, and then only these sequences according to the serial number of the data packet that the data receiving end does not receive.
  • the corresponding packet of the number is retransmitted to the data receiving end. This weight
  • the transmission method only retransmits lost packets, which can improve network utilization.
  • the probe trigger retransmission mechanism is used to ensure that the peer packet loss can be notified in time if the out-of-order queue does not reach a certain number.
  • the data receiving end receives the probe message of the peer end, it parses the packet header of the probe message, and obtains the sequence number of the data packet sent by the data sending end to the data receiving end, if it is found that the received data packet is not All of the data packets preceding the serial number of the data packet sent by the data transmitting end to the data receiving end are considered to have lost packets in the middle. Specifically, the packet can be confirmed by checking the receiving queue and the out-of-sequence queue.
  • Sending a retransmission request message immediately requires the other party to retransmit those packets that were not received in the middle.
  • Retransmission request The frequency of message transmission also greatly affects the performance of the network. The detection of the technology that triggers the retransmission can save the NACK message packet while ensuring timely notification to the peer end, saving network bandwidth.
  • a sliding window and a flow control mechanism may also be utilized, wherein the data sending end saves the data packet that has been sequentially sent to the sending queue, and the sounding response message sent by the data receiving end carries its own receiving window size. And after confirming the serial number of the received data packet, the data transmitting end receives the information such as the serial number of the acknowledged received data packet returned by the data receiving end, and then clears those already received packets from the sending queue. At the same time, the data transmitting end further considers the size of the receiving window advertised by the data receiving end, and the number of data packets in the sending queue, and sends a certain number of data packets from the sending queue.
  • a timer is started in the process as a probe clock, and when the clock expires, different processing is performed according to different situations: for example, if no message is sent during the clock and the send queue is empty, the clock is stopped. When no message is sent during the clock and the send queue is not empty, the probe message is sent and the clock is changed to the retransmission probe clock; if the send queue is full, the probe message is sent and the clock is changed to the retransmission probe clock; A probe message is sent. If the response of the probe message is not received within a certain number of times of the retransmission probe clock expires, the connection is considered to have been interrupted and the connection is closed.
  • the above timers can implement functions such as probe confirmation, probe retransmission, and keep alive detection.
  • FIG. 4 is a schematic diagram showing changes of the state machine when the connection is closed according to the embodiment of the present invention.
  • the second shutdown mode is adopted.
  • the ports of the server and the client are in the connection establishment state ( ESTABL I SHED ) , when one wants to close the connection, first send a connection close (MSG _F IN ) message to perform active shutdown, and convert the state to wait state
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of the data transmitting end of the present invention.
  • the device includes a first message sending module.
  • the first message sending module 1 1 is configured to learn that the predetermined detection time has been reached according to the timer, and if the sending queue corresponding to the data receiving end in the data sending end is full, Or the data sending end does not send any data packet in the sending queue, and the sending queue is not empty, and sends a probe message carrying the probe type identifier in the packet header to the data receiving end; the first message receiving module 12 Receiving the probe reply message returned by the data receiving end, the packet header of the probe reply message carries the sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
  • the data sending end actively initiates the probe acknowledgement, and receives the probe reply message returned by the data receiving end, where the probe reply message carries the sequence of the last data packet received by the data receiving end in sequence from the data sending end. No., so that the data sender can adjust the transmission window in time to carry out subsequent data packet transmission to ensure the reliable transmission of the data connection.
  • a transmission window adjustment module 13 may be added to the data sending end, and the module is connected to the first message receiving module 12 for detecting according to the detection received from the first message receiving module. The sequence number of the last data packet sequentially received by the data receiving end obtained in the reply message moves the sending window. And for the technical solution of the data retransmission, the second message receiving module 14 and the data packet resending module 15 may be further configured on the data sending end, where the second message receiving module 14 is configured to receive the retransmission request returned by the data receiving end.
  • the retransmission request message carries a sequence number of a data packet that has been sent by the data sending end but is not received by the data receiving end, that is, a sequence number of the data packet that is lost by the data receiving end, and the unreceived
  • the sequence number of the received data packet is that after the data receiving end receives the probe message, the data transmitting end carried in the packet header of the probe message is sent to the data receiving end before sending the probe message.
  • the serial number of the data packet, and the data packet information received by the data receiving end are obtained; the data packet resending module 15 is configured to send according to the data carried in the retransmission request message, and the data receiving end does not receive The sequence number of the received data packet is resent to the data receiving end to send the unreceived data packet.
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of the data receiving end of the present invention. As shown in FIG. 7, the data receiving end includes a third message receiving module 21 and a packet serial number.
  • the packet header of the probe reply message carries the last received data receiving end from the data receiving end.
  • the serial number of a packet is configured to receive the probe message carrying the probe type identifier in the packet header sent by the data sending end;
  • the packet serial number obtaining module 22 is configured to use the third
  • the message sending module 23 obtains the serial number of the last data packet received from the data sending end in sequence according to the data packet information received by the data receiving end from the
  • the data receiving end in the above embodiment of the present invention cooperates with the data transmitting end to realize the confirmation of the data packet transmission process, and realizes reliable transmission of the data packet.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of the data receiving end of the present invention.
  • the data receiving end includes a third message receiving module 21, a packet sequence number obtaining module 22, and a third message sending module 23, and further includes a fourth The message sending module 24, and the packet header of the probe message received by the third message receiving module 21 in the foregoing embodiment further carries data that is sent by the data sending end to the data receiving end before sending the probe message.
  • the sequence number of the packet, the fourth message sending module 24 is configured to connect to the data according to the data sending end before sending the probe message
  • the serial number of the data packet sent by the receiving end, and the received data packet information from the data sending end obtain the serial number of the data packet sent by the data sending end but not received by the data receiving end, and generate a retransmission request.
  • the message is sent to the data sending end, and the retransmission request message carries the sequence number of the data packet that the data sending end has sent but the data receiving end does not receive.
  • the embodiment of the present invention further provides a communication system, which includes the data transmitting end and the data receiving end in the foregoing embodiments.
  • the technical solution of detecting and confirming the retransmission provided by the foregoing various embodiments of the present invention can implement reliable transmission of data packets, and can easily and efficiently meet the requirements of inter-cluster process communication.

Abstract

The present invention provides a detection processing method, data transmitter, data receiver and communication system. Wherein, the detection processing method includes: when the data transmitter obtains that a predetermined detection time has arrived according to a timer, and if the transmission queue is full, or if the transmission queue is not transmitting any data packet while the transmission queue is not empty, the data transmitter transmits a detection message to the data receiver; after receiving the detection message, the data receiver obtains, according to information about the received data packets, the sequence number of the latest one of the data packets received in order, generates a detection reply message and transmits it to the data transmitter, and the message header of the detection reply message carries the sequence number of the latest one of the data packets received in order. Embodiments of the present invention also provide a corresponding data transmitter, data receiver and communication system. The technical solutions provided by the embodiments of the present invention can provide simple and efficient reliability communications for trunked routers.

Description

探测处理方法、 数据发送端、 数据接收端以及通信系统 技术领域  Detection processing method, data transmitting end, data receiving end, and communication system
本发明实施例涉及通信技术领域, 尤其涉及一种探测处理方法、 数据 发送端、 数据接收端以及通信系统。 背景技术  The embodiments of the present invention relate to the field of communications technologies, and in particular, to a probe processing method, a data sending end, a data receiving end, and a communication system. Background technique
集群路由器具有成本低、大容量的特点,可以很好的实现网络的扩展, 并支持更大规模和更高性能的网络, 易于提供多样的服务和接口, 为宽带 业务的普及、 高带宽应用的普及创造了物质基础, 已被普遍认为是未来核 心网络设备的发展趋势, 能够满足新一代互联网发展的需求, 具有非常广 泛的发展空间。  The cluster router has the characteristics of low cost and large capacity. It can well expand the network and support larger and higher performance networks. It is easy to provide various services and interfaces. It is widely used for broadband services and high bandwidth applications. Popularization has created a material foundation, which has been widely recognized as the development trend of core network equipment in the future. It can meet the needs of the development of the new generation of the Internet and has a very broad space for development.
随着集群路由器的应用越来越广泛,对集群路由间的通信技术的要求 也越来越高, 需要高可靠、 高性能的通信技术, 以最大限度的发挥集群网 络的能力。 但是现有技术中的通信协议不能够适应集群路由器间的通信, 例如用户数据包协议 ( User Da tagram Pro toco l , 以下简称: UDP ) 不能 够提供可靠传输, 而透明进程间通信协议(Trans parent Inter-proces s Communi ca t i on, 以下简称: TIPC)的可靠连接机制是建立在可靠内部虚拟 连接的基础上, 其不同路由器之间的连接时相互干扰的, 在整个可靠虚拟 链路上一个连接的包丟失会减慢所有共享这个虚拟链路的路由器之间的 通信, 因此现有技术不能够为集群路由器提供简单、 高效的可靠性通信。 发明内容  With the increasing application of cluster routers, the requirements for communication technologies between cluster routes are becoming higher and higher, and high-reliability and high-performance communication technologies are required to maximize the capacity of the cluster network. However, the communication protocol in the prior art cannot adapt to the communication between the cluster routers. For example, the User Data Packet Protocol (User Da Tagram Pro toco l, hereinafter referred to as UDP) cannot provide reliable transmission, and the transparent interprocess communication protocol (Trans parent) Inter-proces s Communi ca ti on, hereinafter referred to as: TIPC) The reliable connection mechanism is based on a reliable internal virtual connection, the connection between different routers interferes with each other, and a connection is made on the entire reliable virtual link. Packet loss can slow down communication between all routers sharing this virtual link, so the prior art does not provide simple, efficient reliable communication for cluster routers. Summary of the invention
本发明实施例提供一种探测处理方法、 数据发送端、 数据接收端以及 通信系统, 用以提供简单、 高效的可靠性通信。 本发明实施例提供了一种探测处理方法, 包括: Embodiments of the present invention provide a detection processing method, a data transmitting end, a data receiving end, and a communication system, to provide simple and efficient reliability communication. An embodiment of the present invention provides a detection processing method, including:
数据发送端在根据定时器获知已达到预定探测时间, 如果所述数据发 送端中与数据接收端对应的发送队列已满, 或者所述数据发送端没有发送 所述发送队列中的任何数据包而发送队列不为空时, 向所述数据接收端发 送报文头中携带探测类型标识的探测消息;  The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data packet in the sending queue. When the sending queue is not empty, sending a probe message carrying the probe type identifier in the packet header to the data receiving end;
数据接收端在接收到所述探测消息后, 根据已接收到的数据包信息获 取按序接收的来自所述数据发送端的最后一个数据包的序列号, 生成探测 回复消息并发送给数据发送端, 所述探测回复消息的报文头中携带所述数 据接收端按序接收的来自所述数据发送端的最后一个数据包的序列号。  After receiving the probe message, the data receiving end acquires the serial number of the last data packet received from the data sending end in sequence according to the received data packet information, generates a probe reply message, and sends the probe response message to the data sending end. The packet header of the probe reply message carries the sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
本发明实施例还提供了一种数据发送端, 包括:  An embodiment of the present invention further provides a data sending end, including:
第一消息发送模块, 用于在根据定时器获知已达到预定探测时间, 如 果所述数据发送端中与数据接收端对应的发送队列已满, 或者所述数据发 送端没有发送所述发送队列中的任何数据包而发送队列不为空时, 向数据 接收端发送报文头中携带探测类型标识的探测消息;  a first message sending module, configured to: when the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send the sending queue If any of the data packets and the transmission queue is not empty, the detection message carrying the detection type identifier in the packet header is sent to the data receiving end;
第一消息接收模块, 用于接收数据接收端返回的探测回复消息, 所述 探测回复消息的报文头中携带数据接收端按序接收的来自所述数据发送 端的最后一个数据包的序列号。  The first message receiving module is configured to receive a probe reply message returned by the data receiving end, where the packet header of the probe reply message carries a sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
本发明实施例还提供了一种数据接收端, 包括:  An embodiment of the present invention further provides a data receiving end, including:
第三消息接收模块, 用于接收数据发送端发送的报文头中携带探测类 型标识的探测消息;  a third message receiving module, configured to receive a probe message carrying a detection type identifier in a packet header sent by the data sending end;
包序列号获取模块, 用于根据已接收到的数据包信息获取按序接收的 来自所述数据发送端的最后一个数据包的序列号;  a packet sequence number obtaining module, configured to obtain, according to the received data packet information, a serial number of the last data packet received from the data transmitting end in sequence;
第三消息发送模块, 用于生成探测回复消息并发送给数据发送端, 所 述探测回复消息的报文头中携带所述数据接收端按序接收的来自所述数 据发送端的最后一个数据包的序列号。  a third message sending module, configured to generate a probe reply message, and send the message to the data sending end, where the packet header of the probe reply message carries the last data packet received by the data receiving end in sequence from the data sending end serial number.
本发明实施例还提供一种通信系统, 包括上述的数据发送端和数据接 收端。 The embodiment of the invention further provides a communication system, comprising the above data sending end and data connection Received.
本发明实施例提供的技术方案, 通过数据发送端向数据接收端主动发 送探测消息, 该探测消息触发数据接收端对数据包接收情况进行检测, 并 在返回的探测回复消息的报文头中携带连续收到的最后一个数据包的序 列号, 以实现数据发送端根据该序列号进行发送窗口调整, 删除发送队列 中已成功发送的数据包, 避免删除发送队列中未成功发送的数据包, 确保 发送质量, 本发明上述实施例提供的技术方案能够提供简单、 高效的可靠 性通信。 附图说明  According to the technical solution provided by the embodiment of the present invention, the data sending end actively sends a probe message to the data receiving end, and the probe message triggers the data receiving end to detect the data packet receiving condition, and carries the packet in the header of the returned probe reply message. The serial number of the last data packet received continuously, so that the data sending end performs the transmission window adjustment according to the serial number, deletes the data packet that has been successfully sent in the sending queue, and avoids deleting the data packet that is not successfully sent in the sending queue, ensuring Transmission quality, the technical solution provided by the above embodiments of the present invention can provide simple and efficient reliability communication. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1为本发明探测处理方法实施例一的流程示意图;  1 is a schematic flow chart of Embodiment 1 of a detection processing method according to the present invention;
图 2为本发明探测处理方法实施例二的流程示意图;  2 is a schematic flowchart of Embodiment 2 of a detection processing method according to the present invention;
图 3为本发明实施例中连接建立时状态机的变化示意图;  3 is a schematic diagram showing changes of a state machine when a connection is established according to an embodiment of the present invention;
图 4为本发明实施例中连接关闭时的状态机的变化示意图; 图 5为本发明数据发送端实施例一的结构示意图;  4 is a schematic diagram of a change of a state machine when a connection is closed according to an embodiment of the present invention; FIG. 5 is a schematic structural diagram of Embodiment 1 of a data transmitting end according to the present invention;
图 6为本发明数据发送端实施例二的结构示意图;  6 is a schematic structural diagram of Embodiment 2 of a data transmitting end according to the present invention;
图 7为本发明数据接收端实施例一的结构示意图;  7 is a schematic structural diagram of Embodiment 1 of a data receiving end according to the present invention;
图 8为本发明数据接收端实施例二的结构示意图。 具体实施方式  FIG. 8 is a schematic structural diagram of Embodiment 2 of a data receiving end according to the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。 In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It is to be understood that the described embodiments are a part of the embodiments of the invention, rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
针对现有技术中不能为集群路由器提供简单、 高效的可靠性通信, 本 发明实施例提供了一种探测处理的技术方案, 图 1为本发明探测处理方法 实施例一的流程示意图, 如图 1所示, 该方法包括如下步骤:  The present invention provides a technical solution for the detection processing, and FIG. 1 is a schematic flowchart of the first embodiment of the detection processing method of the present invention, as shown in FIG. 1 . As shown, the method includes the following steps:
步骤 1 01、 数据发送端在根据定时器获知已达到预定探测时间, 如果 所述数据发送端中与数据接收端对应的发送队列已满, 或者所述数据发送 端没有发送发送队列中的任何数据包而发送队列不为空时, 向数据接收端 发送报文头中携带探测类型标识的探测消息; 本步骤中是由数据发送端, 在发送数据包后, 主动的向数据接收端发起探测消息, 具体的可以是在报 文头中携带探测类型标识, 以表明其为探测消息, 通过上述的探测消息能 够确认已经发送的数据包在数据接收端的接收情况, 能够及时调整发送队 列, 上述发送探测消息的时机可以是根据定时器获知已达到预定探测时 间, 且检测到与数据接收端对应的发送队列已满时, 向数据接收端发送探 测消息, 或者是在根据定时器执行探测, 在根据定时器获知已达到预定探 测时间时, 如果发送队列没有发送任何数据包且发送队列不为空, 向数据 接收端发送探测消息。  Step 1 01: The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data in the sending queue. When the packet is not empty, the packet sends a probe message carrying the probe type identifier to the data receiver. In this step, the data sender sends a probe message to the data receiver after sending the data packet. Specifically, the probe type identifier may be carried in the packet header to indicate that it is a probe message, and the foregoing probe message can confirm the received status of the sent data packet at the data receiving end, and can timely adjust the sending queue, and the foregoing sending probe The timing of the message may be that the predetermined detection time has been reached according to the timer, and when the transmission queue corresponding to the data receiving end is detected to be full, the detection message is sent to the data receiving end, or the detection is performed according to the timer, according to the timing. When it is known that the scheduled detection time has been reached, The sending queue does not send any data packets and the sending queue is not empty, sending a probe message to the data receiving end.
步骤 1 02、 数据接收端在接收到所述探测消息后, 根据已接收到的数 据包信息获取按序接收的来自所述数据发送端的最后一个数据包的序列 号, 生成探测回复消息并发送给数据发送端, 所述探测回复消息的报文头 中携带按序接收的来自所述数据发送端的最后一个数据包的序列号。该步 骤中数据发送端在接收到上述探测回复消息后, 即可以确认数据接收端已 经接收到了在上述按序接收的最后一个数据包的序列号之前的数据包, 并 且该数据发送端可以进一步的根据上述的序列号移动发送窗口。本实施例 中的探测回复消息可以是专门设置的探测回复消息, 其仅包括报文头, 而 不设置消息体, 在报文头中包括了该探测回复消息的消息类型标识, 以及 数据接收端按序接收的最后一个数据包的序列号。 After receiving the probe message, the data receiving end acquires the sequence number of the last data packet received from the data sending end in sequence according to the received data packet information, generates a probe reply message, and sends the probe message to the data packet. The data sending end carries the sequence number of the last data packet received from the data sending end received in sequence in the packet header of the probe reply message. After receiving the foregoing probe reply message, the data sending end may confirm that the data receiving end has received the data packet before the serial number of the last data packet received in sequence, and the data transmitting end may further The transmission window is moved according to the serial number described above. The probe reply message in this embodiment may be a specially set probe reply message, which only includes the message header, and The message body identifier is not set, and the message type identifier of the probe reply message is included in the packet header, and the sequence number of the last data packet received by the data receiving end in sequence.
本发明上述实施例中,通过数据发送端向数据接收端主动发送探测消 息, 触发数据接收端对数据包接收情况进行检测, 并在返回的探测回复消 息的报文头中携带连续收到的最后一个数据包的序列号, 以实现数据接收 端根据该序列号进行发送窗口调整, 删除发送队列中已成功发送的数据 包, 避免删除发送队列中未成功发送的数据包, 确保发送质量, 本发明上 述实施提供的技术方案, 应用于集群路由间的通信中, 能够提供简单、 高 效的可靠性通信。  In the foregoing embodiment of the present invention, the data sending end actively sends a probe message to the data receiving end, triggering the data receiving end to detect the data packet receiving condition, and carrying the last received consecutively in the header of the returned probe reply message. The serial number of a data packet, so that the data receiving end performs the transmission window adjustment according to the serial number, deletes the data packet that has been successfully sent in the sending queue, avoids deleting the data packet that is not successfully sent in the sending queue, and ensures the transmission quality, and the present invention The technical solution provided by the foregoing implementation is applied to communication between cluster routes, and can provide simple and efficient reliable communication.
本发明上述实施例中,其中数据发送端向数据接收端发送的探测消息 的报文头中携带有数据发送端最后发送的数据包的序列号,数据接收端可 以根据上述序列号信息进行数据的重传处理。 图 2为本发明探测处理方法 实施例二的流程示意图, 如图 2所示, 包括如下的步骤:  In the foregoing embodiment of the present invention, the packet header of the probe message sent by the data sending end to the data receiving end carries the sequence number of the last data packet sent by the data sending end, and the data receiving end can perform data according to the serial number information. Retransmission processing. FIG. 2 is a schematic flowchart of the second embodiment of the probe processing method of the present invention. As shown in FIG. 2, the method includes the following steps:
步骤 201、 数据发送端在根据定时器获知已达到预定探测时间, 如果 所述数据发送端中与数据接收端对应的发送队列已满,或者所述数据发送 端没有发送发送队列中的任何数据包而发送队列不为空时, 向数据接收端 发送报文头中携带探测类型标识的探测消息,该探测消息的报文头中还携 带有数据发送端在发送所述探测消息之前最后向所述数据接收端发送的 数据包的序列号;  Step 201: The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data packet in the sending queue. When the sending queue is not empty, the sending of the probe message carrying the probe type identifier in the packet header is sent to the data receiving end, and the packet header of the probe message further carries the data sending end before sending the probe message to the end. The serial number of the data packet sent by the data receiving end;
步骤 202、数据接收端接收到所述数据发送端发送的所述探测消息后, 根据所述探测消息中所携带的所述数据发送端最后向所述数据接收端发 送的数据包的序列号, 以及已接收到的数据包信息获取数据发送端已发送 而数据接收端未接收到的数据包的序列号, 生成重传请求消息并发送给数 据发送端, 所述重新请求消息中携带所述数据发送端已发送而数据接收端 未接收到的数据包的序列号;  Step 202: After receiving the probe message sent by the data sending end, the data receiving end sends a sequence number of the data packet sent by the data sending end to the data receiving end according to the probe message. And the received data packet information, the sequence number of the data packet sent by the data sending end and not received by the data receiving end, the retransmission request message is generated and sent to the data sending end, where the re-requesting message carries the data The serial number of the data packet that has been sent by the sender but not received by the data receiver;
步骤 203、数据发送端接收到来自所述数据接收端的重传请求消息后, 根据所述重传请求消息中所携带的数据发送端已发送而数据接收端未接 收到的数据包的包序列号重新发送数据接收端未接收到的数据包。 Step 203: After the data sending end receives the retransmission request message from the data receiving end, The data packet not received by the data receiving end is retransmitted according to the packet sequence number of the data packet that the data transmitting end carried in the retransmission request message has sent but not received by the data receiving end.
本发明上述实施例中, 其中由数据发送端发送探测消息, 进行探测确 认和探测重传, 在进行探测确认时, 可以在探测消息的报文头中携带消息 类型的标识信息, 以表示该探测消息的作用是用于探测, 数据接收端在接 收到上述消息后, 即可明确需要进行探测回复, 向数据发送端返回数据接 收端已经按序接收到的来自所述数据发送端的数据包中最后一个数据包 的序列号。  In the foregoing embodiment of the present invention, the data sending end sends the probe message, and performs the probe acknowledgement and the probe retransmission. When the probe acknowledges, the identifier of the message type may be carried in the packet header of the probe message to indicate the probe. The function of the message is for detecting, and after receiving the above message, the data receiving end can explicitly need to perform the probe reply, and return to the data transmitting end to return the data packet from the data transmitting end that has been received in order by the data receiving end. The serial number of a packet.
另外, 对于探测消息, 还可以是在探测消息的报文头中携带有数据发 送端最后向对应数据接收端发送的数据包的序列号, 在这种情况下, 可以 由数据接收端根据上述数据发送端最后向所述数据接收端发送的数据包 的序列号以及已接收到的数据包信息获取所述数据发送端已向所述数据 接收端发送但所述数据接收端未接收到的数据包的序列号,判断是否存在 遗漏的数据包, 并向数据发送端发送重传请求消息, 请求重新发送所述数 据发送端已向所述数据接收端发送但所述数据接收端并未接收到的数据 包。 本发明实施例在具体实施过程中, 可以在所有探测消息中的报文头中 都携带数据发送端最后向所述数据接收端发送的数据包的序列号, 即支持 探测确认, 又支持探测重传, 能够实现数据包的可靠传输, 并能够简单、 高效的满足集群间进程通信的要求。  In addition, for the probe message, the sequence header of the data packet sent by the data sending end to the corresponding data receiving end may be carried in the packet header of the probe message. In this case, the data receiving end may be based on the data. The sequence number of the data packet finally sent by the transmitting end to the data receiving end and the received data packet information acquires the data packet that the data transmitting end has sent to the data receiving end but the data receiving end does not receive. The serial number, determining whether there is a missing data packet, and sending a retransmission request message to the data transmitting end, requesting to resend the data transmitting end that has been sent to the data receiving end but not received by the data receiving end. data pack. In a specific implementation process, the packet header of all the probe messages may carry the sequence number of the data packet sent by the data sending end to the data receiving end, that is, support detection and support, and support detection Pass, can achieve reliable transmission of data packets, and can easily and efficiently meet the requirements of inter-cluster process communication.
本发明的具体技术方案中, 可以利用现有的 UDP技术方案, 在 UDP通 信协议层之上封装一层, 即在原有的 UDP数据包上载封装一层报文头, 提 供用户进程简单适用的应用程序编程接口 (App l i ca t i on Programming Interface,以下简称: API) , 进程之间可以通过 AP I来使用这种传输方式 进行通信。 数据发送端将要发送的用户进程数据封装一层报文头后, 通过 标准的 UDP 端口进行发送。 数据接收端通过标准的 UDP端口接收到消息 后, 解析报文头即可找到对应的接收进程。 在本发明的具体实施方案中, 可以应用于集群路由器的通信中, 上述数 据发送端和数据接收端可以是同一通信过程中的不同路由器。其中 UDP包上封 装的一层报文头可以包含源端口号、 目的端口号、 当前序列号、 确认序列号、 窗口大小、 消息类型以及消息长度等信息。 具体的消息类型可以分为连接 ( SYN )消息、连接响应 ( SYN_ACK )消息、数据包 ( DATA )消息、探测 ( PROBE ) 消息、 确认 ( ACK ) 消息、 重传请求 ( NACK ) 消息、 关闭 ( FIN ) 消息、 关闭 响应 ( FIN_ACK ) 消息以及探测回复 ( PR0BE_ACK ) 消息等。 其中的源端口号 和目的端口号用来标识数据发送端和数据接收端的应用进程, 这是与现有技 术中类似; 而当前序列号用来标识从发送端向接收端发送的每个消息, 具体 的序列号是为了保证消息能够有序可靠的到达,基于包进行排序的,对于 DATA 以及 FIN消息类型, 每个消息是基于包按序加 1 ; 对于其他的消息类型包, 包 的序列号和前一个包的序列号保持一致, 不进行加 1 , 因此, 当建立连接并发 送若干个 DATA消息后, 发送的 PROBE消息的报文头中携带的其中的序列号, 即 为已发送的 DATA消息数量, 也就是数据发送端最后向所述数据接收端发送的 数据包的序列号, 在本发明实施例中, 一个 DATA消息发送的数据称为一个数 据包。 确认序列号即为上述的数据接收端已经按序接收的最后一个数据包的 序列号。 窗口大小用来表示数据接收端可接收的最大数据包数目。 消息长度 即为整个消息的总长度。 上述的 SYN消息、 SYIACK消息、 PROBE消息、 ACK消 息、 FIN消息、 F HACK消息以及 PROBE _ACK消息可以是仅仅包括报文头即可, 而对于 DATA消息、 NACK消息需要包括消息体, DATA消息的消息体为具体发送 的数据, 例如可以是 UDP包, 而 NACK消息的消息体可以是需要重传的数据包的 序列号。 In the specific technical solution of the present invention, the existing UDP technical solution can be used to encapsulate a layer on the UDP communication protocol layer, that is, upload and encapsulate a layer header in the original UDP data packet, and provide an application suitable for the user process. The program programming interface (App Li ca ti on Programming Interface, hereinafter referred to as API), the process can communicate with each other through the AP I. The data sending end encapsulates the user process data to be sent by the data sending end, and then sends the packet through the standard UDP port. After receiving the message through the standard UDP port, the data receiving end parses the message header to find the corresponding receiving process. In a specific embodiment of the present invention, the data transmitting end and the data receiving end may be different routers in the same communication process. The layer header encapsulated in the UDP packet may include information such as a source port number, a destination port number, a current sequence number, a confirmation sequence number, a window size, a message type, and a message length. The specific message types can be divided into connection (SYN) message, connection response (SYN_ACK) message, data packet (DATA) message, probe (PROBE) message, acknowledgement (ACK) message, retransmission request (NACK) message, and close (FIN). ) Messages, Close Response (FIN_ACK) messages, and Probe Reply (PR0BE_ACK) messages, etc. The source port number and the destination port number are used to identify the application process of the data sending end and the data receiving end, which is similar to the prior art; and the current serial number is used to identify each message sent from the sending end to the receiving end. The specific serial number is to ensure that the message arrives in an orderly and reliable manner, and is sorted based on the packet. For DATA and FIN message types, each message is added based on the order of the packet; for other message type packets, the serial number of the packet It is the same as the serial number of the previous packet, and is not incremented by 1. Therefore, when a connection is established and several DATA messages are sent, the serial number carried in the header of the sent PROBE message is the transmitted DATA. The number of messages, that is, the sequence number of the data packet that the data transmitting end finally sends to the data receiving end. In the embodiment of the present invention, the data sent by one DATA message is called a data packet. The confirmation serial number is the serial number of the last data packet that the above-mentioned data receiving end has received in order. The window size is used to indicate the maximum number of packets that the data receiver can receive. The message length is the total length of the entire message. The foregoing SYN message, SYIACK message, PROBE message, ACK message, FIN message, F HACK message, and PROBE_ACK message may be only a message header, and for a DATA message, a NACK message needs to include a message body, a DATA message. The body is specifically transmitted data, for example, may be a UDP packet, and the message body of the NACK message may be a sequence number of a data packet that needs to be retransmitted.
在本发明的具体实施方案中, 其中的数据发送端和数据接收端可以通过 二次握手的方式建立连接和关闭连接, 采用序列号、 确认技术、 重传机制、 滑窗和流控机制以及定时器策略保证了消息能够按序、 可靠的到达。  In a specific embodiment of the present invention, the data sending end and the data receiving end can establish a connection and close the connection by means of a second handshake, using a serial number, an acknowledgment technology, a retransmission mechanism, a sliding window, and a flow control mechanism, and timing. The policy ensures that messages arrive in order and reliably.
具体的, 本发明可采用面向连接的技术方案, 在发送数据之前, 采用二 次握手机制在双方之间建立一条连接,其中图 3为本发明实施例中连接建立时 状态机的变化示意图, 如图 3所示, 客户端 (Cl ient ) 首先处于关闭状态 ( CLOSE ) , 客户端向服务器发送一个带有初始序列号的建立连接(SYN ) 消 息, 客户端状态转换为等待状态(SYN SENT ) , 而服务器侧的主端口 (Mas ter EP )处于监听状态(LI STEN ),在接收到上述的建立连接消息后, 派生出一个 备端口 (S lave EP)与客户端通信, 发送对 SYN消息的确认消息 ( SYN—ACK )作 为应答, 同时备端口的状态转换为建立状态(ESTABLISHED ) , 客户端在接收 到上述的确认消息后, 也会将状态转换为建立状态(ESTABLI SHED )。 这样客 户端和发送端就完成了连接的建立。 其中初始序列号随时间变化, 能够保证 每个连接都具有不同的初始序列号。 在客户端和服务器间建立连接后, 就可 以根据本发明提供的探测确认以及探测重传的技术方案在客户端和服务器间 进行可靠性通信。 Specifically, the present invention may adopt a connection-oriented technical solution, and adopt two before sending data. The secondary handshake mechanism establishes a connection between the two parties. FIG. 3 is a schematic diagram of a state machine change when the connection is established according to the embodiment of the present invention. As shown in FIG. 3, the client (Cl ient ) is first turned off (CLOSE), the client The end sends a connection establishment (SYN) message with the initial sequence number to the server, the client state transitions to the wait state (SYN SENT), and the server-side master port (Mas ter EP) is in the listening state (LI STEN). After receiving the above establishment connection message, a slave port (S lave EP) is derived to communicate with the client, and an acknowledgement message (SYN_ACK) for the SYN message is sent as a response, and the state of the standby port is converted to the established state (ESTABLISHED) After the client receives the above confirmation message, it also converts the state to the established state (ESTABLI SHED). In this way, the client and the sender complete the establishment of the connection. The initial sequence number changes over time, ensuring that each connection has a different initial sequence number. After the connection between the client and the server is established, the reliability communication between the client and the server can be performed according to the technical solution of the probe confirmation and the probe retransmission provided by the present invention.
具体的, 确认技术就是指数据接收端接收到数据发送端的数据时, 发送 一个确认消息给数据发送端已经按序可靠收到的包。  Specifically, the acknowledgment technology refers to that when the data receiving end receives the data of the data sending end, it sends an acknowledgment message to the data transmitting end that has been received in order.
确认技术的实现直接影响着传输方式的性能, 如果确认太慢, 数据发送 端有可能因为未能及时收到确认信息而停止发送, 如果确认太过频繁, 则会 影响系统带宽。  The implementation of the acknowledgment technology directly affects the performance of the transmission mode. If the acknowledgment is too slow, the data sender may stop transmitting because it fails to receive the acknowledgment information in time. If the acknowledgment is too frequent, the system bandwidth will be affected.
本发明上述实施例提供了一种探测确认的技术方案, 即可以在数据发送 端启动一个定时器, 每隔一段时间进行探测, 但是如果发送队列已经满, 则 说明数据发送端有可能因为没有及时收到对端的确认信息而导致发送队列 满, 所以这个时候会给对端发送一个探测消息来等待对端的探测回复消息, 在探测回复消息中就会获得对端的确认信息。 另外, 如果探测时钟到期, 数 据发送端没有发送任何包且发送队列不为空, 这个时候数据发送端有可能因 为没有及时收到对端的确认信息而停止发送, 所以也会向数据接收端发送探 测消息并等待接收端的探测回复消息。 这种探测确认的技术方案保证了在需 要的时候能够及时的获得对端的确认信息, 而且避免了确认的不必要重复发 送, 提高了网络性能, 节约带宽。 The foregoing embodiment of the present invention provides a technical solution for detecting and confirming, that is, a timer can be started at the data sending end, and the detecting is performed at intervals, but if the sending queue is full, it indicates that the data sending end may be timely. After receiving the confirmation message from the peer end, the sending queue is full. Therefore, a probe message is sent to the peer end to wait for the probe response message of the peer end. In the probe response message, the peer end confirmation message is obtained. In addition, if the probe clock expires, the data sender does not send any packets and the send queue is not empty. At this time, the data sender may stop sending because it does not receive the acknowledgement information from the peer in time, so it will also send to the data receiver. Probe the message and wait for the probe reply message from the receiver. The technical solution of the detection confirmation ensures that the confirmation information of the opposite end can be obtained in time when needed, and the unnecessary repetition of the confirmation is avoided. Send, improve network performance and save bandwidth.
在具体的实施例中, 除上述的探测确认的技术方案外, 还可以与其他现 有的确认方式结合使用, 例如和延迟确认方式相结合, 延迟确认方式是指数 据接收端接收到一个数据包后, 并不是立即发送确认信息, 而是推迟一段时 间再发送确认信息, 但是不能无限延迟。 具体实施例时, 可以累计收到 16个 连续的数据包后发送确认信息, 上述确认信息可以是数据包的序列号, 表示 数据接收端已经累计接收到了该序列号之前的所有数据包。 上述采取各种确 认相结合的确认机制, 能够保障系统性能。  In a specific embodiment, in addition to the above-mentioned technical solution of detection and confirmation, it can also be combined with other existing confirmation methods, for example, combined with a delayed acknowledgement method, where the data receiving end receives a data packet. After that, instead of sending the confirmation message immediately, the confirmation message is sent for a while, but it cannot be delayed indefinitely. In the specific embodiment, the acknowledgement information may be sent after the 16 consecutive data packets are received, and the acknowledgement information may be the serial number of the data packet, indicating that all data packets before the serial number have been accumulated by the data receiving end. The above-mentioned confirmation mechanism, which combines various confirmations, can guarantee system performance.
另外, 本发明上述实施例中, 数据接收端在向数据发送端回复确认信息 时, 可以采取捎带的方式, 将确认信息携带在数据包消息中, 具体的针对探 测确认的技术方案, 探测回复消息不需要单独设置, 而是扩展数据包消息, 在数据包消息的报文头中携带所述数据接收端按序接收的来自所述数据发送 端的最后一个数据包的序列号, 以作为探测回复消息使用, 实现探测确认机 制, 这样可以提高网络的通信效率, 节约带宽。  In addition, in the foregoing embodiment of the present invention, when the data receiving end returns the confirmation information to the data sending end, the data receiving end may take the piggybacking manner and carry the acknowledgement information in the data packet message, and specifically detect the reply message for the technical solution of the detection and confirmation. It is not necessary to separately set, but to extend the packet message, and carry the sequence number of the last data packet received by the data receiving end in sequence from the data receiving end in the packet header of the data packet message as the probe reply message. Use, to implement the probe confirmation mechanism, which can improve the communication efficiency of the network and save bandwidth.
另外在传输过程中, 消息都有可能会丟失, 一定要有重传机制来保证消 息能够可靠的到达。 本发明实施例提供的探测触发重传机制, 可以与请求重 传相结合使用。  In addition, during the transmission process, the message may be lost. There must be a retransmission mechanism to ensure that the message can arrive reliably. The probe trigger retransmission mechanism provided by the embodiment of the present invention can be used in combination with request retransmission.
其中请求重传是数据接收端将按序收到的数据包放到接收队列中,将 收到的失序数据包放到失序队列中。 然后在失序队列大小达到 16个数据 包或者其他数量时, 数据接收端就发送重传请求消息请求对方重传, 数据 接收端会通过查看接收队列以及失序队列,得到没有收到的数据包的序列 号,在数据接收端发送给对端的重传请求消息中携带数据接收端没有收到 的数据包的序列号, 这样数据发送端收到重传请求消息后, 就可以从重传 请求消息中提取出所述数据接收端没有收到的数据包的序列号, 即所述数 据接收端所丟失的数据包的序列号, 然后根据所述数据接收端没有收到的 数据包的序列号只将这些序列号对应的数据包重传给数据接收端。这种重 传方式只重传丟失的数据包, 可以提高网络利用率。 The request retransmission is that the data receiving end receives the data packet received in order into the receiving queue, and puts the received out-of-order data packet into the out-of-sequence queue. Then, when the size of the out-of-sequence queue reaches 16 data packets or other quantities, the data receiving end sends a retransmission request message to request the other party to retransmit, and the data receiving end obtains the sequence of the unreceived data packet by viewing the receiving queue and the out-of-sequence queue. The retransmission request message sent by the data receiving end to the peer end carries the sequence number of the data packet that is not received by the data receiving end, so that after receiving the retransmission request message, the data transmitting end can extract the retransmission request message. The data receiving end does not receive the serial number of the data packet, that is, the serial number of the data packet lost by the data receiving end, and then only these sequences according to the serial number of the data packet that the data receiving end does not receive. The corresponding packet of the number is retransmitted to the data receiving end. This weight The transmission method only retransmits lost packets, which can improve network utilization.
探测触发重传机制是用来保证如果失序队列达不到一定数量时也能 够及时通知对端丟包。 当数据接收端收到对端的探测消息时, 解析探测消 息的报文头,获取其中携带的数据发送端最后向数据接收端发送的数据包 的序列号,如果发现已接收到的数据包中未全部包括上述数据发送端最后 向数据接收端发送的数据包的序列号之前的数据包, 则认为中间有丟包, 具体也可以采取上述查看接收队列和失序队列的方式确认丟包,这个时候 会立即发送重传请求消息要求对方重传中间没有收到的那些包。重传请求 消息发送的频率同样也会极大的影响网络的性能,探测触发重传的技术方 案能够在节约 NACK消息包的同时保证及时通知对端, 节约了网络带宽。  The probe trigger retransmission mechanism is used to ensure that the peer packet loss can be notified in time if the out-of-order queue does not reach a certain number. When the data receiving end receives the probe message of the peer end, it parses the packet header of the probe message, and obtains the sequence number of the data packet sent by the data sending end to the data receiving end, if it is found that the received data packet is not All of the data packets preceding the serial number of the data packet sent by the data transmitting end to the data receiving end are considered to have lost packets in the middle. Specifically, the packet can be confirmed by checking the receiving queue and the out-of-sequence queue. Sending a retransmission request message immediately requires the other party to retransmit those packets that were not received in the middle. Retransmission request The frequency of message transmission also greatly affects the performance of the network. The detection of the technology that triggers the retransmission can save the NACK message packet while ensuring timely notification to the peer end, saving network bandwidth.
本发明的具体技术方案中还可以利用了滑窗和流控机制,其中数据发 送端将已经按序发送的数据包保存到发送队列中,数据接收端发送的探测 回复消息携带自己的接收窗口大小和已经确认收到的数据包的序列号,数 据发送端收到数据接收端返回的已经确认接收到的数据包的序列号等信 息后, 将从发送队列中清除掉已经收到的那些数据包; 同时数据发送端进 一步考虑数据接收端通告的接收窗口的大小, 以及发送队列中数据包的数 量, 从发送队列中发送一定数量的数据包。  In the specific technical solution of the present invention, a sliding window and a flow control mechanism may also be utilized, wherein the data sending end saves the data packet that has been sequentially sent to the sending queue, and the sounding response message sent by the data receiving end carries its own receiving window size. And after confirming the serial number of the received data packet, the data transmitting end receives the information such as the serial number of the acknowledged received data packet returned by the data receiving end, and then clears those already received packets from the sending queue. At the same time, the data transmitting end further considers the size of the receiving window advertised by the data receiving end, and the number of data packets in the sending queue, and sends a certain number of data packets from the sending queue.
本发明的具体技术方案, 在进程中启动一个定时器作为探测时钟, 当 时钟到期时, 根据不同的情况执行不同的处理: 例如在时钟期间没有任何 消息发送并且发送队列为空, 则停止时钟; 在时钟期间没有任何消息发送 并且发送队列不为空, 则发送探测消息并将时钟改成重传探测时钟; 如果 发送队列已满, 则发送探测消息并将时钟改成重传探测时钟; 如果发送了 探测消息, 在重传探测时钟到期一定次数之内都没有收到对方对这个探测 消息的回应, 则认为连接已经中断, 关闭连接。 上述定时器即可实现探测 确认、 探测重传以及保活探测等功能。  In a specific technical solution of the present invention, a timer is started in the process as a probe clock, and when the clock expires, different processing is performed according to different situations: for example, if no message is sent during the clock and the send queue is empty, the clock is stopped. When no message is sent during the clock and the send queue is not empty, the probe message is sent and the clock is changed to the retransmission probe clock; if the send queue is full, the probe message is sent and the clock is changed to the retransmission probe clock; A probe message is sent. If the response of the probe message is not received within a certain number of times of the retransmission probe clock expires, the connection is considered to have been interrupted and the connection is closed. The above timers can implement functions such as probe confirmation, probe retransmission, and keep alive detection.
在面向连接的通信完成后, 可以由服务器或者客户端的任一方发起连 接关闭, 图 4为本发明实施例中连接关闭时的状态机的变化示意图, 如图 4所示, 本实施例中采用二次关闭的方式, 首先服务器和客户端的端口都 处于连接建立状态 (ESTABL I SHED ) , 当一方想关闭连接时, 首先发送连 接关闭 (MSG _F IN ) 消息执行主动关闭, 并将状态转换为等待状态 After the connection-oriented communication is completed, the server or the client can initiate the connection. FIG. 4 is a schematic diagram showing changes of the state machine when the connection is closed according to the embodiment of the present invention. As shown in FIG. 4, in this embodiment, the second shutdown mode is adopted. First, the ports of the server and the client are in the connection establishment state ( ESTABL I SHED ) , when one wants to close the connection, first send a connection close (MSG _F IN ) message to perform active shutdown, and convert the state to wait state
( F IN_ SENT ) , 而另一方收到上述消息后,状态转换为关闭状态(CLOSE ) , 并将返回一个确认消息(MSG _F I N_ACK)执行被动关闭,发起关闭的一方接 收到上述消息后将状态转换为关闭状态 (CLOSE ) 。  ( F IN_ SENT ) , and after the other party receives the above message, the state transitions to the off state (CLOSE ) and returns an acknowledgement message (MSG _F I N_ACK) to perform passive shutdown. The party that initiated the shutdown will receive the message. The state is switched to the off state (CLOSE).
与上述方法实施例对应的, 本发明实施例还提供了一种数据发送端, 图 5为本发明数据发送端实施例一的结构示意图, 如图 5所示, 该装置包 括第一消息发送模块 1 1和第一消息接收模块 1 2 , 其中第一消息发送模块 1 1用于在根据定时器获知已达到预定探测时间,如果所述数据发送端中与 数据接收端对应的发送队列已满, 或者所述数据发送端没有发送所述发送 队列中的任何数据包而发送队列不为空时, 向数据接收端发送报文头中携 带探测类型标识的探测消息; 第一消息接收模块 1 2用于接收数据接收端 返回的探测回复消息, 所述探测回复消息的报文头中携带数据接收端按序 接收到的来自所述数据发送端的最后一个数据包的序列号。  Corresponding to the foregoing method embodiment, the embodiment of the present invention further provides a data sending end, and FIG. 5 is a schematic structural diagram of Embodiment 1 of the data transmitting end of the present invention. As shown in FIG. 5, the device includes a first message sending module. 1 1 and the first message receiving module 1 2 , wherein the first message sending module 1 1 is configured to learn that the predetermined detection time has been reached according to the timer, and if the sending queue corresponding to the data receiving end in the data sending end is full, Or the data sending end does not send any data packet in the sending queue, and the sending queue is not empty, and sends a probe message carrying the probe type identifier in the packet header to the data receiving end; the first message receiving module 12 Receiving the probe reply message returned by the data receiving end, the packet header of the probe reply message carries the sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
该实施例中由数据发送端主动发起探测确认, 并接收数据接收端返回 的探测回复消息, 在探测回复消息中携带数据接收端按序接收到的来自所 述数据发送端的最后一个数据包的序列号, 使得数据发送端可以及时调整 发送窗口, 进行后续的数据包发送, 确保数据连接的可靠性传输。  In this embodiment, the data sending end actively initiates the probe acknowledgement, and receives the probe reply message returned by the data receiving end, where the probe reply message carries the sequence of the last data packet received by the data receiving end in sequence from the data sending end. No., so that the data sender can adjust the transmission window in time to carry out subsequent data packet transmission to ensure the reliable transmission of the data connection.
进一步的, 如图 6所示, 还可以在数据发送端中增加发送窗口调整模 块 1 3 , 该模块与第一消息接收模块 12连接, 用于根据从所述第一消息接 收模块所接收的探测回复消息中获取的所述数据接收端按序接收的最后 一个数据包的序列号移动发送窗口。 并且针对数据重传的技术方案, 还可 以进一步的在数据发送端设置第二消息接收模块 14和数据包重发送模块 15 , 该第二消息接收模块 14用于接收数据接收端返回的重传请求消息, 所述重传请求消息中携带了所述数据发送端已经发送但所述数据接收端 未接收到的数据包的序列号, 即所述数据接收端丟失的数据包的序列号, 所述未接收到的数据包的序列号为数据接收端在接收到所述探测消息后, 根据所述探测消息的报文头中携带的数据发送端在发送所述探测消息之 前最后向所述数据接收端发送的数据包的序列号, 以及数据接收端已接收 到的数据包信息获取得到; 数据包重发送模块 15用于根据所述重传请求 消息中携带的数据发送端已发送而数据接收端未接收到的数据包的序列 号重新向所述数据接收端发送所述未接收到的数据包。 Further, as shown in FIG. 6, a transmission window adjustment module 13 may be added to the data sending end, and the module is connected to the first message receiving module 12 for detecting according to the detection received from the first message receiving module. The sequence number of the last data packet sequentially received by the data receiving end obtained in the reply message moves the sending window. And for the technical solution of the data retransmission, the second message receiving module 14 and the data packet resending module 15 may be further configured on the data sending end, where the second message receiving module 14 is configured to receive the retransmission request returned by the data receiving end. News, The retransmission request message carries a sequence number of a data packet that has been sent by the data sending end but is not received by the data receiving end, that is, a sequence number of the data packet that is lost by the data receiving end, and the unreceived The sequence number of the received data packet is that after the data receiving end receives the probe message, the data transmitting end carried in the packet header of the probe message is sent to the data receiving end before sending the probe message. The serial number of the data packet, and the data packet information received by the data receiving end are obtained; the data packet resending module 15 is configured to send according to the data carried in the retransmission request message, and the data receiving end does not receive The sequence number of the received data packet is resent to the data receiving end to send the unreceived data packet.
本发明实施例还提供了一种数据接收端, 图 7为本发明数据接收端实 施例一的结构示意图, 如图 7所示, 该数据接收端包括第三消息接收模块 21、 包序列号获取模块 22和第三消息发送模块 23 , 其中第三消息接收模 块 21用于接收数据发送端发送的报文头中携带探测类型标识的探测消息; 包序列号获取模块 22用于在所述第三消息发送模块 23接收到探测消息 后, 根据所述数据接收端已接收到的来自数据发送端的数据包信息获取按 序接收的来自数据发送端的最后一个数据包的序列号; 第三消息发送模块 2 3与上述的包序列号获取模块 22连接, 用于生成探测回复消息并发送给 数据发送端, 所述探测回复消息的报文头中携带所述数据接收端按序接收 的来自数据发送端的最后一个数据包的序列号。  The embodiment of the present invention further provides a data receiving end. FIG. 7 is a schematic structural diagram of Embodiment 1 of the data receiving end of the present invention. As shown in FIG. 7, the data receiving end includes a third message receiving module 21 and a packet serial number. The module 22 and the third message sending module 23, wherein the third message receiving module 21 is configured to receive the probe message carrying the probe type identifier in the packet header sent by the data sending end; the packet serial number obtaining module 22 is configured to use the third After receiving the probe message, the message sending module 23 obtains the serial number of the last data packet received from the data sending end in sequence according to the data packet information received by the data receiving end from the data sending end; the third message sending module 2 3 is connected to the packet sequence number obtaining module 22, and is configured to generate a probe reply message and send the message to the data sending end. The packet header of the probe reply message carries the last received data receiving end from the data receiving end. The serial number of a packet.
本发明上述实施例中的数据接收端, 与数据发送端配合实现对数据包 传输过程的确认, 实现数据包的可靠传输。  The data receiving end in the above embodiment of the present invention cooperates with the data transmitting end to realize the confirmation of the data packet transmission process, and realizes reliable transmission of the data packet.
图 8为本发明数据接收端实施例二的结构示意图, 如图 8所示, 数据 接收端包括第三消息接收模块 21、 包序列号获取模块 22和第三消息发送 模块 23 , 还包括第四消息发送模块 24 , 且上述实施例中的第三消息接收 模块 21接收到的探测消息的报文头中还携带有数据发送端在发送所述探 测消息之前最后向所述数据接收端发送的数据包的序列号, 第四消息发送 模块 24用于根据所述数据发送端在发送所述探测消息之前向所述数据接 收端发送的数据包的序列号, 以及已接收到的来自数据发送端的数据包信 息获取所述数据发送端已发送但所述数据接收端未接收到的数据包的序 列号, 生成重传请求消息并发送给数据发送端, 所述重传请求消息中携带 所述数据发送端已发送但所述数据接收端未接收到的数据包的序列号。 FIG. 8 is a schematic structural diagram of Embodiment 2 of the data receiving end of the present invention. As shown in FIG. 8, the data receiving end includes a third message receiving module 21, a packet sequence number obtaining module 22, and a third message sending module 23, and further includes a fourth The message sending module 24, and the packet header of the probe message received by the third message receiving module 21 in the foregoing embodiment further carries data that is sent by the data sending end to the data receiving end before sending the probe message. The sequence number of the packet, the fourth message sending module 24 is configured to connect to the data according to the data sending end before sending the probe message The serial number of the data packet sent by the receiving end, and the received data packet information from the data sending end, obtain the serial number of the data packet sent by the data sending end but not received by the data receiving end, and generate a retransmission request. The message is sent to the data sending end, and the retransmission request message carries the sequence number of the data packet that the data sending end has sent but the data receiving end does not receive.
本发明实施例还提供了一种通信系统, 该通信系统包括上述各实施例 中的数据发送端和数据接收端。  The embodiment of the present invention further provides a communication system, which includes the data transmitting end and the data receiving end in the foregoing embodiments.
本发明上述各个实施例提供的探测确认以及探测重传的技术方案, 能 够实现数据包的可靠传输, 并能够简单、 高效的满足集群间进程通信的要 求。  The technical solution of detecting and confirming the retransmission provided by the foregoing various embodiments of the present invention can implement reliable transmission of data packets, and can easily and efficiently meet the requirements of inter-cluster process communication.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。 最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk. It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 Claim
1、 一种探测处理方法, 其特征在于, 包括: A detection processing method, comprising:
数据发送端在根据定时器获知已达到预定探测时间, 如果所述数据发 送端中与数据接收端对应的发送队列已满, 或者所述数据发送端没有发送 所述发送队列中的任何数据包而发送队列不为空时, 向所述数据接收端发 送报文头中携带探测类型标识的探测消息;  The data sending end knows that the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send any data packet in the sending queue. When the sending queue is not empty, sending a probe message carrying the probe type identifier in the packet header to the data receiving end;
数据接收端在接收到所述报文头中携带探测类型标识的探测消息后, 根据已接收到的数据包信息获取按序接收的来自所述数据发送端的最后 一个数据包的序列号, 生成探测回复消息并发送给数据发送端, 所述探测 回复消息的报文头中携带所述数据接收端按序接收的来自所述数据发送 端的最后一个数据包的序列号。  After receiving the probe message of the probe type identifier in the packet header, the data receiving end obtains the serial number of the last data packet received from the data sending end in sequence according to the received data packet information, and generates a probe. The reply message is sent to the data sending end, and the packet header of the probe reply message carries the sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
2、 根据权利要求 1所述的探测处理方法, 其特征在于, 还包括: 数据发送端根据数据接收端按序接收的最后一个数据包的序列号移 动发送窗口。  2. The detection processing method according to claim 1, further comprising: the data transmitting end moving the transmission window according to the serial number of the last data packet sequentially received by the data receiving end.
3、 根据权利要求 1所述的探测处理方法, 其特征在于, 所述数据发 送端向数据接收端发送的探测消息的报文头中还携带有数据发送端在发 送所述探测消息之前最后向所述数据接收端发送的数据包的序列号, 所述 方法还包括:  The detection processing method according to claim 1, wherein the packet header of the probe message sent by the data sending end to the data receiving end further carries a data transmitting end, and finally sends the detecting message before sending the detecting message. The sequence number of the data packet sent by the data receiving end, the method further includes:
数据接收端根据所述数据发送端在发送所述探测消息之前最后向所 述数据接收端发送的数据包的序列号, 以及已接收到的数据包信息获取数 据发送端已发送而数据接收端未接收到的数据包的序列号, 生成重传请求 消息并发送给数据发送端, 所述重新请求消息中携带所述数据发送端已发 送而数据接收端未接收到的数据包的序列号;  The data receiving end obtains the serial number of the data packet finally sent by the data sending end to the data receiving end before sending the probe message, and the received data packet information acquires the data sending end that has been sent but the data receiving end does not. The sequence number of the received data packet is generated and sent to the data sending end, where the re-requesting message carries the sequence number of the data packet that the data sending end has sent but not received by the data receiving end;
数据发送端接收到来自所述数据接收端的重传请求消息后, 根据所述 重传请求消息中携带的数据发送端已发送而数据接收端未接收到的数据 包的序列号重新发送所述数据接收端未接收到的数据包。 After receiving the retransmission request message from the data receiving end, the data transmitting end resends the data according to the sequence number of the data packet that the data transmitting end carried in the retransmission request message has sent but not received by the data receiving end. A packet that is not received by the receiving end.
4、 一种数据发送端, 其特征在于, 包括: 4. A data transmitting end, comprising:
第一消息发送模块, 用于在根据定时器获知已达到预定探测时间, 如 果所述数据发送端中与数据接收端对应的发送队列已满, 或者所述数据发 送端没有发送所述发送队列中的任何数据包而发送队列不为空时, 向所述 数据接收端发送报文头中携带探测类型标识的探测消息;  a first message sending module, configured to: when the predetermined detection time has been reached according to the timer, if the sending queue corresponding to the data receiving end in the data sending end is full, or the data sending end does not send the sending queue And sending, to the data receiving end, a probe message carrying a probe type identifier in the packet header, if any of the data packets is not empty;
第一消息接收模块, 用于接收数据接收端返回的探测回复消息, 所述 探测回复消息的报文头中携带数据接收端按序接收的来自所述数据发送 端的最后一个数据包的序列号。  The first message receiving module is configured to receive a probe reply message returned by the data receiving end, where the packet header of the probe reply message carries a sequence number of the last data packet from the data sending end that is received by the data receiving end in sequence.
5、 根据权利要求 4所述的数据发送端, 其特征在于, 还包括: 发送窗口调整模块, 与所述第一消息接收模块连接, 用于根据从所述 第一消息接收模块所接收的探测回复消息中获取的所述数据接收端按序 接收的最后一个数据包的序列号移动发送窗口。  The data transmitting end according to claim 4, further comprising: a sending window adjusting module, connected to the first message receiving module, configured to detect according to the received from the first message receiving module The sequence number of the last data packet sequentially received by the data receiving end obtained in the reply message moves the sending window.
6、 根据权利要求 4所述的数据发送端, 其特征在于, 还包括: 第二消息接收模块, 用于接收数据接收端返回的的重传请求消息, 所 述重传请求消息中携带了数据发送端已发送而数据接收端未接收到的数 据包的序列号, 所述数据发送端已发送而数据接收端未接收到的数据包的 序列号为数据接收端在接收到所述探测消息后, 根据所述探测消息的报文 头中携带的数据发送端在发送所述探测消息之前最后向所述数据接收端 发送的数据包的序列号, 以及数据接收端已接收到的数据包信息获取得 到;  The data transmitting end according to claim 4, further comprising: a second message receiving module, configured to receive a retransmission request message returned by the data receiving end, where the retransmission request message carries data The serial number of the data packet that has been sent by the transmitting end but not received by the data receiving end, the serial number of the data packet that has been sent by the data sending end and not received by the data receiving end is that the data receiving end receives the detecting message after receiving the detecting message Obtaining, according to the sequence number of the data packet finally sent by the data sending end carried in the packet header of the probe message to the data receiving end before sending the probe message, and the data packet information received by the data receiving end Get
数据包重发送模块, 用于根据所述重传请求消息中携带的数据发送端 已发送而数据接收端未接收到的数据包的序列号重新向所述数据接收端 发送所述未接收到的数据包。  a data packet resending module, configured to resend the unreceived data to the data receiving end according to a sequence number of a data packet that is sent by the data sending end and not received by the data receiving end that is carried in the retransmission request message data pack.
7、 一种数据接收端, 其特征在于, 包括:  7. A data receiving end, comprising:
第三消息接收模块, 用于接收数据发送端发送的报文头中携带探测类 型标识的探测消息; 包序列号获取模块, 用于在所述第三消息接收模块接收到探测消息 后, 根据所述数据接收端已接收到的来自数据发送端的数据包信息获取按 序接收的来自所述数据发送端的最后一个数据包的序列号; a third message receiving module, configured to receive a probe message carrying a probe type identifier in a packet header sent by the data sending end; a packet sequence number obtaining module, configured to: after the third message receiving module receives the probe message, acquire, according to the data packet information received by the data receiving end, the data packet from the data transmitting end The serial number of the last packet;
第三消息发送模块, 与所述包序列号获取模块连接, 用于生成探测回 复消息并发送给数据发送端, 所述探测回复消息的报文头中携带所述数据 接收端按序接收的来自所述数据发送端的最后一个数据包的序列号。  a third message sending module, configured to be connected to the packet serial number acquiring module, configured to generate a probe reply message and send the message to the data sending end, where the packet header of the probe reply message carries the data receiving end sequentially received The serial number of the last packet of the data sender.
8、 根据权利要求 7所述的数据接收端, 其特征在于, 所述第三消息 接收模块接收到的探测消息的报文头中还携带有数据发送端在发送所述 探测消息之前最后向所述数据接收端发送的数据包的序列号, 所述数据接 收端还包括:  The data receiving end according to claim 7, wherein the packet header of the probe message received by the third message receiving module further carries a data transmitting end to send the last message before sending the probe message. The serial number of the data packet sent by the data receiving end, where the data receiving end further includes:
第四消息发送模块, 用于根据所述数据发送端在发送所述探测消息之 前最后向所述数据接收端发送的数据包的序列号, 以及已接收到的来自数 据发送端的数据包信息获取数据发送端已发送而数据接收端未接收到的 数据包的序列号, 生成重传请求消息并发送给数据发送端, 所述重传请求 消息中携带所述数据发送端已发送而数据接收端未接收到的数据包的序 列号。  a fourth message sending module, configured to acquire data according to a sequence number of the data packet finally sent by the data sending end to the data receiving end before sending the probe message, and the received data packet information from the data sending end The serial number of the data packet that has been sent by the sending end and not received by the data receiving end, generates a retransmission request message, and sends the retransmission request message to the data transmitting end, where the data retransmission request message carries the data transmitting end and the data receiving end does not. The serial number of the received packet.
9、 一种通信系统, 其特征在于, 包括权利要求 4-6中任一项所述的数 据发送端, 以及权利要求 7或 8所述的数据接收端。  A communication system, comprising the data transmitting end according to any one of claims 4-6, and the data receiving end according to claim 7 or 8.
PCT/CN2011/072673 2011-04-12 2011-04-12 Detection processing method, data transmitter, data receiver and communication system WO2011100911A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180000753.7A CN102217258B (en) 2011-04-12 2011-04-12 Detection processing method, data sending terminal, data receiver and communication system
PCT/CN2011/072673 WO2011100911A2 (en) 2011-04-12 2011-04-12 Detection processing method, data transmitter, data receiver and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/072673 WO2011100911A2 (en) 2011-04-12 2011-04-12 Detection processing method, data transmitter, data receiver and communication system

Publications (2)

Publication Number Publication Date
WO2011100911A2 true WO2011100911A2 (en) 2011-08-25
WO2011100911A3 WO2011100911A3 (en) 2012-03-15

Family

ID=44483381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/072673 WO2011100911A2 (en) 2011-04-12 2011-04-12 Detection processing method, data transmitter, data receiver and communication system

Country Status (2)

Country Link
CN (1) CN102217258B (en)
WO (1) WO2011100911A2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162706B (en) * 2014-05-28 2018-07-31 华为技术有限公司 Multicast transmission method, apparatus and system
CN104102605B (en) * 2014-06-25 2018-03-09 华为技术有限公司 A kind of data transmission method, device and system
CN105228181B (en) * 2015-10-21 2018-07-03 北京星网锐捷网络技术有限公司 A kind of method, AP and system based on AP optimization TCP connections
CN106856457B (en) * 2015-12-09 2019-09-20 华为技术有限公司 A kind of data transmission method, sending device and reception device
CN106789732B (en) * 2016-11-21 2019-08-06 华胜信泰信息产业发展有限公司 Method for routing foundation and system based on message queue
CN106452692A (en) * 2016-11-30 2017-02-22 网宿科技股份有限公司 Data transmission method and system
CN107491356A (en) * 2017-08-28 2017-12-19 广州市百果园信息技术有限公司 Message treatment method, terminal device and server based on sequence number
CN107733906B (en) * 2017-10-24 2020-04-17 北京全路通信信号研究设计院集团有限公司 RSSP-II communication method based on UDP communication
CN111355669B (en) 2018-12-20 2022-11-25 华为技术有限公司 Method, device and system for controlling network congestion
CN112398744A (en) * 2019-08-16 2021-02-23 阿里巴巴集团控股有限公司 Network communication method and device and electronic equipment
CN112448898A (en) * 2019-08-28 2021-03-05 无锡江南计算技术研究所 Message order-preserving method based on sequence number mechanism
CN114124841A (en) * 2021-11-19 2022-03-01 青岛信大云谷信息科技有限公司 Method for controlling high-speed forwarding data lightweight flow
CN115250288A (en) * 2022-07-18 2022-10-28 国仪量子(合肥)技术有限公司 Data communication method, lower computer, upper computer, data transmission system and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128681A1 (en) * 2001-12-29 2003-07-10 Dennis Rauschmayer Method and apparatus for implementing an automatic repeat request ("ARQ") function in a fixed wireless communication system
US20090150737A1 (en) * 2007-10-08 2009-06-11 Xiaoyi Wang Acknowledgment packet
CN101636957A (en) * 2007-03-16 2010-01-27 高通股份有限公司 Method and apparatus for polling in a wireless communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128681A1 (en) * 2001-12-29 2003-07-10 Dennis Rauschmayer Method and apparatus for implementing an automatic repeat request ("ARQ") function in a fixed wireless communication system
CN101636957A (en) * 2007-03-16 2010-01-27 高通股份有限公司 Method and apparatus for polling in a wireless communication system
US20090150737A1 (en) * 2007-10-08 2009-06-11 Xiaoyi Wang Acknowledgment packet

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG XUGUO ET AL.: 'Implementation and simulation for multi-reject ARQ protocol' COMPUTER APPLICATIONS vol. 26, no. 3, 31 March 2006, *

Also Published As

Publication number Publication date
CN102217258A (en) 2011-10-12
CN102217258B (en) 2015-08-19
WO2011100911A3 (en) 2012-03-15

Similar Documents

Publication Publication Date Title
WO2011100911A2 (en) Detection processing method, data transmitter, data receiver and communication system
US10237153B2 (en) Packet retransmission method and apparatus
RU2691240C1 (en) Packet transmission method and a subscriber device
US20150296418A1 (en) Methods and Apparatus for Handover Management of Transfer Control Protocol Proxy Communications
US8488523B2 (en) Method of transmitting and processing data block of specific protocol layer in wireless communication system
JP5351329B2 (en) Method and terminal for receiving one-to-many service in a wireless communication system
US9565699B2 (en) Method of performing polling procedure in a wireless communication system
JP2015065695A (en) Status information transmission method and receiving device for radio communication system
JP2021513770A (en) Methods and devices for determining transmission mode, storage media, and electronic devices
JP2013240061A (en) Device and method for adaptive tsp setting for minimizing overlapping packet transmission
WO2018130059A1 (en) Data packet transmission method and device
WO2020147453A1 (en) Data transmission method and related apparatus
CN102769520B (en) Wireless network congestion control method based on stream control transmission protocol (SCTP)
WO2017107148A1 (en) Method of transmitting data and network equipment
US9549371B2 (en) Access point proxy and multi-hop wireless communication
WO2022083371A1 (en) Data transmission method and device
EP3038312A1 (en) Data transmission method, user equipment and proxy equipment
WO2020010511A1 (en) Data transmission method and base station
US20150071273A1 (en) Efficient transfer of tcp traffic over wlan
CN113424578B (en) Acceleration method and device for transmission control protocol
WO2016058424A1 (en) Data transmission method, device and system, and storage medium
EP3424163A1 (en) Enhancement of relay arq in mmw network
US11546100B2 (en) Operation of automatic repeat request
WO2018072097A1 (en) Data transmission method and device
WO2023080821A1 (en) Delay tolerant data object transmission

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000753.7

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11744269

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11744269

Country of ref document: EP

Kind code of ref document: A2