[go: up one dir, main page]

WO2026001943A1 - Data packet deduplication method, apparatus, device, storage medium and program product - Google Patents

Data packet deduplication method, apparatus, device, storage medium and program product

Info

Publication number
WO2026001943A1
WO2026001943A1 PCT/CN2025/102985 CN2025102985W WO2026001943A1 WO 2026001943 A1 WO2026001943 A1 WO 2026001943A1 CN 2025102985 W CN2025102985 W CN 2025102985W WO 2026001943 A1 WO2026001943 A1 WO 2026001943A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
deduplication
target
message
receiving device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2025/102985
Other languages
French (fr)
Chinese (zh)
Inventor
郑秀丽
虞子豪
任首首
王帅
徐安民
李映辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2026001943A1 publication Critical patent/WO2026001943A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Definitions

  • This application relates to the field of network technology, and in particular to a method, apparatus, device, storage medium, and program product for deduplicating data packets.
  • the data link layer supports sending and receiving data packets and link layer control packets, with a fixed minimum transmission unit (Flit) of 20 bytes.
  • Flit a fixed minimum transmission unit
  • the first forwarding device sends a data packet to the receiving device, it forwards a Flit of the packet from the corresponding port and backs up the sent Flit to its local retransmission buffer (also known as a Retry-Buff).
  • the second forwarding device Upon receiving this Flit, the second forwarding device performs a cyclic redundancy check (CRC) or decodes it.
  • CRC cyclic redundancy check
  • the first forwarding device If the CRC check is correct, or the forward error correction (FEC) decoding is successful, it returns an acknowledgment (ACK) message to the first forwarding device, notifying it to release the retransmission buffer and continue forwarding the Flit to the receiving device.
  • ACK acknowledgment
  • the first forwarding device receives an acknowledgment message, it will delete the Flit from the retransmission buffer.
  • the second forwarding device fails, or if the communication path between the first and second forwarding devices fails, the first forwarding device may not be able to receive the ACK message from the second forwarding device. In this case, the first forwarding device will determine an alternative communication path through the fast reroute (FRR) mechanism and retransmit the Flits in the retransmission buffer to the receiving device along the alternative communication path.
  • the receiving device may receive duplicate data packets.
  • This application provides a data packet deduplication method, apparatus, device, storage medium, and program product, enabling a receiving device to deduplicatize data packets carrying retransmission identifiers after receiving them. This not only ensures that the receiving device can process network-forwarded data packets exactly once, but also achieves lightweight deduplication of data packets by the receiving device.
  • the technical solution is as follows:
  • a data packet deduplication method comprising:
  • the receiving device receives a first data packet; if the first data packet carries a retransmission flag, the receiving device performs deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device, and the deduplication matching table stores information about the data packets that the receiving device has received.
  • the deduplication matching table is updated based on the information in the first data packet; that is, the information of the first data packet is recorded in the deduplication matching table.
  • the deduplication matching table it maintains and manages can store only the information of the data packets received within a specified time period, or it can continuously store the information of all the data packets received. This application does not limit the time range of the information of the received data packets stored in the deduplication matching table, nor does it limit the amount of information in the deduplication matching table.
  • a receiving device when a receiving device receives a data packet, if the packet carries a retransmission flag, it indicates that the packet is a retransmitted packet from the network. Since the receiving device may have already received the same retransmitted packet, it needs to perform deduplication on the packet. This ensures that there are no duplicate data packets in the receiving device's memory, allowing it to process network-forwarded data packets exactly once.
  • the receiving device in this application can directly predict whether a packet is a duplicate packet based on whether the packet carries a retransmission flag during the packet reception process.
  • PSN packet sequence number
  • the receiving device in this application can directly predict whether a packet is a duplicate packet based on whether the packet carries a retransmission flag during the packet reception process.
  • it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate packet. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.
  • the step of deduplicating the first data packet according to the deduplication matching table includes: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, then discarding the first data packet; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, then retaining the first data packet.
  • the first data packet carries a retransmission flag, it is necessary to further confirm whether the receiving device has received the first data packet based on the deduplication matching table, so as to determine whether the first data packet is a duplicate data packet based on the deduplication matching table.
  • retaining the first data packet includes: storing the first data packet and recording the information of the first data packet in the deduplication matching table to update the deduplication matching table.
  • the deduplication matching table needs to be updated based on the first data packet to avoid receiving the first data packet repeatedly in the subsequent data packet reception process.
  • the method further includes: receiving a first message carrying information about forwarded data packets, wherein the forwarded data packets are data packets forwarded by the target forwarding device to the receiving device within a target fault detection period, the first message being used to indicate that a fault is detected in the target communication path within the target fault detection period, and the target communication path being the communication path between the sending device and the receiving device; and updating the deduplication matching table based on the information about the forwarded data packets.
  • the target forwarding device stores information about all data packets forwarded during the fault detection period and can detect and identify faults in the communication path of the transmitted data packets during the forwarding process. Therefore, if a fault is detected in the target communication path during the target fault detection period, a first message can be constructed and sent to the receiving device to indicate that the receiving device will receive retransmitted data packets in the subsequent data packets, requiring deduplication.
  • the first message carries information about the data packets that have been forwarded within the target fault detection period when a fault is detected in the target communication path. This allows the receiving device to update the deduplication matching table based on the information of the forwarded data packets, and then use the updated deduplication matching table to determine whether there are duplicate data packets that have been retransmitted within the target fault detection period in the subsequently received data packets.
  • the first message includes a first field carrying a message type, the message type indicating that the first message is a deduplication trigger message, the deduplication trigger message being used to instruct the receiving device to perform deduplication processing on data packets received after the first message.
  • the first message can be a deduplication trigger message.
  • the receiving device receives the first message, it can not only parse the information of the forwarded data packets from the first message, but also perform deduplication processing on the data packets received after the first message based on the message type of the first message.
  • the first message as a deduplication trigger message, can instruct the receiving device to start the deduplication process.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; if the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment being a path segment between the first forwarding device and the second forwarding device.
  • a fault in the target communication path includes a fault in the link corresponding to a certain path segment, or a fault in a forwarding device on the target communication path.
  • both forwarding devices connected to that link can detect the link fault, and both of these forwarding devices can construct and send the first message.
  • a forwarding device on the target communication path is faulty, other forwarding devices connected to that forwarding device can detect the device fault, and one or more of these other forwarding devices can construct and send the first message.
  • the information of the forwarded data packet includes the identification information of the forwarded data packet, which includes the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.
  • this application uses only the transaction layer segment number or packet sequence number of the data packet to uniquely identify a data packet. In practical applications, other information can also be used to identify and distinguish data packets in order to better distinguish them. This application does not limit the specific content of the identification information of the data packet.
  • the deduplication trigger message includes a first field, which carries identification information of the forwarded data packet.
  • the information of the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • the deduplication trigger message includes a first field and a second field, wherein the first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • the first data packet can carry both a retransmission flag and an end-of-retransmission flag to indicate that it is the last retransmitted data packet and the last data packet that needs to be deduplicated.
  • the receiving device based on the end-of-retransmission flag carried in the first data packet, after deduplicating the first data packet, no further deduplication processing is performed on subsequent received data packets.
  • the end retransmission flag can be used to instruct the receiving device to end the deduplication operation.
  • a data packet deduplication method applied to a target forwarding device, the method comprising:
  • a first data packet is sent to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on data packets that the receiving device has received.
  • a data packet is a retransmitted packet from a forwarding device, it will carry a retransmission flag.
  • a forwarding device in the network forwards data packets to the receiving device, it marks the few retransmitted packets to carry a retransmission flag.
  • the forwarding device in this application can tag a small number of retransmitted packets. This allows the receiving device to directly predict whether a packet is a retransmitted packet based on whether it carries a retransmission flag. Consequently, only a small number of packets with retransmission flags need to be deduplicated using a deduplication matching table. This eliminates the need to perform a deduplication check on every single packet, significantly reducing the resource consumption of the receiving device and enabling lightweight deduplication of packets.
  • the method further includes:
  • a first message is sent to the receiving device to instruct the receiving device to update the deduplication matching table based on the information of the forwarded data packets carried in the first message; wherein, the forwarded data packets are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period, and the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period, and the target communication path is the communication path between the sending device and the receiving device.
  • the target forwarding device stores information about all data packets forwarded during the fault detection period and can detect and identify faults in the communication path of the transmitted data packets during the forwarding process. Therefore, if a fault is detected in the target communication path during the target fault detection period, a first message can be constructed and sent to the receiving device to indicate that the receiving device will receive retransmitted data packets in the subsequent data packets, requiring deduplication.
  • the first message includes a first field carrying a message type, the message type indicating that the first message is a deduplication trigger message, the deduplication trigger message being used to instruct the receiving device to perform deduplication processing on data packets received after the first message.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; if the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment being a path segment between the first forwarding device and the second forwarding device.
  • the information of the forwarded data packet includes the identification information of the forwarded data packet, which includes the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.
  • the information of the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • a data packet deduplication device which has the function of implementing the data packet deduplication method described in the first aspect.
  • the data packet deduplication device includes at least one module, which is used to implement the steps of the data packet deduplication method provided in the first aspect.
  • a data packet deduplication device which has the function of implementing the data packet deduplication method described in the second aspect above.
  • the data packet deduplication device includes at least one module, which is used to implement the steps of the data packet deduplication method provided in the second aspect above.
  • a computer device comprising a processor and a memory, the memory being used to store a computer program for executing the data packet deduplication method provided in the first aspect, or a computer program for executing the data packet deduplication method provided in the second aspect.
  • the processor is configured to execute the computer program stored in the memory to implement the data packet deduplication method described in the first aspect, or to implement the data packet deduplication method described in the second aspect.
  • the computer device may further include a communication bus for establishing a connection between the processor and the memory.
  • a computer-readable storage medium wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.
  • a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.
  • a computer program that, when run on a computer, causes the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.
  • Figure 1 is a schematic diagram of a link layer data packet sending and receiving process provided in an embodiment of this application;
  • Figure 2 is a schematic diagram of data packet forwarding in the case of link failure in the first network topology provided in the embodiment of this application;
  • Figure 3 is a schematic diagram of data packet forwarding in the case of link failure in the second network topology provided in the embodiments of this application;
  • Figure 4 is a schematic diagram of the hierarchy of a UB-G protocol stack provided in an embodiment of this application.
  • Figure 5 is a schematic diagram of a process for detecting duplicate packets using packet serial numbers in a related technology provided in an embodiment of this application;
  • Figure 6 is a schematic diagram of the hierarchy of a UB-C protocol stack provided in an embodiment of this application.
  • Figure 7 is a schematic diagram of a data center architecture provided in an embodiment of this application.
  • Figure 8 is a schematic diagram of an application scenario of a data packet deduplication method provided in an embodiment of this application.
  • Figure 9 is a schematic diagram of the structure of a network device provided in an embodiment of this application.
  • Figure 10 is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
  • FIG 11 is a flowchart of a data packet deduplication method provided in an embodiment of this application.
  • Figure 12 is a schematic diagram of retransmitting data packets via an alternative path according to an embodiment of this application.
  • Figure 13 is a schematic diagram of the format of a first message provided in an embodiment of this application.
  • Figure 14 is a schematic diagram of the sending path of a first message based on a first network topology provided in an embodiment of this application;
  • Figure 15 is a schematic diagram of another first message transmission path based on a first network topology provided in an embodiment of this application;
  • Figure 16 is a schematic diagram of the sending path of a first message based on a second network topology provided in an embodiment of this application;
  • Figure 17 is a schematic diagram of another first message transmission path based on a second network topology provided in an embodiment of this application.
  • Figure 18 is a schematic diagram of another format of the first message provided in an embodiment of this application.
  • Figure 19 is a schematic diagram of another format of the first message provided in an embodiment of this application.
  • Figure 20 is a schematic diagram of a data packet header structure provided in an embodiment of this application.
  • Figure 21 is a logical schematic diagram of a receiving device processing data packets according to an embodiment of this application.
  • Figure 22 is a schematic diagram of the internal data packet processing flow of a switch according to an embodiment of this application.
  • Figure 23 is a schematic diagram of the interval release logic of a retransmission buffer provided in an embodiment of this application.
  • Figure 24 is a schematic diagram of the process of a receiving device responding to a deduplication trigger message according to an embodiment of this application;
  • Figure 25 is a schematic diagram of the process of deduplication of data packets by a receiving device according to an embodiment of this application.
  • Figure 26 is a schematic diagram of a data packet deduplication device provided in an embodiment of this application.
  • Figure 27 is a schematic diagram of another data packet deduplication device provided in an embodiment of this application.
  • the data link layer supports sending and receiving service messages and link layer control messages.
  • the smallest unit of data link layer transmission is a Flit, with a fixed size of 20 bytes.
  • the first forwarding device forwards a Flit of a data packet from a certain port, it backs up the sent Flit to its local retransmission buffer (also known as a Retry-Buff).
  • the second forwarding device Upon receiving this Flit, the second forwarding device in the next hop of the network performs a Cyclic Redundancy Check (CRC) check or decodes it.
  • CRC Cyclic Redundancy Check
  • the first forwarding device deletes the Flit backup from the retransmission buffer to free up space resources in the retransmission buffer.
  • CRC checksum is a commonly used error detection method used to check whether errors occurred during data transmission. If the CRC checksum is correct, it means that no errors occurred during Flit transmission. FEC decoding is a more advanced error correction method; it can not only detect errors but also correct them in some cases. If FEC decoding is successful, it means that even if Flit had errors, they were successfully corrected.
  • the first forwarding device and the second forwarding device can be a switch, a router, or other network devices capable of forwarding data packets, such as a switching module on a computing chip. This application does not limit this.
  • the ACK message can be carried in the header of the link layer packet, such as the ACK field of the link layer packet header (LPH) or the link layer block header (LBH); or, the ACK message can also be sent through a special Flit, such as through a CRD (credit, a flow control mechanism) message, to inform the first forwarding device that the data packet Flit has been successfully received.
  • a CRD credit, a flow control mechanism
  • the LPH Link Layer Header
  • the LPH helps network devices identify and process data packets.
  • the LBH Block Header
  • the LBH also contains information about the block, possibly including its length, type, and checksum.
  • CRD Flow Control Token
  • CRD Flow Control Token
  • a CRD is a counter or token system used to prevent the sender from sending too much data and causing the receiver's buffer to overflow. Therefore, when the receiver has enough buffer space to receive new data, it sends a CRD message to the sender, informing the sender how much more data it can continue sending.
  • the second forwarding device During data link layer packet transmission, if the second forwarding device encounters a CRC check error or FEC decoding failure after receiving the data packet Flit, it will request the first forwarding device to retransmit the Flit. In response to this retransmission request, the first forwarding device will resend the backup data packet Flit from its retransmission buffer to the second forwarding device.
  • the second forwarding device will return an ACK message to the first forwarding device to notify the first forwarding device to release the retransmission buffer and continue to forward the Flit to the receiving device.
  • FEC forward error correction coding
  • bus protocols are mostly used within the chassis, such as the Peripheral Component Interconnect Express (PCI-E).
  • PCI-E Peripheral Component Interconnect Express
  • devices are connected via cables, ensuring very high communication reliability.
  • optical modules are needed to achieve cross-rack connections.
  • the native reliability of optical ports is more than an order of magnitude lower than that of cables. Therefore, if a large number of optical ports are used in a network system, intermittent signal interruptions (i.e., optical signal outages) may occur.
  • the probability of a port status change e.g., port up and down, possibly due to network failures, server restarts, etc.
  • the probability of an optical module experiencing an intermittent interruption is 2.1%, typically caused by fiber optic cable breaks, optical module malfunctions, dust contamination, etc.
  • node 8 in the first network topology (2D Torus network architecture), node 8 is communicating with node 7 via the primary path. After a link failure occurs between node 9 and node 10, node 10 sends all the collected data packets to node 7. After detecting the link failure, node 9 determines an alternative path through fast reroute (FRR) and retransmits the data packets in the retransmission buffer to node 7 along the alternative path.
  • FRR fast reroute
  • the primary communication path can be node 8-node 9-node 10-node 11-node 7
  • the backup communication path can be node 8-node 9-node 5-node 6-node 7.
  • Node 9 when Node 9 retransmits data packets in the retransmission buffer, these packets may include data packets that could not receive the ACK message from Node 10 due to link failure. In other words, these data packets have already been sent to Node 7 by Node 10. At this time, Node 7 may receive duplicate data packets. These duplicate data packets may compromise data consistency, atomicity, concurrency control, and cause resource waste, affecting the correctness of write and atomic operations. It cannot be guaranteed that Node 7 can process network-forwarded data packets exactly once.
  • node A in the processor unit is communicating with node H via the main path.
  • node Spine 1 After a link failure occurs between node Leaf 1 in the access layer and node Spine 1 in the core layer, node Spine 1 sends all the collected data packets to node H.
  • node Leaf 1 After detecting the link failure, node Leaf 1 determines an alternative path through FRR and retransmits the data packets in the retransmission buffer to node H along the alternative path.
  • the primary communication path can be node A - node Leaf 1 - node Spine 1 - node Leaf n - node H
  • the alternative communication path can be node A - node Leaf 1 - node Spine 16 - node Leaf n - node H.
  • Leaf 1 when Leaf 1 retransmits data packets in its retransmission buffer, these packets may include those that cannot receive ACK messages from Spine 1 due to link failures. In other words, these packets have already been sent to node H by Spine 1. At this point, node H may receive duplicate data packets. These duplicate data packets may compromise data consistency, atomicity, concurrency control, and cause resource waste, affecting the correctness of write and atomic operations. It cannot be guaranteed that node H can process network-forwarded data packets exactly once.
  • Figure 4 shows a schematic diagram of the UB-G domain (UB-Global, abbreviated as UB-G) protocol stack.
  • the complete transport layer in UB-G is used to provide both reliable and unreliable transport services.
  • a UB-G domain refers to a specific functional domain or system scope built based on UB-G technology or standards. In distributed systems, a domain typically refers to a collection of logically related system components or services that share common functional characteristics.
  • UB's reliable transport service detects duplicate packets and network packet loss using Packet Sequence Numbers (PSNs) to achieve reliable data packet transmission.
  • PSN Packet Sequence Numbers
  • the PSN is carried in the transport packet header (TPH).
  • TPH transport packet header
  • the receiving device increments the PSN value by 1 for each ACK message (also called a TPACK message) returned for a transport (TP) connection.
  • ACK message also called a TPACK message
  • TP transport
  • the sending and receiving devices negotiate an initial PSN value when establishing a TP connection; this initial value is randomized between 0 and 16M-1.
  • the initial PSN value is the same as the PSN value carried in the first data packet.
  • the TP ACK message can carry the accumulated PSN value to indicate that all packets with the accumulated PSN have been correctly received. For example, if the receiving device receives 10 packets from the sending device, and the PSN values of these 10 packets range from 1 to 10, the receiving device can aggregate all the ACK messages into one message, namely a TP ACK message with a PSN value of 10, and send this TP ACK message to the sending device to inform the sending device that the packet with PSN 10, as well as all previous packets, have been correctly received.
  • PSN value only applies within a single TP connection.
  • the PSN values of different TP connections are completely independent and have no correlation.
  • the PSN value has a bit width of 24 bits, representing a range of 0 to 16M-1.
  • the maximum number of outstanding requests for PSN values sent by the sending device is 8M, meaning that the maximum PSN value sent minus the minimum PSN value awaiting acknowledgment does not exceed 8M-1.
  • the outstanding request from the sending device refers to the number of incomplete requests that can be submitted simultaneously to the memory or other target devices within a given time period. These requests may include data packets, read/write operations, etc., which have been sent but have not yet received acknowledgment or completion.
  • the maximum PSN value allowed to be sent is 8M-1 (i.e., 8388607); if the minimum PSN value waiting for acknowledgment is 8M (i.e., 8388608), then the maximum PSN value allowed to be sent is 16M-1 (i.e., 16777215); if the minimum PSN value waiting for acknowledgment is 10M (i.e., 1048576), then the maximum PSN value allowed to be sent is 18M-1 (i.e., 18874367). Since 18M-1 exceeds the 24-bit representation range, there is a high-bit overflow, that is, the maximum PSN allowed to be sent is 2M-1 (i.e., 2097151).
  • the sending device will not send outstanding requests with PSN values exceeding 8M. Therefore, the range [EPSN-8M, EPSN-1] corresponding to EPSN values is the duplicate packet range.
  • the receiving device's process for ensuring exactly once can be as follows: After receiving a data packet, the receiving device first determines whether the data packet falls within a duplicate range, an out-of-order range, or an invalid range based on the data packet's PSN value. If the data packet's PSN value falls within a duplicate range, the receiving device discards the data packet and returns an ACK message to the sending device. The PSN value carried in this ACK message is equal to the receiving device's EPSN value minus 1. If the data packet's PSN value is equal to the receiving device's EPSN value, the receiving device receives the data packet and returns an ACK message to the sending device. The PSN value carried in this ACK message is equal to the receiving device's EPSN value.
  • the receiving device receives the data packet and returns a selective ACK (SACK) message to the sending device. If the data packet's PSN value falls within an invalid range, the data packet is discarded directly.
  • SACK selective ACK
  • the UB-G transport layer occupies 3 square millimeters of the receiving device's resource area and has a processing speed of 200 Mpps.
  • pps stands for packets per second, referring to the number of data packets sent per second. Therefore, to achieve the 1 Gpps throughput requirement in the UB-C domain (UB-Clan, or UB-C for short), the above solution requires an additional 12 square millimeters of resource area in the receiving device. This resource overhead is too large, making it difficult for the receiving device to handle the load.
  • UB-C here refers to a specific set or domain based on UB bus technology.
  • the lightweight transport layer does not have a TP connection, and its reliable transmission service relies on the retransmission mechanism of the UB link layer to ensure that there is no packet loss when transmitting data packets end-to-end.
  • the lightweight transport layer in the UB-C protocol can only solve the packet loss detection problem, but cannot solve the problem of the receiving device receiving duplicate packets, that is, it cannot guarantee that the receiving device can process the network forwarded data packets exactly once.
  • this application provides a data packet deduplication method that can be applied to the lightweight transport layer in UB-C.
  • a forwarding device in the network detects a fault in the target communication path of the currently transmitted data packet and performs a First Retransmission (FRR)
  • FRR First Retransmission
  • the receiving device parses the data packet to determine whether it carries a retransmission flag.
  • the data packet If the data packet carries a retransmission flag, it performs deduplication processing on the data packet according to a deduplication matching table to ensure that there are no duplicate data packets in the receiving device.
  • the deduplication matching table stores information about the data packets already received by the receiving device. Therefore, this application only performs deduplication processing on a small number of data packets carrying retransmission flags.
  • the UB-G scheme that judges and processes each data packet based on the PSN value, it achieves lightweight deduplication and ensures that the receiving device can process network-forwarded data packets exactly once.
  • the data center can be a tightly coupled UB-C system (such as a supernode) or a loosely coupled UB-G system.
  • a tightly coupled UB-C system refers to a RACK or supernode, where different computing nodes and host devices are connected together via a high-speed network.
  • UB-G is a loosely coupled distributed system linked by UBs, supporting peer-to-peer interconnection between distributed system nodes and interoperable with existing Internet Protocol (IP) and Ethernet (Eth) networks.
  • IP Internet Protocol
  • Etheral Ethernet
  • the hardware devices involved in this application embodiment include forwarding devices (such as switches, routers, etc.) and receiving devices in the network.
  • the receiving device can be an independent computing node or a network device; this application embodiment does not impose any restrictions on this.
  • each communication path may include one forwarding device or multiple forwarding devices. That is, the forwarding device can be directly connected to the receiving device, or it can be connected to the receiving device through at least one other forwarding device. This application embodiment does not impose any restrictions on this.
  • FIG 9 is a schematic diagram of a network device provided in an embodiment of this application.
  • This network device can be a switch, router, or other device with packet forwarding capabilities.
  • the network device acts as a packet forwarding device to perform the corresponding steps in the packet deduplication method.
  • the network device includes: a main control board 910, an interface board 930, and an interface board 940.
  • a switching network board (not shown in Figure 9) may be included, which is used to complete data exchange between the interface boards (interface boards are also called line cards or service boards).
  • the main control board 910 performs functions such as system management, equipment maintenance, and protocol processing.
  • Interface boards 930 and 940 provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and forward data streams.
  • the main control board 910 primarily has three types of functional units: a system management control unit, a system clock unit, and a system maintenance unit.
  • the main control board 910, interface boards 930 and 940 communicate with each other via a system bus connected to the system backplane.
  • Interface board 930 includes one or more processors 931.
  • Processors 931 control and manage the interface boards, communicate with the central processing unit on the main control board, and handle data stream forwarding.
  • the memory 932 on interface board 930 stores forwarding table entries; processors 931 forward data streams by searching the forwarding table entries stored in memory 932.
  • the interface board 930 includes one or more network interfaces 933 for receiving data streams or other information sent by other devices, and processing these data streams or information according to the instructions of the processor 931. The specific implementation process will not be described in detail here.
  • this embodiment includes multiple interface boards and employs a distributed forwarding mechanism. Under this mechanism, the operations on interface board 940 are essentially similar to those on interface board 930, and will not be elaborated further for simplicity.
  • the processors 931 and/or 941 in interface board 930 of Figure 9 can be dedicated hardware or chips, such as network processors or application-specific integrated circuits (ASICs), to implement the aforementioned functions. This implementation method is commonly referred to as using dedicated hardware or chips for the forwarding plane.
  • processors 931 and/or 941 can also use general-purpose processors, such as general-purpose CPUs, to implement the functions described above.
  • main control boards including a primary main control board and a backup main control board.
  • interface boards There may also be one or more interface boards; the stronger the data processing capability of the network device, the more interface boards it provides. With multiple interface boards, these boards can communicate through one or more switching network boards, enabling load sharing and redundancy backup.
  • the network device may not require a switching network board; the interface boards handle the processing of the entire system's business data.
  • the network device includes multiple interface boards, which can exchange data with each other through a switching network board, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture network device.
  • the specific architecture adopted depends on the specific network deployment scenario, and no limitations are made here.
  • memory 932 may be read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical discs (including compact disc read-only memory (CD-ROM), compressed optical discs, laser discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code having an instruction or data structure form and accessible by a computer, but not limited thereto.
  • Memory 932 may exist independently and be connected to processor 931 via a communication bus. Memory 932 may also be integrated with processor 931.
  • network interface 933 can be a transceiver-like device used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
  • Network interface 933 includes a wired network interface and may also include a wireless network interface.
  • the wired network interface can be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless network interface can be a WLAN interface, a cellular network communication interface, or a combination thereof.
  • network interface 933 is used to forward data packets to other network devices.
  • network interface 933 can also be used to communicate with receiving devices, for example, sending data packets and deduplication trigger messages to the receiving devices.
  • a network device may include multiple processors, each of which may be a single-core processor or a multi-core processor.
  • a processor may refer to one or more devices, circuits, and/or processing cores used to process data (such as computer program instructions).
  • the memory 932 is used to store a computer program that executes the scheme of this application.
  • the processor 931 can execute the computer program stored in the memory 932 to cause the network device to perform the processing steps of the forwarding device in the method embodiments below.
  • the network device can perform the processing steps of the forwarding device in the method embodiments below.
  • Figure 10 is a schematic diagram of a computer device provided in an embodiment of this application.
  • This computer device can be a terminal device or a server.
  • the computer device acts as a receiving device to execute the corresponding steps in the data packet deduplication method.
  • the computer device includes at least one processor 101, a communication bus 102, a memory 103, and at least one communication interface 104.
  • Processor 101 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof.
  • the aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the communication bus 102 is used to transmit information between the aforementioned components.
  • the communication bus 102 can be divided into an address bus, a data bus, a control bus, etc.
  • address bus a data bus
  • control bus a control bus
  • only one thick line is used to represent it in Figure 10, but this does not mean that there is only one bus or one type of bus.
  • the memory 103 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile optical disc, a Blu-ray disc, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto.
  • the memory 103 may exist independently and be connected to the processor 101 via the communication bus 102.
  • the memory 103 may also be integrated with the processor 101.
  • Communication interface 104 uses any transceiver-like device for communicating with other devices or communication networks.
  • Communication interface 104 includes a wired communication interface and may also include a wireless communication interface.
  • the wired communication interface may be, for example, an Ethernet interface.
  • the Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.
  • WLAN wireless local area network
  • processor 101 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG10.
  • a computer device may include multiple processors, such as processor 101 and processor 105 as shown in Figure 10. Each of these processors may be a single-core processor or a multi-core processor.
  • processor may refer to one or more devices, circuits, and/or processing cores used to process data (such as computer program instructions).
  • the computer device may further include output devices and input devices.
  • the output device communicates with the processor 101 and can display information in various ways.
  • the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc.
  • the input device communicates with the processor 101 and can receive user input in various ways.
  • the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.
  • memory 103 is used to store program code 110 for executing the scheme of this application, and processor 101 can execute the program code 110 stored in memory 103.
  • the program code 110 may include one or more software modules.
  • the computer device can implement the processing steps of the receiving device in the following method embodiments through processor 101 and program code 110 in memory 103. For specific implementation, please refer to the detailed description in the following method embodiments, which will not be repeated here.
  • Figure 11 is a flowchart of a data packet deduplication method provided in an embodiment of this application. The method is applied to a receiving device and includes the following steps.
  • Step 1101 Receive the first data packet.
  • the data packet may be forwarded by multiple forwarding devices in sequence before finally being forwarded to the receiving device.
  • the first forwarding device that forwarded the data packets will, based on the backup data packets in its retransmission buffer, determine an alternative path using FRR (Fault Reset) and retransmit the data packets to the receiving device along the alternative path.
  • FRR fault Reset
  • the first data packet received by the receiving device may be the first data packet sent after the failure, or it may be a retransmitted data packet.
  • a forwarding device in the network may add a retransmission identifier to a retransmission packet for the packet it retransmits, in order to indicate to the receiving device that the packet is a retransmission.
  • the S1 switch when the S1 switch detects a failure in the communication path (e.g., a failure in the path segment between the S1 switch and the S3 switch), it determines an alternative path through FRR, namely S1 switch - S2 switch - S3 switch - S4 switch - receiving device, and retransmits the data packets in the retransmission buffer so that the data packets can be forwarded to the receiving device along the alternative path.
  • a failure in the communication path e.g., a failure in the path segment between the S1 switch and the S3 switch
  • the configuration (CFG) field value in the UB protocol is 6, indicating that the data packet is a transmission message within a certain family domain of the data center shown in Figure 7.
  • the S1 switch adds a retransmission flag "R" to the packet header, sets its value to 1, and then sends the data packet to the receiving end via the backup path.
  • the receiving end parses the packet header. If the value of "R” is 0, it determines that the data packet is the original packet; if the value of "R” is 1, it means that the data packet is being retransmitted.
  • a forwarding device in the network when a forwarding device in the network detects a failure in the target communication path for forwarding the first data packet, it may also construct a first message and send the first message to the receiving device to indicate that the data packets subsequently sent by the receiving device include retransmission data packets.
  • the first message includes a first field, which carries a message type.
  • the message type indicates that the first message is a deduplication trigger message.
  • the deduplication trigger message is used to instruct the receiving device to perform deduplication processing on the data packets received after the first message.
  • the first field can be the next layer protocol (NLP) field.
  • NLP next layer protocol
  • the specific value of this NLP field is used to indicate the message type.
  • NTH network layer header
  • NTH.NLP 000, with a transport packet header (TPH). This TPH.NLP is used to indicate whether confidentiality and integrity protection (CIP) is included.
  • CIP confidentiality and integrity protection
  • CIP.NLP indicates whether it includes a UB partition identifier (UPI)/entity ID (EID, which indicates the unique identifier of a UB entity within the UB family domain) and its bit width.
  • UPI UB partition identifier
  • EID entity ID
  • NTH.NLP 001, without TPH, CIP, EID and transaction header (TAH), with 16-bit UPI to identify that the message is used for the enumeration management protocol.
  • NTH.NLP 110, without TPH, CIP, UPI and TAH, with EID, used to identify the message as a deduplication trigger message.
  • the EID carried can be the EID of the neighboring node to which the faulty node is connected.
  • the first message may carry the network address (CNA) of the sending device in the UB-C domain in the header as the source address information (denoted as SCNA), and at the same time carry the CNA of the receiving device as the destination address information (denoted as DCNA).
  • CNA network address
  • SCNA source address information
  • DCNA destination address information
  • the service level (SL) of the deduplication trigger message is set to the highest priority, so that the deduplication trigger message can enter the highest priority transmission queue and be sent to the receiving device as soon as possible.
  • CRD i.e., credit
  • ACK indicates whether the message releases the retransmission buffer space
  • CRD_VL indicates the virtual link (VL) number corresponding to the credit returned by the CRD segment.
  • RM is the UB message routing mode indicator segment.
  • Plength[13:10] indicates the number of message blocks, with 0 to 15 indicating 1 to 16 blocks respectively.
  • Plength[9:5] indicates the number of folds in the last block, with 0 to 31 indicating 1 to 32 folds respectively.
  • Plength[4:0] indicates the number of bytes in the packet tail payload (excluding LPH/LBH and BCRC fields).
  • Plength[4:0] When Plength[4:0] is 0-15, it indicates that the number of payload bytes in the last Flit within the packet is Plength[4:0]+1; when Plength[4:0] is 16-19, it indicates that the number of payload bytes in the second-to-last Flit within the packet is Plength[4:0]+1; when Plength[4:0] is 20-27, it indicates that the number of payload bytes in the second-to-last Flit within the packet is Plength[4:0]-11; when Plength[4:0] is 28-31, it indicates that the number of payload bytes in the last Flit within the packet is Plength[4:0]-11.
  • This application embodiment does not provide a specific explanation of this; for specific meanings, please refer to the relevant descriptions of the complete compressed network header under the UB compressed message format. This application embodiment will not elaborate further here.
  • the receiving device executes the data packet deduplication method provided in the embodiments of this application, the receiving device also needs to perform the following steps:
  • the first message carries information about the forwarded data packets, which are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.
  • the first message is used to indicate that a fault was detected in the target communication path within the target fault detection period.
  • the target communication path is the communication path between the sending device and the receiving device.
  • the fault detection period is a preset value.
  • the basis for setting it in this application embodiment is not limited.
  • the fault detection period value can be flexibly set and adjusted based on the time (nanosecond level) when the fault is detected in the network detection.
  • the target fault detection period is the period during which the receiving device receives the first data packet.
  • the target communication path is a communication path between a sending device and a receiving device
  • the target forwarding device can be at least one forwarding device on that communication path. That is, the target forwarding device can be a single forwarding device that, upon detecting a fault in the path segment connected to it on the target communication path, constructs a first message and sends the first message to the receiving device.
  • the target forwarding device can be multiple forwarding devices that, upon detecting a fault in the path segment connected to them on the target communication path, construct a first message and send the first message to the receiving device. This application does not impose any limitations on this.
  • a target forwarding device detects a fault in a path segment connected to it within the target communication path
  • the fault could be due to a problem with the link corresponding to that path segment, or it could be due to a fault with another forwarding device connected to that path segment.
  • both forwarding devices connected to that link can detect the link fault, and both can construct the first message.
  • other forwarding devices connected to that device can detect the device fault, and one or more of these devices can construct the first message.
  • the target forwarding device can send the first message to the receiving device through these other forwarding devices.
  • the target forwarding device can also directly send the first message to the receiving device. This application embodiment does not limit the number of other forwarding devices that exist between the target forwarding device and the receiving device.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path. If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device communicatively connected to the first forwarding device, and the target path segment being the path segment between the first forwarding device and the second forwarding device.
  • the target forwarding device sends the first message to the receiving device in the following two ways:
  • the target forwarding device directly sends the first message to a specific receiving device.
  • the following example illustrates the process of the target forwarding device sending the first message, using the two network topologies shown above.
  • node 8 sends data packets to node 7 along the main path.
  • Node 8 is the sending device and node 7 is the receiving device.
  • nodes 9 and 10 can construct a first message and send the first message to node 7 along the determined backup path.
  • the data packet transmission path between node 8 and node 7 is node 8-node 9-node 10-node 11-node 7.
  • node 9 uses the transmission path node 9-node 5-node 6-node 7
  • node 10 uses the transmission path node 10-node 11-node 7.
  • nodes 8 and 7 can also use other paths to transmit data packets, and nodes 9 and 10 can also use other paths to send the first message. This application embodiment does not limit this.
  • the target forwarding device connected to that path segment can send the first message.
  • the target forwarding device can be the preceding forwarding device connected to that path segment, the following forwarding device connected to that path segment, or both forwarding devices connected to that path segment.
  • node 8 sends data packets to node 7 along the main path.
  • Node 8 is the sending device and node 7 is the receiving device.
  • nodes 5, 8, 10, and 13 can construct a first message and send the first message to node 7 along the determined backup path.
  • the data packet transmission path between nodes 8 and 7 is node 8-node 9-node 10-node 11-node 7.
  • the transmission path used by node 5 is node 5-node 6-node 7
  • the transmission path used by node 8 is node 8-node 4-node 7
  • the transmission path used by node 10 is node 10-node 11-node 7
  • the transmission path used by node 13 is node 13-node 14-node 15-node 11-node 7.
  • nodes 8 and 7 can also use other paths to transmit data packets, and nodes 5, 8, 10, and 13 can also use other paths to send the first message. This application embodiment does not limit this.
  • the first message can be sent by another forwarding device connected to that forwarding device.
  • node A sends data packets to node H along the main path.
  • Node A is the sending device and node H is the receiving device.
  • nodes Leaf 1 and Spine 1 can construct a first message and send the first message to node H along the determined backup path.
  • the data packet transmission path between node A and node H is node A - node Leaf 1 - node Spine 1 - node Leaf n - node H.
  • node Leaf 1 uses the transmission path of node Leaf 1 - node Spine 16 - node Leaf n - node H
  • node Spine 1 uses the transmission path of node Spine 1 - node Leaf n - node H.
  • nodes A and H can also use other paths to transmit data packets, and nodes Leaf 1 and Spine 1 can also use other paths to send the first message. This application embodiment does not limit this.
  • the target forwarding device connected to that path segment can send the first message.
  • the target forwarding device can be the preceding forwarding device connected to that path segment, the following forwarding device connected to that path segment, or both forwarding devices connected to that path segment.
  • node A sends data packets to node H along the main path.
  • Node A is the sending device and node H is the receiving device.
  • nodes Leaf 1 and Leaf n can construct a first message and send the first message to node H along the determined backup path.
  • the data packet transmission path between node A and node H is node A - node Leaf 1 - node Spine 1 - node Leaf n - node H.
  • node Leaf 1 uses the transmission path of node Leaf 1 - node Spine 16 - node Leaf n - node H
  • node Leaf n uses the transmission path of node Leaf n - node H.
  • nodes A and H can also use other paths to transmit data packets, and node Leaf 1 can also use other paths to send the first message. This application embodiment does not limit this.
  • the first message can be sent by another forwarding device connected to that forwarding device.
  • this first message needs to carry the receiving device's device information to facilitate message forwarding by the next-hop forwarding device.
  • This device information can include unique identifiers such as the receiving device's device type, device number, and device address.
  • the target forwarding device can maintain the DCNA information of the data packets forwarded during time period T, and carry the DCNA information of the receiving device in the first message when sending the first message to the designated receiving device.
  • T can be equal to or greater than the value of the fault detection period mentioned above. This application does not impose any restrictions on this.
  • the target forwarding device broadcasts the first message to a specific receiving device.
  • the following example illustrates the process of the target forwarding device sending the first message, using the two network topologies shown above.
  • node 10 if node 10 detects a link failure, node 10 constructs a first message and broadcasts it to node 7. Node 10 can broadcast the first message to node 7 via at least two hops and to other nodes in this first network topology via at least one hop.
  • node 10 sends the first message to nodes 11, 6 and 14 via a one-hop broadcast, to nodes 13, 14, 15, 8, 7, 5 and 2 via a two-hop broadcast, and to nodes 12, 4, 1, 0 and 3 via a three-hop broadcast.
  • node 9 can also broadcast the first message to other nodes according to the above logic. This application embodiment does not limit this.
  • nodes 8 and 10 detect a fault in node 9, then nodes 8 and 9 construct a first message and broadcast it to node 7.
  • Nodes 8 and 10 can broadcast the first message to node 7 via at least two hops and to other nodes in this first network topology via at least one hop.
  • node 10 sends the first message to nodes 11, 6, and 14 via a one-hop broadcast, to nodes 13, 14, 15, 8, 7, 5, and 2 via a two-hop broadcast, and to nodes 12, 4, 1, 0, and 3 via a three-hop broadcast.
  • Node 8 sends the first message to nodes 12, 4, and 11 via a one-hop broadcast, to nodes 13, 5, 0, and 12 via a two-hop broadcast, and to nodes 1 and 3 via a three-hop broadcast.
  • nodes 5 and 13 can also broadcast the first message to other nodes according to the above logic. This application embodiment does not limit this.
  • node Spine 1 detects a link failure, it constructs a first message and broadcasts it to node H.
  • Node Spine 1 can broadcast the first message to node H via at least two hops and to other nodes in this second network topology via at least one hop.
  • node Spine 1 sends the first message to nodes Leaf 2, Leaf n-1, and Leaf n via a one-hop broadcast, and then sends the first message to nodes C, D, E, F, G, and H via a two-hop broadcast.
  • node Leaf 1 can also broadcast the first message to other nodes (such as node A and node B) according to the above logic. This application embodiment does not limit this.
  • node Leaf 1 detects a failure in node Spine 1, then node Leaf 1 constructs a first message and broadcasts it to node H. Node Leaf 1 can broadcast the first message to node H via at least three hops and to other nodes in this second network topology via at least one hop.
  • node Leaf 1 sends the first message to nodes Spine 16, A, and B via a one-hop broadcast, to Leaf 2, Leaf n-1, and Leaf n via a two-hop broadcast, and to nodes C, D, E, F, G, and H via a three-hop broadcast.
  • nodes Leaf 1, Leaf 2, Leaf n-1, and Leaf n can also broadcast the first message to other nodes according to the above logic after detecting a fault in node Spine 1. This application embodiment does not limit this.
  • the target forwarding device may also set the SL of the message to the highest priority before sending it to the receiving device.
  • the first message sent to the receiving device carries information about the forwarded data packets, which are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.
  • the information of forwarded data packets includes identification information of the forwarded data packets.
  • This identification information includes the transaction layer segment number (TASSN) of the forwarded data packet, or the packet sequence number (PSN) information of the forwarded data packet.
  • TASSN transaction layer segment number
  • PSN packet sequence number
  • the first message includes a first field, which is used to carry identification information of the forwarded data packet.
  • the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • the first message includes a first field and a second field.
  • the first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.
  • the first message may also carry other information about the data packet, such as SDNA, DCNA, TPH, TAH, etc.
  • the first message carries the SCNA and TASSN corresponding to the data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.
  • the first message carries the SCNA and PSN corresponding to the data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.
  • SCNA represents the address information of the sending device within the UB-C domain.
  • the receiving device can determine which sending device the data packet originated from based on the SCNA.
  • the information of the data packets already forwarded by the target forwarding device carried in it is added to the deduplication matching table, thus realizing the update of the deduplication matching table.
  • the deduplication matching table maintained by the receiving device in this embodiment of the application also includes the following two cases:
  • the deduplication matching table maintained and managed by the receiving device stores the SCNA and TASSN corresponding to the data packets forwarded by the target forwarding device to the receiving device.
  • the deduplication matching table records the correspondence between the SCNA and TASSN of the data packets.
  • the deduplication matching table can also store the correspondence between the hash values of SCNA and TASSN.
  • the deduplication matching table maintained and managed by the receiving device stores information including: the SCNA, EPSN, and maximum out-of-order space corresponding to the data packets forwarded by the target forwarding device to the receiving device.
  • the deduplication matching table records the correspondence between the SCNA, EPSN, and maximum out-of-order space of the data packets.
  • the maximum allowed out-of-order space indicates the number of out-of-order packets that are allowed to be received before the expected ordered packets, which is not shown in Table 2 above.
  • Step 1102 If the first data packet carries a retransmission flag, then the first data packet is deduplicated according to the deduplication matching table so that there is a first data packet in the receiving device.
  • the deduplication matching table stores information about the data packets that the receiving device has received.
  • a forwarding device when a forwarding device needs to mark retransmitted data packets, it can carry a retransmission identifier in a reserved space in the data packet header.
  • the reserved bit "4" of Byte 1 in the data packet header is defined as a retransmission flag (denoted as R) to indicate whether the data packet is a retransmission.
  • R a retransmission flag
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • the reserved "1" bit in Byte0 of the data packet header can be defined as the end retransmission flag (denoted as LR), and the information of this flag bit can be used to indicate whether the first data packet is the last retransmitted data packet.
  • step 1102 above can be implemented as follows: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, the first data packet is discarded; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, the first data packet is retained.
  • the first data packet is a non-duplicate data packet
  • the first data packet if the first data packet does not carry a retransmission flag, then no deduplication processing is performed on the first data packet. That is, if the first data packet does not carry a retransmission flag, the first data packet is processed using normal data processing logic, such as uploading the first data packet or storing the first data packet.
  • normal data processing logic such as uploading the first data packet or storing the first data packet.
  • data packet pkt1 when data packet pkt1 does not carry a retransmission flag, it is directly uploaded.
  • the deduplication trigger message carries information about data packet pkt2
  • the deduplication matching table is queried based on this information to determine whether data packet pkt2 is a duplicate data packet. If data packet pkt2 is not a duplicate data packet, it is uploaded, and the deduplication matching table is updated based on its information.
  • the deduplication matching table is queried based on this data packet pkt3 to determine whether it is a duplicate data packet. If data packet pkt3 is not a duplicate data packet, it is uploaded, and the deduplication matching table is updated based on its information.
  • the receiving device after receiving a data packet, if the data packet carries a retransmission flag, it indicates that the data packet is a retransmitted data packet in the network. Since the receiving device may have previously received the same retransmitted data packet, it needs to perform deduplication processing on the data packet when it carries a retransmission flag. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.
  • the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process.
  • it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.
  • the data packet deduplication method includes the following steps S1-S6:
  • Step S1 The target forwarding device sends the first data packet to the receiving device.
  • Step S2 The receiving device receives the first data packet.
  • Step S3 If the first data packet carries a retransmission flag, the receiving device performs deduplication processing on the first data packet according to the deduplication matching table so that there is a first data packet in the receiving device.
  • the deduplication matching table stores information about the data packets that the receiving device has received.
  • the process of deduplicating the first data packet according to the deduplication matching table can be as follows: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, the first data packet is discarded; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, the first data packet is retained.
  • retaining the first data packet means storing the first data packet and recording its information in the deduplication matching table so as to update the deduplication matching table.
  • Step S4 If the first data packet does not carry a retransmission flag, the receiving device processes the first data packet according to the normal data processing logic.
  • the target forwarding device detects a fault in the target communication path and performs FRR. In this case, in order to ensure the reliable transmission of data packets, the target forwarding device will mark the retransmitted first data packet, so that the first data packet carries a retransmission identifier.
  • the target communication path is the communication path between the sending device and the receiving device.
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • the target forwarding device when the target forwarding device needs to retransmit multiple data packets to the receiving device, the target forwarding device can mark all of these multiple data packets with a retransmission flag to indicate to the receiving device that these multiple data packets are retransmitted data packets; at the same time, it can mark the last data packet among the multiple data packets with an end retransmission flag to indicate to the receiving device that this data packet is the last retransmitted data packet.
  • the end retransmission flag can instruct the receiving device to end the deduplication operation, that is, not to perform deduplication on the data packets received after the data packet carrying the end retransmission flag.
  • the target forwarding device detects a fault in the target communication path, it will also send a first message to the receiving device to indicate that there may be retransmission of data packets later.
  • the data packet deduplication method provided in this application embodiment further includes the following steps:
  • Step S5 The target forwarding device sends a first message to the receiving device.
  • the first message carries information about the forwarded data packets.
  • the forwarded data packets are the data packets that the target forwarding device forwards to the receiving device within the target fault detection period.
  • the first message includes a first field, which carries a message type.
  • the message type indicates that the first message is a deduplication trigger message.
  • the deduplication trigger message is used to instruct the receiving device to perform deduplication processing on the data packets received after the first message.
  • the first message is used to indicate that a fault is detected in the target communication path during the target fault detection period.
  • the target communication path is the communication path between the sending device and the receiving device.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path. If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, where the second forwarding device is a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment is the path segment between the first forwarding device and the second forwarding device.
  • the information of the forwarded data packet includes identification information of the forwarded data packet, which may include the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.
  • the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • Step S6 The receiving device receives the first message and updates the deduplication matching table based on the information of the forwarded data packets.
  • the target forwarding device marks data packets as retransmission targets, sends the first message to the receiving device, and the receiving device implements lightweight deduplication, in order to further illustrate its specific implementation process.
  • the sending device sends data packets to the receiving device via the main path, i.e., S1 switch - S3 switch - S4 switch - receiving device, and the S1 switch and S3 switch detect a link failure, they can construct a first message immediately, set the SL level of the message to the highest priority, and send the first message to the receiving device.
  • the main path i.e., S1 switch - S3 switch - S4 switch - receiving device
  • an S3 switch sends out a retriggered message in two ways:
  • the S3 switch maintains the DCNA information of the data packets forwarded within the T time period. At this time, the first message can be sent directly to the receiving device through the backup path based on the DCNA information.
  • the S3 switch sends the first message via broadcast.
  • the backup path is S1 switch - S2 switch - S3 switch - S4 switch - receiving device.
  • the S2 switch when it receives a data packet, its internal logic for processing the data packet is as follows: After receiving the block/flit of the data packet from a certain port, if the data packet is verified to be correct or successfully decoded, it is sent to the service support unit (SSU). While waiting for all blocks/flits of a certain data packet to be received and the data packet to be assembled, the SSU searches the data packet forwarding table based on the DCNA information in LPH. After the data packet is assembled and the forwarding table result is found, the data packet is forwarded out from a certain port, and a backup of the data packet is saved to the retransmission buffer.
  • SSU service support unit
  • the S2 switch After receiving the ACK message sent by the next-hop S3 switch via LPH/LBH, it releases the corresponding space in the retransmission buffer. Furthermore, it saves information about the data packet (such as some or all packet header information, or hash values) to the buffer to facilitate the construction of the first message.
  • information about the data packet such as some or all packet header information, or hash values
  • the retransmission buffer needs to be managed at the packet level. If a portion of a packet's block/flit does not receive an ACK message, the corresponding range of resources in the retransmission buffer will not be released temporarily.
  • a packet (pkt) consists of four blocks/flits, from Addr3 to Addr6. If Addr5 does not receive an ACK message, the switch will resend Addr3-Addr6 via the backup path after a Free Response (FRR), and will not release the interval resources corresponding to that packet temporarily.
  • FRR Free Response
  • the receiving device parses the packet header. As shown in Figure 24, if the receiving device parses the packet header and determines that the message type carried in the first field of the data packet is a deduplication trigger message, it starts its own deduplication module and updates the deduplication matching table based on the information carried in the first message. As shown in Figure 25, if the receiving device determines that the data packet carries a retransmission identifier after parsing the packet header, it needs to query the deduplication matching table based on the information of the data packet to detect whether the data packet is a duplicate data packet. If the data packet is a duplicate data packet, it discards the data packet; if it is not a duplicate data packet, it updates the deduplication matching table based on the information of the data packet and uploads the data packet to the upper-layer module.
  • the data packet will carry a retransmission identifier.
  • the forwarding device in the network when forwarding data packets to the receiving device, it marks a small number of retransmitted data packets to carry a retransmission identifier.
  • the receiving device when it receives a data packet, if the packet carries a retransmission flag, it indicates that the packet is a retransmitted data packet in the network. Since the receiving device may have already received the same retransmitted data packet before, it needs to perform deduplication processing on the packet. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.
  • the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process.
  • it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.
  • Figure 26 is a schematic diagram of a data packet deduplication device provided in an embodiment of this application.
  • the data packet deduplication device can be implemented by software, hardware, or a combination of both as part or all of the receiving end device.
  • the data packet deduplication device 2600 includes: a first receiving module 2601 and a deduplication module 2602.
  • the first receiving module 2601 is used to receive the first data packet
  • the deduplication module 2602 is used to perform deduplication processing on the first data packet according to the deduplication matching table if the first data packet carries a retransmission identifier, so that there is a first data packet in the receiving device.
  • the deduplication matching table stores information about the data packets that the receiving device has received.
  • the deduplication module 2602 is specifically used for:
  • the first data packet is determined to be a duplicate data packet according to the deduplication matching table, then the first data packet is discarded;
  • the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, then the first data packet is retained.
  • the data packet deduplication device 2600 further includes:
  • the update module is used to store the first data packet and record the information of the first data packet in the deduplication matching table in order to update the deduplication matching table.
  • the data packet deduplication device 2600 further includes:
  • the second receiving module is also used to receive a first message, which carries information about a forwarded data packet.
  • the forwarded data packet is a data packet that the target forwarding device forwards to the receiving device within the target fault detection period.
  • the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period.
  • the target communication path is the communication path between the sending device and the receiving device.
  • the update module is used to update the deduplication matching table based on information from forwarded data packets.
  • the first message includes a first field carrying a message type.
  • the message type indicates that the first message is a deduplication trigger message, which is used to instruct the receiving device to perform deduplication processing on data packets received after the first message.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path.
  • the target forwarding device includes at least one forwarding device connected to the target device;
  • the target forwarding device includes a first forwarding device and/or a second forwarding device.
  • the second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device.
  • the target path segment is the path segment between the first forwarding device and the second forwarding device.
  • the information of the forwarded data packet includes the identification information of the forwarded data packet
  • the identification information includes the transaction layer segment number of the forwarded data packet or the packet sequence number of the forwarded data packet.
  • the deduplication trigger message includes a first field, which carries identification information of the forwarded data packet.
  • the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • the deduplication trigger message includes a first field and a second field.
  • the first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • a received data packet carries a retransmission flag, it indicates that the data packet is a retransmitted data packet in the network. Since the receiving device may have previously received the same retransmitted data packet, it needs to perform deduplication processing on the packet. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.
  • the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process.
  • it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.
  • the data packet deduplication device 2600 provided in the above embodiments is only illustrated by the division of the above functional modules when performing deduplication processing on received data packets.
  • the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the data packet deduplication device 2600 provided in the above embodiments and the data packet deduplication method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
  • Figure 27 is a schematic diagram of another data packet deduplication device provided in an embodiment of this application.
  • This data packet deduplication device can be implemented by software, hardware, or a combination of both as part or all of the target forwarding device.
  • the data packet deduplication device 2700 includes: a first sending module 2701.
  • the first sending module 2701 is used to send a first data packet to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on the data packets that the receiving device has received.
  • the data packet deduplication device 2700 further includes:
  • the second sending module is used to send a first message to the receiving device to instruct the receiving device to update the deduplication matching table based on the information of the forwarded data packets carried in the first message.
  • the forwarded data packet is the data packet forwarded by the target forwarding device to the receiving device within the target fault detection period, and the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period.
  • the target communication path is the communication path between the sending device and the receiving device.
  • the first message includes a first field carrying a message type.
  • the message type indicates that the first message is a deduplication trigger message, which is used to instruct the receiving device to perform deduplication processing on data packets received after the first message.
  • the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path.
  • the target forwarding device includes at least one forwarding device connected to the target device;
  • the target forwarding device includes a first forwarding device and/or a second forwarding device.
  • the second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device.
  • the target path segment is the path segment between the first forwarding device and the second forwarding device.
  • the information of the forwarded data packet includes identification information of the forwarded data packet, which may include the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.
  • the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.
  • the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.
  • the data packet for data packets forwarded by the network, if the data packet is a retransmitted data packet taken from the retransmission buffer, the data packet will carry a retransmission identifier.
  • the forwarding device in the network when forwarding data packets to the receiving device, it marks a small number of retransmitted data packets to carry a retransmission identifier.
  • the forwarding device in this embodiment can tag a small number of retransmitted packets. This allows the receiving device to directly predict whether a packet is a retransmitted packet based on whether it carries a retransmission flag. Consequently, only a small number of packets with retransmission flags need to be deduplicated based on the deduplication matching table. This eliminates the need to perform a deduplication check on each packet individually, significantly reducing the resource consumption of the receiving device and achieving lightweight deduplication of packets.
  • the data packet deduplication device 2700 provided in the above embodiments when marking retransmitted data packets and sending the first message, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the data packet deduplication device 2700 provided in the above embodiments and the data packet deduplication method embodiments belong to the same concept, and its specific implementation process is detailed in the method embodiments, which will not be repeated here.
  • This application also provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the data packet deduplication method shown in the above embodiments.
  • This application also provides a computer program product comprising computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the steps of the data packet deduplication method described in the above embodiments.
  • a computer program is provided that, when run on a computer or processor, causes the computer or processor to perform the steps of the data packet deduplication method described in the above embodiments.
  • implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof.
  • software When implemented in software, it can be implemented, in whole or in part, as a computer program product.
  • the computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
  • the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media.
  • the available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
  • the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.
  • the information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, data stored, data displayed, etc.
  • signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Landscapes

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

Abstract

The present application belongs to the technical field of networks. Disclosed are a data packet deduplication method, an apparatus, a device, a storage medium and a program product. The method comprises: receiving a first data packet; and, if the first data packet carries a retransmission identifier, deduplicating the first data packet on the basis of a deduplication matching table, such that there is one first data packet in a receiving end device, the deduplication matching table storing information about data packets that have been received by the receiving end device. It can be seen that the receiving end device in the present application only deduplicates a small number of data packets carrying retransmission identifiers, not only ensuring that the receiving end device can process exactly once the data packets forwarded by a network, but also realizing lightweight deduplication of the receiving end device.

Description

数据包去重方法、装置、设备、存储介质及程序产品Data packet deduplication methods, apparatus, equipment, storage media, and program products

本申请要求于2024年6月29日提交的申请号为202410866893.1、发明名称为“数据包去重方法、装置、设备、存储介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 202410866893.1, filed on June 29, 2024, entitled “Data Packet Deduplication Method, Apparatus, Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference.

技术领域Technical Field

本申请涉及网络技术领域,特别涉及一种数据包去重方法、装置、设备、存储介质及程序产品。This application relates to the field of network technology, and in particular to a method, apparatus, device, storage medium, and program product for deduplicating data packets.

背景技术Background Technology

在统一总线(unified bus,UB)协议中,数据链路层支持收发数据报文和链路层控制报文,报文最小传输单元(Flit)固定为20字节(byte)。其中,第一转发设备在向接收端设备发送数据包时,将数据包的某个Flit从对应端口转发出去后,会将已发送的Flit备份到本地的重传缓冲区(也称为Retry-Buff),下一跳的第二转发设备在接收到该Flit后,对该Flit进行循环冗余校验(cyclic redundancy check,CRC)或解码,当CRC校验正确,或者前向纠错编码(forward error correction,FEC)解码成功后,向第一转发设备返回确认(acknowledgement,ACK)消息,以通知第一转发设备释放重传缓冲区,并继续转发该Flit至接收端设备。当第一转发设备在接收到确认消息后,第一转发设备会将该Flit从重传缓冲区中删除;但当第二转发设备发生故障,或者第一转发设备与第二转发设备之间的通信路径发生故障时,第一转发设备可能无法接收到第二转发设备反馈的ACK消息,此时第一转发设备会通过快速重路由(fast reroute,FRR)机制确定备用通信路径,并沿着备用通信路径重新发送重传缓冲区中的Flits至接收端设备,该接收端设备可能会收到重复的数据包。In the Unified Bus (UB) protocol, the data link layer supports sending and receiving data packets and link layer control packets, with a fixed minimum transmission unit (Flit) of 20 bytes. When the first forwarding device sends a data packet to the receiving device, it forwards a Flit of the packet from the corresponding port and backs up the sent Flit to its local retransmission buffer (also known as a Retry-Buff). Upon receiving this Flit, the second forwarding device performs a cyclic redundancy check (CRC) or decodes it. If the CRC check is correct, or the forward error correction (FEC) decoding is successful, it returns an acknowledgment (ACK) message to the first forwarding device, notifying it to release the retransmission buffer and continue forwarding the Flit to the receiving device. When the first forwarding device receives an acknowledgment message, it will delete the Flit from the retransmission buffer. However, if the second forwarding device fails, or if the communication path between the first and second forwarding devices fails, the first forwarding device may not be able to receive the ACK message from the second forwarding device. In this case, the first forwarding device will determine an alternative communication path through the fast reroute (FRR) mechanism and retransmit the Flits in the retransmission buffer to the receiving device along the alternative communication path. The receiving device may receive duplicate data packets.

基于此,亟需一种数据包去重方法,以保证接收端设备能够恰好一次(exactly once)地处理网络转发的数据包。Therefore, there is an urgent need for a data packet deduplication method to ensure that the receiving device can process the network-forwarded data packets exactly once.

发明内容Summary of the Invention

本申请提供了一种数据包去重方法、装置、设备、存储介质及程序产品,使得接收端设备在接收到数据包之后,对携带重传标识的数据包进行去重处理,不仅可以保证接收端设备的能够恰好一次(exactly once)地处理网络转发的数据包,还实现了接收端设备对数据包的轻量级去重。所述技术方案如下:This application provides a data packet deduplication method, apparatus, device, storage medium, and program product, enabling a receiving device to deduplicatize data packets carrying retransmission identifiers after receiving them. This not only ensures that the receiving device can process network-forwarded data packets exactly once, but also achieves lightweight deduplication of data packets by the receiving device. The technical solution is as follows:

第一方面,提供了一种数据包去重方法,所述方法包括:Firstly, a data packet deduplication method is provided, the method comprising:

接收第一数据包;若所述第一数据包携带有重传标识,则根据去重匹配表对所述第一数据包进行去重处理,以使所述接收端设备中存在一个所述第一数据包,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。The receiving device receives a first data packet; if the first data packet carries a retransmission flag, the receiving device performs deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device, and the deduplication matching table stores information about the data packets that the receiving device has received.

在一种可能的实现方式中,若第一数据包未携带重传标识,则保留该第一数据包。进一步地,在保留第一数据包的情况下,根据第一数据包的信息,对去重匹配表进行更新,即将第一数据包的信息记录在去重匹配表中。In one possible implementation, if the first data packet does not carry a retransmission flag, then the first data packet is retained. Further, if the first data packet is retained, the deduplication matching table is updated based on the information in the first data packet; that is, the information of the first data packet is recorded in the deduplication matching table.

需要说明的是,对于接收端设备而言,其维护和管理的去重匹配表可以只存储指定时间段内已接收到数据包的信息,也可以持续存储已接收到的所有数据包的信息,本申请对去重匹配表所存储的已接收的数据包的信息的时间范围不做限制,对去重匹配表中的信息量也不做限制。It should be noted that, for the receiving device, the deduplication matching table it maintains and manages can store only the information of the data packets received within a specified time period, or it can continuously store the information of all the data packets received. This application does not limit the time range of the information of the received data packets stored in the deduplication matching table, nor does it limit the amount of information in the deduplication matching table.

由此可见,对于接收端设备而言,接收端设备在接收到某个数据包之后,若该数据包携带重传标识,则表示该数据包为网络中重传的数据包,而对于重传的数据包,接收端设备可能之前已经接收过相同的数据包,因此,在数据包携带重传标识的情况下,接收端设备需要对该数据包进行去重处理。如此,能够保证接收端设备中不存在重复的数据包,使得接收端设备能够恰好一次(exactly once)的处理网络转发的数据包。Therefore, when a receiving device receives a data packet, if the packet carries a retransmission flag, it indicates that the packet is a retransmitted packet from the network. Since the receiving device may have already received the same retransmitted packet, it needs to perform deduplication on the packet. This ensures that there are no duplicate data packets in the receiving device's memory, allowing it to process network-forwarded data packets exactly once.

而且,相比于相关技术中基于包序列号(packet sequence number,PSN)来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,本申请中的接收端设备在接收数据包的过程中,可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大地减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that detect duplicate packets based on packet sequence number (PSN), which requires determining whether a packet is a duplicate packet based on the PSN carried by each packet, the receiving device in this application can directly predict whether a packet is a duplicate packet based on whether the packet carries a retransmission flag during the packet reception process. Thus, it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate packet. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.

在一种可能的实现方式中,所述根据去重匹配表对所述第一数据包进行去重处理,包括:若根据所述去重匹配表确定所述第一数据包为重复数据包,则丢弃所述第一数据包;若根据所述去重匹配表确定所述第一数据包为非重复数据包,则保留所述第一数据包。In one possible implementation, the step of deduplicating the first data packet according to the deduplication matching table includes: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, then discarding the first data packet; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, then retaining the first data packet.

也即是,在第一数据包携带重传标识的情况下,需要基于去重匹配表进一步确认接收端设备是否接收过该第一数据包,以基于去重匹配表来确定第一数据包是否为重复数据包。In other words, if the first data packet carries a retransmission flag, it is necessary to further confirm whether the receiving device has received the first data packet based on the deduplication matching table, so as to determine whether the first data packet is a duplicate data packet based on the deduplication matching table.

在一种可能的实现方式中,所述保留所述第一数据包,包括:存储所述第一数据包,并将所述第一数据包的信息记录在所述去重匹配表中,以对所述去重匹配表进行更新。In one possible implementation, retaining the first data packet includes: storing the first data packet and recording the information of the first data packet in the deduplication matching table to update the deduplication matching table.

也即是,在第一数据包不是重复数据包的情况下,需要基于该第一数据包来更新去重匹配表,从而避免在后续接收数据包的过程中重复接收该第一数据包。In other words, if the first data packet is not a duplicate data packet, the deduplication matching table needs to be updated based on the first data packet to avoid receiving the first data packet repeatedly in the subsequent data packet reception process.

在一种可能的实现方式中,所述方法还包括:接收第一消息,所述第一消息携带已转发数据包的信息,所述已转发数据包为目标转发设备在目标故障检测周期内向所述接收端设备转发的数据包,所述第一消息用于指示所述目标故障检测周期内检测到目标通信路径存在故障,所述目标通信路径为发送端设备与所述接收端设备之间的通信路径;基于所述已转发数据包的信息,对所述去重匹配表进行更新。In one possible implementation, the method further includes: receiving a first message carrying information about forwarded data packets, wherein the forwarded data packets are data packets forwarded by the target forwarding device to the receiving device within a target fault detection period, the first message being used to indicate that a fault is detected in the target communication path within the target fault detection period, and the target communication path being the communication path between the sending device and the receiving device; and updating the deduplication matching table based on the information about the forwarded data packets.

其中,对于目标转发设备而言,其自身会存储故障检测周期内转发的所有数据包的信息,还能够在转发数据包的过程中,感知和检测传输数据包的通信路径是否存在故障。基于此,若在目标故障检测周期内检测到目标通信路径发生故障时,可以构造第一消息,并向接收端设备发送第一消息,以提示接收端设备接下来所接收的数据包中存在重传的数据包,需要进行去重处理。Specifically, the target forwarding device stores information about all data packets forwarded during the fault detection period and can detect and identify faults in the communication path of the transmitted data packets during the forwarding process. Therefore, if a fault is detected in the target communication path during the target fault detection period, a first message can be constructed and sent to the receiving device to indicate that the receiving device will receive retransmitted data packets in the subsequent data packets, requiring deduplication.

而且,第一消息中携带了检测到目标通信路径存在故障的目标故障检测周期内已转发的数据包的信息,使得接收端设备可以基于该已转发数据包的信息更新去重匹配表,从而基于更新后的去重匹配表来判断后续接收到的数据包中是否存在目标故障检测周期内重传的重复数据包。Furthermore, the first message carries information about the data packets that have been forwarded within the target fault detection period when a fault is detected in the target communication path. This allows the receiving device to update the deduplication matching table based on the information of the forwarded data packets, and then use the updated deduplication matching table to determine whether there are duplicate data packets that have been retransmitted within the target fault detection period in the subsequently received data packets.

在一种可能的实现方式中,所述第一消息包括第一字段,所述第一字段携带消息类型,所述消息类型指示所述第一消息为去重触发消息,所述去重触发消息用于指示所述接收端设备对在所述第一消息之后接收到的数据包进行去重处理。In one possible implementation, the first message includes a first field carrying a message type, the message type indicating that the first message is a deduplication trigger message, the deduplication trigger message being used to instruct the receiving device to perform deduplication processing on data packets received after the first message.

也即是,第一消息可以为去重触发消息。当接收端设备接收到第一消息后,不仅可以从第一消息中解析出已转发数据包的信息,还可以基于该第一消息的消息类型,对在第一消息之后接收到的数据包进行去重处理。In other words, the first message can be a deduplication trigger message. When the receiving device receives the first message, it can not only parse the information of the forwarded data packets from the first message, but also perform deduplication processing on the data packets received after the first message based on the message type of the first message.

换言之,该第一消息作为去重触发消息,可以指示接收端设备启动去重处理操作。In other words, the first message, as a deduplication trigger message, can instruct the receiving device to start the deduplication process.

在一种可能的实现方式中,所述目标转发设备位于所述目标通信路径上,且所述目标转发设备包括检测到所述目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;若所述目标设备存在故障,则所述目标转发设备包括与所述目标设备连接的至少一个转发设备;若所述目标路径段存在故障,则所述目标转发设备包括第一转发设备和/或第二转发设备,所述第二转发设备为所述目标通信路径中与所述第一转发设备通信连接的下一跳转发设备,所述目标路径段为所述第一转发设备与所述第二转发设备之间的路径段。In one possible implementation, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; if the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment being a path segment between the first forwarding device and the second forwarding device.

也即是,目标通信路径中存在故障包括某一路径段对应的链路存在故障,或者目标通信路径上的某个转发设备存在故障。当路径段对应的链路存在故障时,该链路所连接的两个转发设备均可以检测到链路故障,此时,检测到链路故障的这两个转发设备均可以构造和发送第一消息;而当目标通信路径上的某个转发设备存在故障时,与该转发设备所连接的其他转发设备可以检测到设备故障,此时,检测到设备故障的一个或多个其他转发设备均可以构造和发送第一消息。In other words, a fault in the target communication path includes a fault in the link corresponding to a certain path segment, or a fault in a forwarding device on the target communication path. When a link corresponding to a path segment is faulty, both forwarding devices connected to that link can detect the link fault, and both of these forwarding devices can construct and send the first message. When a forwarding device on the target communication path is faulty, other forwarding devices connected to that forwarding device can detect the device fault, and one or more of these other forwarding devices can construct and send the first message.

在一种可能的实现方式中,所述已转发数据包的信息包括所述已转发数据包的标识信息,所述标识信息包括所述已转发数据包的事务层段号,或者所述已转发数据包的包序列号信息。In one possible implementation, the information of the forwarded data packet includes the identification information of the forwarded data packet, which includes the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.

需要说明的是,本申请仅以数据包的事务层段号,或者包序列号信息来唯一标识一个数据包,在实际应用时,为了更好的区分数据包,也可以采用其他信息来标识和区分数据包,本申请对数据包的标识信息的具体内容不做限制。It should be noted that this application uses only the transaction layer segment number or packet sequence number of the data packet to uniquely identify a data packet. In practical applications, other information can also be used to identify and distinguish data packets in order to better distinguish them. This application does not limit the specific content of the identification information of the data packet.

在一种可能的实现方式中,所述去重触发消息包括第一字段,所述第一字段用于携带所述已转发数据包的标识信息。In one possible implementation, the deduplication trigger message includes a first field, which carries identification information of the forwarded data packet.

在一种可能的实现方式中,所述已转发数据包的信息还包括设备地址信息,所述设备地址信息至少指示所述发送端设备的地址。In one possible implementation, the information of the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

在一种可能的实现方式中,所述去重触发消息包括第一字段和第二字段,所述第一字段用于携带所述已转发数据包的标识信息,所述第二字段用于携带所述设备地址信息。In one possible implementation, the deduplication trigger message includes a first field and a second field, wherein the first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.

在一种可能的实现方式中,第一数据包还携带结束重传标识,所述结束重传标识指示所述第一数据包为最后一个进行去重处理的数据包。In one possible implementation, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

也即是,第一数据包可以同时携带重传标识和结束重传标识,以标识该第一数据包为最后一个重传的数据包,也是最后一个需要进行去重处理的数据包。对于接收端设备而言,基于第一数据包的携带的结束重传标识,在对第一数据包进行去重处理后,对于后续接收到的数据包,不再执行去重处理。In other words, the first data packet can carry both a retransmission flag and an end-of-retransmission flag to indicate that it is the last retransmitted data packet and the last data packet that needs to be deduplicated. For the receiving device, based on the end-of-retransmission flag carried in the first data packet, after deduplicating the first data packet, no further deduplication processing is performed on subsequent received data packets.

换言之,在本申请中,结束重传标识可以用于指示接收端设备结束去重处理操作。In other words, in this application, the end retransmission flag can be used to instruct the receiving device to end the deduplication operation.

第二方面,提供了一种数据包去重方法,应用于目标转发设备,所述方法包括:Secondly, a data packet deduplication method is provided, applied to a target forwarding device, the method comprising:

向接收端设备发送第一数据包,以指示所述接收端设备根据去重匹配表对所述第一数据包进行去重处理,使得所述接收端设备中存在一个所述第一数据包;其中,所述第一数据包携带重传标识,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。A first data packet is sent to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on data packets that the receiving device has received.

由此可见,对于传输的数据包,若该数据包为转发设备重发的数据包,则该数据包中会携带重传标识。换言之,对于网络中的转发设备而言,其在向接收端设备转发数据包时,对少量重传的数据包进行打标,使其携带重传标识。Therefore, if a data packet is a retransmitted packet from a forwarding device, it will carry a retransmission flag. In other words, when a forwarding device in the network forwards data packets to the receiving device, it marks the few retransmitted packets to carry a retransmission flag.

而且,相比于相关技术中基于PSN来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,由于本申请中的转发设备可以对少量重传的数据包进行打标,使得接收端设备可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大地减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that rely on PSN to detect duplicate packets, requiring each packet to be identified by its PSN, the forwarding device in this application can tag a small number of retransmitted packets. This allows the receiving device to directly predict whether a packet is a retransmitted packet based on whether it carries a retransmission flag. Consequently, only a small number of packets with retransmission flags need to be deduplicated using a deduplication matching table. This eliminates the need to perform a deduplication check on every single packet, significantly reducing the resource consumption of the receiving device and enabling lightweight deduplication of packets.

在一种可能的实现方式中,所述方法还包括:In one possible implementation, the method further includes:

向接收端设备发送第一消息,以指示所述接收端设备基于所述第一消息携带的已转发数据包的信息,对所述去重匹配表进行更新;其中,所述已转发数据包为所述目标转发设备在目标故障检测周期内向所述接收端设备转发的数据包,所述第一消息用于指示在所述目标故障检测周期内检测到目标通信路径存在故障,所述目标通信路径为发送端设备与所述接收端设备之间的通信路径。A first message is sent to the receiving device to instruct the receiving device to update the deduplication matching table based on the information of the forwarded data packets carried in the first message; wherein, the forwarded data packets are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period, and the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period, and the target communication path is the communication path between the sending device and the receiving device.

其中,对于目标转发设备而言,其自身会存储故障检测周期内转发的所有数据包的信息,还能够在转发数据包的过程中,感知和检测传输数据包的通信路径是否存在故障。基于此,若在目标故障检测周期内检测到目标通信路径发生故障时,可以构造第一消息,并向接收端设备发送第一消息,以提示接收端设备接下来所接收的数据包中存在重传的数据包,需要进行去重处理。Specifically, the target forwarding device stores information about all data packets forwarded during the fault detection period and can detect and identify faults in the communication path of the transmitted data packets during the forwarding process. Therefore, if a fault is detected in the target communication path during the target fault detection period, a first message can be constructed and sent to the receiving device to indicate that the receiving device will receive retransmitted data packets in the subsequent data packets, requiring deduplication.

在一种可能的实现方式中,所述第一消息包括第一字段,所述第一字段携带消息类型,所述消息类型指示所述第一消息为去重触发消息,所述去重触发消息用于指示所述接收端设备对在所述第一消息之后接收到的数据包进行去重处理。In one possible implementation, the first message includes a first field carrying a message type, the message type indicating that the first message is a deduplication trigger message, the deduplication trigger message being used to instruct the receiving device to perform deduplication processing on data packets received after the first message.

在一种可能的实现方式中,所述目标转发设备位于所述目标通信路径上,且所述目标转发设备包括检测到所述目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;若所述目标设备存在故障,则所述目标转发设备包括与所述目标设备连接的至少一个转发设备;若所述目标路径段存在故障,则所述目标转发设备包括第一转发设备和/或第二转发设备,所述第二转发设备为所述目标通信路径中与所述第一转发设备通信连接的下一跳转发设备,所述目标路径段为所述第一转发设备与所述第二转发设备之间的路径段。In one possible implementation, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; if the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment being a path segment between the first forwarding device and the second forwarding device.

在一种可能的实现方式中,所述已转发数据包的信息包括所述已转发数据包的标识信息,所述标识信息包括所述已转发数据包的事务层段号,或者所述已转发数据包的包序列号信息。In one possible implementation, the information of the forwarded data packet includes the identification information of the forwarded data packet, which includes the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.

在一种可能的实现方式中,所述已转发数据包的信息还包括设备地址信息,所述设备地址信息至少指示所述发送端设备的地址。In one possible implementation, the information of the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

在一种可能的实现方式中,所述第一数据包还携带结束重传标识,所述结束重传标识指示所述第一数据包为最后一个进行去重处理的数据包。In one possible implementation, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

第三方面,提供了一种数据包去重装置,所述数据包去重装置具有实现上述第一方面中数据包去重方法行为的功能。所述数据包去重装置包括至少一个模块,该至少一个模块用于实现上述第一方面所提供的数据包去重方法的步骤。Thirdly, a data packet deduplication device is provided, which has the function of implementing the data packet deduplication method described in the first aspect. The data packet deduplication device includes at least one module, which is used to implement the steps of the data packet deduplication method provided in the first aspect.

第四方面,提供了一种数据包去重装置,所述数据包去重装置具有实现上述第二方面中数据包去重方法行为的功能。所述数据包去重装置包括至少一个模块,该至少一个模块用于实现上述第二方面所提供的数据包去重方法的步骤。Fourthly, a data packet deduplication device is provided, which has the function of implementing the data packet deduplication method described in the second aspect above. The data packet deduplication device includes at least one module, which is used to implement the steps of the data packet deduplication method provided in the second aspect above.

第五方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器用于存储执行上述第一方面所提供的数据包去重方法的计算机程序,或者上述第二方面所提供的数据包去重方法的计算机程序。所述处理器被配置为用于执行所述存储器中存储的计算机程序,以实现上述第一方面所述的数据包去重方法,或者实现上述第二方面所述的数据包去重方法。Fifthly, a computer device is provided, comprising a processor and a memory, the memory being used to store a computer program for executing the data packet deduplication method provided in the first aspect, or a computer program for executing the data packet deduplication method provided in the second aspect. The processor is configured to execute the computer program stored in the memory to implement the data packet deduplication method described in the first aspect, or to implement the data packet deduplication method described in the second aspect.

在一种可能的实现方式中,所述计算机设备还可以包括通信总线,该通信总线用于该处理器与存储器之间建立连接。In one possible implementation, the computer device may further include a communication bus for establishing a connection between the processor and the memory.

第六方面,提供了一种计算机可读存储介质,所述存储介质内存储有指令,当所述指令在计算机上运行时,使得计算机执行上述第一方面所述的数据包去重方法的步骤,或者执行上述第二方面所述的数据包去重方法的步骤。In a sixth aspect, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.

第七方面,提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行上述第一方面所述的数据包去重方法的步骤,或者执行上述第二方面所述的数据包去重方法的步骤。In a seventh aspect, a computer program product containing instructions is provided, which, when executed on a computer, cause the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.

或者说,提供了一种计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行上述第一方面所述的数据包去重方法的步骤,或者执行上述第二方面所述的数据包去重方法的步骤。Alternatively, a computer program is provided that, when run on a computer, causes the computer to perform the steps of the data packet deduplication method described in the first aspect, or to perform the steps of the data packet deduplication method described in the second aspect.

上述第二方面至第七方面所获得的技术效果与第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects achieved by the second to seventh aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here.

附图说明Attached Figure Description

图1是本申请实施例提供的一种链路层收发数据包的流程示意图;Figure 1 is a schematic diagram of a link layer data packet sending and receiving process provided in an embodiment of this application;

图2是本申请实施例提供的第一种网络拓扑中链路故障情况下的数据包转发示意图;Figure 2 is a schematic diagram of data packet forwarding in the case of link failure in the first network topology provided in the embodiment of this application;

图3是本申请实施例提供的第二种网络拓扑中链路故障情况下的数据包转发示意图;Figure 3 is a schematic diagram of data packet forwarding in the case of link failure in the second network topology provided in the embodiments of this application;

图4是本申请实施例提供的一种UB-G协议栈的层级示意图;Figure 4 is a schematic diagram of the hierarchy of a UB-G protocol stack provided in an embodiment of this application;

图5是本申请实施例提供的一种相关技术中使用包序列号检测重复包的流程示意图;Figure 5 is a schematic diagram of a process for detecting duplicate packets using packet serial numbers in a related technology provided in an embodiment of this application;

图6是本申请实施例提供的一种UB-C协议栈的层级示意图;Figure 6 is a schematic diagram of the hierarchy of a UB-C protocol stack provided in an embodiment of this application;

图7是本申请实施例提供的一种数据中心的架构示意图;Figure 7 is a schematic diagram of a data center architecture provided in an embodiment of this application;

图8是本申请实施例提供的一种数据包去重方法的应用场景示意图;Figure 8 is a schematic diagram of an application scenario of a data packet deduplication method provided in an embodiment of this application;

图9是本申请实施例提供的一种网络设备的结构示意图;Figure 9 is a schematic diagram of the structure of a network device provided in an embodiment of this application;

图10是本申请实施例提供的一种计算机设备的结构示意图;Figure 10 is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

图11是本申请实施例提供的一种数据包去重方法的流程图;Figure 11 is a flowchart of a data packet deduplication method provided in an embodiment of this application;

图12是本申请实施例提供的一种通过备用路径重发数据包的示意图;Figure 12 is a schematic diagram of retransmitting data packets via an alternative path according to an embodiment of this application;

图13是本申请实施例提供的一种第一消息的格式示意图;Figure 13 is a schematic diagram of the format of a first message provided in an embodiment of this application;

图14是本申请实施例提供的基于第一种网络拓扑的一种第一消息的发送路径示意图;Figure 14 is a schematic diagram of the sending path of a first message based on a first network topology provided in an embodiment of this application;

图15是本申请实施例提供的基于第一种网络拓扑的另一种第一消息的发送路径示意图;Figure 15 is a schematic diagram of another first message transmission path based on a first network topology provided in an embodiment of this application;

图16是本申请实施例提供的基于第二种网络拓扑的一种第一消息的发送路径示意图;Figure 16 is a schematic diagram of the sending path of a first message based on a second network topology provided in an embodiment of this application;

图17是本申请实施例提供的基于第二种网络拓扑的另一种第一消息的发送路径示意图;Figure 17 is a schematic diagram of another first message transmission path based on a second network topology provided in an embodiment of this application;

图18是本申请实施例提供的另一种第一消息的格式示意图;Figure 18 is a schematic diagram of another format of the first message provided in an embodiment of this application;

图19是本申请实施例提供的又一种第一消息的格式示意图;Figure 19 is a schematic diagram of another format of the first message provided in an embodiment of this application;

图20是本申请实施例提供的一种数据包头的结构示意图;Figure 20 is a schematic diagram of a data packet header structure provided in an embodiment of this application;

图21是本申请实施例提供的一种接收端设备处理数据包的逻辑示意图;Figure 21 is a logical schematic diagram of a receiving device processing data packets according to an embodiment of this application;

图22是本申请实施例提供的一种交换机内部处理数据包的流程示意图;Figure 22 is a schematic diagram of the internal data packet processing flow of a switch according to an embodiment of this application;

图23是本申请实施例提供的一种重传缓冲区的区间释放逻辑示意图;Figure 23 is a schematic diagram of the interval release logic of a retransmission buffer provided in an embodiment of this application;

图24是本申请实施例提供的一种接收端设备响应去重触发消息的流程示意图;Figure 24 is a schematic diagram of the process of a receiving device responding to a deduplication trigger message according to an embodiment of this application;

图25是本申请实施例提供的一种接收端设备对数据包进行去重的流程示意图;Figure 25 is a schematic diagram of the process of deduplication of data packets by a receiving device according to an embodiment of this application;

图26是本申请实施例提供的一种数据包去重装置的结构示意图;Figure 26 is a schematic diagram of a data packet deduplication device provided in an embodiment of this application;

图27是本申请实施例提供的另一种数据包去重装置的结构示意图。Figure 27 is a schematic diagram of another data packet deduplication device provided in an embodiment of this application.

具体实施方式Detailed Implementation

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

为便于理解,在对本申请实施例提供的数据包去重方法进行解释说明之前,先对本申请实施例涉及的应用背景和实施环境进行介绍。To facilitate understanding, before explaining the data packet deduplication method provided in the embodiments of this application, the application background and implementation environment involved in the embodiments of this application will be introduced first.

首先,对本申请实施例的相关背景进行介绍。First, the relevant background of the embodiments of this application will be introduced.

参见图1,在统一总线(unified bus,UB)协议中,数据链路层支持收发业务报文和链路层控制报文。其中,数据链路层传输报文的最小单元为Flit,1Flit的大小固定为20byte。如图1所示,第一转发设备将数据包的某个Flit从某个端口转发出去后,会将已发送的Flit备份到本地的重传缓冲区(也称为Retry-Buff)。网络中下一跳的第二转发设备在接收到该Flit后,会对该Flit进行循环冗余校验(CRC)校验或解码,当CRC校验正确,或者前向纠错编码(FEC)解码成功后,向第一转发设备返回确认(ACK)消息,以通知第一转发设备释放重传缓冲区,并继续转发该Flit至接收端设备。进一步地,第一转发设备在接收到第二转发设备发送的ACK消息后,会将该Flit备份从重传缓冲区中删除,以释放出重传缓冲区的空间资源。Referring to Figure 1, in the Unified Bus (UB) protocol, the data link layer supports sending and receiving service messages and link layer control messages. The smallest unit of data link layer transmission is a Flit, with a fixed size of 20 bytes. As shown in Figure 1, after the first forwarding device forwards a Flit of a data packet from a certain port, it backs up the sent Flit to its local retransmission buffer (also known as a Retry-Buff). Upon receiving this Flit, the second forwarding device in the next hop of the network performs a Cyclic Redundancy Check (CRC) check or decodes it. If the CRC check is correct, or the Forward Error Correction (FEC) decoding is successful, it returns an ACK message to the first forwarding device to notify it to release the retransmission buffer and continue forwarding the Flit to the receiving device. Furthermore, after receiving the ACK message from the second forwarding device, the first forwarding device deletes the Flit backup from the retransmission buffer to free up space resources in the retransmission buffer.

其中,CRC校验是一种常用的错误检测方法,用于检查数据传输过程中是否发生了错误。如果CRC校验正确,说明Flit在传输过程中没有发生错误。FEC解码则是一种更高级的错误纠正方法,它不仅能检测错误,还能在某些情况下纠正这些错误。如果FEC解码成功,说明Flit即使有错误也被成功纠正了。CRC checksum is a commonly used error detection method used to check whether errors occurred during data transmission. If the CRC checksum is correct, it means that no errors occurred during Flit transmission. FEC decoding is a more advanced error correction method; it can not only detect errors but also correct them in some cases. If FEC decoding is successful, it means that even if Flit had errors, they were successfully corrected.

在一种可能的实现方式中,第一转发设备和第二转发设备可以为交换机,也可以为路由器,还可以其他能够转发数据报文的网络设备,例如计算芯片上的交换模块,本申请实施例对此不做限制。In one possible implementation, the first forwarding device and the second forwarding device can be a switch, a router, or other network devices capable of forwarding data packets, such as a switching module on a computing chip. This application does not limit this.

在一种可能的实现方式中,ACK消息可以通过链路层数据包的头部携带,例如链路层数据包头部(linkpacket header,LPH)或者链路层数据块头部(linkblock header,LBH)的ACK域段;或者,ACK消息也可以通过一种特殊的Flit来发送,例如通过CRD(全称为credit,一种流量控制机制)消息,来告知第一转发设备数据报文Flit已成功接收。In one possible implementation, the ACK message can be carried in the header of the link layer packet, such as the ACK field of the link layer packet header (LPH) or the link layer block header (LBH); or, the ACK message can also be sent through a special Flit, such as through a CRD (credit, a flow control mechanism) message, to inform the first forwarding device that the data packet Flit has been successfully received.

应该理解的是,LPH作为链路层数据包的头部,它包含了关于数据包的各种信息,如源地址、目的地址、数据长度、协议类型等。在数据传输过程中,LPH可以帮助网络设备识别和处理数据包。当一个较大的数据包(例如长度超过32Flit)被切分为多个数据块(block)进行分段传输,LBH指的是一个数据块的头部,与LPH类似,LBH也包含了关于数据块的信息,可能包括数据块的长度、类型、校验和等。在通信协议中,CRD通常用于流量控制,表示接收端可以接收的数据量,简单来说,CRD是一个计数器或令牌系统,用于防止发送端发送过多数据而导致接收端缓冲区溢出,因此,当接收端有足够的缓冲区来接收新数据时,它会发送CRD消息给发送端,告诉发送端它可以继续发送多少数据。It should be understood that the LPH (Link Layer Header), as the header of a link-layer data packet, contains various information about the packet, such as source address, destination address, data length, and protocol type. During data transmission, the LPH helps network devices identify and process data packets. When a large data packet (e.g., longer than 32 folds) is segmented into multiple blocks for transmission, the LBH (Block Header) refers to the header of a block. Similar to the LPH, the LBH also contains information about the block, possibly including its length, type, and checksum. In communication protocols, CRD (Flow Control Token) is typically used for flow control, indicating the amount of data the receiver can receive. Simply put, a CRD is a counter or token system used to prevent the sender from sending too much data and causing the receiver's buffer to overflow. Therefore, when the receiver has enough buffer space to receive new data, it sends a CRD message to the sender, informing the sender how much more data it can continue sending.

在数据链路层传输报文的过程中,第二转发设备在接收到数据报文Flit之后,若对该Flit进行CRC校验出错,或者FEC解码失败时,会请求第一转发设备重发Flit。而第一转发设备响应于该重传请求,将重传缓冲区中备份的数据报文Flit重新发送给第二转发设备。During data link layer packet transmission, if the second forwarding device encounters a CRC check error or FEC decoding failure after receiving the data packet Flit, it will request the first forwarding device to retransmit the Flit. In response to this retransmission request, the first forwarding device will resend the backup data packet Flit from its retransmission buffer to the second forwarding device.

同理,基于重传的数据报文Flit,若CRC校验正确,或者前向纠错编码(FEC)解码成功,则第二转发设备会向第一转发设备返回ACK消息,以通知第一转发设备释放重传缓冲区,并继续转发该Flit至接收端设备。Similarly, for a retransmitted data packet Flit, if the CRC check is correct or the forward error correction coding (FEC) is successfully decoded, the second forwarding device will return an ACK message to the first forwarding device to notify the first forwarding device to release the retransmission buffer and continue to forward the Flit to the receiving device.

在实际应用中,总线协议更多的是应用在机框内,例如外围器件互连总线(peripheral component interconnect express,PCI-E)。其中,机框内设备之间是通过电缆连接,其通信可靠性是非常高的。但随着总线网络规模变大,需要使用光模块实现跨机柜连接。然而,光口的原生可靠性,比电缆低了一个数量级以上,因此,若网络系统中应用了大量用了光口,则可能出现闪断(即光信号中断)问题。In practical applications, bus protocols are mostly used within the chassis, such as the Peripheral Component Interconnect Express (PCI-E). Within this chassis, devices are connected via cables, ensuring very high communication reliability. However, as bus networks grow larger, optical modules are needed to achieve cross-rack connections. However, the native reliability of optical ports is more than an order of magnitude lower than that of cables. Therefore, if a large number of optical ports are used in a network system, intermittent signal interruptions (i.e., optical signal outages) may occur.

作为一个示例,在一个包含12个block的网络,每个block大约包含32台服务器,每个服务器上游40个端口(可能是网络接口卡或者CPU核心等资源的抽象)的情况下,整个网络大约包含12*32*40=15360台服务器的网络。针对该网络,每个小时发生端口状态变化(例如端口up和down,可能是网络故障、服务器重启等原因造成的)的概率是3次,即在一个小时内,平均有三个端口会发生状态变化,无论是由于光看闪断还是服务器本身的开关机。另外,一个光模块发生闪断的概率是2.1%,这通常是由于光缆断裂、光模块故障、灰尘污染等原因导致的。基于此,在一个1024P(具有1024个处理单元或端口)的超节点中,光模块数量可以达到8000个,这意味着在一个大型的超节点中,有大量的光模块用于数据通信,而根据上述的光模块闪断概率,每天在一个1024P的超节点中,预期的光模块闪断次数是8000*2.1%/365=0.46次。由此可见,在应用光口的网络系统中,每天都可能发生一定数量的闪断事件。As an example, in a network containing 12 blocks, with each block containing approximately 32 servers, and each server having 40 upstream ports (which could be abstractions of resources such as network interface cards or CPU cores), the entire network would contain approximately 12 * 32 * 40 = 15360 servers. For this network, the probability of a port status change (e.g., port up and down, possibly due to network failures, server restarts, etc.) occurring 3 times per hour is 15360. This means that on average, three ports will experience status changes per hour, regardless of whether it's due to intermittent interruptions or server power cycles. Additionally, the probability of an optical module experiencing an intermittent interruption is 2.1%, typically caused by fiber optic cable breaks, optical module malfunctions, dust contamination, etc. Based on this, in a 1024P (with 1024 processing units or ports) supernode, the number of optical modules can reach 8000. This means that in a large supernode, a large number of optical modules are used for data communication. According to the aforementioned optical module outage probability, the expected number of optical module outages per day in a 1024P supernode is 8000 * 2.1% / 365 = 0.46 times. Therefore, it is evident that in network systems using optical ports, a certain number of outage events may occur daily.

作为一个示例,参见图2,在第一种网络拓扑(2D Torus组网架构)中,节点8正在与节点7经由主路径通信,节点9与节点10之间的链路发生故障后,节点10将所有攒齐的数据包发往节点7。节点9在检测到链路故障之后,会通过快速重路由(fast reroute,简称为FRR)确定备用路径,并沿着备用路径重新发送重传缓冲区中的数据包给节点7。As an example, referring to Figure 2, in the first network topology (2D Torus network architecture), node 8 is communicating with node 7 via the primary path. After a link failure occurs between node 9 and node 10, node 10 sends all the collected data packets to node 7. After detecting the link failure, node 9 determines an alternative path through fast reroute (FRR) and retransmits the data packets in the retransmission buffer to node 7 along the alternative path.

其中,节点8和节点7之间传输数据包时,其通信的主路径可以为节点8-节点9-节点10-节点11-节点7,通信的备用路径可以为节点8-节点9-节点5-节点6-节点7。When transmitting data packets between node 8 and node 7, the primary communication path can be node 8-node 9-node 10-node 11-node 7, and the backup communication path can be node 8-node 9-node 5-node 6-node 7.

然而,节点9在重发重传缓冲区中数据包时,其中可能包含了因为链路故障而无法收到节点10返回ACK消息的数据包,即这些数据包已经过节点10发往节点7,此时节点7有可能收到重复的数据包,这些重复数据包可能会破坏数据一致性、原子性、并发控制以及造成资源浪费等,会影响写和原子操作等的正确性,无法保证节点7能够恰好一次(exactly once)的处理网络转发的数据包。However, when Node 9 retransmits data packets in the retransmission buffer, these packets may include data packets that could not receive the ACK message from Node 10 due to link failure. In other words, these data packets have already been sent to Node 7 by Node 10. At this time, Node 7 may receive duplicate data packets. These duplicate data packets may compromise data consistency, atomicity, concurrency control, and cause resource waste, affecting the correctness of write and atomic operations. It cannot be guaranteed that Node 7 can process network-forwarded data packets exactly once.

作为另一个示例,参见图3,在第二种网络拓扑(Clos组网架构)中,处理器单元中的节点A正在与节点H经由主路径通信,网络拓扑中接入层的节点Leaf 1与核心层的节点Spine 1之间的链路发生故障后,节点Spine 1将所有攒齐的数据包发往节点H。节点Leaf 1在检测到链路故障之后,会通过FRR确定备用路径,并沿着备用路径重新发送重传缓冲区中的数据包给节点H。As another example, referring to Figure 3, in the second network topology (Clos networking architecture), node A in the processor unit is communicating with node H via the main path. After a link failure occurs between node Leaf 1 in the access layer and node Spine 1 in the core layer, node Spine 1 sends all the collected data packets to node H. After detecting the link failure, node Leaf 1 determines an alternative path through FRR and retransmits the data packets in the retransmission buffer to node H along the alternative path.

其中,节点A和节点H之间传输数据包时,其通信的主路径可以为节点A-节点Leaf 1-节点Spine 1-节点Leaf n-节点H,通信的备用路径可以为节点A-节点Leaf 1-节点Spine 16-节点Leaf n-节点H。When transmitting data packets between node A and node H, the primary communication path can be node A - node Leaf 1 - node Spine 1 - node Leaf n - node H, and the alternative communication path can be node A - node Leaf 1 - node Spine 16 - node Leaf n - node H.

然而,节点Leaf 1在重发重传缓冲区中数据包时,其中可能包含了因为链路故障而无法收到节点Spine1返回ACK消息的数据包,即这些数据包已经过节点Spine 1发往节点H,此时节点H有可能收到重复的数据包,这些重复数据包可能会破坏数据一致性、原子性、并发控制以及造成资源浪费等,会影响写和原子操作等的正确性,无法保证节点H能够恰好一次(exactly once)地处理网络转发的数据包。However, when Leaf 1 retransmits data packets in its retransmission buffer, these packets may include those that cannot receive ACK messages from Spine 1 due to link failures. In other words, these packets have already been sent to node H by Spine 1. At this point, node H may receive duplicate data packets. These duplicate data packets may compromise data consistency, atomicity, concurrency control, and cause resource waste, affecting the correctness of write and atomic operations. It cannot be guaranteed that node H can process network-forwarded data packets exactly once.

综上所述,在UB系统中的多个节点通过网络进行通信时,如何保证接收端设备的能够恰好一次(exactly once)的处理网络转发的数据包成为亟待解决的技术问题。In summary, when multiple nodes in a UB system communicate through a network, ensuring that the receiving device can process the network-forwarded data packets exactly once is a pressing technical problem that needs to be solved.

针对上述技术问题,相关技术中也有提供对应的解决方案,为便于对比说明本申请实施例所提供的解决方案,在此先对相关技术中所提供的解决方案进行简单介绍。In view of the above-mentioned technical problems, corresponding solutions have been provided in related technologies. To facilitate comparison and explanation of the solutions provided in the embodiments of this application, the solutions provided in related technologies will be briefly introduced here first.

在一种相关技术中,请参考图4所示的UB-G域(UB-Global,简称为UB-G)协议栈示意图,UB-G中完整的传输层用于提供可靠传输服务和不可靠传输服务。UB-G域指的是基于UB-G技术或标准构建的一个特定功能域或系统范围,在分布式系统中,域(domain)通常指的是一组逻辑上相关或具有共同功能特性的系统组件或服务的集合。In one related technology, please refer to Figure 4, which shows a schematic diagram of the UB-G domain (UB-Global, abbreviated as UB-G) protocol stack. The complete transport layer in UB-G is used to provide both reliable and unreliable transport services. A UB-G domain refers to a specific functional domain or system scope built based on UB-G technology or standards. In distributed systems, a domain typically refers to a collection of logically related system components or services that share common functional characteristics.

其中,UB可靠传输服务是通过包序列号(Packet Sequence Number,PSN)来检测重复包和网络丢包,以实现可靠传输数据包的目的。其中,PSN携带在传输层报文头(transport packet header,TPH)中,接收端设备每返回一个传输(transport,简称为TP)连接的ACK消息(也称为TPACK消息),PSN的值加1。在具体实现时,发送端设备和接收端设备在建立TP连接时,双方会协商PSN的初始值,PSN的初始值在0~16M-1之间随机。其中,PSN初始值就是第一个数据包携带的PSN值。UB's reliable transport service detects duplicate packets and network packet loss using Packet Sequence Numbers (PSNs) to achieve reliable data packet transmission. The PSN is carried in the transport packet header (TPH). The receiving device increments the PSN value by 1 for each ACK message (also called a TPACK message) returned for a transport (TP) connection. In practice, the sending and receiving devices negotiate an initial PSN value when establishing a TP connection; this initial value is randomized between 0 and 16M-1. The initial PSN value is the same as the PSN value carried in the first data packet.

在一种实现方式中,接收端设备返回TP ACK消息时,该TPACK消息可以携带累积的PSN值,以表示累积PSN的数据包已全部正确接收。例如,若接收端设备接收到来自发送端设备的10数据包,这10个数据包的PSN值分别从1到10,此时接收端设备可以聚合所有的ACK消息为一个消息,即一个PSN值为10的TPACK消息,以通过向发送端设备发送该TPACK消息来告知发送端设备PSN为10的数据包,以及之前的所有数据包均已全部正确接收到。In one implementation, when the receiving device returns a TP ACK message, the TP ACK message can carry the accumulated PSN value to indicate that all packets with the accumulated PSN have been correctly received. For example, if the receiving device receives 10 packets from the sending device, and the PSN values of these 10 packets range from 1 to 10, the receiving device can aggregate all the ACK messages into one message, namely a TP ACK message with a PSN value of 10, and send this TP ACK message to the sending device to inform the sending device that the packet with PSN 10, as well as all previous packets, have been correctly received.

需要说明的是,PSN值只作用在一个TP连接内部,不同TP连接之间的PSN的取值完全独立,无任何关联。It should be noted that the PSN value only applies within a single TP connection. The PSN values of different TP connections are completely independent and have no correlation.

作为一个示例,参见图5,PSN值的位宽为24bit,表示范围0~16M-1;发送端设备发出的PSN值的outstanding请求数最大为8M,即发出的最大PSN值减去等待应答的最小PSN值不超过8M-1。其中,发送端设备的outstanding请求指的是在给定时间段内,可以同时向存储器或其他目标设备提交的未完成请求数量,这些请求可能包括数据包、读写操作等,它们已经发送但尚未收到确认或完成。As an example, referring to Figure 5, the PSN value has a bit width of 24 bits, representing a range of 0 to 16M-1. The maximum number of outstanding requests for PSN values sent by the sending device is 8M, meaning that the maximum PSN value sent minus the minimum PSN value awaiting acknowledgment does not exceed 8M-1. Here, the outstanding request from the sending device refers to the number of incomplete requests that can be submitted simultaneously to the memory or other target devices within a given time period. These requests may include data packets, read/write operations, etc., which have been sent but have not yet received acknowledgment or completion.

如图5所示,若等待应答的最小PSN值=0,则允许发送的最大PSN值=8M-1(即8388607);若等待应答的最小PSN值=8M(即8388608),则允许发送的最大PSN值=16M-1(即16777215);若等待应答的最小PSN值=10M(即1048576),则允许发送的最大PSN值=18M-1(即18874367),由于18M-1超过24bit的表示范围,存在高位溢出,即允许发送的最大PSN=2M-1(即2097151)。As shown in Figure 5, if the minimum PSN value waiting for acknowledgment is 0, then the maximum PSN value allowed to be sent is 8M-1 (i.e., 8388607); if the minimum PSN value waiting for acknowledgment is 8M (i.e., 8388608), then the maximum PSN value allowed to be sent is 16M-1 (i.e., 16777215); if the minimum PSN value waiting for acknowledgment is 10M (i.e., 1048576), then the maximum PSN value allowed to be sent is 18M-1 (i.e., 18874367). Since 18M-1 exceeds the 24-bit representation range, there is a high-bit overflow, that is, the maximum PSN allowed to be sent is 2M-1 (i.e., 2097151).

对于接收端设备而言,期望收到PSN(expected PSN,EPSN)指的是期望收到的正序PSN。例如PSN值=5的数据包已经被接收端设备成功接收,且PSN值=5的数据包不是乱序包,则接收端设备EPSN值=6。For the receiving device, the expected PSN (EPSN) refers to the expected forward-order PSN. For example, if a data packet with PSN value = 5 has been successfully received by the receiving device, and the data packet with PSN value = 5 is not out-of-order, then the receiving device's EPSN value is 6.

此外,发送端设备不会发送PSN值超过8M的outstanding请求,所以,EPSN取值对应的[EPSN-8M,EPSN-1]区间为重复包区间。In addition, the sending device will not send outstanding requests with PSN values exceeding 8M. Therefore, the range [EPSN-8M, EPSN-1] corresponding to EPSN values is the duplicate packet range.

基于此,接收端设备保证exactly once的实现过程可以为:接收到数据包之后,接收端设备会基于数据包的PSN值,先判断该数据包落在重复区间、乱序区间,还是无效区间中。如果数据包的PSN值落在重复区间,则丢弃该数据包,并向发送端设备返回ACK消息,该ACK消息中所携带的PSN值等于接收端设备的EPSN值减1;如果数据包的PSN值等于接收端设备的EPSN值,则接收该数据包,并向发送端设备返回ACK消息,该ACK消息中所携带的PSN值等于接收端设备的EPSN值;如果数据包的PSN值落在最大允许乱序区间,则接收该数据包,并向发送端设备返回选择性确认(selective ACK,SACK)消息;如果数据包的PSN值落在无效区间,则直接丢弃该数据包。Based on this, the receiving device's process for ensuring exactly once can be as follows: After receiving a data packet, the receiving device first determines whether the data packet falls within a duplicate range, an out-of-order range, or an invalid range based on the data packet's PSN value. If the data packet's PSN value falls within a duplicate range, the receiving device discards the data packet and returns an ACK message to the sending device. The PSN value carried in this ACK message is equal to the receiving device's EPSN value minus 1. If the data packet's PSN value is equal to the receiving device's EPSN value, the receiving device receives the data packet and returns an ACK message to the sending device. The PSN value carried in this ACK message is equal to the receiving device's EPSN value. If the data packet's PSN value falls within the maximum allowed out-of-order range, the receiving device receives the data packet and returns a selective ACK (SACK) message to the sending device. If the data packet's PSN value falls within an invalid range, the data packet is discarded directly.

然而,在上述解决方案中,接收端设备收到的所有数据包都要经过UB-G传输层,UB-G传输层的资源面积占接收端设备的资源面积为3平方毫米,处理速度为200Mpps,其中,pps全称为packet per second,指的是每秒发送多少个分组数据包。可见,如要达到UB-C域(UB-Clan,简称为UB-C)中1Gpps的吞吐要求,上述解决方案需要在接收端设备中额外增加12平方毫米的资源面积,资源开销太大,导致接收端设备不太能负荷。However, in the above solution, all data packets received by the receiving device must pass through the UB-G transport layer. The UB-G transport layer occupies 3 square millimeters of the receiving device's resource area and has a processing speed of 200 Mpps. Here, pps stands for packets per second, referring to the number of data packets sent per second. Therefore, to achieve the 1 Gpps throughput requirement in the UB-C domain (UB-Clan, or UB-C for short), the above solution requires an additional 12 square millimeters of resource area in the receiving device. This resource overhead is too large, making it difficult for the receiving device to handle the load.

同理,这里的UB-C是指基于UB总线技术的一个特定集合或域。Similarly, UB-C here refers to a specific set or domain based on UB bus technology.

在另一种相关技术中,请参考图6所示的UB-C协议栈示意图。在UB-C协议栈中,轻量级的传输层没有TP连接,其可靠传输服务依赖UB链路层(linklayer)的重传机制来保证端到端传输数据包时不存在丢包情况。In another related technology, please refer to the UB-C protocol stack diagram shown in Figure 6. In the UB-C protocol stack, the lightweight transport layer does not have a TP connection, and its reliable transmission service relies on the retransmission mechanism of the UB link layer to ensure that there is no packet loss when transmitting data packets end-to-end.

然而,上述UB-C协议中轻量级的传输层只能解决丢包检测问题,但无法解决接收端设备接收到重复包的问题,即无法保证接收端设备的能够恰好一次的处理网络转发的数据包。However, the lightweight transport layer in the UB-C protocol can only solve the packet loss detection problem, but cannot solve the problem of the receiving device receiving duplicate packets, that is, it cannot guarantee that the receiving device can process the network forwarded data packets exactly once.

基于上述两种解决方案,本申请实施例提供了一种数据包去重方法,可以应用于UB-C中轻量级的传输层中。在本申请实施例所提供的数据包去重方法中,网络中的转发设备在检测到当前传输数据包的目标通信路径存在故障且进行FRR之后,会为接下来沿着备用路径重传的数据包打上重传标识,以指示接收端设备该数据包为重传数据包。基于此,接收端设备在接收到数据包之后,会解析该数据包,以判断数据包中是否携带重传标识,若数据包携带有重传标识,则根据去重匹配表对该数据包进行去重处理,以使接收端设备中不存在重复的数据包。其中,去重匹配表存储有接收端设备已接收到的数据包的信息。由此可见,本申请实施例仅对少量携带重传标识的数据包进行去重处理,较UB-G中基于PSN值判断和处理每个数据包的方案而言,实现了轻量级的去重,且保证了接收端设备的能够恰好一次的处理网络转发的数据包。Based on the two solutions described above, this application provides a data packet deduplication method that can be applied to the lightweight transport layer in UB-C. In the data packet deduplication method provided in this application, after a forwarding device in the network detects a fault in the target communication path of the currently transmitted data packet and performs a First Retransmission (FRR), it marks the subsequent data packets retransmitted along the backup path with a retransmission flag to indicate to the receiving device that the data packet is a retransmitted data packet. Based on this, after receiving the data packet, the receiving device parses the data packet to determine whether it carries a retransmission flag. If the data packet carries a retransmission flag, it performs deduplication processing on the data packet according to a deduplication matching table to ensure that there are no duplicate data packets in the receiving device. The deduplication matching table stores information about the data packets already received by the receiving device. Therefore, this application only performs deduplication processing on a small number of data packets carrying retransmission flags. Compared to the UB-G scheme that judges and processes each data packet based on the PSN value, it achieves lightweight deduplication and ensures that the receiving device can process network-forwarded data packets exactly once.

接下来,对本申请实施例涉及的应用场景和实施环境进行介绍。Next, the application scenarios and implementation environments involved in the embodiments of this application will be introduced.

本申请实施例提供的数据包去重方法可以应用在数据中心场景中,参见图7,该数据中心可以为UB-C紧耦合系统(如超级节点)、UB-G松耦合分布式系统等。其中,UB-C紧耦合系统指RACK或超节点,里面不同的计算节点、主机设备通过高速的网络连接到一起。UB-G是一个由UB链接的松耦合分布式系统,支持分布式系统节点间的对等互连,可与现有的网际互连协议(internet protocol,IP)、以太网(ethernet,简称为Eth)网络互通。The data packet deduplication method provided in this application embodiment can be applied in data center scenarios. Referring to Figure 7, the data center can be a tightly coupled UB-C system (such as a supernode) or a loosely coupled UB-G system. Here, a tightly coupled UB-C system refers to a RACK or supernode, where different computing nodes and host devices are connected together via a high-speed network. UB-G is a loosely coupled distributed system linked by UBs, supporting peer-to-peer interconnection between distributed system nodes and interoperable with existing Internet Protocol (IP) and Ethernet (Eth) networks.

请参考图8,在实现上述数据包去重方法时,本申请实施例所涉及的硬件设备包括网络中的转发设备(例如交换机、路由器等)和接收端设备。其中,接收端设备可以为独立的计算节点,也可以为某一网络设备,本申请实施例对此不做限制。Please refer to Figure 8. When implementing the above data packet deduplication method, the hardware devices involved in this application embodiment include forwarding devices (such as switches, routers, etc.) and receiving devices in the network. The receiving device can be an independent computing node or a network device; this application embodiment does not impose any restrictions on this.

需要说明的是,对于位于发送端设备和接收端设备之间的转发设备,每条通信路径上可以包括一个转发设备,也可以包括多个转发设备。也即是,转发设备可以与接收端设备直接连接,也可以通过至少一个其他转发设备与接收端设备连接,本申请实施例对此不做限制。It should be noted that for the forwarding device located between the sending device and the receiving device, each communication path may include one forwarding device or multiple forwarding devices. That is, the forwarding device can be directly connected to the receiving device, or it can be connected to the receiving device through at least one other forwarding device. This application embodiment does not impose any restrictions on this.

请参考图9,图9是本申请实施例提供的一种网络设备的结构示意图,该网络设备可以为交换机、路由器等具备数据包转发功能的设备。在本申请实施例中,该网络设备作为数据包的转发设备,来执行数据包去重方法中对应的步骤。Please refer to Figure 9, which is a schematic diagram of a network device provided in an embodiment of this application. This network device can be a switch, router, or other device with packet forwarding capabilities. In this embodiment, the network device acts as a packet forwarding device to perform the corresponding steps in the packet deduplication method.

如图9所示,在本申请实施例中,网络设备包括:主控板910、接口板930和接口板940。多个接口板的情况下可以包括交换网板(图9中未示出),该交换网板用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。As shown in Figure 9, in this embodiment of the application, the network device includes: a main control board 910, an interface board 930, and an interface board 940. In the case of multiple interface boards, a switching network board (not shown in Figure 9) may be included, which is used to complete data exchange between the interface boards (interface boards are also called line cards or service boards).

主控板910用于完成系统管理、设备维护、协议处理等功能。接口板930和940用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现数据流的转发。主控板910上主要有3类功能单元:系统管理控制单元、系统时钟单元和系统维护单元。主控板910、接口板930以及接口板940之间通过系统总线与系统背板相连实现互通。接口板930上包括一个或多个处理器931。处理器931用于对接口板进行控制管理并与主控板上的中央处理器进行通信,以及用于数据流的转发处理。接口板930上的存储器932用于存储转发表项,处理器931通过查找存储器932中存储的转发表项进行数据流的转发。The main control board 910 performs functions such as system management, equipment maintenance, and protocol processing. Interface boards 930 and 940 provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and forward data streams. The main control board 910 primarily has three types of functional units: a system management control unit, a system clock unit, and a system maintenance unit. The main control board 910, interface boards 930 and 940 communicate with each other via a system bus connected to the system backplane. Interface board 930 includes one or more processors 931. Processors 931 control and manage the interface boards, communicate with the central processing unit on the main control board, and handle data stream forwarding. The memory 932 on interface board 930 stores forwarding table entries; processors 931 forward data streams by searching the forwarding table entries stored in memory 932.

接口板930包括一个或多个网络接口933用于接收其他设备发送的数据流或者其他信息,并根据处理器931的指示对这些数据流或者数据进行处理。具体实现过程这里不再逐一赘述。The interface board 930 includes one or more network interfaces 933 for receiving data streams or other information sent by other devices, and processing these data streams or information according to the instructions of the processor 931. The specific implementation process will not be described in detail here.

可以理解,如图9所示,本申请实施例中包括多个接口板,采用分布式的转发机制,这种机制下,接口板940上的操作与接口板930的操作基本相似,为了简洁,不再赘述。此外,可以理解的是,图9中的接口板930中的处理器931和/或941可以是专用硬件或芯片,如网络处理器或者专用集成电路(ASIC)来实现上述功能,这种实现方式即为通常所说的转发面采用专用硬件或芯片处理的方式。当然,处理器931和/或941也可以采用通用的处理器,如通用的CPU来实现以上描述的功能。As shown in Figure 9, this embodiment includes multiple interface boards and employs a distributed forwarding mechanism. Under this mechanism, the operations on interface board 940 are essentially similar to those on interface board 930, and will not be elaborated further for simplicity. Furthermore, it is understood that the processors 931 and/or 941 in interface board 930 of Figure 9 can be dedicated hardware or chips, such as network processors or application-specific integrated circuits (ASICs), to implement the aforementioned functions. This implementation method is commonly referred to as using dedicated hardware or chips for the forwarding plane. Of course, processors 931 and/or 941 can also use general-purpose processors, such as general-purpose CPUs, to implement the functions described above.

此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,该网络设备的数据处理能力越强,提供的接口板越多。多块接口板的情况下,该多块接口板之间可以通过一块或多块交换网板通信,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,该网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,该网络设备包括多块接口板,可以通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。因此,分布式架构的网络设备的数据接入和处理能力,大于集中式架构的网络设备的数据接入和处理能力,具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。Furthermore, it should be noted that there may be one or more main control boards, including a primary main control board and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of the network device, the more interface boards it provides. With multiple interface boards, these boards can communicate through one or more switching network boards, enabling load sharing and redundancy backup. In a centralized forwarding architecture, the network device may not require a switching network board; the interface boards handle the processing of the entire system's business data. In a distributed forwarding architecture, the network device includes multiple interface boards, which can exchange data with each other through a switching network board, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture network device. The specific architecture adopted depends on the specific network deployment scenario, and no limitations are made here.

在一些实施例中,存储器932可以是只读存储器(read-only memory,ROM),也可以是随机存取存储器(random access memory,RAM),也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、光盘包括(只读光盘(compact disc read-only Memory,CD-ROM)、压缩光盘、激光盘、数字通用光盘、蓝光光盘等)、磁盘存储介质或者其它磁存储设备、或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器932可以是独立存在,并通过通信总线与处理器931相连接。存储器932也可以和处理器931集成在一起。In some embodiments, memory 932 may be read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical discs (including compact disc read-only memory (CD-ROM), compressed optical discs, laser discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code having an instruction or data structure form and accessible by a computer, but not limited thereto. Memory 932 may exist independently and be connected to processor 931 via a communication bus. Memory 932 may also be integrated with processor 931.

在一些实施例中,网络接口933可以是使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。网络接口933包括有线网络接口,还可以包括无线网络接口。其中,有线网络接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线网络接口可以为WLAN接口,蜂窝网络通信接口或其组合等。当该网络设备作为域内的任一网络设备时,网络接口933用于向其他网络设备转发数据报文。在该网络设备作为域内的头节点,网络接口933还可以用于与接收端设备进行通信,例如向接收端设备发送数据包和去重触发消息。In some embodiments, network interface 933 can be a transceiver-like device used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. Network interface 933 includes a wired network interface and may also include a wireless network interface. The wired network interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless network interface can be a WLAN interface, a cellular network communication interface, or a combination thereof. When the network device acts as any network device within a domain, network interface 933 is used to forward data packets to other network devices. When the network device acts as a head node within a domain, network interface 933 can also be used to communicate with receiving devices, for example, sending data packets and deduplication trigger messages to the receiving devices.

在一些实施例中,网络设备可以包括多个处理器,这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In some embodiments, a network device may include multiple processors, each of which may be a single-core processor or a multi-core processor. Here, a processor may refer to one or more devices, circuits, and/or processing cores used to process data (such as computer program instructions).

在一些实施例中,存储器932用于存储执行本申请方案的计算机程序,处理器931可以执行存储器932中存储的计算机程序,促使网络设备执行下文方法实施例中转发设备的处理步骤,具体实现可以参照方法实施例中的详细介绍,这里不再赘述。In some embodiments, the memory 932 is used to store a computer program that executes the scheme of this application. The processor 931 can execute the computer program stored in the memory 932 to cause the network device to perform the processing steps of the forwarding device in the method embodiments below. For specific implementation, please refer to the detailed description in the method embodiments, which will not be repeated here.

请参考图10,图10是本申请实施例提供的一种计算机设备的结构示意图,该计算机设备可以为终端设备或服务器。在本申请实施例中,该计算机设备作为接收端设备,来执行数据包去重方法中对应的步骤。如图10所示,在本申请实施例中,该计算机设备包括至少一个处理器101、通信总线102、存储器103以及至少一个通信接口104。Please refer to Figure 10, which is a schematic diagram of a computer device provided in an embodiment of this application. This computer device can be a terminal device or a server. In this embodiment, the computer device acts as a receiving device to execute the corresponding steps in the data packet deduplication method. As shown in Figure 10, in this embodiment, the computer device includes at least one processor 101, a communication bus 102, a memory 103, and at least one communication interface 104.

处理器101可以是一个通用中央处理器(central processing unit,CPU)、网络处理器(network processor,NP)、微处理器、或者可以是一个或多个用于实现本申请方案的集成电路,例如,专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。Processor 101 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

通信总线102用于在上述组件之间传送信息。通信总线102可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 102 is used to transmit information between the aforementioned components. The communication bus 102 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in Figure 10, but this does not mean that there is only one bus or one type of bus.

存储器103可以是只读存储器(read-only memory,ROM),也可以是随机存取存储器(randomaccess memory,RAM),也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、光盘(包括只读光盘(compact disc read-only memory,CD-ROM)、压缩光盘、激光盘、数字通用光盘、蓝光光盘等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器103可以是独立存在,并通过通信总线102与处理器101相连接。存储器103也可以和处理器101集成在一起。The memory 103 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile optical disc, a Blu-ray disc, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto. The memory 103 may exist independently and be connected to the processor 101 via the communication bus 102. The memory 103 may also be integrated with the processor 101.

通信接口104使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口104包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口、电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口、蜂窝网络通信接口或其组合等。Communication interface 104 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 104 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.

作为一种示例,处理器101可以包括一个或多个CPU,如图10中所示的CPU0和CPU1。As an example, processor 101 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG10.

作为一种示例,计算机设备可以包括多个处理器,如图10中所示的处理器101和处理器105。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。As an example, a computer device may include multiple processors, such as processor 101 and processor 105 as shown in Figure 10. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" may refer to one or more devices, circuits, and/or processing cores used to process data (such as computer program instructions).

在一些实施例中,计算机设备还可以包括输出设备和输入设备。输出设备和处理器101通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二极管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器101通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。In some embodiments, the computer device may further include output devices and input devices. The output device communicates with the processor 101 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with the processor 101 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.

在一些实施例中,存储器103用于存储执行本申请方案的程序代码110,处理器101可以执行存储器103中存储的程序代码110。该程序代码110中可以包括一个或多个软件模块,该计算机设备可以通过处理器101以及存储器103中的程序代码110,来实现下文方法实施例中接收端设备的处理步骤,具体实现可以参照下文方法实施例中的详细介绍,这里不再赘述。In some embodiments, memory 103 is used to store program code 110 for executing the scheme of this application, and processor 101 can execute the program code 110 stored in memory 103. The program code 110 may include one or more software modules. The computer device can implement the processing steps of the receiving device in the following method embodiments through processor 101 and program code 110 in memory 103. For specific implementation, please refer to the detailed description in the following method embodiments, which will not be repeated here.

需要说明的是,在一些通信网络架构(例如Torus组网架构)中,计算机设备或者计算节点本身也可以作为转发设备,来转发数据包,在此情况下,发送端设备、转发设备、接收端设备均可以为独立的计算机设备,例如服务器、终端、处理器单元、处理器芯片等,本申请对此不做限制。It should be noted that in some communication network architectures (such as Torus networking architecture), computer devices or computing nodes themselves can also act as forwarding devices to forward data packets. In this case, the sending device, forwarding device, and receiving device can all be independent computer devices, such as servers, terminals, processor units, processor chips, etc. This application does not impose any restrictions on this.

应当理解的是,本申请实施例描述的网络架构、设备架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构、设备架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be understood that the network architecture, device architecture, and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and device architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

接下来,结合附图对本申请实施例所提供的数据包去重方法进行详细的解释说明。Next, the data packet deduplication method provided in the embodiments of this application will be explained in detail with reference to the accompanying drawings.

请参考图11,图11是本申请实施例提供的一种数据包去重方法的流程图,该方法应用于接收端设备,该方法包括如下步骤。Please refer to Figure 11, which is a flowchart of a data packet deduplication method provided in an embodiment of this application. The method is applied to a receiving device and includes the following steps.

步骤1101:接收第一数据包。Step 1101: Receive the first data packet.

对于从发送端设备发往接收端设备的数据包,在发送端设备将该数据包从网络中发出后,该数据包可能会通过多个转发设备依次进行转发,最终转发至接收端设备。For a data packet sent from the sending device to the receiving device, after the sending device sends the data packet out of the network, the data packet may be forwarded by multiple forwarding devices in sequence before finally being forwarded to the receiving device.

在网络中多个转发设备转发数据包的过程中,可能会存在某些网络设备发生故障,或者网络设备之间的链路发生故障的情况,此时,为保证接收端设备可以正常接收到对应的数据包,已转发数据包的第一转发设备会基于自身的重传缓冲区中备份的数据包,在通过FRR确定备用路径后,沿着备用路径向接收端设备重传数据包。在此情况下,而对于接收端设备而言,其所接收到的第一数据包可能的故障后首次发送的数据包,也可能是故障后重传的数据包。In a network, during the forwarding of data packets by multiple forwarding devices, some network devices may malfunction, or the links between network devices may fail. In such cases, to ensure the receiving device can receive the corresponding data packets, the first forwarding device that forwarded the data packets will, based on the backup data packets in its retransmission buffer, determine an alternative path using FRR (Fault Reset) and retransmit the data packets to the receiving device along the alternative path. In this scenario, the first data packet received by the receiving device may be the first data packet sent after the failure, or it may be a retransmitted data packet.

在一些实施例中,网络中的转发设备对于自身重传的数据包,可以在数据包中添加重传标识,以指示接收端设备该数据包为重传的数据包。In some embodiments, a forwarding device in the network may add a retransmission identifier to a retransmission packet for the packet it retransmits, in order to indicate to the receiving device that the packet is a retransmission.

作为一个示例,参见图12,在UB-C域内,S1交换机在检测到通信路径发生故障(例如S1交换机和S3交换机之间的路径段发生故障)时,通过FRR确定备用路径,即S1交换机-S2交换机-S3交换机-S4交换机-接收端设备,重新发送重传缓冲区中的数据包,使得该数据包可以沿备用路径转发至接收端设备。As an example, referring to Figure 12, within the UB-C domain, when the S1 switch detects a failure in the communication path (e.g., a failure in the path segment between the S1 switch and the S3 switch), it determines an alternative path through FRR, namely S1 switch - S2 switch - S3 switch - S4 switch - receiving device, and retransmits the data packets in the retransmission buffer so that the data packets can be forwarded to the receiving device along the alternative path.

其中,对于该数据包的事务层,UB协议中的配置(configuration,简称为CFG)字段值为6,表示该数据包为图7所示数据中心中某一族域内传输报文。In the transaction layer of this data packet, the configuration (CFG) field value in the UB protocol is 6, indicating that the data packet is a transmission message within a certain family domain of the data center shown in Figure 7.

而且,S1交换机在重传数据包之前,会在数据包头中添加重传标志位“R”,将其值置为1,然后将该数据包经由备份路径发往接收端。接收端侧收到数据包后,解析数据包头,如果“R”的取值为0,则确定该数据包为首发数据包;如果“R”的取值为1,说明是重新发送的数据包。Furthermore, before retransmitting a data packet, the S1 switch adds a retransmission flag "R" to the packet header, sets its value to 1, and then sends the data packet to the receiving end via the backup path. After receiving the data packet, the receiving end parses the packet header. If the value of "R" is 0, it determines that the data packet is the original packet; if the value of "R" is 1, it means that the data packet is being retransmitted.

在一些实施例中,网络中的转发设备在检测到转发第一数据包的目标通信路径发生故障时,还可以构造第一消息,并向接收端设备发送第一消息,以提示接收端设备接下来所发送的数据包中包括重传数据包。In some embodiments, when a forwarding device in the network detects a failure in the target communication path for forwarding the first data packet, it may also construct a first message and send the first message to the receiving device to indicate that the data packets subsequently sent by the receiving device include retransmission data packets.

其中,第一消息包括第一字段,第一字段携带消息类型,该消息类型指示第一消息为去重触发消息,该去重触发消息用于指示接收端设备对第一消息之后接收到的数据包进行去重处理。The first message includes a first field, which carries a message type. The message type indicates that the first message is a deduplication trigger message. The deduplication trigger message is used to instruct the receiving device to perform deduplication processing on the data packets received after the first message.

作为一个示例,如图13所示,在UB压缩报文格式下完整压缩网络头的格式中,第一字段可以为下一层协议类型(next layer protocol,NLP)字段,该NLP字段的具体值用于指示消息类型。根据网络层报文头(network header,NTH)中NLP的不同,可以有如下三种组合形式:As an example, as shown in Figure 13, in the format of the fully compressed network header under the UB compressed message format, the first field can be the next layer protocol (NLP) field. The specific value of this NLP field is used to indicate the message type. Depending on the different NLP fields in the network layer header (NTH), there are three possible combinations:

第一种:NTH.NLP=000,带传输层报文头(transport packet header,TPH),该TPH.NLP用于指示是否带机密性与完整性保护机制(confidentiality and integrity protection,CIP)。The first type: NTH.NLP=000, with a transport packet header (TPH). This TPH.NLP is used to indicate whether confidentiality and integrity protection (CIP) is included.

其中,CIP.NLP指示是否带UB分区身份标识(UB partition identifier,UPI)/实体ID(entity ID,简称为EID,指示UB实体在UB族域内的唯一标识)以及其位宽。CIP.NLP indicates whether it includes a UB partition identifier (UPI)/entity ID (EID, which indicates the unique identifier of a UB entity within the UB family domain) and its bit width.

第二种:NTH.NLP=001,不带TPH、CIP、EID和事务层报文头(transaction head,TAH),带16bit的UPI,用于标识该消息用于枚举管理协议。The second type: NTH.NLP=001, without TPH, CIP, EID and transaction header (TAH), with 16-bit UPI to identify that the message is used for the enumeration management protocol.

第三种:NTH.NLP=110,不带TPH、CIP、UPI和TAH,带EID,用于标识该消息为去重触发消息。The third type: NTH.NLP=110, without TPH, CIP, UPI and TAH, with EID, used to identify the message as a deduplication trigger message.

其中,所携带的EID可以为故障节点所连接的邻居节点的EID。The EID carried can be the EID of the neighboring node to which the faulty node is connected.

在一种可能的实现方式中,第一消息可以在头部携带发送端设备在UB-C域内的网络地址(UB-Cnetwork address,CNA),作为源地址信息(记为SCNA),同时携带接收端设备的CNA,作为目的地址信息(记为DCNA)。In one possible implementation, the first message may carry the network address (CNA) of the sending device in the UB-C domain in the header as the source address information (denoted as SCNA), and at the same time carry the CNA of the receiving device as the destination address information (denoted as DCNA).

在一种可能的实现方式中,将去重触发消息的服务优先级(service level,SL)设置为最高优先级,使得该去重触发消息可以进入最高优先级传输队列,从而能够尽快地发往接收端设备。In one possible implementation, the service level (SL) of the deduplication trigger message is set to the highest priority, so that the deduplication trigger message can enter the highest priority transmission queue and be sent to the receiving device as soon as possible.

应该理解的是,在图13所示的完整压缩网络头中,CRD(即credit)指示报文是否返回信用证,ACK指示报文是否释放重传缓冲区的空间,CRD_VL指示CRD域段返还的信用证所对应的虚拟通道(virtual link,VL)号。关于CFG域段,当CFG=0时,表示报文为数据链路层控制报文;CFG=1~2时,保留;CFG=3时,表示为Global_Domain-IPV4报文;CFG=4时,表示为Global_Domain-IPV6报文;CFG=5时,表示为网络控制报文;CFG=6时,表示为族域内的报文;CFG=7~15时,保留。此外,RM为UB报文路由模式指示域段。此外,Plength[13:10]指示报文Block数量,0~15分别指示1~16个Block,Plength[9:5]指示最后一个Block的Flit数,0~31分别指示1~32个Flit。Plength[4:0]指示数据包尾有效载荷的BYTE数量(不包括LPH/LBH和BCRC域段)。当Plength[4:0]为0~15时,指示的是数据包(Packet)内最后一个Flit的有效载荷BYTE数量为Plength[4:0]+1;当Plength[4:0]为16~19时,指示的是Packet内倒数第二个Flit的有效载荷BYTE数量为Plength[4:0]+1;当Plength[4:0]为20~27时,指示的是Packet内倒数第二个Flit的有效载荷BYTE数量为Plength[4:0]-11;当Plength[4:0]为28~31时,指示的是Packet内最后一个Flit的有效载荷BYTE数量为Plength[4:0]-11。本申请实施例对此不做具体解释说明,具体含义可以参考UB压缩报文格式下完整压缩网络头的相关说明,本申请实施例在此不做赘述。It should be understood that in the complete compressed network header shown in Figure 13, CRD (i.e., credit) indicates whether the message returns a credit, ACK indicates whether the message releases the retransmission buffer space, and CRD_VL indicates the virtual link (VL) number corresponding to the credit returned by the CRD segment. Regarding the CFG segment, when CFG=0, it indicates a data link layer control message; CFG=1-2, reserved; CFG=3, indicates a Global_Domain-IPv4 message; CFG=4, indicates a Global_Domain-IPv6 message; CFG=5, indicates a network control message; CFG=6, indicates a message within a family domain; CFG=7-15, reserved. Furthermore, RM is the UB message routing mode indicator segment. In addition, Plength[13:10] indicates the number of message blocks, with 0 to 15 indicating 1 to 16 blocks respectively. Plength[9:5] indicates the number of folds in the last block, with 0 to 31 indicating 1 to 32 folds respectively. Plength[4:0] indicates the number of bytes in the packet tail payload (excluding LPH/LBH and BCRC fields). When Plength[4:0] is 0-15, it indicates that the number of payload bytes in the last Flit within the packet is Plength[4:0]+1; when Plength[4:0] is 16-19, it indicates that the number of payload bytes in the second-to-last Flit within the packet is Plength[4:0]+1; when Plength[4:0] is 20-27, it indicates that the number of payload bytes in the second-to-last Flit within the packet is Plength[4:0]-11; when Plength[4:0] is 28-31, it indicates that the number of payload bytes in the last Flit within the packet is Plength[4:0]-11. This application embodiment does not provide a specific explanation of this; for specific meanings, please refer to the relevant descriptions of the complete compressed network header under the UB compressed message format. This application embodiment will not elaborate further here.

基于此,接收端设备在执行本申请实施例所提供的数据包去重方法时,接收端设备还需要执行以下步骤:Based on this, when the receiving device executes the data packet deduplication method provided in the embodiments of this application, the receiving device also needs to perform the following steps:

(1)接收第一消息。(1) Receive the first message.

其中,第一消息携带已转发数据包的信息,已转发数据包为目标转发设备在目标故障检测周期内向接收端设备转发的数据包,第一消息用于指示目标故障检测周期内检测到目标通信路径存在故障,目标通信路径为发送端设备与接收端设备之间的通信路径。The first message carries information about the forwarded data packets, which are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period. The first message is used to indicate that a fault was detected in the target communication path within the target fault detection period. The target communication path is the communication path between the sending device and the receiving device.

其中,故障检测周期为预先设置的数值,本申请实施例对其设置依据不做限制,例如,可以基于网络检测中发现故障的时间(纳秒级),来灵活设置和调整该故障检测周期值。The fault detection period is a preset value. The basis for setting it in this application embodiment is not limited. For example, the fault detection period value can be flexibly set and adjusted based on the time (nanosecond level) when the fault is detected in the network detection.

在一种可能的实现方式中,上述目标故障检测周期为接收端设备接收第一数据包所在的周期。In one possible implementation, the target fault detection period is the period during which the receiving device receives the first data packet.

在一些实施例中,目标通信路径为发送端设备与接收端设备之间的通信路径,上述目标转发设备可以为该通信路径上的至少一个转发设备。也即是,目标转发设备可以为一个转发设备,该转发设备在检测到目标通信路径上与自身所连接的路径段存在故障时,构造第一消息,并将该第一消息发送给接收端设备;当然,目标转发设备也可以为多个转发设备,该多个转发设备在检测到目标通信路径上与自身所连接的路径段存在故障时,构造第一消息,并将该第一消息发送给接收端设备。本申请实施例对此不做限制。In some embodiments, the target communication path is a communication path between a sending device and a receiving device, and the target forwarding device can be at least one forwarding device on that communication path. That is, the target forwarding device can be a single forwarding device that, upon detecting a fault in the path segment connected to it on the target communication path, constructs a first message and sends the first message to the receiving device. Alternatively, the target forwarding device can be multiple forwarding devices that, upon detecting a fault in the path segment connected to them on the target communication path, construct a first message and send the first message to the receiving device. This application does not impose any limitations on this.

需要说明的是,对于目标转发设备而言,其在检测目标通信路径中与目标转发设备连接的路径段存在故障时,有可能是该路径段对应的链路存在故障,也有可能是该路径段所连接的其他转发设备存在故障。当路径段对应的链路存在故障时,该链路所连接的两个转发设备均可以检测到链路故障,此时,检测到链路故障的这两个转发设备均可以构造第一消息;而当路径段所连接的转发设备存在故障时,与该转发设备所连接的其他转发可以检测到设备故障,此时,检测到设备故障的一个或多个转发设备均可以构造第一消息。It should be noted that when a target forwarding device detects a fault in a path segment connected to it within the target communication path, the fault could be due to a problem with the link corresponding to that path segment, or it could be due to a fault with another forwarding device connected to that path segment. When a link corresponding to a path segment is faulty, both forwarding devices connected to that link can detect the link fault, and both can construct the first message. Conversely, when a forwarding device connected to a path segment is faulty, other forwarding devices connected to that device can detect the device fault, and one or more of these devices can construct the first message.

应该理解的是,虽然第一消息为检测到故障的目标转发设备所构造的,但在目标转发设备与接收端设备之间还存在其他转发设备的情况下,目标转发设备可以通过其他转发设备将第一消息发送给接收端设备。当然,在目标转发设备与接收端设备直接连接的情况下,目标转发设备也可以直接将第一消息发送接收端设备。本申请实施例对目标转发设备与接收端设备之间存在的其他转发设备的数量不做限制。It should be understood that although the first message is constructed by the target forwarding device that detected the fault, if there are other forwarding devices between the target forwarding device and the receiving device, the target forwarding device can send the first message to the receiving device through these other forwarding devices. Of course, if the target forwarding device and the receiving device are directly connected, the target forwarding device can also directly send the first message to the receiving device. This application embodiment does not limit the number of other forwarding devices that exist between the target forwarding device and the receiving device.

在一种可能的实现方式中,目标转发设备位于目标通信路径上,且目标转发设备包括检测到目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备。若目标设备存在故障,则目标转发设备包括与目标设备连接的至少一个转发设备;若目标路径段存在故障,则目标转发设备包括第一转发设备和/或第二转发设备,第二转发设备为与第一转发设备通信连接的下一跳转发设备,目标路径段为第一转发设备与第二转发设备之间的路径段。In one possible implementation, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path. If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, the second forwarding device being a next-hop forwarding device communicatively connected to the first forwarding device, and the target path segment being the path segment between the first forwarding device and the second forwarding device.

其中,目标转发设备向接收端设备发送第一消息的方式包括以下两种:The target forwarding device sends the first message to the receiving device in the following two ways:

在第一种发送方式中,目标转发设备直接将第一消息发往特定的接收端设备。In the first sending method, the target forwarding device directly sends the first message to a specific receiving device.

为便于理解,接下来结合上文所示的两种网络拓扑,对目标转发设备发送第一消息的实现过程进行举例说明。To facilitate understanding, the following example illustrates the process of the target forwarding device sending the first message, using the two network topologies shown above.

参见图14,在第一种网络拓扑(2D Torus组网架构)中,节点8沿着主路径向节点7发送数据包,节点8为发送端设备,节点7为接收端设备,在发送数据包的过程中,若发送端设备与接收端设备之间的路径段存在故障,例如节点9和节点10之间的链路存在故障,则节点9和节点10在检测到链路故障后,可以构造第一消息,并沿着所确定的备用路径将该第一消息发往节点7。Referring to Figure 14, in the first network topology (2D Torus networking architecture), node 8 sends data packets to node 7 along the main path. Node 8 is the sending device and node 7 is the receiving device. During the data packet sending process, if there is a fault in the path segment between the sending device and the receiving device, such as a fault in the link between node 9 and node 10, then after detecting the link fault, nodes 9 and 10 can construct a first message and send the first message to node 7 along the determined backup path.

其中,节点8和节点7之间传输数据包的路径为节点8-节点9-节点10-节点11-节点7,而在发送第一消息时,节点9所采用的传输路径为节点9-节点5-节点6-节点7,节点10所采用的传输路径为节点10-节点11-节点7。The data packet transmission path between node 8 and node 7 is node 8-node 9-node 10-node 11-node 7. When sending the first message, node 9 uses the transmission path node 9-node 5-node 6-node 7, and node 10 uses the transmission path node 10-node 11-node 7.

当然,基于实际的网络拓扑结构,节点8和节点7也可以采用其他路径传输数据包,节点9和节点10也可以采用其他路径发送第一消息,本申请实施例对此不做限制。Of course, based on the actual network topology, nodes 8 and 7 can also use other paths to transmit data packets, and nodes 9 and 10 can also use other paths to send the first message. This application embodiment does not limit this.

由此可见,当路径段对应的链路发生故障时,可以由该路径段所连接的目标转发设备来发送第一消息。其中,目标转发设备可以为该路径段所连接的前一个转发设备,或者该路径段所连接的下一个转发设备,亦或者该路径段所连接的两个转发设备。Therefore, when a link corresponding to a path segment fails, the target forwarding device connected to that path segment can send the first message. The target forwarding device can be the preceding forwarding device connected to that path segment, the following forwarding device connected to that path segment, or both forwarding devices connected to that path segment.

参见图15,在第一种网络拓扑(2D Torus组网架构)中,节点8沿着主路径向节点7发送数据包,节点8为发送端设备,节点7为接收端设备,在发送数据包的过程中,若发送端设备与接收端设备之间的转发设备存在故障,例如节点9存在故障,则节点5、节点8、节点10、节点13在检测到节点9故障后,可以构造第一消息,并沿着所确定的备用路径将该第一消息发往节点7。Referring to Figure 15, in the first network topology (2D Torus networking architecture), node 8 sends data packets to node 7 along the main path. Node 8 is the sending device and node 7 is the receiving device. During the data packet sending process, if there is a fault in the forwarding device between the sending device and the receiving device, such as a fault in node 9, then after detecting the fault in node 9, nodes 5, 8, 10, and 13 can construct a first message and send the first message to node 7 along the determined backup path.

其中,节点8和节点7之间传输数据包的路径为节点8-节点9-节点10-节点11-节点7,而在发送第一消息时,节点5所采用的传输路径为节点5-节点6-节点7,节点8所采用的传输路径为节点8-节点4-节点7,节点10所采用的传输路径为节点10-节点11-节点7,节点13所采用的传输路径为节点13-节点14-节点15-节点11-节点7。The data packet transmission path between nodes 8 and 7 is node 8-node 9-node 10-node 11-node 7. When sending the first message, the transmission path used by node 5 is node 5-node 6-node 7, the transmission path used by node 8 is node 8-node 4-node 7, the transmission path used by node 10 is node 10-node 11-node 7, and the transmission path used by node 13 is node 13-node 14-node 15-node 11-node 7.

当然,基于实际的网络拓扑结构,节点8和节点7也可以采用其他路径传输数据包,节点5、节点8、节点10、节点13也可以采用其他路径发送第一消息,本申请实施例对此不做限制。Of course, based on the actual network topology, nodes 8 and 7 can also use other paths to transmit data packets, and nodes 5, 8, 10, and 13 can also use other paths to send the first message. This application embodiment does not limit this.

由此可见,当路径段一端所连接的转发设备发生故障时,可以由与该转发设备所连接的其他转发设备来发送第一消息。Therefore, when a forwarding device connected to one end of a path segment fails, the first message can be sent by another forwarding device connected to that forwarding device.

参见图16,在第二种网络拓扑(Clos组网架构)中,节点A沿着主路径向节点H发送数据包,节点A为发送端设备,节点H为接收端设备,在发送数据包的过程中,若发送端设备与接收端设备之间的路径段存在故障,例如节点Leaf 1和节点Spine 1之间的链路存在故障,则节点Leaf 1和节点Spine 1在检测到链路故障后,可以构造第一消息,并沿着所确定的备用路径将该第一消息发往节点H。Referring to Figure 16, in the second network topology (Clos networking architecture), node A sends data packets to node H along the main path. Node A is the sending device and node H is the receiving device. During the data packet transmission process, if there is a fault in the path segment between the sending device and the receiving device, such as a fault in the link between node Leaf 1 and node Spine 1, then after detecting the link fault, nodes Leaf 1 and Spine 1 can construct a first message and send the first message to node H along the determined backup path.

其中,节点A和节点H之间传输数据包的路径为节点A-节点Leaf 1-节点Spine 1-节点Leaf n-节点H,而在发送第一消息时,节点Leaf 1所采用的传输路径为节点Leaf 1-节点Spine 16-节点Leaf n-节点H,节点Spine 1所采用的传输路径为节点Spine 1-节点Leaf n-节点H。The data packet transmission path between node A and node H is node A - node Leaf 1 - node Spine 1 - node Leaf n - node H. When sending the first message, node Leaf 1 uses the transmission path of node Leaf 1 - node Spine 16 - node Leaf n - node H, and node Spine 1 uses the transmission path of node Spine 1 - node Leaf n - node H.

当然,基于实际的网络拓扑结构,节点A和节点H也可以采用其他路径传输数据包,节点Leaf 1和节点Spine 1也可以采用其他路径发送第一消息,本申请实施例对此不做限制。Of course, based on the actual network topology, nodes A and H can also use other paths to transmit data packets, and nodes Leaf 1 and Spine 1 can also use other paths to send the first message. This application embodiment does not limit this.

由此可见,当路径段对应的链路发生故障时,可以由该路径段所连接的目标转发设备来发送第一消息。其中,目标转发可以为该路径段所连接的前一个转发设备,或者该路径段所连接的下一个转发设备,亦或者该路径段所连接的两个转发设备。Therefore, when a link corresponding to a path segment fails, the target forwarding device connected to that path segment can send the first message. The target forwarding device can be the preceding forwarding device connected to that path segment, the following forwarding device connected to that path segment, or both forwarding devices connected to that path segment.

参见图17,在第二种网络拓扑(Clos组网架构)中,节点A沿着主路径向节点H发送数据包,节点A为发送端设备,节点H为接收端设备,在发送数据包的过程中,若发送端设备与接收端设备之间的转发设备存在故障,例如节点Spine 1存在故障,则节点Leaf 1和节点Leaf n在检测到链路故障后,可以构造第一消息,并沿着所确定的备用路径将该第一消息发往节点H。Referring to Figure 17, in the second network topology (Clos networking architecture), node A sends data packets to node H along the main path. Node A is the sending device and node H is the receiving device. During the data packet transmission process, if there is a fault in the forwarding device between the sending device and the receiving device, such as a fault in node Spine 1, then after detecting the link fault, nodes Leaf 1 and Leaf n can construct a first message and send the first message to node H along the determined backup path.

其中,节点A和节点H之间传输数据包的路径为节点A-节点Leaf 1-节点Spine 1-节点Leaf n-节点H,而在发送第一消息时,节点Leaf 1所采用的传输路径为节点Leaf 1-节点Spine 16-节点Leaf n-节点H,节点Leaf n所采用的传输路径为节点Leaf n-节点H。The data packet transmission path between node A and node H is node A - node Leaf 1 - node Spine 1 - node Leaf n - node H. When sending the first message, node Leaf 1 uses the transmission path of node Leaf 1 - node Spine 16 - node Leaf n - node H, and node Leaf n uses the transmission path of node Leaf n - node H.

当然,基于实际的网络拓扑结构,节点A和节点H也可以采用其他路径传输数据包,节点Leaf 1也可以采用其他路径发送第一消息,本申请实施例对此不做限制。Of course, based on the actual network topology, nodes A and H can also use other paths to transmit data packets, and node Leaf 1 can also use other paths to send the first message. This application embodiment does not limit this.

由此可见,当路径段一端所连接的转发设备发生故障时,可以由与该转发设备所连接的其他转发设备来发送第一消息。Therefore, when a forwarding device connected to one end of a path segment fails, the first message can be sent by another forwarding device connected to that forwarding device.

需要说明的是,目标转发设备在向指定的接收端设备发送第一消息时,为便于下一跳的转发设备进行消息转发,该第一消息中需要携带接收端设备的设备信息。其中,设备信息可以为接收端设备的设备类型、设备编号、设备地址等能够唯一指示该接收端设备的信息。It should be noted that when the target forwarding device sends the first message to the designated receiving device, this first message needs to carry the receiving device's device information to facilitate message forwarding by the next-hop forwarding device. This device information can include unique identifiers such as the receiving device's device type, device number, and device address.

在一种可能的实现方式中,目标转发设备可以维护T时间段所转发的数据包的DCNA信息,并在向指定的接收端设备发送第一消息时,在该第一消息中携带接收端设备的DCNA信息。In one possible implementation, the target forwarding device can maintain the DCNA information of the data packets forwarded during time period T, and carry the DCNA information of the receiving device in the first message when sending the first message to the designated receiving device.

其中,T的取值可以等于上述故障检测周期的值,也可以大于上述故障检测周期的值,本申请实施例对此不做限制。The value of T can be equal to or greater than the value of the fault detection period mentioned above. This application does not impose any restrictions on this.

在第二种发送方式中,目标转发设备通过广播的方式,将第一消息发往特定的接收端设备。In the second transmission method, the target forwarding device broadcasts the first message to a specific receiving device.

同样地,为便于理解,接下来结合上文所示的两种网络拓扑,对目标转发设备发送第一消息的实现过程进行举例说明。Similarly, for ease of understanding, the following example illustrates the process of the target forwarding device sending the first message, using the two network topologies shown above.

继续参考图14,若节点10检测到链路故障,则节点10构造第一消息,并通过广播的方式将该第一消息发往节点7。其中,节点10可以通过至少两跳广播将第一消息发往节点7,通过至少一跳广播将第一消息发往该第一种网络拓扑中的其他节点。Referring again to Figure 14, if node 10 detects a link failure, node 10 constructs a first message and broadcasts it to node 7. Node 10 can broadcast the first message to node 7 via at least two hops and to other nodes in this first network topology via at least one hop.

例如,节点10通过一跳广播将第一消息发送给了节点11、节点6和节点14,通过两跳广播将第一消息发送给了节点13、节点14、节点15、节点8、节点7、节点5、节点2,通过三跳广播将第一消息发送给了节点12、节点4、节点1、节点0、节点3。For example, node 10 sends the first message to nodes 11, 6 and 14 via a one-hop broadcast, to nodes 13, 14, 15, 8, 7, 5 and 2 via a two-hop broadcast, and to nodes 12, 4, 1, 0 and 3 via a three-hop broadcast.

当然,节点9也可以在检测到链路故障后,按照上述逻辑广播第一消息给其他节点,本申请实施例对此不做限制。Of course, after detecting a link failure, node 9 can also broadcast the first message to other nodes according to the above logic. This application embodiment does not limit this.

继续参考图15,若节点8和节点10检测到节点9故障,则节点8和节点9构造第一消息,并通过广播的方式将该第一消息发往节点7。其中,节点8和节点10可以通过至少两跳广播将第一消息发往节点7,通过至少一跳广播将第一消息发往该第一种网络拓扑中的其他节点。Referring again to Figure 15, if nodes 8 and 10 detect a fault in node 9, then nodes 8 and 9 construct a first message and broadcast it to node 7. Nodes 8 and 10 can broadcast the first message to node 7 via at least two hops and to other nodes in this first network topology via at least one hop.

例如,节点10通过一跳广播将第一消息发送给了节点11、节点6和节点14,通过两跳广播将第一消息发送给了节点13、节点14、节点15、节点8、节点7、节点5、节点2,通过三跳广播将第一消息发送给了节点12、节点4、节点1、节点0、节点3。节点8通过一跳广播将第一消息发送给节点12、节点4和节点11,通过两跳广播将第一消息发送给了节点13、节点5、节点0、节点12,通过三跳将第一消息发送给了节点1、节点3。For example, node 10 sends the first message to nodes 11, 6, and 14 via a one-hop broadcast, to nodes 13, 14, 15, 8, 7, 5, and 2 via a two-hop broadcast, and to nodes 12, 4, 1, 0, and 3 via a three-hop broadcast. Node 8 sends the first message to nodes 12, 4, and 11 via a one-hop broadcast, to nodes 13, 5, 0, and 12 via a two-hop broadcast, and to nodes 1 and 3 via a three-hop broadcast.

当然,节点5和节点13也可以在检测到节点9故障后,按照上述逻辑广播第一消息给其他节点,本申请实施例对此不做限制。Of course, after detecting a fault in node 9, nodes 5 and 13 can also broadcast the first message to other nodes according to the above logic. This application embodiment does not limit this.

继续参考图16,若节点Spine 1检测到链路故障,则节点Spine 1构造第一消息,并通过广播的方式将该第一消息发往节点H。其中,节点Spine 1可以通过至少两跳广播将第一消息发往节点H,通过至少一跳广播将第一消息发往该第二种网络拓扑中的其他节点。Referring again to Figure 16, if node Spine 1 detects a link failure, it constructs a first message and broadcasts it to node H. Node Spine 1 can broadcast the first message to node H via at least two hops and to other nodes in this second network topology via at least one hop.

例如,节点Spine 1通过一跳广播将第一消息发送给了节点Leaf 2、节点Leaf n-1、节点Leaf n,通过两跳广播将第一消息发送给了节点C、节点D、节点E、节点F、节点G、节点H。For example, node Spine 1 sends the first message to nodes Leaf 2, Leaf n-1, and Leaf n via a one-hop broadcast, and then sends the first message to nodes C, D, E, F, G, and H via a two-hop broadcast.

当然,节点Leaf 1也可以在检测到链路故障后,按照上述逻辑广播第一消息给其他节点(例如节点A和节点B),本申请实施例对此不做限制。Of course, after detecting a link failure, node Leaf 1 can also broadcast the first message to other nodes (such as node A and node B) according to the above logic. This application embodiment does not limit this.

继续参考图17,若节点Leaf 1检测到节点Spine 1故障,则节点Leaf 1构造第一消息,并通过广播的方式将该第一消息发往节点H。其中,节点Leaf 1可以通过至少三跳广播将第一消息发往节点H,通过至少一跳广播将第一消息发往该第二种网络拓扑中的其他节点。Referring again to Figure 17, if node Leaf 1 detects a failure in node Spine 1, then node Leaf 1 constructs a first message and broadcasts it to node H. Node Leaf 1 can broadcast the first message to node H via at least three hops and to other nodes in this second network topology via at least one hop.

例如,节点Leaf 1通过一跳广播将第一消息发送给了节点Spine 16、节点A和节点B,通过两跳广播将第一消息发送给了Leaf 2、Leaf n-1、Leaf n,通过三跳广播将第一消息发送给了节点C、节点D、节点E、节点F、节点G、节点H。For example, node Leaf 1 sends the first message to nodes Spine 16, A, and B via a one-hop broadcast, to Leaf 2, Leaf n-1, and Leaf n via a two-hop broadcast, and to nodes C, D, E, F, G, and H via a three-hop broadcast.

当然,节点Leaf 1、Leaf 2、Leaf n-1、Leaf n也可以在检测到节点Spine 1故障后,按照上述逻辑广播第一消息给其他节点,本申请实施例对此不做限制。Of course, nodes Leaf 1, Leaf 2, Leaf n-1, and Leaf n can also broadcast the first message to other nodes according to the above logic after detecting a fault in node Spine 1. This application embodiment does not limit this.

在一些实施例中,不论采用哪种发送方式来发送第一消息,目标转发设备在发送第一消息时,还可以将该消息的SL设置为最高优先级,然后再发往接收端设备。In some embodiments, regardless of the sending method used to send the first message, the target forwarding device may also set the SL of the message to the highest priority before sending it to the receiving device.

综上所述,在结合附图14-附图17,对目标转发设备发送第一消息的方式进行介绍之后,接下来,对第一消息所携带的信息进行详细的解释说明。In summary, after introducing the method by which the target forwarding device sends the first message in conjunction with Figures 14-17, the information carried by the first message will be explained in detail below.

如前文所说明的,发送给接收端设备的第一消息携带了已转发数据包的信息,该已转发数据包为目标转发设备在目标故障检测周期内向接收端设备转发的数据包。As explained above, the first message sent to the receiving device carries information about the forwarded data packets, which are data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.

在一些实施例中,已转发数据包的信息包括已转发数据包的标识信息。其中,标识信息包括已转发数据包的事务层段号(TA segment sequence number,TASSN),或者已转发数据包的包序列号(PSN)信息。In some embodiments, the information of forwarded data packets includes identification information of the forwarded data packets. This identification information includes the transaction layer segment number (TASSN) of the forwarded data packet, or the packet sequence number (PSN) information of the forwarded data packet.

基于此,第一消息包括第一字段,第一字段用于携带已转发数据包的标识信息。Based on this, the first message includes a first field, which is used to carry identification information of the forwarded data packet.

在一种可能的实现方式中,已转发数据包的信息还包括设备地址信息,设备地址信息至少指示发送端设备的地址。In one possible implementation, the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

基于此,第一消息包括第一字段和第二字段,第一字段用于携带已转发数据包的标识信息,第二字段用于携带设备地址信息。Based on this, the first message includes a first field and a second field. The first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.

在一种可能的实现方式中,第一消息中还可以携带数据包的其他信息,例如SDNA、DCNA、TPH、TAH等信息。In one possible implementation, the first message may also carry other information about the data packet, such as SDNA, DCNA, TPH, TAH, etc.

作为一个示例,如图18所示,第一消息携带目标转发设备在目标故障检测周期内向接收端设备转发的数据包所对应的SCNA和TASSN。As an example, as shown in Figure 18, the first message carries the SCNA and TASSN corresponding to the data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.

作为另一个示例,如图19所示,第一消息携带目标转发设备在目标故障检测周期内向接收端设备转发的数据包所对应的SCNA和PSN。As another example, as shown in Figure 19, the first message carries the SCNA and PSN corresponding to the data packets forwarded by the target forwarding device to the receiving device within the target fault detection period.

其中,SCNA为发送端设备在UB-C域内的地址信息。如此,接收端设备基于SCNA即可确定数据包来源于哪个发送端设备。Here, SCNA represents the address information of the sending device within the UB-C domain. Thus, the receiving device can determine which sending device the data packet originated from based on the SCNA.

需要说明的是,关于第一消息中的其他字段的含义,以及所携带的内容,可以参考UB压缩报文格式下完整压缩网络头的相关说明,本申请实施例在此不做赘述。It should be noted that the meanings of the other fields in the first message, as well as the content they carry, can be found in the relevant descriptions of the complete compressed network header in the UB compressed message format. This application embodiment will not elaborate on these details here.

(2)基于数据包信息,对去重匹配表进行更新。(2) Update the deduplication matching table based on the data packet information.

也即是,基于第一消息,将其中所携带的目标转发设备已转发数据包的信息添加至去重匹配表中,已实现对去重匹配表的更新。In other words, based on the first message, the information of the data packets already forwarded by the target forwarding device carried in it is added to the deduplication matching table, thus realizing the update of the deduplication matching table.

基于上述第一消息中携带的两种类型的信息,本申请实施例中接收端设备所维护的去重匹配表也包括以下两种情况:Based on the two types of information carried in the first message mentioned above, the deduplication matching table maintained by the receiving device in this embodiment of the application also includes the following two cases:

第一种情况,参见下表1,基于第一消息中携带的SCNA和TASSN,接收端设备维护和管理的去重匹配表中存储的信息包括:目标转发设备已转发给接收端设备的数据包所对应的SCNA和TASSN。也即是,去重匹配表记录了数据包的SCNA和TASSN之间的对应关系。In the first scenario, as shown in Table 1 below, based on the SCNA and TASSN carried in the first message, the deduplication matching table maintained and managed by the receiving device stores the SCNA and TASSN corresponding to the data packets forwarded by the target forwarding device to the receiving device. In other words, the deduplication matching table records the correspondence between the SCNA and TASSN of the data packets.

表1
Table 1

在一种可能的实现方式中,去重匹配表也可以存储SCNA和TASSN的Hash值之间的对应关系。In one possible implementation, the deduplication matching table can also store the correspondence between the hash values of SCNA and TASSN.

第二种情况,参见下表2,基于第一消息中携带的SCNA和PSN,接收端设备维护和管理的去重匹配表中存储的信息包括:目标转发设备已转发给接收端设备的数据包所对应的SCNA、EPSN和最大乱序空间。也即是,去重匹配表记录了数据包的SCNA 、EPSN和最大乱序空间之间的对应关系。In the second scenario, as shown in Table 2 below, based on the SCNA and PSN carried in the first message, the deduplication matching table maintained and managed by the receiving device stores information including: the SCNA, EPSN, and maximum out-of-order space corresponding to the data packets forwarded by the target forwarding device to the receiving device. In other words, the deduplication matching table records the correspondence between the SCNA, EPSN, and maximum out-of-order space of the data packets.

表2
Table 2

需要说明的是,最大允许乱序空间指示在期望收到的正序数据包之前允许接收的乱序数据包数量,上述表2中暂未示出。It should be noted that the maximum allowed out-of-order space indicates the number of out-of-order packets that are allowed to be received before the expected ordered packets, which is not shown in Table 2 above.

步骤1102:若第一数据包携带有重传标识,则根据去重匹配表对该第一数据包进行去重处理,以使接收端设备中存在一个第一数据包,该去重匹配表存储有接收端设备已接收到的数据包的信息。Step 1102: If the first data packet carries a retransmission flag, then the first data packet is deduplicated according to the deduplication matching table so that there is a first data packet in the receiving device. The deduplication matching table stores information about the data packets that the receiving device has received.

在一些实施例中,当转发设备需要标记重传的数据包时,可以在数据包头中的预留位携带重传标识。In some embodiments, when a forwarding device needs to mark retransmitted data packets, it can carry a retransmission identifier in a reserved space in the data packet header.

作为一个示例,如图20所示,在数据包头中将Byte1的“4”预留位定义为重传标识位(记为R),以标识数据包是否为重传的数据包。当重传标识位的取值为R=1时,表示该第一数据包是目标转发设备从重传缓冲区取出再次重发的数据包。As an example, as shown in Figure 20, the reserved bit "4" of Byte 1 in the data packet header is defined as a retransmission flag (denoted as R) to indicate whether the data packet is a retransmission. When the retransmission flag value is R=1, it indicates that the first data packet is a data packet that the target forwarding device retrieves from the retransmission buffer and retransmits.

在一些实施例中,第一数据包还携带结束重传标识,该结束重传标识指示第一数据包为最后一个进行去重处理的数据包。In some embodiments, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

作为一个示例,继续参见图20,可以数据包头中Byte0的“1”预留位定义为结束重传标识位(记为LR),并通过该标识位的信息来指示第一数据包是否为最后一个重传数据包。当重传标识位的取值为R=1,且结束重传标识位的取值为LR=1时,表示该第一数据包是从重传缓冲区中发出的最后一个重传数据包。As an example, referring to Figure 20, the reserved "1" bit in Byte0 of the data packet header can be defined as the end retransmission flag (denoted as LR), and the information of this flag bit can be used to indicate whether the first data packet is the last retransmitted data packet. When the retransmission flag bit is R=1 and the end retransmission flag bit is LR=1, it means that the first data packet is the last retransmitted data packet sent from the retransmission buffer.

在一种可能的实现方式中,上述步骤1102的实现过程可以为:若根据去重匹配表确定第一数据包为重复数据包,则丢弃第一数据包;若根据去重匹配表确定第一数据包为非重复数据包,则保留第一数据包。In one possible implementation, step 1102 above can be implemented as follows: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, the first data packet is discarded; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, the first data packet is retained.

进一步地,若第一数据包为非重复数据包,则在保留第一数据包之后,还需要将第一数据包的信息记录在去重匹配表中,以对去重匹配表进行更新。Furthermore, if the first data packet is a non-duplicate data packet, after retaining the first data packet, it is also necessary to record the information of the first data packet in the deduplication matching table in order to update the deduplication matching table.

在一种可能的实现方式中,若第一数据包未携带重传标识,则不对第一数据包进行去重处理。也即是,在第一数据包未携带重传标识的情况下,采用正常的数据处理逻辑来处理该第一数据包,例如上送第一数据包、存储第一数据包等,本申请实施例对此不做限制。In one possible implementation, if the first data packet does not carry a retransmission flag, then no deduplication processing is performed on the first data packet. That is, if the first data packet does not carry a retransmission flag, the first data packet is processed using normal data processing logic, such as uploading the first data packet or storing the first data packet. This application embodiment does not impose any limitations on this.

作为一个示例,参见图21,当数据包pkt1未携带重传标识,则直接将该数据包pkt1直接上送;对于数据包pkt2,若去重触发消息中携带了数据包pkt2的信息,则在接收到数据包pkt2后,基于该数据包pkt2的信息查询去重匹配表,以确定该数据包pkt2是否为重复数据包,若该数据包pkt2不是重复数据包,则将该数据包pkt2上送,并基于该数据包pkt2的信息更新去重匹配表。对于接收到的数据包pkt3,若数据包pkt3携带重传标识,则基于该数据包pkt3查询去重匹配表,以确定该数据包pkt3是否为重复数据包,若该数据包pkt3不是重复数据包,则将该数据包pkt3上送,并基于该数据包pkt3的信息更新去重匹配表。As an example, referring to Figure 21, when data packet pkt1 does not carry a retransmission flag, it is directly uploaded. For data packet pkt2, if the deduplication trigger message carries information about data packet pkt2, upon receiving data packet pkt2, the deduplication matching table is queried based on this information to determine whether data packet pkt2 is a duplicate data packet. If data packet pkt2 is not a duplicate data packet, it is uploaded, and the deduplication matching table is updated based on its information. For the received data packet pkt3, if data packet pkt3 carries a retransmission flag, the deduplication matching table is queried based on this data packet pkt3 to determine whether it is a duplicate data packet. If data packet pkt3 is not a duplicate data packet, it is uploaded, and the deduplication matching table is updated based on its information.

综上所述,在本申请实施例中,接收端设备在接收到某个数据包之后,若该数据包携带重传标识,则表示该数据包为网络中重传的数据包,而对于重传的数据包,接收端设备可能之前已经接收过相同的数据包,因此,在数据包携带重传标识的情况下,接收端设备需要对该数据包进行去重处理。如此,能够保证接收端设备中不存在重复的数据包,使得接收端设备能够恰好一次的处理网络转发的数据包。In summary, in this embodiment, after receiving a data packet, if the data packet carries a retransmission flag, it indicates that the data packet is a retransmitted data packet in the network. Since the receiving device may have previously received the same retransmitted data packet, it needs to perform deduplication processing on the data packet when it carries a retransmission flag. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.

而且,相比于相关技术中基于PSN来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,本申请实施例中的接收端设备在接收数据包的过程中,可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大的减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that rely on PSN to detect duplicate packets and require determining whether a packet is a duplicate based on the PSN carried by each packet, the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process. Thus, it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.

基于上述实施例所示的数据包去重方法,接下来通过目标转发设备与接收端设备进行交互的方式,对本申请实施例所提供的数据包去重方法进行解释说明,该数据包去重方法包括以下步骤S1-S6:Based on the data packet deduplication method shown in the above embodiments, the data packet deduplication method provided in this application embodiment will be explained and described next through the interaction between the target forwarding device and the receiving device. The data packet deduplication method includes the following steps S1-S6:

步骤S1:目标转发设备向接收端设备发送第一数据包。Step S1: The target forwarding device sends the first data packet to the receiving device.

步骤S2:接收端设备接收第一数据包。Step S2: The receiving device receives the first data packet.

步骤S3:若第一数据包携带有重传标识,则接收端设备根据去重匹配表对第一数据包进行去重处理,以使得接收端设备中存在一个第一数据包。Step S3: If the first data packet carries a retransmission flag, the receiving device performs deduplication processing on the first data packet according to the deduplication matching table so that there is a first data packet in the receiving device.

其中,去重匹配表存储有接收端设备已接收到的数据包的信息。The deduplication matching table stores information about the data packets that the receiving device has received.

在一种可能的实现方式中,根据去重匹配表对第一数据包进行去重处理的实现过程可以为:若根据去重匹配表确定第一数据包为重复数据包,则丢弃第一数据包;若根据去重匹配表确定第一数据包为非重复数据包,则保留第一数据包。In one possible implementation, the process of deduplicating the first data packet according to the deduplication matching table can be as follows: if the first data packet is determined to be a duplicate data packet according to the deduplication matching table, the first data packet is discarded; if the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, the first data packet is retained.

其中,保留第一数据包指的是存储第一数据包,并将第一数据包的信息记录在去重匹配表中,以对去重匹配表进行更新。Here, retaining the first data packet means storing the first data packet and recording its information in the deduplication matching table so as to update the deduplication matching table.

步骤S4:若第一数据包未携带有重传标识,则接收端设备按照正常的数据处理逻辑对第一数据包处理。Step S4: If the first data packet does not carry a retransmission flag, the receiving device processes the first data packet according to the normal data processing logic.

需要说明的是,第一数据包之所以会携带重传标识,是因为目标转发设备检测到的目标通信路径存在故障,并执行了FRR,在此情况下,为了保证数据包的可靠传输,目标转发设备会对重传的第一数据包进行打标,使得第一数据包携带重传标识。It should be noted that the reason why the first data packet carries a retransmission identifier is because the target forwarding device detects a fault in the target communication path and performs FRR. In this case, in order to ensure the reliable transmission of data packets, the target forwarding device will mark the retransmitted first data packet, so that the first data packet carries a retransmission identifier.

其中,目标通信路径为发送端设备和接收端设备之间的通信路径。The target communication path is the communication path between the sending device and the receiving device.

在一种可能的实现方式中,第一数据包还携带结束重传标识,该结束重传标识指示第一数据包为最后一个进行去重处理的数据包。In one possible implementation, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

也即是,在目标转发设备需要重传多个数据包到接收端设备的情况下,目标转发设备可以为该多个数据包均打上重传标识,以指示接收端设备该多个数据包为重传的数据包;同时为多个数据包中最后一个数据包打上结束重传标识,以指示接收端设备该数据包为最后一个重传的数据包。In other words, when the target forwarding device needs to retransmit multiple data packets to the receiving device, the target forwarding device can mark all of these multiple data packets with a retransmission flag to indicate to the receiving device that these multiple data packets are retransmitted data packets; at the same time, it can mark the last data packet among the multiple data packets with an end retransmission flag to indicate to the receiving device that this data packet is the last retransmitted data packet.

在本申请实施例中,结束重传标识可以指示接收端设备结束去重处理操作,即不对携带结束重传标识的数据包之后所接收到的数据包执行去重处理。In this embodiment of the application, the end retransmission flag can instruct the receiving device to end the deduplication operation, that is, not to perform deduplication on the data packets received after the data packet carrying the end retransmission flag.

此外,在目标转发设备检测到目标通信路径存在故障的情况下,还会向接收端设备发送第一消息,以提示接收端设备后续可能会存在重传数据包。基于此,本申请实施例所提供的数据包去重方法,还包括以下步骤:Furthermore, if the target forwarding device detects a fault in the target communication path, it will also send a first message to the receiving device to indicate that there may be retransmission of data packets later. Based on this, the data packet deduplication method provided in this application embodiment further includes the following steps:

步骤S5:目标转发设备向接收端设备发送第一消息,第一消息携带已转发数据包的信息,已转发数据包为目标转发设备在目标故障检测周期内向接收端设备转发的数据包。Step S5: The target forwarding device sends a first message to the receiving device. The first message carries information about the forwarded data packets. The forwarded data packets are the data packets that the target forwarding device forwards to the receiving device within the target fault detection period.

其中,第一消息包括第一字段,第一字段携带消息类型,消息类型指示第一消息为去重触发消息,去重触发消息用于指示接收端设备对在第一消息之后接收到的数据包进行去重处理。The first message includes a first field, which carries a message type. The message type indicates that the first message is a deduplication trigger message. The deduplication trigger message is used to instruct the receiving device to perform deduplication processing on the data packets received after the first message.

在具体实施时,第一消息用于指示在目标故障检测周期内检测到目标通信路径存在故障,目标通信路径为发送端设备与接收端设备之间的通信路径。In practice, the first message is used to indicate that a fault is detected in the target communication path during the target fault detection period. The target communication path is the communication path between the sending device and the receiving device.

在此情况下,上述目标转发设备位于目标通信路径上,且目标转发设备包括检测到目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备。若目标设备存在故障,则目标转发设备包括与目标设备连接的至少一个转发设备;若目标路径段存在故障,则目标转发设备包括第一转发设备和/或第二转发设备,第二转发设备为目标通信路径中与第一转发设备通信连接的下一跳转发设备,目标路径段为第一转发设备与第二转发设备之间的路径段。In this scenario, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path. If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; if the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, where the second forwarding device is a next-hop forwarding device in the target communication path that is communicatively connected to the first forwarding device, and the target path segment is the path segment between the first forwarding device and the second forwarding device.

在一种可能的实现方式中,已转发数据包的信息包括已转发数据包的标识信息,标识信息包括已转发数据包的事务层段号,或者已转发数据包的包序列号信息。In one possible implementation, the information of the forwarded data packet includes identification information of the forwarded data packet, which may include the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.

在一种可能的实现方式中,已转发数据包的信息还包括设备地址信息,设备地址信息至少指示发送端设备的地址。In one possible implementation, the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

步骤S6:接收端设备接收第一消息,并基于已转发数据包的信息,对去重匹配表进行更新。Step S6: The receiving device receives the first message and updates the deduplication matching table based on the information of the forwarded data packets.

接下来结合相关附图对目标转发设备对数据包打重传标识,以及向接收端设备发送第一消息,以及接收端设备实现轻量级去重的实现过程进行示例性说明,以补充说明其具体实现过程。The following description, in conjunction with the accompanying drawings, provides an exemplary illustration of the process by which the target forwarding device marks data packets as retransmission targets, sends the first message to the receiving device, and the receiving device implements lightweight deduplication, in order to further illustrate its specific implementation process.

继续参考前文图12,在发送端设备通过主路径,即S1交换机-S3交换机-S4交换机-接收端设备,向接收端设备发送数据包的过程中,若S1交换机和S3交换机检测到链路故障,则可以在第一时间构造第一消息,并将该消息的SL级设置为最高优先级,将该第一消息发往接收端设备。Referring back to Figure 12, if the sending device sends data packets to the receiving device via the main path, i.e., S1 switch - S3 switch - S4 switch - receiving device, and the S1 switch and S3 switch detect a link failure, they can construct a first message immediately, set the SL level of the message to the highest priority, and send the first message to the receiving device.

以S3交换机为例,S3交换机发送出重触发消息包括两种方式:Taking an S3 switch as an example, an S3 switch sends out a retriggered message in two ways:

(1)S3交换机维护T时间段内转发的数据包的DCNA信息,此时,可以基于DCNA信息,将第一消息直接通过备用路径发往接收端设备。(1) The S3 switch maintains the DCNA information of the data packets forwarded within the T time period. At this time, the first message can be sent directly to the receiving device through the backup path based on the DCNA information.

(2)S3交换机通过广播的方式发送第一消息。(2) The S3 switch sends the first message via broadcast.

其中,备用路径为S1交换机-S2交换机-S3交换机-S4交换机-接收端设备。The backup path is S1 switch - S2 switch - S3 switch - S4 switch - receiving device.

请参考图22,对于S2交换机,当其接收到数据包时,其内部处理数据包的逻辑为:从某个端口收到数据包的Block/Flit后,若校验数据包正确或解码成功后,将其发往业务支持单元(service support unit,SSU)一边等着某个数据包所有Block/Flit都收到后攒齐数据包,一边基于LPH中的DCNA信息,查找数据包转发表,待数据包攒齐以及查到转发表结果后,将该数据包从某个端口转发出去,并将数据包的备份保存到重传缓冲区。Please refer to Figure 22. For the S2 switch, when it receives a data packet, its internal logic for processing the data packet is as follows: After receiving the block/flit of the data packet from a certain port, if the data packet is verified to be correct or successfully decoded, it is sent to the service support unit (SSU). While waiting for all blocks/flits of a certain data packet to be received and the data packet to be assembled, the SSU searches the data packet forwarding table based on the DCNA information in LPH. After the data packet is assembled and the forwarding table result is found, the data packet is forwarded out from a certain port, and a backup of the data packet is saved to the retransmission buffer.

对于该S2交换机而言,其在收到下一跳的S3交换机通过LPH/LBH发送的ACK消息后,释放重传缓冲区中的对应的空间。此外,保存该数据包的信息(例如某些或全部数据包报头信息,或Hash值)到缓冲区,以便于构造第一消息。For the S2 switch, after receiving the ACK message sent by the next-hop S3 switch via LPH/LBH, it releases the corresponding space in the retransmission buffer. Furthermore, it saves information about the data packet (such as some or all packet header information, or hash values) to the buffer to facilitate the construction of the first message.

在本申请实施例中,对于网络中的交换机而言,重传缓冲区需要进行数据包级别的粒度管理。如果一个数据包的部分Block/Flit未收到ACK消息,则重传缓冲区中暂时不释放该数据包对应的区间资源。In this embodiment of the application, for switches in the network, the retransmission buffer needs to be managed at the packet level. If a portion of a packet's block/flit does not receive an ACK message, the corresponding range of resources in the retransmission buffer will not be released temporarily.

如图23所示,对于数据包(Packet,简称为pkt)包括Addr3-Addr6,一共四个Block/Flit。若其中的Addr5没有收到ACK消息,则交换机在FRR后,通过备用路径重新发送Addr3-Addr6,且暂时不释放该数据包对应的区间资源。As shown in Figure 23, a packet (pkt) consists of four blocks/flits, from Addr3 to Addr6. If Addr5 does not receive an ACK message, the switch will resend Addr3-Addr6 via the backup path after a Free Response (FRR), and will not release the interval resources corresponding to that packet temporarily.

进一步地,接收端设备在接收到数据包后,会解析数据包包头。如图24所示,若接收端设备解析数据包头,在确定数据包中第一字段携带的消息类型为去重触发消息的情况下,启动自身的去重模块,并基于第一消息携带的信息更新去重匹配表。如图25所示,若接收端设备解析数据包头后,确定该数据包携带重传标识,则需要基于该数据包的信息,去查询去重匹配表,以检测数据包是否为重复数据包,若该数据包为重复数据包,则丢弃该数据包;若不是重复数据包,则基于该数据包的信息,更新去重匹配表,并将数据包上传至上层模块。Furthermore, after receiving a data packet, the receiving device parses the packet header. As shown in Figure 24, if the receiving device parses the packet header and determines that the message type carried in the first field of the data packet is a deduplication trigger message, it starts its own deduplication module and updates the deduplication matching table based on the information carried in the first message. As shown in Figure 25, if the receiving device determines that the data packet carries a retransmission identifier after parsing the packet header, it needs to query the deduplication matching table based on the information of the data packet to detect whether the data packet is a duplicate data packet. If the data packet is a duplicate data packet, it discards the data packet; if it is not a duplicate data packet, it updates the deduplication matching table based on the information of the data packet and uploads the data packet to the upper-layer module.

由此可见,对于网络转发的数据包,若该数据包为从重传缓冲区中取出重发的数据包,则该数据包中会携带重传标识。换言之,对于网络中的转发设备而言,其在向接收端设备转发数据包时,对少量重传的数据包进行打标,使其携带重传标识。Therefore, for data packets forwarded over a network, if the data packet is a retransmitted data packet taken from the retransmission buffer, the data packet will carry a retransmission identifier. In other words, for the forwarding device in the network, when forwarding data packets to the receiving device, it marks a small number of retransmitted data packets to carry a retransmission identifier.

对于接收端设备而言,接收端设备在接收到某个数据包之后,若该数据包携带重传标识,则表示该数据包为网络中重传的数据包,而对于重传的数据包,接收端设备可能之前已经接收过相同的数据包,因此,在数据包携带重传标识的情况下,接收端设备需要对该数据包进行去重处理。如此,能够保证接收端设备中不存在重复的数据包,使得接收端设备能够恰好一次的处理网络转发的数据包。For the receiving device, when it receives a data packet, if the packet carries a retransmission flag, it indicates that the packet is a retransmitted data packet in the network. Since the receiving device may have already received the same retransmitted data packet before, it needs to perform deduplication processing on the packet. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.

而且,相比于相关技术中基于PSN来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,本申请实施例中的接收端设备在接收数据包的过程中,可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大的减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that rely on PSN to detect duplicate packets and require determining whether a packet is a duplicate based on the PSN carried by each packet, the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process. Thus, it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.

需要说明的是,关于图22-图25的相关内容,也可以参考上述图11方法实施例中的解释说明,在此不再赘述。It should be noted that the relevant content of Figures 22-25 can also be referred to the explanation in the method embodiment of Figure 11 above, and will not be repeated here.

图26是本申请实施例提供的一种数据包去重装置的结构示意图,该数据包去重装置可以由软件、硬件或者两者的结合实现成为接收端设备的部分或者全部。参见图26,该数据包去重装置2600包括:第一接收模块2601和去重模块2602。Figure 26 is a schematic diagram of a data packet deduplication device provided in an embodiment of this application. The data packet deduplication device can be implemented by software, hardware, or a combination of both as part or all of the receiving end device. Referring to Figure 26, the data packet deduplication device 2600 includes: a first receiving module 2601 and a deduplication module 2602.

第一接收模块2601,用于接收第一数据包;The first receiving module 2601 is used to receive the first data packet;

去重模块2602,用于若第一数据包携带有重传标识,则根据去重匹配表对第一数据包进行去重处理,以使接收端设备中存在一个第一数据包,去重匹配表存储有接收端设备已接收到的数据包的信息。The deduplication module 2602 is used to perform deduplication processing on the first data packet according to the deduplication matching table if the first data packet carries a retransmission identifier, so that there is a first data packet in the receiving device. The deduplication matching table stores information about the data packets that the receiving device has received.

在一种可能的实现方式中,去重模块2602具体用于:In one possible implementation, the deduplication module 2602 is specifically used for:

若根据去重匹配表确定第一数据包为重复数据包,则丢弃第一数据包;If the first data packet is determined to be a duplicate data packet according to the deduplication matching table, then the first data packet is discarded;

若根据去重匹配表确定第一数据包为非重复数据包,则保留第一数据包。If the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, then the first data packet is retained.

在一种可能的实现方式中,数据包去重装置2600还包括:In one possible implementation, the data packet deduplication device 2600 further includes:

更新模块,用于存储第一数据包,并将第一数据包的信息记录在去重匹配表中,以对去重匹配表进行更新。The update module is used to store the first data packet and record the information of the first data packet in the deduplication matching table in order to update the deduplication matching table.

在一种可能的实现方式中,数据包去重装置2600还包括:In one possible implementation, the data packet deduplication device 2600 further includes:

第二接收模块,还用于接收第一消息,第一消息携带已转发数据包的信息,已转发数据包为目标转发设备在目标故障检测周期内向接收端设备转发的数据包,第一消息用于指示在目标故障检测周期内检测到目标通信路径存在故障,目标通信路径为发送端设备与接收端设备之间的通信路径;The second receiving module is also used to receive a first message, which carries information about a forwarded data packet. The forwarded data packet is a data packet that the target forwarding device forwards to the receiving device within the target fault detection period. The first message is used to indicate that a fault is detected in the target communication path within the target fault detection period. The target communication path is the communication path between the sending device and the receiving device.

更新模块,用于基于已转发数据包的信息,对去重匹配表进行更新。The update module is used to update the deduplication matching table based on information from forwarded data packets.

在一种可能的实现方式中,第一消息包括第一字段,第一字段携带消息类型,消息类型指示第一消息为去重触发消息,去重触发消息用于指示接收端设备对在第一消息之后接收到的数据包进行去重处理。In one possible implementation, the first message includes a first field carrying a message type. The message type indicates that the first message is a deduplication trigger message, which is used to instruct the receiving device to perform deduplication processing on data packets received after the first message.

在一种可能的实现方式中,目标转发设备位于目标通信路径上,且目标转发设备包括检测到目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;In one possible implementation, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path.

若目标设备存在故障,则目标转发设备包括与目标设备连接的至少一个转发设备;If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device;

若目标路径段存在故障,则目标转发设备包括第一转发设备和/或第二转发设备,第二转发设备为目标通信路径中与第一转发设备通信连接的下一跳转发设备,目标路径段为第一转发设备与第二转发设备之间的路径段。If the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device. The second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device. The target path segment is the path segment between the first forwarding device and the second forwarding device.

在一种可能的实现方式中,已转发数据包的信息包括已转发数据包的标识信息;In one possible implementation, the information of the forwarded data packet includes the identification information of the forwarded data packet;

其中,标识信息包括已转发数据包的事务层段号,或者已转发数据包的包序列号信息。The identification information includes the transaction layer segment number of the forwarded data packet or the packet sequence number of the forwarded data packet.

在一种可能的实现方式中,去重触发消息包括第一字段,第一字段用于携带已转发数据包的标识信息。In one possible implementation, the deduplication trigger message includes a first field, which carries identification information of the forwarded data packet.

在一种可能的实现方式中,已转发数据包的信息还包括设备地址信息,该设备地址信息至少指示发送端设备的地址。In one possible implementation, the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

在一种可能的实现方式中,去重触发消息包括第一字段和第二字段,第一字段用于携带已转发数据包的标识信息,第二字段用于携带设备地址信息。In one possible implementation, the deduplication trigger message includes a first field and a second field. The first field is used to carry the identification information of the forwarded data packet, and the second field is used to carry the device address information.

在一种可能的实现方式中,第一数据包还携带结束重传标识,结束重传标识指示第一数据包为最后一个进行去重处理的数据包。In one possible implementation, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

在本申请实施例中,对于接收到的数据包,若该数据包携带重传标识,则表示该数据包为网络中重传的数据包,而对于重传的数据包,接收端设备可能之前已经接收过相同的数据包,因此,在数据包携带重传标识的情况下,接收端设备需要对该数据包进行去重处理。如此,能够保证接收端设备中不存在重复的数据包,使得接收端设备能够恰好一次的处理网络转发的数据包。In this embodiment, if a received data packet carries a retransmission flag, it indicates that the data packet is a retransmitted data packet in the network. Since the receiving device may have previously received the same retransmitted data packet, it needs to perform deduplication processing on the packet. This ensures that there are no duplicate data packets in the receiving device, allowing it to process network-forwarded data packets exactly once.

而且,相比于相关技术中基于PSN来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,本申请实施例中的接收端设备在接收数据包的过程中,可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大的减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that rely on PSN to detect duplicate packets and require determining whether a packet is a duplicate based on the PSN carried by each packet, the receiving device in this embodiment can directly predict whether a packet is a duplicate based on whether it carries a retransmission flag during the packet reception process. Thus, it only needs to perform deduplication processing on a small number of packets marked with retransmission flags based on the deduplication matching table, without having to perform the operation of determining whether each packet is a duplicate. This greatly reduces the resource consumption of the receiving device and achieves lightweight deduplication of packets by the receiving device.

需要说明的是:上述实施例提供的数据包去重装置2600在对接收到的数据包进行去重处理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据包去重装置2600与数据包去重方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the data packet deduplication device 2600 provided in the above embodiments is only illustrated by the division of the above functional modules when performing deduplication processing on received data packets. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data packet deduplication device 2600 provided in the above embodiments and the data packet deduplication method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

图27是本申请实施例提供的另一种数据包去重装置的结构示意图,该数据包去重装置可以由软件、硬件或者两者的结合实现成为目标转发设备的部分或者全部。参见图27,该数据包去重装置2700包括:第一发送模块2701。Figure 27 is a schematic diagram of another data packet deduplication device provided in an embodiment of this application. This data packet deduplication device can be implemented by software, hardware, or a combination of both as part or all of the target forwarding device. Referring to Figure 27, the data packet deduplication device 2700 includes: a first sending module 2701.

第一发送模块2701,用于向接收端设备发送第一数据包,以指示接收端设备根据去重匹配表对第一数据包进行去重处理,使得接收端设备中存在一个第一数据包;其中,第一数据包携带重传标识,去重匹配表存储有接收端设备已接收到的数据包的信息。The first sending module 2701 is used to send a first data packet to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on the data packets that the receiving device has received.

在一种可能的实现方式中,数据包去重装置2700还包括:In one possible implementation, the data packet deduplication device 2700 further includes:

第二发送模块,用于向接收端设备发送第一消息,以指示接收端设备基于第一消息携带的已转发数据包的信息,对去重匹配表进行更新;The second sending module is used to send a first message to the receiving device to instruct the receiving device to update the deduplication matching table based on the information of the forwarded data packets carried in the first message.

其中,已转发数据包为目标转发设备在目标故障检测周期内向接收端设备转发的数据包,第一消息用于指示在目标故障检测周期内检测到目标通信路径存在故障,目标通信路径为发送端设备与接收端设备之间的通信路径。Among them, the forwarded data packet is the data packet forwarded by the target forwarding device to the receiving device within the target fault detection period, and the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period. The target communication path is the communication path between the sending device and the receiving device.

在一种可能的实现方式中,第一消息包括第一字段,第一字段携带消息类型,消息类型指示第一消息为去重触发消息,去重触发消息用于指示接收端设备对在第一消息之后接收到的数据包进行去重处理。In one possible implementation, the first message includes a first field carrying a message type. The message type indicates that the first message is a deduplication trigger message, which is used to instruct the receiving device to perform deduplication processing on data packets received after the first message.

在一种可能的实现方式中,目标转发设备位于目标通信路径上,且目标转发设备包括检测到目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;In one possible implementation, the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path.

若目标设备存在故障,则目标转发设备包括与目标设备连接的至少一个转发设备;If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device;

若目标路径段存在故障,则目标转发设备包括第一转发设备和/或第二转发设备,第二转发设备为目标通信路径中与第一转发设备通信连接的下一跳转发设备,目标路径段为第一转发设备与第二转发设备之间的路径段。If the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device. The second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device. The target path segment is the path segment between the first forwarding device and the second forwarding device.

在一种可能的实现方式中,已转发数据包的信息包括已转发数据包的标识信息,标识信息包括已转发数据包的事务层段号,或者已转发数据包的包序列号信息。In one possible implementation, the information of the forwarded data packet includes identification information of the forwarded data packet, which may include the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet.

在一种可能的实现方式中,已转发数据包的信息还包括设备地址信息,设备地址信息至少指示发送端设备的地址。In one possible implementation, the information in the forwarded data packet also includes device address information, which at least indicates the address of the sending device.

在一种可能的实现方式中,第一数据包还携带结束重传标识,结束重传标识指示第一数据包为最后一个进行去重处理的数据包。In one possible implementation, the first data packet also carries an end-of-retransmission flag, which indicates that the first data packet is the last data packet to undergo deduplication.

在本申请实施例中,对于网络转发的数据包,若该数据包为从重传缓冲区中取出重发的数据包,则该数据包中会携带重传标识。换言之,对于网络中的转发设备而言,其在向接收端设备转发数据包时,对少量重传的数据包进行打标,使其携带重传标识。In this embodiment of the application, for data packets forwarded by the network, if the data packet is a retransmitted data packet taken from the retransmission buffer, the data packet will carry a retransmission identifier. In other words, for the forwarding device in the network, when forwarding data packets to the receiving device, it marks a small number of retransmitted data packets to carry a retransmission identifier.

而且,相比于相关技术中基于PSN来检测重复包时,需要根据每个数据包携带的PSN来判断该数据包是否为重复数据包的方案,由于本申请实施例中的转发设备可以对少量重传的数据包进行打标,使得接收端设备可以直接根据数据包是否携带重传标识,来预判该数据包是否为重传数据包,进而只需针对少量打了重传标识的数据包,基于去重匹配表进行去重处理,无需对每个数据包均执行判断是否为重复数据包的操作,极大的减小了接收端设备的资源消耗,实现了接收端设备对数据包的轻量级去重。Moreover, compared to related technologies that rely on PSN to detect duplicate packets, requiring each packet to carry a PSN to determine if it is a duplicate, the forwarding device in this embodiment can tag a small number of retransmitted packets. This allows the receiving device to directly predict whether a packet is a retransmitted packet based on whether it carries a retransmission flag. Consequently, only a small number of packets with retransmission flags need to be deduplicated based on the deduplication matching table. This eliminates the need to perform a deduplication check on each packet individually, significantly reducing the resource consumption of the receiving device and achieving lightweight deduplication of packets.

需要说明的是:上述实施例提供的数据包去重装置2700在对重发的数据包进行打标,以及发送第一消息时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据包去重装置2700与数据包去重方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the data packet deduplication device 2700 provided in the above embodiments, when marking retransmitted data packets and sending the first message, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data packet deduplication device 2700 provided in the above embodiments and the data packet deduplication method embodiments belong to the same concept, and its specific implementation process is detailed in the method embodiments, which will not be repeated here.

本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当计算机程序运行在计算机或处理器上时,使得计算机或处理器执行上述实施例所示的数据包去重方法的步骤。This application also provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the data packet deduplication method shown in the above embodiments.

本申请实施例还提供了一种计算机程序产品,该计算机程序产品包含计算机指令,当计算机指令被计算机或处理器执行时,使得计算机或处理器执行上述实施例所示的数据包去重方法的步骤。或者说,提供了一种计算机程序,当计算机程序在计算机或处理器上运行时,使得计算机或处理器执行上述实施例所示的数据包去重方法的步骤。This application also provides a computer program product comprising computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the steps of the data packet deduplication method described in the above embodiments. Alternatively, a computer program is provided that, when run on a computer or processor, causes the computer or processor to perform the steps of the data packet deduplication method described in the above embodiments.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(digital subscriber line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(digital versatile disc,DVD))或半导体介质(例如:固态硬盘(solid state disk,SSD))等。值得注意的是,本申请实施例提到的计算机可读存储介质可以为非易失性存储介质,换句话说,可以是非瞬时性存储介质。In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, "/" means "or," for example, A/B can mean A or B; "and/or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and/or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

需要说明的是,本申请实施例所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are embodiments provided in this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims (21)

一种数据包去重方法,其特征在于,应用于接收端设备,所述方法包括:A data packet deduplication method, characterized in that it is applied to a receiving device, the method comprising: 接收第一数据包;Receive the first data packet; 若所述第一数据包携带有重传标识,则根据去重匹配表对所述第一数据包进行去重处理,以使所述接收端设备中存在一个所述第一数据包,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。If the first data packet carries a retransmission flag, the first data packet is deduplicated according to the deduplication matching table so that there is a first data packet in the receiving device. The deduplication matching table stores information about the data packets that the receiving device has received. 如权利要求1所述的方法,其特征在于,所述根据去重匹配表对所述第一数据包进行去重处理,包括:The method as described in claim 1, wherein the step of deduplicating the first data packet according to the deduplication matching table includes: 若根据所述去重匹配表确定所述第一数据包为重复数据包,则丢弃所述第一数据包;If the first data packet is determined to be a duplicate data packet according to the deduplication matching table, then the first data packet is discarded; 若根据所述去重匹配表确定所述第一数据包为非重复数据包,则保留所述第一数据包。If the first data packet is determined to be a non-duplicate data packet according to the deduplication matching table, then the first data packet is retained. 如权利要求2所述的方法,其特征在于,所述保留所述第一数据包,包括:The method as described in claim 2, wherein retaining the first data packet includes: 存储所述第一数据包,并将所述第一数据包的信息记录在所述去重匹配表中,以对所述去重匹配表进行更新。The first data packet is stored, and its information is recorded in the deduplication matching table to update the deduplication matching table. 如权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, characterized in that the method further comprises: 接收第一消息,所述第一消息携带已转发数据包的信息,所述已转发数据包为目标转发设备在目标故障检测周期内向所述接收端设备转发的数据包,所述第一消息用于指示在所述目标故障检测周期内检测到目标通信路径存在故障,所述目标通信路径为发送端设备与所述接收端设备之间的通信路径;A first message is received, the first message carrying information about a forwarded data packet, the forwarded data packet being a data packet forwarded by the target forwarding device to the receiving device within the target fault detection period, the first message being used to indicate that a fault is detected in the target communication path within the target fault detection period, the target communication path being the communication path between the sending device and the receiving device; 基于所述已转发数据包的信息,对所述去重匹配表进行更新。The deduplication matching table is updated based on the information of the forwarded data packets. 如权利要求4所述的方法,其特征在于,所述第一消息包括第一字段,所述第一字段携带消息类型,所述消息类型指示所述第一消息为去重触发消息,所述去重触发消息用于指示所述接收端设备对在所述第一消息之后接收到的数据包进行去重处理。The method as described in claim 4, wherein the first message includes a first field, the first field carries a message type, the message type indicates that the first message is a deduplication trigger message, and the deduplication trigger message is used to instruct the receiving device to perform deduplication processing on data packets received after the first message. 如权利要求4或5所述的方法,其特征在于,所述目标转发设备位于所述目标通信路径上,且所述目标转发设备包括检测到所述目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;The method as described in claim 4 or 5, wherein the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; 若所述目标设备存在故障,则所述目标转发设备包括与所述目标设备连接的至少一个转发设备;If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; 若所述目标路径段存在故障,则所述目标转发设备包括第一转发设备和/或第二转发设备,所述第二转发设备为所述目标通信路径中与所述第一转发设备通信连接的下一跳转发设备,所述目标路径段为所述第一转发设备与所述第二转发设备之间的路径段。If the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, wherein the second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device, and the target path segment is the path segment between the first forwarding device and the second forwarding device. 如权利要求4-6任一项所述的方法,其特征在于,所述已转发数据包的信息包括所述已转发数据包的标识信息,所述标识信息包括所述已转发数据包的事务层段号,或者所述已转发数据包的包序列号信息。The method according to any one of claims 4-6, wherein the information of the forwarded data packet includes the identification information of the forwarded data packet, the identification information including the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet. 如权利要求7所述的方法,其特征在于,所述已转发数据包的信息还包括设备地址信息,所述设备地址信息至少指示所述发送端设备的地址。The method as described in claim 7, wherein the information of the forwarded data packet further includes device address information, the device address information indicating at least the address of the sending device. 如权利要求1-8任一项所述的方法,其特征在于,所述第一数据包还携带结束重传标识,所述结束重传标识指示所述第一数据包为最后一个进行去重处理的数据包。The method according to any one of claims 1-8, wherein the first data packet further carries an end-of-retransmission identifier, the end-of-retransmission identifier indicating that the first data packet is the last data packet to undergo deduplication. 一种数据包去重方法,其特征在于,应用于目标转发设备,所述方法包括:A data packet deduplication method, characterized in that it is applied to a target forwarding device, the method comprising: 向接收端设备发送第一数据包,以指示所述接收端设备根据去重匹配表对所述第一数据包进行去重处理,使得所述接收端设备中存在一个所述第一数据包;其中,所述第一数据包携带重传标识,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。A first data packet is sent to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on data packets that the receiving device has received. 如权利要求10所述的方法,其特征在于,所述方法还包括:The method as described in claim 10, characterized in that the method further comprises: 向接收端设备发送第一消息,以指示所述接收端设备基于所述第一消息携带的已转发数据包的信息,对所述去重匹配表进行更新;Send a first message to the receiving device to instruct the receiving device to update the deduplication matching table based on the information of the forwarded data packets carried in the first message; 其中,所述已转发数据包为所述目标转发设备在目标故障检测周期内向所述接收端设备转发的数据包,所述第一消息用于指示在所述目标故障检测周期内检测到目标通信路径存在故障,所述目标通信路径为发送端设备与所述接收端设备之间的通信路径。Wherein, the forwarded data packet is the data packet forwarded by the target forwarding device to the receiving device within the target fault detection period, and the first message is used to indicate that a fault is detected in the target communication path within the target fault detection period, and the target communication path is the communication path between the sending device and the receiving device. 如权利要求11所述的方法,其特征在于,所述第一消息包括第一字段,所述第一字段携带消息类型,所述消息类型指示所述第一消息为去重触发消息,所述去重触发消息用于指示所述接收端设备对在所述第一消息之后接收到的数据包进行去重处理。The method as described in claim 11, wherein the first message includes a first field, the first field carries a message type, the message type indicating that the first message is a deduplication trigger message, and the deduplication trigger message is used to instruct the receiving device to perform deduplication processing on data packets received after the first message. 如权利要求10-12任一项所述的方法,其特征在于,所述目标转发设备位于所述目标通信路径上,且所述目标转发设备包括检测到所述目标通信路径上目标设备或目标路径段存在故障的至少一个转发设备;The method according to any one of claims 10-12, wherein the target forwarding device is located on the target communication path, and the target forwarding device includes at least one forwarding device that detects a fault in the target device or the target path segment on the target communication path; 若所述目标设备存在故障,则所述目标转发设备包括与所述目标设备连接的至少一个转发设备;If the target device is faulty, the target forwarding device includes at least one forwarding device connected to the target device; 若所述目标路径段存在故障,则所述目标转发设备包括第一转发设备和/或第二转发设备,所述第二转发设备为所述目标通信路径中与所述第一转发设备通信连接的下一跳转发设备,所述目标路径段为所述第一转发设备与所述第二转发设备之间的路径段。If the target path segment is faulty, the target forwarding device includes a first forwarding device and/or a second forwarding device, wherein the second forwarding device is the next-hop forwarding device in the target communication path that is connected to the first forwarding device, and the target path segment is the path segment between the first forwarding device and the second forwarding device. 如权利要求11所述的方法,其特征在于,所述已转发数据包的信息包括所述已转发数据包的标识信息,所述标识信息包括所述已转发数据包的事务层段号,或者所述已转发数据包的包序列号信息。The method as described in claim 11, wherein the information of the forwarded data packet includes the identification information of the forwarded data packet, the identification information including the transaction layer segment number of the forwarded data packet or the packet sequence number information of the forwarded data packet. 如权利要求14所述的方法,其特征在于,所述已转发数据包的信息还包括设备地址信息,所述设备地址信息至少指示所述发送端设备的地址。The method as described in claim 14, wherein the information of the forwarded data packet further includes device address information, the device address information indicating at least the address of the sending device. 如权利要求10-15任一项所述的方法,其特征在于,所述第一数据包还携带结束重传标识,所述结束重传标识指示所述第一数据包为最后一个进行去重处理的数据包。The method as described in any one of claims 10-15, wherein the first data packet further carries an end-of-retransmission identifier, the end-of-retransmission identifier indicating that the first data packet is the last data packet to undergo deduplication. 一种数据包去重装置,其特征在于,包含于接收端设备中,所述装置包括:A data packet deduplication device, characterized in that it is included in a receiving end device, the device comprising: 第一接收模块,用于接收第一数据包;The first receiving module is used to receive the first data packet; 去重模块,用于若所述第一数据包携带有重传标识,则根据去重匹配表对所述第一数据包进行去重处理,以使所述接收端设备中存在一个所述第一数据包,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。The deduplication module is used to perform deduplication processing on the first data packet according to the deduplication matching table if the first data packet carries a retransmission identifier, so that there is a first data packet in the receiving device. The deduplication matching table stores information about the data packets that the receiving device has received. 一种数据包去重装置,其特征在于,包含于目标转发设备中,所述装置包括:A data packet deduplication device, characterized in that it is included in a target forwarding device, the device comprising: 发送模块,用于向接收端设备发送第一数据包,以指示所述接收端设备根据去重匹配表对所述第一数据包进行去重处理,使得所述接收端设备中存在一个所述第一数据包;其中,所述第一数据包携带重传标识,所述去重匹配表存储有所述接收端设备已接收到的数据包的信息。The sending module is configured to send a first data packet to the receiving device to instruct the receiving device to perform deduplication processing on the first data packet according to the deduplication matching table, so that there is a first data packet in the receiving device; wherein, the first data packet carries a retransmission identifier, and the deduplication matching table stores information on data packets that the receiving device has received. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器;A computer device, characterized in that the computer device includes a processor and a memory; 所述存储器用于存储计算机程序;The memory is used to store computer programs; 所述处理器用于执行所述计算机程序以实现权利要求1-9任一项所述的方法的步骤,或者实现权利要求10-16任一项所述的方法的步骤。The processor is configured to execute the computer program to implement the steps of the method according to any one of claims 1-9, or to implement the steps of the method according to any one of claims 10-16. 一种计算机可读存储介质,其特征在于,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-9任一项所述的方法的步骤,或者实现权利要求10-16任一项所述的方法的步骤。A computer-readable storage medium, characterized in that the storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1-9, or implements the steps of the method according to any one of claims 10-16. 一种计算机程序产品,其特征在于,所述计算机程序产品内存储有计算机指令,所述计算机指令被处理器执行时实现权利要求1-9任一项所述的方法的步骤,或者实现权利要求10-16任一项所述的方法的步骤。A computer program product, characterized in that the computer program product stores computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1-9, or implement the steps of the method according to any one of claims 10-16.
PCT/CN2025/102985 2024-06-29 2025-06-24 Data packet deduplication method, apparatus, device, storage medium and program product Pending WO2026001943A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410866893.1 2024-06-29
CN202410866893.1A CN121239646A (en) 2024-06-29 2024-06-29 Data packet deduplication method, device, apparatus, storage medium and program product

Publications (1)

Publication Number Publication Date
WO2026001943A1 true WO2026001943A1 (en) 2026-01-02

Family

ID=98143696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/102985 Pending WO2026001943A1 (en) 2024-06-29 2025-06-24 Data packet deduplication method, apparatus, device, storage medium and program product

Country Status (2)

Country Link
CN (1) CN121239646A (en)
WO (1) WO2026001943A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479293A (en) * 2020-04-16 2020-07-31 展讯通信(上海)有限公司 Data processing method and device
CN111769915A (en) * 2020-06-28 2020-10-13 杭州涂鸦信息技术有限公司 Data transmission method and related equipment
CN112422408A (en) * 2020-10-30 2021-02-26 百果园技术(新加坡)有限公司 Message processing method, device, equipment and storage medium
CN112468386A (en) * 2020-11-17 2021-03-09 福建天泉教育科技有限公司 Method and terminal for processing repeated messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479293A (en) * 2020-04-16 2020-07-31 展讯通信(上海)有限公司 Data processing method and device
CN111769915A (en) * 2020-06-28 2020-10-13 杭州涂鸦信息技术有限公司 Data transmission method and related equipment
CN112422408A (en) * 2020-10-30 2021-02-26 百果园技术(新加坡)有限公司 Message processing method, device, equipment and storage medium
CN112468386A (en) * 2020-11-17 2021-03-09 福建天泉教育科技有限公司 Method and terminal for processing repeated messages

Also Published As

Publication number Publication date
CN121239646A (en) 2025-12-30

Similar Documents

Publication Publication Date Title
US7876751B2 (en) Reliable link layer packet retry
CN1633647B (en) System, method for managing data transfer in a network
CN103098428B (en) A kind of message transmitting method, equipment and system realizing PCIE switching network
US9590923B2 (en) Reliable link layer for control links between network controllers and switches
JP3816531B2 (en) Asynchronous packet switching
US6760766B1 (en) Data transmission method and device
US9197373B2 (en) Method, apparatus, and system for retransmitting data packet in quick path interconnect system
US12395273B2 (en) Method for retransmitting data and apparatus
CN110166354A (en) A kind of data processing system comprising network-on-chip fault tolerance rout ing
US20200044964A1 (en) Defect detection in ip/mpls network tunnels
CN121312115A (en) Round trip time and explicit congestion notification signal for bandwidth utilization
WO2023133697A1 (en) Packet loss processing method and apparatus, switch, sending device and data transmission system
CN107968753A (en) The method and apparatus for changing Media Access Control Address forwarding table
US20230058854A1 (en) Method and system for sequencing data checks in a packet
WO2008057831A2 (en) Large scale multi-processor system with a link-level interconnect providing in-order packet delivery
WO2026001943A1 (en) Data packet deduplication method, apparatus, device, storage medium and program product
US8005972B2 (en) Detection of inconsistent data in communications networks
CN111263250A (en) Service data processing method and device
US20250123985A1 (en) Autonomous integrated translator for local bus operations
CN117640511B (en) Wired communication system, communication chip, communication method and medium thereof
CN120658671A (en) Data transmission method, device, equipment, system and storage medium
WO2025161854A1 (en) Communication method, communication apparatus, and communication device
CN121359429A (en) Scalable collaboration of congestion control and adaptive load balancing
CN121399907A (en) Collaborative congestion control and adaptive load balancing