Message transmission method, device, equipment, system and storage medium
By sending packets redundantly on the same line during long-distance line transmission, the problem of increasing delay caused by packet loss is solved, and the effect of reducing delay and improving timeliness is achieved.
Patent Information
- Application Number
- CN202311590413.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-05-27
AI Technical Summary
In long-distance line transmission, packet loss problem leads to an increase in delay. The prior art reduces packet loss rate by sending packets redundantly, but increases transmission delay.
The first network device sends messages redundantly through the same line. After receiving the first message, the first network device actively replicates the second message and sends it through the same line to avoid the difference between the transmission delay of the second message and the first message.
It reduces the delay and packet loss rate of packet transmission, and improves the timeliness of delay-sensitive services.
Smart Images

Figure CN120050226A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and particularly to a message transmission method, apparatus, device, system, and storage medium. Background Art
[0002] With the development of communication technologies, there are service demand scenarios for long-distance line transmission with low latency requirements. For example, between different data centers in industries such as finance, securities, and futures, there are data transmission requirements for cross-market real-time market quotes and trading services. Since there may be various problems with the degradation of the transmission quality of the transmission line, packet loss is likely to occur. Therefore, the packet loss rate can be reduced by redundantly sending messages. However, redundantly sending messages also has the problem of a relatively large transmission latency. Therefore, a message transmission method for redundantly sending messages is needed. Summary of the Invention
[0003] This application provides a message transmission method, apparatus, device, system, and storage medium for redundantly sending messages through the same line.
[0004] In a first aspect, a message transmission method is provided. Taking a first network device executing this method as an example, the first network device receives a first message; copies the first message to obtain a second message; and sends the first message and the second message through a first line, where the first line is the transmission line corresponding to the first message.
[0005] In this method, after receiving the first message, the first network device can actively copy the first message to obtain the second message, and redundantly send the first message and the second message through the same line. Among them, redundantly sending messages can reduce the packet loss rate of message transmission. Sending the first message and the second message through the same line can avoid a too large difference in the transmission latency between the second message and the first message, and thus avoid a large latency caused by the receiving side waiting for the second message after the first message is lost, reducing the latency of message transmission. And for latency-sensitive services, if the latency of the second message reaching the receiving side is too large after the first message is lost, the second message may lose its effectiveness. Therefore, this method can also improve the timeliness of message transmission.
[0006] Among them, the first network device is connected to the second network device through the first line. Optionally, the first network device and the second network device can be connected through multiple lines, and the first line can refer to the line with the highest transmission quality among the multiple lines. The highest transmission quality includes, but is not limited to, at least one of the smallest static delay, the smallest dynamic delay, the fewest forwarding hops, the smallest packet loss rate, or the largest bandwidth. The static delay can be determined based on the physical distance of the line. For example, the static delay is positively correlated with the physical distance of the line, that is, the longer the physical distance, the larger the static delay, and the shorter the physical distance, the smaller the static delay; the dynamic delay can be determined based on the actual transmission delay measurement of the line. Taking the highest transmission quality including the smallest static delay as an example, the first line can refer to the line with the shortest physical distance among the multiple lines.
[0007] In a possible implementation manner, in addition to copying the first message to obtain the second message, the first network device can also copy the first message to obtain the third message; and send the third message through the second line different from the first line. That is to say, the first network device can copy multiple copies of the first message to obtain multiple retransmission messages. One of the retransmission messages is the second message, and the second message can be transmitted through the same line as the first message. The other retransmission messages are the third messages, and the third messages can be transmitted through lines different from the first message. In the scenario where consecutive packet losses occur on the first line, if both the first message and the second message are lost, the receiving side can still receive the third message through the second line, further reducing the packet loss rate of the message.
[0008] Among them, when the first line is the line with the highest transmission quality among the multiple lines, the second line can be the line with the highest transmission quality among the multiple lines except the first line. Thus, the transmission quality gap between the second line and the first line will not be too large, avoiding the transmission delay of the third message being too different from the transmission delay of the first message, and further avoiding the large delay caused by the receiving side waiting for the third message after the first message is lost, and also ensuring the timeliness of the third message.
[0009] In a possible implementation manner, the method of sending the first message and the second message through the first line can be to first send the first message through the first line; when the specified duration after sending the first message is reached, send the second message through the first line. That is to say, there is a time interval of the specified duration between the sending time of the second message and the sending time of the first message. If the first message and the second message are sent continuously, there will be a phenomenon that both the first message and the second message are lost due to consecutive packet losses on the first line. Therefore, sending the second message at an interval from the first message can improve the success rate of the second message reaching the receiving side, that is, reduce the packet loss rate of the second message.
[0010] In a possible implementation, for the received first packet, the first network device may first determine whether the first packet meets the first condition; when it is determined that the first packet meets the first condition, the first packet is then copied to obtain a second packet; when it is determined that the first packet does not meet the first condition, the first packet is directly sent through the first line without copying the first packet, that is, no redundant transmission of the packet is performed. Among them, the first condition includes that the traffic flow corresponding to the first packet belongs to a high-priority service, and the actual transmission quality of the first line does not meet the quality requirement. Thus, this method performs redundant transmission on the packets of high-priority services, saving the resource overhead caused by redundant transmission of the packets of non-high-priority services. When the actual transmission quality of the first line does not meet the quality requirement, redundant transmission is performed, saving the resource overhead caused by redundant transmission when the actual transmission quality of the first line meets the quality requirement. Furthermore, the bandwidth consumption is reduced to a certain extent, and the flexible adjustment of the redundant transmission strategy according to the service type and the actual transmission quality is realized.
[0011] In a possible implementation, the first packet is a packet that needs to be retransmitted determined based on a retransmission strategy, and the retransmission strategy is determined based on the actual transmission quality of the first line. Thus, it can be ensured that the packets for active retransmission all meet the retransmission strategy. Since the retransmission strategy can be flexibly adjusted according to the actual transmission quality of the first line, the packets for active retransmission are adapted to the actual transmission quality of the first line, and there will be no waste of resources due to excessive number of retransmitted packets, nor a large packet loss rate due to too few retransmitted packets.
[0012] Among them, the manner of determining the retransmission strategy based on the actual transmission quality of the first line may be to determine a retransmission ratio based on the actual transmission quality of the first line. The retransmission ratio refers to the ratio between the number of retransmitted packets and the number of original packets in the traffic flow; obtain a retransmission strategy that meets the retransmission ratio. Exemplarily, the actual transmission quality of the first line is negatively correlated with the retransmission ratio. The worse the actual transmission quality of the first line, the larger the determined retransmission ratio; the better the actual transmission quality of the first line, the smaller the determined retransmission ratio. A retransmission strategy that meets the retransmission ratio may be to retransmit M packets every N packets, then the retransmission ratio is M / (M + N); or, the retransmission strategy includes sampling M packets out of every N packets for retransmission, then the retransmission ratio is M / N. N and M are positive integers, and N is greater than or equal to M.
[0013] In a possible implementation, when it is necessary to determine whether a first message meets a first condition, and the first condition includes that the actual transmission quality of a first line does not meet the quality requirement, the way for a first network device to determine that the first message meets the first condition may be to receive a notification message indicating that the actual transmission quality of the first line does not meet the quality requirement, and determine that the first message meets the first condition based on the notification message. Among them, the notification message may be obtained by a second network device on the receiving side of the first line by monitoring the actual transmission quality of the first line. The second network device may directly send the notification message to the first network device through a communication protocol, or report the notification message to a controller, and the controller sends the notification message to the first network device. In this way, the first network device can simply and directly determine that the first message meets the first condition according to the notification message, improving the efficiency of determining that the first message meets the first condition.
[0014] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message; the second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmission message. By carrying the type identifier and the flow number in the message, the receiving side can determine the processing method of the message according to the type identifier and the flow number. For example, it can be determined whether to send the message or discard the message.
[0015] In a possible implementation, the first message includes a first number, and the first number indicates the message number of the first message among the messages sent on the first line. The first number is used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line. By carrying the message numbers of the original messages sent on the same line in the original message, the receiving side can accurately monitor the actual transmission quality of the first line according to the message numbers of the original messages sent on the same line.
[0016] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line. The first number and the second number are used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line. By carrying the message numbers of the original messages and the retransmission messages sent on the same line in the original message and the retransmission message, the receiving side can more accurately monitor the actual transmission quality of the first line according to the message numbers of the original message and the retransmission message sent on the same line.
[0017] In a second aspect, a message transmission method is provided. Taking the execution of this method by a second network device as an example, the second network device receives a first message and a second message through a first line. Among them, the second message is obtained by copying the first message, and the first line is the transmission line corresponding to the first message.
[0018] In this method, the second network device receives the first message and the second message obtained by copying the first message through the same line, which can avoid the transmission delay of the second message being too different from that of the first message, thereby avoiding the large delay caused by the receiving side waiting for the second message after the first message is lost, and reducing the transmission delay of the message. And for delay-sensitive services, if the delay of the second message reaching the receiving side is too large after the first message is lost, the second message may lose its validity. Therefore, this method can also improve the timeliness of message transmission.
[0019] In a possible implementation, in addition to receiving the first message and the second message through the first line, the second network device can also receive a third message through a second line. Among them, the third message is obtained by copying the first message, and the second line is different from the first line. Optionally, when the second network device does not receive the first message and the second message through the first line, that is, both the first message and the second message are lost, the second network device can also receive the third message through the second line, reducing the packet loss rate of the message.
[0020] In a possible implementation, the receiving time of the second message is later than that of the first message, and the difference between the receiving time of the second message and that of the first message is greater than or equal to a specified duration. That is to say, the second message and the first message are sent at intervals, which can avoid the situation that both the first message and the second message are lost due to consecutive packet losses on the first line, improving the success rate of the second message reaching the receiving side, that is, reducing the packet loss rate of the second message.
[0021] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmission message.
[0022] Optionally, the processing method of the second network device for the original packet may include: based on the first packet being the original packet, if the flow ID is consecutive with the maximum consecutive packet ID, then send the first packet; if the flow ID is not consecutive with the maximum consecutive packet ID, then discard the first packet, where the maximum consecutive packet ID is the largest packet ID among the packets of the service flow received in sequence according to the packet ID order. The processing method of the second network device for the retransmission packet may include: based on the second packet being the retransmission packet, if the flow ID is greater than the maximum consecutive packet ID, then send the second packet; if the flow ID is less than or equal to the maximum consecutive packet ID, then discard the second packet.
[0023] Thus, by carrying the type identifier and the flow ID in the packet, the second network device can send the original packet and the retransmission packet in sequence, and actively discard the repeatedly received packets, without the need to perform deduplication and sorting through caching, saving the overhead of the cache space, avoiding the delay caused by caching, and also avoiding packet loss caused by cache space overflow.
[0024] In a possible implementation, after sending the first packet, the first network device updates the maximum consecutive packet ID to the flow ID of the first packet; after sending the second packet, if the flow ID of the second packet is consecutive with the maximum consecutive packet ID, then update the maximum consecutive packet ID to the flow ID of the second packet. By updating the maximum consecutive packet ID in a timely manner, the accuracy of the maximum consecutive packet ID is ensured.
[0025] Optionally, if the end-side device of the service flow connected to the second network device allows out-of-order packet reception, then the processing method of the second network device for the original packet may include: based on the first packet being the original packet, if the flow ID is consecutive with the maximum consecutive packet ID, then send the first packet; if the flow ID is not consecutive with the maximum consecutive packet ID, then record the flow ID and the maximum consecutive packet ID as a set of lost packet hole boundaries in the lost packet list and send the first packet. Wherein, the maximum packet ID is the largest packet ID among the packets of the received service flow, and the lost packet list indicates the flow ID of the lost packet through at least one set of lost packet hole boundaries. The processing method of the second network device for the retransmission packet may include: based on the second packet header being the retransmission packet, if the flow ID is the same as the flow ID of the lost packet indicated by the lost packet list, then send the second packet; if the flow ID is different from the flow ID of the lost packet indicated by the lost packet list, then discard the second packet.
[0026] Thus, by carrying the type identifier and the flow number in the message, the second network device can send all the received original messages, ensuring that the received original messages are not lost. Moreover, through the record of the packet loss list, the second network device can send the retransmission messages corresponding to the lost messages and actively discard the repeatedly received messages. Similarly, there is no need to perform deduplication and sorting through caching, saving the overhead of cache space, avoiding the latency caused by caching, and also avoiding packet loss caused by cache space overflow.
[0027] In a possible implementation, after the second network device sends the first message, it also updates the maximum consecutive message number, the maximum message number, and the packet loss list based on the flow number of the first message; after the second network device sends the second message, it also updates the packet loss list and the maximum consecutive message number based on the flow number of the second message. By updating the maximum consecutive message number, the maximum message number, and the packet loss list in a timely manner, the accuracy of the maximum consecutive message number, the maximum message number, and the packet loss list is ensured.
[0028] In a possible implementation, the survival duration of the message number of the lost message indicated in the packet loss list is less than the aging duration. Optionally, in the case where the survival duration of any message number of the lost message indicated in the packet loss list exceeds the aging duration, the packet loss list is updated so that the message numbers of the lost messages indicated in the packet loss list do not include the any message number. If the survival duration of any message number in the packet loss list exceeds the aging duration, it means that both the original message and the retransmission message corresponding to the any message number are lost, and it is difficult for the second network device to receive the retransmission message corresponding to the any message number subsequently. That is, the record of the any message number in the packet loss list has become invalid. Therefore, by ensuring that the survival duration of the message numbers of the lost messages indicated in the packet loss list is less than the aging duration, the validity of the information recorded in the packet loss list can be ensured.
[0029] In a possible implementation, the first message includes a first number, and the first number indicates the message number of the first message among the messages sent on the first line; after the second network device receives the first message and the second message through the first line, it can also monitor the actual transmission quality of the first line based on the first number. Thus, by carrying the message numbers of the messages sent on the same line in the original message, the receiving side can accurately monitor the actual transmission quality of the first line according to the message numbers of the original messages sent on the same line.
[0030] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line. After the second network device receives the first message and the second message through the first line, it can also monitor the actual transmission quality of the first line based on the first number and the second number. Thus, by carrying the message numbers of the messages sent on the same line in the original message and the retransmitted message, the receiving side can more accurately monitor the actual transmission quality of the first line according to the message numbers of the original message and the retransmitted message sent on the same line.
[0031] In a possible implementation, when monitoring the actual transmission quality of the first line, if the actual transmission quality of the first line does not meet the quality requirements, a notification message indicating that the actual transmission quality of the first line does not meet the quality requirements can be sent, so that the first network device on the sending side of the first line can determine whether the subsequent messages meet the first condition according to the notification message; alternatively, the second network device can directly send the actual transmission quality of the first line, so that the first network device can determine whether the subsequent messages meet the first condition according to the actual transmission quality of the first line.
[0032] In any possible implementation of the first aspect or the second aspect, the message transmission method can be applied to a wide area network dedicated line interconnection scenario. Optionally, the first line is a wide area network dedicated line, and the first network device and the second network device are respectively the line outlet devices at both ends of the wide area network dedicated line. Thus, the method can reduce the packet loss rate and transmission delay of the messages on the wide area network dedicated line.
[0033] In a third aspect, a message transmission device is provided. The device is applied to the first network device and includes:
[0034] A transceiver module, configured to perform operations related to receiving and / or sending performed in the first aspect or any possible implementation of the first aspect;
[0035] A processing module, configured to perform other operations other than the operations related to receiving and / or sending performed in the first aspect or any possible implementation of the first aspect.
[0036] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is configured to perform operations related to receiving, and the sending module is configured to perform operations related to sending.
[0037] In a possible implementation, the transceiver module is configured to receive the first message; the processing module is configured to copy the first message to obtain a second message; the transceiver module is configured to send the first message and the second message through the first line, where the first line is the transmission line corresponding to the first message.
[0038] In a possible implementation, the processing module is further configured to copy the first message to obtain a third message; the transceiver module is further configured to send the third message through a second line, where the second line is different from the first line.
[0039] In a possible implementation, the transceiver module is configured to send the first message through the first line; and in the case of reaching a specified duration after sending the first message, send a second message through the first line.
[0040] In a possible implementation, the processing module is configured to copy the first message to obtain a second message when determining that the first message meets a first condition, where the first condition includes that the service flow corresponding to the first message belongs to a high-priority service and the actual transmission quality of the first line does not meet the quality requirement.
[0041] In a possible implementation, the first message is a message that needs to be retransmitted determined based on a retransmission policy, and the retransmission policy is determined based on the actual transmission quality of the first line.
[0042] In a possible implementation, the transceiver module is further configured to receive a notification message indicating that the actual transmission quality of the first line does not meet the quality requirement, where the notification message is obtained by the second network device on the receiving side of the first line by monitoring the actual transmission quality of the first line; the processing module is further configured to determine that the first message meets the first condition based on the notification message.
[0043] In a possible implementation, the first message includes a first number, where the first number indicates the message number of the first message among the messages sent on the first line, and the first number is used by the second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
[0044] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line. The first number and the second number are used by the second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
[0045] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message; the second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmitted message.
[0046] In a possible implementation, the device is applied to a wide area network dedicated line interconnection scenario.
[0047] Fourthly, a message transmission device is provided. The device is applied to a second network device and includes:
[0048] A transceiver module, configured to perform operations related to receiving and / or sending as performed in the second aspect or any possible implementation manner of the second aspect;
[0049] A processing module, configured to perform other operations except for the operations related to receiving and / or sending as performed in the second aspect or any possible implementation manner of the second aspect.
[0050] In a possible implementation manner, the transceiver module includes a receiving module and / or a sending module. The receiving module is configured to perform operations related to receiving, and the sending module is configured to perform operations related to sending.
[0051] In a possible implementation manner, the transceiver module is configured to receive a first message and a second message through a first line. The second message is obtained by copying the first message, and the first line is the transmission line corresponding to the first message.
[0052] In a possible implementation manner, the transceiver module is further configured to receive a third message through a second line. The third message is obtained by copying the first message, and the second line is different from the first line.
[0053] In a possible implementation manner, the receiving time of the second message is later than the receiving time of the first message, and the difference between the receiving time of the second message and the receiving time of the first message is greater than or equal to a specified duration.
[0054] In a possible implementation manner, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and a flow number. The second type identifier indicates that the second message is a retransmitted message;
[0055] The transceiver module is further configured to, based on the first message being an original message, send the first message if the flow number is consecutive with the maximum consecutive message number; the processing module is further configured to, based on the first message being an original message, discard the first message if the flow number is not consecutive with the maximum consecutive message number; the transceiver module is further configured to, based on the second message being a retransmitted message, send the second message if the flow number is greater than the maximum consecutive message number; the processing module is further configured to, based on the first message being a retransmitted message, discard the second message if the flow number is less than or equal to the maximum consecutive message number. Wherein, the maximum consecutive message number is the largest message number among the messages of the service flow received consecutively in the order of message numbers.
[0056] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow of the first message pair. The second message includes a second type identifier and a flow number. The second type identifier indicates that the second message is a retransmission message;
[0057] The transceiver module is further configured to send the first message if the first message is an original message. The processing module is further configured to, if the first message is an original message and the flow number is not continuous with the maximum consecutive message number, record the flow number and the maximum consecutive message number as a set of packet loss hole boundaries in the packet loss list. The transceiver module is further configured to send the second message if the second message header is a retransmission message and the flow number is the same as the flow number of the lost message indicated by the packet loss list. The processing module is further configured to discard the second message if the first message is a retransmission message and the flow number is different from the flow number of the lost message indicated by the packet loss list. Wherein, the maximum consecutive message number is the largest message number in the messages of the service flow received continuously in the order of message numbers, and the packet loss list indicates the flow numbers of the lost messages through at least one set of packet loss hole boundaries.
[0058] In a possible implementation, the first message includes a first number, and the first number indicates the message number of the first message in the messages sent on the first line. The processing module is further configured to monitor the actual transmission quality of the first line based on the first number.
[0059] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message in the messages sent on the first line, and the second number indicates the message number of the second message in the messages sent on the first line. The processing module is further configured to monitor the actual transmission quality of the first line based on the first number and the second number.
[0060] In a possible implementation, the transceiver module is further configured to send a notification message indicating that the actual transmission quality of the first line does not meet the quality requirement when the actual transmission quality of the first line does not meet the quality requirement. The notification message is used for the first network device on the sending side of the first line to determine whether the subsequent messages meet the first condition.
[0061] In a possible implementation, the device is applied to a wide area network dedicated line interconnection scenario.
[0062] In a fifth aspect, a network device is provided. The network device includes: a processor, the processor is coupled with a memory, and at least one program instruction or code is stored in the memory. The at least one program instruction or code is loaded and executed by the processor so that the network device implements the message transmission method according to any one of the first aspect or the second aspect above.
[0063] Optionally, the processor is one or more, and the memory is one or more.
[0064] Optionally, the memory may be integrated with the processor, or the memory and the processor are separately arranged.
[0065] In a specific implementation process, the memory may be a non-transitory memory, such as a read only memory (ROM), which may be integrated with the processor on the same chip, or may be separately arranged on different chips. The present application does not limit the type of the memory and the setting manner of the memory and the processor.
[0066] In a sixth aspect, a communication device is provided, and the device includes: a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. And when the processor executes the instructions stored in the memory, the communication device is enabled to execute the method in the first aspect or any possible implementation manner of the first aspect, or execute the method in the second aspect or any possible implementation manner of the second aspect.
[0067] In a seventh aspect, a message transmission system is provided, and the message transmission system includes a first network device and a second network device;
[0068] The first network device is used to execute the method described in the first aspect or any possible implementation manner of the first aspect, and the second network device is used to execute the method described in the second aspect or any possible implementation manner of the second aspect.
[0069] In an eighth aspect, a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium. The instruction is loaded and executed by a processor to enable a computer to implement the method in the first aspect or any possible implementation manner of the first aspect, or implement the method in the second aspect or any possible implementation manner of the second aspect.
[0070] In a ninth aspect, a computer program (product) is provided, and the computer program (product) includes: computer program code. When the computer program code is run by a computer, the computer is enabled to execute the methods in the above aspects.
[0071] In a tenth aspect, a chip is provided, including a processor, which is used to call and run instructions stored in a memory, so that a communication device installed with the chip executes the methods in the above aspects.
[0072] In the eleventh aspect, another chip is provided, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute the code in the memory. When the code is executed, the processor is configured to execute the methods in the above aspects.
[0073] It should be understood that for the beneficial effects obtained by the technical solutions and corresponding possible implementation manners of the third aspect to the eleventh aspect of the present application, reference may be made to the technical effects of the first aspect and the second aspect and their corresponding possible implementation manners described above, which will not be elaborated here. Description of the Drawings
[0074] Figure 1 It is a schematic diagram of a data transmission scenario provided by an embodiment of the present application;
[0075] Figure 2 It is a schematic diagram of an implementation environment of a message transmission method provided by an embodiment of the present application;
[0076] Figure 3 It is an interaction schematic diagram of a message transmission method provided by an embodiment of the present application;
[0077] Figure 4 It is a schematic diagram of a message format provided by an embodiment of the present application;
[0078] Figure 5 It is a schematic diagram of a message number provided by an embodiment of the present application;
[0079] Figure 6 It is a schematic diagram of a process of sending a message provided by an embodiment of the present application;
[0080] Figure 7 It is another schematic diagram of a process of sending a message provided by an embodiment of the present application;
[0081] Figure 8 It is a schematic diagram of a process of receiving a message provided by an embodiment of the present application;
[0082] Figure 9 It is another schematic diagram of a process of receiving a message provided by an embodiment of the present application;
[0083] Figure 10 It is a schematic diagram of the structure of a message transmission device provided by an embodiment of the present application;
[0084] Figure 11 It is a schematic diagram of the structure of a network device provided by an embodiment of the present application;
[0085] Figure 12A schematic structural diagram of a network device provided by an embodiment of the present application. Detailed implementation manners
[0086] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0087] For a communication scenario with long-distance line transmission and low latency requirements, there is a problem of deteriorated service response latency performance caused by packet loss on the long-distance line. Among them, long-distance line transmission may refer to line transmission with a physical transmission distance exceeding a distance threshold, and the distance threshold can be flexibly set according to the application scenario. For example, the distance threshold can be 1600 kilometers; low latency may refer to a transmission latency lower than a latency threshold, and the latency threshold can be flexibly set according to the application scenario. For example, the latency threshold can be 8 milliseconds (ms).
[0088] Exemplarily, in the data transmission scenario between different data centers in industries such as finance, securities, and futures, since most different data centers are thousands of kilometers apart, and generally connected by dedicated lines, and most of the services transmitted between data centers are latency-sensitive services, it belongs to a typical service demand scenario with long distance and low latency. For example, referring to Figure 1 the data transmission scenario shown, data center 1 and data center 2 are connected by line 1 and line 2. The service system 1 in data center 1 is connected to the line through a network device, and the service system 2 in data center 2 is connected to the line through a network device. Among them, there are differences in the transmission quality between line 1 and line 2. For example, the transmission distance of line 1 is 1600 kilometers, and the transmission distance of line 2 is greater than or equal to 2500 kilometers, so there are differences in the transmission distance between line 1 and line 2. Since the transmission distance affects the transmission latency, there are differences in the transmission latency between line 1 and line 2. Optionally, line 1 can be called a low-latency line, and line 2 can be called a conventional line.
[0089] Due to various quality deterioration problems that may exist in the line, there is a packet loss rate of up to 0.1% on the line, and packet loss will cause the receiving end to be unable to quickly obtain service data. Also, in a long-distance environment, whether it is packet retransmission under the transmission control protocol (TCP) or the user datagram protocol (UDP), such as Figure 1As shown in the figure, the data center 2 as the receiving end needs to send a packet loss notification to the data center 1 as the sending end to trigger the retransmission of lost packets in the data center. Thus, no matter which line is used for packet retransmission, it will cause the receiving end to wait for at least twice the transmission delay of the line, and further cause the service transmission to fail to meet the low-delay requirement.
[0090] In the related art, the sending end copies multiple copies of the packet and sends the multiple copies of the packet simultaneously through multiple lines. The receiving end needs to cache the received packets and perform duplicate removal and sorting on the cached packets to obtain the service data. However, when sending the multiple copies of the packet simultaneously through multiple lines, if the difference in transmission delay between different lines is relatively large, the receiving end still needs to wait for a long time to obtain the service data in case of packet loss.
[0091] The embodiment of the present application provides a packet transmission method, which transmits the first packet and the second packet obtained by copying the first packet through the same line, reduces the packet loss rate of packet transmission by redundant packet sending, and avoids the delay caused by the difference in transmission quality between different lines by sending through the same line. The embodiment of the present application does not limit the application scenario of this method, and it can be applied to any line interconnection scenario, especially the scenario where there are differences in transmission quality between different lines. Optionally, this method can be applied to the wide area network dedicated line interconnection scenario, for example, the wide area network dedicated line interconnection scenario under financial securities enterprises.
[0092] See Figure 2 , Figure 2 which is a schematic diagram of the implementation environment of a packet transmission method provided by the embodiment of the present application. As Figure 2 shown, this implementation environment includes multiple end-side devices, and any end-side device is connected to the line egress device. Optionally, any end-side device can be directly connected to the line egress device; or, as Figure 2 shown, any end-side device can be connected to the line egress device through multiple leaf nodes and multiple spine nodes. The line egress devices are connected by at least one line, Figure 2 and lines 1, 2, and 3 are taken as examples for illustration. Optionally, the physical distance of the line transmission between the line egress devices is greater than the distance threshold, that is, lines 1, 2, and 3 are all long-distance transmission lines.
[0093] In a possible implementation manner, the end-side device may be a terminal or a server. For example, the end-side device is a terminal or a server corresponding to a business system in industries such as finance, securities, and futures. The line egress device may be a network device such as a switch or a router. The method provided in the embodiments of the present application may be executed by the line egress device. Among them, the method provided in the embodiments of the present application may be executed by the line egress device, including but not limited to: being executed by a network device such as a switch or a router; or being executed by a part of components on a network device such as a switch or a router. For example, a part of components may be a single board, a line card, or a functional module, or may also be a chip for implementing the method provided in the embodiments of the present application. The embodiments of the present application do not make specific limitations. When the method is executed by a chip, the transceiver module for implementing the method may be, for example, the interface circuit of the chip, and the processing module may be the processing circuit with processing functions in the chip.
[0094] See Figure 3 , Figure 3 which is an interaction schematic diagram of a message transmission method provided in the embodiments of the present application. This method may be executed by the interaction between the first network device and the second network device. The first network device and the second network device are respectively devices on both sides of the line. In the embodiments of the present application, the first network device is used as the device on the sending side, and the second network device is used as the device on the receiving side for illustration. Exemplarily, this method can be applied to Figure 2 the implementation environment shown in Figure 2 any line egress device shown in Figure 2 and the second network device is Figure 3 another line egress device shown in Figure 3 As shown in Figure 3 , this message transmission method includes the following steps 301-step 304.
[0095] Step 301, the first network device receives a first message.
[0096] In the implementation of the present application, the first network device receives the first message sent by the end-side device. For example, the end-side device is the end-side device shown in Figure 2 . For the received first message, the first network device may directly execute step 302, that is, copy the first message to obtain a second message; or may first determine whether the first message meets the first condition. When it is determined that the first message meets the first condition, then execute step 302, and when it is determined that the first message does not meet the first condition, there is no need to copy the first message, and the first message is directly sent through the transmission line corresponding to the first message, that is, no redundant transmission of the message is performed.
[0097] Among them, the first condition may include that the traffic flow corresponding to the first message belongs to an ultra-high priority service, that is, messages of traffic flows of ultra-high priority services are all copied. Thus, this method can redundantly send messages of ultra-high priority services, ensuring relatively high transmission quality of ultra-high priority services and saving resource overhead caused by redundantly sending services other than ultra-high priority services.
[0098] Alternatively, the first condition may include that the traffic flow corresponding to the first message belongs to a high priority service and the actual transmission quality of the transmission line corresponding to the first message does not meet the quality requirement, that is, messages of traffic flows of high priority services are copied when the actual transmission quality does not meet the quality requirement. Among them, the requirement for transmission quality of ultra-high priority services is higher than that of high priority services for transmission quality. For example, taking the transmission quality as the packet loss rate, an ultra-high priority service refers to a service with a packet loss rate less than the first packet loss rate threshold, and a high priority service refers to a service with a packet loss rate less than the second packet loss rate threshold, and the first packet loss rate threshold is less than the second packet loss rate threshold.
[0099] Thus, this method can redundantly send messages of high priority services when the actual transmission quality does not meet the quality requirement, ensuring relatively high transmission quality of high priority services when the actual transmission quality does not meet the quality requirement, saving resource overhead caused by redundantly sending when the actual transmission quality meets the quality requirement, and thus reducing bandwidth consumption to a certain extent, realizing flexible adjustment of the redundancy sending strategy according to the service type and actual transmission quality.
[0100] Alternatively, the first condition may include both of the above two situations at the same time, that is, the first condition includes that the traffic flow corresponding to the first message belongs to an ultra-high priority service; and the traffic flow corresponding to the first message belongs to a high priority service and the actual transmission quality of the transmission line corresponding to the first message does not meet the quality requirement.
[0101] The embodiments of this application do not limit the quality requirement that the actual transmission quality needs to meet, and can be flexibly adjusted according to the application scenario. Optionally, different quality requirements are configured corresponding to different measurement indicators of the actual transmission quality. For example, if the measurement indicator of the actual transmission quality is the packet loss rate, the quality requirement may be that the packet loss rate is greater than the first threshold; if the measurement indicator of the actual transmission quality is the transmission delay, the quality requirement may be that the transmission delay is greater than the second threshold; if the measurement indicator of the actual transmission quality is the line availability, the quality requirement may be that the line availability is less than the third threshold; other possible measurement indicators of the actual transmission quality are not elaborated one by one in the embodiments of this application. In short, that the actual transmission quality does not meet the quality requirement can indicate a decline in the actual transmission quality. The first threshold, the second threshold, and the third threshold can all be set according to experience or flexibly adjusted according to the application scenario.
[0102] Optionally, after receiving the first message, the first network device may determine the service flow corresponding to the first message and the transmission line corresponding to the first message, and then determine the service type to which the service flow corresponding to the first message belongs according to the service flow configuration information, that is, determine whether the service flow corresponding to the first message is an ultra-high priority service, a high priority service or a low priority service, and obtain whether the actual transmission quality has deteriorated according to the transmission line corresponding to the first message.
[0103] In an embodiment of the present application, the first network device includes service flow configuration information, and the service flow configuration information includes the service types corresponding to multiple service flows. Optionally, different service flows may be identified by five-tuple information or three-tuple information. Among them, the five-tuple information includes source internet protocol (SIP), destination internet protocol (DIP), source port (SPort), destination port (DPort), and protocol number (protocol), and the three-tuple information includes SIP, DIP, and protocol. Since the five-tuple information or three-tuple information of the messages of the same service flow is the same, the service flow corresponding to the first message can be identified by the five-tuple information or three-tuple information included in the first message.
[0104] Taking the identification of the service flow by the five-tuple information as an example, the service flow configuration information may be the service type configuration table shown in Table 1. Exemplarily, the service type corresponding to the service flow with SIP being 192.168.1.2, DIP being 192.168.1.3, Sport being 2000, DPort being 5002, and protocol being TCP is 0, and 0 represents a key guarantee requirement service, and the key guarantee requirement service may correspond to an ultra-high priority service; the service type corresponding to the service flow with SIP being 192.168.1.4, DIP being 192.168.1.5, Sport being 4000, DPort being 5002, and protocol being TCP is 1, and 1 represents a general guarantee requirement service, and the general guarantee requirement service may correspond to a high priority service. For services without guarantee requirements, they may not be recorded in Table 1 to avoid too many entries in Table 1. Therefore, if there is no entry for the service flow in Table 1, it may be determined that the service flow corresponds to a service without guarantee requirements, and the service without guarantee requirements may correspond to a low priority service.
[0105] Table 1
[0106] SIP DIP SPort DPort protocol Service type 192.168.1.2 192.168.1.3 2000 5002 TCP 0 192.168.1.4 192.168.1.5 4000 5002 TCP 1 192.168.1.6 192.168.1.7 6000 5002 UDP 1 … … … … … …
[0107] When a first network device needs to determine whether a first message meets a first condition, and the first condition includes that the actual transmission quality of the transmission line corresponding to the first message does not meet the quality requirement, and when the first network device has determined that the traffic flow corresponding to the first message belongs to a high-priority service, the way for the first network device to determine that the first message meets the first condition can be to receive a notification message that the actual transmission quality of the first line does not meet the quality requirement, and determine that the first message meets the first condition based on the notification message. Among them, the notification message can be obtained by the second network device on the receiving side of the first line by monitoring the actual transmission quality of the first line. The second network device can directly send the notification message to the first network device through the communication protocol, or report the notification message to the controller, and the controller sends the notification message to the first network device. In this way, the first network device can simply and directly determine that the first message meets the first condition according to the notification message, improving the efficiency of determining that the first message meets the first condition.
[0108] Alternatively, the way for the first network device to determine that the first message meets the first condition can also be to receive the actual transmission quality of the first line, and determine that the first message meets the first condition based on the fact that the actual transmission quality of the first line does not meet the quality requirement. Among them, the actual transmission quality of the first line can also be monitored by the second network device on the receiving side of the first line. The second network device can directly send the actual transmission quality of the first line to the first network device through the communication protocol, or report the actual transmission quality of the first line to the controller, and the controller sends the actual transmission quality of the first line to the first network device. In this way, the first network device actively judges whether the actual transmission quality of the first line meets the quality requirement, and then determines whether the first message meets the first condition according to the judgment result, improving the accuracy of determining that the first message meets the first condition, and facilitating the first network device to flexibly adjust the quality requirement, improving the flexibility of determining that the first message meets the first condition.
[0109] Step 302, the first network device copies the first message to obtain a second message.
[0110] In the embodiments of the present application, the first network device can actively copy the first message to obtain a second message, thereby realizing redundant transmission of the message. Optionally, the embodiments of the present application do not limit the way of copying the first message to obtain the second message. It is only necessary that the second message includes the same payload data as the first message. That is, when the second network device receives any one of the first message and the second message, it is determined that the first message has not been lost. Among them, the first message can be called the original message, and the second message can be called the retransmission message.
[0111] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmitted message. By carrying the type identifier and the flow number in the message, the receiving side can determine the processing method of the message according to the type identifier and the flow number. For example, it can determine whether to send the message or discard the message. Optionally, the first type identifier and the flow number included in the first message can be added by the end device that sends the first message; or, the first type identifier and the flow number included in the first message can also be added by the first network device.
[0112] In a possible implementation, the first message includes a first type identifier and a flow number, and the second message includes a second type identifier and a flow number. Among them, the first type identifier indicates that the first message is an original message; the second type identifier indicates that the second message is a retransmitted message; the flow number indicates the message number of the first message in the service flow corresponding to the first message, that is, the flow number is the unified number of the messages in the same service flow. Since the second message is obtained by copying the first message, the message numbers of the second message and the first message in the service flow are the same. The type identifier and the flow number carried in the message are used to implement the multiple transmission and selective reception strategy, that is, the network device on the receiving side can determine whether to receive the message or discard the message according to whether the message is an original message or a retransmitted message, and the sorting situation of the flow numbers, reducing the packet loss rate of the message and avoiding redundant reception of the message.
[0113] The embodiments of this application do not limit the numbering method of the flow number. The natural sequence numbering can be performed according to the order of arrival of the messages. For example, the message number of the first message in the service flow is the initial value, the message number of the second message in the service flow is the initial value plus a fixed step, and the message number of the third message in the service flow is the message number of the second message plus a fixed step, and so on. Among them, both the initial value and the fixed step can be set according to experience or flexibly adjusted according to the application scenario. For example, the initial value is 1 and the fixed step is 1.
[0114] Exemplarily, the first network device maintains a traffic flow table as shown in Table 2. Among them, one traffic flow corresponds to one flow number. When the first packet of any traffic flow arrives at the first network device, the first network device adds a row in Table 2 to record the flow number of the any traffic flow. The initial value of the flow number corresponding to any traffic flow is 1. Thus, the flow number 1 can be carried in the first packet. Subsequently, every time the first network device receives a packet of any traffic flow, it adds 1 to the flow number position corresponding to the any traffic flow in Table 2 and carries the flow number in Table 2 in the received packet. Or, every time the first network device receives a packet of any traffic flow, it first reads the flow number recorded in Table 2, carries the value after adding 1 to the flow number recorded in Table 2 in the received packet, and then synchronously updates the flow number position in Table 2 by adding 1.
[0115] Table 2
[0116] SIP DIP SPort DPort protocol Flow number 192.168.1.2 192.168.1.3 2000 5002 TCP 1 192.168.1.4 192.168.1.5 4000 5002 TCP 5 192.168.1.6 192.168.1.7 6000 5002 UDP 3 … … … … … …
[0117] In a possible implementation manner, the first packet includes a first number, and the first number indicates the packet number of the first packet among the packets sent on the transmission line corresponding to the first packet, that is, the first number is the unified number of all packets sent on the same line. For example, the first number is the port packet number. One port of a line corresponds to one port packet number. The port packet number carried in the packet can be used by the second network device on the receiving side of the transmission line corresponding to the first packet to monitor the actual transmission quality of the line corresponding to the port. That is, the first number is used by the second network device on the receiving side of the transmission line corresponding to the first packet to monitor the actual transmission quality of the line corresponding to the port. Thus, by carrying the port packet number sent on the same line in the original packet, the receiving side can accurately monitor the actual transmission quality of the line according to the port packet number of the original packet sent on the same line.
[0118] Alternatively, based on the first message including a first number, the second message may include a second number, where the second number indicates the message number of the second message among the messages sent on the transmission line corresponding to the first message. That is, the first number and the second number are the unified numbers of all messages sent on the same line. In this case, the first number and the second number are used by the second network device on the receiving side of the transmission line corresponding to the first message to monitor the actual transmission quality of the line corresponding to this port. Thus, by carrying the port message numbers of the messages sent on the same line in the original message and the retransmitted message, the receiving side can accurately monitor the actual transmission quality of the line based on the port message numbers of the original message and the retransmitted message sent on the same line. That is to say, in the embodiments of the present application, the port message number may be carried only in the original message, and the second network device monitors the actual transmission quality based on the reception situation of the original message; or the port message number may be carried in both the original message and the retransmitted message, and the second network device monitors the actual transmission quality based on the reception situations of the original message and the retransmitted message.
[0119] The embodiments of the present application do not limit the numbering method of the port message number, and the natural sequence numbering can be performed according to the sending order of the ports. Similar to the flow numbering method, the port message number of the first message sent by the port is the initial value, the port message number of the second message sent by the port is the initial value plus a fixed step, the port message number of the third message sent by the port is the port message number of the second message plus the fixed step, and so on. Among them, the initial value and the fixed step can both be set according to experience or flexibly adjusted according to the application scenario. The initial value of the flow numbering and the initial value of the port message number can be the same or different, and the fixed step of the flow numbering and the fixed step of the port message number can also be the same or different.
[0120] Exemplarily, the first network device maintains a port flow table as shown in Table 3. One port number corresponds to one port, one port corresponds to one port message number, and one port corresponds to one line. Exemplarily, when sending the first message through any port, add a row in Table 3 to record the port message number of this any port. The initial value of the port message number of any port is 1. Thus, the port message number carried in the first message sent through any port can be 1; subsequently, every time the first network device sends a message through any port, add 1 to the position of the port message number corresponding to the any port in Table 3, and carry the port message number recorded in Table 3 in the sent message; or, every time the first network device sends a message through any port, first read the port message number recorded in Table 3, carry the value after adding 1 to the port message number recorded in Table 3 in the sent message, and then synchronously update the position of the port message number in Table 3 by adding 1.
[0121] Table 3
[0122] Port number Port number xxGE1 / 0 / 1 100 xxGE1 / 0 / 2 25 xxGE1 / 0 / 3 30 … …
[0123] In a possible implementation manner, the first message may include a first type identifier, a flow number, and a first number, and the second message may include a second type identifier, a flow number, and a second number. Taking the first message including a first type identifier, a flow number, and a first number as an example, the first type identifier, the flow number, and the first number may be carried in the message header of the first message. The message header of the first message may refer to the inner message header or an outer message header newly added outside the inner message header.
[0124] Exemplarily, the first message received by the first network device includes a first message header, which is the inner message header. A type identifier field, a flow number field, and a port message number field are obtained by extension in the first message header. Then, the first type identifier is carried through the type identifier field, the flow number is carried through the flow number field, and the first number is carried through the port message number field. Or, the first message received by the first network device includes a first message header, and a second message header is newly added outside the first message header. The second message header is the newly added outer message header, and the second message header includes a type identifier field, a flow number field, and a port message number field. Then, the first type identifier is carried through the type identifier field, the flow number is carried through the flow number field, and the first number is carried through the port message number field.
[0125] See Figure 4 , taking the message header mentioned in the embodiments of the present application as a virtual extensible local area network (VXLAN) header as an example, the message format of the first message or the second message may be as Figure 4 shown. Among them, the first message or the second message includes an outer message header, an inner message header, and a payload. The outer message header includes an outer Ethernet header, an outer IP header, an outer UDP header, a type identifier field, a flow number field, and a port message number field. The inner message header includes an inner Ethernet header and an inner IP header (inner internet protocol header, inner IP header).
[0126] Among them, the type identifier field may occupy 8 bits (bit), the flow number field may occupy 24 bits, and the port message number field may occupy 32 bits. If Figure 4If the message shown is the first message, the type identification field indicates the first type identification. For example, a value of 00000001 in the type identification field indicates the first type identification, that is, 00000001 represents the original message; if Figure 4 the message shown is the second message, the type identification field indicates the second type identification. For example, a value of 00000010 in the type identification field indicates the second type identification, that is, 00000010 represents the retransmitted message. Optionally, the 32-bit port message number field includes a 24-bit VXLAN network identifier (VNI) field and an 8-bit reserved field.
[0127] Exemplarily, refer to Figure 5 the schematic diagram of the first network device sending messages shown. The messages sent by the first network device carry the message numbers corresponding to different traffic flows respectively, that is, the flow numbers, and also carry the message numbers corresponding to the same port, that is, the port message numbers. As Figure 5 shown, the first network device sends the messages of flow 1 and the messages of flow 2 through the same port. Among them, the white boxes represent the messages of flow 1, and the black boxes represent the messages of flow 2. Then, the message number corresponding to flow 1 is the sending order of the white boxes, the message number corresponding to flow 2 is the sending order of the black boxes, and the message number corresponding to the port is the sending order of the white boxes and the black boxes together.
[0128] In the embodiments of the present application, in addition to copying the first message to obtain the second message, the first network device can also copy the first message to obtain the third message. Since the third message is also a retransmitted message and the message numbers of the third message and the first message in the traffic flow are the same, the third message also includes the second type identification and the flow number. Similarly, the third message can also include a third number, and the third number indicates the message number of the third message in the messages sent on the second line. Therefore, the third message can include the second type identification, the flow number, and the third number. For the relevant introduction of the third message, refer to the relevant introduction of the second message, which will not be elaborated here. It can be understood that copying the first message can also obtain the fourth message, and each copied message can include the second type identification, the same flow number as the first message, and the same or different port numbers as the first message.
[0129] In a possible implementation, the first network device includes a retransmission policy, and the first packet is a packet that needs to be retransmitted determined based on the retransmission policy. Optionally, the retransmission policy may be determined according to the service type of the service flow. Exemplarily, taking the three service types provided in the embodiments of the present application as low-priority services, high-priority services, and ultra-high-priority services respectively, the retransmission policy for low-priority services may be not to perform duplicate retransmission, and the retransmission policy for ultra-high-priority services may be to duplicate each packet twice, where one of the duplicated packets is sent through the same line as the original packet, and the other duplicated packet may be sent through a different line from the original packet; the retransmission policy for high-priority services may be to duplicate the third packet after every two packets, and the duplicated packet may be sent through the same line as the original packet.
[0130] In the embodiments of the present application, the retransmission policy may also be determined based on the actual transmission quality of the transmission line corresponding to the first packet. Thus, it can be ensured that the packets for active retransmission all meet the retransmission policy. Since the retransmission policy can be flexibly adjusted according to the actual transmission quality of the transmission line corresponding to the first packet, the packets for active retransmission are adapted to the actual transmission quality of the transmission line corresponding to the first packet, and there will be no waste of resources due to too many retransmitted packets, nor will there be a large packet loss rate due to too few retransmitted packets.
[0131] Among them, the method for determining the retransmission policy based on the actual transmission quality of the transmission line corresponding to the first packet may be to determine a retransmission ratio based on the actual transmission quality of the transmission line corresponding to the first packet. The retransmission ratio refers to the ratio between the number of retransmitted packets and the number of original packets in the service flow; obtain a retransmission policy that meets the retransmission ratio. Exemplarily, the actual transmission quality of the first line is negatively correlated with the retransmission ratio. The worse the actual transmission quality of the first line, the larger the determined retransmission ratio, and the better the actual transmission quality of the first line, the smaller the determined retransmission ratio. The retransmission policy that meets the retransmission ratio may be to retransmit M packets after every N packets, then the retransmission ratio is M / (M + N); or, the retransmission policy includes sampling M packets out of every N packets for retransmission, then the retransmission ratio is M / N. N and M are positive integers, and N is greater than or equal to M.
[0132] When the first network device needs to determine the retransmission policy based on the actual transmission quality of the transmission line corresponding to the first packet, the first network device may receive the actual transmission quality of the first line. Among them, the actual transmission quality of the first line may also be monitored by a second network device on the receiving side of the first line. The second network device may directly send the actual transmission quality of the first line to the first network device through a communication protocol, or may report the actual transmission quality of the first line to the controller, and the controller sends the actual transmission quality of the first line to the first network device.
[0133] Step 303: The first network device sends a first packet and a second packet through a first line, where the first line is the transmission line corresponding to the first packet.
[0134] In the embodiment of the present application, the first network device is connected to the second network device through a first line. Optionally, the first network device and the second network device can be connected through multiple lines, and the first line can refer to the line with the highest transmission quality among the multiple lines. The highest transmission quality includes but is not limited to at least one of the smallest static delay, the smallest dynamic delay, the fewest forwarding hops, the smallest packet loss rate, or the largest bandwidth. The static delay can be determined based on the physical distance of the line, that is, the longer the physical distance, the larger the static delay, and the shorter the physical distance, the smaller the static delay; the dynamic delay can be determined based on the actual transmission delay measurement of the line. Taking the highest transmission quality including the smallest static delay as an example, the first line can refer to the line with the shortest physical distance among the multiple lines. Optionally, the line types corresponding to the multiple lines can be determined according to the transmission quality of the lines. Optionally, the line types can include high-quality lines, regular-quality lines, and low-quality lines, etc.
[0135] Optionally, the port types corresponding to different lines can also be determined according to the line types of different lines. For example, it is determined that the port corresponding to the high-quality line is a high-quality port, the port corresponding to the regular-quality line is a regular port, and the port corresponding to the low-quality line is a low-quality port. Refer to a port type configuration table shown in Table 4. The port role of the port with the port number xxGE1 / 0 / 1 is 1, and 1 represents a high-quality port. The port role of the port with the port number xxGE1 / 0 / 2 is 0, and 0 represents a regular port. The port roles in Table 4 correspond to the port types in the embodiment of the present application. Thus, after determining that the transmission route corresponding to the first packet is the first line, the port type of the port corresponding to the first line can be determined based on Table 4, and then it can be determined that the first line is the line with the highest transmission quality according to the port type.
[0136] Table 4
[0137] Port number Port role xxGE1 / 0 / 1 1 xxGE1 / 0 / 2 0 xxGE1 / 0 / 3 0 … …
[0138] In a possible implementation manner, the method for sending the first message and the second message through the first line may be as follows: first, send the first message through the first line; when the specified duration after sending the first message is reached, send the second message through the first line. Herein, the specified duration may be set according to experience or flexibly adjusted according to the application scenario. That is to say, there is a time interval of the specified duration between the sending time of the second message and the sending time of the first message. If the first message and the second message are sent continuously, there may be a phenomenon that both the first message and the second message are lost due to continuous packet loss on the first line. Therefore, sending the second message at an interval from the first message can improve the success rate of the second message reaching the receiving side, that is, reduce the packet loss rate of the second message.
[0139] In the embodiment of the present application, when the first network device copies the first message to obtain the second message and also copies the first message to obtain the third message, the first network device may also send the third message through a second line different from the first line. Herein, the method for sending the third message through the second line may be: while sending the first message through the first line, send the third message through the second line; or, when the specified duration after sending the first message is reached, send the third message through the second line.
[0140] That is to say, the first network device may copy the first message multiple times to obtain multiple retransmission messages, and at least one retransmission message may be transmitted through the same line as the first message; other retransmission messages may be transmitted through a line different from the first message. In the scenario where continuous packet loss occurs on the first line, if both the first message and the second message are lost, the receiving side can still receive the third message through the second line, further reducing the packet loss rate of the message.
[0141] Herein, when the first line is the line with the highest transmission quality among multiple lines, the second line may be the line with the highest transmission quality among the multiple lines except the first line. Thus, the transmission quality gap between the second line and the first line will not be too large, avoiding too large a difference in the transmission delay between the third message and the first message, and further avoiding a large delay caused by the receiving side waiting for the third message after the first message is lost, and also ensuring the timeliness of the third message. Or, the second line may also be any line different from the first line among the multiple lines.
[0142] Exemplarily, refer to Figure 6, taking the example of the first network device performing replication redundancy transmission on the service flow. The first network device replicates the original packet 1, original packet 2, and original packet 3 of the service flow to obtain two retransmission packets 1, retransmission packet 2, and retransmission packet 3. The first network device sends the original packet 1, original packet 2, and original packet 3 through the first line, sends one copy of the retransmission packet 1, retransmission packet 2, and retransmission packet 3 through the first line, and sends the other copy of the retransmission packet 1, retransmission packet 2, and retransmission packet 3 through the second line. Among them, there is a time interval between the original packet 1, original packet 2, and original packet 3 sent through the first line and the one copy of the retransmission packet 1, retransmission packet 2, and retransmission packet 3 sent through the first line, and this time interval is the specified duration mentioned above.
[0143] See Figure 7 , taking the example of the first network device performing replication redundancy transmission on the service flow based on the retransmission policy. The retransmission policy is to replicate one packet every two packets. The first network device does not replicate the original packet 1 and original packet 2 of the service flow, replicates the original packet 3 to obtain the retransmission packet 3. The first network device sends the original packet 1, original packet 2, and original packet 3 through the first line, sends the retransmission packet 3 through the first line. There is a time interval between the original packet 1, original packet 2, and original packet 3 sent through the first line and the retransmission packet 3 sent through the first line, and this time interval is the specified duration mentioned above. Figure 6 and Figure 7 The packet numbers in
[0144] Step 304, the second network device receives the first packet and the second packet through the first line.
[0145] In the embodiments of the present application, if the first packet and the second packet do not get lost on the first line, the second network device can receive the first packet and the second packet through the first line; if the first packet gets lost on the first line, the second network device can receive the second packet through the first line; if both the first packet and the second packet get lost on the first line, the second network device cannot receive the first packet and the second packet. The embodiments of the present application take the second network device receiving the first packet and the second packet through the first line as an example to introduce the processing strategy of the second network device for the received packets.
[0146] In a possible implementation manner, the receiving time of the second packet is later than the receiving time of the first packet, and the difference between the receiving time of the second packet and the receiving time of the first packet is greater than or equal to the specified duration mentioned above. That is to say, the second packet and the first packet are sent at intervals, which can avoid the situation where both the first packet and the second packet are lost due to consecutive packet losses on the first line, improve the success rate of the second packet reaching the receiving side, that is, reduce the packet loss rate of the second packet.
[0147] Take the first message including the first type identifier and the flow number, and the second message including the second type identifier and the flow number as an example. The processing method of the second network device for the original message may include: based on the first message being the original message, if the flow number is consecutive with the maximum consecutive message number, send the first message; if the flow number is not consecutive with the maximum consecutive message number, discard the first message. The processing method of the second network device for the retransmission message may include: based on the second message being the retransmission message, if the flow number is greater than the maximum consecutive message number, send the second message; if the flow number is less than or equal to the maximum consecutive message number, discard the second message.
[0148] Among them, the maximum consecutive message number is the largest message number in the messages of the service flow received consecutively in the order of the message numbers. Thus, by carrying the type identifier and the flow number in the message, the second network device can send the original message and the retransmission message in order, and actively discard the repeatedly received messages, without the need to perform deduplication and sorting through caching, saving the overhead of the cache space, avoiding the delay caused by caching, and also avoiding the packet loss caused by the cache space overflow.
[0149] After the first network device sends the first message, update the maximum consecutive message number to the flow number of the first message; after sending the second message, if the flow number of the second message is consecutive with the maximum consecutive message number, update the maximum consecutive message number to the flow number of the second message. By updating the maximum consecutive message number in a timely manner, the accuracy of the maximum consecutive message number is guaranteed.
[0150] Exemplarily, taking the second network device sending to the service system as an example, see Figure 8Schematic diagram of the process for the second network device to receive packets. The packet transmission scenario is that packets 4, 5, and 7 in the original packet are lost, and packet 7 in the retransmitted packet is lost. ① The second network device continuously receives original packet 1, original packet 2, and original packet 3, and sends original packet 1, original packet 2, and original packet 3 to the service system, so the maximum consecutive packet number is 3. ② The second network device receives non-consecutive original packet 6 and original packet 8. Since the packet numbers of original packet 6 and original packet 8 are not consecutive with the maximum consecutive packet number 3, the received original packet 6 and original packet 8 are discarded, and the maximum consecutive packet number remains 3. ③ The second network device continuously receives retransmission packets 1 - retransmission packet 6. Since the packet numbers of retransmission packets 1 - retransmission packet 3 are less than the maximum consecutive packet number 3, the received retransmission packets 1 - retransmission packet 3 are discarded, and the maximum consecutive packet number remains 3. ④ Since the packet numbers of retransmission packets 4 - retransmission packet 6 are greater than the maximum consecutive packet number 3, retransmission packets 4 - retransmission packet 6 are sent to the service system, and the maximum consecutive packet number is 6. ⑤ The second network device receives retransmission packet 8. ⑥ Since the packet number of retransmission packet 8 is greater than the maximum consecutive packet number 3, retransmission packet 8 is sent to the service system. Since retransmission packet 8 is not consecutive with the maximum consecutive packet number 6, the maximum consecutive packet number remains 6.
[0151] When the end-side device of the service flow connected to the second network device allows out-of-order packet reception, the processing method of the second network device for the original packet can include: based on the first packet being the original packet, if the flow number is consecutive with the maximum consecutive packet number, the first packet is sent; if the flow number is not consecutive with the maximum consecutive packet number, the flow number and the maximum consecutive packet number are recorded as a set of lost packet hole boundaries in the lost packet list, and the first packet is sent. Among them, the maximum packet number is the largest packet number in the packets of the received service flow, and the lost packet list indicates the flow numbers of the lost packets through at least one set of lost packet hole boundaries. For example, if any set of lost packet hole boundaries is [3, 6], then the flow numbers of the lost packets indicated by this set of lost packet hole boundaries are 4 and 5.
[0152] For the subsequently received original message, if the flow number of the original message is not consecutive with the maximum consecutive message number, and the flow number of the original message is greater than the maximum message number, then record the flow number of the original message and the maximum message number as a set of packet loss hole boundaries in the packet loss list, update the maximum message number to the flow number of the original message, and send the original message; if the flow number of the original message is not consecutive with the maximum consecutive message number, and the flow number of the original message is between the maximum message number and the maximum consecutive message number, then record the flow number of the original message and the maximum message number as a set of packet loss hole boundaries, and record the maximum consecutive message number and the flow number as another set of packet loss hole boundaries in the packet loss list, and delete a set of packet loss hole boundaries corresponding to the maximum consecutive message number and the maximum message number in the packet loss list, and send the original message.
[0153] The processing method of the second network device for the retransmission message may include that if the message is a retransmission message based on the second message header, and the flow number is the same as the flow number of the lost message indicated by the packet loss list, then send the second message; if the flow number is different from the flow number of the lost message indicated by the packet loss list, then discard the second message. Among them, the flow number being the same as the flow number of the lost message indicated by the packet loss list means that the flow number falls within any set of packet loss hole boundaries in the packet loss list. For example, if the packet loss list includes a set of packet loss hole boundaries of [3, 6], indicating that the flow numbers of the lost messages are 4 and 5, then if the flow number of the retransmission message is 4 or 5, then send the retransmission message; if the flow number of the retransmission message is not 4 or 5, then discard the retransmission message.
[0154] Thus, by carrying the type identifier and the flow number in the message, the second network device can send all the received original messages, ensuring that the received original messages are not lost in packets. And through the record of the packet loss list, the second network device can send the retransmission messages corresponding to the lost messages and actively discard the repeatedly received messages. Similarly, there is no need to perform deduplication and sorting through the caching method, saving the overhead of the cache space, avoiding the delay caused by the cache, and also avoiding the packet loss caused by the overflow of the cache space.
[0155] In a possible implementation, the survival duration of the packet number of the lost packet indicated in the lost packet list is less than the aging duration, and the aging duration can be set according to experience or flexibly adjusted according to the application scenario. Optionally, when the survival duration of any packet number of the lost packet indicated in the lost packet list exceeds the aging duration, the lost packet list is updated so that the packet numbers of the lost packets indicated in the lost packet list do not include the any packet number. If the survival duration of any packet number in the lost packet list exceeds the aging duration, it means that both the original packet and the retransmitted packet corresponding to the any packet number are lost, and it is difficult for the second network device to receive the retransmitted packet corresponding to the any packet number subsequently, that is, the record of the any packet number in the lost packet list has expired. Therefore, by ensuring that the survival duration of the packet numbers of the lost packets indicated in the lost packet list is less than the aging duration, the validity of the information recorded in the lost packet list can be ensured.
[0156] When the end-side device allows out-of-order packet reception, after the second network device sends the first packet, it also updates the maximum consecutive packet number, the maximum packet number, and the lost packet list based on the flow number of the first packet; after the second network device sends the second packet, it also updates the lost packet list and the maximum consecutive packet number based on the flow number of the second packet. The maximum packet number is the largest packet number in the packets of the received service flow. By updating the maximum consecutive packet number, the maximum packet number, and the lost packet list in a timely manner, the accuracy of the maximum consecutive packet number, the maximum packet number, and the lost packet list is ensured.
[0157] Exemplarily, taking the second network device sending to the service system as an example, refer to Figure 9 the schematic diagram of the process of the second network device receiving packets as shown, the packet transmission scenario is the same as Figure 8The same. Messages No. 4, 5, and 7 in the original message are lost, and message No. 7 in the retransmission message is lost. ① The second network device continuously receives original message 1, original message 2, and original message 3, and sends original message 1, original message 2, and original message 3 to the service system. Then the maximum consecutive message number is 3, the maximum message number is 3, and the lost packet list is empty; ② The second network device receives non-consecutive original message 6 and original message 8. Since the message number of original message 6 is greater than the maximum consecutive message number 3, it sends original message 6 to the service system. The maximum consecutive message number remains 3, the maximum message number is 6, and the lost packet list includes [3, 6]; ③ Since the message number of original message 8 is greater than the maximum consecutive message number 3, it sends original message 8 to the service system. The maximum consecutive message number remains 3, the maximum message number is 8, and the lost packet list includes [3, 6][6, 8]; ④ The second network device continuously receives retransmission message 1 - retransmission message 3. Since the message numbers of retransmission message 1 - retransmission message 3 are less than the maximum consecutive message number 3, it discards the received retransmission message 1 - retransmission message 3. The maximum consecutive message number remains 3, the maximum message number remains 8, and the lost packet list still includes [3, 6][6, 8]; ⑤ The second network device continuously receives retransmission message 4 - retransmission message 5; ⑥ Since retransmission message 4 and retransmission message 5 fall within [3, 6], it sends retransmission message 4 - retransmission message 5 to the service system. Since retransmission message 6 does not fall within [3, 6] and [6, 8], it discards the received retransmission message 6. The maximum consecutive message number is 6, the maximum message number remains 8, and the lost packet list still includes [6, 8]; ⑦ The second network device receives retransmission message 8. Since retransmission message 8 does not fall within [6, 8], it discards the received retransmission message 8. The maximum consecutive message number is 6, the maximum message number remains 8, and the lost packet list still includes [6, 8].
[0158] For the scenario where the second network device sends the first message or the second message, if the first message or the second message is in the Figure 4 message format shown, that is, the first message or the second message includes an outer message header, then the second network device can remove the outer message header in the first message or the second message, and then send the first message and the second message after removing the outer message header, that is, send the inner message header and the payload.
[0159] In a possible implementation, when the first message includes a first number, after the second network device receives the first message and the second message through the first line, it can also monitor the actual transmission quality of the first line based on the first number. That is, the second network device monitors the actual transmission quality of the first line according to the port message number of the original message received through the first line. Alternatively, when the first message includes a first number and the second message includes a second number, after the second network device receives the first message and the second message through the first line, it can also monitor the actual transmission quality of the first line based on the first number and the second number. That is, the second network device monitors the actual transmission quality of the first line according to the port message numbers of the original message and the retransmitted message received through the first line.
[0160] Optionally, if the actual transmission quality of the first line does not meet the quality requirement, a notice message indicating that the actual transmission quality of the first line does not meet the quality requirement can be sent, so that the first network device on the sending side of the first line determines whether the subsequent messages meet the first condition according to the notice message; or, the second network device can directly send the actual transmission quality of the first line, so that the first network device determines whether the subsequent messages meet the first condition according to the actual transmission quality of the first line.
[0161] Exemplarily, taking the actual transmission quality as the packet loss rate, the method for the second network device to monitor the packet loss rate of the first line can be that after the second network device receives each message through the port corresponding to the first line, it obtains the port message number carried in the message by parsing the message, and then records the packet loss hole boundary by identifying discontinuous port message numbers. For example, when the port message numbers of multiple continuously received messages are 1, 2, 3, 6, 7, 9 respectively, the packet loss hole boundaries are recorded as [3, 6] and [7, 8]. Thus, after recording the packet loss hole boundaries for a period of time, the number of lost packets and the total number of packets within a period of time are counted, and the packet loss rate corresponding to the period of time is determined based on the ratio of the number of lost packets to the total number of packets. Among them, when the packet loss hole boundaries are [3, 6] and [7, 8], the number of lost packets is 3, and the port message numbers of the lost packets are 4, 5, and 8 respectively; the total number of packets is the difference between the maximum port message number and the minimum port message number received within a period of time.
[0162] Alternatively, the method for the second network device to monitor the packet loss rate of the first line can be that for any period of time, during the process of receiving messages and parsing the port message numbers in the messages, the number of messages received through the first line within this period is counted as x, the port message number received at the start time of this period is recorded as n, and the port message number received at the end time of this period is recorded as m. Then, the packet loss rate corresponding to the first line during this period is 1 - x / (m - n).
[0163] When the first network device also sends a third packet through a second line, in addition to receiving the first packet and the second packet through the first line, the second network device can also receive the third packet through the second line. The third packet is obtained by copying the first packet, and the second line is different from the first line. Optionally, when the second network device does not receive the first packet and the second packet through the first line, that is, both the first packet and the second packet are lost, the second network device can also receive the third packet through the second line, reducing the packet loss rate of the packet. The processing method of the second network device for the received third packet can refer to the processing method of the received second packet, which will not be elaborated here.
[0164] In the method provided by the embodiments of the present application, after receiving the first packet, the first network device can actively copy the first packet to obtain the second packet, and redundantly send the first packet and the second packet through the same line. By redundantly sending packets, the packet loss rate of packet transmission can be reduced. By sending the first packet and the second packet through the same line, it can be avoided that the transmission delay of the second packet is too different from the transmission delay of the first packet, thereby avoiding the large delay caused by waiting for the second packet after the first packet is lost at the receiving side, and reducing the transmission delay of the packet. And for delay-sensitive services, if the delay of the second packet reaching the receiving side is too large after the first packet is lost, the second packet may lose its validity. Therefore, this method can also improve the timeliness of packet transmission.
[0165] When this packet transmission method is applied to the scenario of wide area network dedicated line interconnection, the first line can be a wide area network dedicated line, and the first network device and the second network device are respectively the line outlet devices at both ends of the wide area network dedicated line. Thus, this method can reduce the packet loss rate and transmission delay of packets on the wide area network dedicated line.
[0166] The above introduces the packet transmission method of the embodiments of the present application. Corresponding to the above method, the embodiments of the present application also provide a packet transmission device. Figure 10 It is a schematic structural diagram of a packet transmission device provided by the embodiments of the present application. This device can be applied to the first network device, and the first network device is the first network device as described above Figure 3 shown; or, this device can be applied to the second network device, and the second network device is the second network device as described above Figure 3 shown. Based on Figure 10 the following multiple modules shown, the Figure 10 shown packet transmission device can perform all or part of the operations performed by the first network device or the second network device. It should be understood that this device may include more additional modules than the shown modules or omit some of the shown modules, and the embodiments of the present application do not limit this.
[0167] As Figure 10 shown, the device includes a transceiver module 1001 and a processing module 1002. In a possible implementation, the transceiver module 1001 includes a receiving module and / or a sending module. The receiving module is used to perform operations related to receiving, and the sending module is used to perform operations related to sending.
[0168] In Figure 10 the case where the message transmission device shown is applied to a first network device, the transceiver module 1001 is used to perform Figure 3 the receiving and / or sending related operations performed by the first network device in the method shown; the processing module 1002 is used to perform Figure 3 other operations other than the receiving and / or sending related operations performed by the first network device in the method shown.
[0169] In a possible implementation, the transceiver module 1001 is used to receive a first message; the processing module 1002 is used to copy the first message to obtain a second message; the transceiver module 1001 is used to send the first message and the second message through a first line, and the first line is the transmission line corresponding to the first message.
[0170] In a possible implementation, the processing module 1002 is further used to copy the first message to obtain a third message; the transceiver module 1001 is further used to send the third message through a second line, and the second line is different from the first line.
[0171] In a possible implementation, the transceiver module 1001 is used to send the first message through the first line; in the case of reaching a specified duration after sending the first message, the second message is sent through the first line.
[0172] In a possible implementation, the processing module 1002 is used to copy the first message to obtain a second message when it is determined that the first message meets a first condition, and the first condition includes that the traffic flow corresponding to the first message belongs to a high-priority service and the actual transmission quality of the first line does not meet the quality requirements.
[0173] In a possible implementation, the first message is a message that needs to be retransmitted determined based on a retransmission policy, and the retransmission policy is determined based on the actual transmission quality of the first line.
[0174] In a possible implementation, the transceiver module 1001 is further used to receive a notification message that the actual transmission quality of the first line does not meet the quality requirements, and the notification message is obtained by the second network device on the receiving side of the first line by monitoring the actual transmission quality of the first line; the processing module 1002 is further used to determine that the first message meets the first condition based on the notification message.
[0175] In a possible implementation, the first message includes a first number, where the first number indicates the message number of the first message among the messages sent on the first line, and the first number is used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
[0176] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line. The first number and the second number are used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
[0177] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message; the second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmitted message.
[0178] In a possible implementation, the device is applied to a wide area network dedicated line interconnection scenario.
[0179] In Figure 10 When the message transmission device shown is applied to a second network device, the transceiver module 1001 is used to perform Figure 3 the receiving and / or sending related operations performed by the second network device in the method shown; the processing module 1002 is used to perform Figure 3 other operations other than the receiving and / or sending related operations performed by the second network device in the method shown.
[0180] In a possible implementation, the transceiver module 1001 includes a receiving module and / or a sending module. The receiving module is used to perform receiving related operations, and the sending module is used to perform sending related operations.
[0181] In a possible implementation, the transceiver module 1001 is used to receive the first message and the second message through the first line. The second message is obtained by copying the first message, and the first line is the transmission line corresponding to the first message.
[0182] In a possible implementation, the transceiver module 1001 is further used to receive a third message through a second line. The third message is obtained by copying the first message, and the second line is different from the first line.
[0183] In a possible implementation, the receiving time of the second message is later than the receiving time of the first message, and the difference between the receiving time of the second message and the receiving time of the first message is greater than or equal to a specified duration.
[0184] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmission message;
[0185] The transceiver module 1001 is further configured to, based on the first message being an original message, send the first message if the flow number is consecutive with the maximum consecutive message number; the processing module 1002 is further configured to, based on the first message being an original message, discard the first message if the flow number is not consecutive with the maximum consecutive message number; the transceiver module 1001 is further configured to, based on the second message being a retransmission message, send the second message if the flow number is greater than the maximum consecutive message number; the processing module 1002 is further configured to, based on the first message being a retransmission message, discard the second message if the flow number is less than or equal to the maximum consecutive message number. Wherein, the maximum consecutive message number is the maximum message number in the messages of the service flow received consecutively in the order of message numbers.
[0186] In a possible implementation, the first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and a flow number, and the second type identifier indicates that the second message is a retransmission message;
[0187] The transceiver module 1001 is further configured to, based on the first message being an original message, send the first message; the processing module 1002 is further configured to, based on the first message being an original message, if the flow number is not consecutive with the maximum consecutive message number, record the flow number and the maximum consecutive message number as a group of packet loss hole boundaries in the packet loss list; the transceiver module 1001 is further configured to, based on the second message header being a retransmission message, send the second message if the flow number is the same as the flow number of the lost message indicated by the packet loss list; the processing module 1002 is further configured to, based on the first message being a retransmission message, discard the second message if the flow number is different from the flow number of the lost message indicated by the packet loss list. Wherein, the maximum consecutive message number is the maximum message number in the messages of the service flow received consecutively in the order of message numbers, and the packet loss list indicates the flow numbers of the lost messages through at least one group of packet loss hole boundaries.
[0188] In a possible implementation, the first message includes a first number, and the first number indicates the message number of the first message among the messages sent on the first line; the processing module 1002 is further configured to monitor the actual transmission quality of the first line based on the first number.
[0189] In a possible implementation, the first message includes a first number, and the second message includes a second number. The first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line. The processing module 1002 is further configured to monitor the actual transmission quality of the first line based on the first number and the second number.
[0190] In a possible implementation, the transceiver module 1001 is further configured to send a notification message indicating that the actual transmission quality of the first line does not meet the quality requirement when the actual transmission quality of the first line does not meet the quality requirement. The notification message is used for the first network device on the sending side of the first line to determine whether a subsequent message meets the first condition.
[0191] In a possible implementation, the device is applied to a wide area network dedicated line interconnection scenario.
[0192] It should be understood that when the above Figure 10 provided device implements its functions, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, 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 provided in the above embodiments and the method embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiments, which will not be elaborated here. Figure 10 The beneficial effects of the provided device can be seen in Figure 3 the beneficial effects of the method shown, which will not be elaborated here.
[0193] See Figure 11 , Figure 11 which shows a schematic structural diagram of a network device 2000 provided by an exemplary embodiment of the present application. Figure 11 The network device 2000 shown is used to perform the operations involved in the above Figure 3 shown message transmission method. The network device 2000 is, for example, a switch, a router, etc., and the network device 2000 can be implemented by a general bus architecture.
[0194] As Figure 11 shown, the network device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.
[0195] 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 unit (NPU), a Data Processing Unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this 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 connection with the disclosed content of the embodiments of the present invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
[0196] Optionally, the network device 2000 further includes a bus. The bus is used to transfer information between the components of the network device 2000. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 only one line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0197] The memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, such as a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, such as 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 compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, 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 exists independently, for example, and is connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0198] The communication interface 2004 uses any device such as a transceiver to communicate with other devices or communication networks, and the communication network can be an Ethernet, a radio access network (RAN) or a wireless local area network (WLAN), etc. 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 (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (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 the embodiments of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0199] In a specific implementation, as an embodiment, the processor 2001 can include one or more CPUs, such as Figure 11CPU0 and CPU1 shown in [figure]. Each of these processors can be a single-core CPU or a multi-core CPU. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0200] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as Figure 11 the processor 2001 and the processor 2005 shown in [figure]. Each of these processors can be a single-core CPU or a multi-core CPU. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0201] 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 can display information in various ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with the processor 2001 and can receive user input in various ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensing device, etc.
[0202] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of this 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 message transmission method provided in 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 instructions for executing the solution of this application.
[0203] In a specific embodiment, the network device 2000 in the embodiment of this application may correspond to the first network device in each of the above method embodiments. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that Figure 11 the network device 2000 shown in [figure] can perform all or part of the operations performed by the first network device.
[0204] Specifically, the processor 2001 is configured to receive a first message; duplicate the first message to obtain a second message; and send the first message and the second message through a first line, where the first line is the transmission line corresponding to the first message.
[0205] For other optional implementation manners, for the sake of brevity, they will not be elaborated herein.
[0206] For another example, the network device 2000 in the embodiments of the present application may correspond to the second network device in each of the above method embodiments. The processor 2001 in the network device 2000 reads instructions in the memory 2003, so that Figure 11 the network device 2000 shown is capable of performing all or part of the operations performed by the second network device.
[0207] Specifically, the processor 2001 is configured to receive the first message and the second message through a first line. The second message is obtained by duplicating the first message, and the first line is the transmission line corresponding to the first message.
[0208] For other optional implementation manners, for the sake of brevity, they will not be elaborated herein.
[0209] The network device 2000 may also correspond to the Figure 10 message transmission device shown above. Each functional module in the message transmission device is implemented by software of the network device 2000. In other words, the functional modules included in the message transmission device are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.
[0210] Among them, Figure 3 each step of the message transmission method shown is completed by an integrated logic circuit in hardware or an instruction in software form in the processor of the network device 2000. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware processor, or can be executed and completed by a combination of hardware and software modules in the processor. The software module may be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, and other mature storage media in the art. This storage medium is located in the memory. The processor reads the information in the memory and combines its hardware to complete the steps of the above method. For the sake of avoiding repetition, it will not be described in detail here.
[0211] Refer to Figure 12 , Figure 12 which shows a schematic structural diagram of a network device 2100 provided by another exemplary embodiment of the present application. Figure 12 The network device 2100 shown is used to execute the above Figure 3All or part of the operations involved in the packet transmission method shown. The network device 2100 is, for example, a switch, a router, etc., and the network device 2100 can be implemented by a general bus architecture.
[0212] As Figure 12 shown, the network device 2100 includes: a main control board 2110 and an interface board 2130.
[0213] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is used for the control and management of each component in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processor 2111 and a memory 2112.
[0214] The interface board 2130 is also called a line processing unit (LPU), a line card, or a service board. The interface board 2130 is used to provide various service interfaces and implement the forwarding of data packets. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc. The Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients). The interface board 2130 includes: a central processor 2131, a network processor 2132, a forwarding table entry memory 2134, and a physical interface card (PIC) 2133.
[0215] 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.
[0216] The network processor 2132 is used to implement the forwarding process of packets. The form of the network processor 2132 can be 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 packets based on the forwarding table entries stored in the forwarding table entry memory 2134. If the destination address of the packet is the address of the network device 2100, the packet is sent to the CPU (such as the central processing unit 2131) for processing; if the destination address of the packet is not the address of the network device 2100, the next hop and output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the packet is forwarded to the output interface corresponding to the destination address. Among them, the processing of the upstream packets can include: the processing of the packet input interface and the forwarding table lookup; the processing of the downstream packets can include: the forwarding table lookup and so on. In some embodiments, the central processing unit can also execute 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.
[0217] The physical interface card 2133 is used to implement the docking function at the physical layer. The original traffic enters the interface board 2130 from here, and the processed packets are sent out from the physical interface card 2133. The physical interface card 2133 is also called a daughter card and can be installed on the interface board 2130. It is responsible for converting optical and electrical signals into packets, performing a legality check on the packets, and then forwarding them to the network processor 2132 for processing. In some embodiments, the central processing unit 2131 can also execute the function 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.
[0218] 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 processing unit 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation manners of the components in the interface board 2140 are the same as or similar to those in the interface board 2130, and will not be elaborated here.
[0219] Optionally, the network device 2100 further includes a switch fabric board 2120. The switch fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device 2100 has multiple interface boards, the switch 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 through the switch fabric board 2120.
[0220] 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 switch fabric board 2120 are interconnected through a system bus and a system backplane. 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 communicates with the interface board 2130 and the interface board 2140 through the IPC channel.
[0221] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes the main control board 2110 and the central processing unit 2111, and the forwarding plane includes various components that perform forwarding, such as a forwarding entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as acting 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 distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 2132 looks up the table and forwards the packets received by the physical interface card 2133 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane may be stored in the forwarding entry memory 2134. In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same network device.
[0222] It should be noted that there may be one or more main control boards. When there are multiple main control boards, they may include an active main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing ability 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 fabric board, or there may be one or more. When there are multiple switching fabric boards, they can jointly implement load sharing and redundant backup. In a centralized forwarding architecture, the network device may not require a switching fabric board, and the interface board undertakes the processing function of the service data of the entire system. In a distributed forwarding architecture, the network device may have at least one switching fabric board, and data exchange between multiple interface boards is realized through the switching fabric board, providing a large-capacity data exchange and processing ability. Therefore, the data access and processing ability of the network device with a distributed architecture is greater than that of the network device with a centralized architecture. Optionally, the form of the network device may also be a single board, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this single board. At this time, the central processing unit on the interface board and the central processing unit on the main control board can be combined into one central processing unit on this single board to execute the functions after their superposition. The data exchange and processing ability of this form of network device is relatively low (for example, network devices such as low-end switches or routers). Which architecture is specifically adopted depends on the specific networking deployment scenario, and no limitations are made here.
[0223] In a specific embodiment, the network device 2100 corresponds to the Figure 10 message transmission device applied to the first network device or the second network device as shown above. In some embodiments, Figure 10 in the message transmission device shown above, the transceiver module 1001 is equivalent to the physical interface card 2133 in the network device 2100, and the processing module 1002 is equivalent to the central processing unit 2111 or the network processor 2132 in the network device 2100.
[0224] The embodiment of the present application also provides a message transmission system, which includes: a first network device and a second network device. For example, the first network device is the Figure 11 network device 2000 shown above or Figure 12 the network device 2100 shown above, and the second network device is the Figure 11 network device 2000 shown above or Figure 12 the network device 2100 shown above. The message transmission methods executed by the first network device and the second network device can refer to the relevant descriptions of the above Figure 3 shown embodiments, and will not be elaborated here.
[0225] An embodiment of the present application further provides a communication device, which includes a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the first network device.
[0226] An embodiment of the present application further provides a communication device, which includes a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the second network device.
[0227] It should be understood that the above-mentioned processor may be a CPU, or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), 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 that supports the advanced RISC machines (ARM) architecture.
[0228] Further, in an optional embodiment, the above-mentioned 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.
[0229] The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (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 SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0230] An embodiment of the present application also provides a computer-readable storage medium storing at least one instruction that is loaded and executed by a processor to enable a computer to implement any one of the above message transmission methods.
[0231] An embodiment of the present application also provides a computer program (product) that, when executed by a computer, enables the processor or the computer to execute the corresponding steps and / or processes in the above method embodiments.
[0232] An embodiment of the present application also provides a chip including a processor for calling and running instructions stored in a memory, so that a communication device equipped with the chip executes any one of the above message transmission methods.
[0233] An embodiment of the present application also provides another chip including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute code in the memory, and when the code is executed, the processor is configured to execute any one of the above message transmission methods.
[0234] 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 a computer, the processes or functions according to the present application are 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 one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server, data center, etc. that contains one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk), etc.
[0235] Those of ordinary skill in the art can realize that the method steps and modules described in the embodiments disclosed herein can be implemented by software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0236] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc.
[0237] 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 program instructions. As an example, the method of the embodiments of the present application can be described in the context of machine-executable instructions, such as program modules executed in devices included in a target real or virtual processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functions of the program modules can be combined or divided among the described program modules. The machine-executable instructions for the program modules can be executed within local or distributed devices. In a distributed device, the program modules can be located in both local and remote storage media.
[0238] The computer program code for implementing the method of the embodiments of the present application can be written in one or more programming languages. These computer program codes can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program code is executed by the computer or other programmable data processing devices, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server.
[0239] In the context of the embodiments of the present application, the computer program code or related data can be carried by any suitable carrier so that the device, apparatus, or processor can perform the various processes and operations described above. Examples of the carrier include signals, computer-readable media, and the like.
[0240] Examples of signals can include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0241] A machine-readable medium can 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 can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination thereof. More specific examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0242] 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 foregoing method embodiments and will not be elaborated herein.
[0243] In 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 merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling, direct coupling, or communication connection can be an indirect coupling or communication connection through some interfaces, devices, or modules, and can also be in the form of electrical, mechanical, or other connections.
[0244] 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 can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0245] In addition, in each embodiment of the present application, the functional modules can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0246] If the integrated module is implemented in the form of a software functional 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, in essence, 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. The computer software product is stored in a storage medium and includes several instructions for causing 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 methods in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0247] In this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions. It should be understood that there is no logical or chronological dependency between "first", "second", and "nth", nor are the quantity and execution order limited. It should also be understood that although the following description uses terms such as first and second 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, the first image can be referred to as the second image, and similarly, the second image can be referred to as the first image. Both the first image and the second image can be images, and in some cases, they can be separate and different images.
[0248] It should also be understood that in various embodiments of this application, the magnitude of the serial numbers of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not impose any limitation on the implementation process of the embodiments of this application.
[0249] In this application, the meaning of the term "at least one" refers to one or more, and the meaning of the term "multiple" refers to two or more. For example, multiple second messages refer to two or more second messages. In this document, the terms "system" and "network" are often used interchangeably.
[0250] It should be understood that the terms used in the description of various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and the appended claims, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0251] It should also be understood that the term "and / or" as 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 can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application generally represents an "or" relationship between the associated objects before and after.
[0252] It should also be understood that the term "comprises" (also known as "includes", "including", "comprises", and / or "comprising") when used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groupings.
[0253] It should also be understood that the terms "if" and "when" can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if it is determined that..." or "if [the stated condition or event] is detected" can be interpreted to mean "when it is determined that..." or "in response to determining..." or "when [the stated condition or event] is detected" or "in response to detecting [the stated condition or event]".
[0254] It should be understood that determining B based on A does not mean determining B solely based on A. B can also be determined based on A and / or other information.
[0255] It should also be understood that the "one embodiment", "an embodiment", and "a possible implementation" mentioned throughout the specification mean that the specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment", "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner.
[0256] The above description is only an alternative embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included within the protection scope of the present application.
Claims
1. A message transmission method, characterized in that, the method is applied to a first network device, and the method includes: receiving a first message; copying the first message to obtain a second message; sending the first message and the second message through a first line, where the first line is the transmission line corresponding to the first message.
2. The method according to claim 1, characterized in that, the method further includes: copying the first message to obtain a third message; sending the third message through a second line, where the second line is different from the first line.
3. The method according to claim 1 or 2, characterized in that, the sending the first message and the second message through the first line includes: sending the first message through the first line; when a specified duration after sending the first message is reached, sending the second message through the first line.
4. The method according to any one of claims 1-3, characterized in that, the copying the first message to obtain a second message includes: when it is determined that the first message meets a first condition, copying the first message to obtain a second message, where the first condition includes that the traffic flow corresponding to the first message belongs to a high-priority service and the actual transmission quality of the first line does not meet the quality requirement.
5. The method according to claim 4, characterized in that, the first message is a message that needs to be retransmitted determined based on a retransmission strategy, and the retransmission strategy is determined based on the actual transmission quality of the first line.
6. The method according to claim 4 or 5, characterized in that, before the copying the first message to obtain a second message when it is determined that the first message meets the first condition, further includes: receiving a notification message that the actual transmission quality of the first line does not meet the quality requirement, where the notification message is obtained by a second network device on the receiving side of the first line through monitoring the actual transmission quality of the first line; determining that the first message meets the first condition based on the notification message.
7. The method according to any one of claims 1-6, characterized in that, the first message includes a first number, where the first number indicates the message number of the first message among the messages sent through the first line, and the first number is used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
8. The method according to any one of claims 1-6, characterized in that, the first message includes a first number, and the second message includes a second number, where the first number indicates the message number of the first message among the messages sent through the first line, the second number indicates the message number of the second message among the messages sent through the first line, and the first number and the second number are used by a second network device on the receiving side of the first line to monitor the actual transmission quality of the first line.
9. The method according to any one of claims 1-8, characterized in that, The first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and the flow number, and the second type identifier indicates that the second message is a retransmitted message.
10. A message transmission method Characterized in that The method is applied to a second network device, and the method includes: Receiving a first message and a second message through a first line. The second message is obtained by copying the first message, and the first line is the transmission line corresponding to the first message.
11. The method according to claim 10 Characterized in that The method further includes: Receiving a third message through a second line. The third message is obtained by copying the first message, and the second line is different from the first line.
12. The method according to claim 10 or 11 Characterized in that The receiving time of the second message is later than the receiving time of the first message, and the difference between the receiving time of the second message and the receiving time of the first message is greater than or equal to a specified duration.
13. The method according to any one of claims 10-12 Characterized in that The first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message. The second message includes a second type identifier and the flow number, and the second type identifier indicates that the second message is a retransmitted message. After receiving the first message and the second message through the first line, it further includes: Based on the fact that the first message is an original message, if the flow number is consecutive with the maximum consecutive message number, then send the first message; if the flow number is not consecutive with the maximum consecutive message number, then discard the first message. The maximum consecutive message number is the largest message number among the messages of the service flow received consecutively in the order of message numbers. Based on the fact that the second message is a retransmitted message, if the flow number is greater than the maximum consecutive message number, then send the second message; if the flow number is less than or equal to the maximum consecutive message number, then discard the second message.
14. The method according to any one of claims 10-12 Characterized in that The first message includes a first type identifier and a flow number. The first type identifier indicates that the first message is an original message, and the flow number indicates the message number of the first message in the service flow corresponding to the first message pair. The second message includes a second type identifier and the flow number, and the second type identifier indicates that the second message is a retransmitted message. After receiving the first message and the second message through the first line, it further includes: Based on the first message being the original message, if the flow number is consecutive with the maximum consecutive message number, then send the first message; if the flow number is not consecutive with the maximum consecutive message number, then record the flow number and the maximum consecutive message number as a set of packet loss hole boundaries in the packet loss list, send the first message, where the maximum consecutive message number is the largest message number in the messages of the service flow received consecutively in the order of message numbers, and the packet loss list indicates the flow numbers of the lost messages through at least one set of packet loss hole boundaries; Based on the second message header being a retransmission message, if the flow number is the same as the flow number of the lost message indicated by the packet loss list, then send the second message; if the flow number is different from the flow number of the lost message indicated by the packet loss list, then discard the second message.
15. The method according to any one of claims 10 - 14, wherein, the first message includes a first number, and the first number indicates the message number of the first message among the messages sent on the first line; after receiving the first message and the second message through the first line, it further includes: monitoring the actual transmission quality of the first line based on the first number.
16. The method according to any one of claims 10 - 14, wherein, the first message includes a first number, the second message includes a second number, the first number indicates the message number of the first message among the messages sent on the first line, and the second number indicates the message number of the second message among the messages sent on the first line; after receiving the first message and the second message through the first line, it further includes: monitoring the actual transmission quality of the first line based on the first number and the second number.
17. The method according to claim 15 or 16, wherein, the method further includes: when the actual transmission quality of the first line does not meet the quality requirement, sending a notice message indicating that the actual transmission quality of the first line does not meet the quality requirement, and the notice message is used for the first network device on the sending side of the first line to determine whether the subsequent messages meet the first condition.
18. The method according to any one of claims 1 - 17, wherein, the method is applied to the scenario of wide - area network dedicated line interconnection.
19. A message transmission device, wherein, the device is applied to a first network device, and the device includes: a transceiver module, configured to perform operations related to receiving and / or sending in the method according to any one of claims 1 - 9, 18; a processing module, configured to perform other operations except for the operations related to receiving and / or sending in the method according to any one of claims 1 - 9, 18.
20. A message transmission device, wherein, the device is applied to a second network device, and the device includes: a transceiver module, configured to perform operations related to receiving and / or sending in the method according to any one of claims 10 - 18; A processing module, configured to perform operations other than the operations related to reception and / or transmission performed in the method according to any one of claims 10-18.
21. A network device, characterized in that the network device includes: a processor, the processor is coupled to a memory, and at least one program instruction or code is stored in the memory, and the at least one program instruction or code is loaded and executed by the processor, so that the network device implements the packet transmission method according to any one of claims 1-18.
22. A packet transmission system, characterized in that the packet transmission system includes a first network device and a second network device; the first network device is configured to perform the packet transmission method according to any one of claims 1-9, 18, and the second network device is configured to perform the packet transmission method according to any one of claims 10-18.
23. A computer-readable storage medium, characterized in that at least one instruction is stored in the computer storage medium, and the at least one instruction is loaded and executed by a processor, so that a computer implements the packet transmission method according to any one of claims 1-18.
24. A computer program product, characterized in that the computer program product includes: computer program code, and the computer program code is loaded and executed by a computer, so that the computer implements the packet transmission method according to any one of claims 1-18.