WO2022052882A1 - Procédé et appareil de transmission de données - Google Patents

Procédé et appareil de transmission de données Download PDF

Info

Publication number
WO2022052882A1
WO2022052882A1 PCT/CN2021/116615 CN2021116615W WO2022052882A1 WO 2022052882 A1 WO2022052882 A1 WO 2022052882A1 CN 2021116615 W CN2021116615 W CN 2021116615W WO 2022052882 A1 WO2022052882 A1 WO 2022052882A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
group
data stream
message
information
Prior art date
Application number
PCT/CN2021/116615
Other languages
English (en)
Chinese (zh)
Inventor
陈永献
郑合文
刘和洋
闫健
吴涛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022052882A1 publication Critical patent/WO2022052882A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4645Details on frame tagging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a data transmission method and apparatus.
  • the data center puts forward more comprehensive and demanding requirements for the switching architecture of network equipment. For example, it is expected that the switching architecture will develop in the direction of larger capacity and bandwidth, finer quality of service (QoS) guarantee, higher reliability and fault-tolerant performance, etc., to meet the emerging of various new services and applications.
  • QoS quality of service
  • a data stream sent to a destination in a CLOS network usually has multiple links (or paths).
  • the data flow sent to the same destination address can only use one of the multiple links.
  • the use of equal-cost multipath routing (ECMP) technology can simultaneously use the multiple links in the network environment, which not only increases the transmission bandwidth, but also can backup the data transmission of the failed link without delay and packet loss.
  • the biggest feature of ECMP is that it realizes the purpose of multi-path load balancing and link backup in the case of equal cost.
  • the above load balancing based on flow level, due to the randomness of the hash itself, the size and rate of each data flow, etc. It is also random.
  • the related art proposes load balancing at the packet level. For each packet in the data stream, random or round robin is used to select a link for the packet. .
  • Packet-level-based load balancing has fine granularity and good load balancing effect. However, this method may cause a large number of packets to be out of order. If the receiving end has insufficient ability to handle out-of-order packets, service performance will be degraded. Therefore, the existing load balancing methods cannot meet the requirements.
  • the embodiments of the present application provide a data transmission method and device, which can perform load balancing based on packet groups, have a good load balancing effect, and can achieve packet sequence preservation.
  • the present application provides a data transmission method.
  • a forwarding device receives a first packet, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream.
  • the first data stream includes at least one packet group.
  • the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2.
  • the forwarding device selects a target link from multiple links according to the group identifier included in the first packet and the identification information of the first data stream, and forwards the first packet through the target link to the next forwarding device or receiving device.
  • the forwarding device By grouping the packets in the data flow and adding the same group ID to the packets in the same packet group, the forwarding device routes the packets from multiple links according to the packet group ID and the identification information of the data flow. , so as to realize the load balancing based on the packet group.
  • the packets in the same packet group are transmitted on the same link, and there will be no disorder, and the receiver does not need to perform disorder reordering, reducing the Receiver's request.
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and obtains a hash value from the hash value according to the hash value.
  • the target link is selected from among multiple links.
  • the forwarding device performs a hash operation on the group identifier included in the packet and the identifier information of the data flow to select a route for the packet, and can realize packet forwarding and order preservation without additional flow table information.
  • the forwarding device before the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, according to the first packet Query the flow table of the first data flow for the identification information of the data flow included in the first data flow, and the flow table of the first data flow includes the group identification and link information of the forwarded packets, and the forwarding device will The group identifier included in the first packet is matched with the flow table of the first data flow. If the matching is successful, the forwarding device forwards the first packet through the link corresponding to the link information of the successfully matched forwarded packet.
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and obtains a hash value from the multiple links according to the hash value. to select the target link.
  • the first packet in each packet group is routed through a hash operation, and other packets in the packet group are selected for other packets according to the group ID and flow table carried in the packet. Select the same link as the first packet for forwarding.
  • the flow table established by this method is simple, and only the group ID of each packet group and the link of the packet group need to be stored in the flow table.
  • the forwarding device After the forwarding device performs a hash operation on the group identifier included in the first packet and the identification information of the first data stream to obtain a hash value, the forwarding device performs a hash operation according to the group identifier included in the first packet. and updating the flow table of the first data flow with the target link.
  • a second aspect of the present application provides a data transmission method, wherein a sending device determines a packet group to which a first packet in a first data stream belongs, and adds a group identifier of the packet group to which the first packet belongs to the In the first packet, the first packet further includes identification information of the first data stream, the first data stream includes at least one packet group, and N consecutive packets in the first data stream are included.
  • the group identifiers of the packet groups are different, N is greater than or equal to 2, and the group identifiers in the packets in the same packet group in the first data stream are the same, and the sending device sends the first packet to the forwarder equipment.
  • the sending device groups the packets in the data flow and carries the group ID in the packets, so that the forwarding device can route the packets according to the group ID carried in the packets and the identification information of the data flow to achieve load balancing.
  • the sending device before the sending device adds the group identifier of the packet group to which the first packet belongs to the first packet, the sending device generates the information that the first packet belongs to.
  • the group ID of the packet group before the sending device adds the group identifier of the packet group to which the first packet belongs to the first packet, the sending device generates the information that the first packet belongs to. The group ID of the packet group.
  • the sending device generates the group identifier of the packet group to which the first packet belongs according to the group identifier of the previous packet group, wherein the first data stream in the first The group identifier of the message group is generated during the initialization of the first data stream.
  • the sending device generates the group identifier of the message group to which the first message belongs according to the group identifier of the previous message group, which may be: the sending device generates the group identifier of the previous message group.
  • the group identifier of the packet group is increased, decreased or multiplied by a preset value to obtain the group identifier of the packet group to which the first packet belongs.
  • a third aspect of the present application provides a data transmission method.
  • a receiving device receives a first packet, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream.
  • the first data stream includes at least one packet group, the group identifiers of consecutive N packet groups in the first data stream are different, and N is greater than or equal to 2, and the same packet in the first data stream
  • the packets in the packet group have the same group identifier, and the receiving device determines whether packet loss or disorder occurs in the packet group to which the first packet belongs according to the group identifier and sequence number of the first packet. .
  • the packets in the same packet group carry the same group ID, and the forwarding device routes the packets according to the group ID, so as to ensure that the packets in the same packet group are transmitted on the same link and will not appear.
  • the receiving end does not need to perform out-of-order rearrangement, which reduces the requirements of the receiving end.
  • the method further includes: the receiving device sends a response packet of the first packet, where the response packet of the first packet includes a packet group to which the first packet belongs group ID.
  • the sequence numbers of the packets in different packet groups in the first data stream are irrelevant.
  • the first packet further includes a valid bit, and the valid bit is used to indicate whether the group identifier in the first packet is efficient.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information, or triplet information information;
  • the quintuple information includes a source Internet Protocol IP address, a destination IP address, a source port, a destination port and a protocol number;
  • the quadruple information includes source IP address, destination IP address, source port and destination port;
  • the triplet information includes source IP address, source port and protocol number;
  • the identification information of the first data stream includes any one of the quintuple information, quadruple information, or triplet information, and one or more of the following information: source media access control MAC address , destination MAC address, source interface, and VLAN ID of the virtual local area network.
  • the first packet is a ROCE protocol packet using remote direct memory access via Ethernet, and the group identifier is carried in the first packet.
  • the group identifier is carried in the first packet.
  • the reserved field of the basic transport header of the message In the reserved field of the basic transport header of the message.
  • the first packet is a transmission control protocol TCP packet
  • the group identifier is carried in the reserved bits and the reserved bits of the first packet. / or in the options field.
  • a fourth aspect of the present application provides a forwarding device, including:
  • a receiving module configured to receive a first message, where the first message includes a group identifier of a message group to which the first message belongs and identification information of a first data stream, where the first data stream includes At least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the groups in the packets in the same packet group in the first data stream same identification;
  • a routing module configured to select a target link from a plurality of links according to the group identifier included in the first message and the identification information of the first data stream;
  • a sending module configured to forward the first packet to the next forwarding device or receiving device through the target link.
  • the routing module is specifically used for:
  • the target link is selected from the plurality of links according to the hash value.
  • a possible implementation also includes:
  • a query module configured to query the flow table of the first data flow according to the identification information of the data flow included in the first message, where the flow table of the first data flow includes the group identifier of the forwarded message and link information;
  • a matching module configured to match the group identifier included in the first message with the flow table of the first data stream
  • the sending module is further configured to forward the first message through the link corresponding to the link information of the successfully forwarded message that has been matched;
  • the routing module is specifically used for:
  • An update module configured to update the flow table of the first data flow according to the group identifier included in the first message and the target link.
  • a fifth aspect of the present application provides a sending device, including:
  • a determining module configured to determine the packet group to which the first packet in the first data stream belongs
  • the adding module is configured to add the group identifier of the packet group to which the first packet belongs to the first packet, where the first packet also includes the identification information of the first data stream, so
  • the first data stream includes at least one packet group, the group identifiers of consecutive N packet groups in the first data stream are different, and N is greater than or equal to 2, and the same packet group in the first data stream
  • the group IDs in the packets within the same are the same;
  • a sending module configured to send the first message to the forwarding device.
  • a possible implementation also includes:
  • a generating module configured to generate a group identifier of the message group to which the first message belongs.
  • the generating module is specifically used for:
  • the group identifier of the packet group to which the first packet belongs is generated according to the group identifier of the previous packet group, wherein the group identifier of the first packet group in the first data stream is in the first data stream. Generated during stream initialization.
  • the generating module is specifically used for:
  • the group identifier of the packet group to which the first packet belongs is obtained by increasing, decreasing or multiplying the group identifier of the previous packet group by a preset value.
  • a sixth aspect of the present application provides a receiving device, including:
  • a receiving module configured to receive a first packet by a receiving device, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream, the first data stream including at least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the packets in the same packet group in the first data stream
  • the group ID is the same;
  • the determining module is configured to determine whether packet loss or disorder occurs in the packet group to which the first packet belongs, according to the group identifier and the sequence number of the first packet.
  • a possible implementation also includes:
  • a sending module configured to send a response message of the first message, where the response message of the first message includes a group identifier of a message group to which the first message belongs.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information, or triplet information information;
  • the quintuple information includes a source Internet Protocol IP address, a destination IP address, a source port, a destination port and a protocol number;
  • the quadruple information includes source IP address, destination IP address, source port and destination port;
  • the triplet information includes source IP address, source port and protocol number;
  • the identification information of the first data stream includes any one of the quintuple information, quadruple information, or triplet information, and one or more of the following information: source media access control MAC address , destination MAC address, source interface, and VLAN ID of the virtual local area network.
  • the first message further includes a valid bit, where the valid bit is used to indicate whether the group identifier in the message is valid.
  • the first packet is a ROCE packet using remote direct memory access via Ethernet
  • the group identifier is carried in the first packet in a reserved field of the basic transport header of the text.
  • the first packet is a transmission control protocol TCP packet
  • the group identifier is carried in the reserved bits and the reserved bits of the first packet. / or in the options field.
  • a seventh aspect of the present application provides a forwarding device, including a processor, a memory, and a transceiver, where the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the data stored in the memory. instructions, so that the forwarding device executes the method provided by the first aspect and any possible implementation manner of the first aspect of the present application.
  • a ninth aspect of the present application provides a sending device, including a processor, a memory, and a transceiver, where the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the data stored in the memory. an instruction, so that the sending device executes the method provided by the second aspect and any possible implementation manner of the second aspect of the present application.
  • a tenth aspect of the present application provides a receiving device, including a processor, a memory, and a transceiver, where the memory is used for storing instructions, the transceiver is used for communicating with other devices, and the processor is used for executing the data stored in the memory. an instruction, so that the receiving device executes the method provided by the third aspect and any possible implementation manner of the third aspect of the present application.
  • An eleventh aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, which, when the instructions are executed, cause a computer to execute any of the possibilities as described in the first to third aspects of the present application. Methods provided by the implementation.
  • a twelfth aspect of the present application provides a computer program product, the computer program product includes instructions that, when the instructions are executed, cause a computer to execute the method provided by any possible implementation manner of the first aspect to the third aspect of the present application .
  • a thirteenth aspect of the present application provides a system-on-a-chip or system-on-chip, the system-on-chip or system-on-chip can be applied to a server, and the system-on-chip or system-on-chip includes: at least one communication interface, at least one processor, at least one A memory, the communication interface, the memory, and the processor are interconnected through a bus, and the processor executes the instructions stored in the memory, so that the server can execute any of the possible implementations of the second aspect or the third aspect of the present application method provided.
  • a fourteenth aspect of the present application provides a system-on-a-chip or system-on-chip, the system-on-chip or system-on-chip can be applied to a forwarding device, the system-on-chip or system-on-chip includes: at least one communication interface, at least one processor, At least one memory, the communication interface, the memory, and the processor are interconnected through a bus, and the processor executes the instructions stored in the memory, so that the forwarding device can perform any of the second aspect or the third aspect of the present application. Methods provided by the implementation.
  • the first server when sending the data stream, groups the packets in the data stream according to the requirement of maintaining the order of the packets, and adds the packets in the same packet group.
  • Group ID Packets in the same packet group need to be sequence-preserved, but different packet groups do not need to be sequence-preserved.
  • the forwarding device (which can be a switch) will Select a target link from multiple links based on the identification information of the data stream to which the message belongs, and forward the message to the receiving device through the target link.
  • the second server After receiving the packet, the second server determines whether packet loss or disorder occurs in the packet group to which the packet belongs, according to the group identifier and sequence number of the packet.
  • the packets in the same packet group are transmitted on the same link, and there will be no out-of-order, and there is no need to perform out-of-order rearrangement as the server at the receiving end, which reduces the requirements of the receiving end.
  • the forwarding device by adding a group identifier to the message, the forwarding device can select a route according to the group identifier and the data flow identifier, and the forwarding device does not need to store the flow table, and the implementation solution is simpler.
  • FIG. 1 is a schematic structural diagram of a data center network according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of load balancing at the packet level
  • Figure 3 is a schematic diagram of load balancing at the flowlet level
  • Fig. 5 is the grouping schematic diagram of the first data flow
  • Figure 6 is a schematic diagram of the frame structure of the ROCE v2 message
  • Fig. 7 is the frame structure schematic diagram of TCP message
  • FIG. 8 is a flowchart of a data transmission method provided in Embodiment 2 of the present application.
  • FIG. 10 is a flowchart of a data transmission method provided in Embodiment 3 of the present application.
  • FIG. 11 is a flowchart of a data transmission method provided in Embodiment 4 of the present application.
  • FIG. 12 is a schematic structural diagram of a forwarding device according to Embodiment 5 of the present application.
  • FIG. 13 is a schematic structural diagram of a sending device according to Embodiment 6 of the present application.
  • FIG. 14 is a schematic structural diagram of a receiving device according to Embodiment 7 of the present application.
  • FIG. 15 is a schematic structural diagram of a forwarding device according to Embodiment 8 of the present application.
  • FIG. 16 is a schematic structural diagram of a server provided by Embodiment 9 of the present application.
  • Units (or modules) in this application refer to functional units or logical units. It can be in the form of software, and its functions are realized by the processor executing the program code; it can also be in the form of hardware.
  • 1 is a schematic structural diagram of a data center network provided by an embodiment of the present application.
  • the following takes the data center network including eight servers as an example for description. The working engineering and working principle are similar, and will not be repeated here.
  • 1, server 1 and server 2 are connected to switch 1
  • server 3 and server 4 are connected to switch 2
  • server 5 and server 6 are connected to switch 3
  • server 7 and server 8 are connected to switch 4, wherein,
  • a server is also called a host. All servers can use Transmission Control Protocol/Internet Protocol (TCP/IP) protocol for communication, for example: between server 1 and server 2 or between server 2 and server 5 through TCP/IP to communicate.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • the adopted traffic engineering (TE) technology can be equal-cost multipath (ECMP), which distributes all flows into multiple equal-length paths through random hashing.
  • ECMP equal-cost multipath
  • path 1 is: server 1 - switch 1 - switch 5 - switch 9 - switch 7 - switch 3 - server 5
  • Path 2 is: server 1 - switch 1 - switch 6 - switch 9 - switch 10 - switch 8 - switch 3 - server 5.
  • ECMP generally uses the five-tuple static hash of the data flow to randomly map the data flow to one of multiple paths for forwarding.
  • a path is also called a link.
  • FIG. 2 is a schematic diagram of packet-level load balancing.
  • data flow 1 also called flow1
  • packet 2 includes packet 1, packet 2, packet 3 and packet 4.
  • switch 1 selects the link for each packet respectively.
  • the switch selects link 1 for packet 1 and packet 4, and link 1 for packet 2 and Packet 3 selects link 2.
  • the load balancing effect is very good.
  • the second load balancing method is load balancing based on the sub-flow level (flowlet).
  • the switch will determine the time interval between the to-be-forwarded packet and the previous packet in the flow to which it belongs when forwarding packets. If the interval exceeds the set threshold, the flowlet is segmented, otherwise the packet still belongs to the previous flowlet.
  • Figure 3 is a schematic diagram of load balancing at the flowlet level. As shown in Figure 3, data flow 1 (also called flow1) includes packet 1, packet 2, packet 3, packet 4 and packet 5. It is assumed that the packet 1 is the first packet in data flow 1. When packet 1 arrives at switch 1, switch 1 establishes a flow table for data flow 1, and the flow table includes the identification information of the data flow and the reception time of packet 1.
  • switch 1 After establishing the flow table of data flow 1, switch 1 selects link 1 for packet 1 from the two links, and records the link of packet 1 in the flow table. After receiving packet 2, switch 1 queries the flow table to determine the receiving time interval between packet 2 and packet 1. If the time interval is less than the threshold, it means that packet 2 and packet 1 belong to the same flowlet, and packet 2 uses the same Packet 1 is sent on the same link, and the flow table is updated. Similarly, after switch 1 receives packet 3, it queries the flow table according to the reception time of packet 3 and the flow table, and determines that packet 3 and packet 2 belong to the same flowlet according to the reception time interval of packet 3 and packet 2. Packet 3 is sent on the same link as Packet 2, and the flow table is updated.
  • switch 1 After switch 1 receives packet 4, it queries the flow table and determines that packet 3 and packet 4 do not belong to the same flowlet according to the receiving time interval of packet 3 and packet 4. Switch 1 receives packets from the two links. Packet 4 selects link 2 and updates the flow table. Subsequent packets 5 and 4 belong to the same flowlet and are sent using the same link as packet 4. Through the above forwarding process, it can be known that packets 1, 2, and 3 of data flow 1 belong to flowlet 1-1, and packets 4 and 5 belong to flowlet 1-2. The switch selects the route according to the flowlet, and the packets in the same flowlet have the same path.
  • the internal packets of the flowlet are ordered, but if the threshold for dividing the flowlet is not large enough, the packets may still be out of order.
  • splitting a flowlet and selecting a path requires the switch to save the flow table of each flow, which requires high specifications for the flow table of the switch and may not be supported by many switches.
  • a sending device (which may be a server) groups the packets in the data stream according to the requirement of ensuring the order of the packets, and groups the packets for the same data stream.
  • a group ID is added to the packets in a packet group.
  • the packets in the same packet group need to be sequence-preserved, but not between different packet groups.
  • the forwarding device (which can be a switch or other device with data forwarding function) ) After receiving the message, the forwarding device selects a target link from multiple links according to the group identifier included in the message and the identification information of the data stream to which the message belongs, and forwards the message to the receiver through the target link equipment.
  • the receiving device After receiving the packet, the receiving device (which may be a server) determines whether packet loss or disorder occurs in the packet group to which the packet belongs, according to the group identifier and sequence number of the packet. In this scheme, the packets in the same packet group are transmitted on the same link, and there will be no out-of-order, and the receiving end does not need to perform out-of-order rearrangement, which reduces the requirements for the receiving end.
  • the forwarding device can select the route according to the group ID and the ID of the data flow, and the forwarding device does not need to store the flow table, which is compatible with various forwarding devices, and the solution is simpler to implement.
  • the solution of the present application is not limited to the data center scenario, and the solution of the present application can be used as long as there is a multi-path scenario that requires load balancing routing.
  • the solution of the present application can be used for load balancing in a metropolitan area network.
  • FIG. 4 is a flowchart of a data transmission method provided by an embodiment of the present application. As shown in FIG. 4 , in this embodiment, the flow control method may include the following steps:
  • the sending device determines the packet group to which the first packet in the first data stream belongs.
  • the sending device can generate a first data stream according to business requirements.
  • the first data stream includes multiple packets.
  • the first data stream does not specifically refer to a data stream, but refers to the data stream currently sent by the sending device.
  • the first packet does not specifically refer to a certain packet in the first data stream, but a packet currently to be processed by the sending device.
  • the sending device may generate multiple different data streams, and the processing of each data stream is the same.
  • the following embodiment takes one data stream as an example for description.
  • the first data stream includes at least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the packets in the same packet group in the first data stream are The group ID is the same.
  • the messages in each message group need to be sequence-preserved, and the sequence-preserving between different message groups is not required, and the sending device may group the packets according to the sequence-preserving requirements of the packets.
  • the service software of the sending device may group the packets of the first data stream.
  • the service software knows the operation corresponding to each packet, and can group several consecutive packets with the same operation according to the operation of the packet. Divide into a message group.
  • the sending device When generating the first data stream, the sending device will generate identification information of the first data stream.
  • the identification information of the first data stream can uniquely identify one data stream, and the identification information of different data streams is different.
  • the identification information of the first data stream may include any one of the following information: quintuple information, quadruple information or triplet information of the service.
  • the quintuple information includes a source internet protocol (IP) address, a destination IP address, a source port, a destination port and a protocol number.
  • IP internet protocol
  • the quadruple information includes source IP address, destination IP address, source port and destination port.
  • the triplet information includes source IP address, source port and protocol number.
  • the identification information of the first data stream includes any one of five-tuple information, four-tuple information or three-tuple information, and one or more of the following information: source media access control (media access control, MAC ) address, destination MAC address, source interface, and virtual local area network (VLAN) identifier.
  • source media access control media access control
  • MAC media access control
  • VLAN virtual local area network
  • the identification information of the first data stream includes quintuple information and a source MAC address, or the identification information of the first data stream includes quadruple information and a VLAN identifier, or the first data stream includes triplet information, source MAC address MAC address and VLAN ID.
  • the sending device adds the group identifier of the packet group to which the first packet belongs to the first packet.
  • the service software of the sending device may determine the message group to which the first message belongs. After determining the message group to which the first message belongs, the service software adds the identifier of the message group to the first message, or the service software The grouping information of the first packet is sent to the network card of the sending device, and the network card of the sending device adds the group identifier of the packet group to which the first packet belongs to the first packet according to the grouping information of the first packet.
  • the grouping information of the first packet may be whether the first packet and the previous packet in the first data stream belong to the same packet group.
  • the previous packet belongs to the same packet group, and the group ID of the previous packet group is added to the first packet. If the first packet does not belong to the same packet group as the previous packet, it means that the first packet
  • the network card can generate a new group identifier and add the new group identifier to the first packet.
  • the grouping information of the first packet may also be a group identifier of the packet group to which the first packet belongs.
  • the sending device before the sending device adds the group identifier of the packet group to which the first packet belongs to the first packet, the sending device generates the group identifier of the packet group to which the first packet belongs.
  • the group identifiers of the above N message groups may be independently generated, and the group identifiers do not have an association relationship.
  • the group identifiers of the N message groups are randomly generated.
  • the group identifiers of the above N message groups may also have an association relationship.
  • the group identifier of the first packet group in the first data stream is generated during the initialization of the first data stream, and the subsequent sending device generates the packet to which the first packet belongs according to the group identifier of the previous packet group.
  • the group identifier of the group for example, the sending device may increase, decrease or multiply the group identifier of the previous packet group by a preset value to obtain the group identifier of the packet group to which the first packet belongs.
  • FIG. 5 is a schematic diagram of grouping of the first data stream.
  • the first data stream includes N packet groups, where N is greater than or equal to 3.
  • Packets 1-4 belong to one packet group 1 and packet group 2 Starting from 5 packets, it includes multiple consecutive packets, and so on, and the packet group N includes 6 packets.
  • the initial group identifier may be a first random value or a fixed value, and the initial group identifier is the identifier of the first packet group in the first data stream.
  • the sending device inserts the initial group identifier into the packets 1-4 respectively.
  • the sending device updates the initial packet group to obtain the identifier of the second packet group. Add 1 or subtract 1 to the group ID to obtain the group ID of the second message group. Similarly, after the second message group is grouped, the sending device updates the group ID of the first message group to obtain the first message group ID. For the group identifiers of the three message groups, for example, add 1 or subtract 1 to the initial group identifier to obtain the group identifier of the third message group, and so on to obtain the group identifiers of N message groups.
  • the first packet can be a ROCE packet or a TCP packet.
  • the group identifier can be carried in the reserve (reserve) of the base transport header (BTH) of the first packet. in the field.
  • the group identifier may be carried in a reserved bit and/or an option field of the first packet.
  • FIG. 6 is a schematic diagram of the frame structure of the ROCE v2 packet.
  • the ROCE v2 packet includes: Eth L2 packet header (Header), Ethernet type (ether type), IP packet header, IP protocol number ( IP protocol number), UDP header, UDP port number (UDP dport number), IB BTH, IB (wireless bandwidth, infiniband) payload (payload), Invariant Cyclic redundancy check (Invariant Cyclic redundancy check, ICRC) and Frame Check Sequence FCS.
  • IB BTH occupies 12 bytes, 0-15 bits of 0-3 bytes (32 bits in total) are partition keys, 16-23 bits are SE, M, Pad and TVer fields, 34-31 The bits are the operation code. Bits 0-23 of 4-7 bytes are the target queue pair (queue pair, QP), and bits 24-31 are reserved fields (8 bits in total). Bits 0-23 of 8-11 bytes are packet sequence numbers, bits 24-30 are reserved fields (7 bits in total), and bits 31 are A.
  • IB BTH has a total of 15-bit reserved fields, which are located in different bytes.
  • the group identifier of the packet group can occupy all or part of the 15-bit reserved field.
  • FIG. 7 is a schematic diagram of the frame structure of a TCP packet.
  • the packet header included in the TCP packet occupies 20 bytes, which are: 16-bit source port number, 16-bit destination port number, 32-bit Sequence number, 32-bit confirmation sequence number, 4-bit header length, 6-bit reserved field, 1-bit urgency (URG) flag, 1-bit acknowledgement (ACK) flag, 1-bit advance ( push, PSH) flag, 1-bit reset (reset, RST) flag, 1-bit synchronization (synchronization, SYN) flag, 1-bit completion (finish, FIN) flag, 16-bit window size, 16-bit calibration Checksum, 16-bit urgent pointer.
  • the TCP message also includes options and data, wherein the option field occupies 0-40 bits.
  • the group identifier of the packet group can be carried in the 6-bit reserved field of the TCP message, or in the option field. The group identifier can also occupy the 6-bit reserved field and all or part of the option field at the same time.
  • the first message further includes a valid bit (valid), where the valid bit is used to indicate whether the group identifier in the message is valid.
  • the valid bit may occupy one or more bits, and in the ROCE message, the valid bit may occupy the 15-bit reserved field of the IB BTH together with the group identifier. In a TCP message, the valid bit may occupy a 6-bit reserved field together with the group ID, and all or part of the option field.
  • the first packet also includes identification information of the first data stream.
  • the identification information carried in each packet in the first data stream is the same, and the forwarding device or the receiving device may determine the identification information according to the identification information of the data stream included in the packet.
  • the data stream to which the packet belongs is the same, and the forwarding device or the receiving device may determine the identification information according to the identification information of the data stream included in the packet. The data stream to which the packet belongs.
  • the message in the data flow has a serial number.
  • the packets in the first data stream are numbered uniformly.
  • an initial sequence number is generated.
  • the initial sequence number can be 0 or a randomly generated value.
  • the sequence of each subsequent packet is The number can be obtained by adding 1 to the previous serial number.
  • the receiving device can determine whether packet loss occurs in the data stream according to the sequence number of the packet, and can determine whether packet loss occurs in the packet group according to the group ID and sequence number. In this manner, the sequence numbers of packets in different packet groups in the first data stream are associated.
  • sequence numbers of packets in different packet groups in the first data stream are irrelevant, and the sequence numbers of each packet group are numbered independently.
  • the sequence numbers of each packet group are from 0 or Starting with a random value, the sequence number of subsequent packets is obtained by adding 1 to the previous sequence number.
  • the sequence numbers of each packet group may be the same.
  • the sequence numbers of the packet groups 1 and 2 both start from 0, and the sequence numbers are 0, 1, 2, and 3.
  • the receiving device since the serial numbers of each packet group are repeated, the receiving device cannot determine the order of the packets based on the serial number alone. Packet loss occurred.
  • the sending device sends the first packet to the forwarding device.
  • the sending device sends the first packet to the connected forwarding device.
  • server 1 is the sending device
  • server 1 sends the first packet to switch 1
  • switch 1 is the forwarding device.
  • the sending device groups the packets in the first data stream, and the grouping may be real-time.
  • the application layer of the sending device determines the packet group to which the packets belong.
  • each packet group has a sequence, and the packet group that is grouped first is sent first.
  • Each packet group may reach the receiving device through different links.
  • the forwarding device that each packet group passes through forwards the packet, due to the different paths traversed by each packet group, each forwarding device does not need to send the packet group.
  • the receiving device does not need to consider the sequence of packet groups when receiving. For example, on the sending device side, the packet group 1 is sent before the packet group 2.
  • the sending order of the packet group 1 and the packet group 2 may be different. For example, on the forwarding device 1, the packet group 1 is sent before message group 2. On forwarding device 2, message group 2 is sent before message group 1. On the receiving device, message group 2 may arrive before message group 1, that is, the receiving device receives the message first. Packet 2, and then receive Packet 1.
  • the packets in the same packet group are sent in sequence. Whether on the sending device or the forwarding device, the packets in the same packet group are sent in sequence, and the sequence is forwarded. process does not change. Correspondingly, on the receiving device side, the packets in the same packet group are also received according to the sending order of the sender.
  • the sending device determines the packet group to which the first packet in the first data stream belongs, and adds the group identifier of the packet group to which the first packet belongs to the first packet. It also includes identification information of the first data stream, the first data stream includes at least one packet group, the group identifiers of consecutive N packet groups in the first data stream are different, N is greater than or equal to 2, and the The packets in the same packet group have the same group identifier, and the sending device sends the first packet to the forwarding device.
  • the sending device groups the packets in the data stream and inserts a group identifier into the packets, and the subsequent forwarding device selects a path for each packet group according to the group identifier and the identifier information of the first data stream. Grouping is carried out according to the order-preserving requirement, so that the order-preserving requirement can be met while achieving load balancing, and no additional flow table needs to be established during route selection.
  • FIG. 8 is a flowchart of a data transmission method provided by Embodiment 2 of the present application. As shown in FIG. 8 , the method provided by this embodiment includes the following steps.
  • the forwarding device receives a first packet, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream, and the first data stream includes at least one packet group , the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the group identifiers in the packets in the same packet group in the first data stream are the same.
  • each link includes multiple forwarding devices, and the forwarding device in this embodiment may be any forwarding device on the link.
  • the forwarding device When the forwarding device is the first forwarding device on the path, the forwarding device receives the first packet from the sending device, and when the forwarding device is not the first forwarding device on the path, the forwarding device receives the first packet from the previous (or The previous one) The forwarding device receives the first packet.
  • the group identifier included in the first packet is added by the sending device.
  • the group identifier is used to indicate the packet group to which the first packet belongs, and the identification information of the first data stream is used to uniquely identify the data stream to which the first packet belongs.
  • the data stream to which the first packet belongs is the first data stream.
  • the first data stream includes multiple packet groups, each packet group includes at least one packet, and the packets of each packet group need to be sequenced.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information, or triplet information. Or, the identification information of the first data stream includes any one of five-tuple information, four-tuple information, and triplet information, and one or more of the following information: source MAC address, destination MAC address, source interface and VLAN ID.
  • the forwarding device selects a target link from multiple links according to the group identifier included in the first packet and the identifier information of the first data stream.
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and selects a target chain from multiple links according to the hash value.
  • the channel is used to transmit the first message.
  • hash algorithms include message digest version 4 (MD4 for short), MD5, SHA-1, etc. The embodiment of the present application does not limit the hash algorithms.
  • the forwarding device For each packet in the packet group, since the group identifier carried by the packet is the same as the identification information of the first data stream, the hash value after the hash operation is the same. Therefore, it can ensure that the packets in the same packet group The text is transmitted on the same link.
  • the group identifiers of different packet groups are different, and the hash values of different packet groups after hash operation may be the same or different.
  • the forwarding device performs a hash operation on the first group identifier and the identifier information of the first data stream.
  • the first hash value, the second hash value is obtained by performing a hash operation on the second group identifier and the identifier of the first data stream, the first group identifier is the identifier of the first message group, and the second group identifier is the second message group.
  • the identifier of the text group, the first hash value and the second hash value may be the same or different. Therefore, some packet groups in consecutive N packet groups may select the same link. For example, if N is 4, link 1 is selected for the first packet group and the fourth packet group, and link 1 is selected for the second packet group. and the third packet group to select link 2 to achieve load balancing.
  • the forwarding device performs a hash operation on each received packet, and selects a route according to the obtained hash value.
  • load balancing and packet ordering no additional flow table is required. Simple to implement.
  • the forwarding device first queries the flow table of the first data flow according to the identification information of the data flow included in the first packet, and the flow table of the first data flow includes the group identifier of the packet that has been forwarded and link information.
  • the forwarding device maintains a flow table for each data flow, and the flow table includes the group ID of the forwarded packets and the link information of the forwarded packets.
  • the group identifier and link information of the forwarded packets may exist in the form of a packet group, that is, the flow table includes the group identifier of the forwarded packet group and the link information of each packet group.
  • the forwarding device matches the group identifier included in the first packet with the flow table of the first data flow, and if the matching is successful, the forwarding device matches the first packet with the link corresponding to the link information of the successfully forwarded packet.
  • the message is forwarded. If the matching fails, the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and selects the target link from the multiple links according to the hash value for the first data stream.
  • a packet is forwarded.
  • the forwarding device calculates the hash value according to the group identifier included in the first packet and the first data stream.
  • the target link updates the flow table of the first data flow.
  • Matching the group identifier included in the first packet with the flow table of the first data flow may be: the forwarding device compares the group identifier included in the first packet with the group identifier of the forwarded packet in the flow table, If there is a group ID that is the same as the group ID included in the first packet in the flow table, the forwarded packet corresponding to the same group ID is regarded as a successfully matched forwarded packet, and the successfully matched forwarded packet is used. The link of the packet is used as the destination link.
  • the packets with the same group ID belong to the same packet group, and the forwarding paths of the packets in the same packet group are the same, so there is no need to perform the hash operation on the first packet, but use the The link that has forwarded the packet is used as the link of the first packet.
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value.
  • the value is the route selection for the first packet.
  • the forwarding device may update the flow table, and at this time, update the information of the first packet into the flow table, for example, update the sequence number, group ID, and link of the first packet into the flow table.
  • the flow table needs to be updated after each packet is forwarded.
  • the forwarding device may not update the flow table.
  • Each packet group only updates the flow table once, and the forwarding device updates the flow table after forwarding the first packet in each packet group.
  • the flow table only needs to include the group ID of the packet group and the link of the packet group.
  • the forwarding device updates the flow table of the first data flow according to the group identifier and the target link included in the first packet.
  • the forwarding device updates the group identifier and link information of the first packet into the flow table.
  • the forwarding device can forward it according to the flow table. Then you need to select the route through the hash operation.
  • Figure 9 is a schematic diagram of packet forwarding. As shown in Figure 9, the first data stream includes 5 packets, packets 1-3 belong to packet group 1, packets 4 and 5 belong to packet group 2, and switch 1 After receiving five packets of the first data stream, select link 1 for packet group 1 for transmission, and select link 2 for packet group 2 for transmission.
  • the messages in the same message group need to be sequence-preserved, and the sequence-preserving between different message groups is not required. Therefore, among the two message groups shown in FIG. 9 , the messages in the message group 2
  • the packets of packet sub-1 can reach the receiving device before the packets of packet sub-1, and the packets of packet group 2 can also reach the receiving device later than the packets of packet sub-1.
  • the first packet further includes a valid bit, and the valid bit is used to indicate whether the group identifier in the packet is valid.
  • the forwarding device obtains the valid bit from the packet header. If the valid bit indicates that the group identifier is invalid, the forwarding device no longer uses the group identifier to route the first packet, but uses other methods to route the first packet. If the valid bit indicates that the group identifier is valid, the forwarding device uses the group identifier and the identifier information of the first data flow to route the first packet.
  • the forwarding device forwards the first packet to the next forwarding device or receiving device through the target link.
  • the forwarding device If the forwarding device is the last forwarding device in the target link, the forwarding device sends the first packet to the receiving device; if the forwarding device is not the last forwarding device in the target link, the forwarding device forwards the first packet to the next forwarding device in the link.
  • the forwarding device receives the first packet, the first packet includes the group identifier of the packet group to which the first packet belongs and the identification information of the first data stream, and the first data stream includes at least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the group identifiers in the packets in the same packet group in the first data stream are the same.
  • the group identifier included in the message and the identifier information of the first data stream select a target link from multiple links, and forward the first message to the next forwarding device or receiving device through the target link.
  • the forwarding device selects a path for each packet group according to the group identifier and the identifier information of the first data stream, which realizes load balancing at the packet level of the data stream, and the forwarding device does not need to store the flow table , or the stored flow table is simplified, reducing the requirements of the forwarding device.
  • FIG. 10 is a flowchart of a data transmission method provided by Embodiment 3 of the present application. As shown in FIG. 10 , the method provided by this embodiment includes the following steps:
  • the receiving device receives a first packet, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream, the first data stream includes at least one packet group, and the first packet includes at least one packet group.
  • the group identifiers of N consecutive packet groups in a data stream are different, and N is greater than or equal to 2, and the group identifiers in the packets in the same packet group in the first data stream are the same.
  • the group identifier included in the first packet is added by the sending device.
  • the group identifier is used to indicate the packet group to which the first packet belongs, and the identification information of the first data stream is used to uniquely identify the data stream to which the first packet belongs.
  • the data stream to which the first packet belongs is the first data stream.
  • the first data stream includes multiple packet groups, each packet group includes at least one packet, and the packets of each packet group need to be sequenced.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information, or triplet information. Or, the identification information of the first data stream includes any one of five-tuple information, four-tuple information, and triplet information, and one or more of the following information: source MAC address, destination MAC address, source interface and VLAN ID.
  • the receiving device determines, according to the group identifier and sequence number of the first packet, whether packet loss or disorder occurs in the packet group to which the first packet belongs.
  • Each packet has a serial number, which is used to determine the sequence of the packets. Whether the receiving device uniformly numbers the serial numbers of the packets in the first data stream, or independently numbers the serial numbers of each packet group, the receiving device Both can determine whether packet loss or out-of-order occurs in the packet group according to the group ID and sequence number of the packet. The receiving device can first receive different packet groups according to the group ID, and then judge whether you have packet loss or out-of-order according to the serial numbers of the packets in each packet group. The group ID must be included in the packet.
  • the receiving device After the receiving device generates the response packet of the first packet, it sends the response packet of the first packet to the sending device.
  • a message in a message group can generate a response message; in another way, each message in a message group generates a response message; in another way, specify The number of messages produces a reply message.
  • This embodiment of the present application does not limit the manner of generating the response message. Regardless of the manner in which the response message is generated, the response message needs to include the group identifier of the message group to which the confirmed message belongs.
  • FIG. 11 is a flowchart of a data transmission method provided by Embodiment 4 of the present application. As shown in FIG. 11 , the method provided by this embodiment includes the following steps:
  • the sending device determines the packet group to which the first packet in the first data stream belongs, and adds the group identifier of the packet group to which the first packet belongs to the first packet.
  • the sending device sends the first packet to the forwarding device.
  • the first packet includes the group identifier and the identifier information of the first data stream.
  • the forwarding device selects a target link from the multiple links according to the group identifier included in the first packet and the identifier information of the first data stream.
  • the first packet passes through multiple forwarding devices.
  • the forwarding device selects a route according to the group ID included in the first packet and the ID information of the first data stream. Only one forwarding device is shown in 11, and each forwarding device has the same routing method.
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and selects a target link from multiple links according to the hash value.
  • the forwarding device sends the first packet to the receiving device or the next forwarding device through the target link.
  • the receiving device determines, according to the group identifier and the serial number of the first packet, whether packet loss or disorder occurs in the packet group to which the first packet belongs.
  • the receiving device sends a response message of the first message to the sending device, where the response message of the first message includes the group identifier of the message group to which the first message belongs.
  • the receiving device generates a response packet of the first packet according to the reception result, and sends the response packet of the first packet to the sending device. It can be understood that the response packet of the first packet will also reach the sending device through multiple forwarding devices. .
  • the sending device determines the packet group to which the first packet in the first data stream belongs, adds the group identifier of the packet group to which the first packet belongs to the first packet, and sends it to the forwarding device,
  • the forwarding device performs a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, selects a target link from multiple links according to the hash value, and passes through the target link.
  • the first packet is sent to the next forwarding device or the receiving device, and the receiving device determines whether packet loss or disorder occurs in the packet group to which the first packet belongs according to the group identifier and sequence number of the first packet.
  • the sending device When grouping, the sending device performs grouping according to the requirement of order preservation, and adds the group ID to the packet.
  • the forwarding device selects the route according to the group ID and the ID information of the data flow to ensure that the packets in the same packet group are on the same link. forwarding, so as to achieve load balancing while meeting the requirement of order preservation.
  • the forwarding device selects the route according to the group ID in the packet and the ID information of the data flow, and does not need to establish an additional flow table.
  • FIG. 12 is a schematic structural diagram of a forwarding device provided by Embodiment 5 of the present application. As shown in FIG. 12 , the forwarding device provided by this embodiment includes:
  • a receiving module 11 configured to receive a first packet, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream, in which the first data stream Including at least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, and the packets in the same packet group in the first data stream have different group identifiers.
  • the group ID is the same;
  • a routing module 12 configured to select a target link from a plurality of links according to the group identifier included in the first message and the identification information of the first data stream;
  • the sending module 13 is configured to forward the first packet to the next forwarding device or receiving device through the target link.
  • the routing module 12 is specifically configured to: perform a hash operation on the group identifier included in the first message and the identifier information of the first data stream to obtain a hash value, and obtain a hash value according to the hash value.
  • a value selects the target link from the plurality of links.
  • the sending device further includes a query module, a matching module and an update module.
  • the query module is configured to query the flow table of the first data flow according to the identification information of the data flow included in the first message, where the flow table of the first data flow includes the group identifier of the forwarded message and the link information.
  • the matching module is used to match the group identifier included in the first message with the flow table of the first data stream. If the matching is successful, the sending module 13 is also used to pass the successfully matched forwarded message. The link corresponding to the link information forwards the first packet.
  • the routing module 12 is specifically configured to: perform a hash operation on the group identifier included in the first packet and the identifier information of the first data stream to obtain a hash value, and according to the hash value
  • the target link is selected from the plurality of links.
  • the updating module is configured to update the flow table of the first data flow according to the group identifier included in the first message and the target link.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information or triplet information.
  • the quintuple information includes a source Internet Protocol IP address, a destination IP address, a source port, a destination port and a protocol number
  • the quadruple information includes a source IP address, a destination IP address, a source port and a destination port
  • the tuple information includes source IP address, source port and protocol number.
  • the identification information of the first data stream includes any one of the quintuple information, quadruple information, or triplet information, and one or more of the following information: source MAC address, destination MAC address , source interface, and VLAN ID.
  • packet sequence numbers in different packet groups in the first data stream are irrelevant.
  • the first message further includes a valid bit, where the valid bit is used to indicate whether the group identifier in the message is valid.
  • the first packet is a ROCE packet, and the group identifier is carried in a reserved field of a basic transmission header of the first packet.
  • the first packet is a TCP packet, and the group identifier is carried in a reserved bit and/or an option field of the first packet.
  • the forwarding device in this embodiment can be used to execute the method steps performed by the forwarding device in the foregoing Embodiments 1 to 4.
  • the specific implementation manner and technical effect are similar, and details are not repeated here.
  • FIG. 13 is a schematic structural diagram of a sending device provided by Embodiment 6 of the present application. As shown in FIG. 13 , the sending device provided by this embodiment includes:
  • a determination module 21 configured to determine the packet group to which the first packet in the first data stream belongs
  • the adding module 22 is configured to add the group identifier of the packet group to which the first packet belongs to the first packet, where the first packet also includes identification information of the first data stream,
  • the first data stream includes at least one packet group, the group identifiers of consecutive N packet groups in the first data stream are different, and N is greater than or equal to 2, and the same packet in the first data stream
  • the group IDs in the packets within the group are the same;
  • the sending module 23 is configured to send the first packet to the forwarding device.
  • the sending device further includes a generating module configured to generate a group identifier of the packet group to which the first packet belongs.
  • the generating module is specifically configured to: generate the group identifier of the packet group to which the first packet belongs according to the group identifier of the previous packet group, wherein the first data stream in the first The group identifier of the message group is generated during the initialization of the first data stream.
  • the generating module increases, decreases or multiplies the group identifier of the previous packet group by a preset value to obtain the group identifier of the packet group to which the first packet belongs.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information or triplet information.
  • the quintuple information includes a source Internet Protocol IP address, a destination IP address, a source port, a destination port and a protocol number
  • the quadruple information includes a source IP address, a destination IP address, a source port and a destination port
  • the tuple information includes source IP address, source port and protocol number.
  • the identification information of the first data stream includes any one of the quintuple information, quadruple information, or triplet information, and one or more of the following information: source MAC address, destination MAC address , source interface, and VLAN ID.
  • packet sequence numbers in different packet groups in the first data stream are irrelevant.
  • the first message further includes a valid bit, where the valid bit is used to indicate whether the group identifier in the message is valid.
  • the first packet is a ROCE packet, and the group identifier is carried in a reserved field of a basic transmission header of the first packet.
  • the first packet is a TCP packet, and the group identifier is carried in a reserved bit and/or an option field of the first packet.
  • the sending device in this embodiment can be used to execute the method steps performed by the sending device in the above-mentioned Embodiments 1 to 4, and the specific implementation manner and technical effect are similar, and details are not repeated here.
  • FIG. 14 is a schematic structural diagram of a receiving device provided by Embodiment 7 of the present application. As shown in FIG. 14 , the receiving device provided by this embodiment includes:
  • a receiving module 31 configured to receive a first packet by a receiving device, where the first packet includes a group identifier of a packet group to which the first packet belongs and identification information of a first data stream, the first data
  • the stream includes at least one packet group, the group identifiers of N consecutive packet groups in the first data stream are different, and N is greater than or equal to 2, the packets in the same packet group in the first data stream
  • the group IDs in are the same;
  • the determining module 32 is configured to determine whether packet loss or disorder occurs in the packet group to which the first packet belongs, according to the group identifier and the sequence number of the first packet.
  • the receiving device further includes a sending module configured to send a response message of the first message, where the response message of the first message includes a group of the message group to which the first message belongs. logo.
  • the identification information of the first data stream includes any one of the following information: quintuple information, quadruple information or triplet information.
  • the quintuple information includes a source Internet Protocol IP address, a destination IP address, a source port, a destination port and a protocol number
  • the quadruple information includes a source IP address, a destination IP address, a source port and a destination port
  • the tuple information includes source IP address, source port and protocol number.
  • the identification information of the first data stream includes any one of the quintuple information, quadruple information, or triplet information, and one or more of the following information: source MAC address, destination MAC address , source interface, and VLAN ID.
  • packet sequence numbers in different packet groups in the first data stream are irrelevant.
  • the first message further includes a valid bit, where the valid bit is used to indicate whether the group identifier in the message is valid.
  • the first packet is a ROCE packet, and the group identifier is carried in a reserved field of a basic transmission header of the first packet.
  • the first packet is a TCP packet, and the group identifier is carried in a reserved bit and/or an option field of the first packet.
  • the receiving device in this embodiment can be used to execute the method steps performed by the receiving device in the above-mentioned Embodiments 1 to 4, and the specific implementation manner and technical effect are similar, and details are not repeated here.
  • Each of the above modules or units can be implemented by software, hardware or a combination of software and hardware.
  • the determination module in FIG. 14 and the addition module in FIG. 13 can be implemented based on software.
  • processor reads and executes the program instructions stored in the memory to realize the functions corresponding to the above modules or units, wherein the processor refers to a processing circuit with the function of executing program instructions, Including but not limited to at least one of the following: central processing unit (CPU), microprocessor, digital signal processing (DSP), microcontroller (MCU), or artificial intelligence processing Various types of processing circuits that can run program instructions, such as a processor.
  • the processor may also include circuits for other processing functions (eg, hardware circuits for hardware acceleration, bus and interface circuits, etc.).
  • the processor can be presented in the form of an integrated chip, for example, in the form of an integrated chip whose processing function only includes the function of executing software instructions, or can also be presented in the form of a SoC (system on a chip, system on a chip), that is, in a chip.
  • SoC system on a chip, system on a chip
  • the processing circuit usually referred to as "core” capable of running program instructions, it also includes other hardware circuits (which can be implemented based on ASIC and FPGA) for implementing specific functions.
  • the processing functions include In addition to the function of executing software instructions, it can also include various hardware acceleration functions (such as AI computing, encoding and decoding, compression and decompression, etc.).
  • the hardware processing circuit may include ASIC (application-specific integrated circuit, application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); wherein, PLD may include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on.
  • ASIC application-specific integrated circuit, application-specific integrated circuit
  • PLD programmable logic device, programmable logic device
  • FPGA field programmable gate array
  • CPLD complex programmable logic device, complex programmable logic device
  • These hardware processing circuits can be a single semiconductor chip packaged separately, or can be integrated with other circuits (such as CPU, DSP) and packaged into a semiconductor chip.
  • an ASIC can be integrated with a CPU to form an SoC and packaged into a single chip, or an FPGA and a CPU can be integrated to form a SoPC (system on a programmable chip).
  • FIG. 15 is a schematic structural diagram of a forwarding device according to Embodiment 8 of the present application.
  • the forwarding device 400 includes: a processor 41, a memory 42, and a transceiver 43, where the memory 42 is used to store instructions, The transceiver 43 is configured to communicate with other devices, and the processor 41 is configured to execute the instructions stored in the memory, so that the forwarding device 400 executes the method performed by the forwarding device in the foregoing method embodiments.
  • FIG. 16 is a schematic structural diagram of a server provided in Embodiment 9 of the present application.
  • the server can be used as a sending device and/or a receiving device.
  • the server 500 includes: a processor 51, a memory 52, and a transceiver 53.
  • the memory 52 is used to store instructions
  • the transceiver 53 is used to communicate with other devices
  • the processor 51 is used to execute the instructions stored in the memory, so that the server 500 executes the transmission as described in the above method embodiments.
  • a tenth embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the instructions are executed, the computer is made to execute the method executed by the forwarding device in the foregoing method embodiments.
  • Embodiment 11 of the present application provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium, and when the instruction is executed, the computer is made to execute the method executed by the sending device or the receiving device in the foregoing method embodiment. method.
  • Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (eg, according to a communication protocol) .
  • a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave.
  • Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described in this application.
  • the computer program product may comprise a computer-readable medium.
  • such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory or may be used to store instructions or data structures desired program code in the form of any other medium that can be accessed by a computer.
  • any connection is properly termed a computer-readable medium.
  • a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave are used to transmit instructions from a website, server, or other remote source
  • the coaxial cable Wire, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media.
  • computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are instead directed to non-transitory, tangible storage media.
  • magnetic disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while disks reproduce optically with lasers data. Combinations of the above should also be included within the scope of computer-readable media.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable logic arrays
  • the term "processor,” as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein.
  • the functions described by the various illustrative logical blocks, modules, and steps described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or in combination with into the combined codec.
  • the techniques may be fully implemented in one or more circuits or logic elements.
  • the techniques of this application may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (eg, a chip set).
  • IC integrated circuit
  • Various components, modules, or units are described herein to emphasize functional aspects of means for performing the disclosed techniques, but do not necessarily require realization by different hardware units. Indeed, as described above, the various units may be combined in codec hardware units in conjunction with suitable software and/or firmware, or by interoperating hardware units (including one or more processors as described above) supply.

Landscapes

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

Abstract

Des modes de réalisation de la présente demande concernent un procédé et un appareil de transmission de données. Lors de l'envoi d'un flux de données, un dispositif d'envoi (qui peut être un serveur) regroupe des messages dans le flux de données en fonction des exigences de conservation de l'ordre des messages, et ajoute un identifiant de groupe aux messages dans le même groupe de messages, la conservation de l'ordre étant nécessaire dans des messages dans le même groupe de messages, et la conservation de l'ordre n'étant pas nécessaire entre différents groupes de messages ; après réception d'un message, un dispositif de transfert (qui peut être un commutateur) sélectionne une liaison cible parmi de multiples liaisons selon l'identifiant de groupe compris dans le message et des informations d'identifiant du flux de données auquel le message appartient, et transfère le message à un dispositif de réception au moyen de la liaison cible ; et après réception du message, le dispositif de réception détermine, en fonction de l'identifiant de groupe et d'un numéro de série du message, si une perte de paquet ou une anomalie se produit dans le groupe de messages auquel le message appartient. Dans la solution, des messages dans le même groupe de messages sont transmis sur la même liaison, et ainsi, une anomalie ne se produit pas, et une extrémité de réception n'a pas besoin d'effectuer une réorganisation des anomalies, ce qui permet de réduire les exigences de l'extrémité de réception.
PCT/CN2021/116615 2020-09-14 2021-09-06 Procédé et appareil de transmission de données WO2022052882A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010962329.1 2020-09-14
CN202010962329.1A CN114189474A (zh) 2020-09-14 2020-09-14 数据传输方法和装置

Publications (1)

Publication Number Publication Date
WO2022052882A1 true WO2022052882A1 (fr) 2022-03-17

Family

ID=80539046

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116615 WO2022052882A1 (fr) 2020-09-14 2021-09-06 Procédé et appareil de transmission de données

Country Status (2)

Country Link
CN (1) CN114189474A (fr)
WO (1) WO2022052882A1 (fr)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979313A (zh) * 2022-06-13 2022-08-30 深圳市宏电技术股份有限公司 一种通信设备数据补报方法、装置、通信设备及存储介质
CN115914423A (zh) * 2022-10-08 2023-04-04 苏州盛科通信股份有限公司 在选定组中实现同源同宿的方法、装置、电子设备及存储介质
CN116723150A (zh) * 2023-08-07 2023-09-08 北京立思辰安科技术有限公司 一种数据包的转发系统
WO2023202294A1 (fr) * 2022-04-18 2023-10-26 华为技术有限公司 Procédé de conservation d'ordre de flux de données, dispositif d'échange de données et réseau
WO2024001820A1 (fr) * 2022-06-29 2024-01-04 华为技术有限公司 Procédé de transmission de données et dispositif de passerelle

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117222050A (zh) * 2023-08-30 2023-12-12 北京诺亦腾科技有限公司 通信方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795655A (zh) * 2012-10-30 2014-05-14 中兴通讯股份有限公司 数据传输方法及装置
US20170187629A1 (en) * 2015-12-28 2017-06-29 Amazon Technologies, Inc. Multi-path transport design
US20170324664A1 (en) * 2016-05-05 2017-11-09 City University Of Hong Kong System and method for load balancing in a data network
US20180034724A1 (en) * 2016-07-28 2018-02-01 Hewlett Packard Enterprise Development Lp Load balancing
CN110995608A (zh) * 2019-12-20 2020-04-10 锐捷网络股份有限公司 一种多链路负载均衡的方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795655A (zh) * 2012-10-30 2014-05-14 中兴通讯股份有限公司 数据传输方法及装置
US20170187629A1 (en) * 2015-12-28 2017-06-29 Amazon Technologies, Inc. Multi-path transport design
US20170324664A1 (en) * 2016-05-05 2017-11-09 City University Of Hong Kong System and method for load balancing in a data network
US20180034724A1 (en) * 2016-07-28 2018-02-01 Hewlett Packard Enterprise Development Lp Load balancing
CN110995608A (zh) * 2019-12-20 2020-04-10 锐捷网络股份有限公司 一种多链路负载均衡的方法、装置及系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023202294A1 (fr) * 2022-04-18 2023-10-26 华为技术有限公司 Procédé de conservation d'ordre de flux de données, dispositif d'échange de données et réseau
CN114979313A (zh) * 2022-06-13 2022-08-30 深圳市宏电技术股份有限公司 一种通信设备数据补报方法、装置、通信设备及存储介质
CN114979313B (zh) * 2022-06-13 2024-05-17 深圳市宏电技术股份有限公司 一种通信设备数据补报方法、装置、通信设备及存储介质
WO2024001820A1 (fr) * 2022-06-29 2024-01-04 华为技术有限公司 Procédé de transmission de données et dispositif de passerelle
CN115914423A (zh) * 2022-10-08 2023-04-04 苏州盛科通信股份有限公司 在选定组中实现同源同宿的方法、装置、电子设备及存储介质
CN116723150A (zh) * 2023-08-07 2023-09-08 北京立思辰安科技术有限公司 一种数据包的转发系统

Also Published As

Publication number Publication date
CN114189474A (zh) 2022-03-15

Similar Documents

Publication Publication Date Title
WO2022052882A1 (fr) Procédé et appareil de transmission de données
US8989009B2 (en) Port and priority based flow control mechanism for lossless ethernet
US7359383B2 (en) Load balancing with mesh tagging
US8238324B2 (en) Method and system for network aware virtual machines
KR100927265B1 (ko) 저장 지역 네트워크에서 전송을 위한 프레임을 캡슐화하기 위한 방법 및 장치
US8644328B2 (en) Methods for intelligent NIC bonding and load-balancing
US8085778B1 (en) Voltage regulator
CN108881018B (zh) 用于在diameter信令路由器处路由diameter消息的方法、系统及装置
WO2021008591A1 (fr) Procédé, dispositif et système de transmission de données
CN113472646B (zh) 一种数据传输方法、节点、网络管理器及系统
CN111224888A (zh) 发送报文的方法及报文转发设备
CN113079090A (zh) 一种流量传输的方法、节点和系统
WO2019084805A1 (fr) Procédé et appareil de distribution de message
WO2019024759A1 (fr) Procédé de communication de données, et réseau de communication de données
CN113612698A (zh) 一种数据包发送方法及装置
US8467311B2 (en) Method and system for avoiding flooding of packets in switches
WO2023116580A1 (fr) Procédé et appareil de commutation de trajet, dispositif de réseau et système de réseau
US12010023B2 (en) Network congestion handling method and related apparatus
CN107231316B (zh) 报文的传输方法及装置
WO2015039616A1 (fr) Procédé et dispositif de traitement de paquets
WO2008128464A1 (fr) Dispositif et procédé pour réaliser le transfert d'un flux unique par de multiples unités de traitement en réseau
WO2024113830A1 (fr) Procédé, appareil, dispositif et système de transmission de données, ainsi que support d'enregistrement
TWI794596B (zh) 在內部交換結構中用於不等鏈路連接之散佈
CN116633726A (zh) 云网关和用于网络适配器的方法及网络适配器
CN117714378A (zh) 数据传输方法、装置、节点及系统

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21865936

Country of ref document: EP

Kind code of ref document: A1