Message transceiving method, network device, system, and storage medium
Patent Information
- Application Number
- CN202111375329.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-11-19
AI Technical Summary
发送端在发出报文之后会启动一个定时器,在定时器超时后,如果没有接收到接收端发出的ACK报文,则发送端会重发这一报文,发送端定时器通常为秒级定时器,丢包时会引入较大时延;
Smart Images

Figure CN116155826B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data communication network technology, and in particular to a message sending and receiving method, network device, system, and storage medium. Background Technology
[0002] TCP (Transmission Control Protocol) is the core protocol in modern network communication. Through its sending and acknowledgment mechanism, this protocol ensures that both parties in a communication can reliably receive messages sent by the other, thereby achieving reliable communication.
[0003] In the TCP-based message acknowledgment mechanism, the sender continuously sends messages without waiting for acknowledgment from the receiver. After receiving a message, the receiver sends an ACK (Acknowledge character) message to acknowledge receipt. The ACK message carries the sequence number of the received message plus 1, indicating that the messages before seq+1 have been received and the next expected message sequence number is seq+1.
[0004] TCP has two mechanisms for handling packet loss:
[0005] One method is a transmission monitoring mechanism. After sending a message, the sending end starts a timer. If no ACK message is received from the receiving end after the timer expires, the sending end will retransmit the message. The sending end timer is usually a second-level timer, which will introduce a large delay when packets are lost.
[0006] Another mechanism is the receiver's ACK-triggered fast retransmission mechanism. When packet loss occurs, the receiver is unaware of it. However, upon receiving subsequent packets, the receiver can determine that a packet was missed by using the packet's sequence number (seq). The acknowledgment number in the receiver's ACK will remain unchanged, still being the seq value of the missed packet. Upon receiving this packet, the sender starts a counter. If multiple ACK packets with the same seq are received, the sender will determine that the packet is lost and retransmit it.
[0007] In large-scale TCP communication, if an intermediate message is lost, the sender can quickly receive a certain number of ACK messages with the same sequence number because there are many subsequent messages. Therefore, the lost message can be retransmitted without the sender's timer expiring. Summary of the Invention
[0008] One objective of this disclosure is to improve the efficiency of message retransmission in case of message loss.
[0009] According to one aspect of some embodiments of this disclosure, a message forwarding method is proposed, comprising: a network device determining whether a received first message can be forwarded, wherein the destination device of the first message is not the current network device; if it is determined that the first message needs to be discarded, generating a packet loss digest message based on the first message, the packet loss digest message including a digest identifier, a port number of the first message, and a sending sequence number; and sending the packet loss digest to the destination device based on the address of the destination device of the first message, so that the destination device can send a retransmission response to the source device of the first message based on the packet loss digest message.
[0010] In some embodiments, the network device determines whether it can forward the received first message by: after receiving the first message that needs to be forwarded, the network device determines whether it can successfully forward the first message, wherein if the port associated with the forwarding path of the first message is congested or the remaining resources of the scheduling queue are less than a predetermined threshold, it is determined that the first message needs to be discarded.
[0011] In some embodiments, generating a packet loss summary message based on a first message includes: setting a field identifying the current message as a packet loss summary message as a summary identifier; extracting predetermined fields of the payload of the first message and writing them into predetermined fields of the packet loss summary message, wherein the predetermined fields include the port number and sequence number of the first message.
[0012] In some embodiments, generating a packet loss summary message based on the first message further includes: generating a payload summary based on the payload content of the first message using a 64-bit MD5 (MD5 Message-Digest Algorithm 5) algorithm; and writing the payload summary into the packet loss summary message.
[0013] According to one aspect of some embodiments of this disclosure, a message receiving method is proposed, comprising: after receiving a second message, a network device determines whether the second message includes a digest identifier, wherein the destination address of the second message is the network device's own address, the digest identifier is an identifier that identifies the second message as a lost packet digest message, and the discarded packet digest message is generated by an intermediate node device that discarded the message; if the second message includes a digest identifier, the network device obtains the port number and sequence number of a discarded message in the second message; the network device determines whether the discarded message is a message that has not yet been received in the communication being processed, based on the port number and sequence number of the discarded message; if the discarded message is a message that has not yet been received in the communication being processed by the target device, the network device sends a retransmission response to the source device of the discarded message.
[0014] In some embodiments, the message receiving method further includes: if the second message includes a digest identifier, determining whether the second message is based on the TCP protocol; if the second message is based on the TCP protocol, the network device performs the operation of obtaining the port number and sequence number of the discarded message in the second message; otherwise, the network device performs the operation of the protocol corresponding to the second message.
[0015] In some embodiments, the message receiving method further includes: if the discarded message is not a message of a communication being processed by the target device, or if the discarded message is a message that has already been received, then the network device discards the second message.
[0016] In some embodiments, the network device sending a retransmission response to the source device of the dropped packet includes: the network device sending a retransmission response to the source device of the dropped packet multiple times consecutively, the retransmission response including a sequence number.
[0017] According to one aspect of some embodiments of this disclosure, a message transmission method is proposed, including: any of the message forwarding methods described above; and any of the message receiving methods described above.
[0018] According to one aspect of some embodiments of this disclosure, a network device is provided, comprising: a first message receiving unit configured to receive a first message from another network device, wherein the target device of the first message is not the current network device; a forwarding determination unit configured to determine whether the first message can be forwarded; a packet loss summary generation unit configured to generate a packet loss summary message based on the first message if it is determined that the first message needs to be discarded, the packet loss summary message including a summary identifier, a port number of the first message, and a sending sequence number; and a sending unit configured to send the packet loss summary to the target device according to the address of the target device of the first message, so that the target device sends a retransmission response to the source device of the first message based on the packet loss summary message.
[0019] According to one aspect of some embodiments of this disclosure, a network device is provided, comprising: a second message receiving unit configured to receive a second message with the current address of the network device as the destination address, wherein the destination address of the second message is the address of the network device itself; a retransmission determination unit configured to: determine whether the second message includes a digest identifier, wherein the digest identifier is an identifier that identifies the second message as a lost packet digest message, and the discarded packet digest message is generated by an intermediate node device that discarded the message; if the second message includes a digest identifier, obtain the port number and sequence number of a discarded message in the second message; the target device determines whether the discarded message is a message that has not yet been received in the communication being processed based on the port number and sequence number of the discarded message; if the discarded message is a message that has not yet been received in the communication being processed by the target device, then trigger a retransmission response unit; and a retransmission response unit configured to send a retransmission response to the source device of the first message.
[0020] According to one aspect of some embodiments of this disclosure, a network device is proposed, including: a memory; and a processor coupled to the memory, the processor being configured to execute any of the message transmission methods described above based on instructions stored in the memory.
[0021] According to one aspect of some embodiments of this disclosure, a non-transitory computer-readable storage medium is proposed, having stored thereon computer program instructions that, when executed by a processor, implement the steps of any of the message transmission methods described above.
[0022] According to one aspect of some embodiments of this disclosure, a network system is proposed, comprising: a message sending device configured to send a first message to a target device via intermediate node devices; one or more intermediate node devices configured to perform any of the message forwarding methods described above; and a target device configured to perform any of the message receiving methods described above. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0024] Figure 1A This is a flowchart illustrating some embodiments of the message forwarding method disclosed herein.
[0025] Figure 1B This is a schematic diagram of the format of a lost packet digest message in some embodiments of the message forwarding method disclosed herein.
[0026] Figure 2 Flowcharts are shown for some other embodiments of the message receiving method of this disclosure.
[0027] Figure 3 This is a schematic diagram of signaling interaction for some embodiments of the message transmission method of this disclosure.
[0028] Figure 4 These are schematic diagrams illustrating some embodiments of the network devices disclosed herein.
[0029] Figure 5 These are schematic diagrams illustrating other embodiments of the network devices disclosed herein.
[0030] Figure 6 These are schematic diagrams of further embodiments of the network devices disclosed herein.
[0031] Figure 7 These are schematic diagrams illustrating further embodiments of the network devices disclosed herein.
[0032] Figure 8 This is a schematic diagram of some embodiments of the network system disclosed herein. Detailed Implementation
[0033] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments.
[0034] The inventors discovered that current TCP packet loss retransmission mechanisms suffer from processing delays, with timer-triggered retransmission delays reaching the second level. Furthermore, the ACK-triggered fast retransmission mechanism only shortens the time to detect intermediate packet loss when transmitting a large number of TCP communication packets; it is ineffective for small or single packet transmissions, making it unsuitable for control signaling transmission scenarios such as the Internet of Things (IoT) and the Industrial Internet. Additionally, the difficulty in determining the trigger interval for ACK packets leads to an uncontrollable time interval for the sender to detect packet loss, making it unsuitable for scenarios with high latency jitter accuracy requirements.
[0035] Flowcharts of some embodiments of the message forwarding method disclosed herein are shown in Figure 1.
[0036] In step 121, the network device receives a first message whose destination device is not the current network device. In some embodiments, after receiving the message, the network device may determine whether the destination address of the target message is its own address. If the destination address is not its own address, the network device determines itself as a forwarding node and identifies the message as the first message. In some embodiments, the first message is a message based on the TCP protocol.
[0037] In step 122, the network device determines whether it can forward the received first packet. If it cannot forward the first packet, it needs to discard the packet and proceed to step 123; if it can forward the packet, it proceeds to step 125.
[0038] In some embodiments, packet loss may occur when port congestion or insufficient scheduling space in the queue, at which point the network device determines that it cannot forward the first received packet.
[0039] In step 123, the network device generates a packet loss summary message based on the first packet to be discarded. In some embodiments, the packet loss summary message includes a summary identifier, the port number of the first packet, and the sequence number of the first packet. In some embodiments, the packet loss summary message may also include the acknowledgment number of the first packet.
[0040] In some embodiments, a network device acting as a forwarding node can intercept the payload of an IP packet, retain predetermined fields, such as the first 12 bytes (covering the port number, sequence number, and acknowledgment number of the TCP header), and use them as part of a packet loss summary message.
[0041] In some embodiments, a network device acting as a forwarding node can set the field identifying the current packet as a lost packet digest packet to a digest identifier, thereby making it easier for the receiving end to determine that the packet is a lost packet digest packet rather than a data packet from the source device.
[0042] In some embodiments, the network device acting as a forwarding node may also generate a payload digest based on the payload content of the first packet using a 64-bit MD5 algorithm, and write the payload digest into the packet loss digest packet.
[0043] In some embodiments, the format of the packet loss summary message can be as follows: Figure 1B As shown, the R field is the digest identifier, the source IP address is the IP address of the source device of the first packet, the destination IP address is the IP address of the destination device of the first packet, the source port is the port of the source device of the first packet, the destination port is the port of the destination device of the first packet, SEQ is the sequence number of the first packet, and ACK SEQ is the acknowledgment number of the first packet. The MD5 digest field of the 64-bit IP packet payload data carries the payload digest.
[0044] In step 124, the network device acting as a forwarding node sends a packet loss summary message to the target device of the first message according to the address of the target device of the first message. This allows the target device to determine that a data packet has been lost based on the packet loss summary message, and to determine information such as the sequence number of the lost data packet, so as to request a retransmission from the source device as soon as possible.
[0045] In step 125, the first message is forwarded to the next hop node normally according to the message forwarding process in the relevant technology.
[0046] In this way, when a message is dropped at a forwarding node, the forwarding node device that dropped the message can actively generate a lost message digest and send it to the target device. This allows the target device to know that the message has been lost in a timely manner based on the message digest, improving the timeliness of message retransmission. While reducing processing latency, it also reduces the requirements for the usage scenario and the number of messages, and improves the reliability and stability of message transmission.
[0047] Flowcharts of other embodiments of the message receiving method disclosed herein are as follows: Figure 2 As shown.
[0048] In step 231, the network device receives a second message whose destination address is its own address. In some embodiments, after receiving the message, the network device may determine whether the destination address of the message is its own address. If the destination address of the message is its own address, then the message is determined to be the second message, and step 232 is executed.
[0049] In step 232, the network device, acting as the target device, determines whether the second message includes a digest identifier. In some embodiments, the digest identifier may be a predetermined value at the identifier bit R.
[0050] If it is determined that the second message does not include a digest identifier, then proceed to step 237.
[0051] In some embodiments, if it is determined that the second message includes a digest identifier, that is, if it is determined that the second message is a packet loss digest message generated by the forwarding node, step 234 is executed.
[0052] In some embodiments, if it is determined that the second message includes a digest identifier, step 233 can be further performed to improve the accuracy of identifying lost packet digest messages, avoid system confusion caused by conflicts with other fields corresponding to the digest identifier under the protocol, and improve reliability.
[0053] In step 233, it is determined whether the second message is based on the TCP protocol. If the second message is based on the TCP protocol, it is determined that the second message is a packet loss summary message generated by the forwarding node, and step 234 is executed; otherwise, step 238 is executed.
[0054] In step 234, the network device, acting as the target device, obtains the port number and sequence number of the second message in the second message. In some embodiments, it may also read the payload digest.
[0055] In step 235, the network device, acting as the target device, further determines whether the discarded first message corresponding to the second message belongs to a currently processed communication and is a message that has not yet been received. If the discarded first message belongs to a currently processed communication and is a message that has not yet been received in the currently processed communication, then step 236 is executed; otherwise, if the discarded first message does not belong to a currently processed communication, or if the discarded first message has been received by the network device through other channels or through retransmission or other operations, then step 239 is executed.
[0056] In some embodiments, the network device can determine whether the discarded first message corresponding to the second message belongs to the communication being processed and is a message that has not yet been received, based on the port number and the sequence number.
[0057] In step 236, the network device acting as the target device sends a retransmission response to the source device of the dropped first packet. In some embodiments, the retransmission response may be sent multiple times consecutively to ensure that the source device receives it as soon as possible. In some embodiments, the network device acting as the target device may generate a retransmission response based on the sequence number carried in the second packet, so that the source device can determine the sequence number of the lost packet; in some embodiments, the retransmission response may also include a payload digest for verification purposes, thereby improving the accuracy of retransmission.
[0058] In step 237, the network device, acting as the target device, performs normal message receiving and processing procedures, such as message parsing, text reading, and concatenation.
[0059] In step 238, the processing under the corresponding protocol is performed.
[0060] In step 239, the second message is discarded without further processing.
[0061] In this way, when a packet loss occurs, the network device that is the target device of the packet can quickly detect the packet loss event, and then determine the source device port and packet sequence number corresponding to the lost packet. This shortens the time to detect intermediate packet loss, improves the efficiency of retransmission requests, and also improves the reliability and stability of packet transmission.
[0062] Signaling interaction diagrams of some embodiments of the message transmission method disclosed herein are as follows: Figure 3 As shown.
[0063] In 301 to 302, the source device 31 and the target device 33 communicate based on the TCP protocol, through one or more intermediate network devices 32. The message is sent from the source device to the target device, and the target device responds with a TCP ACK message.
[0064] In 303, the source device sends another data packet (referred to herein as the first packet), which arrives at the intermediate network device.
[0065] In error 304, congestion or other issues occur in intermediate network devices, requiring the first packet to be discarded. In this case, the intermediate network packets generate a packet loss summary packet based on the method shown in the embodiment of Figure 1.
[0066] In 305, the intermediate network device sends a packet loss summary message to the target device.
[0067] In 306, after receiving a message (referred to herein as the second message), the target device determines whether the message is a packet loss digest message. In some embodiments, the target device can, according to, such as Figure 2 The illustrated embodiment determines whether to send a retransmission response.
[0068] In 307, when the target device determines that it needs to send a retransmission response, it generates a retransmission ACK request and sends it to the source device 31 of the dropped packet so that it can be retransmitted in a timely manner.
[0069] Based on the methods described in the above embodiments, a fast retransmission function is achieved in TCP short communication scenarios through methods such as packet loss digest and receiver discrimination, while also reducing latency jitter caused by TCP packet loss fast retransmission. It can be applied to scenarios with low latency or high latency stability requirements. Furthermore, this invention is compatible with existing TCP fast retransmission algorithms; devices that do not support this method can ignore it without affecting the original processing procedure.
[0070] Schematic diagrams of some embodiments of the network device 42 disclosed herein are shown below. Figure 4 As shown.
[0071] The first message receiving unit 421 can receive first messages from other network devices whose target device is not the current network device. In some embodiments, after receiving a message, the first message receiving unit 421 can determine whether the target address of the target message is its own address. If the target address is not its own address, the current network device is determined to be a forwarding node, and the received message is determined to be the first message. In some embodiments, the first message is a message based on the TCP protocol.
[0072] The forwarding determination unit 422 can determine whether the received first packet can be forwarded. If the first packet cannot be forwarded, it needs to be discarded, triggering the packet loss summary generation unit 423. In some embodiments, packet loss may occur when port congestion or insufficient scheduling space in the queue, in which case the network device determines that the received first packet cannot be forwarded.
[0073] The packet loss summary generation unit 423 can generate a packet loss summary message based on the first message to be discarded. In some embodiments, the packet loss summary message includes a summary identifier, the port number of the first message, and the sequence number of transmission. In some embodiments, the packet loss summary message may also include the acknowledgment number of the first message.
[0074] The sending unit 424 can send a packet loss summary message to the target device of the first message according to the address of the target device of the first message, so that the target device can determine that there is a data packet loss based on the packet loss summary message, and can determine the sequence number and other information of the lost data packet, so as to request a retransmission from the source device as soon as possible.
[0075] Such network devices can proactively generate a lost message and send it to the target device when a packet to be forwarded needs to be discarded. This allows the target device to promptly know that a packet has been lost based on the message, improving the timeliness of packet retransmission. While reducing processing latency, it also reduces the requirements for usage scenarios and the number of packets, thereby improving the reliability and stability of packet transmission.
[0076] Schematic diagrams of other embodiments of the network device 53 disclosed herein are shown below. Figure 5 As shown.
[0077] The second message receiving unit 531 can receive a second message with its own address as the destination address. In some embodiments, after receiving a message, the second message receiving unit 531 can determine whether the destination address of the message is its own address. If the destination address of the message is its own address, then the message is determined to be a second message, and the retransmission determination unit 532 is triggered.
[0078] The retransmission determination unit 532 can determine whether the second message includes a digest identifier. In some embodiments, the digest identifier can be a predetermined value at the identifier bit R. If it is determined that the second message includes a digest identifier, the port number and sequence number of the second message in the second message are obtained to determine whether the discarded first message corresponding to the second message belongs to the communication being processed and is a message that has not yet been received. In some embodiments, after determining that the second message includes a digest identifier, it can also be determined whether the second message is based on the TCP protocol. If the second message is based on the TCP protocol, it is determined that the second message is a packet loss digest message generated by the forwarding node, and it is further determined whether the discarded first message corresponding to the second message belongs to the communication being processed and is a message that has not yet been received. If the discarded first message belongs to the communication being processed and is a message that has not yet been received in the communication being processed, the retransmission response unit 533 is triggered. In some embodiments, if the discarded message is not a message of the communication being processed by the target device, or if the discarded message is a message that has already been received, the retransmission determination unit 532 discards the second message and does not perform any further processing.
[0079] The retransmission response unit 533 can send a retransmission response to the source device of the discarded first packet. In some embodiments, the retransmission response can be sent multiple times consecutively to ensure that the source device receives it as soon as possible. In some embodiments, the network device, as the target device, can generate a retransmission response based on the sequence number carried in the second packet so that the source device can determine the sequence number of the lost packet; in some embodiments, the retransmission response may also include a payload digest for verification purposes, thereby improving the accuracy of retransmission.
[0080] Such network devices can quickly detect packet loss events caused by forwarding nodes, and then determine the source device port and sequence number of the lost packets, thereby shortening the time to detect intermediate packet loss, improving the efficiency of retransmission requests, and also improving the reliability and stability of packet transmission.
[0081] In some embodiments, the retransmission determination unit 532 can also trigger the network device to perform normal data packet reception operations if the second message does not include a digest identifier. In some embodiments, the retransmission determination unit 532 can trigger the network device to perform processing under the corresponding protocol based on the protocol used by the second message if it is determined that the second message is not based on the TCP protocol. Such a network device can avoid affecting other network communication processes and improve compatibility with related networks.
[0082] A schematic diagram of the structure of an embodiment of the network device disclosed herein is shown below. Figure 6 As shown, the network device includes a memory 601 and a processor 602. The memory 601 can be a disk, flash memory, or any other non-volatile storage medium. The memory stores instructions from the corresponding embodiments of the message forwarding method, message receiving method, or message transmission method described above. The processor 602 is coupled to the memory 601 and can be implemented as one or more integrated circuits, such as a microprocessor or microcontroller. The processor 602 executes the instructions stored in the memory, improving the timeliness, reliability, and stability of message retransmission.
[0083] In one embodiment, it can also be as follows: Figure 7 As shown, the network device 700 includes a memory 701 and a processor 702. The processor 702 is coupled to the memory 701 via a BUS bus 703. The network device 700 can also be connected to an external storage device 705 via a storage interface 704 to access external data, and can also be connected to a network or another computer system (not shown) via a network interface 706. Further details are omitted here.
[0084] In this embodiment, by storing data instructions in a memory and then processing the instructions by a processor, the timeliness, reliability, and stability of message retransmission can be improved.
[0085] In another embodiment, a computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the steps of the methods in the corresponding embodiments of the message forwarding method, message receiving method, or message transmission method. Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, apparatus, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] Schematic diagrams of some embodiments of the network system 80 disclosed herein are shown below. Figure 8 As shown.
[0087] The message sending device 810 can send a first message to the target device 830 via the intermediate node device 820. When a retransmission response is received from the target device 830, the message sending device 810 can retransmit the message with the corresponding sequence number according to the retransmission response.
[0088] One or more intermediate node devices 820, the number of which is determined by the path planning result between the message sending device 810 and the target device 830. Each intermediate node device can be one of the devices mentioned above. Figure 4 The network device in the illustrated embodiment, or as shown in the figure Figure 6 , 7 The network device shown can execute any of the packet forwarding methods described above.
[0089] The target device 830 can be one of the devices mentioned above, such as... Figure 5 The network device in the illustrated embodiment, or as shown in the figure Figure 6 , 7 The network device shown that executes any of the message receiving methods described above is capable of executing any of the message receiving methods described above.
[0090] In such a network system, when a packet is dropped at a forwarding node, the forwarding node device that dropped the packet can actively generate a lost message digest and send it to the target device. This allows the target device to promptly know that the packet has been lost, improving the timeliness of packet retransmission. While reducing processing latency, it also reduces the requirements for usage scenarios and the number of packets, thereby improving the reliability and stability of packet transmission.
[0091] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0092] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0093] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0094] This concludes the detailed description of the present disclosure. To avoid obscuring the concept of the disclosure, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions disclosed herein based on the above description.
[0095] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit them; although this disclosure has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of this disclosure or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of this disclosure, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in this disclosure.
Claims
1. A message forwarding method, comprising: The network device determines whether it can forward the received first message, wherein the target device of the first message is not the current network device, and the first message is a message based on the TCP protocol; If it is determined that the first packet needs to be discarded, a packet loss summary message is generated based on the first packet, including: extracting predetermined fields of the payload of the first packet and writing them into predetermined fields of the packet loss summary message, wherein the predetermined fields include the port number and the sequence number of the first packet; generating a payload summary based on the payload content of the first packet using a 64-bit message digest MD5 algorithm; and writing the payload summary into the packet loss summary message, wherein the packet loss summary message includes a summary identifier, the port number and the sequence number of the first packet; The packet loss digest message is sent to the target device according to the address of the target device of the first message, so that the target device can send a retransmission response to the source device of the first message according to the packet loss digest message, and the retransmission response includes the payload digest.
2. The method according to claim 1, wherein, The network device determines whether it can forward the received first message by including: After receiving the first message that needs to be forwarded, the network device determines whether it can successfully forward the first message. Specifically, if the port associated with the forwarding path of the first packet is congested or the remaining resources in the scheduling queue are less than a predetermined threshold, it is determined that the first packet needs to be discarded.
3. The method according to claim 1, wherein, The step of generating a packet loss digest message based on the first message further includes: Set the field that identifies the current message as a packet loss summary message to the summary identifier.
4. A message receiving method, comprising: After receiving the second message, the network device determines whether the second message includes a digest identifier. The destination address of the second message is the network device's own address. The digest identifier identifies the second message as a packet loss digest message. The packet loss digest message is generated by an intermediate node device that discards the message. The intermediate node extracts predetermined fields from the payload of the first message and writes them into predetermined fields of the packet loss digest message. Based on the payload content of the first message, a payload digest is generated using a 64-bit MD5 algorithm, and the payload digest is written into the packet loss digest message. The predetermined fields include the port number and sequence number of the first message. The packet loss digest message includes a digest identifier, the port number and sequence number of the first message, and the first message is a message based on the TCP protocol. If the second message includes the digest identifier, the network device obtains the port number and the sequence number of the discarded message carried in the second message; The network device determines whether the discarded message is a message that has not yet been received in the current communication based on the port number of the discarded message and the sending sequence number. If the discarded message is a message that has not yet been received in the communication being processed by the network device, the network device sends a retransmission response to the source device of the discarded message, the retransmission response including the payload digest.
5. The method according to claim 4, further comprising: If the second message includes the digest identifier, determine whether the second message is based on the TCP protocol; If the second message is based on the TCP protocol, the network device performs the operation of obtaining the port number and the sequence number of the discarded message in the second message; Otherwise, the network device performs the operation of the protocol corresponding to the second message.
6. The method according to claim 4, further comprising: If the discarded message is not a message of a communication being processed by the network device, or if the discarded message is a message that has already been received, then the network device discards the second message.
7. The method according to claim 4, wherein, The network device sending a retransmission response to the source device of the dropped packet includes: The network device sends a retransmission response to the source device of the dropped packet multiple times in succession, and the retransmission response includes the sending sequence number.
8. A message transmission method, comprising: The message forwarding method according to any one of claims 1 to 3; and The message receiving method according to any one of claims 4 to 7.
9. A network device, comprising: The first message receiving unit is configured to receive a first message from another network device, the target device of which is not the current network device, and the first message is a message based on the TCP protocol; The forwarding determination unit is configured to determine whether the first message can be forwarded; The packet loss summary generation unit is configured to generate a packet loss summary message based on the first packet when it is determined that the first packet needs to be discarded. This includes: extracting predetermined fields from the payload of the first packet and writing them into predetermined fields of the packet loss summary message, wherein the predetermined fields include the port number and sequence number of the first packet; generating a payload summary based on the payload content of the first packet using a 64-bit MD5 algorithm; and writing the payload summary into the packet loss summary message, wherein the packet loss summary message includes a summary identifier, the port number of the first packet, and the sequence number of the first packet. The sending unit is configured to send the packet loss summary message to the target device according to the address of the target device of the first message, so that the target device can send a retransmission response to the source device of the first message according to the packet loss summary message, the retransmission response including the payload summary.
10. A network device, comprising: The second message receiving unit is configured to receive a second message whose destination address is the address of the current network device. The retransmission judgment unit is configured as follows: Determine whether the second message includes a digest identifier, wherein the digest identifier is an identifier that identifies the second message as a packet loss digest message, the packet loss digest message is generated by the intermediate node device that discards the message, the intermediate node extracts predetermined fields of the payload of the first message and writes them into predetermined fields of the packet loss digest message, generates a payload digest based on the 64-bit message digest MD5 algorithm according to the payload content of the first message, and writes the payload digest into the packet loss digest message, wherein the predetermined fields include the port number and the sequence number of the first message, the packet loss digest message includes a digest identifier, the port number and the sequence number of the first message, and the first message is a message based on the TCP protocol; If the second message includes the digest identifier, obtain the port number and the sequence number of the discarded message carried in the second message; Based on the port number and the sequence number of the discarded message, determine whether the discarded message is a message that has not yet been received in the current communication being processed; If the discarded message is a message that has not yet been received in the communication being processed by the network device, then a retransmission response unit is triggered; The retransmission response unit is configured to send a retransmission response to the source device of the discarded message, the retransmission response including the payload digest.
11. A network device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to perform the method as described in any one of claims 1 to 8 based on instructions stored in the memory.
12. A non-transitory computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.
13. A network system, comprising: The message sending device is configured to send the first message to the target device via an intermediate node device; One or more intermediate node devices are configured to perform the method according to any one of claims 1 to 3; and The target device is configured to perform the method described in any one of claims 4 to 7.
Citation Information
Patent Citations
Send another method
JP3848222B2
Discarded packet indicator
US20070140151A1