Message sending method and device, equipment, storage medium and chip
By sending detection packets through the second transmission path when network abnormality is encountered, the problem of packet loss due to network abnormality is solved, the success rate and efficiency of packet loss and retransmission are improved, and the impact on service performance is reduced.
Patent Information
- Application Number
- CN202311095025.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-26
- Publication Date
- 2025-02-28
AI Technical Summary
In the case of packet loss caused by network exceptions, the detection packet may be lost due to network exceptions not recovering, resulting in the detection packet being unable to trigger packet loss and retransmission, which increases the delay of packet loss and retransmission and affects service performance.
When there is a network abnormality in the first transmission path of the data stream, the first detection message corresponding to the data stream is received and the second detection message is sent through the second transmission path, thereby increasing the probability of the detection message reaching the receiving end.
It improves the success rate of detecting packets that can trigger unconfirmed data packet retransmission, reduces the number of times that need to be triggered to achieve packet loss and retransmission, shortens the delay caused by packet loss and retransmission, and reduces the impact of packet loss on service performance.
Smart Images

Figure CN119544831A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment, storage medium and chip for sending a message. Background Art
[0002] With the development of communication technology, the packet loss retransmission mechanism in the network has been rapidly developed. The packet loss retransmission mechanism can improve the stability of network transmission. For example, the retransmission timeout (RTO) mechanism, after sending any data message, if the sender still does not receive the confirmation (ACK) message corresponding to any data message after waiting for the RTO time, it is considered that any data message has been lost and the data message is retransmitted. However, since the RTO time is usually large, the delay of packet loss retransmission is large. Then, a faster packet loss retransmission can be achieved through the tail loss probe (TLP) mechanism. In the TLP mechanism, if the sender does not receive any confirmation (ACK) message within the probe timeout (PTO) time, it will send a probe message, which triggers the packet loss retransmission of the unconfirmed data message through the probe message. The PTO time is less than the RTO time, thereby achieving fast retransmission. The condition that the detection message can trigger packet retransmission is that the detection message successfully reaches the receiving end of any data message, and the receiving end can return an ACK message corresponding to the detection message based on the detection message.
[0003] However, if packet loss occurs due to network anomalies, and the time required to recover from the network anomaly exceeds the PTO time, the detection message will be lost because the network anomaly has not been recovered, that is, the sent detection message cannot reach the receiving end. As a result, the detection message sent by the sender cannot trigger the packet retransmission under the TLP mechanism, and needs to wait for the RTO mechanism to be triggered to achieve packet retransmission, thereby increasing the delay of packet retransmission and making packet loss have a greater impact on service performance. Summary of the invention
[0004] The present application provides a method, apparatus, device, storage medium and chip for sending a message, which are used to improve the reliability of detection message transmission.
[0005] In a first aspect, a method for sending a message is provided, the method comprising: receiving a first detection message corresponding to a data stream when a network anomaly exists in a first transmission path of the data stream; obtaining a second detection message based on the first detection message, and sending the second detection message through a second transmission path. The data stream includes an unconfirmed data message, and the first detection message is used to trigger retransmission of the unconfirmed data message.
[0006] The method is aimed at a scenario in which a data stream includes unconfirmed data packets, and a received first detection packet is used for retransmission of the unconfirmed data packet. Since a second detection packet obtained based on the first detection packet is sent through a second transmission path when a network anomaly exists in a first transmission path, the probability that the detection packet can reach the receiving end is improved, and the problem of detection packet being discarded due to network anomaly in the first transmission path of the data stream is effectively solved, so that the detection packet has a high success rate in triggering retransmission of the unconfirmed data packet, and the number of times that the RTO mechanism needs to be triggered to realize packet loss retransmission is greatly reduced, thereby shortening the delay caused by packet loss retransmission and reducing the impact of packet loss on service performance.
[0007] In a possible implementation, the second transmission path includes: the first transmission path for network abnormality recovery and at least one of the equivalent paths corresponding to the first transmission path. The destination of the equivalent path is the same as the destination of the first transmission path. Thus, the second detection message can be sent through different second transmission paths, making the method of sending the second detection message more flexible, and since there are many optional methods for the second transmission path, it can be further ensured that the second detection message can successfully reach the receiving end.
[0008] In a possible implementation, after sending the second detection message through the second transmission path, if it is identified that the data flow is interrupted within the first time after sending the second detection message, the second detection message is sent again through the second transmission path. The reason for the interruption of the data flow may be that the receiving end does not feedback the confirmation message corresponding to the second detection message due to the delayed ACK mechanism, or it may be that the receiving end does not feedback the confirmation message corresponding to the retransmitted data message due to the delayed ACK mechanism. Since the delayed ACK mechanism requires the receiving end to receive multiple messages before feedbacking a confirmation message, the present application adopts the method of sending the second detection message again, which can prompt the receiving end of the data flow to feedback the confirmation message, thereby enabling the sending end of the data flow to resume normal transmission of the data flow according to the received confirmation message.
[0009] In a possible implementation, before sending the second detection message through the second transmission path, when the first detection message includes a load, the process of saving the first detection message is also included, and the second detection message can be directly obtained based on the saved first detection message. Alternatively, when the first detection message does not include a load, partial information of the first detection message can also be saved; then it is necessary to reconstruct and obtain the second detection message based on the partial information of the saved first detection message. By saving the first detection message or partial information of the first detection message, the second detection message can be obtained at any time, thereby making the time of sending the second detection message through the second transmission path more flexible.
[0010] In a possible implementation, when a saving condition is met, the first detection message or part of the information of the first detection message is saved, so that after the subsequent network abnormality is recovered or the first transmission path is switched, the second detection message can be transmitted through the first transmission path recovered from the network abnormality or the equivalent path of the first transmission path after the switching. In this case, the second transmission path is the first transmission path recovered from the network abnormality or the equivalent path of the first transmission path. When the saving condition is not met, the second detection message is directly obtained based on the first detection message, and the second detection message is transmitted through the equivalent path of the first transmission path. In this case, the second transmission path includes the first transmission path and at least one equivalent path corresponding to the first transmission path, saving the storage space for saving the first detection message or part of the information of the first detection message. Wherein, the saving condition includes at least one of the storage space being greater than the space threshold or the processing efficiency being greater than the efficiency threshold.
[0011] In one possible implementation, the sequence number of the first detection message is the same as the maximum sequence number, and the maximum sequence number is the sequence number of the data message with the largest sequence number that has been sent in the data stream; or, the difference between the reception time of the first detection message and the reception time of the data message with the largest sequence number is greater than a time threshold, and the sequence number of the first detection message is greater than the maximum sequence number. Optionally, a flow table corresponding to the data stream is established, and during the transmission of the data stream, the reception time and the maximum sequence number of the data message with the largest sequence number are recorded in the flow table, so that the reception time and the maximum sequence number of the data message with the largest sequence number can be easily obtained based on the information recorded in the flow table. Identifying the received first detection message by the sequence number or reception time of the message can ensure the correct reception and identification of the first detection message.
[0012] In a possible implementation, the second detection message includes identification information, and the identification information is used for the communication device receiving the second detection message to protect the second detection message. By carrying the identification information in the second detection message, the communication device receiving the second detection message can protect the second detection message, thereby improving the transmission reliability of the second detection message, and further ensuring that the second detection message can successfully reach the receiving end.
[0013] In a possible implementation, the method can be applied to a network card or a top of rack (TOR) switch. Since the network card or TOR switch at the sending end is used to transmit multiple data streams, the method can be executed by the network card or TOR switch at the sending end to send detection messages corresponding to the multiple data streams.
[0014] In a second aspect, a device for sending a message is provided, which includes: a transceiver module for performing operations related to receiving and / or sending performed in the first aspect or any possible implementation of the first aspect; a processing module for performing other operations in addition to the operations related to receiving and / or sending performed in the first aspect or any possible implementation of the first aspect.
[0015] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0016] In one possible implementation, a transceiver module is used to receive a first detection message corresponding to a data stream when a network anomaly exists in a first transmission path of the data stream, the data stream includes unconfirmed data messages, and the first detection message is used to trigger retransmission of the unconfirmed data messages; and send a second detection message through a second transmission path, the second detection message being obtained based on the first detection message.
[0017] In a possible implementation, the second transmission path includes: the first transmission path after network abnormality recovery and at least one of an equivalent path corresponding to the first transmission path, and a destination of the equivalent path is the same as a destination of the first transmission path.
[0018] In a possible implementation manner, the transceiver module is further configured to send the second detection message again through the second transmission path if it is identified that the data flow is disconnected within the first time after the second detection message is sent.
[0019] In a possible implementation, the processing module is configured to save the first detection message when the first detection message includes the load; and obtain the second detection message based on the saved first detection message.
[0020] In one possible implementation, the sequence number of the first detection message is the same as the maximum sequence number, and the maximum sequence number is the sequence number of the data message with the largest sequence number that has been sent in the data stream; or, the difference between the reception time of the first detection message and the reception time of the data message with the largest sequence number is greater than the time threshold, and the sequence number of the first detection message is greater than the maximum sequence number.
[0021] In a possible implementation manner, the second detection message includes identification information, and the identification information is used by a communication device receiving the second detection message to protect the second detection message.
[0022] In a possible implementation, the device is applied to a network card or a TOR switch.
[0023] In a third aspect, a network device is provided, comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the network device implements the method for sending a message as described in the first aspect or any one of the first aspects.
[0024] Optionally, the number of the processors is one or more, and the number of the memories is one or more.
[0025] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0026] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0027] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to enable a computer to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0028] In a fifth aspect, a chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the method for sending a message as described in the first aspect or any one of the first aspects.
[0029] In the sixth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method for sending a message described in the first aspect or any one of the first aspects.
[0030] In the seventh aspect, a computer program (product) is provided, wherein the computer program (product) includes: a computer program code, and when the computer program code is executed by a computer, the computer executes the method for sending a message described in the first aspect or any one of the first aspects.
[0031] It should be understood that the beneficial effects achieved by the technical solutions of the second to seventh aspects of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of an implementation environment of a method for sending a message provided in an embodiment of the present application;
[0033] Figure 2 A flowchart of a method for sending a message provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of sending a detection message provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of another method of sending a detection message provided in an embodiment of the present application;
[0036] Figure 5 A schematic diagram of a path switching provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of another method of sending a detection message provided in an embodiment of the present application;
[0038] Figure 7 An interactive schematic diagram of a method for sending a message provided in an embodiment of the present application;
[0039] Figure 8 A schematic diagram of the structure of a device for sending a message provided in an embodiment of the present application;
[0040] Fig. 9 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0041] Fig.10 A schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0043] In data center networks (DCNs), more and more applications use reliable transmission protocols to ensure the reliability and stability of communications. Reliable transmission protocols can set a timer at the sender to monitor the packet loss of data packets to implement the packet loss retransmission function and improve the reliability of transmission through packet loss retransmission. For example, when the network causes packet loss due to various factors such as bit error ratio (BER), terminal software failure, network congestion, network threats, network failure, limited bandwidth, etc., the sender will trigger the retransmission of the lost packet message when monitoring the timer timeout, or trigger the retransmission of the lost packet message by sending a detection message.
[0044] In the embodiment of the present application, the reliable transmission protocol includes, but is not limited to, the transmission control protocol (TCP) and the remote direct memory access (RDMA) protocol. Exemplarily, the timeout retransmission mechanism in TCP includes the RTO mechanism, the TLP mechanism and the recent acknowledgment (RACK) mechanism, and the timeout retransmission mechanism in the RDMA protocol includes the queue pair timeout (QP timeout) mechanism. Taking the TLP mechanism as an example, the time of the timer is set to the PTO time, the timer is started when the sender is in the open state, and the timer is reset each time an ACK message is received, for example, the timer is cleared to zero; if the timer times out and the ACK message has not been received, the sender will send a probe message; when the probe message successfully arrives at the receiving end, and the receiving end returns the ACK message corresponding to the probe message based on the probe message, the sender determines the unconfirmed message according to the received ACK message, and retransmits the unconfirmed message.
[0045] However, when packet loss occurs due to network anomalies, and the time required to recover from the network anomaly exceeds the time of the PTO timer, the detection message will be lost because the network anomaly has not been recovered, that is, the sent detection message cannot reach the receiving end. As a result, the detection message sent by the sender cannot trigger the packet retransmission under the TLP mechanism, and needs to wait for the RTO mechanism to be triggered to achieve packet retransmission, thereby increasing the delay of packet retransmission, making the impact of packet loss on service performance greater. Therefore, the transmission of the detection message is the key to whether the timeout retransmission mechanism that needs to be triggered by the detection message, such as the TLP mechanism, is effective, and whether the timeout retransmission mechanism is effective is the key to whether the data stream can quickly resume normal transmission.
[0046] An embodiment of the present application provides a method for sending messages, which can be applied to data transmission scenarios in data centers or campus services. For data transmission using reliable transmission protocols such as TCP and RDMA protocols, and triggering packet loss retransmission by sending detection messages, this method can improve the success rate of detection messages triggering timeout retransmission, thereby improving the reliability and stability of data flow transmission in the network.
[0047] For example, Figure 1 A schematic diagram of an implementation environment of a method for sending a message provided in an embodiment of the present application. Figure 1 As shown, the implementation environment includes CLOS networking of multiple end-side devices and data centers. The implementation environment supports data transmission using reliable transmission protocols such as TCP or RDMA protocols. Optionally, the end-side device can be a terminal or a server, which is used to carry different applications. Applications between end-side devices can communicate with each other through CLOS networking. Among them, the number of end-side devices and the architecture of CLOS networking can be flexibly adjusted according to factors such as network scale. The inventor of CLOS networking is Charles Clos, so it is named CLOS networking.
[0048] For example, Figure 1 The network architecture including three layers in CLOS networking is used as an example to illustrate. The first layer is the access layer (access layer), which can also be called the edge layer (edge layer). The switch of the access layer is usually located on the top of the cabinet, so the switch of the access layer can be called a TOR switch, and the TOR switch is connected to the end-side device; the second layer is the aggregation layer (aggregation layer), which can also be called the distribution layer (distribution layer). The switch of the aggregation layer can be called a spine switch. The spine switch is connected to the TOR switch and is used to provide firewall, intrusion detection and network analysis services; the third layer is the core layer (core layer). The core layer switch can be called a core switch, which is used to provide high-speed forwarding for data entering and leaving the data center and provide connectivity for multiple aggregation layers. Among them, the switch can be a box switch or a frame switch. For example, the TOR switch can be a box TOR switch or a frame TOR switch.
[0049] Exemplarily, when any end-side device transmits data to another end-side device through CLOS networking, the end-side device that sends the data is the sender, and the end-side device that receives the data is the receiver. The method provided in the embodiment of the present application can be applied to any communication device other than the sender and the receiver, wherein the sender or the receiver refers to the main body of the transport layer protocol corresponding to the data stream. For example, in a transmission scenario using TCP, the main body of the transport layer protocol corresponding to the data stream is the protocol stack, and the method can be applied to any communication device other than the protocol stack, such as a network card or a switch; in a transmission scenario using the RDMA protocol, the main body of the transport layer protocol corresponding to the data stream is the protocol stack or the network card, and the method can be applied to any communication device other than the protocol stack and the network card, such as a switch. Optionally, the method can be applied to each communication device other than the sender and the receiver for data stream transmission; or, the method can also be applied only to a communication device near the sender of data stream transmission, for example, Figure 1 TOR switch as shown or Figure 1 The network card of the end-side device is shown.
[0050] The communication device mentioned in the embodiments of the present application may be a network device such as a switch or a router, or may be a component of a network device, such as a single board or a line card on the network device, or may be a functional module on the network device, or may be a chip used to implement the method of the present application. The embodiments of the present application do not specifically limit the execution subject of the method. When the communication device is a chip, the transceiver module used to implement the method may be, for example, an interface circuit of the chip, and the processing module may be a processing circuit with processing functions in the chip. The connection method between the communication devices includes, but is not limited to, direct connection via Ethernet cable or optical cable.
[0051] See also Figure 2 , Figure 2 The present invention provides a flowchart of a method for sending a message. For example, the method can be applied to Figure 1 In the implementation environment shown in the figure, taking the first communication device executing the method as an example, the first communication device may be Figure 1 The network card, TOR switch, spine switch or core switch of the end-side device shown in the figure. Figure 2 As shown, the method for sending a message includes but is not limited to the following steps 201 and 202.
[0052] Step 201: When a network anomaly exists in a first transmission path of a data stream, a first detection message corresponding to the data stream is received, the data stream includes unconfirmed data messages, and the first detection message is used to trigger retransmission of the unconfirmed data messages.
[0053] Among them, network anomalies refer to factors that may cause packet loss in the transmitted data stream. For example, network anomalies include but are not limited to network congestion or network failures, and network failures may be black hole failures caused by incorrect configuration. Therefore, in the case where there is a network anomaly in the first transmission path of the data stream, there may be packet loss in the transmission of the data stream, which in turn causes the data stream to include unconfirmed data packets. In other words, the first detection message corresponding to the data stream is sent by the sender of the data stream when it is determined that the data stream includes unconfirmed data packets, and the first detection message is used to trigger the retransmission of the unconfirmed data packets.
[0054] In a possible implementation of an embodiment of the present application, an unconfirmed data message may refer to a data message that has not been confirmed within a reference time after the data message is sent, and the reference time can be flexibly set in different reliable transmission protocols. For example, in the TLP mechanism, the reference time is the PTO time, then the unconfirmed data message refers to a data message that has been sent after the PTO time has expired but the corresponding confirmation message has not been received. The confirmation message corresponding to any data message is used to confirm that any data message has completed transmission, and the confirmation message can be an ACK message.
[0055] For example, in the TLP mechanism, the PTO time may be a maximum value between 2 times the smoothed round-trip time (SRTT) and 10 milliseconds (ms). Figure 3 The schematic diagram of sending a probe message is shown. After the sender receives ACK1 corresponding to the data message (data) 1 returned by the receiver (receiver), the timer is reset. The timeout period of the timer is the PTO period. If no ACK message is received within the PTO period, the timer will time out. Then the sender triggers to send a first probe message. The first probe message can be the retransmitted data4 or the next data5 that has not been sent yet. Since data2, data3 and data4 have been sent but the corresponding ACK messages have not been received, it can be determined that the data stream includes unconfirmed data messages, and the unconfirmed data messages are data2, data3 and data4.
[0056] It can be seen in the TLP mechanism that the first detection message can be a data message in the data stream. In this case, the first communication device needs to identify whether the data message of the received data stream is the first detection message of the data stream. The method of identifying whether the data message is the first detection message is not limited in the embodiment of the present application, and it can be identified by the sequence number of the data message or the receiving time of the data message. For example, for any received data message, if the sequence number of any data message is the same as the maximum sequence number, then any data message is determined to be the first detection message; or, if the difference between the receiving time of any data message and the receiving time of the data message with the largest sequence number is greater than the time threshold, and the sequence number of any data message is greater than the maximum sequence number, then any data message is determined to be the first detection message. Among them, the maximum sequence number is the sequence number of the data message with the largest sequence number that has been sent in the data stream, and the time threshold can be set according to experience, or flexibly adjusted according to the application scenario. For example, the time threshold is 1ms.
[0057] That is to say, the sequence number of the first detection message is the same as the maximum sequence number; or, the difference between the reception time of the first detection message and the reception time of the data message with the largest sequence number is greater than the time threshold, and the sequence number of the first detection message is greater than the maximum sequence number. In one possible implementation, the first communication device establishes a corresponding flow table for the data stream, extracts information for each data message transmitted by the data stream to obtain the sequence number (sequence number) of each data message, and records the maximum sequence number corresponding to the data stream and the reception time (time) of the data message corresponding to the maximum sequence number in the flow table. Therefore, the maximum sequence number and the reception time of the data message corresponding to the maximum sequence number can be easily obtained through the information recorded in the flow table.
[0058] Take the flow table shown in Table 1 as an example, where the key (KEY) is a flow table index used to distinguish different data flows, and the KEY includes five-tuple information of the data flow, including a source internet protocol (SIP) address, a destination internet protocol (DIP) address, a source port (SPort), a destination port (DPort) and a protocol (protocol) number; the value (value) is the record information corresponding to the data flow, and the value includes but is not limited to l2r sep, l2r time, r2l sep and r2l time, where l2r sep corresponds to the maximum sequence of data packets that have been transmitted by the data flow from the sending end to the receiving end, l2r time corresponds to the reception time of the data packet corresponding to the maximum sequence number from the sending end to the receiving end, r2l sep corresponds to the maximum sequence of confirmation packets that have been transmitted by the data flow from the receiving end to the sending end, and r2l time corresponds to the reception time of the confirmation packet corresponding to the maximum sequence from the receiving end to the sending end.
[0059] Table 1
[0060]
[0061] Optionally, the first communication device may identify whether the data packet of the received data stream is the first detection packet when sensing that there is a network anomaly in the first transmission path of the data stream. The embodiment of the present application does not limit the manner in which the first communication device senses that there is a network anomaly in the first transmission path of the data stream. For example, the first communication device may scan the flow table corresponding to the data stream according to the scanning period. If the scanning result indicates that the r2l sep corresponding to the data stream has not been updated, or the difference between the l2r time and the r2l time is greater than the difference threshold, it indicates that the transmission of the data stream is interrupted, and then it is determined that there is a network anomaly in the first transmission path of the data stream. Among them, the scanning period and the difference threshold can be set according to experience, or flexibly adjusted according to the application scenario.
[0062] Step 202: Send a second detection message through a second transmission path, where the second detection message is obtained based on the first detection message.
[0063] After receiving the first detection message, since the transmission path of the first detection message is the first transmission path, and there is a network anomaly in the first transmission path, if the first detection message is still sent according to the first transmission path, the probability of packet loss of the first detection message is relatively high. The embodiment of the present application sends a second detection message obtained based on the first detection message through the second transmission path, and the second detection message has the function of the first detection message, that is, the second detection message is also used to trigger the retransmission of unconfirmed messages. As a result, the success rate of the second detection message arriving at the receiving end is improved, thereby improving the success rate of the second detection message being able to trigger the retransmission of unconfirmed messages.
[0064] In an embodiment of the present application, the second transmission path includes the first transmission path of network abnormality recovery and at least one of the equivalent paths corresponding to the first transmission path, and the destination of the equivalent path is the same as the destination of the first transmission path. Below, the implementation process of sending the second detection message through the second transmission path is illustrated by examples for different situations of the second transmission path.
[0065] In case 1, the second transmission path is the first transmission path after the network abnormality is recovered.
[0066] In this case, after receiving the first detection message, the first communication device first saves the first detection message or saves part of the information of the first detection message because there is a network anomaly in the first transmission path; when it is determined that the network anomaly of the first transmission path has been recovered, the second detection message is obtained based on the saved first detection message or the saved part of the information of the first detection message, and the second detection message is sent through the first transmission path from which the network anomaly has been recovered, so that the second detection message can reach the receiving end through the first transmission path from which the network anomaly has been recovered.
[0067] Optionally, in the case where the first detection message includes a message header and a payload, for example, the first detection message belongs to a data message in a data stream, the first detection message is directly saved, and then the second detection message can be directly obtained based on the first detection message. In the case where the first detection message includes a message header but does not include a payload, part of the information in the message header of the first detection message can be saved, and then the first detection message can be reconstructed based on the part of the information, and the second detection message can be obtained based on the first detection message. The embodiment of the present application does not limit the content of the part of the information, and it is sufficient to be able to reconstruct the first detection message based on the part of the information, for example, the part of the information includes a sequence number and a control bit, etc.
[0068] The method of obtaining the second detection message based on the first detection message can be to use the first detection message as the second detection message, or to add marking information to the first detection message to obtain the second detection message, and the marking information is used for the communication device receiving the second detection message to protect the second detection message. The saved first detection message or the part of the information of the saved first detection message can be deleted within a certain time after sending the second detection message, or a fixed time can be set to age the saved first detection message or the part of the information of the first detection message, and it can also be covered by the information of other subsequent detection messages of the data flow.
[0069] For example, see Figure 4 In the schematic diagram of sending a detection message shown in the figure, when the first communication device identifies that the received data4 is a detection message, it first saves data4, and after the network abnormality is recovered, sends data4 through the first transmission path recovered from the network abnormality. This allows data4 to reach the receiving end through the first transmission path recovered from the network abnormality, and the receiving end returns ACK2 corresponding to data4 to the sending end based on the received data4, so that the sending end can trigger the retransmission of data2 and data3 based on the received ACK2.
[0070] Case 2: The second transmission path is an equivalent path corresponding to the first transmission path.
[0071] In the second situation, after receiving the first detection message, the first communication device first saves the information of the first detection message because there is a network anomaly in the first transmission path; when the first transmission path of the data stream is switched to the equivalent path corresponding to the first transmission path, the second detection message is obtained based on the saved information of the first detection message, and the second detection message is sent through the equivalent path corresponding to the first transmission path, so that the second detection message can reach the receiving end through the equivalent path corresponding to the first transmission path. Among them, the equivalent path corresponding to the first transmission path is at least one path among multiple paths that are equivalent to the first transmission path. The method of saving the first detection message and obtaining the second detection message in the second situation is the same as that in the first situation, and will not be repeated here.
[0072] Exemplarily, when the first communication device senses that there is a network anomaly in the first transmission path, the first communication device can obtain a first equivalent path corresponding to the first transmission path according to equal-cost multi-path routing (ECMP) information, and then switch the data flow from the first transmission path to the first equivalent path, see Figure 5The schematic diagram of the path switching shown is to enable the data packets of the subsequent data streams to be transmitted based on the first equal-cost path. If the first detection message is received before the path switching is completed, then according to the method provided in the embodiment of the present application, the received first detection message can be saved first, and after the path switching is completed, the second detection message obtained based on the saved first detection message can be transmitted based on the first equal-cost path after the switching.
[0073] Case three: the second transmission path includes the first transmission path and an equivalent path corresponding to the first transmission path.
[0074] In the third situation, after receiving the first detection message, the first communication device obtains at least one equivalent path corresponding to the first transmission path because there is a network anomaly in the first transmission path, copies multiple second detection messages based on the first detection message, and then sends multiple second detection messages through the first transmission path and the equivalent path corresponding to the first transmission path. The probability of the second detection message reaching the receiving end can be increased by sending multiple paths. For the receiving end, in one possible implementation, the receiving end normally receives the first second detection message that arrives, and can directly discard the subsequent identical second detection messages received.
[0075] Therefore, through the three implementation methods in the above-mentioned situations 1 to 3, the probability of the second detection message reaching the receiving end can be increased, and then the probability of the second detection message triggering the packet loss retransmission of the sending end can be increased. Optionally, considering the storage capacity and processing capacity of the first communication device, the second detection message can be sent according to the implementation method in situation 1 or situation 2 when the first communication device meets the preservation condition; when the first communication device does not meet the preservation condition, the second detection message can be sent according to the implementation method in situation 3. Among them, the preservation condition may include at least one of the storage space being greater than the space threshold or the processing efficiency being greater than the efficiency threshold. Both the space threshold and the efficiency threshold can be set according to experience, or flexibly adjusted according to the application scenario.
[0076] In addition to packet loss caused by network anomalies, and the time required for network anomaly recovery exceeds the time of the PTO timer, resulting in the failure of the detection message to reach the receiving end, and thus causing the detection message to fail to trigger timeout retransmission, in the case where the delayed ACK mechanism is configured at the receiving end, since the sending condition of the ACK message in the delayed ACK mechanism is to receive multiple messages and feedback an ACK message, even if the detection message successfully reaches the receiving end, if the receiving end receives the detection message and does not meet the sending condition of the ACK message, the receiving end will not return the ACK message corresponding to the detection message. Or, even if the receiving end returns the ACK message corresponding to the detection message, after the sending end retransmits the unconfirmed data message, due to the small number of unconfirmed data messages, the receiving end can also fail to trigger the feedback of the ACK message of the retransmitted message due to the delayed ACK mechanism. In other words, after the detection message reaches the receiving end, due to the delayed ACK mechanism of the receiving end, the corresponding ACK message is not fed back, which will also cause the detection message to fail to restore the normal transmission of the data flow after sending, that is, the transmission of the data flow still has the phenomenon of interruption.
[0077] In the embodiment of the present application, no matter which of the above-mentioned situations 1 to 3 is used, after sending the second detection message, if it is identified that the data flow is disconnected within the first time after sending the second detection message, the second detection message is sent again through the second transmission path. Among them, the reason for the disconnection of the data flow may be that the receiving end does not feedback the confirmation message corresponding to the second detection message due to the delayed ACK mechanism, or the receiving end does not feedback the confirmation message corresponding to the retransmitted data message due to the delayed ACK mechanism. The embodiment of the present application does not limit the identification method of the data flow disconnection. For example, it is determined that the data flow is disconnected based on the fact that the confirmation message corresponding to the second detection message is not received, or it is determined that the data flow is disconnected based on the difference between r2l sep and r2l sep in the flow table. The first time can be set according to experience, or it can be flexibly adjusted according to the application scenario. For example, the first time can be the scanning period of the flow table. In this way, it can avoid the phenomenon that the data flow fails to achieve packet loss and retransmission due to sending the second detection message once when the receiving end is configured with a delayed ACK mechanism.
[0078] Take the implementation method in case 1 as an example, see Figure 6 After the data2 and data3 retransmitted by the sender arrive at the receiver, the receiver fails to feedback the ACK message due to the delayed ACK mechanism; when the first communication device reaches the first time after sending data4 once, it recognizes that the data flow is still broken, so it reconstructs data4 and sends the data4 to the receiver again through the second transmission path. The retransmitted data4 enables the receiver to meet the condition of sending the ACK message in the delayed ACK mechanism, that is, the receiver returns ACK3 to the sender.
[0079] The method provided in the embodiment of the present application aims at a scenario in which a data stream includes unconfirmed data packets, and the sender of the data stream triggers the retransmission of the unconfirmed data packets by sending a first detection packet. The method adopts a method of sending a second detection packet obtained based on the first detection packet through a second transmission path, thereby improving the probability that the detection packet can reach the receiving end, and effectively solving the problem of detection packets being discarded due to network anomalies in the first transmission path of the data stream, so that the detection packet has a high success rate in triggering the retransmission of the unconfirmed data packets, and greatly reduces the number of times that the RTO mechanism needs to be triggered to realize the retransmission of lost packets, thereby shortening the delay caused by the retransmission of lost packets and reducing the impact of packet loss on service performance.
[0080] See also Figure 7 , Figure 7 The following is an interactive diagram of a method for sending a message provided in an embodiment of the present application. For example, the method can be applied to Figure 1 In the implementation environment shown in the figure, taking the first communication device and the second communication device executing the method as an example, the first communication device can be Figure 1 The network card or TOR switch of the end-side device shown in the figure, the second communication device can be Figure 1 The spine switches and core switches shown in the figure are as follows. Figure 7 As shown, the method for sending a message includes but is not limited to the following steps 701 and 703.
[0081] Step 701, when a network anomaly exists in a first transmission path of a data stream, a first communication device receives a first detection message corresponding to the data stream, the data stream includes unconfirmed data messages, and the first detection message is used to trigger retransmission of the unconfirmed data messages.
[0082] Step 702: The first communication device sends a second detection message through a second transmission path, where the second detection message is obtained based on the first detection message.
[0083] In the embodiment of the present application, the implementation of step 701 and step 702 can refer to the implementation of step 201 and step 202, and will not be repeated here. In addition, in the process of the first communication device acquiring the second detection message based on the first detection message, identification information can be added on the basis of the first detection message, so that the second detection message includes the identification information, and the identification information is used for the communication device receiving the second detection message to protect the second detection message.
[0084] Step 703: The second communication device receives the second detection message sent by the first communication device, and sends the second detection message through the second transmission path, or sends the third detection message through the third transmission path.
[0085] In the case where the second communication device sends the second detection message through the second transmission path, if the second detection message includes identification information, the second communication device can protect the second detection message. Exemplarily, if the second communication device is not a receiving end of the data stream, the second communication device can protect the transmission of the second detection message through a high priority queue or direct switching, further improving the success rate of the second detection message reaching the receiving end; if the second communication device is a receiving end of the data stream, the second communication device can protect the second detection message by directly returning an ACK message to ensure that the receiving end can return an ACK message corresponding to the second detection message.
[0086] In the case where the second communication device sends a third detection message through a third transmission path, if the second communication device receives a second detection message when there is a network anomaly on the second transmission path, and the data stream includes an unconfirmed data message, the second detection message is used to trigger the retransmission of the unconfirmed data message; then the second communication device obtains the third detection message based on the second detection message, and sends the third detection message through the third transmission path, and the third transmission path includes at least one of the equivalent paths corresponding to the second transmission path and the second transmission path for network anomaly recovery. In an embodiment of the present application, the implementation method of the second communication device sending the third detection message through the third transmission path in step 703 can refer to the implementation method of the first communication device sending the second detection message through the second transmission path in step 202, which will not be repeated here. In addition, if the second detection message includes identification information, the second communication device can also identify the received data message as the second detection message based on the identification information, then the second communication device does not need to identify the second detection message by establishing a flow table, saving the overhead of the second communication device maintaining the flow table.
[0087] The above describes a method for sending a message according to an embodiment of the present application. Corresponding to the above method, an embodiment of the present application also provides a device for sending a message. Figure 8 is a schematic diagram of a device for sending a message provided in an embodiment of the present application, the device is applied to Figure 2 or Figure 7 The first communication device shown, or the device is applied to Figure 7 The second communication device shown. Figure 8 As shown in the following multiple modules, the Figure 8 The device for sending a message shown can perform all or part of the operations performed by the first communication device or the second communication device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Figure 8 As shown, the device comprises:
[0088] The transceiver module 801 is used to execute Figure 2 or Figure 7 The receiving and / or sending related operations performed by the first communication device in the method for sending a message shown in the figure, or for performing Figure 7 Other operations other than the receiving and / or sending related operations performed by the second communication device in the method for sending a message shown;
[0089] Processing module 802, for executing Figure 2 or Figure 7 Other operations other than the receiving and / or sending related operations performed by the second communication device in the method for sending a message shown in the figure, or for performing Figure 7 Other operations besides the receiving and / or sending related operations performed by the second communication device in the method for sending a message shown.
[0090] In a possible implementation, the transceiver module 801 includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0091] In one possible implementation, the transceiver module 801 is used to receive a first detection message corresponding to a data stream when a network anomaly exists in a first transmission path of the data stream, the data stream includes unconfirmed data messages, and the first detection message is used to trigger retransmission of the unconfirmed data messages; and send a second detection message through a second transmission path, the second detection message being obtained based on the first detection message.
[0092] In a possible implementation, the second transmission path includes: the first transmission path after network abnormality recovery and at least one of an equivalent path corresponding to the first transmission path, and a destination of the equivalent path is the same as a destination of the first transmission path.
[0093] In a possible implementation manner, the transceiver module 801 is further configured to send the second detection message again through the second transmission path if it is identified that the data flow is disconnected within the first time after the second detection message is sent.
[0094] In a possible implementation, the processing module 802 is configured to save the first detection message when the first detection message includes the load; and obtain the second detection message based on the saved first detection message.
[0095] In one possible implementation, the sequence number of the first detection message is the same as the maximum sequence number, and the maximum sequence number is the sequence number of the data message with the largest sequence number that has been sent in the data stream; or, the difference between the reception time of the first detection message and the reception time of the data message with the largest sequence number is greater than the time threshold, and the sequence number of the first detection message is greater than the maximum sequence number.
[0096] In a possible implementation manner, the second detection message includes identification information, and the identification information is used by a communication device receiving the second detection message to protect the second detection message.
[0097] In a possible implementation, the device is applied to a network card or a TOR switch.
[0098] It should be understood that the above Figure 8 When the device provided realizes its functions, 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 to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here. Figure 8 The beneficial effects of the device shown can be seen in Figure 2 and Figure 7 The beneficial effects of the method shown will not be described in detail here.
[0099] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application is shown. Fig. 9 The network device 2000 shown is used to perform the above Figure 2 or Figure 7 The operations involved in the method for sending a message are shown in FIG. 2. The network device 2000 is, for example, a switch, a router, etc. The network device 2000 can be implemented by a general bus architecture.
[0100] like Fig. 9 As shown, the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
[0101] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0102] Optionally, the network device 2000 further includes a bus. The bus is used to transmit information between the components of the network device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0103] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0104] The communication interface 2004 uses any transceiver type device for communicating with other devices or communication networks, and the communication network can be Ethernet, radio access network (radio access network, RAN) or wireless local area network (wireless local area networks, WLAN) and the like. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (Fast Ethernet, FE) interface, a Gigabit Ethernet (Gigabit Ethernet, GE) interface, an Asynchronous Transfer Mode (Asynchronous Transfer Mode, ATM) interface, a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0105] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Fig. 90 and CPU1 shown in FIG. Each of these processors may be a single-core CPU processor or a multi-core CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0106] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as Fig. 9 2001 and 2005 are shown in FIG. Each of these processors may be a single-core CPU or a multi-core CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0107] In a specific implementation, as an embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0108] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the method for sending a message provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.
[0109] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the first network device in each of the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the instruction in the memory 2003, so that Fig. 9 The illustrated network device 2000 is capable of performing all or part of the operations performed by the first communication apparatus.
[0110] Specifically, processor 2001 is used to receive a first detection message corresponding to a data flow when there is a network anomaly in a first transmission path of the data flow, the data flow includes unconfirmed data messages, and the first detection message is used to trigger retransmission of the unconfirmed data messages; and send a second detection message through a second transmission path, and the second detection message is obtained based on the first detection message.
[0111] For the sake of brevity, other optional implementations are not described here in detail.
[0112] The network device 2000 may also correspond to the above Figure 8 In the apparatus for sending a message shown, each functional module in the apparatus for sending a message is implemented by software of the network device 2000. In other words, the functional modules included in the apparatus for sending a message are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.
[0113] in, Figure 2 or Figure 7 Each step of the method for sending a message shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0114] See also Fig.10 , Fig.10 FIG. 2 shows a schematic diagram of the structure of a network device 2100 provided by another exemplary embodiment of the present application. Fig.10 The network device 2100 shown is used to perform the above Figure 2 or Figure 7 All or part of the operations involved in the method for sending a message shown. The network device 2100 is, for example, a switch, a router, etc. The network device 2100 can be implemented by a general bus architecture.
[0115] like Fig.10 As shown, the network device 2100 includes: a main control board 2110 and an interface board 2130 .
[0116] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.
[0117] The interface board 2130 is also called a line processing unit (LPU), a line card (linecard) or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (physical interface card, PIC) 2133.
[0118] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
[0119] The network processor 2132 is used to implement the forwarding processing of the message. The network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processor 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.
[0120] The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
[0121] Optionally, the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.
[0122] Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device 2100 has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate via the switching fabric board 2120.
[0123] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
[0124] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
[0125] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
[0126] In a specific embodiment, the network device 2100 corresponds to the above Figure 8 The device for sending a message applied to the first communication device or the second communication device is shown. In some embodiments, Figure 8 The transceiver module 801 in the device for sending messages is equivalent to the physical interface card 2133 in the network device 2100 , and the processing module 802 is equivalent to the central processor 2111 or the network processor 2132 in the network device 2100 .
[0127] It should be understood that the processor may be a CPU, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced reduced instruction set machine (ARM) architecture.
[0128] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0129] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).
[0130] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements any of the above methods for sending a message.
[0131] The embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and / or processes in the above method embodiments.
[0132] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes any of the above methods for sending a message.
[0133] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above methods for sending messages.
[0134] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (solid state disk)), etc.
[0135] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0136] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0137] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
[0138] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0139] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.
[0140] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0141] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0144] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0145] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0146] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution 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 computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0147] In the present application, the terms "first", "second", etc. are used to distinguish between identical or similar items having substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image. Both the first image and the second image may be images, and in some cases, may be separate and different images.
[0148] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0149] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0150] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0151] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0152] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0153] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0154] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0155] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0156] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for sending a message, characterized in that: The method comprises: In the case where a network anomaly exists in a first transmission path of a data stream, receiving a first detection message corresponding to the data stream, the data stream including an unconfirmed data message, the first detection message being used to trigger retransmission of the unconfirmed data message; A second detection message is sent through a second transmission path, where the second detection message is obtained based on the first detection message.
2. The method according to claim 1, characterized in that The second transmission path includes: the first transmission path after the network abnormality is recovered and at least one of an equivalent path corresponding to the first transmission path, and a destination of the equivalent path is the same as a destination of the first transmission path.
3. The method according to claim 1 or 2, characterized in that: After sending the second detection message through the second transmission path, the method further includes: If it is identified that the data flow is disconnected within the first time after the second detection message is sent, the second detection message is sent again through the second transmission path.
4. The method according to any one of claims 1 to 3, characterized in that: Before sending the second detection message through the second transmission path, the method further includes: In a case where the first detection message includes a load, saving the first detection message; The sending of the second detection message through the second transmission path includes: The second detection message is obtained based on the stored first detection message, and the second detection message is sent through the second transmission path.
5. The method according to any one of claims 1 to 4, characterized in that: The sequence number of the first detection message is the same as the maximum sequence number, and the maximum sequence number is the sequence number of the data message with the largest sequence number that has been sent in the data stream; or, A difference between a reception time of the first detection message and a reception time of the data message with the largest sequence number is greater than a time threshold, and the sequence number of the first detection message is greater than the maximum sequence number.
6. The method according to any one of claims 1 to 5, characterized in that: The second detection message includes identification information, and the identification information is used by a communication device receiving the second detection message to protect the second detection message.
7. The method according to any one of claims 1 to 6, characterized in that: The method is applied to a network card or a TOR switch on the top of a cabinet.
8. A device for sending a message, characterized in that: The device comprises: A transceiver module, used to perform the receiving and / or sending related operations performed by the method described in any one of claims 1 to 7; A processing module, used to perform other operations besides the receiving and / or sending related operations performed by the method according to any one of claims 1 to 7.
9. A network device, characterized in that: The network device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the network device implements the method for sending a message described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor so that the computer implements the method for sending a message as described in any one of claims 1 to 7.
11. A chip, characterized in that: The chip includes a processor, and the processor is used to call and execute instructions stored in the memory from the memory, so that the communication device equipped with the chip implements the method for sending a message as described in any one of claims 1-7.
12. A chip, characterized in that: The chip includes: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected via an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method for sending a message as described in any one of claims 1-7.
13. A computer program product, characterized in that The computer program product comprises: a computer program code, wherein the computer program code is loaded and executed by a computer so as to enable the computer to implement the method for sending a message according to any one of claims 1 to 7.