WO2023122995A1 - Packet transmission method and device - Google Patents

Packet transmission method and device Download PDF

Info

Publication number
WO2023122995A1
WO2023122995A1 PCT/CN2021/142211 CN2021142211W WO2023122995A1 WO 2023122995 A1 WO2023122995 A1 WO 2023122995A1 CN 2021142211 W CN2021142211 W CN 2021142211W WO 2023122995 A1 WO2023122995 A1 WO 2023122995A1
Authority
WO
WIPO (PCT)
Prior art keywords
receiving
message
interface
sending
receiving interface
Prior art date
Application number
PCT/CN2021/142211
Other languages
French (fr)
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 华为技术有限公司
Priority to CN202180099252.2A priority Critical patent/CN117461289A/en
Priority to PCT/CN2021/142211 priority patent/WO2023122995A1/en
Publication of WO2023122995A1 publication Critical patent/WO2023122995A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks

Definitions

  • the present application relates to the field of chip technology, and in particular to a message transmission method and device.
  • a common method is to provide multiple sets of physical interfaces and cooperate with multipath technology to increase communication bandwidth.
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • MP Multiple Path
  • each TCP subflow both the sender and the receiver need to maintain a set of states for each TCP subflow. For example, the sender and the receiver need to perform 3 handshakes and 4 handshakes for the TCP subflow. , the software and hardware resource overhead of the sending end and the receiving end is relatively large. Moreover, each TCP subflow needs to be bound to a physical interface for communication, and the bandwidth of the single path where each physical interface is located is still limited, and the transmission efficiency is low.
  • Embodiments of the present application provide a method and device for message transmission, which can increase communication bandwidth requirements between the sending end and the receiving end, and improve transmission efficiency through the multi-interface cooperative work of the sending end and the multi-interface cooperative work of the receiving end.
  • a message transmission method including: when the sending end determines to send the first message, determine the first sending interface for sending the first message according to the loads of multiple sending interfaces at the sending end, and determine the first sending interface for sending the first message according to the loads of multiple sending interfaces at the receiving end
  • the congestion information of the first receiving interface determines the first receiving interface for receiving the first message; the sending end sends the first message through the first sending interface, and the first message includes the identifier of the first sending interface and the identifier of the first receiving interface.
  • the sending interface and receiving interface in this application can be understood as the network port of the device.
  • the loads of multiple sending interfaces may be, for example, the resource occupancy rate of the sending interface, or the packet loss rate of packets, and the like.
  • the congestion information of multiple receiving interfaces may be, for example, the resource occupancy rate of the receiving interfaces, or the packet loss rate of packets, and the like.
  • the resource occupancy rate of each sending interface is, for example, the length of a queue for packet processing of the sending interface.
  • the message processing queue length of the sending interface can be understood as the number of messages currently processed in the sending queue of the sending interface, which is the queue of messages to be sent;
  • the resource occupancy rate of each receiving interface is, for example, the queue length for packet processing of the receiving interface.
  • the message processing queue length of the receiving interface can be understood as the number of currently processed messages in the receiving queue of the receiving interface, and the receiving queue is a queue of received messages to be processed.
  • the sending end does not need to bind the same flow or the same connection to the interface, including the need to bind the same flow or the same connection to a sending interface of the sending end, and does not need to bind the same A stream or the same connection is bound to a receiving interface on the receiving end.
  • the sending interface of the sending end may be different each time the message is sent, and at the same time, the receiving interface of the receiving end may be different each time the message is received.
  • through which sending interface a packet in a flow or a single connection is sent and through which receiving interface is received depends on the load status of multiple sending interfaces and the congestion information of multiple receiving interfaces.
  • the message rate at which the sending end sends packets can be understood as the sum of the message rates of multiple sending interfaces
  • the message rate at which the receiving end receives packets can be understood as the sum of the message rates of multiple receiving interfaces.
  • this application can give the sending end the ability to flexibly select the sending interface and the receiving interface of the message, and can make full use of the multi-interface coordination between the sending end and the receiving end to increase the bandwidth.
  • the method further includes: the sending end receives congestion information from multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface. That is, the sending end can determine the receiving interface through which the receiving end receives the message when each message is sent to the receiving end. That is, the receiving interface is flexibly determined by the sending end according to the congestion information of multiple receiving interfaces, which can make the multiple interfaces of the receiving end cooperate and improve the bandwidth of the receiving end.
  • the method further includes: when the sending end determines that sending the first message fails, determining the second receiving interface on which the receiving end receives the first retransmitted message according to the congestion information of multiple receiving interfaces, the first The retransmission message is a repeated message of the first message; the sending end sends the first retransmission message through the first sending interface, and the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and Marker for duplicate packets.
  • the receiving interface for receiving the original message and the receiving interface for receiving the retransmitted message may also be different, depending on the congestion information of the receiving interface Sure.
  • the sending interface of the original message and the sending interface of the retransmitted message of the same message at the sending end may also be different.
  • the method when the first retransmission message arrives at the receiving end later than the first message, the method further includes: the sending end receives the first response message of the first message through the second sending interface, and the first A response message includes the identification of the first sending interface; when the second sending interface is different from the first sending interface, the sending end controls the second sending interface to send the first response message to the first sending interface; the sending end controls the first sending interface Sending a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first message.
  • the sending interface for sending the first message if the sending interface for sending the first message is different from the sending interface for receiving the first response message, the sending interface for receiving the first response message also needs to forward the first response message to the sending interface for sending the first response message.
  • the sending interface of a message is the first sending interface, so that the first sending interface instructs the first receiving interface to release the context information of the first message.
  • the method when the first message arrives at the receiving end later than the first retransmission message, the method further includes: the sending end receives the first retransmission response of the first retransmission message through the third sending interface message, the first retransmission response message includes the identifier of the first sending interface; when the third sending interface is different from the first sending interface, the sending end controls the third sending interface to send the first retransmission response message to the first sending interface ; The sending end controls the first sending interface to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
  • the sending interface that sends the first retransmission message is different from the sending interface that receives the first retransmission response message, the sending interface that receives the first retransmission response message also needs to send the first retransmission response message
  • the response message is forwarded to the sending interface that sent the first retransmission message, that is, the first sending interface, so that the first sending interface instructs the second receiving interface to release the context information of the first retransmission message.
  • a message transmission method includes: the receiving end sends congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine the time at which the receiving end receives the first message
  • the first receiving interface the receiving end receives the first message through the first receiving interface, and the first message includes the identifier of the first sending interface through which the sending end sends the first message and the identifier of the first receiving interface.
  • the receiving interface of each received message may be different, and the sending end can determine which receiving interface to receive the message according to the congestion information of multiple receiving interfaces. arts.
  • multiple receiving interfaces at the receiving end can work together, and the message rate of receiving packets at the receiving end can be understood as the sum of the message rates of multiple receiving interfaces, which improves the bandwidth efficiency of receiving packets at the receiving end.
  • the method further includes: when the receiving end determines that the first packet is received from the first receiving interface, determining whether other receiving interfaces of the plurality of receiving interfaces except the first receiving interface have received the first When the receiving end determines that no other receiving interface has received the repeated message of the first message, the receiving end controls the first receiving interface to process the first message; the receiving end determines that the other receiving interfaces in the When at least one receiving interface has received a duplicate packet of the first packet, the receiving end controls the first receiving interface to discard the first packet.
  • multiple receiving interfaces on the receiving end may be the receiving interfaces of the original message and the retransmitted message of the same message.
  • multiple different receiving interfaces receive repeated messages of the same message, in order to avoid The same message is processed repeatedly on different receiving interfaces.
  • a first receiving interface receives the first message, it is necessary to determine whether other receiving interfaces have received duplicate messages of the first message. If not received, the first receiving interface can process the first packet. But, as long as there is a duplicate message of the first message received by a receiving interface in other receiving interfaces, that is, the first message has been registered, the first receiving interface cannot process the first message, so as to avoid The text is processed repeatedly.
  • Determining whether the multiple receiving interfaces other than the first receiving interface have received the repeated message of the first message includes: the receiving end determines whether the first receiving interface has received the first registration request of other receiving interfaces, the first The registration request is used to request to process the first retransmission message.
  • the first retransmission message is a retransmission message of the first message; the receiving end determines that no other receiving interface has received the duplicate message of the first message Including: the receiving end determines that the first receiving interface has not received the first registration request sent by other receiving interfaces; the receiving end determines that at least one receiving interface in the other receiving interfaces has received the first message.
  • the repeated message includes: the receiving end determines The first receiving interface has received the first registration request sent by at least one receiving interface among the other receiving interfaces.
  • a first receiving interface wants to process the first message as the original message, the first receiving interface needs to determine whether to receive the first registration request for the first retransmission message . If a first registration request has been received, the first message arrives later than the first retransmission message; if the first registration request has not been received, the first message is considered to be the first to arrive, and the first A receiving interface may process the first message.
  • the method further includes: when the receiving end determines that the first receiving interface receives the first registration request sent by the second receiving interface among the other receiving interfaces after receiving the first message, the receiving end The first receiving interface is controlled to send a first registration response to the second receiving interface, where the first registration response is used to indicate that the second receiving interface fails to register. That is to say, if the first receiving interface is processing the first message and receives the first registration request for the first retransmission message from the second receiving interface, in order to prevent the message from being processed repeatedly, the first receiving interface needs to indicate The registration of the second receiving interface fails, so as to avoid repeated processing of the same packet.
  • determining whether multiple receiving interfaces other than the first receiving interface have received the repeated message of the first message includes: the receiving end Controlling the first receiving interface to send a first registration request to each of the other receiving interfaces, where the first registration request is used to request processing of the first message; the receiving end determines that none of the other receiving interfaces has received the first message
  • the repeated message includes: the receiving end determines that the first receiving interface has received multiple registration responses sent by other receiving interfaces, and the multiple registration responses indicate that the first receiving interface has successfully registered; the receiving end determines that at least one of the other receiving interfaces has received
  • the repeated message that the interface has received the first message includes: the receiving end determines that the first receiving interface has received a registration response sent by one of the other receiving interfaces indicating that the registration of the first receiving interface failed.
  • the first receiving interface is not sure whether the first packet is a duplicate packet that arrives later than the original packet, and the first receiving interface needs to report to other receiving interfaces Request permission to process the first packet, and if each registration response indicates that the first receiving interface can process the first packet, the first receiving interface processes the first packet. If there is a returned registration response indicating that the first receiving interface fails to register, it means that the first message received by the first receiving interface arrives at the receiving end later than the original message, and the first receiving interface cannot process the first message.
  • the method further includes: after the receiving end determines that the second receiving interface among the other receiving interfaces has received a first registration request, and then receives the original message of the first message, the receiving end controls The second receiving interface discards the original packet of the first packet. That is to say, if the second receiving interface has received a first registration request requesting to process the same message as the first message, it means that the receiving interface has already received the same message before the second receiving interface. When the second receiving interface receives the original message of the first message again, the second receiving interface has no authority to process the original message of the first message, so as to avoid repeated processing of the same message on different receiving interfaces.
  • the receiving end determines that after the first receiving interface receives the first message, the first receiving interface also receives the first message sent by the second receiving interface. Registration request, the first registration request is used to request to process the repeated message of the first message, if the number of the first receiving interface is less than the number of the second receiving interface, the receiving end controls the first receiving interface to reject the first registration ask.
  • This possible design needs to be executed simultaneously with the next possible design, specifically refer to the description in one possible design below.
  • the receiving end determines that the first receiving interface receives the first message, if the number of the first receiving interface is not the number of all receiving interfaces of the receiving end
  • the receiving end controls the first receiving interface to collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface;
  • the receiving interface sends a first registration response among the multiple registration responses, where the first registration response is used to indicate that the second receiving interface successfully registers for the repeated message of the first message.
  • the receiving interface with a smaller number You can directly reject the registration request of the receiving interface with a large number for the same retransmission message; at the same time, if a receiving interface has already received a retransmission message, the receiving interface with a large number needs to determine all other receiving interfaces about the retransmission message registration status. Moreover, the receiving interface with a large number needs to receive valid registration results, for example, one receiving interface registered successfully, some receiving interfaces registered successfully but did not receive the duplicate message, and some receiving interfaces failed to register, etc. , the receiving interface with a smaller number can determine the receiving interface that processes the duplicate message, so as to avoid the situation that multiple receiving interfaces repeatedly process when receiving multiple duplicate messages of the same message.
  • a communication device including: a processor, configured to determine the first sending interface for sending the first message according to the loads of multiple sending interfaces of the sending end when sending the first message, and according to the load of the receiving end
  • the congestion information of multiple receiving interfaces determines the first receiving interface receiving the first message
  • the transceiver includes a first sending interface, the first sending interface is used to send the first message, and the first message includes the first sending interface ID and ID of the first receiving interface.
  • the transceiver is further configured to: receive congestion information from multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface.
  • the processor is further configured to: when determining that sending the first message fails, determine the second receiving interface on which the receiving end receives the first retransmission message according to the congestion information of multiple receiving interfaces, and the first retransmission
  • the transmission message is a repeated message of the first message; the first sending interface is also used to send the first retransmission message, and the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and Marker for duplicate packets.
  • the transceiver when the first retransmission message arrives at the receiving end later than the first message, the transceiver further includes a second sending interface, and the second sending interface is also used to receive the first response of the first message message, the first response message includes the identification of the first sending interface; when the second sending interface is different from the first sending interface, the second sending interface is also used to send the first response message to the first sending interface;
  • the sending interface is further configured to send a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first packet.
  • the transceiver when the first message arrives at the receiving end later than the first retransmission message, the transceiver further includes a third sending interface, and the third sending interface is used to receive the first retransmission message of the first retransmission message.
  • a retransmission response message, the first retransmission response message includes the identifier of the first sending interface; when the third sending interface is different from the first sending interface, the third sending interface is also used to send the first retransmission to the first sending interface Response message; the first sending interface is further configured to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
  • a communication device including: a transceiver, configured to send congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine the first packet received by the receiving end.
  • a receiving interface; the transceiver includes a first receiving interface, the first receiving interface is used to receive the first message, and the first message includes the identification of the first sending interface and the identification of the first receiving interface that the sending end sends the first message .
  • it also includes a processor, configured to: determine whether other receiving interfaces except the first receiving interface of the plurality of receiving interfaces have received the first packet when receiving the first message from the first receiving interface. A repeated message of a message; when it is determined that other receiving interfaces have not received the repeated message of the first message, control the first receiving interface to process the first message; determine that at least one receiving interface in other receiving interfaces has When a duplicate packet of the first packet is received, the first receiving interface is controlled to discard the first packet.
  • the first receiving interface is used to determine whether to receive the first registration request from other receiving interfaces, and the first registration request is used to request the first retransmission
  • the message is processed, and the first retransmission message is a retransmission message of the first message; it is determined that the first receiving interface has not received the first registration request sent by other receiving interfaces, and the first receiving interface is used to register the first registration request. or, determine that the first receiving interface has received the first registration request sent by at least one receiving interface among the other receiving interfaces, and the first receiving interface is used to discard the first message.
  • the first receiving interface after receiving the first message, when receiving the first registration request sent by the second receiving interface among the other receiving interfaces, the first receiving interface is also used to send the registration request to the second receiving interface A first registration response, where the first registration response is used to indicate that the registration of the second receiving interface fails.
  • the first receiving interface is configured to send a first registration request to each of the other receiving interfaces, and the first registration request is used to request The first message is processed; the multiple registration responses sent by other receiving interfaces received by the first receiving interface are determined, and the multiple registration responses all indicate that the registration of the first receiving interface is successful, and the first message is processed; The interface has received a registration response sent by one of the other receiving interfaces indicating that the registration of the first receiving interface failed, and controls the first receiving interface to discard the first packet.
  • the second receiving interface among the other receiving interfaces After the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is used to discard the first registration request.
  • the original message of the text After the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is used to discard the first registration request.
  • the original message of the text After the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is used to discard the first registration request.
  • the original message of the text After the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is used to discard the first registration request.
  • the original message of the text After the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is
  • the first receiving interface when the first message is a retransmission message: after the first receiving interface receives the first message, the first receiving interface also receives the first registration request sent by the second receiving interface, When the first registration request is used to request to process the repeated message of the first message, if the number of the first receiving interface is smaller than the number of the second receiving interface, the first receiving interface is used to reject the first registration request.
  • the first receiving interface when the first message is a retransmission message: after the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number of all receiving interfaces at the receiving end Number, the first receiving interface, used to collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface; Sending a first registration response among the multiple registration responses, where the first registration response is used to indicate that the second receiving interface successfully registers for the repeated message of the first message.
  • a communication device including at least one processor, multiple sending interfaces, and multiple receiving interfaces, at least one processor is connected to the memory, multiple sending interfaces, and multiple receiving interfaces through a system bus, and at least one processing
  • the device is used to read and execute the program stored in the memory, and the program can act on multiple sending interfaces and multiple receiving interfaces, so that the device executes the method according to the first aspect or any one of the first aspect.
  • a chip is provided, the chip is coupled with a memory, the chip includes a plurality of pins coupled to a sending interface and a plurality of receiving interfaces, and the chip is used to read and execute program instructions stored in the memory to achieve the above-mentioned The first aspect or the method of any one of the first aspects.
  • an electronic device including multiple sending interfaces, multiple receiving interfaces, one or more processors, and one or more memories.
  • the one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs A message transmission method in any one of the above aspects and any possible implementation manner.
  • the embodiment of the present application provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are run on the electronic device, cause the electronic device to perform any of the above-mentioned aspects and any of the possible implementations.
  • Message transmission method
  • the embodiment of the present application provides a computer program product.
  • the computer program product runs on a computer or a processor
  • the computer or processor executes the report in any one of the above-mentioned aspects and any possible implementation. file transfer method.
  • the embodiment of the present application provides a system, and the system may include the sending end and the receiving end in any possible implementation manner of any of the above aspects.
  • the sending end and the receiving end may implement the message transmission method in any one of the foregoing aspects and any possible implementation manner.
  • any of the sending end, receiving end, chip system, computer-readable storage medium, or computer program product provided above can be applied to the corresponding method provided above. Therefore, the achieved For the beneficial effect, reference may be made to the beneficial effect in the corresponding method, which will not be repeated here.
  • FIG. 1 is a schematic diagram of a TCP subflow processing architecture in an MPTCP technology provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a bandwidth aggregation architecture in RDMA bonding provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a multi-path transmission technology architecture provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a multi-interface coordination architecture in a multi-path transmission technology provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of a network hardware interface structure in a network device provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an architecture of a sender performing packet splitting and interface scheduling provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of an architecture of a receiving end performing message splitting and interface scheduling provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a message transmission method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a message transmission method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of signal interaction in a message transmission method provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a communication device provided in an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • MPTCP When establishing a TCP connection, only one IP address has always been bound, but with more and more hosts with multiple network cards, data can often be reached by multiple links from one host to another. is to allow TCP connections to use multiple paths to maximize channel resource usage.
  • RDMA Remote Direct Memory Access
  • QP Queue Pair
  • Host Channel Adapter It can be used in enterprise data centers, high-performance computing, and embedded environments, and provides high-bandwidth, low-latency solutions for server/storage cluster applications.
  • applications such as clustered databases, parallel applications, processing services, and high-performance embedded input/output (Input/Out, I/O)
  • the HCA card can maximize the performance of the application, shorten the operating cycle, and reduce the resource loss.
  • Infiniband InfiniBand, IB: A computer network communication standard for high-performance computing, which has extremely high throughput and extremely low latency, and is used for data interconnection between computers. InfiniBand is also used as a direct or switched interconnect between servers and storage systems, and as an interconnect between storage systems.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
  • a common method is to provide multiple sets of physical interfaces and cooperate with multi-path transmission technology to increase communication bandwidth.
  • the original TCP protocol includes an Internet Protocol (Internet Protocol, IP) layer, a TCP layer and an application layer (application).
  • IP Internet Protocol
  • application application layer
  • the TCP protocol can be shown as (b) in FIG. 1 , and the TCP flow of a single socket in the user layer can be split into multiple TCP subflows (subflow) at the MPTCP layer.
  • TCP subflow here is transmitted through a separate path, and each TCP subflow corresponds to a TCP connection.
  • multiple received TCP sub-flows need to be reassembled before processing.
  • each TCP subflow needs to be transmitted after three handshakes and four handshakes between the sending end and the receiving end.
  • the resource overhead of software and hardware is relatively large.
  • TCP is located at the transport layer, and its role is to provide reliable byte stream services.
  • the TCP protocol adopts a three-way handshake strategy.
  • the three-way handshake strategy includes: 1) The sending end first sends a data packet with a synchronization (synchronize, SYN) flag to the receiving end. 2) After receiving, the receiving end returns a data packet with a SYN/acknowledgment (Acknowledgment, ACK) flag to the sending end, so as to convey the confirmation information of the received data packet to the sending end. 3) The sending end returns a data packet with an ACK flag to the receiving end to indicate that the sending end has received the confirmation information, and the three-way handshake ends.
  • TCP connections are full-duplex, each direction must be closed separately.
  • the principle is that when one party completes its data sending task, it can send a FIN (FinNet) to terminate the connection in this direction. But receiving a FIN only means that there is no data flow in this direction, and a TCP connection can still send data after receiving a FIN.
  • the party that does the shutdown first (the active party) will perform the active shutdown, while the other party (the passive party) will perform the passive shutdown.
  • the passive party receives the FIN message notification from the active party, it only means that the active party has no data to send to the passive party.
  • This process can be called four hand waving, and specifically includes: 1) The active party sends a FIN to the passive party, which is used to indicate that the data transmission from the active party to the passive party is to be closed. 2) The passive party receives FIN, and the passive party sends ACK to the active party. 3) The passive release closes the connection with the active party, and sends a FIN to the active party. 4) After the active party receives the FIN in 3), the active party sends back an ACK to the passive party, indicating that the FIN in 3) has been received
  • each TCP subflow maintains a connection state, including the state of three-way handshake and four-way handshake, the resource overhead is relatively large.
  • the sending end needs to bind a physical interface for a TCP sub-flow, and the receiving end also needs to bind a physical interface for the TCP sub-flow. Traffic congestion is prone to occur in this interface binding, and the processing bandwidth of the device will be limited.
  • RDMA bonding another multipath technology, the RDMA in a sender or receiver can be aggregated into a set of logical resources to realize bandwidth aggregation.
  • RDMA HAL hardware abstraction layer, hardware abstraction layer
  • services can provide the API for the Application to call HCA.
  • RDMA bonding can shield the hardware differences of the HCA by binding one of the two HCAs to achieve multiple With RDMA resource pooling, users do not perceive RDMA device differences.
  • RDMA HAL and services can assign the QP to be processed by the Application to a specific HCA for processing according to some rules.
  • the Bonding HAC driver can drive the HAC allocated by RDMA HAL and services to the QP to process the QP.
  • HCA can be selected based on QP to establish a communication connection, but at the same time, there is also the software and hardware overhead of increasing scheduling and hardware shielding, which is similar to the technology of bonding interfaces in MPTCP. Moreover, there is also the problem that a certain HCA is prone to traffic congestion, and the processing bandwidth of the device is limited.
  • connection 1 transmits data through physical interface 0
  • the sender can only send data on physical interface 1.
  • data on connection 2 can only be sent on physical interface 1.
  • Multiple physical interfaces on the sending side are not working together.
  • it is also bound to a fixed physical port to receive data of a single connection.
  • the present application provides a message transmission method, and the message can be understood as the above data.
  • the current constraint that a connection needs to be bound to a physical interface can be broken, and multiple physical interfaces on the device can transmit data for a single connection at the same time, improving message processing efficiency.
  • the physical interface of the sending end is not bound to send the message, and the receiving mechanism of the same communication flow is not bound.
  • the physical interface at the receiving end receives packets.
  • each of the multiple packets to be sent in the connection may be sent through a different physical interface, for example, packet 1 in the connection is sent through physical interface 0 , packet 2 is sent through physical interface 1.
  • packet 1 in the connection is sent through physical interface 0
  • packet 2 is sent through physical interface 1.
  • the sending end has 3 physical interfaces
  • a single connection can send data through these 3 physical interfaces, and the maximum message rate can reach the sum of all interfaces.
  • the interface for receiving each message may also be different.
  • the multi-interface coordinated multi-path transmission of this application can be applied to various scenarios, for example, it can be applied to multiple nodes in a data center.
  • the sending end of this application can be a computing node
  • the receiving end can be a storage node. node, or the sending end is a storage node, and the receiving end is a computing node, etc.
  • it can also be applied to multiple computing nodes of a high-performance computing (High Performance Computing, HPC) cluster.
  • HPC High Performance Computing
  • the present application can be applied to network equipment, and the network equipment can be a sending end or a receiving end, and the sending end and the receiving end can be applied in the above scenarios.
  • the data transmission between the sending end and the receiving end may be multi-path transmission.
  • the network device can be used as both the sending end and the receiving end. Therefore, as shown in Figure 4, the network device includes multiple sending interfaces and multiple receiving interfaces, which means that the sending end includes multiple sending interfaces and multiple receiving The receiving end also includes multiple receiving interfaces and multiple sending interfaces.
  • the sending interface of the sending end can be used to send the message, multiple receiving interfaces can be used to receive the response of the message, the receiving interface of the receiving end can be used to receive the message, and the receiving end’s
  • the sending interface can be used to send the response of the message.
  • the sending interface and receiving interface in this application can be understood as network hardware interfaces of network devices.
  • the network device may include an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) and a memory.
  • ASIC Application Specific Integrated Circuit
  • Memory can be used to store data.
  • An ASIC may include a processor, other components, and a network hardware interface. All components within the ASIC can communicate data through the system bus.
  • the processor can be used to run an operating system and software protocol stack, etc. Other components can be used to cooperate with the processor to complete various functions. This application can be improved for the network hardware interface in ASIC.
  • the network hardware interface includes a transport layer controller, multiple sending interfaces (such as sending interface 1, sending interface 2 and sending interface 3 shown in Figure 5) and multiple receiving interfaces (such as Receiving interface 1, receiving interface 2 and receiving interface 3 are shown).
  • the sending interface can send messages to other external devices through the switch, and the receiving interface can receive messages from other external devices through the switch.
  • the transport layer controller includes a congestion control module, a reliable transmission module, and a task scheduling module.
  • the reliable transmission module is used to determine whether the sending end needs to retransmit the message according to the message response received by the receiving interface when the network device acts as the sending end.
  • the reliable transmission module is also used to cooperate with multiple receiving interfaces to perform packet deduplication processing to ensure that the same message can only execute different More than once, the details will be introduced later.
  • the congestion control module is used to cooperate with the task scheduling module to realize the flexible selection of the sending interface and the receiving interface in multi-path transmission;
  • the task scheduling module is used to edit the message to be sent and select the sending interface and receiving interface according to the sending interface determined by the congestion control module;
  • the sending interface is used to send messages according to the instructions of the task scheduling module.
  • the receiving interface is used to receive messages.
  • the multi-interface message registration mechanism can be used to realize the coordinated processing of multiple interfaces to ensure that the same message will not be processed repeatedly. That is, the message registration mechanism here is used to avoid repeated processing of messages.
  • the task scheduling module can communicate with all sending interfaces, and the sending interfaces are all decoupled, and each sending interface can maintain its own sending side context.
  • the sending side context may include the sequence number and connection status of the message, and so on.
  • the sending interface can also feed back the congestion information of its own interface, the received congestion information of the receiving end, the load status (packet receiving situation) of the sending interface, and the fault information of the sending interface to the task scheduling module.
  • the task scheduling module is used to perform packet splitting scheduling, and determine the sending interface for sending the message according to the load status of multiple sending interfaces, so as to send the message.
  • the transport layer at the sending end can split message 1 into sub-message 1, sub-message 2 and sub-message 3, and message 2 is not split, when When the task scheduling module receives the three sub-messages and message 2 from the transport layer, assuming that the multi-sending end has three sending interfaces, the task scheduling module can schedule sub-message 1 to sending interface 1 according to the load status of the three sending interfaces , dispatch sub-message 2 and sub-message 3 to sending interface 2, and dispatch message 2 to sending interface 3.
  • sending interface 1 can store the context of sub-message 1
  • sending interface 2 can store the contexts of sub-message 2 and sub-message 3
  • sending interface 3 can store the context of message 2.
  • a message in this application can be understood as a sub-message or an undivided message.
  • the sending interface also needs to add a retransmission mark to the packets so that the receiving end can identify the retransmitted packets.
  • packets in the multi-interface coordination mechanism of the receiving end, taking into account packet discarding and retransmission caused by network congestion, in a reliable transmission scenario, packets can enter from any receiving interface at the receiving end. When retransmitting for the first time, it is necessary to ensure that the same message is processed at most once at the receiving end.
  • a registration mechanism for retransmitted messages is introduced, and receiving interfaces can access each other to avoid repeated processing of messages on different receiving interfaces.
  • a receiving interface when a receiving interface receives a retransmission message, it needs to query and register the processing authority of the retransmission message from other receiving interfaces in the receiving end except the receiving interface. As long as one receiving interface has processed the original message or the retransmitted message of the retransmitted message, it can be determined that the retransmitted message received by the receiving interface is a repeated message.
  • the receiving interface that initiates the query can wait for all other receiving interfaces to complete the confirmation before processing the message, such as discarding the message.
  • the receiving interfaces are processed independently, and the transaction execution sequence can be controlled by the transaction execution sequence management module.
  • the transaction here can be understood as a message, and the above-mentioned transport layer controller can include a transaction execution sequence management module.
  • the above-mentioned transport layer controller can include a transaction execution sequence management module.
  • receiving interface 1 in the receiving end receives sub-message 1 of message 1
  • receiving interface 2 receives sub-message 2 and sub-message 3 of message 1
  • receiving interface 3 receives message 2
  • the receiving interface 1 receives sub-message 1 and sub-message 3 of message 2
  • the receiving interface 3 can establish the context of message 2.
  • the transaction execution sequence management module receives multiple sub-messages transmitted by each receiving interface, it can further process the multiple sub-messages according to the message sequence numbers of the sub-messages.
  • the sending interface of the sending end can not only be used to send messages, but also receive response messages from the peer end.
  • the sending interface of the sending end receives different resources for receiving the response message and the receiving interface of the sending end receives the resource of the message directly sent from the opposite end.
  • the network cable through which the sending interface of the sender receives the response message is physically the same as the network cable through which the receiving interface of the sender receives the message directly sent by the peer, the virtual channel and the virtual channel through which the sending interface receives the response message are physically the same.
  • the virtual channels used by the receiving interface of the sending end to receive the packets directly sent by the peer end are independent of each other and do not affect each other.
  • the receiving interface of the receiving end can not only receive messages, but also send response messages to the peer end.
  • the resources of the response message sent by the receiving interface of the receiving end are different from the resources of the message directly sent by the sending interface of the receiving end.
  • the network cable through which the receiving interface of the receiving end sends the response message is physically the same as the network cable through which the sending interface of the receiving end directly sends the message
  • the virtual channel through which the receiving interface of the receiving end sends the response message is the same as the sending interface of the receiving end.
  • the virtual channels that directly send packets to the peer end are independent of each other and do not affect each other.
  • the present application provides a message transmission method, as shown in FIG. 8 , the method includes the following processing flow.
  • the sending end determines to send the first message, determine the first sending interface for sending the first message according to the loads of the multiple sending interfaces at the sending end, and determine to receive the first message according to the congestion information of the multiple receiving interfaces at the receiving end The first sending interface of .
  • the first message may be the above message or sub-message.
  • the sending end receives congestion information from multiple receiving interfaces sent by the receiving end, and the multiple receiving interfaces include the first receiving interface.
  • the congestion information may be indication information of a packet loss rate of a receiving interface, or indication information of a packet queue length, etc., which are not limited in this application.
  • the sending end can not only determine the first sending interface for sending the first packet according to the load status of the multiple sending interfaces of the sending end, but also determine the first receiving interface for receiving the first packet according to the congestion information of the multiple receiving interfaces.
  • the congestion control module in the sending end may determine the first receiving interface from multiple receiving interfaces according to a preset algorithm. This application does not limit the implementation of the algorithm.
  • Each sending interface in the sending end can send the load status of the sending interface itself to the task scheduling module, and the task scheduling module can determine the first sending interface from the multiple sending interfaces according to the load status.
  • the method of determining the first sending interface according to the load state is not limited.
  • the load state may be indication information of the current packet queue length of each sending interface, or indication information of packet loss rate, etc., which are not limited in this application.
  • the task scheduling module then designates the first sending interface to send the first message.
  • the sending end sends a first packet through the first sending interface, where the first packet includes an identifier of the first sending interface and an identifier of the first receiving interface.
  • a field segment may be added to the first message to record the identifiers of the first sending interface and the first receiving interface that send the first message.
  • this application can endow the sending end with the ability to flexibly select the sending interface and receiving interface of the message, and can make full use of the multi-interface coordination between the sending end and the receiving end to increase bandwidth.
  • the present application provides a message transmission method, as shown in FIG. 9 , the method includes the following processing flow.
  • the receiving end sends congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine a first receiving interface on which the receiving end receives the first packet.
  • the congestion information here can refer to the description in step 801 .
  • the sending end After the sending end has determined the first receiving interface for sending the first message, in reliable transmission, the sending end can send the indication information of the first receiving interface for receiving the first message to the receiving end through a message on the control plane, so as to receive The end may receive the first packet on the first receiving interface.
  • the receiving end receives the first packet through the first receiving interface, and the first packet includes the identifier of the first sending interface through which the sending end sends the first packet and the identifier of the first receiving interface.
  • the first message can be received through the first receiving interface.
  • the sending end determines that the receiving interface for receiving the second message is the second receiving interface, the receiving end can receive the second message through the second receiving interface.
  • the flexible selection of the receiving interface for receiving the message can also be realized, and the multi-interface coordination of the receiving end can be fully utilized to increase the bandwidth.
  • the sending end in this application can flexibly select the sending interface and the receiving interface each time a message is sent, and considering that there is also a failure to send the message, when the sending end sends the retransmission message of the original message, it can be sent
  • the sending interface of the original message continues to send the retransmission message, and may also re-determine the sending interface for sending the retransmission message according to the current load status of multiple sending interfaces.
  • the sender can also determine the receiving interface for receiving the retransmission message.
  • the receiving interface for receiving the retransmission message may be the same as or different from the receiving interface for receiving the original message.
  • the sending end if the sending end does not receive the ACK message of the message within the specified time period, the sending end considers that the sending of the message fails, and continues to send the retransmission message of the message. However, the original message of the message may not be lost, but the sending end did not receive the ACK message of the message within the specified time period. In this case, for the receiving end, the receiving end may be in a The receiving interface receives the original message of the message first, and it is also possible that a retransmission message of the same message is received first on a receiving interface.
  • the receiving end Based on the principle that a message can only be processed once at the receiving end, if the original message arrives at the receiving end before the retransmitted message, the receiving end only processes the original message; if a retransmitted message arrives at the receiving end before the original message After arriving at the receiving end, the receiving end only processes this retransmission message to avoid repeated processing of the same message on multiple receiving interfaces.
  • the present application provides a message transmission method, assuming that the sender sends the original message and the retransmission message of the same message through the same sending interface, as shown in FIG. 10 , the method includes the following process.
  • the sending end sends the first packet on the first sending interface T1.
  • the first message includes the identifier of the first sending interface T1 of the sending end and the identifier of the first receiving interface R1 of the receiving end.
  • the sending end determines that sending the first message fails, it determines the second receiving interface R2 on which the receiving end receives the first retransmission message according to the congestion information of multiple receiving interfaces, and the first retransmission message is the first message of the first message. Duplicate message.
  • the sending end determines that sending the first message fails. Before sending the duplicate message of the first message, that is, the first retransmission message, the sending end determines the second receiving interface R2 for receiving the first retransmission message again according to the congestion information of multiple receiving interfaces.
  • the second receiving interface R2 may be the same as or different from the first receiving interface R1. In this embodiment, R2 and R1 are different.
  • the sending end sends a first retransmission message through the first sending interface T1, where the first retransmission message includes an identifier of the first sending interface T1, an identifier of the second receiving interface R2, and a marker of the repeated message.
  • the mark of the repeated packet is used to indicate that the first retransmitted packet is a retransmitted packet.
  • the first retransmission message will also carry the original message, that is, the sequence number M of the first message, and M is an integer greater than or equal to 0, so that the receiving end can determine that the first retransmission message is the one with the sequence number M.
  • a retransmission packet of the first packet is used to indicate that the first retransmitted packet is a retransmitted packet.
  • the first retransmission message will also carry the original message, that is, the sequence number M of the first message, and M is an integer greater than or equal to 0, so that the receiving end can determine that the first retransmission message is the one with the sequence number M.
  • step 104 when the first retransmitted message arrives at the receiving end later than the first message, step 104 is performed, or when the first message arrives at the receiving end later than the first retransmitted message, step 107 is performed.
  • the receiving end feeds back a first response packet of the first packet, where the first response packet includes the identifier of the first sending interface T1.
  • the sending end receives the first response message of the first message through the second sending interface T2, and the second sending interface T2 may be the same as or different from the first sending interface T1.
  • T2 and T1 are different.
  • the receiving end Before sending the first response message, the receiving end may send the identifier of the second sending interface T2 to the sending end through control plane signaling, so that the sending end receives the first response message through the second sending interface T2.
  • the sending end controls the second sending interface T2 to send the first response packet to the first sending interface T1.
  • the sending end needs to transmit the first sending interface T2 through the second sending interface T2.
  • the response message is sent to the first sending interface T1.
  • the sending end controls the first sending interface T1 to send a first notification message to the first receiving interface R1, where the first notification message is used to instruct the first receiving interface R1 to release the context information of the first packet.
  • the sending end Since the first receiving interface R1 stores the context information of the first message when receiving the first message, if the first sending interface T1 receives the first response message, the sending end determines that the first message is sent successfully, The sending end can then control the first sending interface T1 to notify the first receiving interface R1 to release the context information of the first packet.
  • the receiving end feeds back a first retransmission response message of the first retransmission message, where the first retransmission response message includes the identifier of the first sending interface T1.
  • the sending end receives the first retransmission response message through the third sending interface T0, and the third sending interface T0 may be the same as or different from the first sending interface T1.
  • T0 and T1 are different.
  • the receiving end Before sending the first retransmission response message, the receiving end may send the identifier of the third sending interface T0 to the sending end through control plane signaling, so that the sending end receives the first retransmission response message through the third sending interface T0.
  • the sending end controls the third sending interface T0 to send the first retransmission response packet to the first sending interface T1.
  • the sending end needs to transmit the first sending interface T0 through the third sending interface T0.
  • the retransmission response message is sent to the first sending interface T1.
  • the sending end controls the first sending interface T1 to send a second notification message to the second receiving interface R2, where the second notification message is used to instruct the second receiving interface R2 to release the context information of the first retransmission packet.
  • the sender can control the first sending interface T1 to notify the second receiving interface R2 to release the context information of the first retransmission message.
  • a multi-interface coordination mechanism can be adopted when sending and receiving messages, so that all sending interfaces of the sending end and all receiving interfaces of the receiving end can serve a single message at the same time, so as to achieve full utilization The capacity of the device bandwidth.
  • the retransmitted message may come in from any receiving interface of the receiving end.
  • the receiving end determines that the first message is received from the first receiving interface, it determines that the Whether other receiving interfaces other than the receiving interface have received duplicate packets of the first packet.
  • the first packet here may be an original packet or a retransmission packet.
  • the receiving end determines that none of the other receiving interfaces has received the repeated message of the first message, the receiving end controls the first receiving interface to process the first message; if the receiving end determines that at least one receiving interface in the other receiving interfaces has received When receiving a duplicate packet of the first packet, the receiving end controls the first receiving interface to discard the first packet. That is to say, each time the receiving interface of the receiving end receives a message, it needs to judge whether the receiving interface can process the message, so as to avoid repeated processing of the message.
  • a registration mechanism is provided at the receiving end.
  • This registration mechanism is aimed at retransmission messages, that is, when a receiving interface of the receiving end receives a retransmission message, it needs to request registration from other receiving interfaces. If a certain If the packet with the sequence number has been registered, the receiving interface cannot process the retransmitted packet. Or, when a receiving interface receives the original message, if the receiving interface determines that a retransmission message with the same content as the original message has been registered, the original message will also be processed as a repeated message, that is, it will not be processed the original message.
  • the sending end sends the first packet through the first sending interface T1, and the first sending interface T1 does not receive the response packet of the first packet within a specified time, and determines that the first packet needs to be retransmitted.
  • the first packet in case 1 is an original packet.
  • the first sending interface T1 does not receive the ACK message of the first message within a specified time, it is determined that the sending of the first message fails.
  • the first receiving interface R1 of the receiving end receives the first message, and the receiving end determines whether the first receiving interface R1 receives the first registration request from other receiving interfaces, and the first registration request is used to request retransmission of the first message to process. If it is determined that the first receiving interface R1 has not received the first registration request from other receiving interfaces, the receiving end processes the first packet at the first receiving interface R1.
  • the first retransmission message is a retransmission message of the first message.
  • step 111 the sending end determines that the sending of the first message has failed, it is possible that the first message just did not arrive at the receiving end on time, and arrived at the receiving end late. If the sending end retransmits the first message, the receiving end may experience repeated processing of the message on different receiving interfaces. Therefore, when the first receiving interface R1 receives an original message, that is, the first message here, it needs to determine whether there is a receiving interface that has received the first retransmission message among other receiving interfaces. Here, by determining the first It is determined whether the receiving interface R1 has received the first registration request from other receiving interfaces.
  • the first receiving interface R1 has received the first registration request sent by at least one of the other receiving interfaces, it means that the retransmission message of the first message arrives at the receiving end later than the first message, specifically will be introduced in case two.
  • the second receiving interface R2 of the receiving end receives the first retransmission message, and controls the second receiving interface R2 to send the first registration request to other receiving interfaces (R1 and R0), so as to determine whether the second receiving interface R2 can handle the first registration request.
  • a retransmission message A retransmission message.
  • the second receiving interface R2 receives the first retransmission message
  • the second receiving interface R2 needs to send the first registration request to the first receiving interface R1 and the third receiving interface R0 to determine whether the second receiving interface R2 can process the first retransmission message.
  • a retransmission message A retransmission message.
  • the third receiving interface Since the third receiving interface does not receive the first packet, the third receiving interface feeds back a registration success response to the second receiving interface R2.
  • the registration status recorded by the third receiving interface R0 is equivalent to that the third receiving interface gives the second receiving interface R2 the right to process the first retransmission message.
  • the receiving end determines that the first receiving interface R1 is processing the first packet, and controls the first receiving interface R0 to feed back a registration failure response to the second receiving interface R2.
  • the receiving end determines that the first receiving interface R1 receives the first registration request sent by the second receiving interface R2 among the other receiving interfaces after receiving the first message
  • the receiving end controls the first receiving interface R1 to
  • the second receiving interface R2 sends a first registration response, where the first registration response is used to indicate that the second receiving interface R2 fails to register.
  • the first receiving interface R1 does not give the second receiving interface R2 the right to process the first retransmission message.
  • the second receiving interface R2 of the receiving end determines that the second receiving interface R2 does not need to process the first retransmission message, and controls the second receiving interface R2 to send 3.
  • the receiving interface R0 sends a registration clear request.
  • the second receiving interface R2 can recognize that the first retransmitted message does not need to be processed by this receiving interface.
  • the third receiving interface R0 Since the third receiving interface R0 also fed back a successful registration response to the second receiving interface R2 before, when the second receiving interface R2 determines that it does not need to process the first retransmission message, the second receiving interface R2 also needs to report to the third receiving interface The interface R0 sends a registration clear request, so that the third receiving interface R0 deletes the registered registration state.
  • the first receiving interface R1 of the receiving end After successfully receiving the first packet, the first receiving interface R1 of the receiving end sends a second packet to the third sending interface T0 of the sending end, where the second packet is used to indicate that the first packet has been received.
  • the first receiving interface R1 is finally the only interface for processing the first message.
  • the first receiving interface R1 After the first receiving interface R1 successfully receives the first packet, it is determined that the result of the successful reception of the first packet needs to be returned, that is, the second packet here.
  • the receiving end similar to the sending end, may also determine the receiving interface for receiving the second message according to the load status of multiple receiving interfaces of the sending end. Assuming that the interface determined to receive the second packet is the third sending interface T0, the second packet may carry the identifier of the first sending interface that the sending end sent the first packet at that time.
  • the third sending interface T0 of the sending end sends an indication that the first packet is successfully received to the first sending interface T1, and the sending end controls the first sending interface T1 to send a message for releasing processing resources to the first receiving interface R1.
  • the first receiving interface R1 stores context information for processing the first packet, and when the first receiving interface R1 receives a message for releasing processing resources, the first receiving interface R1 may clear the context information of the first packet.
  • the registration mechanism provided by this application can effectively identify the retransmitted message as a repeated message, and the repeated message will not be received Port processing to avoid repeated processing of the same packet on different receiving interfaces.
  • the sending end sends a first packet through the first sending interface T1, and the first packet carries the identifier of the first sending interface T1 and the identifier of the second receiving interface R2 of the receiving end.
  • the sending end may send an event that the second receiving interface R2 is used to receive the first message to the receiving end through control plane signaling.
  • the sending end determines that the ACK message of the first message has not been received within the specified time, and the sending end sends the first retransmission message through the first sending port T1.
  • the first retransmission message is a retransmission message of the first message. Send message.
  • the first retransmission message includes the message sequence number of the first message, and also includes the identifier of the first sending interface T1 and the identifier of the first receiving interface R1.
  • the sending end determines through the congestion information that the receiving interface for receiving the first message is the second receiving interface R2, and that the receiving interface for receiving the first retransmitted message is the first receiving interface R1, proceed to step 123.
  • the receiving end receives the first retransmission packet on the first receiving interface R1.
  • the first retransmitted packet arrives at the receiving end earlier than the first packet.
  • the receiving end controls the first receiving interface R1 to send a first registration request to the second receiving interface R2 and the third receiving interface R0 respectively, where the first registration request is used to request processing of the first retransmission packet.
  • the receiving end controls the first receiving interface R1 to send a message to each receiving interface ( R0 and R3) send a first registration request, where the first registration request is used to request processing of the first retransmission message.
  • the receiving end determines that the second receiving interface R2 has not processed the duplicate message of the first retransmission message, and controls the second receiving interface R2 to feed back a successful registration response to the first receiving interface R1; the control end determines that the third receiving interface R0 also The repeated message of the first retransmitted message is not processed, and the third receiving interface R0 is controlled to feed back a registration success response to the first receiving interface R1.
  • the first receiving interface R1 has received the registration success responses of all other receiving interfaces of the receiving end, and the first receiving interface R1 has obtained the authority to process the first retransmission message.
  • the authority to process the first retransmission message has been registered, and the second receiving interface R2 and the third receiving interface R0 no longer have the right to process the first retransmission message and
  • the second receiving interface R2 and the third receiving interface R0 record the first retransmission message as being registered.
  • the receiving end controls the second receiving interface R2 to discard the first packet.
  • step 122 the sending end determines that the sending of the first packet fails, in fact the first packet only arrives at the receiving end later than the first retransmitted packet.
  • the receiving end determines that the second receiving interface R2 of the receiving end has received a first registration request, it means that the second receiving interface R2 has given the first receiving interface R1 the right to process the first retransmission message.
  • the receiving end controls the second receiving interface R2 to discard the first packet.
  • the receiving end determines that the first receiving interface R1 feeds back the second message to the first sending interface T1 of the sending end when it finishes processing the first retransmission message, and the second message indicates that the first receiving interface R1 has received the first retransmission message. Retransmit the message.
  • the sending end controls the first sending interface T1 to send an indication of releasing processing resources to the first receiving interface R1.
  • the first receiving interface R1 When the first receiving interface R1 processes the first retransmission message, it will save the context of the first retransmission message. When the first receiving interface R1 receives the instruction to release processing resources, it may delete the context of the first retransmission packet saved by the first receiving interface R1.
  • the receiving end controls the first receiving interface R1 to send a registration clear message to the second receiving interface R2 and the third receiving interface R0 to instruct the second receiving interface R2 and the third receiving interface R0 to clear the registration status of the first retransmission message .
  • the second receiving interface R2 and the third receiving interface R0 delete the registration status recorded in step 125 .
  • the receiving end when the retransmitted message of the same message arrives at the receiving end before the original message, the receiving end can only process one retransmitted message, and the original message that arrives later is regarded as a repeated message and cannot be processed to avoid repeated processing of the same message.
  • this application provides a method to avoid the same message A mechanism for handling conflicts between multiple retransmitted packets, which meets all of the following conditions:
  • the receiving interface with a small number can directly reject the receiving interface with a large number to register the retransmission message;
  • the receiving interface with a large number must collect the registration responses of all other receiving interfaces before sending a registration response to the receiving interface with a small number;
  • the sending end determines that the sending of the first message fails, and sends the first retransmission message to the receiving end through the first sending interface R1, and the first retransmission message includes the identifier of the first sending interface R1 and the ID of the third receiving interface R0 logo.
  • the first retransmission message is a retransmission message of the first message.
  • This embodiment is described on the basis that the original message, that is, the first message fails to be sent and does not reach the receiving end.
  • the sending end can determine that the receiving interface for receiving the first retransmission message is the third receiving interface R0 through the congestion information of the receiving interface of the receiving end, and carry the first retransmission message in the first retransmission message.
  • the sending end determines that the sending of the first retransmission message fails, and sends the second retransmission message to the receiving end through the first sending interface R1, and the second retransmission message includes the identifier of the first sending interface R1 and the first receiving interface Identification of R1.
  • the sending end decides to continue sending the second retransmission message on the first sending interface R1
  • the second retransmission message can be understood as the second retransmission message of the first message.
  • the sending end determines through the congestion information of the receiving interface of the receiving end that the receiving interface for receiving the second retransmission message is the first receiving interface R1
  • the second retransmission message carries the identifier of the first sending interface R1 and the first receiving interface R1. ID of interface R1.
  • the receiving end controls the third receiving interface R0 to request the first receiving interface R1 and the second receiving interface R2 to register the first retransmission packet.
  • the third receiving interface R0 when the third receiving interface R0 receives the first retransmission message, in order to avoid the same message from being processed repeatedly, the third receiving interface R0 needs to request the first receiving interface R1 and the second receiving interface R2 to register the first retransmission message, that is, request to obtain the permission to process the first retransmission message.
  • the receiving end controls the first receiving interface R1 to request the third receiving interface R0 and the second receiving interface R2 to register the second retransmission packet.
  • step 133 when the first receiving interface R1 receives the second retransmission message, in order to avoid repeated processing of the same message, the first receiving interface R1 needs to send the second receiving interface R2 and the third receiving interface R0 Requesting registration for the second retransmission message means requesting permission to process the second retransmission message.
  • the receiving end determines that the second receiving interface R2 first receives the registration request from the first receiving interface R1, if the second receiving interface R2 does not receive the retransmission message of the first message, control the second receiving interface R2 to The first receiving interface R1 returns a registration success response.
  • the second receiving interface R2 first receives the registration request of the first receiving interface R1
  • the second receiving interface R2 can send the registration request to the first receiving interface R2.
  • a receiving interface returns the authority to process the second retransmission message, and records the registration state that the second retransmission message has been registered by the first receiving interface R1.
  • the receiving end controls the second receiving interface R2 to return a registration failure response to the third receiving interface R0.
  • the second receiving interface R2 Since the second receiving interface R2 has first received the registration request from the first receiving interface R1, and has given the first receiving interface R1 the right to process the second retransmission message, it means that the first receiving interface R1 has completed the registration.
  • the second receiving interface R2 itself does not receive the retransmission message of the first message, and receives the third receiving interface R0 for the same message, that is, when the registration request for the first retransmission message is received, the second receiving interface The interface R2 returns a registration failure response to the third receiving interface R0.
  • the registration failure response indicates that the second receiving interface R2 has not received the duplicate message of the first message, and the first receiving interface R1 has completed the registration of the second retransmission message, and the third receiving interface R0 has not obtained the The processing authority of the first retransmission packet.
  • the receiving end determines that when the third receiving interface R0 receives the registration request from the first receiving interface R1, controls the third receiving interface R0 to return a registration failure response to the first receiving interface R1.
  • the third receiving interface R0 receives the first retransmission message, when the third receiving interface R0 receives the second retransmission message of the first receiving interface R1 for the first message
  • the third receiving interface R0 may be controlled to return a registration failure response to the first receiving interface R1.
  • step 137 can be understood as following the processing mechanism 1) for preventing multiple retransmitted packets from colliding.
  • the third receiving interface R0 has received the first retransmission message, and the third receiving interface R0 has also received the registration request of the first receiving interface R1 whose number is greater than that of the third receiving interface R0 (0 in the number R0 Less than 1) in the number R1, according to the description in processing mechanism 1), the third receiving interface R0 needs to reject the registration request of the first receiving interface R1, so the registration failure response is returned to the first receiving interface R1.
  • the receiving end determines that after the first receiving interface R1 receives the first message, the first receiving interface R1 also receives the first registration request sent by the second receiving interface R2, and the first registration request is used to request registration of the second receiving interface R2.
  • the receiving end controls the first receiving interface R2 Deny the first registration request.
  • the receiving end determines that the first receiving interface R1 needs to discard the second retransmission message after receiving registration responses from all other receiving interfaces of the receiving end, and records the first message on the first receiving interface R1
  • the text has been registered, and the first receiving interface R1 is controlled to return the registration response received by the first receiving interface R1 and the registration response received from the second receiving interface R2 to the third receiving interface R0, that is, the effective registration response in FIG. 13 .
  • the first receiving interface R1 has received responses from all other receiving interfaces R0 and R2 at the receiving end, including the registration failure response returned by R0 and the successful registration that the second receiving interface returned by R2 has not received the retransmission message response.
  • the first receiving interface R1 will determine that the second retransmission message received locally cannot be processed because the same message already exists Already registered on other receiving interfaces.
  • the first receiving interface R1 also needs to locally record the registration state that the second retransmission message has been registered.
  • the first receiving interface R1 follows 2) in the above-mentioned mechanism for avoiding multiple repeated message collisions, that is, the first receiving interface R1 receives the second retransmission message (the retransmission message of the first message) text), if the number of the first receiving interface R1 is not the smallest number among the numbers of all the receiving interfaces of the receiving end, the receiving end controls the first receiving interface R1 to collect all other receiving interfaces (R0 and R2) other than the first receiving interface. Multiple registration responses for one message.
  • the first receiving interface R1 sends the first registration response among multiple registration responses to the receiving interface R0 whose number is smaller than the number of the first receiving interface, and the first registration response is used to indicate that the second receiving interface R2 has not received a re-registration response.
  • the message is transmitted and the duplicate message registration of the first message of the first receiving interface R1 is successful.
  • the receiving end determines that after receiving the registration responses from the first receiving interface R1 and the second receiving interface R2, the third receiving interface R0 processes the received first retransmission message and returns it to the first sending interface R1 process result.
  • the third receiving interface R0 After the third receiving interface R0 with the smallest number collects the registration responses of all other receiving interfaces, the third receiving interface R0 can know that the second receiving interface R2 has not received the retransmitted message and has sent the retransmitted message to The processing right of is given to the first receiving interface R1. However, the third receiving interface R0 has received the registration failure message returned by the first receiving interface R1 from the first receiving interface R1. Therefore, the third receiving interface R0 can know that the remaining receiving interfaces (R1 and R2) have not processed the first registration failure message. Permission to retransmit packets for packets. Furthermore, the third receiving interface R0 obtains the processing authority for the received first retransmission message, and returns the processing result to the first sending interface R1 that sent the first retransmission message.
  • the sending end controls the first sending interface R1 to send a resource release message to the third receiving interface R0.
  • the first sending interface R1 determines that a retransmission message of the first message has been successfully processed, the first sending interface R1 returns a resource release message to the third receiving interface R0, so that the third receiving interface R0 deletes the local A context associated with retransmission packets.
  • the receiving end controls the third receiving interface R0 to instruct the first receiving interface R1 and the second receiving interface R2 to release the registration state for the first packet.
  • the first receiving interface R1 Since the first receiving interface R1 records the registration responses of the second receiving interface R2 and the third receiving interface R0, when the first receiving interface R1 receives a message of releasing the registration status, the first receiving interface R1 can delete the locally stored registration responses.
  • the second receiving interface R2 also records the registration status of the successful registration of the first receiving interface R1, and the registration status of the failure of the third receiving interface R0 registration. When the second receiving interface R2 receives the message of releasing the registration status, the second receiving interface R2 may delete the local registration state.
  • This application can follow the processing mechanism of multiple repeated messages,
  • This mechanism is a message registration mechanism, such as the mechanisms 1), 2) and 3) above.
  • other processing mechanisms can also be used to avoid repeated processing of the same message on multiple receiving interfaces.
  • the electronic device includes hardware and/or software modules corresponding to each function.
  • the electronic device may be the sending end or the receiving end in this application.
  • Combining the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the functional modules of the electronic device may be divided according to the above method example.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 14 shows a possible composition diagram of an electronic device 140, and the electronic device 140 may be a sending end or a receiving end in this application.
  • the electronic device 140 may include: a processing unit 1401 , a sending unit 1402 and a receiving unit 1403 . It can be understood that the sending end has the function of sending and receiving at the same time, and the receiving end also has the function of sending and receiving at the same time.
  • the processing unit 1401 can be used to support the electronic device 1100 to execute the above steps 801, 102, 504, 108, 112, 113, 114, 115, 116, 124, 125, 126, 128, 133, 134, 135, 136 , 137, 138, 139, 141, etc., and/or other processes for the techniques described herein.
  • the sending unit 1402 may be used to support the electronic device 1100 to execute the above steps 802, 901, 101, 103, 104, 105, 106, 107, 109, 111, 117, 118, 121, 122, 127, 129, 131, 132, 140 etc., and/or other processes for the techniques described herein.
  • the receiving unit 1403 may be used to support the electronic device 1100 to execute the above steps 902, 123, etc., and/or other processes for the technology described herein.
  • sending unit 1402 is equivalent to multiple sending interfaces in this application
  • receiving unit 1403 is equivalent to multiple receiving interfaces in this application.
  • the electronic device 140 provided in this embodiment is used to implement the above message transmission method, so the same effect as the above implementation method can be achieved.
  • the electronic device 140 may include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device 140 , for example, may be used to support the electronic device 140 to perform the steps performed by the above-mentioned determination unit 1401 .
  • the storage module can be used to support the electronic device 140 to store program codes, data, and the like.
  • the communication module may be used to support communication between the electronic device 140 and other devices, such as communication with a receiving end or a sending end. In this application, the communication module is configured to perform the steps performed by the sending unit 1402 and the receiving unit 1403 above.
  • the processing module may be a processor or a controller. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of digital signal processing (digital signal processing, DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the processing module is a processor
  • the storage module is a memory
  • the communication module is a plurality of sending interfaces and a plurality of receiving interfaces
  • the communication between the sending interfaces and the communication mode between the receiving interfaces may depend on the receiving interfaces and The number of sending interfaces and the layout structure of the chip.
  • the communication between the sending interfaces can be through the system bus to complete the data exchange between the interfaces, and the receiving interface can also be At the same time, the data communication between the interfaces is completed through the system bus.
  • the electronic device involved in this embodiment may be a communication device 150 having the structure shown in FIG. 15 , and the receiving interface includes receiving interface 1, receiving interface 2, and receiving interface 3 in FIG. 15 .
  • the data intercommunication between the sending interface and the receiving interface can be completed through physical direct connection.
  • the electronic device involved in this embodiment may be a communication device 160 having the structure shown in FIG. 16 , and the receiving interface includes receiving interface 1, receiving interface 2, and receiving interface 3 in FIG. 16 .
  • the embodiment of the present application also provides an electronic device, including one or more processors, one or more memories, multiple sending interfaces and multiple receiving interfaces.
  • the one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs The above related method steps implement the message transmission method in the above embodiment.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium stores computer instructions, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to realize the message in the above-mentioned embodiment transfer method.
  • the embodiment of the present application also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the message transmission method performed by the electronic device in the above embodiment.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the message transmission method executed by the electronic device in the above method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
  • Another embodiment of the present application provides a system, which may include the above-mentioned sending end and receiving end, and may be used to implement the above-mentioned message transmission method.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Landscapes

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

Abstract

The present application discloses a packet transmission method and device, which relate to the technical field of chips and can improve the bandwidth requirements of communication between a sending terminal and a receiving terminal, as well as transmission efficiency, by means of multi-interface collaboration of the sending terminal and multi-interface collaboration of the receiving terminal. The method comprises: when determining that the first packet is to be sent, the sending terminal determines a first sending interface for sending the first message according to the loads of the multiple sending interfaces of the sending terminal, and determines a first receiving interface for receiving the first packet according to the congestion information of the multiple receiving interfaces of the receiving terminal; and the sending terminal sends the first packet through the first sending interface, wherein the first packet comprises the identifier of the first sending interface and the identifier of the first receiving interface. Embodiments of the present application are used for multi-interface collaboration between a sending side and a receiving side.

Description

一种报文传输方法和装置A message transmission method and device 技术领域technical field
本申请涉及芯片技术领域,尤其涉及一种报文传输方法和装置。The present application relates to the field of chip technology, and in particular to a message transmission method and device.
背景技术Background technique
随着算力需求的提升,计算集群的网络带宽变得尤为敏感。在现有的超算集群场景下,事务处理延迟的一个主要原因是网络带宽不足。目前,为了提升网络设备处理性能,常见的手段是提供多套物理接口,并配合多路径技术提升通信带宽。As the demand for computing power increases, the network bandwidth of computing clusters becomes particularly sensitive. In the existing supercomputing cluster scenario, one of the main reasons for transaction processing delay is insufficient network bandwidth. At present, in order to improve the processing performance of network devices, a common method is to provide multiple sets of physical interfaces and cooperate with multipath technology to increase communication bandwidth.
例如,传统的传输控制协议(Transmission Control Protocol,TCP)是基于绑定网际协议(Internet Protocol,IP)进行连接的。随着多网卡主机数量的增多,数据从一个主机到达另一个主机,往往有多条链路可以选择。这种情况下,如何利用这多条链路进行并行的传输或者将这多条链路作为链路备份就变得很有意义。目前,多路径(Multiple Path,MP)TCP在原有的TCP协议的基础上增加了一层协议:MultiPath TCP,用户层的单一套接口(socket)输出的TCP流可以被MultiPath TCP拆分成多个TCP子流进行通信。每个TCP子流都是通过一条单独的路径进行传递,与一个独立的TCP连接类似。而且,MPTCP的本质还是TCP,接收端需要对接收到的TCP子流先重组后再处理。For example, the traditional Transmission Control Protocol (Transmission Control Protocol, TCP) is based on binding the Internet Protocol (Internet Protocol, IP) for connection. As the number of hosts with multiple NICs increases, there are often multiple links to choose from when data is transferred from one host to another. In this case, how to use these multiple links to perform parallel transmission or use these multiple links as link backup becomes very meaningful. At present, Multipath (Multiple Path, MP) TCP adds a layer of protocol on the basis of the original TCP protocol: MultiPath TCP, the TCP stream output by a single socket in the user layer can be split into multiple by MultiPath TCP TCP subflows for communication. Each TCP subflow is passed through a separate path, similar to an independent TCP connection. Moreover, the essence of MPTCP is still TCP, and the receiving end needs to reassemble the received TCP subflow before processing it.
但是,对于每个TCP子流来说,发送侧和接收端都需要为每个TCP子流维护一套状态,例如发送端与接收端要针对TCP子流进行3次握手和4次挥手等过程,发送端和接收端的软硬件资源开销较大。而且,每个TCP子流需要分别绑定一个物理接口进行通信,每个物理接口所在的单路径上的带宽依然有限,传输效率较低。However, for each TCP subflow, both the sender and the receiver need to maintain a set of states for each TCP subflow. For example, the sender and the receiver need to perform 3 handshakes and 4 handshakes for the TCP subflow. , the software and hardware resource overhead of the sending end and the receiving end is relatively large. Moreover, each TCP subflow needs to be bound to a physical interface for communication, and the bandwidth of the single path where each physical interface is located is still limited, and the transmission efficiency is low.
发明内容Contents of the invention
本申请实施例提供一种报文传输方法和装置,能够通过发送端的多接口协同工作和接收端的多接口协同工作,提升发送端和接收端通信的带宽需求,提升传输效率。Embodiments of the present application provide a method and device for message transmission, which can increase communication bandwidth requirements between the sending end and the receiving end, and improve transmission efficiency through the multi-interface cooperative work of the sending end and the multi-interface cooperative work of the receiving end.
为达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
第一方面,提供一种报文传输方法,包括:发送端确定发送第一报文时,根据发送端的多个发送接口的负载确定发送第一报文的第一发送接口,并根据接收端的多个接收接口的拥塞信息确定接收第一报文的第一接收接口;发送端通过第一发送接口发送第一报文,第一报文包括第一发送接口的标识和第一接收接口的标识。In the first aspect, a message transmission method is provided, including: when the sending end determines to send the first message, determine the first sending interface for sending the first message according to the loads of multiple sending interfaces at the sending end, and determine the first sending interface for sending the first message according to the loads of multiple sending interfaces at the receiving end The congestion information of the first receiving interface determines the first receiving interface for receiving the first message; the sending end sends the first message through the first sending interface, and the first message includes the identifier of the first sending interface and the identifier of the first receiving interface.
本申请中的发送接口和接收接口可以理解为设备的网口。多个发送接口的负载例如可以是发送接口的资源占用率,或报文的丢包率等。多个接收接口的拥塞信息例如可以是接收接口的资源占用率,或报文的丢包率等。The sending interface and receiving interface in this application can be understood as the network port of the device. The loads of multiple sending interfaces may be, for example, the resource occupancy rate of the sending interface, or the packet loss rate of packets, and the like. The congestion information of multiple receiving interfaces may be, for example, the resource occupancy rate of the receiving interfaces, or the packet loss rate of packets, and the like.
本申请中,每个发送接口的资源占用率例如为发送接口的报文处理的队列长度。发送接口的报文处理的队列长度可以理解为发送接口的发送队列中当前处理的报文数量,该发送队列为待发送报文的队列;In this application, the resource occupancy rate of each sending interface is, for example, the length of a queue for packet processing of the sending interface. The message processing queue length of the sending interface can be understood as the number of messages currently processed in the sending queue of the sending interface, which is the queue of messages to be sent;
每个接收接口的资源占用率例如为接收接口的报文处理的队列长度。接收接口的报文处理的队列长度可以理解为接收接口的接收队列中当前处理的报文数量,该接收队列为接收到的待处理报文的队列。The resource occupancy rate of each receiving interface is, for example, the queue length for packet processing of the receiving interface. The message processing queue length of the receiving interface can be understood as the number of currently processed messages in the receiving queue of the receiving interface, and the receiving queue is a queue of received messages to be processed.
由此,在本申请中,发送端无需将同一条流或同一个连接与接口进行绑定,包括无需将同一条流或同一个连接与发送端的某个发送接口进行绑定,也无需将同一条流或同一个连接与接收端的某个接收接口进行绑定。本申请中,一条流或单个连接的多次报文传输过程中,发送端每次发送报文的发送接口可能不同,同时,接收端每次接收报文的接收接口可能不同。具体将一条流或单个连接中的某个报文通过哪个发送接口发送,以及通过哪个接收接口接收,取决于多个发送接口的负载状态和多个接收接口的拥塞信息。这样,对于发送端和接收端,发送端发送报文的消息速率可以理解为多个发送接口的消息速率总和,接收端接收报文的消息速率可以理解为多个接收接口的消息速率总和。对于发送端,本申请可以赋予发送端灵活选择报文的发送接口以及接收接口的能力,可充分利用发送端和接收端进行多接口协同,提升带宽。Therefore, in this application, the sending end does not need to bind the same flow or the same connection to the interface, including the need to bind the same flow or the same connection to a sending interface of the sending end, and does not need to bind the same A stream or the same connection is bound to a receiving interface on the receiving end. In this application, during multiple message transmissions of a stream or a single connection, the sending interface of the sending end may be different each time the message is sent, and at the same time, the receiving interface of the receiving end may be different each time the message is received. Specifically, through which sending interface a packet in a flow or a single connection is sent and through which receiving interface is received depends on the load status of multiple sending interfaces and the congestion information of multiple receiving interfaces. In this way, for the sending end and the receiving end, the message rate at which the sending end sends packets can be understood as the sum of the message rates of multiple sending interfaces, and the message rate at which the receiving end receives packets can be understood as the sum of the message rates of multiple receiving interfaces. For the sending end, this application can give the sending end the ability to flexibly select the sending interface and the receiving interface of the message, and can make full use of the multi-interface coordination between the sending end and the receiving end to increase the bandwidth.
在一种可能的设计中,该方法还包括:发送端接收来自接收端发送的多个接收接口的拥塞信息,多个接收接口包括第一接收接口。即发送端可以确定每个报文发送至接收端时,接收端接收该报文的接收接口。即接收接口是发送端根据多个接收接口的拥塞信息灵活确定的,可使得接收端的多接口协同,提升接收端的带宽。In a possible design, the method further includes: the sending end receives congestion information from multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface. That is, the sending end can determine the receiving interface through which the receiving end receives the message when each message is sent to the receiving end. That is, the receiving interface is flexibly determined by the sending end according to the congestion information of multiple receiving interfaces, which can make the multiple interfaces of the receiving end cooperate and improve the bandwidth of the receiving end.
在一种可能的设计中,该方法还包括:发送端确定发送第一报文失败时,根据多个接收接口的拥塞信息确定接收端接收第一重传报文的第二接收接口,第一重传报文为第一报文的重复报文;发送端通过第一发送接口发送第一重传报文,第一重传报文包括第一发送接口的标识、第二接收接口的标识以及重复报文的标记。In a possible design, the method further includes: when the sending end determines that sending the first message fails, determining the second receiving interface on which the receiving end receives the first retransmitted message according to the congestion information of multiple receiving interfaces, the first The retransmission message is a repeated message of the first message; the sending end sends the first retransmission message through the first sending interface, and the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and Marker for duplicate packets.
也就是说,发送端在发送同一报文的原始报文和重传报文时,接收该原始报文的接收接口和接收重传报文的接收接口也可能不同,具体根据接收接口的拥塞信息确定。同样的,发送端发送同一报文的原始报文的发送接口和重传报文的发送接口也可能不同。That is to say, when the sender sends the original message and the retransmitted message of the same message, the receiving interface for receiving the original message and the receiving interface for receiving the retransmitted message may also be different, depending on the congestion information of the receiving interface Sure. Similarly, the sending interface of the original message and the sending interface of the retransmitted message of the same message at the sending end may also be different.
在一种可能的设计中,第一重传报文晚于第一报文到达接收端时,该方法还包括:发送端通过第二发送接口接收第一报文的第一响应报文,第一响应报文包括第一发送接口的标识;第二发送接口与第一发送接口不同时,发送端控制第二发送接口向第一发送接口发送第一响应报文;发送端控制第一发送接口向第一接收接口发送第一通知消息,第一通知消息用于指示第一接收接口释放第一报文的上下文信息。In a possible design, when the first retransmission message arrives at the receiving end later than the first message, the method further includes: the sending end receives the first response message of the first message through the second sending interface, and the first A response message includes the identification of the first sending interface; when the second sending interface is different from the first sending interface, the sending end controls the second sending interface to send the first response message to the first sending interface; the sending end controls the first sending interface Sending a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first message.
也就是说,对于发送端,如果发送第一报文的发送接口和接收第一响应报文的发送接口不同,接收第一响应报文的发送接口还需将第一响应报文转发给发送第一报文的发送接口,即第一发送接口,以便第一发送接口指示第一接收接口释放第一报文的上下文信息。That is to say, for the sender, if the sending interface for sending the first message is different from the sending interface for receiving the first response message, the sending interface for receiving the first response message also needs to forward the first response message to the sending interface for sending the first response message. The sending interface of a message is the first sending interface, so that the first sending interface instructs the first receiving interface to release the context information of the first message.
在一种可能的设计中,第一报文晚于第一重传报文到达接收端时,该方法还包括:发送端通过第三发送接口接收第一重传报文的第一重传响应报文,第一重传响应报文包括第一发送接口的标识;第三发送接口与第一发送接口不同时,发送端控制第三发送接口向第一发送接口发送第一重传响应报文;发送端控制第一发送接口向第二接收接口发送第二通知消息,第二通知消息用于指示第二接收接口释放第一重传报文的上下文信息。In a possible design, when the first message arrives at the receiving end later than the first retransmission message, the method further includes: the sending end receives the first retransmission response of the first retransmission message through the third sending interface message, the first retransmission response message includes the identifier of the first sending interface; when the third sending interface is different from the first sending interface, the sending end controls the third sending interface to send the first retransmission response message to the first sending interface ; The sending end controls the first sending interface to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
也就是说,对于发送端,如果发送第一重传报文的发送接口和接收第一重传响应报文的发送接口不同,接收第一重传响应报文的发送接口还需将第一重传响应报文转 发给发送第一重传报文的发送接口,即第一发送接口,以便第一发送接口指示第二接收接口释放第一重传报文的上下文信息。That is to say, for the sender, if the sending interface that sends the first retransmission message is different from the sending interface that receives the first retransmission response message, the sending interface that receives the first retransmission response message also needs to send the first retransmission response message The response message is forwarded to the sending interface that sent the first retransmission message, that is, the first sending interface, so that the first sending interface instructs the second receiving interface to release the context information of the first retransmission message.
第二方面,提供一种报文传输方法,该方法包括:接收端向发送端发送多个接收接口的拥塞信息,多个接收接口的拥塞信息用于发送端确定接收端接收第一报文的第一接收接口;接收端通过第一接收接口接收第一报文,第一报文包括发送端发送第一报文的第一发送接口的标识和第一接收接口的标识。In a second aspect, a message transmission method is provided, the method includes: the receiving end sends congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine the time at which the receiving end receives the first message The first receiving interface: the receiving end receives the first message through the first receiving interface, and the first message includes the identifier of the first sending interface through which the sending end sends the first message and the identifier of the first receiving interface.
由此,在本申请中,对于接收端,多次报文传输过程中,每次接收报文的接收接口可能不同,可由发送端根据多个接收接口的拥塞信息确定由哪个接收接口来接收报文。这样,接收端的多个接收接口可协同工作,接收端接收报文的消息速率可以理解为多个接收接口的消息率总和,提升接收端的带宽接收报文的效率。Therefore, in this application, for the receiving end, in the process of multiple message transmissions, the receiving interface of each received message may be different, and the sending end can determine which receiving interface to receive the message according to the congestion information of multiple receiving interfaces. arts. In this way, multiple receiving interfaces at the receiving end can work together, and the message rate of receiving packets at the receiving end can be understood as the sum of the message rates of multiple receiving interfaces, which improves the bandwidth efficiency of receiving packets at the receiving end.
在一种可能的设计中,该方法还包括:接收端确定从第一接收接口接收到第一报文时,确定多个接收接口除第一接收接口以外的其他接收接口是否已接收到第一报文的重复报文;接收端确定其他接收接口均未接收到第一报文的重复报文时,接收端控制第一接收接口对第一报文进行处理;接收端确定其他接收接口中的至少一个接收接口已接收到第一报文的重复报文时,接收端控制第一接收接口丢弃第一报文。In a possible design, the method further includes: when the receiving end determines that the first packet is received from the first receiving interface, determining whether other receiving interfaces of the plurality of receiving interfaces except the first receiving interface have received the first When the receiving end determines that no other receiving interface has received the repeated message of the first message, the receiving end controls the first receiving interface to process the first message; the receiving end determines that the other receiving interfaces in the When at least one receiving interface has received a duplicate packet of the first packet, the receiving end controls the first receiving interface to discard the first packet.
这是由于,接收端的多个接收接口都有可能是同一报文的原始报文和重传报文的接收接口,当多个不同的接收接口接收到同一报文的重复报文时,为了避免同一报文在不同的接收接口被重复处理,在一个第一接收接口接收到第一报文时,需先确定其他接收接口是否已经接收到第一报文的重复报文,如果其他接收接口都没接收到,第一接收接口可以处理第一报文。但是,只要有其他接收接口中的一个接收接口已经接收到的第一报文的重复报文,即对第一报文已经注册了,第一接收接口便不能处理第一报文,以避免报文被重复处理。This is because multiple receiving interfaces on the receiving end may be the receiving interfaces of the original message and the retransmitted message of the same message. When multiple different receiving interfaces receive repeated messages of the same message, in order to avoid The same message is processed repeatedly on different receiving interfaces. When a first receiving interface receives the first message, it is necessary to determine whether other receiving interfaces have received duplicate messages of the first message. If not received, the first receiving interface can process the first packet. But, as long as there is a duplicate message of the first message received by a receiving interface in other receiving interfaces, that is, the first message has been registered, the first receiving interface cannot process the first message, so as to avoid The text is processed repeatedly.
在一种可能的设计中,第一报文为原始报文时:In a possible design, when the first packet is an original packet:
确定多个接收接口除第一接收接口以外的其他接收接口是否已接收到第一报文的重复报文包括:接收端确定第一接收接口是否接收到其他接收接口的第一注册请求,第一注册请求用于请求对第一重传报文进行处理,第一重传报文为第一报文的重传报文;接收端确定其他接收接口均未接收到第一报文的重复报文包括:接收端确定第一接收接口未接收到其他接收接口发送的第一注册请求;接收端确定其他接收接口中的至少一个接收接口已接收到第一报文的重复报文包括:接收端确定第一接收接口已接收到其他接收接口中的至少一个接收接口发送的第一注册请求。与上一种可能的设计类似的,如果一个第一接收接口要对作为原始报文的第一报文进行处理,第一接收接口需要确定是否接收针对第一重传报文的第一注册请求。如果已经接收到一个第一注册请求,第一报文便是晚于第一重传报文到达的;如果并未接收到过第一注册请求,认为第一报文是最先到达的,第一接收接口可以对第一报文进行处理。Determining whether the multiple receiving interfaces other than the first receiving interface have received the repeated message of the first message includes: the receiving end determines whether the first receiving interface has received the first registration request of other receiving interfaces, the first The registration request is used to request to process the first retransmission message. The first retransmission message is a retransmission message of the first message; the receiving end determines that no other receiving interface has received the duplicate message of the first message Including: the receiving end determines that the first receiving interface has not received the first registration request sent by other receiving interfaces; the receiving end determines that at least one receiving interface in the other receiving interfaces has received the first message. The repeated message includes: the receiving end determines The first receiving interface has received the first registration request sent by at least one receiving interface among the other receiving interfaces. Similar to the previous possible design, if a first receiving interface wants to process the first message as the original message, the first receiving interface needs to determine whether to receive the first registration request for the first retransmission message . If a first registration request has been received, the first message arrives later than the first retransmission message; if the first registration request has not been received, the first message is considered to be the first to arrive, and the first A receiving interface may process the first message.
在一种可能的设计中,该方法还包括:接收端确定第一接收接口在接收到第一报文后,接收到其他接收接口中的第二接收接口发送的第一注册请求时,接收端控制第一接收接口向第二接收接口发送第一注册响应,第一注册响应用于指示第二接收接口注册失败。也就是说,如果第一接收接口正在处理第一报文时,接收到第二接收接口针对第一重传报文的第一注册请求,为了防止报文被重复处理,第一接收接口需指示 第二接收接口注册失败,以避免同一报文被重复处理。In a possible design, the method further includes: when the receiving end determines that the first receiving interface receives the first registration request sent by the second receiving interface among the other receiving interfaces after receiving the first message, the receiving end The first receiving interface is controlled to send a first registration response to the second receiving interface, where the first registration response is used to indicate that the second receiving interface fails to register. That is to say, if the first receiving interface is processing the first message and receives the first registration request for the first retransmission message from the second receiving interface, in order to prevent the message from being processed repeatedly, the first receiving interface needs to indicate The registration of the second receiving interface fails, so as to avoid repeated processing of the same packet.
在一种可能的设计中,第一报文为重传报文时:确定多个接收接口除第一接收接口以外的其他接收接口是否已接收到第一报文的重复报文包括:接收端控制第一接收接口向其他接收接口中的每个接收接口发送第一注册请求,第一注册请求用于请求对第一报文进行处理;接收端确定其他接收接口均未接收到第一报文的重复报文包括:接收端确定第一接收接口接收到的其他接收接口发送的多个注册响应,多个注册响应均指示第一接收接口注册成功;接收端确定其他接收接口中的至少一个接收接口已接收到第一报文的重复报文包括:接收端确定第一接收接口已接收到其他接收接口中的一个接收接口发送的指示第一接收接口注册失败的注册响应。In a possible design, when the first message is a retransmission message: determining whether multiple receiving interfaces other than the first receiving interface have received the repeated message of the first message includes: the receiving end Controlling the first receiving interface to send a first registration request to each of the other receiving interfaces, where the first registration request is used to request processing of the first message; the receiving end determines that none of the other receiving interfaces has received the first message The repeated message includes: the receiving end determines that the first receiving interface has received multiple registration responses sent by other receiving interfaces, and the multiple registration responses indicate that the first receiving interface has successfully registered; the receiving end determines that at least one of the other receiving interfaces has received The repeated message that the interface has received the first message includes: the receiving end determines that the first receiving interface has received a registration response sent by one of the other receiving interfaces indicating that the registration of the first receiving interface failed.
也就是说,如果第一报文是一个重传报文,第一接收接口并不确定第一报文是否是晚于原始报文到达的一个重复报文,第一接收接口需要向其他接收接口请求处理第一报文的权限,如果每个注册响应都指示第一接收接口可以处理第一报文,第一接收接口处理第一报文。如果有一个返回的注册响应指示第一接收接口注册失败,便说明第一接收接口接收到的第一报文是晚于原始报文到达接收端的,第一接收接口不能处理该第一报文。That is to say, if the first packet is a retransmission packet, the first receiving interface is not sure whether the first packet is a duplicate packet that arrives later than the original packet, and the first receiving interface needs to report to other receiving interfaces Request permission to process the first packet, and if each registration response indicates that the first receiving interface can process the first packet, the first receiving interface processes the first packet. If there is a returned registration response indicating that the first receiving interface fails to register, it means that the first message received by the first receiving interface arrives at the receiving end later than the original message, and the first receiving interface cannot process the first message.
在一种可能的设计中,该方法还包括:接收端确定其他接收接口中的第二接收接口已接收到一个第一注册请求后,又接收到第一报文的原始报文,接收端控制第二接收接口丢弃第一报文的原始报文。这就是说,如果第二接收接口已经接收到的一个第一注册请求,请求对第一报文的同一报文进行处理,说明已经有接收接口先于第二接收接口接收到的同一报文。当第二接收接口又接收到第一报文的原始报文时,第二接收接口就没有权限处理第一报文的原始报文了,避免同一报文在不同的接收接口重复处理。In a possible design, the method further includes: after the receiving end determines that the second receiving interface among the other receiving interfaces has received a first registration request, and then receives the original message of the first message, the receiving end controls The second receiving interface discards the original packet of the first packet. That is to say, if the second receiving interface has received a first registration request requesting to process the same message as the first message, it means that the receiving interface has already received the same message before the second receiving interface. When the second receiving interface receives the original message of the first message again, the second receiving interface has no authority to process the original message of the first message, so as to avoid repeated processing of the same message on different receiving interfaces.
在一种可能的设计中,第一报文为重传报文时:接收端确定第一接收接口在接收到第一报文后,第一接收接口还接收到第二接收接口发送的第一注册请求,第一注册请求用于请求对第一报文的重复报文进行处理时,若第一接收接口的编号小于第二接收接口的编号,则接收端控制第一接收接口拒绝第一注册请求。这种可能的设计需与下一个可能的设计同时执行,具体参照下面一种可能的设计中的说明。In a possible design, when the first message is a retransmission message: the receiving end determines that after the first receiving interface receives the first message, the first receiving interface also receives the first message sent by the second receiving interface. Registration request, the first registration request is used to request to process the repeated message of the first message, if the number of the first receiving interface is less than the number of the second receiving interface, the receiving end controls the first receiving interface to reject the first registration ask. This possible design needs to be executed simultaneously with the next possible design, specifically refer to the description in one possible design below.
在一种可能的设计中,第一报文为重传报文时:接收端确定第一接收接口在接收到第一报文后,如果第一接收接口的编号不是接收端的所有接收接口的编号中的最小编号,接收端控制第一接收接口收集第一接收接口以外的其他所有接收接口关于第一报文的多个注册响应;接收端控制第一接收接口向编号小于第一接收接口的编号的接收接口发送多个注册响应中的第一注册响应,第一注册响应用于指示第二接收接口对第一报文的重复报文注册成功。In a possible design, when the first message is a retransmission message: after the receiving end determines that the first receiving interface receives the first message, if the number of the first receiving interface is not the number of all receiving interfaces of the receiving end The receiving end controls the first receiving interface to collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface; The receiving interface sends a first registration response among the multiple registration responses, where the first registration response is used to indicate that the second receiving interface successfully registers for the repeated message of the first message.
与上一个可能的设计结合执行时,换句话说,对于多个接收接口接收到同一报文的多个重复报文时,如果一个接收接口已经接收到一个重传报文,编号小的接收接口可以直接拒绝编号大的接收接口关于同一重传报文的注册请求;同时,如果一个接收接口已经得到一个重传报文时,编号大的接收接口需确定其他所有接收接口关于该重传报文的注册情况。而且,编号大的接收接口需要将接收到的有效的注册结果,例如一个接收接口注册成功,部分接收接口虽然注册成功,但是并未接收到该重复报文, 以及部分接收接口注册失败等,这样,编号小的接收接口可以确定处理该重复报文的接收接口,以避免多个接收接口在接收到同一报文的多个重复报文时重复处理的情况出现。When combined with the previous possible design, in other words, when multiple receiving interfaces receive multiple duplicate packets of the same packet, if a receiving interface has received a retransmitted packet, the receiving interface with a smaller number You can directly reject the registration request of the receiving interface with a large number for the same retransmission message; at the same time, if a receiving interface has already received a retransmission message, the receiving interface with a large number needs to determine all other receiving interfaces about the retransmission message registration status. Moreover, the receiving interface with a large number needs to receive valid registration results, for example, one receiving interface registered successfully, some receiving interfaces registered successfully but did not receive the duplicate message, and some receiving interfaces failed to register, etc. , the receiving interface with a smaller number can determine the receiving interface that processes the duplicate message, so as to avoid the situation that multiple receiving interfaces repeatedly process when receiving multiple duplicate messages of the same message.
第三方面,提供一种通信设备,包括:处理器,用于确定发送第一报文时,根据发送端的多个发送接口的负载确定发送第一报文的第一发送接口,并根据接收端的多个接收接口的拥塞信息确定接收第一报文的第一接收接口;收发器,包括第一发送接口,第一发送接口用于发送第一报文,第一报文包括第一发送接口的标识和第一接收接口的标识。In a third aspect, a communication device is provided, including: a processor, configured to determine the first sending interface for sending the first message according to the loads of multiple sending interfaces of the sending end when sending the first message, and according to the load of the receiving end The congestion information of multiple receiving interfaces determines the first receiving interface receiving the first message; the transceiver includes a first sending interface, the first sending interface is used to send the first message, and the first message includes the first sending interface ID and ID of the first receiving interface.
在一种可能的设计中,收发器还用于:接收来自接收端发送的多个接收接口的拥塞信息,多个接收接口包括第一接收接口。In a possible design, the transceiver is further configured to: receive congestion information from multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface.
在一种可能的设计中,处理器还用于:确定发送第一报文失败时,根据多个接收接口的拥塞信息确定接收端接收第一重传报文的第二接收接口,第一重传报文为第一报文的重复报文;第一发送接口,还用于发送第一重传报文,第一重传报文包括第一发送接口的标识、第二接收接口的标识以及重复报文的标记。In a possible design, the processor is further configured to: when determining that sending the first message fails, determine the second receiving interface on which the receiving end receives the first retransmission message according to the congestion information of multiple receiving interfaces, and the first retransmission The transmission message is a repeated message of the first message; the first sending interface is also used to send the first retransmission message, and the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and Marker for duplicate packets.
在一种可能的设计中,第一重传报文晚于第一报文到达接收端时,收发器还包括第二发送接口,第二发送接口还用于接收第一报文的第一响应报文,第一响应报文包括第一发送接口的标识;第二发送接口与第一发送接口不同时,第二发送接口还用于,向第一发送接口发送第一响应报文;第一发送接口,还用于向第一接收接口发送第一通知消息,第一通知消息用于指示第一接收接口释放第一报文的上下文信息。In a possible design, when the first retransmission message arrives at the receiving end later than the first message, the transceiver further includes a second sending interface, and the second sending interface is also used to receive the first response of the first message message, the first response message includes the identification of the first sending interface; when the second sending interface is different from the first sending interface, the second sending interface is also used to send the first response message to the first sending interface; The sending interface is further configured to send a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first packet.
在一种可能的设计中,第一报文晚于第一重传报文到达接收端时,收发器还包括第三发送接口,第三发送接口用于接收第一重传报文的第一重传响应报文,第一重传响应报文包括第一发送接口的标识;第三发送接口与第一发送接口不同时,第三发送接口还用于向第一发送接口发送第一重传响应报文;第一发送接口,还用于向第二接收接口发送第二通知消息,第二通知消息用于指示第二接收接口释放第一重传报文的上下文信息。In a possible design, when the first message arrives at the receiving end later than the first retransmission message, the transceiver further includes a third sending interface, and the third sending interface is used to receive the first retransmission message of the first retransmission message. A retransmission response message, the first retransmission response message includes the identifier of the first sending interface; when the third sending interface is different from the first sending interface, the third sending interface is also used to send the first retransmission to the first sending interface Response message; the first sending interface is further configured to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
第四方面,提供一种通信设备,包括:收发器,用于向发送端发送多个接收接口的拥塞信息,多个接收接口的拥塞信息用于发送端确定接收端接收第一报文的第一接收接口;收发器包括第一接收接口,第一接收接口用于接收第一报文,第一报文包括发送端发送第一报文的第一发送接口的标识和第一接收接口的标识。In a fourth aspect, a communication device is provided, including: a transceiver, configured to send congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine the first packet received by the receiving end. A receiving interface; the transceiver includes a first receiving interface, the first receiving interface is used to receive the first message, and the first message includes the identification of the first sending interface and the identification of the first receiving interface that the sending end sends the first message .
在一种可能的设计中,还包括处理器,用于:确定从第一接收接口接收到第一报文时,确定多个接收接口除第一接收接口以外的其他接收接口是否已接收到第一报文的重复报文;确定其他接收接口均未接收到第一报文的重复报文时,控制第一接收接口对第一报文进行处理;确定其他接收接口中的至少一个接收接口已接收到第一报文的重复报文时,控制第一接收接口丢弃第一报文。In a possible design, it also includes a processor, configured to: determine whether other receiving interfaces except the first receiving interface of the plurality of receiving interfaces have received the first packet when receiving the first message from the first receiving interface. A repeated message of a message; when it is determined that other receiving interfaces have not received the repeated message of the first message, control the first receiving interface to process the first message; determine that at least one receiving interface in other receiving interfaces has When a duplicate packet of the first packet is received, the first receiving interface is controlled to discard the first packet.
在一种可能的设计中,第一报文为原始报文时:第一接收接口,用于确定是否接收到其他接收接口的第一注册请求,第一注册请求用于请求对第一重传报文进行处理,第一重传报文为第一报文的重传报文;确定第一接收接口未接收到其他接收接口发送的第一注册请求,第一接收接口,用于对第一报文进行处理;或,确定第一接收接口已接收到其他接收接口中的至少一个接收接口发送的第一注册请求,第一接收接口, 用于丢弃第一报文。In a possible design, when the first packet is an original packet: the first receiving interface is used to determine whether to receive the first registration request from other receiving interfaces, and the first registration request is used to request the first retransmission The message is processed, and the first retransmission message is a retransmission message of the first message; it is determined that the first receiving interface has not received the first registration request sent by other receiving interfaces, and the first receiving interface is used to register the first registration request. or, determine that the first receiving interface has received the first registration request sent by at least one receiving interface among the other receiving interfaces, and the first receiving interface is used to discard the first message.
在一种可能的设计中,在接收到第一报文后,接收到其他接收接口中的第二接收接口发送的第一注册请求时,第一接收接口,还用于向第二接收接口发送第一注册响应,第一注册响应用于指示第二接收接口注册失败。In a possible design, after receiving the first message, when receiving the first registration request sent by the second receiving interface among the other receiving interfaces, the first receiving interface is also used to send the registration request to the second receiving interface A first registration response, where the first registration response is used to indicate that the registration of the second receiving interface fails.
在一种可能的设计中,第一报文为重传报文时:第一接收接口,用于向其他接收接口中的每个接收接口发送第一注册请求,第一注册请求用于请求对第一报文进行处理;确定第一接收接口接收到的其他接收接口发送的多个注册响应,多个注册响应均指示第一接收接口注册成功,对第一报文进行处理;确定第一接收接口已接收到其他接收接口中的一个接收接口发送的指示第一接收接口注册失败的注册响应,控制第一接收接口丢弃第一报文。In a possible design, when the first packet is a retransmission packet: the first receiving interface is configured to send a first registration request to each of the other receiving interfaces, and the first registration request is used to request The first message is processed; the multiple registration responses sent by other receiving interfaces received by the first receiving interface are determined, and the multiple registration responses all indicate that the registration of the first receiving interface is successful, and the first message is processed; The interface has received a registration response sent by one of the other receiving interfaces indicating that the registration of the first receiving interface failed, and controls the first receiving interface to discard the first packet.
在一种可能的设计中,其他接收接口中的第二接收接口已接收到一个第一注册请求后,又接收到第一报文的原始报文,第二接收接口,用于丢弃第一报文的原始报文。In a possible design, after the second receiving interface among the other receiving interfaces has received a first registration request, it receives the original message of the first message, and the second receiving interface is used to discard the first registration request. The original message of the text.
在一种可能的设计中,第一报文为重传报文时:第一接收接口在接收到第一报文后,第一接收接口还接收到第二接收接口发送的第一注册请求,第一注册请求用于请求对第一报文的重复报文进行处理时,若第一接收接口的编号小于第二接收接口的编号,则第一接收接口,用于拒绝第一注册请求。In a possible design, when the first message is a retransmission message: after the first receiving interface receives the first message, the first receiving interface also receives the first registration request sent by the second receiving interface, When the first registration request is used to request to process the repeated message of the first message, if the number of the first receiving interface is smaller than the number of the second receiving interface, the first receiving interface is used to reject the first registration request.
在一种可能的设计中,第一报文为重传报文时:第一接收接口在接收到第一报文后,如果第一接收接口的编号不是接收端的所有接收接口的编号中的最小编号,第一接收接口,用于收集第一接收接口以外的其他所有接收接口关于第一报文的多个注册响应;第一接收接口还用于向编号小于第一接收接口的编号的接收接口发送多个注册响应中的第一注册响应,第一注册响应用于指示第二接收接口对第一报文的重复报文注册成功。In a possible design, when the first message is a retransmission message: after the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number of all receiving interfaces at the receiving end Number, the first receiving interface, used to collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface; Sending a first registration response among the multiple registration responses, where the first registration response is used to indicate that the second receiving interface successfully registers for the repeated message of the first message.
第五方面,提供一种通信装置,包括至少一个处理器、多个发送接口和多个接收接口,至少一个处理器与存储器、多个发送接口和多个接收接口通过系统总线相连,至少一个处理器用于读取并执行存储器中存储的程序,该程序可作用于多个发送接口和多个接收接口,以使得装置执行如上述第一方面或第一方面的任一项的方法。In a fifth aspect, a communication device is provided, including at least one processor, multiple sending interfaces, and multiple receiving interfaces, at least one processor is connected to the memory, multiple sending interfaces, and multiple receiving interfaces through a system bus, and at least one processing The device is used to read and execute the program stored in the memory, and the program can act on multiple sending interfaces and multiple receiving interfaces, so that the device executes the method according to the first aspect or any one of the first aspect.
第六方面,提供一种芯片,芯片与存储器耦合,芯片包括多个与发送接口和多个接收接口耦合的管脚,该芯片用于读取并执行存储器中存储的程序指令,以实现如上述第一方面或第一方面的任一项的方法。In a sixth aspect, a chip is provided, the chip is coupled with a memory, the chip includes a plurality of pins coupled to a sending interface and a plurality of receiving interfaces, and the chip is used to read and execute program instructions stored in the memory to achieve the above-mentioned The first aspect or the method of any one of the first aspects.
第七方面,提供一种电子设备,包括多个发送接口、多个接收接口、一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面及任一项可能的实现方式中的报文传输方法。In a seventh aspect, an electronic device is provided, including multiple sending interfaces, multiple receiving interfaces, one or more processors, and one or more memories. The one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs A message transmission method in any one of the above aspects and any possible implementation manner.
第八方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一方面及任一项可能的实现方式中的报文传输方法。In the eighth aspect, the embodiment of the present application provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are run on the electronic device, cause the electronic device to perform any of the above-mentioned aspects and any of the possible implementations. Message transmission method.
第九方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行上述任一方面及任一项可能的实现方 式中的报文传输方法。In the ninth aspect, the embodiment of the present application provides a computer program product. When the computer program product runs on a computer or a processor, the computer or processor executes the report in any one of the above-mentioned aspects and any possible implementation. file transfer method.
第十方面,本申请实施例提供了一种系统,该系统可以包括以上任一方面的任一项可能的实现方式中的发送端和接收端。该发送端和接收端可以执行上述任一方面及任一项可能的实现方式中的报文传输方法。In a tenth aspect, the embodiment of the present application provides a system, and the system may include the sending end and the receiving end in any possible implementation manner of any of the above aspects. The sending end and the receiving end may implement the message transmission method in any one of the foregoing aspects and any possible implementation manner.
可以理解的是,上述提供的任一种发送端、接收端、芯片系统、计算机可读存储介质或计算机程序产品等均可以应用于上文所提供的对应的方法,因此,其所能达到的有益效果可参考对应的方法中的有益效果,此处不再赘述。It can be understood that any of the sending end, receiving end, chip system, computer-readable storage medium, or computer program product provided above can be applied to the corresponding method provided above. Therefore, the achieved For the beneficial effect, reference may be made to the beneficial effect in the corresponding method, which will not be repeated here.
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。These or other aspects of the present application will be more clearly understood in the following description.
附图说明Description of drawings
图1为本申请实施例提供的一种MPTCP技术中的TCP子流处理架构示意图;FIG. 1 is a schematic diagram of a TCP subflow processing architecture in an MPTCP technology provided by an embodiment of the present application;
图2为本申请实施例提供的一种RDMA bonding中的带宽聚合架构示意图;FIG. 2 is a schematic diagram of a bandwidth aggregation architecture in RDMA bonding provided by an embodiment of the present application;
图3为本申请实施例提供的一种多路径传输技术架构示意图;FIG. 3 is a schematic diagram of a multi-path transmission technology architecture provided by an embodiment of the present application;
图4为本申请实施例提供的一种多路径传输技术中多接口协同的架构示意图;FIG. 4 is a schematic diagram of a multi-interface coordination architecture in a multi-path transmission technology provided by an embodiment of the present application;
图5为本申请实施例提供的一种网络设备中网络硬件接口结构示意图;FIG. 5 is a schematic diagram of a network hardware interface structure in a network device provided by an embodiment of the present application;
图6为本申请实施例提供的一种发送端执行报文拆分与接口调度的架构示意图;FIG. 6 is a schematic diagram of an architecture of a sender performing packet splitting and interface scheduling provided by an embodiment of the present application;
图7为本申请实施例提供的一种接收端执行报文拆分与接口调度的架构示意图;FIG. 7 is a schematic diagram of an architecture of a receiving end performing message splitting and interface scheduling provided by an embodiment of the present application;
图8为本申请实施例提供的一种报文传输方法流程示意图;FIG. 8 is a schematic flowchart of a message transmission method provided by an embodiment of the present application;
图9为本申请实施例提供的一种报文传输方法流程示意图;FIG. 9 is a schematic flowchart of a message transmission method provided by an embodiment of the present application;
图10为本申请实施例提供的一种报文传输方法中的信号交互示意图;FIG. 10 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application;
图11为本申请实施例提供的一种报文传输方法中的信号交互示意图;FIG. 11 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application;
图12为本申请实施例提供的一种报文传输方法中的信号交互示意图;FIG. 12 is a schematic diagram of signal interaction in a message transmission method provided by an embodiment of the present application;
图13为本申请实施例提供的一种报文传输方法中的信号交互示意图;FIG. 13 is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of the present application;
图14为本申请实施例提供的一种电子设备的结构示意图;FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图15为本申请实施例提供的一种通信设备的结构示意图;FIG. 15 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
图16为本申请实施例提供的一种通信设备的结构示意图。FIG. 16 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:For ease of understanding, some descriptions of concepts related to the embodiments of the present application are given by way of example for reference. As follows:
MPTCP:建立TCP连接时,一直以来都是只能绑定一个IP地址,但是随着多网卡主机越来越多,数据从一个主机到另一个主机往往都会有多条链路可以到达,其目的是允许TCP连接使用多个路径来最大化信道资源使用。MPTCP: When establishing a TCP connection, only one IP address has always been bound, but with more and more hosts with multiple network cards, data can often be reached by multiple links from one host to another. is to allow TCP connections to use multiple paths to maximize channel resource usage.
远程直接数据存取(Remote Direct Memory Access,RDMA):是为了解决网络传输中服务器端数据处理的延迟而产生的。RDMA通过网络把资料直接传入计算机的存储区,将数据从一个系统快速移动到远程系统存储器中,而不对操作系统造成任何影响。这样只需要很少的计算机的处理功能,也消除了外部存储器复制和上下文切换的开销,因而能解放内存带宽和中央处理单元(Central Processing Unit,CPU)周期用于改进应用系统性能。Remote Direct Memory Access (RDMA): It was created to solve the delay of server-side data processing in network transmission. RDMA transfers data directly to the computer's storage area over the network, quickly moving data from one system to remote system memory without any impact on the operating system. This requires little computer processing power and eliminates the overhead of external memory copying and context switching, thus freeing memory bandwidth and Central Processing Unit (CPU) cycles for improved application performance.
队列对(Queue Pair,QP):硬件和软件之间的一个虚拟接口。QP是队列结构,按顺序存储着软件给硬件下发的任务,任务中包含所取的数据的来源和长度,并且包 括数据的发送目的地等。Queue Pair (QP): A virtual interface between hardware and software. QP is a queue structure, which stores the tasks sent by the software to the hardware in order. The tasks include the source and length of the data to be fetched, and include the destination of the data.
主通道适配器(Host Channel Adapter,HCA):可应用于企业数据中心、高性能计算和嵌入式环境等领域,为服务器/存储的集群应用提供了高带宽、低延迟的解决方案。在集群数据库、并行应用、处理服务和高性能嵌入式输入/输出(Input/Out,I/O)等应用中,该HCA卡可使应用的性能实现最大程度的提高,缩短了操作周期,降低了资源损耗。Host Channel Adapter (HCA): It can be used in enterprise data centers, high-performance computing, and embedded environments, and provides high-bandwidth, low-latency solutions for server/storage cluster applications. In applications such as clustered databases, parallel applications, processing services, and high-performance embedded input/output (Input/Out, I/O), the HCA card can maximize the performance of the application, shorten the operating cycle, and reduce the resource loss.
无限带宽(InfiniBand,IB):用于高性能计算的计算机网络通信标准,它具有极高的吞吐量和极低的延迟,用于计算机与计算机之间的数据互连。InfiniBand也用作服务器与存储系统之间的直接或交换互连,以及存储系统之间的互连。Infiniband (InfiniBand, IB): A computer network communication standard for high-performance computing, which has extremely high throughput and extremely low latency, and is used for data interconnection between computers. InfiniBand is also used as a direct or switched interconnect between servers and storage systems, and as an interconnect between storage systems.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in this article is only a description of associated objects The association relationship of indicates that there may be three kinds of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. In addition, in the description of the embodiments of the present application, "plurality" refers to two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
目前,为了提升网络设备处理性能,常见的手段是提供多套物理接口,并配合多路径传输技术提升通信带宽。At present, in order to improve the processing performance of network equipment, a common method is to provide multiple sets of physical interfaces and cooperate with multi-path transmission technology to increase communication bandwidth.
一种多路径技术MPTCP中,如图1中的(a)所示,原有的TCP协议包括网际协议(Internet Protocol,IP)层、TCP层和应用层(application)。在该基础上增加了一层MPTCP后,TCP协议可如图1中的(b)所示,用户层的单一socket的TCP流可在MPTCP层拆分成多个TCP子流(subflow)。这里的每个TCP子流都是通过一条单独的路径传输,每个TCP子流对应存在一个TCP连接。在接收端,需要对接收到的多个TCP子流进行重组后再处理。In a multipath technology MPTCP, as shown in (a) in FIG. 1 , the original TCP protocol includes an Internet Protocol (Internet Protocol, IP) layer, a TCP layer and an application layer (application). After adding a layer of MPTCP on this basis, the TCP protocol can be shown as (b) in FIG. 1 , and the TCP flow of a single socket in the user layer can be split into multiple TCP subflows (subflow) at the MPTCP layer. Each TCP subflow here is transmitted through a separate path, and each TCP subflow corresponds to a TCP connection. At the receiving end, multiple received TCP sub-flows need to be reassembled before processing.
但是,发送端和接收端对于每个TCP子流都需要维护一套状态,即每个TCP子流都要经过发送端和接收端经过三次握手和四次挥手后再传输,对于发送端和接收端来说,软硬件的资源开销较大。However, the sending end and the receiving end need to maintain a set of states for each TCP subflow, that is, each TCP subflow needs to be transmitted after three handshakes and four handshakes between the sending end and the receiving end. On the end, the resource overhead of software and hardware is relatively large.
具体地,TCP位于传输层,作用是提供可靠的字节流服务,为了准确无误地将数据送达目的地,TCP协议采纳三次握手策略。三次握手策略包括:1)发送端先发送一个带有同步(synchronize,SYN)标志地数据包给接收端。2)接收端接收后,向发送端回传一个带有SYN/确认(Acknowledgement,ACK)标志的数据包,以向发送端传递已接收到数据包的确认信息。3)发送端再向接收端回传一个带有ACK标志的数据包,以表示发送端已接收到确认信息,三次握手结束。Specifically, TCP is located at the transport layer, and its role is to provide reliable byte stream services. In order to accurately deliver data to the destination, the TCP protocol adopts a three-way handshake strategy. The three-way handshake strategy includes: 1) The sending end first sends a data packet with a synchronization (synchronize, SYN) flag to the receiving end. 2) After receiving, the receiving end returns a data packet with a SYN/acknowledgment (Acknowledgment, ACK) flag to the sending end, so as to convey the confirmation information of the received data packet to the sending end. 3) The sending end returns a data packet with an ACK flag to the receiving end to indicate that the sending end has received the confirmation information, and the three-way handshake ends.
由于TCP连接是全双工的,因此每个方向都必须单独进行关闭。这个原则是当一方完成它的数据发送任务后,可发送一个FIN(FinNet)来终止这个方向的连接。但收到一个FIN只意味着这一方向上没有数据流动,一个TCP连接在收到一个FIN后仍能发送数据。首先进行关闭的一方(主动方)将执行主动关闭,而另一方(被动方) 执行被动关闭。当被动方收到主动方的FIN报文通知时,它仅仅表示主动方没有数据再发送给被动方了。这个过程可以称为四次挥手,具体包括:1)主动方向被动方发送一个FIN,用于指示要关闭主动方到被动方的数据传输。2)被动方收到FIN,被动方向主动方发送ACK。3)被动放关闭与主动方的连接,并发送一个FIN给主动方。4)主动方在接收到3)中的FIN后,主动方向被动放发回ACK,表示已收到3)中的FINSince TCP connections are full-duplex, each direction must be closed separately. The principle is that when one party completes its data sending task, it can send a FIN (FinNet) to terminate the connection in this direction. But receiving a FIN only means that there is no data flow in this direction, and a TCP connection can still send data after receiving a FIN. The party that does the shutdown first (the active party) will perform the active shutdown, while the other party (the passive party) will perform the passive shutdown. When the passive party receives the FIN message notification from the active party, it only means that the active party has no data to send to the passive party. This process can be called four hand waving, and specifically includes: 1) The active party sends a FIN to the passive party, which is used to indicate that the data transmission from the active party to the passive party is to be closed. 2) The passive party receives FIN, and the passive party sends ACK to the active party. 3) The passive release closes the connection with the active party, and sends a FIN to the active party. 4) After the active party receives the FIN in 3), the active party sends back an ACK to the passive party, indicating that the FIN in 3) has been received
由此看来,如果每个TCP子流都维护有一个连接下的状态,包括三次握手和四次挥手这样的状态,资源开销较大。而且,每个TCP子流在传输时,发送端要为一个TCP子流绑定一个物理接口,接收端也要为TCP子流绑定一个物理接口。在这种接口绑定容易发生流量阻塞,而且设备的处理带宽会受到限制。From this point of view, if each TCP subflow maintains a connection state, including the state of three-way handshake and four-way handshake, the resource overhead is relatively large. Moreover, when each TCP sub-flow is transmitted, the sending end needs to bind a physical interface for a TCP sub-flow, and the receiving end also needs to bind a physical interface for the TCP sub-flow. Traffic congestion is prone to occur in this interface binding, and the processing bandwidth of the device will be limited.
另一种多路径技术RDMA bonding(绑定)中,可以将一个发送端或接收端中的RDMA聚合成一套逻辑资源,实现带宽聚合。如图2所示,发送端或接收端中,当用户的应用层(Application)的数据要传输时,RDMA HAL(hardware abstraction layer,硬件抽象层)and services可以为Application提供调用HCA的API。图2中示出的无线带宽(InfiniBand,IB)HCA和RDMA融合以太网(RDMA over Converged Ethernet,RoCE)HCA,RDMA bonding可以通过绑定这两种HCA中的一个屏蔽HCA的硬件差异,实现多个RDMA资源池化,用户可以不感知RDMA的设备差异。RDMA HAL and services可以根据一些规则将Application要处理的QP分配到具体的HCA去处理。其中,绑定HCA驱动(Bonding HAC driver)可以驱动RDMA HAL and services为QP分配的HAC去处理该QP。In RDMA bonding, another multipath technology, the RDMA in a sender or receiver can be aggregated into a set of logical resources to realize bandwidth aggregation. As shown in Figure 2, when the data of the user's application layer (Application) is to be transmitted at the sending end or the receiving end, RDMA HAL (hardware abstraction layer, hardware abstraction layer) and services can provide the API for the Application to call HCA. For the wireless bandwidth (InfiniBand, IB) HCA and the RDMA Converged Ethernet (RDMA over Converged Ethernet, RoCE) HCA shown in Figure 2, RDMA bonding can shield the hardware differences of the HCA by binding one of the two HCAs to achieve multiple With RDMA resource pooling, users do not perceive RDMA device differences. RDMA HAL and services can assign the QP to be processed by the Application to a specific HCA for processing according to some rules. Among them, the Bonding HAC driver can drive the HAC allocated by RDMA HAL and services to the QP to process the QP.
可以理解,RDMA bonding中,可基于QP选定HCA建立通信连接,但是同时也存在增加调度和硬件屏蔽的软硬件开销,与MPTCP中绑定接口的技术类似。而且,同样也存在某个HCA容易发生流量阻塞,设备的处理带宽受到限制的问题。It can be understood that in RDMA bonding, HCA can be selected based on QP to establish a communication connection, but at the same time, there is also the software and hardware overhead of increasing scheduling and hardware shielding, which is similar to the technology of bonding interfaces in MPTCP. Moreover, there is also the problem that a certain HCA is prone to traffic congestion, and the processing bandwidth of the device is limited.
由此,可以看出,当前的多路径传输技术,本质依然是单个连接绑定物理接口的方式进行数据传输。如图3所示,对于发送端,如果确定连接1是通过物理接口0传输数据,发送端只能在物理接口1发送数据。类似的,连接2的数据也只能在物理接口1发送数据。发送端的多个物理接口并没有协同工作。对于接收端,也是绑定固定的物理端口接收单个连接的数据。From this, it can be seen that the essence of the current multi-path transmission technology is still that a single connection is bound to a physical interface for data transmission. As shown in FIG. 3 , for the sender, if it is determined that connection 1 transmits data through physical interface 0, the sender can only send data on physical interface 1. Similarly, data on connection 2 can only be sent on physical interface 1. Multiple physical interfaces on the sending side are not working together. For the receiving end, it is also bound to a fixed physical port to receive data of a single connection.
对此,本申请提供一种报文传输方法,该报文可以理解为上文中的数据。该方法中,可以打破当前这种一个连接需要和一个物理接口绑定的约束,可使得设备上的多个物理接口同时为单个连接传输数据,提升报文的处理效率。In this regard, the present application provides a message transmission method, and the message can be understood as the above data. In this method, the current constraint that a connection needs to be bound to a physical interface can be broken, and multiple physical interfaces on the device can transmit data for a single connection at the same time, improving message processing efficiency.
具体地,在本申请的多路径传输中,提出对于同一条通信流(一个连接)的发送机制,不绑定发送端的物理接口进行报文发送,对于同一条通信流的接收机制,不绑定接收端的物理接口进行报文接收。Specifically, in the multi-path transmission of this application, it is proposed that for the sending mechanism of the same communication flow (one connection), the physical interface of the sending end is not bound to send the message, and the receiving mechanism of the same communication flow is not bound. The physical interface at the receiving end receives packets.
如图4所示,例如对于发送端的单个连接,该连接中待发送的多个报文中的每个报文可能通过不同的物理接口发送,例如该连接中的报文1通过物理接口0发送,报文2通过物理接口1发送。假设发送端有3个物理接口,单个连接可以通过这3个物理接口发送数据,最大可达到所有接口的消息速率总和。对于接收端,与发送端类似的,接收每个报文的接口也可能不同。As shown in Figure 4, for example, for a single connection at the sending end, each of the multiple packets to be sent in the connection may be sent through a different physical interface, for example, packet 1 in the connection is sent through physical interface 0 , packet 2 is sent through physical interface 1. Assuming that the sending end has 3 physical interfaces, a single connection can send data through these 3 physical interfaces, and the maximum message rate can reach the sum of all interfaces. For the receiving end, similar to the sending end, the interface for receiving each message may also be different.
本申请的这种多接口协同的多路径传输可以适用于多种场景中,例如可应用于数 据中心的多个节点中,此时本申请的发送端例如可以是计算节点,接收端可以是存储节点,或者,发送端为存储节点,接收端为计算节点等。例如还可以应用于高性能计算(High Performance Computing,HPC)机群的多个计算节点中。当然,还可以应用于其他场景中,本申请不做限定。The multi-interface coordinated multi-path transmission of this application can be applied to various scenarios, for example, it can be applied to multiple nodes in a data center. At this time, the sending end of this application can be a computing node, and the receiving end can be a storage node. node, or the sending end is a storage node, and the receiving end is a computing node, etc. For example, it can also be applied to multiple computing nodes of a high-performance computing (High Performance Computing, HPC) cluster. Of course, it can also be applied in other scenarios, which is not limited in this application.
本申请可以应用于网络设备,网络设备可以为发送端或接收端,发送端和接收端可以应用于上述场景中。发送端和接收端之间的数据传输可以为多路径传输。网络设备既可以作为发送端,也可以作为接收端,因此,如图4所示,网络设备包括多个发送接口和多个接收接口,也就相当于发送端包括多个发送接口和多个接收接口,接收端也包括多个接收接口和多个发送接口。在发送端向接收端发送报文的过程中,发送端的发送接口可以用于发送报文,多个接收接口可以用于接收报文的响应,接收端的接收接口可以用于接收报文,接收端的发送接口可以用于发送报文的响应。The present application can be applied to network equipment, and the network equipment can be a sending end or a receiving end, and the sending end and the receiving end can be applied in the above scenarios. The data transmission between the sending end and the receiving end may be multi-path transmission. The network device can be used as both the sending end and the receiving end. Therefore, as shown in Figure 4, the network device includes multiple sending interfaces and multiple receiving interfaces, which means that the sending end includes multiple sending interfaces and multiple receiving The receiving end also includes multiple receiving interfaces and multiple sending interfaces. In the process of sending a message from the sending end to the receiving end, the sending interface of the sending end can be used to send the message, multiple receiving interfaces can be used to receive the response of the message, the receiving interface of the receiving end can be used to receive the message, and the receiving end’s The sending interface can be used to send the response of the message.
在一些实施例中,本申请的发送接口和接收接口可以理解为网络设备的网络硬件接口。In some embodiments, the sending interface and receiving interface in this application can be understood as network hardware interfaces of network devices.
具体的,对于一个网络设备,该网络设备可以包括专用集成电路(Application Specific Integrated Circuit,ASIC)和内存。内存可以用于存储数据。ASIC可以包括处理器、其他组件和网络硬件接口。ASIC内的所有组件可以通过系统总线进行数据传递。处理器可以用于运行操作系统和软件协议栈等。其他组件,可以用于配合处理器完成各项功能。本申请可针对ASIC中的网络硬件接口进行改进。Specifically, for a network device, the network device may include an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) and a memory. Memory can be used to store data. An ASIC may include a processor, other components, and a network hardware interface. All components within the ASIC can communicate data through the system bus. The processor can be used to run an operating system and software protocol stack, etc. Other components can be used to cooperate with the processor to complete various functions. This application can be improved for the network hardware interface in ASIC.
如图5所示,该网络硬件接口包括传输层控制器、多个发送接口(如图5中示出的发送接口1、发送接口2和发送接口3)和多个接收接口(如图5中示出的接收接口1、接收接口2和接收接口3)。发送接口可通过交换机向其他外接设备发送报文,接收接口可通过交换机接收其他外接设备的报文。其中,传输层控制器包括拥塞控制模块、可靠传输模块和任务调度模块等。As shown in Figure 5, the network hardware interface includes a transport layer controller, multiple sending interfaces (such as sending interface 1, sending interface 2 and sending interface 3 shown in Figure 5) and multiple receiving interfaces (such as Receiving interface 1, receiving interface 2 and receiving interface 3 are shown). The sending interface can send messages to other external devices through the switch, and the receiving interface can receive messages from other external devices through the switch. Among them, the transport layer controller includes a congestion control module, a reliable transmission module, and a task scheduling module.
其中,可靠传输模块,在网络设备作为发送端时,用于根据接收接口接收到的报文响应,确定发送端是否要进行报文重传。另外,由于本申请中的多个接收接口可协同工作,在网络设备作为接收端时,可靠传输模块还用于配合多个接收接口进行报文去重处理,确保同一个报文只能执行不超过1次,具体将在后文中介绍。Among them, the reliable transmission module is used to determine whether the sending end needs to retransmit the message according to the message response received by the receiving interface when the network device acts as the sending end. In addition, since multiple receiving interfaces in this application can work together, when the network device is used as the receiving end, the reliable transmission module is also used to cooperate with multiple receiving interfaces to perform packet deduplication processing to ensure that the same message can only execute different More than once, the details will be introduced later.
在网络设备作为发送端时:When the network device is used as the sender:
拥塞控制模块,用于和任务调度模块配合,实现多路径传输中,发送接口和接收接口的灵活选择;The congestion control module is used to cooperate with the task scheduling module to realize the flexible selection of the sending interface and the receiving interface in multi-path transmission;
任务调度模块,用于根据拥塞控制模块确定的发送接口,编辑要发送的报文和选择发送接口和接收接口等;The task scheduling module is used to edit the message to be sent and select the sending interface and receiving interface according to the sending interface determined by the congestion control module;
发送接口用于根据任务调度模块的指示,进行报文发送。The sending interface is used to send messages according to the instructions of the task scheduling module.
在网络设备作为接收端时:When the network device is used as the receiving end:
接收接口用于接收报文,同时可通过多接口报文注册机制,实现多个接口的协同处理,确保同一个报文不会被重复处理。即这里的报文注册机制用于避免报文被重复处理。The receiving interface is used to receive messages. At the same time, the multi-interface message registration mechanism can be used to realize the coordinated processing of multiple interfaces to ensure that the same message will not be processed repeatedly. That is, the message registration mechanism here is used to avoid repeated processing of messages.
在一些实施例中,在发送端的多接口协同机制中,任务调度模块可与全部的发送接口进行通信,且发送接口均是解耦的,发送接口各自可以维护自身的发送侧上下文。 该发送侧上下文可包括报文的序列号和连接状态等。发送接口还可以将自身接口的拥塞信息以及接收到的接收端的拥塞信息、发送接口的负载状态(收包情况)以及发送接口的故障信息等反馈给任务调度模块。In some embodiments, in the multi-interface coordination mechanism at the sending end, the task scheduling module can communicate with all sending interfaces, and the sending interfaces are all decoupled, and each sending interface can maintain its own sending side context. The sending side context may include the sequence number and connection status of the message, and so on. The sending interface can also feed back the congestion information of its own interface, the received congestion information of the receiving end, the load status (packet receiving situation) of the sending interface, and the fault information of the sending interface to the task scheduling module.
任务调度模块,用于执行报文的拆分的调度,并根据多个发送接口的负载状态,确定发送报文的发送接口,以进行报文的发送。如图6所示,如果将本申请中的报文看做一个消息1,在发送端的传输层可将消息1拆分为子消息1、子消息2和子消息3,消息2不拆分,当任务调度模块在从传输层接收到这3个子消息和消息2时,假设多发送端有3个发送接口,任务调度模块可以根据3个发送接口的负载状态,将子消息1调度给发送接口1,将子消息2和子消息3调度给发送接口2,将消息2调度给发送接口3。相应地,发送接口1可保存子消息1的上下文,发送接口2可保存子消息2和子消息3的上下文,发送接口3可保存消息2的上下文。The task scheduling module is used to perform packet splitting scheduling, and determine the sending interface for sending the message according to the load status of multiple sending interfaces, so as to send the message. As shown in Figure 6, if the message in this application is regarded as a message 1, the transport layer at the sending end can split message 1 into sub-message 1, sub-message 2 and sub-message 3, and message 2 is not split, when When the task scheduling module receives the three sub-messages and message 2 from the transport layer, assuming that the multi-sending end has three sending interfaces, the task scheduling module can schedule sub-message 1 to sending interface 1 according to the load status of the three sending interfaces , dispatch sub-message 2 and sub-message 3 to sending interface 2, and dispatch message 2 to sending interface 3. Correspondingly, sending interface 1 can store the context of sub-message 1, sending interface 2 can store the contexts of sub-message 2 and sub-message 3, and sending interface 3 can store the context of message 2.
本申请中的一个报文可以理解为一个子消息或一个未被拆分的消息。对于重传报文,发送接口还需对报文添加重传的标记,以便接收端可识别出重传报文。A message in this application can be understood as a sub-message or an undivided message. For retransmitted packets, the sending interface also needs to add a retransmission mark to the packets so that the receiving end can identify the retransmitted packets.
在一些实施例中,在接收端的多接口协同机制中,考虑到网络拥塞引起的报文丢弃和重传,在可靠传输场景下,报文可以从接收端的任意一个接收接口进入,当报文多次重传时,需要确保同一个报文在接收端最多只被处理一次。在本申请中,在识别出重复报文时,通过引入对重传报文引入注册机制,且接收接口间可互相访问,避免报文在不同的接收接口被重复处理。In some embodiments, in the multi-interface coordination mechanism of the receiving end, taking into account packet discarding and retransmission caused by network congestion, in a reliable transmission scenario, packets can enter from any receiving interface at the receiving end. When retransmitting for the first time, it is necessary to ensure that the same message is processed at most once at the receiving end. In this application, when duplicate messages are identified, a registration mechanism for retransmitted messages is introduced, and receiving interfaces can access each other to avoid repeated processing of messages on different receiving interfaces.
具体地,当一个接收接口在接收到重传报文时,需向接收端中除这一个接收接口以外的其余接收接口查询并注册重传报文的处理权限。只要有一个接收接口处理过重传报文的原始报文或重传报文,可以确定该接收接口接收到的重传报文是重复报文。发起查询的接收接口,可等其余所有接收接口都完成确认,才能进行报文处理,例如丢弃报文。Specifically, when a receiving interface receives a retransmission message, it needs to query and register the processing authority of the retransmission message from other receiving interfaces in the receiving end except the receiving interface. As long as one receiving interface has processed the original message or the retransmitted message of the retransmitted message, it can be determined that the retransmitted message received by the receiving interface is a repeated message. The receiving interface that initiates the query can wait for all other receiving interfaces to complete the confirmation before processing the message, such as discarding the message.
对于非重复报文,接收接口各自独立处理,事务的执行顺序可由事务执行序管理模块进行控制。这里的事务可以理解为报文,上述传输层控制器可包括事务执行序管理模块。如图7所示,当接收端中的接收接口1接收到消息1的子消息1,接收接口2接收到消息1的子消息2和子消息3,接收接口3接收到消息2时,接收接口1可建立子消息1的上下文,接收接口2可建立子消息2和子消息3的上下文,接收接口3可建立消息2的上下文。事务执行序管理模块在接收到各个接收接口传输的多个子消息时,可按照子消息的消息序号对多个子消息进一步进行处理。For non-repetitive messages, the receiving interfaces are processed independently, and the transaction execution sequence can be controlled by the transaction execution sequence management module. The transaction here can be understood as a message, and the above-mentioned transport layer controller can include a transaction execution sequence management module. As shown in Figure 7, when receiving interface 1 in the receiving end receives sub-message 1 of message 1, receiving interface 2 receives sub-message 2 and sub-message 3 of message 1, and when receiving interface 3 receives message 2, receiving interface 1 The context of sub-message 1 can be established, the receiving interface 2 can establish the contexts of sub-message 2 and sub-message 3, and the receiving interface 3 can establish the context of message 2. When the transaction execution sequence management module receives multiple sub-messages transmitted by each receiving interface, it can further process the multiple sub-messages according to the message sequence numbers of the sub-messages.
结合上述对本申请发送端和接收端的介绍,下面对本申请发送端和接收端对报文传输的实现方式进一步进行介绍。Combining with the above introduction to the sending end and the receiving end of the present application, the following further introduces the method of implementing message transmission by the sending end and the receiving end of the present application.
在介绍本申请的一些实施方式之前,需要说明的是,本申请中,发送端的发送接口不仅可以用于发送报文,还可以接收来自对端的响应报文。发送端的发送接口接收响应报文的资源和发送端的接收接口接收来自对端直接发送的报文的资源不同。换句话说,虽然发送端的发送接口接收响应报文的网线和发送端的接收接口接收对端直接发送的报文的网线在物理上是相同的,但是发送端的发送接口接收响应报文的虚通道和发送端的接收接口接收对端直接发送的报文的虚通道是相互独立的,互不影响的。Before introducing some implementations of this application, it should be noted that in this application, the sending interface of the sending end can not only be used to send messages, but also receive response messages from the peer end. The sending interface of the sending end receives different resources for receiving the response message and the receiving interface of the sending end receives the resource of the message directly sent from the opposite end. In other words, although the network cable through which the sending interface of the sender receives the response message is physically the same as the network cable through which the receiving interface of the sender receives the message directly sent by the peer, the virtual channel and the virtual channel through which the sending interface receives the response message are physically the same. The virtual channels used by the receiving interface of the sending end to receive the packets directly sent by the peer end are independent of each other and do not affect each other.
类似的,接收端的接收接口不仅可以用于接收报文,还可以向对端发送响应报文。 接收端的接收接口发送响应报文的资源和接收端的发送接口直接发送的报文的资源不同。换句话说,虽然接收端的接收接口发送响应报文的网线和接收端的发送接口直接发送报文的网线在物理上是相同的,但是接收端的接收接口发送响应报文的虚通道和接收端的发送接口向对端直接发送报文的虚通道是相互独立的,互不影响的。Similarly, the receiving interface of the receiving end can not only receive messages, but also send response messages to the peer end. The resources of the response message sent by the receiving interface of the receiving end are different from the resources of the message directly sent by the sending interface of the receiving end. In other words, although the network cable through which the receiving interface of the receiving end sends the response message is physically the same as the network cable through which the sending interface of the receiving end directly sends the message, the virtual channel through which the receiving interface of the receiving end sends the response message is the same as the sending interface of the receiving end. The virtual channels that directly send packets to the peer end are independent of each other and do not affect each other.
实施例一Embodiment one
对于发送端,本申请提供一种报文传输方法,如图8所示,该方法包括以下处理流程。For the sending end, the present application provides a message transmission method, as shown in FIG. 8 , the method includes the following processing flow.
801、发送端确定发送第一报文时,根据发送端的多个发送接口的负载确定发送第一报文的第一发送接口,并根据接收端的多个接收接口的拥塞信息确定接收第一报文的第一发送接口。801. When the sending end determines to send the first message, determine the first sending interface for sending the first message according to the loads of the multiple sending interfaces at the sending end, and determine to receive the first message according to the congestion information of the multiple receiving interfaces at the receiving end The first sending interface of .
第一报文可以是上文中的消息或子消息。The first message may be the above message or sub-message.
在一些实施例中,发送端接收来自接收端发送的多个接收接口的拥塞信息,多个接收接口包括第一接收接口。例如,拥塞信息可以是接收接口的丢包率的指示信息,或报文队列长度的指示信息等,本申请不做限定。In some embodiments, the sending end receives congestion information from multiple receiving interfaces sent by the receiving end, and the multiple receiving interfaces include the first receiving interface. For example, the congestion information may be indication information of a packet loss rate of a receiving interface, or indication information of a packet queue length, etc., which are not limited in this application.
这样,发送端不仅可以根据发送端的多个发送接口的负载状态确定发送第一报文的第一发送接口,还可以根据多个接收接口的拥塞信息确定接收第一报文的第一接收接口。In this way, the sending end can not only determine the first sending interface for sending the first packet according to the load status of the multiple sending interfaces of the sending end, but also determine the first receiving interface for receiving the first packet according to the congestion information of the multiple receiving interfaces.
在一些实施例中,发送端中的拥塞控制模块可根据预设的算法从多个接收接口中确定第一接收接口。本申请对算法的实现不做限定。发送端中的各个发送接口可以将发送接口自身的负载状态发送给任务调度模块,任务调度模块可以根据负载状态从多个发送接口中确定第一发送接口。这里根据负载状态确定第一发送接口的方式也不做限定,例如负载状态可以是各个发送接口当前的报文队列长度的指示信息,或丢包率的指示信息等,本申请不做限定。任务调度模块再指定第一发送接口发送第一报文。In some embodiments, the congestion control module in the sending end may determine the first receiving interface from multiple receiving interfaces according to a preset algorithm. This application does not limit the implementation of the algorithm. Each sending interface in the sending end can send the load status of the sending interface itself to the task scheduling module, and the task scheduling module can determine the first sending interface from the multiple sending interfaces according to the load status. Here, the method of determining the first sending interface according to the load state is not limited. For example, the load state may be indication information of the current packet queue length of each sending interface, or indication information of packet loss rate, etc., which are not limited in this application. The task scheduling module then designates the first sending interface to send the first message.
802、发送端通过第一发送接口发送第一报文,第一报文包括第一发送接口的标识和第一接收接口的标识。802. The sending end sends a first packet through the first sending interface, where the first packet includes an identifier of the first sending interface and an identifier of the first receiving interface.
发送端通过第一发送接口发送第一报文时,可以在第一报文中增加域段,用于记录发送第一报文的第一发送接口和第一接收接口的标识。When the sending end sends the first message through the first sending interface, a field segment may be added to the first message to record the identifiers of the first sending interface and the first receiving interface that send the first message.
由此,本申请可以赋予发送端灵活选择报文的发送接口以及接收接口的能力,可充分利用发送端和接收端进行多接口协同,提升带宽。Therefore, this application can endow the sending end with the ability to flexibly select the sending interface and receiving interface of the message, and can make full use of the multi-interface coordination between the sending end and the receiving end to increase bandwidth.
实施例二Embodiment two
对于接收端,本申请提供一种报文传输方法,如图9所示,该方法包括以下处理流程。For the receiving end, the present application provides a message transmission method, as shown in FIG. 9 , the method includes the following processing flow.
901、接收端向发送端发送多个接收接口的拥塞信息,多个接收接口的拥塞信息用于发送端确定接收端接收第一报文的第一接收接口。901. The receiving end sends congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine a first receiving interface on which the receiving end receives the first packet.
这里的拥塞信息可以参建步骤801中的说明。The congestion information here can refer to the description in step 801 .
当发送端确定了发送第一报文的第一接收接口后,在可靠传输中,发送端可以通过控制面的消息向接收端发送接收第一报文的第一接收接口的指示信息,以便接收端可以在第一接收接口接收第一报文。After the sending end has determined the first receiving interface for sending the first message, in reliable transmission, the sending end can send the indication information of the first receiving interface for receiving the first message to the receiving end through a message on the control plane, so as to receive The end may receive the first packet on the first receiving interface.
902、接收端通过第一接收接口接收第一报文,第一报文包括发送端发送第一报文 的第一发送接口的标识和第一接收接口的标识。902. The receiving end receives the first packet through the first receiving interface, and the first packet includes the identifier of the first sending interface through which the sending end sends the first packet and the identifier of the first receiving interface.
对于接收端,第一报文可通过第一接收接口接收,同理,当发送端确定接收第二报文的接收接口为第二接收接口时,接收端可通过第二接收接口接收第二报文。For the receiving end, the first message can be received through the first receiving interface. Similarly, when the sending end determines that the receiving interface for receiving the second message is the second receiving interface, the receiving end can receive the second message through the second receiving interface. arts.
这样,对于接收端,也可以实现接收报文的接收接口的灵活选择,充分利用接收端的多接口协同,提升带宽。In this way, for the receiving end, the flexible selection of the receiving interface for receiving the message can also be realized, and the multi-interface coordination of the receiving end can be fully utilized to increase the bandwidth.
实施例三Embodiment Three
由于本申请中发送端在每发送报文时,可灵活选择发送接口和接收接口,考虑到报文也存在发送失败的情况,发送端在发送原始报文的重传报文时,可以在发送原始报文的发送接口继续发送重传报文,也可以根据当前多个发送接口的负载状态重新确定发送重传报文的发送接口。类似的,发送端也可在发送重传报文前,确定接收重传报文的接收接口,接收重传报文的接收接口可能与接收原始报文的接收接口相同或不同。Since the sending end in this application can flexibly select the sending interface and the receiving interface each time a message is sent, and considering that there is also a failure to send the message, when the sending end sends the retransmission message of the original message, it can be sent The sending interface of the original message continues to send the retransmission message, and may also re-determine the sending interface for sending the retransmission message according to the current load status of multiple sending interfaces. Similarly, before sending the retransmission message, the sender can also determine the receiving interface for receiving the retransmission message. The receiving interface for receiving the retransmission message may be the same as or different from the receiving interface for receiving the original message.
通常,发送端如果未在规定的时间段内接收到报文的ACK报文,发送端认为报文发送失败,继续发送报文的重传报文。但是,报文的原始报文也可能并未丢包,只是发送端未在规定的时间段内接收到报文的ACK报文而已,这种情况下,对于接收端,接收端有可能在一个接收接口先接收到报文的原始报文,也可能在一个接收接口先接收到同一报文的重传报文。本着报文在接收端最多只能被处理一次的原则,如果原始报文先于重传报文到达接收端,接收端就只处理原始报文;如果一个重传报文先于原始报文到达接收端,接收端就只处理这一个重传报文,以避免同一个报文在多个接收接口被重复处理。Generally, if the sending end does not receive the ACK message of the message within the specified time period, the sending end considers that the sending of the message fails, and continues to send the retransmission message of the message. However, the original message of the message may not be lost, but the sending end did not receive the ACK message of the message within the specified time period. In this case, for the receiving end, the receiving end may be in a The receiving interface receives the original message of the message first, and it is also possible that a retransmission message of the same message is received first on a receiving interface. Based on the principle that a message can only be processed once at the receiving end, if the original message arrives at the receiving end before the retransmitted message, the receiving end only processes the original message; if a retransmitted message arrives at the receiving end before the original message After arriving at the receiving end, the receiving end only processes this retransmission message to avoid repeated processing of the same message on multiple receiving interfaces.
由此,本申请提供一种报文传输方法,假设发送端发送同一报文的原始报文和重传报文的发送接口相同时,如图10所示,该方法包括以下流程。Therefore, the present application provides a message transmission method, assuming that the sender sends the original message and the retransmission message of the same message through the same sending interface, as shown in FIG. 10 , the method includes the following process.
101、发送端在第一发送接口T1发送第一报文。101. The sending end sends the first packet on the first sending interface T1.
第一报文包括发送端的第一发送接口T1的标识和接收端的第一接收接口R1的标识。The first message includes the identifier of the first sending interface T1 of the sending end and the identifier of the first receiving interface R1 of the receiving end.
本实施例中以第一报文为原始报文为例进行说明。In this embodiment, description is made by taking the first packet as an original packet as an example.
102、发送端确定发送第一报文失败时,根据多个接收接口的拥塞信息确定接收端接收第一重传报文的第二接收接口R2,第一重传报文为第一报文的重复报文。102. When the sending end determines that sending the first message fails, it determines the second receiving interface R2 on which the receiving end receives the first retransmission message according to the congestion information of multiple receiving interfaces, and the first retransmission message is the first message of the first message. Duplicate message.
如果发送端未在规定的时间内接收到第一报文的ACK报文,发送端确定发送第一报文失败。发送端在发送第一报文的重复报文,即第一重传报文之前,再次根据多个接收接口的拥塞信息确定接收第一重传报文的第二接收接口R2。第二接收接口R2可能与第一接收接口R1相同,也可能不同。本实施例中,R2和R1不同。If the sending end does not receive the ACK message of the first message within the specified time, the sending end determines that sending the first message fails. Before sending the duplicate message of the first message, that is, the first retransmission message, the sending end determines the second receiving interface R2 for receiving the first retransmission message again according to the congestion information of multiple receiving interfaces. The second receiving interface R2 may be the same as or different from the first receiving interface R1. In this embodiment, R2 and R1 are different.
103、发送端通过第一发送接口T1发送第一重传报文,第一重传报文包括第一发送接口T1的标识、第二接收接口R2的标识以及重复报文的标记。103. The sending end sends a first retransmission message through the first sending interface T1, where the first retransmission message includes an identifier of the first sending interface T1, an identifier of the second receiving interface R2, and a marker of the repeated message.
重复报文的标记用于指示第一重传报文为重传报文。通常,第一重传报文中也会携带原始报文,即第一报文的序号M,M为大于或等于0的整数,这样接收端可确定第一重传报文为序号为M的第一报文的重传报文。The mark of the repeated packet is used to indicate that the first retransmitted packet is a retransmitted packet. Usually, the first retransmission message will also carry the original message, that is, the sequence number M of the first message, and M is an integer greater than or equal to 0, so that the receiving end can determine that the first retransmission message is the one with the sequence number M. A retransmission packet of the first packet.
而后,第一重传报文晚于第一报文到达接收端时,执行步骤104,或,第一报文晚于第一重传报文到达接收端时,执行步骤107。Then, when the first retransmitted message arrives at the receiving end later than the first message, step 104 is performed, or when the first message arrives at the receiving end later than the first retransmitted message, step 107 is performed.
104、接收端反馈第一报文的第一响应报文,第一响应报文包括第一发送接口T1的标识。104. The receiving end feeds back a first response packet of the first packet, where the first response packet includes the identifier of the first sending interface T1.
相应地,发送端通过第二发送接口T2接收第一报文的第一响应报文,第二发送接口T2可能与第一发送接口T1相同,也可能不同。本实施例中,T2和T1不同。Correspondingly, the sending end receives the first response message of the first message through the second sending interface T2, and the second sending interface T2 may be the same as or different from the first sending interface T1. In this embodiment, T2 and T1 are different.
接收端可在发送第一响应报文之前,通过控制面信令向发送端发送第二发送接口T2的标识,以便发送端通过第二发送接口T2接收第一响应报文。Before sending the first response message, the receiving end may send the identifier of the second sending interface T2 to the sending end through control plane signaling, so that the sending end receives the first response message through the second sending interface T2.
105、第二发送接口T2与第一发送接口T1不同时,发送端控制第二发送接口T2向第一发送接口T1发送第一响应报文。105. When the second sending interface T2 is different from the first sending interface T1, the sending end controls the second sending interface T2 to send the first response packet to the first sending interface T1.
也就是说,如果发送第一重传报文的第二发送接口T2与发送原始报文,即第一报文的第一发送接口T1不同时,发送端需通过第二发送接口T2将第一响应报文的发送给第一发送接口T1。That is to say, if the second sending interface T2 for sending the first retransmission message is different from the first sending interface T1 for sending the original message, that is, the first sending interface T1 for sending the first message, the sending end needs to transmit the first sending interface T2 through the second sending interface T2. The response message is sent to the first sending interface T1.
106、发送端控制第一发送接口T1向第一接收接口R1发送第一通知消息,第一通知消息用于指示第一接收接口R1释放第一报文的上下文信息。106. The sending end controls the first sending interface T1 to send a first notification message to the first receiving interface R1, where the first notification message is used to instruct the first receiving interface R1 to release the context information of the first packet.
由于第一接收接口R1在接收第一报文时,保存有第一报文的上下文信息,如果第一发送接口T1在接收到第一响应报文时,发送端确定第一报文发送成功,发送端便可控制第一发送接口T1通知第一接收接口R1释放第一报文的上下文信息。Since the first receiving interface R1 stores the context information of the first message when receiving the first message, if the first sending interface T1 receives the first response message, the sending end determines that the first message is sent successfully, The sending end can then control the first sending interface T1 to notify the first receiving interface R1 to release the context information of the first packet.
107、接收端反馈第一重传报文的第一重传响应报文,第一重传响应报文包括第一发送接口T1的标识。107. The receiving end feeds back a first retransmission response message of the first retransmission message, where the first retransmission response message includes the identifier of the first sending interface T1.
相应地,发送端通过第三发送接口T0接收该第一重传响应报文,第三发送接口T0可能与第一发送接口T1相同,也可能不同。本实施例中,T0和T1不同。Correspondingly, the sending end receives the first retransmission response message through the third sending interface T0, and the third sending interface T0 may be the same as or different from the first sending interface T1. In this embodiment, T0 and T1 are different.
接收端可在发送第一重传响应报文之前,通过控制面信令向发送端发送第三发送接口T0的标识,以便发送端通过第三发送接口T0接收第一重传响应报文。Before sending the first retransmission response message, the receiving end may send the identifier of the third sending interface T0 to the sending end through control plane signaling, so that the sending end receives the first retransmission response message through the third sending interface T0.
108、第三发送接口T0与第一发送接口和T1不同时,发送端控制第三发送接口T0向第一发送接口T1发送第一重传响应报文。108. When the third sending interface T0 is different from the first sending interface T1, the sending end controls the third sending interface T0 to send the first retransmission response packet to the first sending interface T1.
也就是说,如果发送第一重传报文的第三发送接口T0与发送原始报文,即第一报文的第一发送接口T1不同时,发送端需通过第三发送接口T0将第一重传响应报文的发送给第一发送接口T1。That is to say, if the third sending interface T0 for sending the first retransmission message is different from the first sending interface T1 for sending the original message, that is, the first sending interface T1 for the first message, the sending end needs to transmit the first sending interface T0 through the third sending interface T0. The retransmission response message is sent to the first sending interface T1.
109、发送端控制第一发送接口T1向第二接收接口R2发送第二通知消息,第二通知消息用于指示第二接收接口R2释放第一重传报文的上下文信息。109. The sending end controls the first sending interface T1 to send a second notification message to the second receiving interface R2, where the second notification message is used to instruct the second receiving interface R2 to release the context information of the first retransmission packet.
由于第一接收接口R1在接收第一重传报文时,保存有第一重传报文的上下文信息,如果第一发送接口T1在接收到第一响应报文时,发送端确定第一重传报文发送成功,发送端便可控制第一发送接口T1通知第二接收接口R2释放第一重传报文的上下文信息。Since the first receiving interface R1 saves the context information of the first retransmission message when receiving the first retransmission message, if the first sending interface T1 receives the first response message, the sending end determines that the first retransmission message After the retransmission message is successfully sent, the sender can control the first sending interface T1 to notify the second receiving interface R2 to release the context information of the first retransmission message.
由此,对于发送端和接收端,可以在发送报文和接收报文时,采用多接口协同机制,可让发送端的所有发送接口和接收端的所有接收接口同时为单个报文服务,达到充分利用设备带宽的能力。Therefore, for the sending end and the receiving end, a multi-interface coordination mechanism can be adopted when sending and receiving messages, so that all sending interfaces of the sending end and all receiving interfaces of the receiving end can serve a single message at the same time, so as to achieve full utilization The capacity of the device bandwidth.
实施例四Embodiment four
上文中已经阐述,不管发送端发送的报文是原始报文还是重传报文,在可靠传输的要求下,同一个报文最多只能处理一次。在接收端多接口协同的场景下,重传报文 可能从接收端的任一个接收接口传入,当接收端确定从第一接收接口接收到第一报文时,确定多个接收接口除第一接收接口以外的其他接收接口是否已接收到第一报文的重复报文。这里的第一报文可能是原始报文,也可能是重传报文。如果接收端确定其他接收接口均未接收到第一报文的重复报文时,接收端控制第一接收接口对第一报文进行处理;如果接收端确定其他接收接口中的至少一个接收接口已接收到第一报文的重复报文时,接收端控制第一接收接口丢弃第一报文。也就是说,接收端的接收接口在每接收到一个报文时,都需要判断本接收接口是否可以处理报文,以避免报文被重复处理。As explained above, regardless of whether the message sent by the sender is an original message or a retransmitted message, under the requirements of reliable transmission, the same message can only be processed once at most. In the scenario of multi-interface coordination at the receiving end, the retransmitted message may come in from any receiving interface of the receiving end. When the receiving end determines that the first message is received from the first receiving interface, it determines that the Whether other receiving interfaces other than the receiving interface have received duplicate packets of the first packet. The first packet here may be an original packet or a retransmission packet. If the receiving end determines that none of the other receiving interfaces has received the repeated message of the first message, the receiving end controls the first receiving interface to process the first message; if the receiving end determines that at least one receiving interface in the other receiving interfaces has received When receiving a duplicate packet of the first packet, the receiving end controls the first receiving interface to discard the first packet. That is to say, each time the receiving interface of the receiving end receives a message, it needs to judge whether the receiving interface can process the message, so as to avoid repeated processing of the message.
对此,在接收端,提供一种注册机制,该注册机制针对重传报文,即当接收端的一个接收接口在接收到重传报文时,需向其他接收接口请求注册,如果确定某个序号的报文已经被注册,则该接收接口不能处理该重传报文。或者,当一个接收接口在接收到原始报文时,如果该接收接口确定与该原始报文相同内容的重传报文已经被注册,该原始报文也会按照重复报文处理,即不处理该原始报文。In this regard, at the receiving end, a registration mechanism is provided. This registration mechanism is aimed at retransmission messages, that is, when a receiving interface of the receiving end receives a retransmission message, it needs to request registration from other receiving interfaces. If a certain If the packet with the sequence number has been registered, the receiving interface cannot process the retransmitted packet. Or, when a receiving interface receives the original message, if the receiving interface determines that a retransmission message with the same content as the original message has been registered, the original message will also be processed as a repeated message, that is, it will not be processed the original message.
下面针对多种情况:重传报文晚于原始报文到达接收端的情况、重传报文早于原始报文到达接收端的情况以及多个相同报文内容的重传报文到达接收端的情况的处理流程进行举例说明。The following is for a variety of situations: the case where the retransmitted message arrives at the receiving end later than the original message, the case where the retransmitted message arrives at the receiving end earlier than the original message, and the case where multiple retransmitted messages with the same message content arrive at the receiving end The processing flow is illustrated with an example.
情况一case one
先对重传报文晚于原始报文到达接收端的情况的处理流程进行说明。如图11所示,该流程可如下说明。First, the processing flow of the case where the retransmitted message arrives at the receiving end later than the original message is described. As shown in Fig. 11, the flow can be described as follows.
111、发送端通过第一发送接口T1发送第一报文,第一发送接口T1未在规定时间内接收到第一报文的响应报文,确定需重传第一报文。111. The sending end sends the first packet through the first sending interface T1, and the first sending interface T1 does not receive the response packet of the first packet within a specified time, and determines that the first packet needs to be retransmitted.
情况一中的第一报文为原始报文。The first packet in case 1 is an original packet.
例如第一发送接口T1未在规定时间内接收到第一报文的ACK报文,确定第一报文发送失败。For example, if the first sending interface T1 does not receive the ACK message of the first message within a specified time, it is determined that the sending of the first message fails.
112、接收端的第一接收接口R1接收到第一报文,接收端确定第一接收接口R1是否接收到其他接收接口的第一注册请求,第一注册请求用于请求对第一重传报文进行处理。如果确定第一接收接口R1未接收到其他接收接口的第一注册请求,接收端在第一接收接口R1处理第一报文。112. The first receiving interface R1 of the receiving end receives the first message, and the receiving end determines whether the first receiving interface R1 receives the first registration request from other receiving interfaces, and the first registration request is used to request retransmission of the first message to process. If it is determined that the first receiving interface R1 has not received the first registration request from other receiving interfaces, the receiving end processes the first packet at the first receiving interface R1.
第一重传报文为第一报文的重传报文。The first retransmission message is a retransmission message of the first message.
虽然步骤111中,发送端确定第一报文发送失败,但是有可能第一报文只是并未按时到达接收端,晚到了接收端而已。如果发送端重传第一报文,接收端可能发生报文在不同的接收接口重复处理的情况。因此,第一接收接口R1在接收到一个原始报文,即这里的第一报文时,需要确定其他接收接口中是否存在已经接收到第一重传报文的接收接口,这里通过确定第一接收接口R1是否接收到其他接收接口的第一注册请求确定。Although in step 111, the sending end determines that the sending of the first message has failed, it is possible that the first message just did not arrive at the receiving end on time, and arrived at the receiving end late. If the sending end retransmits the first message, the receiving end may experience repeated processing of the message on different receiving interfaces. Therefore, when the first receiving interface R1 receives an original message, that is, the first message here, it needs to determine whether there is a receiving interface that has received the first retransmission message among other receiving interfaces. Here, by determining the first It is determined whether the receiving interface R1 has received the first registration request from other receiving interfaces.
需理解,如果确定第一接收接口R1已接收到其他接收接口中的至少一个接收接口发送的第一注册请求,说明第一报文晚于第一报文的重传报文到达接收端,具体将在情况二中介绍。It should be understood that if it is determined that the first receiving interface R1 has received the first registration request sent by at least one of the other receiving interfaces, it means that the retransmission message of the first message arrives at the receiving end later than the first message, specifically will be introduced in case two.
113、接收端的第二接收接口R2接收到第一重传报文,控制第二接收接口R2向 其他接收接口(R1和R0)发送第一注册请求,以确定第二接收接口R2是否可处理第一重传报文。113. The second receiving interface R2 of the receiving end receives the first retransmission message, and controls the second receiving interface R2 to send the first registration request to other receiving interfaces (R1 and R0), so as to determine whether the second receiving interface R2 can handle the first registration request. A retransmission message.
假设对接收端共3个接收接口:第一接收接口R1、第二接收接口R2和第三接收接口R0。当第二接收接口R2接收到第一重传报文时,第二接收接口R2需向第一接收接口R1和第三接收接口R0发送第一注册请求,确定第二接收接口R2是否可以处理第一重传报文。It is assumed that there are three receiving interfaces at the receiving end: the first receiving interface R1, the second receiving interface R2, and the third receiving interface R0. When the second receiving interface R2 receives the first retransmission message, the second receiving interface R2 needs to send the first registration request to the first receiving interface R1 and the third receiving interface R0 to determine whether the second receiving interface R2 can process the first retransmission message. A retransmission message.
114、接收端确定第三接收接口R0未处理第一报文时,控制第三接收接口R0向第二接收接口R2反馈注册成功响应,并记录注册状态,该注册状态指示第二接收接口R2可处理第一重传报文。114. When the receiving end determines that the third receiving interface R0 has not processed the first message, control the third receiving interface R0 to feed back a registration success response to the second receiving interface R2, and record the registration status, which indicates that the second receiving interface R2 can Process the first retransmission message.
由于第三接收接口未接收到第一报文,第三接收接口向第二接收接口R2反馈注册成功响应。第三接收接口R0记录的注册状态相当于第三接收接口给了第二接收接口R2可以处理第一重传报文的权限。Since the third receiving interface does not receive the first packet, the third receiving interface feeds back a registration success response to the second receiving interface R2. The registration status recorded by the third receiving interface R0 is equivalent to that the third receiving interface gives the second receiving interface R2 the right to process the first retransmission message.
115、接收端确定第一接收接口R1正在处理第一报文,控制第一接收接口R0向第二接收接口R2反馈注册失败响应。115. The receiving end determines that the first receiving interface R1 is processing the first packet, and controls the first receiving interface R0 to feed back a registration failure response to the second receiving interface R2.
也就是说,接收端确定第一接收接口R1在接收到第一报文后,接收到其他接收接口中的第二接收接口R2发送的第一注册请求时,接收端控制第一接收接口R1向第二接收接口R2发送第一注册响应,第一注册响应用于指示第二接收接口R2注册失败。That is to say, when the receiving end determines that the first receiving interface R1 receives the first registration request sent by the second receiving interface R2 among the other receiving interfaces after receiving the first message, the receiving end controls the first receiving interface R1 to The second receiving interface R2 sends a first registration response, where the first registration response is used to indicate that the second receiving interface R2 fails to register.
也就相当于,第一接收接口R1并未给第二接收接口R2处理第一重传报文的权限。That is to say, the first receiving interface R1 does not give the second receiving interface R2 the right to process the first retransmission message.
116、接收端的第二接收接口R2根据第一接收接口R1和第三接收接口反馈的注册响应,确定第二接收接口R2不需要处理第一重传报文,并控制第二接收接口R2向第三接收接口R0发送注册清除请求。116. According to the registration responses fed back by the first receiving interface R1 and the third receiving interface, the second receiving interface R2 of the receiving end determines that the second receiving interface R2 does not need to process the first retransmission message, and controls the second receiving interface R2 to send 3. The receiving interface R0 sends a registration clear request.
也就是说,只要第二接收接口R2接收到任一个其他接收接口反馈的注册失败的响应,第二接收接口R2可识别出第一重传报文不需要在本接收接口处理。That is to say, as long as the second receiving interface R2 receives a registration failure response fed back by any other receiving interface, the second receiving interface R2 can recognize that the first retransmitted message does not need to be processed by this receiving interface.
由于之前第三接收接口R0还向第二接收接口R2反馈了注册成功的响应,当第二接收接口R2确定不需要处理第一重传报文时,第二接收接口R2还需向第三接收接口R0发送注册清除请求,以便第三接收接口R0删除记录的注册状态。Since the third receiving interface R0 also fed back a successful registration response to the second receiving interface R2 before, when the second receiving interface R2 determines that it does not need to process the first retransmission message, the second receiving interface R2 also needs to report to the third receiving interface The interface R0 sends a registration clear request, so that the third receiving interface R0 deletes the registered registration state.
117、接收端的第一接收接口R1在成功接收到第一报文后,向发送端的第三发送接口T0发送第二报文,第二报文用于指示第一报文已接收到。117. After successfully receiving the first packet, the first receiving interface R1 of the receiving end sends a second packet to the third sending interface T0 of the sending end, where the second packet is used to indicate that the first packet has been received.
通过接收端接口间的通信,可知在第一报文最先到达接收端的第一接收接口R1时,第一接收接口R1最终为处理第一报文的唯一一个接口。当第一接收接口R1成功接收到第一报文后,确定需返回第一报文被成功接收的结果,即这里的第二报文。在返回第二报文前,接收端与发送端类似的,也可以按照发送端的多个接收接口的负载状态确定接收第二报文的接收接口。假设确定接收第二报文的接口是第三发送接口T0,第二报文中可携带发送端当时发送第一报文的第一发送接口的标识。Through the communication between the interfaces of the receiving end, it can be known that when the first message first arrives at the first receiving interface R1 of the receiving end, the first receiving interface R1 is finally the only interface for processing the first message. After the first receiving interface R1 successfully receives the first packet, it is determined that the result of the successful reception of the first packet needs to be returned, that is, the second packet here. Before returning the second message, the receiving end, similar to the sending end, may also determine the receiving interface for receiving the second message according to the load status of multiple receiving interfaces of the sending end. Assuming that the interface determined to receive the second packet is the third sending interface T0, the second packet may carry the identifier of the first sending interface that the sending end sent the first packet at that time.
118、发送端的第三发送接口T0向第一发送接口T1发送第一报文被成功接收的指示,发送端控制第一发送接口T1向第一接收接口R1发送释放处理资源的消息。118. The third sending interface T0 of the sending end sends an indication that the first packet is successfully received to the first sending interface T1, and the sending end controls the first sending interface T1 to send a message for releasing processing resources to the first receiving interface R1.
第一接收接口R1会保存有处理第一报文的上下文信息,当第一接收接口R1接收到释放处理资源的消息时,第一接收接口R1可清除第一报文的上下文信息。The first receiving interface R1 stores context information for processing the first packet, and when the first receiving interface R1 receives a message for releasing processing resources, the first receiving interface R1 may clear the context information of the first packet.
由此,当第一报文的重传报文晚于原始报文到达接收端时,本申请提供的注册机 制可以有效识别出重传报文为重复报文,重复的报文将不能在接收端口处理,以避免同一报文在不同的接收接口被重复处理。Therefore, when the retransmitted message of the first message arrives at the receiving end later than the original message, the registration mechanism provided by this application can effectively identify the retransmitted message as a repeated message, and the repeated message will not be received Port processing to avoid repeated processing of the same packet on different receiving interfaces.
情况二case two
对重传报文早于原始报文到达接收端的情况的处理流程进行说明。如图12所示,该流程可如下说明。Describe the processing flow for the case where the retransmitted packet arrives at the receiving end earlier than the original packet. As shown in Fig. 12, the flow can be described as follows.
121、发送端通过第一发送接口T1发送第一报文,第一报文携带第一发送接口T1的标识和接收端的第二接收接口R2的标识。121. The sending end sends a first packet through the first sending interface T1, and the first packet carries the identifier of the first sending interface T1 and the identifier of the second receiving interface R2 of the receiving end.
发送端在发送第一报文之前,可以通过控制面信令向接收端发送第二接收接口R2用于接收第一报文的事件。Before sending the first message, the sending end may send an event that the second receiving interface R2 is used to receive the first message to the receiving end through control plane signaling.
122、发送端确定在规定时间内未接收到第一报文的ACK报文,发送端通过第一发送端口T1发送第一重传报文,第一重传报文是第一报文的重传报文。122. The sending end determines that the ACK message of the first message has not been received within the specified time, and the sending end sends the first retransmission message through the first sending port T1. The first retransmission message is a retransmission message of the first message. Send message.
第一重传报文包括第一报文的报文序号,也包括第一发送接口T1的标识和第一接收接口R1的标识。The first retransmission message includes the message sequence number of the first message, and also includes the identifier of the first sending interface T1 and the identifier of the first receiving interface R1.
当发送端通过拥塞信息确定的接收第一报文接收接口为第二接收接口R2,接收第一重传报文的接收接口为第一接收接口R1时,继续执行步骤123。When the sending end determines through the congestion information that the receiving interface for receiving the first message is the second receiving interface R2, and that the receiving interface for receiving the first retransmitted message is the first receiving interface R1, proceed to step 123.
123、接收端在第一接收接口R1接收到第一重传报文。123. The receiving end receives the first retransmission packet on the first receiving interface R1.
即第一重传报文早于第一报文到达接收端。That is, the first retransmitted packet arrives at the receiving end earlier than the first packet.
124、接收端控制第一接收接口R1分别向第二接收接口R2和第三接收接口R0发送第一注册请求,第一注册请求用于请求对第一重传报文进行处理。124. The receiving end controls the first receiving interface R1 to send a first registration request to the second receiving interface R2 and the third receiving interface R0 respectively, where the first registration request is used to request processing of the first retransmission packet.
为了避免同一个报文在不同的接收接口被重复处理,当第一接收接口R1接收到第一重传报文时,接收端控制第一接收接口R1向其他接收接口中的每个接收接口(R0和R3)发送第一注册请求,第一注册请求用于请求对第一重传报文进行处理。In order to prevent the same message from being repeatedly processed on different receiving interfaces, when the first receiving interface R1 receives the first retransmission message, the receiving end controls the first receiving interface R1 to send a message to each receiving interface ( R0 and R3) send a first registration request, where the first registration request is used to request processing of the first retransmission message.
125、接收端确定第二接收接口R2并未处理第一重传报文的重复报文,控制第二接收接口R2向第一接收接口R1反馈注册成功响应;控制端确定第三接收接口R0也并未处理第一重传报文的重复报文,控制第三接收接口R0向第一接收接口R1反馈注册成功响应。125. The receiving end determines that the second receiving interface R2 has not processed the duplicate message of the first retransmission message, and controls the second receiving interface R2 to feed back a successful registration response to the first receiving interface R1; the control end determines that the third receiving interface R0 also The repeated message of the first retransmitted message is not processed, and the third receiving interface R0 is controlled to feed back a registration success response to the first receiving interface R1.
相当于,第一接收接口R1接收到了接收端其他所有接收接口的注册成功响应,第一接收接口R1得到了处理第一重传报文的权限。作为第二接收接口R2和第三接收接口R0来说,处理第一重传报文的权限已经被注册,第二接收接口R2和第三接收接口R0不再有处理第一重传报文以及第一重传报文的重复报文的权限,第二接收接口R2和第三接收接口R0并记录第一重传报文为已被注册状态。It is equivalent to that the first receiving interface R1 has received the registration success responses of all other receiving interfaces of the receiving end, and the first receiving interface R1 has obtained the authority to process the first retransmission message. For the second receiving interface R2 and the third receiving interface R0, the authority to process the first retransmission message has been registered, and the second receiving interface R2 and the third receiving interface R0 no longer have the right to process the first retransmission message and For the permission of the duplicate message of the first retransmission message, the second receiving interface R2 and the third receiving interface R0 record the first retransmission message as being registered.
126、接收端确定第二接收接口R2接收到第一报文时,控制第二接收接口R2丢弃第一报文。126. When determining that the second receiving interface R2 has received the first packet, the receiving end controls the second receiving interface R2 to discard the first packet.
也就是说,虽然步骤122中,发送端确定第一报文发送失败,但是实际上第一报文只是晚于第一重传报文晚到达接收端而已。That is to say, although in step 122, the sending end determines that the sending of the first packet fails, in fact the first packet only arrives at the receiving end later than the first retransmitted packet.
如果接收端确定接收端的第二接收接口R2已接收到一个第一注册请求后,相当于第二接收接口R2已经向第一接收接口R1给了处理第一重传报文的权限。当第二接收接口R2又接收到第一报文,接收端控制第二接收接口R2丢弃第一报文。If the receiving end determines that the second receiving interface R2 of the receiving end has received a first registration request, it means that the second receiving interface R2 has given the first receiving interface R1 the right to process the first retransmission message. When the second receiving interface R2 receives the first packet again, the receiving end controls the second receiving interface R2 to discard the first packet.
127、接收端确定第一接收接口R1在处理完第一重传报文时,向发送端的第一发 送接口T1反馈第二报文,第二报文指示第一接收接口R1已经接收到第一重传报文。127. The receiving end determines that the first receiving interface R1 feeds back the second message to the first sending interface T1 of the sending end when it finishes processing the first retransmission message, and the second message indicates that the first receiving interface R1 has received the first retransmission message. Retransmit the message.
128、发送端的第一发送接口T1确定第一重传报文已被成功接收时,发送端控制第一发送接口T1向第一接收接口R1发送释放处理资源的指示。128. When the first sending interface T1 of the sending end determines that the first retransmission packet has been successfully received, the sending end controls the first sending interface T1 to send an indication of releasing processing resources to the first receiving interface R1.
第一接收接口R1在处理了第一重传报文时,会保存第一重传报文的上下文。当第一接收接口R1在接收到释放处理资源的指示时,可删除第一接收接口R1保存的第一重传报文的上下文。When the first receiving interface R1 processes the first retransmission message, it will save the context of the first retransmission message. When the first receiving interface R1 receives the instruction to release processing resources, it may delete the context of the first retransmission packet saved by the first receiving interface R1.
129、接收端控制第一接收接口R1向第二接收接口R2和第三接收接口R0发送注册清除消息,以指示第二接收接口R2和第三接收接口R0清除第一重传报文的注册状态。129. The receiving end controls the first receiving interface R1 to send a registration clear message to the second receiving interface R2 and the third receiving interface R0 to instruct the second receiving interface R2 and the third receiving interface R0 to clear the registration status of the first retransmission message .
也就相当于,第二接收接口R2和第三接收接口R0将在步骤125中记录的注册状态删除。That is to say, the second receiving interface R2 and the third receiving interface R0 delete the registration status recorded in step 125 .
由此,本申请中,当同一报文的重传报文先于原始报文到达接收端时,接收端只能处理一个重传报文,后到的原始报文被看作重复报文不被处理,避免同一报文被重复处理。Therefore, in this application, when the retransmitted message of the same message arrives at the receiving end before the original message, the receiving end can only process one retransmitted message, and the original message that arrives later is regarded as a repeated message and cannot be processed to avoid repeated processing of the same message.
情况三Case three
对发送端发送同一报文的多个重传报文到达接收端的情况的处理流程进行说明。The processing flow of the case where multiple retransmission packets of the same packet sent by the sending end arrive at the receiving end will be described.
在本申请中,如果同一报文的多个重传报文到达接收端的多个接收接口,为了防止多个重传报文在多个接收接口发生冲突,本申请提供一种避免同一报文的多个重传报文冲突的处理机制,该机制满足以下所有条件:In this application, if multiple retransmitted messages of the same message arrive at multiple receiving interfaces of the receiving end, in order to prevent multiple retransmitted messages from colliding at multiple receiving interfaces, this application provides a method to avoid the same message A mechanism for handling conflicts between multiple retransmitted packets, which meets all of the following conditions:
1)在一个接收接口已经获得一个重传报文的基础上,编号小的接收接口可以直接拒绝编号大的接收接口进行该重传报文的注册;1) On the basis that a receiving interface has obtained a retransmission message, the receiving interface with a small number can directly reject the receiving interface with a large number to register the retransmission message;
2)在一个接收接口已经获得一个重传报文的基础上,编号大的接收接口必须收集完所有其他接收接口的注册响应后,才能向编号小的接收接口发送注册响应;2) On the basis that a receiving interface has obtained a retransmission message, the receiving interface with a large number must collect the registration responses of all other receiving interfaces before sending a registration response to the receiving interface with a small number;
3)编号大的接收接口,需将最终获得的有效注册结果(包括注册成功响应),返回给编号小的接收接口。3) The receiving interface with a large number needs to return the finally obtained valid registration result (including a successful registration response) to the receiving interface with a small number.
基于上述机制,如图13所示,该流程可如下说明。Based on the above mechanism, as shown in FIG. 13 , the process can be described as follows.
131、发送端确定第一报文发送失败,通过第一发送接口R1向接收端发送第一重传报文,第一重传报文包括第一发送接口R1的标识和第三接收接口R0的标识。131. The sending end determines that the sending of the first message fails, and sends the first retransmission message to the receiving end through the first sending interface R1, and the first retransmission message includes the identifier of the first sending interface R1 and the ID of the third receiving interface R0 logo.
第一重传报文为第一报文的重传报文。The first retransmission message is a retransmission message of the first message.
本实施例中是在原始报文,即第一报文发送失败且并未到达接收端的基础上阐述的。This embodiment is described on the basis that the original message, that is, the first message fails to be sent and does not reach the receiving end.
当第一报文发送失败时,发送端可通过接收端的接收接口的拥塞信息确定接收第一重传报文的接收接口为第三接收接口R0时,在第一重传报文中携带第一发送接口R1的标识和第三接收接口R0的标识。When the sending of the first message fails, the sending end can determine that the receiving interface for receiving the first retransmission message is the third receiving interface R0 through the congestion information of the receiving interface of the receiving end, and carry the first retransmission message in the first retransmission message. An identifier of the sending interface R1 and an identifier of the third receiving interface R0.
132、发送端确定第一重传报文发送失败,通过第一发送接口R1向接收端发送第二重传报文,第二重传报文包括第一发送接口R1的标识和第一接收接口R1的标识。132. The sending end determines that the sending of the first retransmission message fails, and sends the second retransmission message to the receiving end through the first sending interface R1, and the second retransmission message includes the identifier of the first sending interface R1 and the first receiving interface Identification of R1.
如果发送端在规定的时间内还未接收到第一重传报文的ACK报文时,确定第一重传报文发送失败,发送端决定继续在第一发送接口R1发送第二重传报文,第二重传报文可理解为第一报文的第二个重传报文。当发送端通过接收端的接收接口的拥塞信 息确定接收第二重传报文的接收接口为第一接收接口R1时,在第二重传报文中携带第一发送接口R1的标识和第一接收接口R1的标识。If the sending end has not received the ACK message of the first retransmission message within the specified time, it is determined that the first retransmission message has failed to be sent, and the sending end decides to continue sending the second retransmission message on the first sending interface R1 The second retransmission message can be understood as the second retransmission message of the first message. When the sending end determines through the congestion information of the receiving interface of the receiving end that the receiving interface for receiving the second retransmission message is the first receiving interface R1, the second retransmission message carries the identifier of the first sending interface R1 and the first receiving interface R1. ID of interface R1.
133、接收端控制第三接收接口R0向第一接收接口R1和第二接收接口R2请求对第一重传报文的注册。133. The receiving end controls the third receiving interface R0 to request the first receiving interface R1 and the second receiving interface R2 to register the first retransmission packet.
假设接收端的接收接口为3个,包括本申请中的R0、R1和R2,当第三接收接口R0在接收到第一重传报文时,为了避免同一报文被重复处理,第三接收接口R0需要向第一接收接口R1和第二接收接口R2请求对第一重传报文的注册,即请求获得对第一重传报文进行处理的权限。Assuming that there are three receiving interfaces at the receiving end, including R0, R1 and R2 in this application, when the third receiving interface R0 receives the first retransmission message, in order to avoid the same message from being processed repeatedly, the third receiving interface R0 needs to request the first receiving interface R1 and the second receiving interface R2 to register the first retransmission message, that is, request to obtain the permission to process the first retransmission message.
134、接收端控制第一接收接口R1向第三接收接口R0和第二接收接口R2请求对第二重传报文的注册。134. The receiving end controls the first receiving interface R1 to request the third receiving interface R0 and the second receiving interface R2 to register the second retransmission packet.
与步骤133类似的,当第一接收接口R1在接收到第二重传报文时,为了避免同一报文被重复处理,第一接收接口R1需要向第二接收接口R2和第三接收接口R0请求对第二重传报文的注册,即请求获得对第二重传报文进行处理的权限。Similar to step 133, when the first receiving interface R1 receives the second retransmission message, in order to avoid repeated processing of the same message, the first receiving interface R1 needs to send the second receiving interface R2 and the third receiving interface R0 Requesting registration for the second retransmission message means requesting permission to process the second retransmission message.
135、接收端确定第二接收接口R2先接收到第一接收接口R1的注册请求时,若第二接收接口R2未接收到第一报文的重传报文,则控制第二接收接口R2向第一接收接口R1返回注册成功响应。135. When the receiving end determines that the second receiving interface R2 first receives the registration request from the first receiving interface R1, if the second receiving interface R2 does not receive the retransmission message of the first message, control the second receiving interface R2 to The first receiving interface R1 returns a registration success response.
在时间顺序上,假设第二接收接口R2先接收到第一接收接口R1的注册请求,如果第二接收接口R2并未收到第一报文的重传报文,第二接收接口可以向第一接收接口返回处理第二重传报文的权限,并记录第二重传报文已被第一接收接口R1注册的注册状态。In terms of time sequence, assuming that the second receiving interface R2 first receives the registration request of the first receiving interface R1, if the second receiving interface R2 does not receive the retransmission message of the first message, the second receiving interface can send the registration request to the first receiving interface R2. A receiving interface returns the authority to process the second retransmission message, and records the registration state that the second retransmission message has been registered by the first receiving interface R1.
136、接收端确定第二接收接口R2接收到第三接收接口R0的注册请求时,控制第二接收接口R2向第三接收接口R0返回注册失败响应。136. When determining that the second receiving interface R2 has received the registration request of the third receiving interface R0, the receiving end controls the second receiving interface R2 to return a registration failure response to the third receiving interface R0.
由于第二接收接口R2先接收到了第一接收接口R1的注册请求,并且向第一接收接口R1给了处理第二重传报文的权限,相当于第一接收接口R1已经完成了注册。当第二接收接口R2本身并未接收到第一报文的重传报文,且接收到第三接收接口R0针对同一报文,即对第一重传报文的注册请求时,第二接收接口R2向第三接收接口R0返回注册失败响应。该注册失败响应指示第二接收接口R2并未接收到第一报文的重复报文,且第一接收接口R1已完成对第二重传报文的注册,第三接收接口R0并未获得对第一重传报文的处理权限。Since the second receiving interface R2 has first received the registration request from the first receiving interface R1, and has given the first receiving interface R1 the right to process the second retransmission message, it means that the first receiving interface R1 has completed the registration. When the second receiving interface R2 itself does not receive the retransmission message of the first message, and receives the third receiving interface R0 for the same message, that is, when the registration request for the first retransmission message is received, the second receiving interface The interface R2 returns a registration failure response to the third receiving interface R0. The registration failure response indicates that the second receiving interface R2 has not received the duplicate message of the first message, and the first receiving interface R1 has completed the registration of the second retransmission message, and the third receiving interface R0 has not obtained the The processing authority of the first retransmission packet.
137、接收端确定第三接收接口R0在接收到第一接收接口R1的注册请求时,控制第三接收接口R0向第一接收接口R1返回注册失败响应。137. The receiving end determines that when the third receiving interface R0 receives the registration request from the first receiving interface R1, controls the third receiving interface R0 to return a registration failure response to the first receiving interface R1.
对于第三接收接口R0来说,第三接收接口R0接收到了第一重传报文,当第三接收接口R0在接收到第一接收接口R1针对第一报文的第二重传报文的注册请求时,可以控制第三接收接口R0向第一接收接口R1返回注册失败响应。For the third receiving interface R0, the third receiving interface R0 receives the first retransmission message, when the third receiving interface R0 receives the second retransmission message of the first receiving interface R1 for the first message When registering a request, the third receiving interface R0 may be controlled to return a registration failure response to the first receiving interface R1.
步骤137的处理可以理解为遵循了防止多个重传报文冲突的处理机制1)。The processing of step 137 can be understood as following the processing mechanism 1) for preventing multiple retransmitted packets from colliding.
即,第三接收接口R0已经接收到了第一重传报文,且第三接收接口R0还接收到了编号大于第三接收接口R0的编号的第一接收接口R1的注册请求(编号R0中的0小于编号R1中的1),按照处理机制1)中的说明,第三接收接口R0需拒绝第一接收接口R1的注册请求,因此向第一接收接口R1返回的是注册失败响应。That is, the third receiving interface R0 has received the first retransmission message, and the third receiving interface R0 has also received the registration request of the first receiving interface R1 whose number is greater than that of the third receiving interface R0 (0 in the number R0 Less than 1) in the number R1, according to the description in processing mechanism 1), the third receiving interface R0 needs to reject the registration request of the first receiving interface R1, so the registration failure response is returned to the first receiving interface R1.
类似的,假设接收端确定第一接收接口R1在接收到第一报文后,第一接收接口R1还接收到第二接收接口R2发送的第一注册请求,第一注册请求用于请求对第一报文的重复报文进行处理时,若第一接收接口R1的编号小于第二接收接口R2的编号(编号R1中的1小于编号R2中的2),则接收端控制第一接收接口R2拒绝第一注册请求。Similarly, assuming that the receiving end determines that after the first receiving interface R1 receives the first message, the first receiving interface R1 also receives the first registration request sent by the second receiving interface R2, and the first registration request is used to request registration of the second receiving interface R2. When a repeated message of a message is processed, if the number of the first receiving interface R1 is smaller than the number of the second receiving interface R2 (1 in the number R1 is less than 2 in the number R2), the receiving end controls the first receiving interface R2 Deny the first registration request.
138、接收端确定第一接收接口R1在接收到接收端的其他所有接收接口的注册响应后,确定第一接收接口R1需丢弃第二重传报文,并在第一接收接口R1记录第一报文已被注册,控制第一接收接口R1向第三接收接口R0返回第一接收接口R1接收到的注册响应和从第二接收接口R2接收到的注册响应,即图13中的有效注册响应。138. The receiving end determines that the first receiving interface R1 needs to discard the second retransmission message after receiving registration responses from all other receiving interfaces of the receiving end, and records the first message on the first receiving interface R1 The text has been registered, and the first receiving interface R1 is controlled to return the registration response received by the first receiving interface R1 and the registration response received from the second receiving interface R2 to the third receiving interface R0, that is, the effective registration response in FIG. 13 .
通过步骤135和137,第一接收接口R1接收到了接收端的其他所有接收接口R0和R2的响应,包括R0返回的注册失败响应和R2返回的第二接收接口未接收到重传报文的注册成功响应。只要第一接收接口R1接收到其他所有接收接口中的一个接收接口返回的注册失败响应,第一接收接口R1便确定本地接收到的第二重传报文不能被处理,因为已经有同一报文在其他接收接口已经被注册。同时,第一接收接口R1也需要在本地记录第二重传报文已经被注册的注册状态。Through steps 135 and 137, the first receiving interface R1 has received responses from all other receiving interfaces R0 and R2 at the receiving end, including the registration failure response returned by R0 and the successful registration that the second receiving interface returned by R2 has not received the retransmission message response. As long as the first receiving interface R1 receives a registration failure response returned by one of the other receiving interfaces, the first receiving interface R1 will determine that the second retransmission message received locally cannot be processed because the same message already exists Already registered on other receiving interfaces. At the same time, the first receiving interface R1 also needs to locally record the registration state that the second retransmission message has been registered.
这就相当于,第一接收接口R1遵循了上述避免多个重复报文冲突的机制中的2),即第一接收接口R1接收到了第二重传报文(第一报文的重传报文),如果第一接收接口R1的编号不是接收端的所有接收接口的编号中的最小编号,接收端控制第一接收接口R1收集第一接收接口以外的其他所有接收接口(R0和R2)关于第一报文的多个注册响应。This is equivalent to that the first receiving interface R1 follows 2) in the above-mentioned mechanism for avoiding multiple repeated message collisions, that is, the first receiving interface R1 receives the second retransmission message (the retransmission message of the first message) text), if the number of the first receiving interface R1 is not the smallest number among the numbers of all the receiving interfaces of the receiving end, the receiving end controls the first receiving interface R1 to collect all other receiving interfaces (R0 and R2) other than the first receiving interface. Multiple registration responses for one message.
再参考上述避免多个重复报文冲突的机制中的3),当第一接收接口R1在收集到R0和R2的注册响应后,还需要将第二接收接口R2返回的注册成功响应和第一接收接口R1确定的本接收接口的注册失败消息返回给第三接收接口R0。Referring to 3) in the above-mentioned mechanism for avoiding multiple repeated message conflicts, after the first receiving interface R1 collects the registration responses of R0 and R2, it also needs to combine the registration success response returned by the second receiving interface R2 with the first The registration failure message of the receiving interface determined by the receiving interface R1 is returned to the third receiving interface R0.
这就包括,第一接收接口R1向编号小于第一接收接口的编号的接收接口R0发送多个注册响应中的第一注册响应,第一注册响应用于指示第二接收接口R2未接收到重传报文且第一接收接口R1第一报文的重复报文注册成功。This includes that the first receiving interface R1 sends the first registration response among multiple registration responses to the receiving interface R0 whose number is smaller than the number of the first receiving interface, and the first registration response is used to indicate that the second receiving interface R2 has not received a re-registration response. The message is transmitted and the duplicate message registration of the first message of the first receiving interface R1 is successful.
139、接收端确定第三接收接口R0在接收到第一接收接口R1和第二接收接口R2的注册响应后,对接收到的第一重传报文进行处理,并向第一发送接口R1返回处理结果。139. The receiving end determines that after receiving the registration responses from the first receiving interface R1 and the second receiving interface R2, the third receiving interface R0 processes the received first retransmission message and returns it to the first sending interface R1 process result.
当编号最小的第三接收接口R0在收集到其他所有接收接口的注册响应后,第三接收接口R0可知道,第二接收接口R2并未接收到重传报文,且已将重传报文的处理权限给了第一接收接口R1。但是,第三接收接口R0又从第一接收接口R1接收到了第一接收接口R1返回的注册失败消息,因此,第三接收接口R0可知道其余的接收接口(R1和R2)都没有处理第一报文的重传报文的权限。进而,第三接收接口R0就获得了对接收到的第一重传报文的处理权限,并向发送第一重传报文的第一发送接口R1返回处理结果。After the third receiving interface R0 with the smallest number collects the registration responses of all other receiving interfaces, the third receiving interface R0 can know that the second receiving interface R2 has not received the retransmitted message and has sent the retransmitted message to The processing right of is given to the first receiving interface R1. However, the third receiving interface R0 has received the registration failure message returned by the first receiving interface R1 from the first receiving interface R1. Therefore, the third receiving interface R0 can know that the remaining receiving interfaces (R1 and R2) have not processed the first registration failure message. Permission to retransmit packets for packets. Furthermore, the third receiving interface R0 obtains the processing authority for the received first retransmission message, and returns the processing result to the first sending interface R1 that sent the first retransmission message.
140、发送端控制第一发送接口R1向第三接收接口R0发送释放资源消息。140. The sending end controls the first sending interface R1 to send a resource release message to the third receiving interface R0.
当第一发送接口R1确定第一报文的一个重传报文已经被成功处理后,第一发送接口R1向第三接收接口R0返回释放资源消息,以便第三接收接口R0删除本地的与 第一重传报文关联的上下文。When the first sending interface R1 determines that a retransmission message of the first message has been successfully processed, the first sending interface R1 returns a resource release message to the third receiving interface R0, so that the third receiving interface R0 deletes the local A context associated with retransmission packets.
141、接收端控制第三接收接口R0指示第一接收接口R1和第二接收接口R2释放对第一报文的注册状态。141. The receiving end controls the third receiving interface R0 to instruct the first receiving interface R1 and the second receiving interface R2 to release the registration state for the first packet.
由于第一接收接口R1记录第二接收接口R2和第三接收接口R0的注册响应,当第一接收接口R1接收到释放注册状态的消息时,第一接收接口R1可删除本地保存的注册响应。第二接收接口R2还记录有第一接收接口R1注册成功的注册状态,以及第三接收接口R0注册失败的注册状态,当第二接收接口R2接收到释放注册状态的消息时,第二接收接口R2可删除本地的注册状态。Since the first receiving interface R1 records the registration responses of the second receiving interface R2 and the third receiving interface R0, when the first receiving interface R1 receives a message of releasing the registration status, the first receiving interface R1 can delete the locally stored registration responses. The second receiving interface R2 also records the registration status of the successful registration of the first receiving interface R1, and the registration status of the failure of the third receiving interface R0 registration. When the second receiving interface R2 receives the message of releasing the registration status, the second receiving interface R2 may delete the local registration state.
由此,当接收端的多个接收接口在协同工作时,如果在多个接收接口接收到了同一报文的多个重传报文需要处理时,本申请可遵循多个重复报文的处理机制,该机制为一种报文的注册机制,如上文中的机制1)、2)和3),当然也可以通过其他的处理机制来避免同一报文在多个接收接口重复处理。Therefore, when multiple receiving interfaces at the receiving end are working together, if multiple retransmission messages of the same message are received by multiple receiving interfaces and need to be processed, this application can follow the processing mechanism of multiple repeated messages, This mechanism is a message registration mechanism, such as the mechanisms 1), 2) and 3) above. Of course, other processing mechanisms can also be used to avoid repeated processing of the same message on multiple receiving interfaces.
可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件和/或软件模块。该电子设备可以是本申请中的发送端或接收端。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above functions, the electronic device includes hardware and/or software modules corresponding to each function. The electronic device may be the sending end or the receiving end in this application. Combining the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the functional modules of the electronic device may be divided according to the above method example. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图14示出了电子设备140的一种可能的组成示意图,电子设备140可以是本申请中的发送端或接收端。如图14所示,该电子设备140可以包括:处理单元1401、发送单元1402和接收单元1403。可以理解,发送端同时具有发送和接收的功能,接收端也同时具有发送和接收的功能。In the case of dividing each functional module corresponding to each function, FIG. 14 shows a possible composition diagram of an electronic device 140, and the electronic device 140 may be a sending end or a receiving end in this application. As shown in FIG. 14 , the electronic device 140 may include: a processing unit 1401 , a sending unit 1402 and a receiving unit 1403 . It can be understood that the sending end has the function of sending and receiving at the same time, and the receiving end also has the function of sending and receiving at the same time.
因此,处理单元1401可以用于支持电子设备1100执行上述步骤801、步骤102、步骤504、108、112、113、114、115、116、124、125、126、128、133、134、135、136、137、138、139、141等,和/或用于本文所描述的技术的其他过程。Therefore, the processing unit 1401 can be used to support the electronic device 1100 to execute the above steps 801, 102, 504, 108, 112, 113, 114, 115, 116, 124, 125, 126, 128, 133, 134, 135, 136 , 137, 138, 139, 141, etc., and/or other processes for the techniques described herein.
发送单元1402可以用于支持电子设备1100执行上述步骤802、901、101、103、104、105、106、107、109、111、117、118、121、122、127、129、131、132、140等,和/或用于本文所描述的技术的其他过程。The sending unit 1402 may be used to support the electronic device 1100 to execute the above steps 802, 901, 101, 103, 104, 105, 106, 107, 109, 111, 117, 118, 121, 122, 127, 129, 131, 132, 140 etc., and/or other processes for the techniques described herein.
接收单元1403可以用于支持电子设备1100执行上述步骤902、123等,和/或用于本文所描述的技术的其他过程。The receiving unit 1403 may be used to support the electronic device 1100 to execute the above steps 902, 123, etc., and/or other processes for the technology described herein.
需要说明的是,发送单元1402相当于本申请中的多个发送接口,接收单元1403相当于本申请中的多个接收接口。It should be noted that the sending unit 1402 is equivalent to multiple sending interfaces in this application, and the receiving unit 1403 is equivalent to multiple receiving interfaces in this application.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.
本实施例提供的电子设备140,用于执行上述报文传输方法,因此可以达到与上 述实现方法相同的效果。The electronic device 140 provided in this embodiment is used to implement the above message transmission method, so the same effect as the above implementation method can be achieved.
在采用集成的单元的情况下,电子设备140可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备140的动作进行控制管理,例如,可以用于支持电子设备140执行上述确定单元1401执行的步骤。存储模块可以用于支持电子设备140存储程序代码和数据等。通信模块,可以用于支持电子设备140与其他设备的通信,例如与接收端或发送端的通信。本申请中,通信模块用于执行上述发送单元1402和接收单元1403执行的步骤。In the case of an integrated unit, the electronic device 140 may include a processing module, a storage module and a communication module. Wherein, the processing module may be used to control and manage the actions of the electronic device 140 , for example, may be used to support the electronic device 140 to perform the steps performed by the above-mentioned determination unit 1401 . The storage module can be used to support the electronic device 140 to store program codes, data, and the like. The communication module may be used to support communication between the electronic device 140 and other devices, such as communication with a receiving end or a sending end. In this application, the communication module is configured to perform the steps performed by the sending unit 1402 and the receiving unit 1403 above.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。Wherein, the processing module may be a processor or a controller. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor can also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of digital signal processing (digital signal processing, DSP) and a microprocessor, and the like. The storage module may be a memory. Specifically, the communication module may be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器,通信模块为多个发送接口和多个接收接口时,发送接口间的通信以及接收接口间的通信方式可以取决于接收接口以及发送接口的数量以及芯片的版图结构。In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a plurality of sending interfaces and a plurality of receiving interfaces, the communication between the sending interfaces and the communication mode between the receiving interfaces may depend on the receiving interfaces and The number of sending interfaces and the layout structure of the chip.
在一些实施例中,对于接口数量较多的设备,或接口在物理实现上呈现分布式的特征的设备,发送接口之间的通信可以是通过系统总线完成接口间的数据互通,接收接口也可以时通过系统总线完成接口间的数据互通。此时,本实施例所涉及的电子设备可以为具有图15所示结构的通信设备150,接收接口包括图15中的接收接口1、接收接口2和接收接口3。In some embodiments, for a device with a large number of interfaces, or a device whose physical implementation is distributed, the communication between the sending interfaces can be through the system bus to complete the data exchange between the interfaces, and the receiving interface can also be At the same time, the data communication between the interfaces is completed through the system bus. At this time, the electronic device involved in this embodiment may be a communication device 150 having the structure shown in FIG. 15 , and the receiving interface includes receiving interface 1, receiving interface 2, and receiving interface 3 in FIG. 15 .
在一些实施例中,对于接口数量较少的设备,并且接口在物理版图距离较近时,可以通过物理直连完成发送接口和接收接口间的数据互通。此时,本实施例所涉及的电子设备可以为具有图16所示结构的通信设备160,接收接口包括图16中的接收接口1、接收接口2和接收接口3。In some embodiments, for a device with a small number of interfaces and the physical layout of the interfaces is relatively close, the data intercommunication between the sending interface and the receiving interface can be completed through physical direct connection. At this time, the electronic device involved in this embodiment may be a communication device 160 having the structure shown in FIG. 16 , and the receiving interface includes receiving interface 1, receiving interface 2, and receiving interface 3 in FIG. 16 .
本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器,多个发送接口和多个接收接口。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的报文传输方法。The embodiment of the present application also provides an electronic device, including one or more processors, one or more memories, multiple sending interfaces and multiple receiving interfaces. The one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs The above related method steps implement the message transmission method in the above embodiment.
本申请的实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的报文传输方法。The embodiment of the present application also provides a computer storage medium, the computer storage medium stores computer instructions, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to realize the message in the above-mentioned embodiment transfer method.
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子设备执行的报文传输方法。The embodiment of the present application also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the message transmission method performed by the electronic device in the above embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中电子设备执行的报文传输方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the message transmission method executed by the electronic device in the above method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
本申请另一实施例提供了一种系统,该系统可以包括上述发送端和接收端,可以用于实现上述报文传输方法。Another embodiment of the present application provides a system, which may include the above-mentioned sending end and receiving end, and may be used to implement the above-mentioned message transmission method.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned by different Completion of functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above content is only the specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application, and should covered within the scope of protection of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (27)

  1. 一种报文传输方法,其特征在于,包括:A message transmission method, characterized in that, comprising:
    发送端确定发送第一报文时,根据所述发送端的多个发送接口的负载确定发送所述第一报文的第一发送接口,并根据接收端的多个接收接口的拥塞信息确定接收所述第一报文的第一接收接口;When the sending end determines to send the first message, it determines the first sending interface for sending the first message according to the loads of the multiple sending interfaces of the sending end, and determines to receive the first message according to the congestion information of the multiple receiving interfaces of the receiving end. the first receiving interface of the first message;
    所述发送端通过所述第一发送接口发送第一报文,所述第一报文包括所述第一发送接口的标识和所述第一接收接口的标识。The sending end sends a first packet through the first sending interface, where the first packet includes an identifier of the first sending interface and an identifier of the first receiving interface.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    所述发送端接收所述接收端发送的所述多个接收接口的拥塞信息,所述多个接收接口包括所述第一接收接口。The sending end receives the congestion information of the multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    所述发送端确定发送所述第一报文失败时,根据所述多个接收接口的拥塞信息确定所述接收端接收第一重传报文的第二接收接口,所述第一重传报文为所述第一报文的重复报文;When the sending end determines that sending the first message fails, according to the congestion information of the multiple receiving interfaces, determine the second receiving interface on which the receiving end receives the first retransmission message, and the first retransmission message The message is a repeated message of the first message;
    所述发送端通过所述第一发送接口发送所述第一重传报文,所述第一重传报文包括所述第一发送接口的标识、所述第二接收接口的标识以及重复报文的标记。The sending end sends the first retransmission message through the first sending interface, and the first retransmission message includes an identifier of the first sending interface, an identifier of the second receiving interface, and a repeat message text markup.
  4. 根据权利要求3所述的方法,其特征在于,所述第一重传报文晚于所述第一报文到达所述接收端时,所述方法还包括:The method according to claim 3, wherein when the first retransmission message arrives at the receiving end later than the first message, the method further comprises:
    所述发送端通过第二发送接口接收所述第一报文的第一响应报文,所述第一响应报文包括所述第一发送接口的标识;The sending end receives the first response message of the first message through the second sending interface, and the first response message includes the identifier of the first sending interface;
    所述第二发送接口与所述第一发送接口不同时,所述发送端控制所述第二发送接口向所述第一发送接口发送所述第一响应报文;When the second sending interface is different from the first sending interface, the sending end controls the second sending interface to send the first response message to the first sending interface;
    所述发送端控制所述第一发送接口向所述第一接收接口发送第一通知消息,所述第一通知消息用于指示所述第一接收接口释放所述第一报文的上下文信息。The sending end controls the first sending interface to send a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first packet.
  5. 根据权利要求3所述的方法,其特征在于,所述第一报文晚于所述第一重传报文到达所述接收端时,所述方法还包括:The method according to claim 3, wherein when the first message arrives at the receiving end later than the first retransmission message, the method further comprises:
    所述发送端通过第三发送接口接收所述第一重传报文的第一重传响应报文,所述第一重传响应报文包括所述第一发送接口的标识;The sending end receives a first retransmission response message of the first retransmission message through a third sending interface, and the first retransmission response message includes an identifier of the first sending interface;
    所述第三发送接口与所述第一发送接口不同时,所述发送端控制所述第三发送接口向所述第一发送接口发送所述第一重传响应报文;When the third sending interface is different from the first sending interface, the sending end controls the third sending interface to send the first retransmission response message to the first sending interface;
    所述发送端控制所述第一发送接口向所述第二接收接口发送第二通知消息,所述第二通知消息用于指示所述第二接收接口释放所述第一重传报文的上下文信息。The sending end controls the first sending interface to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context of the first retransmission message information.
  6. 一种报文传输方法,其特征在于,所述方法包括:A message transmission method, characterized in that the method comprises:
    接收端向发送端发送多个接收接口的拥塞信息,所述多个接收接口的拥塞信息用于所述发送端确定所述接收端接收第一报文的第一接收接口;The receiving end sends congestion information of multiple receiving interfaces to the sending end, and the congestion information of the multiple receiving interfaces is used by the sending end to determine the first receiving interface through which the receiving end receives the first packet;
    所述接收端通过所述第一接收接口接收所述第一报文,所述第一报文包括所述发送端发送所述第一报文的第一发送接口的标识和所述第一接收接口的标识。The receiving end receives the first message through the first receiving interface, and the first message includes the identifier of the first sending interface through which the sending end sends the first message and the first receiving The ID of the interface.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, further comprising:
    所述接收端确定从所述第一接收接口接收到所述第一报文时,确定所述多个接收 接口除所述第一接收接口以外的其他接收接口是否已接收到所述第一报文的重复报文;When the receiving end determines that the first message is received from the first receiving interface, determine whether other receiving interfaces of the multiple receiving interfaces except the first receiving interface have received the first message Repeated message of the text;
    所述接收端确定所述其他接收接口均未接收到所述第一报文的重复报文时,所述接收端控制所述第一接收接口对所述第一报文进行处理;When the receiving end determines that none of the other receiving interfaces has received a duplicate message of the first message, the receiving end controls the first receiving interface to process the first message;
    所述接收端确定所述其他接收接口中的至少一个接收接口已接收到所述第一报文的重复报文时,所述接收端控制所述第一接收接口丢弃所述第一报文。When the receiving end determines that at least one receiving interface among the other receiving interfaces has received a duplicate packet of the first packet, the receiving end controls the first receiving interface to discard the first packet.
  8. 根据权利要求7所述的方法,其特征在于,所述第一报文为原始报文时:The method according to claim 7, wherein when the first message is an original message:
    所述确定所述多个接收接口除所述第一接收接口以外的其他接收接口是否已接收到所述第一报文的重复报文包括:所述接收端确定所述第一接收接口是否接收到所述其他接收接口的第一注册请求,所述第一注册请求用于请求对第一重传报文进行处理,所述第一重传报文为所述第一报文的重传报文;The determining whether other receiving interfaces other than the first receiving interface of the plurality of receiving interfaces have received the repeated message of the first message includes: the receiving end determines whether the first receiving interface receives A first registration request to the other receiving interface, where the first registration request is used to request processing of a first retransmission message, where the first retransmission message is a retransmission message of the first message arts;
    所述接收端确定所述其他接收接口均未接收到所述第一报文的重复报文包括:所述接收端确定所述第一接收接口未接收到所述其他接收接口发送的所述第一注册请求;The receiving end determining that none of the other receiving interfaces has received the repeated message of the first message includes: the receiving end determining that the first receiving interface has not received the first receiving interface sent by the other receiving interface. a registration request;
    所述接收端确定所述其他接收接口中的至少一个接收接口已接收到所述第一报文的重复报文包括:所述接收端确定所述第一接收接口已接收到所述其他接收接口中的至少一个接收接口发送的所述第一注册请求。The receiving end determining that at least one receiving interface of the other receiving interfaces has received the repeated message of the first message includes: the receiving end determining that the first receiving interface has received the other receiving interface At least one of the receiving interfaces sends the first registration request.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, characterized in that the method further comprises:
    所述接收端确定所述第一接收接口在接收到所述第一报文后,接收到所述其他接收接口中的第二接收接口发送的所述第一注册请求时,所述接收端控制所述第一接收接口向所述第二接收接口发送第一注册响应,所述第一注册响应用于指示所述第二接收接口注册失败。When the receiving end determines that the first receiving interface receives the first registration request sent by the second receiving interface among the other receiving interfaces after receiving the first packet, the receiving end controls The first receiving interface sends a first registration response to the second receiving interface, where the first registration response is used to indicate that the second receiving interface fails to register.
  10. 根据权利要求7所述的方法,其特征在于,所述第一报文为重传报文时:The method according to claim 7, wherein when the first message is a retransmission message:
    所述确定所述多个接收接口除所述第一接收接口以外的其他接收接口是否已接收到所述第一报文的重复报文包括:所述接收端控制所述第一接收接口向所述其他接收接口中的每个接收接口发送第一注册请求,所述第一注册请求用于请求对所述第一报文进行处理;The determining whether other receiving interfaces other than the first receiving interface of the plurality of receiving interfaces have received the repeated message of the first message includes: the receiving end controls the first receiving interface to send Each receiving interface in the other receiving interfaces sends a first registration request, and the first registration request is used to request processing of the first message;
    所述接收端确定所述其他接收接口均未接收到所述第一报文的重复报文包括:所述接收端确定所述第一接收接口接收到的所述其他接收接口发送的多个注册响应,所述多个注册响应均指示所述第一接收接口注册成功;The receiving end determines that none of the other receiving interfaces has received the repeated message of the first message includes: the receiving end determines that the first receiving interface receives multiple registration messages sent by the other receiving interfaces Responding, the multiple registration responses all indicate that the registration of the first receiving interface is successful;
    所述接收端确定所述其他接收接口中的至少一个接收接口已接收到所述第一报文的重复报文包括:所述接收端确定所述第一接收接口已接收到所述其他接收接口中的一个接收接口发送的指示所述第一接收接口注册失败的注册响应。The receiving end determining that at least one receiving interface of the other receiving interfaces has received the repeated message of the first message includes: the receiving end determining that the first receiving interface has received the other receiving interface A registration response sent by one of the receiving interfaces indicating that the registration of the first receiving interface fails.
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method according to claim 10, characterized in that the method further comprises:
    所述接收端确定所述其他接收接口中的第二接收接口已接收到一个所述第一注册请求后,又接收到所述第一报文的原始报文,所述接收端控制所述第二接收接口丢弃所述第一报文的原始报文。After the receiving end determines that the second receiving interface among the other receiving interfaces has received one of the first registration requests, it receives the original message of the first message, and the receiving end controls the first registration request The second receiving interface discards the original packet of the first packet.
  12. 根据权利要求6-11任一项所述的方法,其特征在于,所述第一报文为重传报文时:The method according to any one of claims 6-11, wherein when the first message is a retransmission message:
    所述接收端确定所述第一接收接口在接收到所述第一报文后,所述第一接收接口还接收到第二接收接口发送的第一注册请求,所述第一注册请求用于请求对所述第一 报文的重复报文进行处理时,若所述第一接收接口的编号小于所述第二接收接口的编号,则所述接收端控制所述第一接收接口拒绝所述第一注册请求。The receiving end determines that after the first receiving interface receives the first message, the first receiving interface also receives a first registration request sent by the second receiving interface, and the first registration request is used for When requesting to process the duplicate message of the first message, if the number of the first receiving interface is smaller than the number of the second receiving interface, the receiving end controls the first receiving interface to reject the First registration request.
  13. 根据权利要求12所述的方法,其特征在于,所述第一报文为重传报文时:The method according to claim 12, wherein when the first message is a retransmission message:
    所述接收端确定所述第一接收接口在接收到所述第一报文后,如果所述第一接收接口的编号不是所述接收端的所有接收接口的编号中的最小编号,所述接收端控制所述第一接收接口收集所述第一接收接口以外的其他所有接收接口关于所述第一报文的多个注册响应;After the receiving end determines that the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number among all receiving interfaces of the receiving end, the receiving end controlling the first receiving interface to collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface;
    所述接收端控制所述第一接收接口向编号小于所述第一接收接口的编号的接收接口发送所述多个注册响应中的第一注册响应,所述第一注册响应用于指示第二接收接口对所述第一报文的重复报文注册成功。The receiving end controls the first receiving interface to send the first registration response among the multiple registration responses to the receiving interface whose number is smaller than the number of the first receiving interface, and the first registration response is used to indicate that the second The receiving interface successfully registers the repeated message of the first message.
  14. 一种通信设备,其特征在于,包括:A communication device, characterized in that it includes:
    处理器,用于确定发送第一报文时,根据所述发送端的多个发送接口的负载确定发送所述第一报文的第一发送接口,并根据接收端的多个接收接口的拥塞信息确定接收所述第一报文的第一接收接口;A processor, configured to determine the first sending interface for sending the first message according to the loads of the multiple sending interfaces at the sending end when sending the first message, and determine according to the congestion information of the multiple receiving interfaces at the receiving end a first receiving interface that receives the first packet;
    收发器,包括所述第一发送接口,所述第一发送接口用于发送第一报文,所述第一报文包括所述第一发送接口的标识和所述第一接收接口的标识。The transceiver includes the first sending interface, where the first sending interface is used to send a first message, and the first message includes an identifier of the first sending interface and an identifier of the first receiving interface.
  15. 根据权利要求14所述的通信设备,其特征在于,所述收发器还用于:The communication device according to claim 14, wherein the transceiver is also used for:
    接收所述接收端发送的所述多个接收接口的拥塞信息,所述多个接收接口包括所述第一接收接口。receiving congestion information of the multiple receiving interfaces sent by the receiving end, where the multiple receiving interfaces include the first receiving interface.
  16. 根据权利要求14或15所述的通信设备,其特征在于,所述处理器还用于:The communication device according to claim 14 or 15, wherein the processor is further used for:
    确定发送所述第一报文失败时,根据所述多个接收接口的拥塞信息确定所述接收端接收第一重传报文的第二接收接口,所述第一重传报文为所述第一报文的重复报文;When it is determined that sending the first message fails, according to the congestion information of the multiple receiving interfaces, determine the second receiving interface on which the receiving end receives the first retransmission message, and the first retransmission message is the A duplicate message of the first message;
    所述第一发送接口,还用于发送所述第一重传报文,所述第一重传报文包括所述第一发送接口的标识、所述第二接收接口的标识以及重复报文的标记。The first sending interface is also used to send the first retransmission message, the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and the repeated message markup.
  17. 根据权利要求16所述的通信设备,其特征在于,所述第一重传报文晚于所述第一报文到达所述接收端时,所述收发器还包括第二发送接口,所述第二发送接口还用于接收所述第一报文的第一响应报文,所述第一响应报文包括所述第一发送接口的标识;The communication device according to claim 16, wherein when the first retransmission message arrives at the receiving end later than the first message, the transceiver further includes a second sending interface, the The second sending interface is further configured to receive a first response message of the first message, where the first response message includes an identifier of the first sending interface;
    所述第二发送接口与所述第一发送接口不同时,所述第二发送接口还用于,向所述第一发送接口发送所述第一响应报文;所述第一发送接口,还用于向所述第一接收接口发送第一通知消息,所述第一通知消息用于指示所述第一接收接口释放所述第一报文的上下文信息。When the second sending interface is different from the first sending interface, the second sending interface is also used to send the first response message to the first sending interface; the first sending interface is further It is used to send a first notification message to the first receiving interface, where the first notification message is used to instruct the first receiving interface to release the context information of the first message.
  18. 根据权利要求16所述的通信设备,其特征在于,所述第一报文晚于所述第一重传报文到达所述接收端时,所述收发器还包括第三发送接口,所述第三发送接口用于接收所述第一重传报文的第一重传响应报文,所述第一重传响应报文包括所述第一发送接口的标识;The communication device according to claim 16, wherein when the first message arrives at the receiving end later than the first retransmission message, the transceiver further includes a third sending interface, the The third sending interface is configured to receive a first retransmission response message of the first retransmission message, where the first retransmission response message includes an identifier of the first sending interface;
    所述第三发送接口与所述第一发送接口不同时,所述第三发送接口还用于向所述第一发送接口发送所述第一重传响应报文;所述第一发送接口,还用于向所述第二接收接口发送第二通知消息,所述第二通知消息用于指示所述第二接收接口释放所述第 一重传报文的上下文信息。When the third sending interface is different from the first sending interface, the third sending interface is further configured to send the first retransmission response message to the first sending interface; the first sending interface, It is also used to send a second notification message to the second receiving interface, where the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
  19. 一种通信设备,其特征在于,包括:A communication device, characterized in that it includes:
    收发器,用于向发送端发送多个接收接口的拥塞信息,所述多个接收接口的拥塞信息用于所述发送端确定所述接收端接收第一报文的第一接收接口;A transceiver, configured to send congestion information of multiple receiving interfaces to the sending end, where the congestion information of the multiple receiving interfaces is used by the sending end to determine the first receiving interface through which the receiving end receives the first packet;
    所述收发器包括所述第一接收接口,所述第一接收接口用于接收所述第一报文,所述第一报文包括所述发送端发送所述第一报文的第一发送接口的标识和所述第一接收接口的标识。The transceiver includes the first receiving interface, and the first receiving interface is used to receive the first message, and the first message includes the first transmission of the sending end sending the first message. The identifier of the interface and the identifier of the first receiving interface.
  20. 根据权利要求19所述的通信设备,其特征在于,还包括处理器,用于:The communication device according to claim 19, further comprising a processor configured to:
    确定从所述第一接收接口接收到所述第一报文时,确定所述多个接收接口除所述第一接收接口以外的其他接收接口是否已接收到所述第一报文的重复报文;When determining that the first packet is received from the first receiving interface, determine whether other receiving interfaces of the plurality of receiving interfaces except the first receiving interface have received duplicate packets of the first packet arts;
    确定所述其他接收接口均未接收到所述第一报文的重复报文时,控制所述第一接收接口对所述第一报文进行处理;When it is determined that none of the other receiving interfaces has received a duplicate message of the first message, control the first receiving interface to process the first message;
    确定所述其他接收接口中的至少一个接收接口已接收到所述第一报文的重复报文时,控制所述第一接收接口丢弃所述第一报文。When it is determined that at least one receiving interface among the other receiving interfaces has received a duplicate packet of the first packet, control the first receiving interface to discard the first packet.
  21. 根据权利要求20所述的通信设备,其特征在于,所述第一报文为原始报文时:The communication device according to claim 20, wherein when the first message is an original message:
    所述第一接收接口,用于确定是否接收到所述其他接收接口的第一注册请求,所述第一注册请求用于请求对第一重传报文进行处理,所述第一重传报文为所述第一报文的重传报文;The first receiving interface is configured to determine whether a first registration request of the other receiving interface is received, the first registration request is used to request processing of a first retransmission message, and the first retransmission message The message is a retransmission message of the first message;
    确定所述第一接收接口未接收到所述其他接收接口发送的所述第一注册请求,所述第一接收接口,用于对所述第一报文进行处理;或,determining that the first receiving interface has not received the first registration request sent by the other receiving interface, the first receiving interface is configured to process the first message; or,
    确定所述第一接收接口已接收到所述其他接收接口中的至少一个接收接口发送的所述第一注册请求,所述第一接收接口,用于丢弃所述第一报文。It is determined that the first receiving interface has received the first registration request sent by at least one receiving interface among the other receiving interfaces, and the first receiving interface is configured to discard the first message.
  22. 根据权利要求21所述的通信设备,其特征在于,The communication device according to claim 21, characterized in that,
    在接收到所述第一报文后,接收到所述其他接收接口中的第二接收接口发送的所述第一注册请求时,所述第一接收接口,还用于向所述第二接收接口发送第一注册响应,所述第一注册响应用于指示所述第二接收接口注册失败。After receiving the first message, when receiving the first registration request sent by the second receiving interface among the other receiving interfaces, the first receiving interface is also used to send the registration request to the second receiving interface The interface sends a first registration response, where the first registration response is used to indicate that the second receiving interface fails to register.
  23. 根据权利要求20所述的通信设备,其特征在于,所述第一报文为重传报文时:The communication device according to claim 20, wherein when the first message is a retransmission message:
    所述第一接收接口,用于向所述其他接收接口中的每个接收接口发送第一注册请求,所述第一注册请求用于请求对所述第一报文进行处理;The first receiving interface is configured to send a first registration request to each of the other receiving interfaces, where the first registration request is used to request processing of the first message;
    确定所述第一接收接口接收到的所述其他接收接口发送的多个注册响应,所述多个注册响应均指示所述第一接收接口注册成功,对所述第一报文进行处理;Determine the multiple registration responses received by the first receiving interface and sent by the other receiving interfaces, the multiple registration responses all indicate that the registration of the first receiving interface is successful, and process the first message;
    确定所述第一接收接口已接收到所述其他接收接口中的一个接收接口发送的指示所述第一接收接口注册失败的注册响应,控制所述第一接收接口丢弃所述第一报文。Determining that the first receiving interface has received a registration response sent by one of the other receiving interfaces indicating that the registration of the first receiving interface failed, and controlling the first receiving interface to discard the first packet.
  24. 根据权利要求23所述的通信设备,其特征在于,所述其他接收接口中的第二接收接口已接收到一个所述第一注册请求后,又接收到所述第一报文的原始报文,所述第二接收接口,用于丢弃所述第一报文的原始报文。The communication device according to claim 23, wherein the second receiving interface among the other receiving interfaces receives the original message of the first message after receiving the first registration request , the second receiving interface is configured to discard the original packet of the first packet.
  25. 根据权利要求19-24任一项所述的通信设备,其特征在于,所述第一报文为重传报文时:The communication device according to any one of claims 19-24, wherein when the first message is a retransmission message:
    所述第一接收接口在接收到所述第一报文后,所述第一接收接口还接收到第二接 收接口发送的第一注册请求,所述第一注册请求用于请求对所述第一报文的重复报文进行处理时,若所述第一接收接口的编号小于所述第二接收接口的编号,则所述第一接收接口,用于拒绝所述第一注册请求。After the first receiving interface receives the first packet, the first receiving interface also receives a first registration request sent by the second receiving interface, and the first registration request is used to request registration of the first When processing a repeated message of a message, if the number of the first receiving interface is smaller than the number of the second receiving interface, the first receiving interface is configured to reject the first registration request.
  26. 根据权利要求25所述的通信设备,其特征在于,所述第一报文为重传报文时:The communication device according to claim 25, wherein when the first message is a retransmission message:
    所述第一接收接口在接收到所述第一报文后,如果所述第一接收接口的编号不是所述接收端的所有接收接口的编号中的最小编号,所述第一接收接口,用于收集所述第一接收接口以外的其他所有接收接口关于所述第一报文的多个注册响应;After the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number among the numbers of all receiving interfaces at the receiving end, the first receiving interface is used to Collect multiple registration responses about the first message from all receiving interfaces other than the first receiving interface;
    所述第一接收接口还用于向编号小于所述第一接收接口的编号的接收接口发送所述多个注册响应中的第一注册响应,所述第一注册响应用于指示第二接收接口对所述第一报文的重复报文注册成功。The first receiving interface is further configured to send a first registration response among the plurality of registration responses to a receiving interface whose number is smaller than that of the first receiving interface, and the first registration response is used to indicate that the second receiving interface The repeated message registration of the first message is successful.
  27. 一种计算机可读存储介质,其特征在于,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述权利要求1-13中的任一项所述的方法。A computer-readable storage medium is characterized by comprising computer instructions, and when the computer instructions are run on the electronic device, the electronic device is made to execute the method described in any one of claims 1-13.
PCT/CN2021/142211 2021-12-28 2021-12-28 Packet transmission method and device WO2023122995A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180099252.2A CN117461289A (en) 2021-12-28 2021-12-28 Message transmission method and device
PCT/CN2021/142211 WO2023122995A1 (en) 2021-12-28 2021-12-28 Packet transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/142211 WO2023122995A1 (en) 2021-12-28 2021-12-28 Packet transmission method and device

Publications (1)

Publication Number Publication Date
WO2023122995A1 true WO2023122995A1 (en) 2023-07-06

Family

ID=86996957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/142211 WO2023122995A1 (en) 2021-12-28 2021-12-28 Packet transmission method and device

Country Status (2)

Country Link
CN (1) CN117461289A (en)
WO (1) WO2023122995A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957155A (en) * 2014-05-06 2014-07-30 华为技术有限公司 Message transmission method and device and interconnection interface
CN104506434A (en) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 Fast path response method and system
WO2018108093A1 (en) * 2016-12-13 2018-06-21 中国移动通信有限公司研究院 Congestion control method and apparatus, and computer storage medium
CN109981471A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method, apparatus and system for alleviating congestion
WO2021114793A1 (en) * 2019-12-09 2021-06-17 华为技术有限公司 Data forwarding method, data buffering method, device, and related apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957155A (en) * 2014-05-06 2014-07-30 华为技术有限公司 Message transmission method and device and interconnection interface
CN104506434A (en) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 Fast path response method and system
WO2018108093A1 (en) * 2016-12-13 2018-06-21 中国移动通信有限公司研究院 Congestion control method and apparatus, and computer storage medium
CN109981471A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method, apparatus and system for alleviating congestion
WO2021114793A1 (en) * 2019-12-09 2021-06-17 华为技术有限公司 Data forwarding method, data buffering method, device, and related apparatus

Also Published As

Publication number Publication date
CN117461289A (en) 2024-01-26

Similar Documents

Publication Publication Date Title
US11470000B2 (en) Medical device communication method
US10868767B2 (en) Data transmission method and apparatus in optoelectronic hybrid network
US20220311544A1 (en) System and method for facilitating efficient packet forwarding in a network interface controller (nic)
US9338019B2 (en) Scalable transport method for multicast replication
US10148581B2 (en) End-to-end enhanced reliable datagram transport
US9479587B2 (en) Scalable object storage using multicast transport
US8190960B1 (en) Guaranteed inter-process communication
US7817634B2 (en) Network with a constrained usage model supporting remote direct memory access
US7782905B2 (en) Apparatus and method for stateless CRC calculation
US5931915A (en) Method for processing early arrival messages within a multinode asynchronous data communications system
US6034962A (en) Communication method with attaching identifiers to receive request and transmit request
US20070208820A1 (en) Apparatus and method for out-of-order placement and in-order completion reporting of remote direct memory access operations
JP5353278B2 (en) Communication device
US20120023304A1 (en) Flow control for reliable message passing
JP2013511884A (en) Dynamically connected transport service
EP3739784A1 (en) Data packet sending method and related device
WO2017028399A1 (en) Communication data transmission method and system
WO2012083654A1 (en) Method and distributed system for processing internet protocol packet fragments
WO2021103016A1 (en) Packet transmission method, communication device, and communication system
WO2023122995A1 (en) Packet transmission method and device
WO2023109891A1 (en) Multicast transmission method, apparatus and system
US8150996B2 (en) Method and apparatus for handling flow control for a data transfer
JPH11328134A (en) Method for transmitting and receiving data between computers
JPH11249978A (en) Method and device for transferring data
WO2024103891A1 (en) Data processing method and apparatus

Legal Events

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

Ref document number: 21969373

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180099252.2

Country of ref document: CN