Message transmission method, apparatus and device, and computer readable storage medium
By dynamically adjusting the message sending strategy and selecting an appropriate multiple-send mode according to the transmission performance parameters of the transmission path, the problem of high transmission demand packets is solved, and the bandwidth waste and congestion in network transmission is increased, achieving more efficient and reliable message transmission.
Patent Information
- Application Number
- CN202311283148.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to effectively solve the problem of bandwidth waste and intensified congestion in network transmissions with high transmission requirements.
By obtaining the transmission performance parameters of the transmission path, dynamically adjusting the message transmission strategy, adopting different multiple-send modes to adapt to the path quality of the transmission path, and ensuring the efficiency and reliability of message transmission.
It effectively avoids bandwidth waste when the transmission path quality is good, avoids the intensification of congestion in the case of poor paths, reduces the packet loss rate, and meets the transmission needs of packets.
Smart Images

Figure CN119728574A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message transmission method, device, equipment and a computer-readable storage medium. Background Art
[0002] With the development of communication technology, the amount of messages transmitted on the network is increasing, and the transmitted messages include some messages with high transmission requirements. Therefore, a message transmission method is needed to meet the transmission of messages with high transmission requirements. Summary of the invention
[0003] The present application provides a message transmission method, apparatus, device and computer-readable storage medium to meet the transmission of messages with high transmission requirements. The technical solution is as follows:
[0004] In a first aspect, a message transmission method is provided, the method comprising: obtaining transmission performance parameters of each transmission path in at least one transmission path, the transmission performance parameters of any transmission path indicating the path quality of any transmission path; adjusting a sending strategy from a first sending strategy to a second sending strategy according to the transmission performance parameters of each transmission path, the first sending strategy and the second sending strategy indicating different multiple sending modes; and applying the second sending strategy to transmit a message through one or more transmission paths in at least one transmission path.
[0005] The message sending strategy is dynamically adjusted according to the transmission performance parameters, and messages are sent through different multiple transmission modes to make the message transmission more consistent with the path quality of the current transmission path, thereby meeting the message transmission requirements. In the case of good transmission path quality, bandwidth waste is avoided, and in the case of poor transmission path, congestion is avoided, resulting in a sharp increase in packet loss.
[0006] In a possible implementation, the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path, including: determining at least one candidate path supporting the transmission of messages from at least one transmission path; determining the transmission mode of the message according to the packet loss rate of the candidate path, and adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode, wherein the transmission mode indicates a reference path for transmitting messages and the number of messages to be transmitted, and the reference path is selected from at least one candidate path. The reference path for transmitting messages and the number of messages transmitted on the reference path are selected according to the packet loss rate of the transmission path, and the packet loss rate of the transmission path is taken into account in the process of adjusting the sending strategy to the second sending strategy, so as to reduce the impact of path packet loss on message transmission and ensure the transmission demand of the message.
[0007] In a possible implementation, determining at least one candidate path supporting transmission of a message from at least one transmission path includes: selecting a candidate path from non-congested transmission paths according to congestion parameters of each transmission path. Since a reference path for transmitting the message needs to be selected from the candidate paths, the non-congested transmission path is selected as the candidate path according to the congestion parameter to ensure that the reference path for transmitting the message is not congested, so as to avoid aggravating congestion caused by transmission on a congested transmission path.
[0008] In a possible implementation, there are multiple uncongested transmission paths, and candidate paths are selected from the uncongested transmission paths, including: determining a first path with the lowest transmission delay among the uncongested transmission paths; selecting a second path from the other paths whose delay difference with the first path meets a selection condition based on the delay difference between the first path and the other paths, the other paths being paths different from the first path among the multiple uncongested transmission paths; when the delay difference between the first path and the second path is greater than a delay threshold, selecting one path from the first path and the second path as a candidate path based on packet loss rates of the first path and the second path, or, when the delay difference between the first path and the second path is not greater than the delay threshold, selecting the first path and the second path as candidate paths. If the delay difference between the first path and the second path is not greater than the delay threshold, the receiving end can successfully deduplicate and select the messages transmitted by the first path and the second path, so the first path and the second path can be used as candidate paths. If the delay difference between the first path and the second path is greater than the delay threshold, the receiving end cannot deduplicate and select the messages transmitted by the first path and the second path, and the multi-path transmission fails. In this case, it is necessary to select one path from the first path and the second path as a candidate path. The candidate path is determined based on the delay difference between the first path and the second path to avoid multiple failures caused by the delay difference exceeding the delay threshold.
[0009] In a possible implementation, a path is selected from the first path and the second path as a candidate path according to the packet loss rates of the first path and the second path, including: when the packet loss rate of the first path is greater than the packet loss threshold, the second path is selected as the candidate path, the packet loss threshold is determined according to the packet loss rate of the second path and the reference coefficient, and the packet loss threshold is greater than the packet loss rate of the second path; or, when the packet loss rate of the first path is not greater than the packet loss threshold, the first path is selected as the candidate path. The packet loss threshold is used to determine whether the packet loss rate of the first path is much greater than the packet loss rate of the second path, and the determination process has high accuracy. The candidate path is selected based on whether the packet loss rate of the first path with a low transmission path is much greater than the packet loss rate of the second path, so as to achieve a comprehensive reference to the transmission delay and the packet loss rate, and the transmission performance considered in the process of selecting the candidate path is more comprehensive, and the accuracy of the selected candidate path is higher.
[0010] In a possible implementation, the transmission mode of the message is determined according to the packet loss rate of the candidate path, including: determining the number of transmission copies of the message according to the packet loss rate of the first path; when the number of transmission copies of the message indicates multiple copies, determining the reference path for transmitting the message and the number of transmissions of the message on the reference path according to the difference between the packet loss rates of the first path and the second path, and obtaining the transmission mode. First, it is determined whether multiple copies need to be transmitted according to the packet loss rate of the first path, and then, if multiple copies need to be transmitted, it is determined that the difference between the packet loss rates needs to be compared. If multiple copies need to be transmitted, the transmission mode is determined according to the difference between the packet loss rates, thereby improving the efficiency of determining the transmission mode.
[0011] In a possible implementation, determining the number of copies of a message to be transmitted according to the packet loss rate of the first path includes: when the packet loss rate of the first path is not greater than a first threshold, determining the number of copies of the message to be transmitted is a single copy, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the first threshold, determining the number of copies of the message to be transmitted is multiple copies. By comparing the packet loss rate of the first path with the precise first threshold to determine whether multiple copies of the message need to be transmitted, the process of determining the number of copies of the message to be transmitted is more accurate.
[0012] In a possible implementation, after determining the number of copies of the message to be transmitted according to the packet loss rate of the first path, it also includes: when the number of copies of the message to be transmitted is a single copy, determining the transmission mode to transmit a message on the first path. When the packet loss rate of the first path is within the packet loss tolerance corresponding to the message, a message is transmitted through the first path with low transmission delay, which ensures the transmission delay of the message and avoids transmitting multiple copies when the path quality is good, resulting in bandwidth waste. Whether it is necessary to transmit one message or multiple messages, there is a corresponding method for determining the transmission mode, which is highly flexible and widely used.
[0013] In a possible implementation, according to the difference between the packet loss rates of the first path and the second path, a reference path for transmitting a message and the number of messages transmitted on the reference path are determined, including: when the packet loss rate of the first path is not greater than the second threshold, the reference path and the number of messages transmitted on the reference path are selected according to the difference between the packet loss rates of the first path and the second path, the second threshold is greater than the first threshold, and the second threshold indicates the path tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the second threshold, the first path and the second path are determined as reference paths for transmitting messages, and the number of messages transmitted on the reference path is determined according to the difference between the packet loss rates of the first path and the second path. Since the packet loss rate of the first path is greater than the second threshold, the transmission of the message through the first path alone can no longer meet the transmission requirements of the message, so it is necessary to call the second path for message transmission on the basis of the first path, thereby determining the first path and the second path as reference paths. By comparing the packet loss rate of the first path and the second threshold, the reference path is first determined, and then the number of transmissions is determined according to the difference between the packet loss rates of the reference path, and the transmission mode is obtained, and the transmission mode is determined step by step in a hierarchical manner, and the determination efficiency is high.
[0014] In a possible implementation, the reference path is selected according to the difference between the packet loss rates of the first path and the second path, and the number of messages transmitted on the reference path includes: when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is not greater than the first threshold, the first path and the second path are determined to be reference paths, and one message is transmitted on the first path and the second path respectively; or, when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is greater than the first threshold, the first path is determined to be the reference path, and multiple messages are transmitted on the first path. By comparing the size relationship between the packet loss rate of the first path and the threshold, and the size relationship between the packet loss rate of the second path and the threshold, the difference between the packet loss rates of the first path and the second path is compared, and the process of determining the difference between the packet loss rates is simple and the determination efficiency is high.
[0015] In a possible implementation, determining the number of messages transmitted on the reference path according to the difference between the packet loss rates of the first path and the second path includes: when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is not greater than the second threshold, determining to transmit one message on the first path and the second path respectively, and the third threshold is greater than the second threshold; or, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold, determining to transmit multiple messages on the first path and one message on the second path; or, when the packet loss rate of the first path is greater than the third threshold, and the packet loss rate of the second path is less than the first threshold, determining to transmit multiple messages on the first path and one message on the second path. In the case of a packet loss rate greater than a third threshold, it is determined that one message is transmitted on the first path and one message is transmitted on the second path respectively; or, in the case of a packet loss rate of the first path greater than a third threshold, and a packet loss rate of the second path greater than the first threshold but not greater than the second threshold, it is determined that one message is transmitted on the first path and multiple messages are transmitted on the second path; or, in the case of a packet loss rate of the first path greater than a third threshold, and a packet loss rate of the second path greater than the second threshold but not greater than the third threshold, it is determined that multiple messages are transmitted on the first path and one message is transmitted on the second path; or, in the case of a packet loss rate of the first path greater than a third threshold, and a packet loss rate of the second path greater than the third threshold, it is determined that multiple messages are transmitted on the first path and one message is transmitted on the second path respectively. Regardless of the size of the packet loss rate of the first path and the packet loss rate of the second path, there is a corresponding transmission mode, which is widely applicable.
[0016] In a possible implementation, there is one candidate path, and the transmission mode of the message is determined according to the packet loss rate of the candidate path, including: when the packet loss rate of the candidate path is less than a first threshold, the transmission mode is determined to be to transmit one message on the candidate path, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the candidate path is not less than the first threshold, the transmission mode is determined to be to transmit multiple messages on the candidate path. It can be that there is only one candidate path selected, or there can be only one transmission path connected between the sending end and the receiving end. In either case, for one candidate path, the transmission mode of the message can be determined according to the packet loss rate of the candidate path, and it is widely applicable.
[0017] In a possible implementation, the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission mode, including: when the transmission mode indicates that the number of transmissions of the message on the reference path is multiple, the delay interval of the message is determined according to the packet loss mode of the reference path, and the delay interval and the transmission mode are used as the second sending strategy, and the delay interval indicates the sending time interval between each message in the multiple messages. When multiple messages need to be transmitted on a reference path, the delay interval between each message that better conforms to the packet loss mode is further determined, and the second sending strategy determined has high accuracy.
[0018] In a possible implementation, the delay interval of the message is determined according to the packet loss pattern of the reference path, including: when the packet loss pattern of the reference path is a random packet loss pattern, the delay interval is determined as a first parameter; or, when the packet loss pattern of the reference path is a continuous packet loss pattern, the minimum value of the packet loss duration of the reference path and the multiple delay threshold is determined as the delay interval. When the reference path is a random packet loss pattern in which messages are randomly lost, the delay interval is set to the first parameter to achieve continuous transmission of multiple messages to avoid simultaneous loss of the same message. When the reference path is a continuous packet loss pattern in which multiple messages are continuously lost, the delay interval is determined according to the packet loss duration and the multiple delay thresholds, so that the later-sent duplicate message can avoid the packet loss period of the first-sent original message, avoid simultaneous loss of the same message, and thus reduce the impact of packet loss on the reference path.
[0019] In a possible implementation, the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path, including: selecting a reference path for transmitting messages from a non-congested transmission path according to the congestion parameters of each transmission path, determining the number of messages transmitted on the reference path, and obtaining a transmission mode; and adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode. The reference path is selected according to the congestion parameter to avoid aggravated congestion and a sharp increase in packet loss caused by transmitting messages on a congested transmission path, and the calling of the transmission path is more reasonable.
[0020] In a possible implementation, the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path, including: determining a reference path for transmitting a message and the number of messages transmitted on the reference path from at least one transmission path to obtain a transmission mode; when the number of transmissions of the reference path is multiple, determining the delay interval of the message according to the packet loss mode of the reference path, and adjusting the sending strategy from the first sending strategy to the second sending strategy according to the delay interval and the transmission mode, wherein the delay interval indicates the sending time interval between each message in the multiple messages. The delay interval is determined according to the packet loss mode so that the later-sent duplicate message on the reference path avoids the packet loss time of the first-sent original message, and avoids the loss of the same message at the same time. Even if there is packet loss on the reference path, the impact of the packet loss can be reduced, thereby meeting the transmission requirements of the message.
[0021] In a possible implementation, the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path, including: in the case of multiple transmission paths, according to the delay difference between the first path with the lowest transmission delay and other transmission paths, a reference path is selected from the multiple transmission paths, the number of messages transmitted on the reference path is determined, and the transmission mode is obtained; the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission mode. A reference path is selected according to the delay difference between different transmission paths to avoid excessive delay differences between reference paths, where the receiving end needs to wait for messages transmitted on the reference path with slow transmission delay, thereby extending the transmission time of the message. In addition, the transmission performance parameters used in determining the second sending strategy are not limited, and can be one or more of the packet loss rate, the delay difference, the packet loss mode, or the congestion parameter, which has high flexibility.
[0022] In a possible implementation, the transmission performance parameter includes a packet loss rate, and the transmission performance parameter of each transmission path in at least one transmission path is obtained, including: determining at least one group of disordered pairs from multiple historical messages according to the sending order of each historical message in multiple historical messages transmitted on any transmission path, the disordered pair including two historical messages with adjacent receiving orders and non-adjacent sending orders; determining the packet loss rate of any transmission path according to the sending order of the historical messages included in each group of disordered pairs. The packet loss rate can be determined according to the sending order and receiving order of the historical messages, and the process of determining the packet loss rate is simple and the determination efficiency is high.
[0023] In a possible implementation, the packet loss rate of any transmission path is determined according to the sending order of the historical messages included in each group of disordered pairs, including: determining the number of packet losses of each group of disordered pairs according to the sending order of the historical messages included in each group of disordered pairs; determining the total number of packet losses of any transmission path according to the number of packet losses of each group of disordered pairs; and determining the packet loss rate of any transmission path according to the total number of packet losses and the total number of multiple historical messages. The packet loss rate can be calculated according to the total number of packet losses and the total number of transmitted historical messages. The algorithm involved in calculating the packet loss rate is simple and the operation difficulty is low.
[0024] In a possible implementation, the transmission performance parameters include congestion parameters, and the transmission performance parameters of each transmission path in at least one transmission path are obtained, including: determining multiple periodic pairs according to the sending order of multiple historical messages transmitted by any transmission path, the periodic pairs include two historical messages, and the sending intervals of the two historical messages included in different periodic pairs are the same; determining the jitter value of each periodic pair in the multiple periodic pairs, and determining the delay jitter value of any transmission path according to the jitter value of each periodic pair; determining the congestion parameter of any transmission path according to the delay jitter value of any transmission path and the packet loss rate of any transmission path, and the congestion parameter indicates whether any transmission path is congested. The delay jitter value reflects the change of the transmission delay on the transmission path, and whether the transmission path is congested is judged according to the change of the transmission delay and the packet loss rate. The congestion parameter determined by combining data from different dimensions has a high accuracy rate.
[0025] In a possible implementation, determining the jitter value of each of the multiple periodic pairs includes: determining the jitter value of each periodic pair according to the sending time and receiving time of the historical messages included in each periodic pair, the sending time indicating the time when the sending end of the historical message sends the historical message, and the receiving time indicating the time when the receiving end of the historical message receives the historical message. The jitter value can be calculated based on the sending time and receiving time of the periodic pair, and the process of calculating the jitter value is simple and efficient.
[0026] In a possible implementation, the transmission performance parameter includes the delay difference between any transmission path and other transmission paths, and the transmission performance parameter of each transmission path in at least one transmission path is obtained, including: determining at least one message group from multiple historical messages transmitted on any transmission path and other transmission paths, the message group includes two historical messages with the same sending order, and the two historical messages are transmitted through any transmission path and other transmission paths respectively; calculating the receiving time difference of each message group according to the receiving time of the historical messages included in each message group; determining the delay difference between any transmission path and other transmission paths according to the receiving time difference of each message group. The sending order of the historical messages included in the message group is the same. Since the sending time of the historical messages with the same sending order sent by the sending end through different transmission paths is almost the same, when calculating the delay difference, it can be based only on the receiving time determined by the receiving end, without the need to be based on the sending time determined by the sending end, thereby avoiding the influence caused by the clock asynchrony between the receiving end and the sending end, and the calculated delay difference has high accuracy.
[0027] In a possible implementation, the transmission performance parameter includes a packet loss pattern, and obtaining the transmission performance parameter of each transmission path in at least one transmission path includes: determining the packet loss pattern of each group of out-of-order pairs according to the number of packet losses of each group of out-of-order pairs in at least one group of out-of-order pairs on the transmission path, wherein the number of packet losses of the out-of-order pairs is determined according to the sending order of historical messages transmitted on the transmission path; and determining the packet loss pattern of the transmission path according to the packet loss pattern of each group of out-of-order pairs. The packet loss pattern of the transmission path can be determined according to the number of packet losses of the out-of-order pairs, and the process of determining the packet loss pattern is simple and efficient.
[0028] In a possible implementation, the packet loss mode of each group of random pairs is determined according to the number of packet losses of each group of random pairs in at least one group of random pairs on the transmission path, including: for any group of random pairs, when the number of packet losses of any group of random pairs is equal to a second parameter, determining the packet loss mode of any group of random pairs as a random packet loss mode; or, when the number of packet losses of any group of random pairs is greater than the second parameter, determining the packet loss mode of any group of random pairs as a continuous packet loss mode. By comparing the number of packet losses and the second parameter, the packet loss mode is determined, and the determination complexity is low.
[0029] In a possible implementation, the historical message includes a first identifier, and the first identifier indicates the sending order of the historical message. The sending order is determined according to the first identifier carried in the historical message, and the process of determining the sending order is simple and efficient.
[0030] In a possible implementation, the historical message and the message transmitted by applying the second sending strategy belong to the same reference service, and the historical message is transmitted based on the first sending strategy. In the process of applying the first sending strategy to transmit the historical message, the path quality of the transmission path is determined according to the historical message, so as to adjust the sending strategy in time according to the path quality, and the timeliness of the adjustment of the sending strategy is high.
[0031] In a possible implementation, applying the second sending strategy to transmit the message through one or more transmission paths of at least one transmission path includes: sending the second sending strategy to a sender of the message, the second sending strategy instructing the sender to transmit the message through the one or more transmission paths. By sending the second sending strategy to the sender, so that the sender adjusts the multiple sending mode of the message according to the second sending strategy, the process of adjusting the multiple sending mode is simple.
[0032] In a possible implementation, sending the second sending strategy to the sender of the message includes: comparing the second sending strategy with the first sending strategy; and sending the second sending strategy to the sender when there is a difference between the second sending strategy and the first sending strategy. The second sending strategy is sent to the sender only when the first sending strategy and the second sending strategy are different, thereby avoiding sending the same sending strategy to the sender multiple times and saving the strategy sending cost.
[0033] In a second aspect, a message transmission device is provided, which includes: an acquisition module, used to acquire transmission performance parameters of each transmission path in at least one transmission path, the transmission performance parameters of any transmission path indicating the path quality of any transmission path; an adjustment module, used to adjust the sending strategy from a first sending strategy to a second sending strategy according to the transmission performance parameters of each transmission path, the first sending strategy and the second sending strategy indicating different multiple sending modes; an application module, used to apply the second sending strategy to transmit the message through one or more transmission paths in at least one transmission path.
[0034] In one possible implementation, an adjustment module is used to determine at least one candidate path supporting the transmission of a message from at least one transmission path; determine a transmission mode of the message according to a packet loss rate of the candidate path, and adjust a sending strategy from a first sending strategy to a second sending strategy according to the transmission mode, wherein the transmission mode indicates a reference path for transmitting the message and the number of messages to be transmitted, and the reference path is selected from at least one candidate path.
[0035] In a possible implementation, the adjustment module is configured to select a candidate path from non-congested transmission paths according to congestion parameters of each transmission path.
[0036] In a possible implementation, an adjustment module is used to determine a first path with the lowest transmission delay among uncongested transmission paths; select a second path from the other paths whose delay difference with the first path meets a selection condition based on the delay difference between the first path and the other paths, where the other paths are paths different from the first path among multiple uncongested transmission paths; and select a path from the first path and the second path as a candidate path based on the packet loss rates of the first path and the second path when the delay difference between the first path and the second path is greater than a delay threshold, or select the first path and the second path as candidate paths when the delay difference between the first path and the second path is not greater than the delay threshold.
[0037] In one possible implementation, the adjustment module is used to select the second path as a candidate path when the packet loss rate of the first path is greater than the packet loss threshold, the packet loss threshold is determined according to the packet loss rate of the second path and a reference coefficient, and the packet loss threshold is greater than the packet loss rate of the second path; or, when the packet loss rate of the first path is not greater than the packet loss threshold, select the first path as the candidate path.
[0038] In one possible implementation, the adjustment module is used to determine the number of copies of the message transmitted based on the packet loss rate of the first path; when the number of copies of the message transmitted is indicated as multiple copies, the reference path for transmitting the message and the number of messages transmitted on the reference path are determined based on the difference between the packet loss rates of the first path and the second path to obtain the transmission mode.
[0039] In one possible implementation, the adjustment module is used to determine that the number of transmitted copies of the message is a single copy when the packet loss rate of the first path is not greater than a first threshold, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the first threshold, determine that the number of transmitted copies of the message is multiple copies.
[0040] In a possible implementation, the adjustment module is further configured to, when the number of transmitted copies of the message is a single copy, determine the transmission mode to be to transmit one copy of the message on the first path.
[0041] In a possible implementation, the adjustment module is used to select a reference path and the number of messages transmitted on the reference path according to a difference between the packet loss rates of the first path and the second path when the packet loss rate of the first path is not greater than a second threshold, the second threshold is greater than the first threshold, and the second threshold indicates a path tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the second threshold, determine that the first path and the second path are reference paths for transmitting the message, and determine the number of messages transmitted on the reference path according to the difference between the packet loss rates of the first path and the second path.
[0042] In a possible implementation, the adjustment module is used to determine that the first path and the second path are reference paths and transmit a message on the first path and the second path respectively when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is not greater than the first threshold; or, when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is greater than the first threshold, determine that the first path is the reference path and transmit multiple messages on the first path.
[0043] In a possible implementation, the adjustment module is used to determine that a message is transmitted on the first path and the second path respectively, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is not greater than the second threshold, and the third threshold is greater than the second threshold; or, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold, determine that multiple messages are transmitted on the first path and one message is transmitted on the second path; or, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is not greater than the first threshold, determine that multiple messages are transmitted on the first path and one message is transmitted on the second path. The two paths transmit one message respectively; or, when the packet loss rate of the first path is greater than the third threshold, and the packet loss rate of the second path is greater than the first threshold but not greater than the second threshold, it is determined to transmit one message on the first path and multiple messages on the second path; or, when the packet loss rate of the first path is greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold but not greater than the third threshold, it is determined to transmit multiple messages on the first path and one message on the second path; or, when the packet loss rate of the first path is greater than the third threshold, and the packet loss rate of the second path is greater than the third threshold, it is determined to transmit multiple messages on the first path and the second path respectively.
[0044] In one possible implementation, there is one candidate path, and the adjustment module is used to determine the transmission mode to be to transmit a message on the candidate path when the packet loss rate of the candidate path is less than a first threshold, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the candidate path is not less than the first threshold, determine the transmission mode to be to transmit multiple messages on the candidate path.
[0045] In one possible implementation, the adjustment module is used to determine the delay interval of the message according to the packet loss pattern of the reference path when the transmission mode indicates that the number of transmissions of the message on the reference path is multiple, and use the delay interval and the transmission mode as the second sending strategy, wherein the delay interval indicates the sending time interval between each of the multiple messages.
[0046] In one possible implementation, the adjustment module is used to determine the delay interval as the first parameter when the packet loss mode of the reference path is a random packet loss mode; or, when the packet loss mode of the reference path is a continuous packet loss mode, determine the minimum value of the packet loss duration of the reference path and the multiple delay threshold as the delay interval.
[0047] In one possible implementation, an adjustment module is used to select a reference path for transmitting messages from uncongested transmission paths according to congestion parameters of each transmission path, determine the number of messages transmitted on the reference path, and obtain a transmission mode; and adjust the sending strategy from a first sending strategy to a second sending strategy according to the transmission mode.
[0048] In one possible implementation, an adjustment module is used to determine a reference path for transmitting a message and the number of messages transmitted on the reference path from at least one transmission path to obtain a transmission mode; when the number of transmissions on the reference path is multiple, a delay interval of the message is determined according to a packet loss pattern of the reference path, and a sending strategy is adjusted from a first sending strategy to a second sending strategy according to the delay interval and the transmission mode, wherein the delay interval indicates a sending time interval between each of the multiple messages.
[0049] In one possible implementation, the adjustment module is used to select a reference path from multiple transmission paths based on the delay difference between a first path with the lowest transmission delay and other transmission paths when there are multiple transmission paths, determine the number of messages transmitted on the reference path, and obtain a transmission mode; and adjust the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode.
[0050] In one possible implementation, the transmission performance parameters include a packet loss rate, and an acquisition module is used to determine at least one group of out-of-order pairs from multiple historical messages based on the sending order of each historical message in the multiple historical messages transmitted on any transmission path, the out-of-order pair including two historical messages with adjacent receiving orders and non-adjacent sending orders; and determine the packet loss rate of any transmission path based on the sending order of the historical messages included in each group of out-of-order pairs.
[0051] In one possible implementation, an acquisition module is used to determine the number of packet losses of each group of out-of-order pairs based on the sending order of historical messages included in each group of out-of-order pairs; determine the total number of packet losses of any transmission path based on the number of packet losses of each group of out-of-order pairs; and determine the packet loss rate of any transmission path based on the total number of packet losses and the total number of multiple historical messages.
[0052] In a possible implementation, the transmission performance parameters include congestion parameters, and an acquisition module is used to determine multiple periodic pairs according to the sending order of multiple historical messages transmitted by any transmission path, the periodic pairs include two historical messages, and the sending intervals of the two historical messages included in different periodic pairs are the same; determine the jitter value of each periodic pair in the multiple periodic pairs, and determine the delay jitter value of any transmission path according to the jitter value of each periodic pair; determine the congestion parameter of any transmission path according to the delay jitter value of any transmission path and the packet loss rate of any transmission path, and the congestion parameter indicates whether any transmission path is congested.
[0053] In one possible implementation, the acquisition module is used to determine the jitter value of each periodic pair based on the sending time and receiving time of the historical messages included in each periodic pair, the sending time indicates the time when the sender of the historical message sends the historical message, and the receiving time indicates the time when the receiver of the historical message receives the historical message.
[0054] In one possible implementation, the transmission performance parameters include the delay difference between any transmission path and other transmission paths, and the acquisition module is used to determine at least one message group from multiple historical messages transmitted on any transmission path and other transmission paths, the message group includes two historical messages with the same sending order, and the two historical messages are respectively transmitted through any transmission path and other transmission path; based on the reception time of the historical messages included in each message group, the reception time difference of each message group is calculated; and based on the reception time difference of each message group, the delay difference between any transmission path and other transmission paths is determined.
[0055] In one possible implementation, the transmission performance parameters include a packet loss pattern, and an acquisition module is used to determine the packet loss pattern of each group of out-of-order pairs according to the number of packet losses of each group of out-of-order pairs in at least one group of out-of-order pairs on the transmission path, wherein the number of packet losses of the out-of-order pairs is determined according to the sending order of historical messages transmitted on the transmission path; and determine the packet loss pattern of the transmission path according to the packet loss pattern of each group of out-of-order pairs.
[0056] In one possible implementation, the acquisition module is used to, for any group of random pairs, determine that the packet loss mode of any group of random pairs is a random packet loss mode when the number of packet losses of any group of random pairs is equal to a second parameter; or, when the number of packet losses of any group of random pairs is greater than the second parameter, determine that the packet loss mode of any group of random pairs is a continuous packet loss mode.
[0057] In a possible implementation manner, the historical message includes a first identifier, and the first identifier indicates a sending order of the historical messages.
[0058] In a possible implementation manner, the historical message and the message transmitted by applying the second sending strategy belong to the same reference service, and the historical message is transmitted based on the first sending strategy.
[0059] In a possible implementation, the application module is configured to send a second sending strategy to a sender of the message, where the second sending strategy instructs the sender to transmit the message through one or more transmission paths.
[0060] In a possible implementation, the application module is configured to compare the second sending strategy with the first sending strategy; and when there is a difference between the second sending strategy and the first sending strategy, send the second sending strategy to the sending end.
[0061] According to a third aspect, a message transmission device is provided, the device comprising a processor, the processor being configured to load and execute at least one instruction so that the message transmission device executes the method according to the first aspect or any possible implementation manner of the first aspect.
[0062] In a possible implementation, the device includes a memory, which is coupled to a processor, and the memory stores at least one instruction.
[0063] In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the message transmission method in the first aspect or any possible implementation manner of the first aspect.
[0064] In a fifth aspect, a computer program (product) is provided, which includes a computer program / instructions, and the computer program / instructions are executed by a processor to enable a computer to implement the message transmission method in the first aspect or any possible implementation of the first aspect.
[0065] In a sixth aspect, a communication device is provided, the device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, 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 processor executes the method in the first aspect or any possible implementation of the first aspect.
[0066] Optionally, there are one or more processors and one or more memories.
[0067] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0068] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0069] In a seventh aspect, a chip is provided, comprising a processor for calling and executing program instructions or codes stored in a memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0070] In an eighth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods in the above aspects.
[0071] It should be understood that the beneficial effects achieved by the technical solutions of the second to eighth aspects of the present application and the corresponding possible implementation methods can be referred to the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present application;
[0073] Figure 2 A schematic diagram of another implementation environment provided for an embodiment of the present application;
[0074] Figure 3 A flowchart of a message transmission method provided in an embodiment of the present application;
[0075] Figure 4 A schematic diagram of the structure of a flag bit provided in an embodiment of the present application;
[0076] Figure 5 A schematic diagram of a message transmission process provided in an embodiment of the present application;
[0077] Figure 6 A flow chart for obtaining congestion parameters provided in an embodiment of the present application;
[0078] Figure 7 A flow chart for determining a delay interval provided in an embodiment of the present application;
[0079] Figure 8 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;
[0080] Fig. 9 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0081] Fig.10 A schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] The terms used in the implementation method of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. In order to make the purpose, technical solution and advantages of this application clearer, the implementation method of this application will be further described in detail below with reference to the accompanying drawings.
[0083] With the development of communication technology, the amount of messages transmitted on the network is increasing, and the transmitted messages include some messages with high transmission requirements. For example, some transaction messages of financial securities companies pursue low packet loss rate and low transmission delay to ensure transaction advantages and are not sensitive to bandwidth usage. Therefore, a message transmission method is needed to meet the transmission of messages with high transmission requirements.
[0084] To this end, multi-path transmission of high-demand messages can be used. For example, multiple transmission paths are configured to send messages, and the sender copies the original message to be forwarded to obtain a duplicate message, and then uses the main path and the backup path to send the original message and the duplicate message respectively. After the receiving end receives the original message and the duplicate message transmitted by the two paths, it removes the duplicate message to obtain the original message stream. In the above-mentioned message transmission method, when the packet loss rate of the main path can meet the transmission requirements of the message, using the backup path to transmit the message will cause bandwidth waste. In addition, when the delay difference between the main path and the backup path is too large, transmitting the original message and the duplicate message on the main path and the backup path respectively will cause the receiving end to be unable to smoothly perform cache selection. In addition, if the main path or the backup path is congested during the transmission process, the transmission resources are tight, and continuing to transmit the message on the congested path will cause more serious path congestion, thereby increasing the packet loss rate.
[0085] The embodiment of the present application provides a message transmission method, which is used to flexibly adjust the message sending strategy according to the path quality of the transmission path to meet the message transmission requirements. Figure 1 , which shows a schematic diagram of the implementation environment of the message transmission method provided in an embodiment of the present application, and the implementation environment includes a first device 01 and a second device 02. Among them, a communication connection can be established between the first device 01 and the second device 02 via a wired or wireless network, and at least one transmission path can be connected between the first device 01 and the second device 02. Exemplarily, in the process of transmitting historical messages between the first device 01 and the second device 02 via a first sending strategy, the first device 01 obtains the transmission performance parameters of the transmission path, determines the second sending strategy based on the transmission performance parameters, sends the second sending strategy to the second device 02, and the second device 02 sends the message according to the second sending strategy.
[0086] by Figure 1The first device 01 shown includes a message extraction module, a line quality evaluation module, a policy decision recommendation module, and a deduplication selection and forwarding module, and the second device 02 includes a policy adjustment module and a forwarding module. For example, the interaction between the first device 01 and the second device 02 is illustrated. In a possible case, the message extraction module receives the historical message sent by the forwarding module according to the first sending strategy, and extracts the first identifier of the historical message, which is used to indicate the sending order of the historical message. After that, the message extraction module sends the first identifier to the line quality evaluation module, the line quality evaluation module determines the transmission performance parameter of the transmission path according to the first identifier, sends the transmission performance parameter to the policy decision recommendation module, the policy decision recommendation module determines the second sending strategy according to the transmission performance parameter, sends the second sending strategy to the policy adjustment module, the policy adjustment module adjusts the first sending strategy to the second sending strategy, and forwards the message according to the second sending strategy through the forwarding module. In addition, after extracting the first identifier of the historical message, the first device 01 can also deduplication and select the received historical message through the deduplication selection and forwarding module, restore the original historical message sequence, and send the original historical message sequence to the downstream device or the upper layer application. In some cases, the above process of determining the second sending strategy based on the first identifier can also be executed by the second device 02. For example, the first device 01 sends the message information of the received historical message to the second device 02, and the second device 02 determines the transmission performance parameters of the transmission path based on the first identifier in the message information, and then determines the second sending strategy.
[0087] For example, see Figure 2 The implementation environment also includes a control device 03. The control device 03 establishes communication connections with the first device 01 and the second device 02 respectively, and the control device 03 obtains the message information of the historical message sent by the first device 01, determines the transmission performance parameters of the transmission path according to the message information, and determines the second transmission strategy according to the transmission performance parameters, and sends the determined second transmission strategy to the second device 02 to adjust the strategy of transmitting messages on the transmission path. The operations performed by the above control device 03 can be implemented based on the interaction with the user. Figure 2 The graphics on both sides of the first device 01 and the second device 02 indicate data centers, which are used to send and receive messages.
[0088] In a possible implementation, the first device 01, the second device 02 and the control device 03 may be any device with a data processing function, for example, the first device 01, the second device 02 and the control device 03 may be terminal devices such as a desktop, a laptop or a smart phone, or may be a server, for example, a central server, an edge server, or a local server in a local data center. The server may be a physical server or a cloud server that provides cloud computing services. Exemplarily, the first device 01 and the second device 02 may also be any device with a message forwarding capability, for example, the first device 01 and the second device 02 may be a gateway, a router, a switch, etc.
[0089] The message transmission method provided in the embodiment of the present application can be applied to the above Figure 1 or Figure 2 The implementation environment shown in FIG. 1 can be executed by the first device, the second device or the control device alone or interactively. The flowchart of the message transmission method is as follows: Figure 3 As shown, including S301-S303.
[0090] S301, acquiring transmission performance parameters of each transmission path of at least one transmission path, wherein the transmission performance parameter of any transmission path indicates the path quality of the any transmission path.
[0091] The embodiments of the present application are combined with Figure 3In the process of introducing the message transmission method, the execution subject is temporarily introduced as the first device. The execution process of other execution subjects is similar and will not be repeated here. Exemplarily, at least one transmission path is a path connecting the first device and the second device. The transmission path is, for example, a segment routing internet protocol version 6 policy (SRv6 Policy) tunnel based on the Internet Protocol version 6 forwarding plane, and the transmission path can be identified by a multi-hop segment list (segment list) of the SRv6 Policy tunnel. Among them, the first device refers to the destination device configured at the tail end of the transmission path, and the second device refers to the source device configured at the head end of the transmission path. The number of forwarding devices of different transmission paths can be the same or different. The forwarding device of the transmission path refers to the device through which the transmission path passes. For example, the devices passed by a transmission path are device A, device B, device C and device D, respectively, and the forwarding devices of the transmission path are device B and device C. Regardless of the number of forwarding devices of the transmission path, each transmission path will include the first device and the second device. Continuing with device A, device B, device C and device D as an example, device A is the second device and device D is the first device. Furthermore, the transmission path may include only the first device and the second device, or may include other devices on the basis of the first device and the second device. In addition, different transmission paths may have partial path overlaps. For example, taking the path connecting two adjacent forwarding devices as a sub-path of the transmission path, partial path overlap means that the two transmission paths share the same sub-path.
[0092] Regardless of the situation of at least one transmission path connected between the first device and the second device, the first device can obtain the transmission performance parameters of each transmission path. The embodiment of the present application does not limit the process of the second device obtaining the transmission performance parameters of the transmission path, which can be determined based on historical messages. Among them, the historical message is the message transmitted by the second device through the transmission path before the current moment. The second device can be the source device of the historical message, that is, the second device is used to generate the historical message and send the generated historical message to the first device. The second device can also be an intermediate device of the historical message. The second device receives the historical message sent by the upstream device and sends the received historical message to the first device. For example Figure 2 As shown, the second device is also connected to the data center. The second device receives historical messages sent by the data center and sends the received historical messages to the first device.
[0093] Exemplarily, the historical message may belong to the same reference service as the message to be transmitted, or may belong to a different service. In addition, different historical messages may be transmitted using the same sending strategy. For example, in the case where the historical message is a message that has been sent in the reference service, the second device, in the process of sending the historical message, selects a transmission path from at least one transmission path through the first sending strategy to transmit the message. Alternatively, different historical messages may also be transmitted using different sending strategies. For example, among multiple historical messages, there are messages transmitted based on the first sending strategy, and there are messages of other services sent according to other sending strategies. Furthermore, the transmission modes of historical messages transmitted on different transmission paths may be the same or different.
[0094] Among them, the first sending strategy can be a sending strategy set according to experience, for example, the default configuration of the first sending strategy is to select two transmission paths, and transmit a historical message on each of the two transmission paths. The first sending strategy can also be a sending strategy determined according to the historical path quality of at least one transmission path. For example, before the current moment, the second device adopts the message transmission method provided in the embodiment of the present application to determine the first sending strategy according to the transmission performance parameters. The historical message sent based on the first sending strategy can be an actual business message generated during the operation of the reference business, or it can be a plurality of identical initial messages sent for cold starting the transmission path in the preprocessing stage of the message preparing to transmit the reference business, and the initial message is used to measure the path quality of the transmission path.
[0095] Regardless of the circumstances under which the second device sends historical messages to the first device, since the historical messages are transmitted through the transmission path, the first device can determine the transmission performance parameters of the transmission path based on the historical messages, thereby determining the path quality of the transmission path. The situations for determining the transmission performance parameters of different transmission paths are similar. Next, taking any transmission path as an example, the process of obtaining the transmission performance parameters is introduced. In one possible case, the transmission performance parameters include at least one of a packet loss rate, a packet loss pattern, a delay difference, and a congestion parameter. The first device may choose to synchronously determine the multiple transmission performance parameters, or may choose to asynchronously determine the multiple transmission performance parameters. The embodiment of the present application takes synchronous determination as an example to introduce the process of obtaining the transmission performance parameters, including but not limited to the following acquisition methods.
[0096] Acquisition method 1: According to the sending order of each historical message in multiple historical messages transmitted on any transmission path, determine at least one pair of out-of-order pairs from multiple historical messages, and the out-of-order pair includes two historical messages with adjacent receiving orders and non-adjacent sending orders; determine the packet loss rate of any transmission path according to the sending order of the historical messages included in each group of out-of-order pairs.
[0097] Exemplarily, the historical message carries a first identifier, and the first identifier is used to indicate the order in which the historical messages are sent. For example, after acquiring the historical message, the second device adds the first identifier to the historical message. Figure 1 As shown, the second device includes a forwarding module, which can be used to add an identifier to the historical message. The embodiment of the present application does not limit the moment when the second device adds the first identifier to the historical message, and it can be when the second device obtains the historical message. For example, after the second device receives the historical message, it adds the first identifier to the historical message according to the order in which the historical messages are received. The first identifier of the first historical message received is 1, and the first identifier of the second historical message received is 2. In this case, when the second device sends the historical message, the sending order and the receiving order of the historical messages are the same. Optionally, the second device can also add the first identifier to the historical message according to the sending order of the historical messages when sending the historical message. For example, the first identifier of the first historical message sent is 1, and the first identifier of the second historical message sent is 2. For the first sending strategy, the default configuration illustrated in S301 is that when the second device transmits historical messages through two transmission paths, the first identifier of the same historical messages transmitted on different transmission paths is the same, that is, after receiving the historical messages, the second device will perform a copy operation on the received historical messages to transmit the same historical messages on different transmission paths, and the first identifiers of the same historical messages transmitted on different transmission paths are the same.
[0098] In a possible implementation, when the historical message carries an assignable field, the second device may assign a first identifier to the assignable field, which is, for example, an empty field. Alternatively, the second device may add a new field to the historical message. Figure 4 A schematic diagram of a structure of a flag bit provided in an embodiment of the present application, Figure 4 In the example, the second device adds a new identification bit in the historical message to carry the first identification bit. Figure 4 It is shown as 32 bits, the most significant bit is used to carry the second identifier. The role of the second identifier is explained in the following embodiment and will not be introduced here. The remaining 31 bits are used to carry the first identifier.
[0099] Regardless of the method by which the second device obtains the historical message carrying the first identifier, it can send the historical message to the first device through the transmission path. After the first device receives the historical message, it can determine the sending order of the historical message on any transmission path based on the first identifier of the historical message, and determine the out-of-order pairs among multiple historical messages.
[0100] The disordered pair includes two historical messages whose first identifiers are not adjacent. For example, the order in which the second device sends multiple historical messages is message 1, message 2, message 3, message 4, message 5, message 6, message 7 and message 8. The multiple historical messages received by the first device are message 1, message 3, message 4, message 5 and message 8. Among the historical messages received by the first device, message 1 and message 3 are messages that are received successively and in an adjacent order, but the first identifiers of message 1 and message 3 are 1 and 3 respectively, and the sending order is not adjacent. Therefore, message 1 and message 3 are a disordered pair, and similarly, message 5 and message 8 are also a disordered pair. The first device determines that the two groups of disordered pairs are [(1, 3), (5, 8)]. Since the first identifier on the right side of the disordered pair is greater than the first identifier on the left side, the disordered pair can be called an ascending order pair in some cases.
[0101] The above is a process of determining the disordered pair according to the first identifier when one transmission path transmits one historical message. For the case where one transmission path transmits multiple historical messages, for example, the first sending strategy is to send two historical messages on one transmission path and one historical message on another transmission path, and the interval between the two historical messages is 30 microseconds (μs), then the message transmission situation on the transmission path that needs to be sent twice is as follows: Figure 5 shown. Figure 5 A box in the figure represents a historical message, a box with slashes represents multiple historical messages received by the second device, a black box represents an original historical message sent by the second device to the transmission path, and a white box represents a copied historical message sent by the second device to the transmission path after copying the received historical message. Since the transmission path needs to transmit two copies of historical messages, and the same historical message, for example Figure 5 The first identifiers carried in the historical message 1 and the historical message 1' are the same, both 1. Therefore, the historical message also carries a second identifier for distinguishing the historical message with an earlier sending order and the historical message with a later sending order in the same historical message transmitted in the same transmission path. Figure 5 The second identifier of historical message 1 is 0, indicating that historical message 1 is the original historical message with an earlier sending order, and the second identifier of historical message 1' is 1, indicating that historical message 1' is a copied historical message with a later sending order. In this case, after receiving the historical messages, the first device will first distinguish the original message sequence and the copied message sequence according to the second identifier, determine the disordered pair according to the first identifiers of the multiple original historical messages included in the original message sequence, for example [(1, 3), (5, 8)], and determine the disordered pair according to the first identifiers of the multiple copied historical messages included in the delayed message sequence, for example [(2, 5)].
[0102] Exemplarily, after the first device determines the out-of-order pairs, it can determine the packet loss rate based on the out-of-order pairs, and the determination process includes but is not limited to: determining the number of packet losses of each group of out-of-order pairs based on the sending order of historical messages included in each group of out-of-order pairs; determining the total number of packet losses of any transmission path based on the number of packet losses of each group of out-of-order pairs; determining the packet loss rate of any transmission path based on the total number of packet losses and the total number of multiple historical messages.
[0103] Since the sending order of historical messages is the same as the first identifier when the second device is sending historical messages, multiple historical messages are transmitted in order on the transmission path, and packet loss occurs in the middle, there will be disordered pairs whose receiving order does not match the sending order. For example, the disordered pair (1, 3) is caused by the packet loss of message 2, and the disordered pair (5, 8) is caused by the packet loss of messages 6 and 7. Therefore, the first device can determine the number of packet losses of the disordered pair according to the first identifier of the historical message included in the disordered pair. Subtract 1 from the difference between the two first identifiers, and use the obtained difference as the number of packet losses. Then the number of packet losses of the disordered pair (1, 3) is 3-1-1=1, and the number of packet losses of the disordered pair (5, 8) is 8-5-1=2.
[0104] After determining the number of packet losses of each disordered pair, the first device may add the number of packet losses of each disordered pair, and determine the sum obtained by the addition as the total number of packet losses of the transmission path. Continuing with the disordered pair [(1, 3), (5, 8)] as an example, the total number of packet losses is 2+1=3. After determining the total number of packet losses, the first device also needs to determine the total number of historical messages transmitted by the transmission path. The first device can determine the total number based on the first identifier of the first historical message received within the time interval and the first identifier of the last historical message received. The time interval can be set based on experience. The first device can set a sliding window, and the window length is the time interval. For example, the first identifier of the first historical message is 1, and the first identifier of the last historical message is 8, then the total number is 8. In addition, the first device can also count the total number of historical messages received within the time interval based on the first identifier of the received historical message. For example, there are a total of 10 historical messages whose first identifiers are multiples of 4096, and the first device thus determines that the total number of historical messages = 10*4096 = 40960. Regardless of the method by which the first device determines the total number of historical messages, the number of lost packets can be divided by the total number, and the quotient obtained is the packet loss rate of the transmission path. Continuing with the above embodiment, the total number of lost packets is 3 and the total number of historical messages is 8, the determined packet loss rate is 3 / 8=37.5%.
[0105] Acquisition method two: determine at least one message group from multiple historical messages transmitted on any transmission path and other transmission paths, the message group includes two historical messages with the same sending order, and the two historical messages are respectively transmitted through any transmission path and other transmission path; calculate the reception time difference of each message group based on the reception time of the historical messages included in each message group; determine the delay difference between any transmission path and other transmission path based on the reception time difference of each message group.
[0106] In the case where there are multiple transmission paths for transmitting historical messages, the first device can count the delay differences between the transmission paths. Among them, the historical messages transmitted by the multiple transmission paths are the same. For example, in S301, the first sending strategy is to transmit the duplicate message and the original message through two transmission paths respectively, and the duplicate message and the original message belong to the same historical message. In addition, the delay difference between the two transmission paths refers to the difference between the transmission delays of the two transmission paths, indicating the difference in the arrival of the same historical message at the first device when it is transmitted through the two transmission paths at the same time. Next, taking any one transmission path as path 1 and the other transmission path as path 2 as an example, the process of determining the delay difference is introduced.
[0107] Exemplarily, the message group determined by the first device includes two identical historical messages, and the first identifiers of the two historical messages are also the same. For example, path 1 transmits original message 1 of message 1, and path 2 transmits copy message 1 of message 1, then original message 1 and copy message 1 belong to one message group. The first device can determine all the received historical messages that are paired in pairs as a message group, or select some historical messages from the received historical messages that are paired in pairs to determine as a message group. The selection can be a random selection or a periodic selection. For example, based on the first identifier of the historical message, historical messages whose first identifier is a multiple of a third parameter are selected to form a message group. The third parameter can be an arbitrary parameter. Since the first identifier in the historical message is represented in binary, the third parameter can be set to a binary shift multiple based on experience, such as 2, 4, or 4096.
[0108] Regardless of the method used by the first device to determine at least one message group from multiple historical messages, the reception time difference of each message group can be calculated. The calculation formula is, for example, diff = (recv2-send2)-(recv1-send1) = recv2-send2-recv1+send1. Among them, diff indicates the reception time difference, recv1 indicates the reception time of the historical message on path 1, recv2 indicates the reception time of the historical message on path 2, send1 indicates the sending time of the historical message on path 1, and send2 indicates the sending time of the historical message on path 2. Because when the second device sends the same historical message through path 1 and path 2, the sending time of the same historical message is almost the same, that is, the sending error is lower than the error threshold set based on experience. Therefore, the sending time of the historical message on path 1 and path 2 can be regarded as the same time, and the calculation formula of the receiving time difference can be simplified to diff = recv2-recv1, that is, the difference between the receiving time of the historical message on path 2 and the receiving time of the historical message on path 1 is equal to the receiving time difference of the message group. By controlling the historical messages on path 1 and path 2 to be sent at the same time, when counting the delay difference later, only the receiving time counted by the first device needs to be counted, and there is no need to refer to the sending time counted by the second device. Even if there is a problem of clock asynchrony between the first device and the second device, the error caused by clock asynchrony can be avoided, and the calculated receiving time difference has a high accuracy.
[0109] The embodiment of the present application does not limit the way in which the first device obtains the reception time of the historical message. When the historical message is received, the reception time of the historical message can be recorded and stored, or when the historical message is received, a reception timestamp can be stamped on the historical message to indicate the reception time of the historical message. Therefore, when the reception time of the historical message needs to be obtained later, the reception time of the historical message can be obtained by parsing the historical message and reading the reception timestamp.
[0110] After the first device obtains the receiving time of the historical message and calculates the receiving time difference of the message group according to the receiving time, it can determine the delay difference between path 1 and path 2 according to the receiving time difference of each message group. For example, based on the receiving time differences of multiple message groups, a statistical method such as an average value or a sliding average is used to evaluate the delay difference (latency_difference) between path 1 and path 2.
[0111] In the case where the transmission path for transmitting the historical message includes more than two transmission paths, the first device can determine the transmission path with the shortest transmission delay according to the time of receiving the historical message, and respectively calculate the delay difference between other transmission paths and the transmission path with the shortest transmission delay. In addition, the first device can also count the delay difference between any two transmission paths. For example, the first device obtains the transmission delay of each transmission path sent by other devices, and counts the delay difference between any two transmission paths when the transmission delay of each transmission path meets the transmission requirements of the reference service.
[0112] In the case where the transmission path for transmitting historical messages includes one transmission path, the first device can obtain the historical statistical delay difference. In one possible case, based on the duration of suspension of transmission on any transmission path exceeding a suspension threshold set based on experience, the second device can send a test message to any transmission path, so that the first device can count the transmission performance parameters of any transmission path based on the test message, and the transmission performance parameters include the delay difference between any transmission path and other transmission paths. Therefore, the first device can access the storage space to obtain the delay difference between any two transmission paths, for example, to obtain the delay difference between the currently transmitting transmission path and other transmission paths.
[0113] Acquisition method three: determining the packet loss mode of each group of random pairs according to the number of packet losses of each group of random pairs in at least one group of random pairs on the transmission path; determining the packet loss mode of the transmission path according to the packet loss mode of each group of random pairs.
[0114] Among them, the number of packet losses of the out-of-order pair is determined according to the sending order of historical messages transmitted on the transmission path. The process of determining the number of packet losses is similar to the process of determining the number of packet losses involved in the acquisition method 1. Please refer to the relevant description in the acquisition method 1, and will not be repeated here.
[0115] Since the process of determining the packet loss mode of different groups of random pairs is similar, the following takes any group of random pairs as an example to illustrate the process of determining the packet loss mode. In one possible implementation, the process of determining the packet loss mode of the random pair according to the number of packet losses includes: when the number of packet losses of any group of random pairs is equal to the second parameter, the packet loss mode of any group of random pairs is determined to be a random packet loss mode; or, when the number of packet losses of any group of random pairs is greater than the second parameter, the packet loss mode of any group of random pairs is determined to be a continuous packet loss mode. Among them, the random packet loss mode refers to the random loss of packets at a certain moment. The random packet loss mode can also be called the sporadic packet loss mode, and the continuous packet loss mode refers to the packet loss for a period of time, and multiple packets are lost continuously at a time. Since the random packet loss mode is generally a random loss of a message, the second parameter can be set to 1 based on experience. In this case, when the number of packet losses of the random pair is 1, the random pair belongs to the random packet loss mode. When the number of packet losses of an out-of-order pair is greater than 1, the out-of-order pair is generated by the continuous loss of multiple messages, and the out-of-order pair belongs to the continuous packet loss mode.
[0116] After determining the packet loss mode of each disordered pair, the first device can determine the packet loss mode of the transmission path according to the packet loss mode of the disordered pair, count the proportion of the random packet loss mode in the total number of disordered pairs, compare the proportion and the size of the ratio threshold, and determine the packet loss mode according to the comparison result. If the proportion exceeds the ratio threshold, the packet loss mode of the transmission path is determined to be a random packet loss mode. If the proportion does not exceed the ratio threshold, the packet loss mode of the transmission path is determined to be a continuous packet loss mode. The ratio threshold can be set based on experience, for example, the ratio threshold is set to 80% based on experience. In addition, as shown in the above embodiment, the first device can also be involved in the process of counting the packet loss rate based on the number of packet losses of the disordered pairs involved in the process of counting the packet loss mode of the transmission path by the first device. It can be selected to synchronously determine the packet loss mode of each transmission path in the process of determining the packet loss rate, and improve the efficiency of determining the transmission performance parameters by synchronously determining multiple transmission performance parameters. The first device can also determine the packet loss mode of the reference path when it is necessary to determine the number of transmission copies of each reference path according to the packet loss mode of each reference path in the future, so as to control the number of reference paths that need to count the packet loss mode and save costs.
[0117] Acquisition method four: determine multiple periodic pairs according to the sending order of multiple historical messages transmitted by any transmission path, the periodic pairs include two historical messages, and the sending intervals of the two historical messages included in different periodic pairs are the same; determine the jitter value of each periodic pair, and determine the delay jitter value of any transmission path according to the jitter value of each periodic pair; determine the congestion parameter of any transmission path according to the delay jitter value of any transmission path and the packet loss rate of any transmission path, and the congestion parameter indicates whether any transmission path is congested.
[0118] Among them, the same sending interval means that the difference of the first identifiers of the two historical messages included in each periodic pair is the same, and the difference can be set based on experience, such as 4096 in the above example, then the identifiers of the two historical messages included in one periodic pair are 4096 and 8192, respectively, and the identifiers of the two historical messages included in another periodic pair are 8192 and 12288. Exemplarily, the process of the first device determining the jitter value of each periodic pair includes: determining the jitter value of each periodic pair according to the sending time and receiving time of the historical messages included in each periodic pair in the multiple periodic pairs, the sending time indicates the time when the second device sends the historical message, and the receiving time indicates the time when the receiving end of the historical message receives the historical message.
[0119] In a possible implementation, the historical messages included in the periodic pair carry a sending timestamp, indicating the time when the second device sent the historical message. The second device can stamp all the sent historical messages with a sending timestamp. In this case, the first device can determine the periodic pair according to the first identifier of the received historical message. The second device can also stamp the historical message with a sending timestamp whose first identifier is a multiple of the difference, for example, stamp the historical message with a sending timestamp whose first identifier is a multiple of 4096, and the second device can determine the historical message carrying the sending timestamp as the historical message included in the periodic pair.
[0120] Regardless of the method used by the second device to stamp the historical message with the sending timestamp, the historical messages included in the periodic pair all carry the sending timestamp. The first device can determine the sending time of the historical message according to the sending timestamp by parsing the historical messages included in the periodic pair, and then determine the jitter value of any periodic pair according to the sending time and receiving time of the historical messages included in any periodic pair. The calculation formula includes: jitter = abs[(recvB-sendB)-(recvA-sendA)] = abs[(recvB-recvA)-(sendB-sendA)] = abs(recv diff -send diff ). Among them, jitter indicates the jitter value, abs is used to calculate the absolute value, recvB and recvA indicate the receiving time of two historical messages, sendB and sendA indicate the sending time of two historical messages, A and B are used to distinguish different historical messages, (recvB-sendB) is the transmission delay of a historical message in the first path, (recvA-sendA) is the transmission delay of another historical message in the first path, and by calculating the transmission delay of the two historical messages in the first path, the change of the transmission delay, that is, the jitter value, is determined. And recv diff Indicates the difference in receiving time, send diffIndicates the difference in sending time. Since the sending time is determined by the second device and the receiving time is determined by the first device, first subtract the two sending times determined by the second device and the two receiving times determined by the first device to offset the error caused by the clock asynchrony between the first device and the second device. Then, the jitter value calculated using the difference in sending time and the difference in receiving time has high accuracy.
[0121] After determining the jitter value of each periodic pair, the first device may determine the delay jitter value of the transmission path according to the jitter value. For example, the delay jitter value of the transmission path may be determined by using statistical methods such as average, sliding average and quantile value for multiple jitter values. Afterwards, the first device may determine the congestion parameter of the transmission path according to the delay jitter value and the packet loss rate of the transmission path. Figure 6 The first device determines whether the delay jitter value and the packet loss rate are both greater than the corresponding threshold value. If both exceed the corresponding threshold value, it is determined that the congestion parameter of the transmission path indicates that the transmission path is congested. If neither is greater than the corresponding threshold value, for example, neither is greater than the corresponding threshold value, or one of the packet loss rate and the delay jitter value is not greater than the corresponding threshold value, it is determined that the congestion parameter of the transmission path indicates that the transmission path is not congested. The threshold corresponding to the delay jitter value and the threshold corresponding to the packet loss rate can be set based on experience.
[0122] The first device can determine the congestion parameter according to the packet loss rate and the delay jitter value by the above method, or can receive the congestion parameter sent by other devices. For example, the first device is connected to the control device, and the control device can use the above operation to determine the congestion parameter of the transmission path, or it can count the path utilization of multiple sub-paths on the transmission path, and determine the highest path utilization among the path utilizations of the multiple sub-paths as the path utilization of the transmission path. Afterwards, the congestion parameter of the transmission path is determined according to the path utilization. For example, when the path utilization is greater than the utilization threshold value set based on experience, the congestion parameter of the transmission path is determined to be the transmission path congestion, and when the path utilization is not greater than the utilization threshold value, the congestion parameter of the transmission path is determined to be the transmission path is not congested.
[0123] In addition, for the structure of the first device, Figure 1 The example shown includes a message extraction module and a line quality assessment module. After the first device notifies the message extraction module to obtain the first identifier, timestamp and disordered pair that need to be counted in the process of obtaining the transmission performance parameters, the obtained information can be sent to the line quality assessment module after each first identifier, timestamp and disordered pair is obtained, or the obtained information can be added to the upload queue. When the queue length of the upload queue exceeds the set value set based on experience or the storage time of the upload queue exceeds the set time set based on experience, the transmission of the queue is triggered, and the information in the upload queue is sent to the line quality assessment module, and the line quality assessment module executes the above-mentioned process of determining the transmission performance parameters of the transmission path.
[0124] The above content is a process of how to calculate the transmission performance parameters of the transmission path according to the historical messages transmitted when the execution subject is the first device. The embodiment of the present application does not limit the process of determining the transmission performance parameters. Figure 2 The control device shown in the figure can obtain the transmission performance parameters of the transmission path through an active measurement method, and the active measurement method is, for example, a two-way active measurement protocol (TWAMP), in-situ flow information telemetry (iFit), etc. The control device controls the second device to actively send a measurement message, and determines the transmission performance parameters of the transmission path according to the transmission status of the measurement message on the transmission path.
[0125] S302: Adjust the sending strategy from a first sending strategy to a second sending strategy according to the transmission performance parameters of each transmission path, wherein the first sending strategy and the second sending strategy indicate different multiple sending modes.
[0126] In a possible implementation, the first device passes Figure 1 In the process of determining the second sending strategy by the policy decision recommendation module shown, the line quality evaluation module can directly send the acquired transmission performance parameters to the policy decision recommendation module after acquiring the transmission performance parameters, or can periodically send the statistical multiple transmission performance parameters to the policy decision module through a timer trigger or an upstream queue length trigger, so that the policy decision module determines the second sending strategy according to the received transmission performance parameters. In one possible case, the first device can also determine the parameter change according to the transmission performance parameters, and trigger the operation of determining the second sending strategy according to the transmission performance parameters when the parameter change indicates performance abnormality. The performance abnormality can be that the transmission performance parameters exceed the corresponding threshold, such as the delay difference change exceeds the first abnormal threshold, and the packet loss rate change exceeds the second abnormal threshold. In this case, the line quality evaluation module sends the acquired transmission performance parameters to the policy decision module after determining that there is a performance abnormality, and the first device performs the operation of S302 through the policy decision module.
[0127] After obtaining the transmission performance parameters of the transmission path, the first device may determine a second transmission strategy that is more suitable for the current path quality according to the transmission performance parameters, and adjust the first transmission strategy previously applied to the second transmission strategy, wherein the second transmission strategy indicates a multiple transmission mode, which is used to describe the way in which the second device sends multiple copies of the message. In a possible implementation, the process of the first device determining the second transmission strategy includes but is not limited to the following four methods.
[0128] Determination method 1: determine a candidate path that supports the transmission of the message from at least one transmission path; determine the transmission mode of the message according to the packet loss rate of the candidate path, and determine the second sending strategy according to the transmission mode, wherein the transmission mode indicates a reference path in the candidate path for transmitting the message and the number of copies of the message to be transmitted.
[0129] Exemplarily, the first device may select a candidate path based on the congestion parameters and delay differences of each transmission path. The first device may choose to use the congestion parameters first and then refer to the delay difference, or may choose to refer to the delay difference first and then refer to the congestion parameters. Since the principles of different execution orders are similar, the following will take the example of selecting a candidate path based on the congestion parameters first and then based on the delay difference as an example for explanation. In one possible scenario, the first device may select a candidate path from the transmission paths whose congestion parameters indicate that they are not congested, based on the congestion parameters of each transmission path. Since continuing to transmit messages on a congested transmission path will cause the congestion of the transmission path to increase, resulting in a sharp increase in the packet loss rate, the first device needs to select a non-congested transmission path to transmit the message.
[0130] In the case where there is only one uncongested transmission path, the first device determines the uncongested transmission path as a candidate path. In the case where there are multiple uncongested transmission paths, the process of the first device selecting a candidate path includes: determining a first path with the lowest transmission delay among the uncongested transmission paths; selecting a second path from the other paths whose delay difference with the first path meets the selection condition based on the delay difference between the first path and the other paths, the other paths being paths different from the first path among the multiple uncongested transmission paths; in the case where the delay difference between the first path and the second path is greater than the delay threshold, selecting a path from the first path and the second path as a candidate path based on the packet loss rates of the first path and the second path, or, in the case where the delay difference between the first path and the second path is not greater than the delay threshold, selecting the first path and the second path as candidate paths.
[0131] Exemplarily, the first device may obtain the transmission delay in multiple transmission paths, determine the first path with the lowest transmission delay, or determine the transmission path where the historical message that arrives first is located as the first path according to the arrival order of the historical messages with the same first identifier. After that, the first device obtains the delay difference between the first path and other paths, and selects the second path according to at least one delay difference. Wherein, the delay difference satisfies the selection condition, which may mean that after the delay difference is arranged in order from small to large, the arrangement order of the delay difference is not greater than the order threshold, and the order threshold is, for example, 1, then the second path is the transmission path with the smallest delay difference between the other paths and the first path. Optionally, the order threshold may also be other values such as 2. In this case, the second path determined by the first device may be multiple transmission paths. In addition, the delay difference satisfies the selection condition and may also mean that the delay difference is not greater than the selection threshold, and the selection threshold may be any time length set according to experience. First, the second path is screened according to the selection threshold, and the number of second paths that need to compare the delay difference and the delay threshold is controlled, thereby improving the selection efficiency of the candidate path.
[0132] Next, taking the order threshold of 1 as an example, the process of selecting the second path is illustrated. There are four transmission paths between the first device and the second device. According to the arrival order of historical messages with the same first identifier, the transmission delays are determined to be arranged from low to high as transmission path 1, transmission path 2, transmission path 3 and transmission path 4. Among them, the congestion parameter of transmission path 1 indicates that transmission path 1 is congested. Therefore, the first path with the lowest transmission delay among the non-congested transmission paths is transmission path 2. The first device determines the delay difference 1 between transmission path 2 and transmission path 3, and the delay difference 2 between transmission path 2 and transmission path 4 in sequence. Since the delay difference 1 is less than the delay difference 2, the first device determines that transmission path 3 is the second path.
[0133] Since the process of selecting a candidate path according to different numbers of second paths and first paths is similar, the following takes a second path as an example to illustrate the process of selecting a candidate path according to the relationship between the delay difference between the first path and the second path and the delay threshold. Exemplarily, the delay threshold is used to indicate the maximum tolerable delay difference of the first device, and the delay threshold can be determined according to the multiple transmission and selection range of the first device, and the multiple transmission and selection range can be the message receiving window of the first device. For example, when the delay difference between the first path and the second path exceeds the delay threshold, the ability of the first device to cache messages reaches the upper limit, and it is impossible to wait for the message transmitted by the second path, and it is even more impossible to restore the original message flow through multiple transmission and selection. The delay threshold can also be set according to the transmission requirements of the reference service, for example, the requirements for transmission delay included in the service level agreement (SLA) of the reference service. Since the delay difference between the first path and the second path is greater than the delay threshold, it has exceeded the tolerance upper limit of the first device or the reference service, and the first path and the second path cannot be used to transmit messages at the same time. Therefore, it is necessary to select a path from the first path and the second path as a candidate path.
[0134] In one possible case, when the packet loss rate of the first path is greater than the packet loss threshold, the second path is selected as the candidate path, the packet loss threshold is determined according to the packet loss rate of the second path and a reference coefficient, and the packet loss threshold is greater than the packet loss rate of the second path; or, when the packet loss rate of the first path is not greater than the packet loss threshold, the first path is selected as the candidate path.
[0135] Exemplarily, the first device multiplies the packet loss rate of the second path by a reference coefficient, and the product obtained is the packet loss threshold. The reference coefficient can be set based on experience, for example, set to 10. The packet loss threshold is constructed by the reference coefficient, and then the packet loss rate of the first path and the packet loss threshold are compared to determine whether the packet loss rate of the first path is much greater than the packet loss rate of the second path. When the packet loss rate of the first path is greater than the packet loss threshold, it means that the packet loss rate of the first path is much greater than the packet loss rate of the second path. In this case, even if the transmission delay of the first path is shorter than the transmission delay of the second path, the second path will be selected as a candidate path based on transmission quality considerations. On the contrary, if the packet loss rate of the first path is not greater than the packet loss threshold, that is, the packet loss rate of the first path is not much greater than the packet loss rate of the second path, that is, the packet loss rate of the first path is tolerable, and when the transmission delay of the first path is shorter than the transmission delay of the second path, the first path is selected as a candidate path.
[0136] When the delay difference between the first path and the second path is not greater than the delay threshold, the first device can smoothly perform multiple transmission and selection for the messages transmitted by the first path and the second path to restore the original message flow. Therefore, the first path and the second path can be used to transmit the message, and the first device uses the first path and the second path as candidate paths.
[0137] After determining the candidate path, the first device may determine the transmission mode of the message according to the packet loss rate of the candidate path, for the case where there is only one candidate path, for example, only one transmission path is connected between the first device and the second device, or there is only one transmission path that is not congested, or a path is selected from the first path and the second path as the candidate path according to the packet loss rate and the packet loss threshold. Regardless of the reason why there is only one candidate path, the first device determines the candidate path as a reference path, and determines the number of copies of the message to be transmitted according to the packet loss rate of the candidate path. Exemplarily, when the packet loss rate of the candidate path is less than the first threshold, the transmission mode is determined to be to transmit one copy of the message on the candidate path, or, when the packet loss rate of the candidate path is not less than the first threshold, the transmission mode is determined to be to transmit multiple copies of the message on the reference path.
[0138] In a possible implementation, the first threshold is a value set based on experience, indicating a low packet loss threshold, and reflecting the packet loss tolerance of the message. Since the packet loss rate of the candidate path is less than the low packet loss threshold, it means that the number of messages lost on the candidate path is low and falls within the tolerance range of the reference service. Therefore, only one message needs to be transmitted on the candidate path. Even if packet loss occurs during the transmission process, the number of packet loss is small and will not affect the operation of the reference service.
[0139] When the packet loss rate of the candidate path is not less than the packet loss threshold, the packet loss on the candidate path has exceeded the tolerance range of the reference service. Therefore, multiple copies of the message need to be transmitted on the candidate path. By copying the message to be transmitted and transmitting multiple copies of the message on the candidate path, even if packet loss occurs during the transmission process, after receiving the multiple copies of the message transmitted on the candidate path, deduplication operation can be performed to restore the original message flow and ensure the smooth transmission of the message. Among them, the number of multiple copies of the message can be set according to experience, for example, set to two copies, that is, copy one message, and transmit the copied message and the original message through the candidate path. The multiple copies involved in the following embodiments may refer to two copies or other numbers of more than two copies, and the embodiments of the present application do not limit or repeat this.
[0140] In one possible implementation, for a case where there are multiple candidate paths, such as the first path and the second path in the above example, the process of the first device determining the transmission mode includes but is not limited to: determining the number of transmission copies of the message based on the packet loss rate of the first path, and the number of transmission copies indicates whether the message is a single copy; when the number of transmission copies of the message indicates multiple copies, determining a reference path for transmitting the message and the number of messages transmitted on the reference path based on the difference between the packet loss rates of the first path and the second path, to obtain the transmission mode.
[0141] Exemplarily, the process of the first device determining the number of transmission copies based on the packet loss rate of the first path includes: when the packet loss rate of the first path is not greater than the first threshold, determining that the number of transmission copies of the message is a single copy; or, when the packet loss rate of the first path is greater than the first threshold, determining that the number of transmission copies of the message is multiple copies.
[0142] Since the packet loss rate of the first path is not greater than the first threshold, that is, the first path can meet the message transmission requirements of the reference service, in this case, transmitting one message can achieve the normal operation of the reference service, and the first device can determine the transmission mode to transmit one message on the first path. Only using the first path to transmit messages can effectively avoid bandwidth waste and improve the utilization rate of transmission resources. In the case where the packet loss rate of the first path is greater than the first threshold, since transmitting a message on the first path will cause the packet loss to exceed the tolerance range of the reference service, multiple messages need to be sent. The first device thus determines that the number of messages to be transmitted is multiple, and compares the difference between the packet loss rates of the first path and the second path to determine the number of messages transmitted on the reference path and the reference path.
[0143] In a possible case, the difference between the packet loss rates of the first path and the second path may be achieved by comparing the packet loss rate of the first path and the packet loss rate of the second path with thresholds corresponding to the packet loss rates, respectively. The thresholds include a first threshold, a second threshold, and a third threshold, indicating different packet loss situations, wherein the second threshold is greater than the first threshold as a medium packet loss threshold, and the third threshold is greater than the second threshold as a high packet loss threshold.
[0144] Regarding the case where the packet loss rate of the first path is greater than the first threshold, this case can be further divided into case A and case B.
[0145] Case A: the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold.
[0146] In this case, the first device selects a reference path according to the difference between the packet loss rates of the first path and the second path, and the number of messages transmitted on the reference path. The determination process includes but is not limited to: when the packet loss rate of the second path is not greater than the first threshold, determining to transmit a message on the first path and the second path respectively; or, when the packet loss rate of the second path is greater than the first threshold, determining to transmit multiple messages on the first path. When the packet loss rate of the second path is not greater than the first threshold and is a low packet loss rate, the second path can be used to transmit the message, that is, the first path and the second path are determined as reference paths, and a message is transmitted on the first path and the second path respectively, so as to reduce the amount of messages lost during the transmission process by transmitting multiple messages.
[0147] When the packet loss rate of the second path is greater than the first threshold, since the packet loss rate of the first path is also greater than the first threshold, the packet loss rate of the second path may not be much different from that of the first path, or it may be greater than that of the first path. In addition, since the transmission delay of the second path is higher than the transmission delay of the first path, the second path cannot be better than the first path in preventing packet loss and low latency, and the packet loss rate of the first path is not greater than the second threshold. The first path includes a small number of packet losses during the transmission process. By transmitting multiple copies of messages on the first path, the path packet loss can be reduced to the packet loss tolerance value, that is, the first path does not exceed the path tolerance corresponding to the message. The first path can be selected as the reference path, and when multiple copies of messages are transmitted on the first path, multiple transmission and selection of messages are performed to solve the packet loss problem of messages under low latency.
[0148] Case B: the packet loss rate of the first path is greater than the second threshold.
[0149] In this case, the first device determines the first path and the second path as reference paths for transmitting messages, and determines the number of messages transmitted on the reference path according to the difference between the packet loss rates of the first path and the second path. Since the packet loss rate of the first path is greater than the second threshold, even if multiple messages are transmitted on the first path, the packet loss cannot be reduced to the packet loss tolerance value, and the packet loss exceeds the upper limit of the packet loss tolerance of the reference service. Therefore, it is necessary to use the second path for backup transmission of messages, and the first device thus determines the first path and the second path as reference paths. According to the relationship between the packet loss rate and the threshold, situation B may include situation one to situation six.
[0150] Case 1: When the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is not greater than the second threshold, it is determined that one message is transmitted on the first path and the second path respectively. Since the packet loss rate of the second path is not greater than the second threshold, the second path is still a low packet loss path, and the second path can complete the message transmission well. Therefore, one message can be transmitted on the first path and the second path respectively.
[0151] Case 2: When the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold, it is determined to transmit multiple messages on the first path and one message on the second path.
[0152] Since the packet loss rate of the second path is greater than the second threshold, the second path does not belong to the low packet loss path. Transmitting only one message on the first path and the second path still cannot meet the demand for low packet loss rate. For example, messages 2-4 are lost on the first path, and their duplicate messages are also lost on the second path. Even if the first device performs multiple transmission and selection, it cannot obtain messages 2-4. The number of lost messages in the message sequence to be transmitted is too large, and the transmission requirements of the reference service cannot be met. Based on this, the first device determines that more than two messages need to be transmitted. Since the packet loss rates of the second path and the first path are both greater than the second threshold, that is, the packet loss rate of the second path may not be much different from the packet loss rate of the first path, or it may be greater than the packet loss rate of the first path, and the transmission delay of the first path is lower than the transmission delay of the second path. To transmit the same number of messages, the time required for the first path is shorter than that of the second path. Therefore, the first device chooses to transmit multiple messages on the first path and one message on the second path.
[0153] Case 3: when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is not greater than the first threshold, it is determined to transmit one message on the first path and one message on the second path respectively.
[0154] Since the packet loss rate of the second path is not greater than the first threshold value, it is low packet loss, and the number of packet losses on the second path is within the tolerance range, the message transmitted on the first path is used as a backup of the message transmitted on the second path to supplement the message lost on the second path. Therefore, transmitting one message on the first path and one message on the second path can meet the transmission demand of the reference service. The first device thus determines the number of message transmissions to be one message on the first path and one message on the second path respectively.
[0155] Case 4: when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the first threshold but not greater than the second threshold, it is determined to transmit one message on the first path and multiple messages on the second path.
[0156] Since the packet loss rate of the second path is not greater than the third threshold value, it is not a high packet loss path. Therefore, selecting one path from the first path to the second path to transmit multiple copies of the message can meet the transmission requirements of the reference service, and the packet loss rate of the second path is not greater than the second threshold value. Since the packet loss rate of the first path is greater than the third threshold value, the packet loss rate of the second path is not greater than the second threshold value, and the packet loss of the second path is much smaller than the packet loss rate of the first path, it is also a low packet loss path. Compared with the first path, which is already a high packet loss path, the packet loss of the second path is lighter. Therefore, the first device determines the number of messages to be transmitted as multiple copies on the second path and one copy on the first path. The number of copies can be set based on experience, for example, two copies are transmitted.
[0157] Case 5: when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the second threshold but not greater than the third threshold, it is determined to transmit multiple messages on the first path and one message on the second path.
[0158] Since the packet loss rate of the second path is greater than the second threshold, it is no longer a low packet loss path, and the packet loss rate of the second path is not much smaller than that of the first path, and the transmission delay of the first path is shorter than the transmission delay of the second path, based on this, according to the packet loss rate and the transmission delay, the first device chooses to transmit multiple messages on the first path and one message on the second path.
[0159] Case 6: when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the third threshold, it is determined to transmit multiple messages on the first path and the second path respectively.
[0160] Since the packet loss rates of the first path and the second path are both greater than the third threshold, the first path and the second path are both high packet loss paths. Therefore, it is necessary to transmit multiple copies of messages on the first path and the second path to implement backup of messages transmitted on the path. By backing up messages within the path and between paths, the impact of packet loss can be reduced.
[0161] Exemplarily, the first device may flexibly select the above method to determine the transmission mode according to the packet loss rate, and then determine the second sending strategy according to the transmission mode. When the transmission mode indicates that the number of transmissions of the message on the reference path is one copy, the first device determines the transmission mode as the second sending strategy. In one possible case, when the transmission mode indicates that the number of transmissions of the message on the reference path is multiple copies, the first device may also determine the delay interval of the message according to the packet loss pattern of the reference path, and use the delay interval and the transmission mode as the second sending strategy.
[0162] The delay interval indicates the time interval between sending each message in the multiple messages. Figure 5Δt is shown, where Δt is the delay interval to be determined. In a possible implementation, when the packet loss mode of the reference path is a random packet loss mode, the first device determines the delay interval as the first parameter; or, when the packet loss mode of the reference path is a continuous packet loss mode, the minimum value of the packet loss duration of the reference path and the multiple delay threshold is determined as the delay interval, for example Figure 7 shown.
[0163] The first parameter may be a value set based on experience, which is used to indicate that two identical messages are sent continuously. Therefore, the first parameter may be zero seconds, or a few tenths of a second, to include the delay error of the continuously sent messages during the sending process. Since the packet loss mode is a random packet loss mode, the packet loss of the reference path is a random loss of one message at a time. By sending the two identical messages obtained by copying continuously, that is, Figure 7 Continuous double sending in order to avoid the loss of two identical messages at the same time.
[0164] In the case where the packet loss mode of the reference path is a continuous packet loss mode, the first device selects the minimum value from the packet loss duration and the multiple transmission delay threshold as the delay interval. Based on the packet loss duration, the copied message avoids the packet loss period of the original message to avoid multiple identical messages being lost at the same time. Based on the multiple transmission delay threshold, while taking into account the packet loss, it avoids exceeding the multiple transmission selection range of the first device or the transmission delay requirement of the reference service to ensure that the first device smoothly performs multiple transmission selection and restores the original message sequence, that is, Figure 7 Delayed double release in .
[0165] Among them, the packet loss duration can be determined according to the packet loss duration of the out-of-order pair. For the out-of-order pair whose packet loss mode is the random packet loss mode, the duration is 0 seconds. For the out-of-order pair whose packet loss mode is the continuous packet loss mode, the packet loss duration is calculated as duration = recvD-recvC, wherein duration indicates the packet loss duration, recvD and recvC indicate the reception time of the two historical messages in the out-of-order pair, and D and C are used to distinguish different historical messages. After determining the packet loss duration of each out-of-order pair on the reference path, statistical methods such as mean or quantile values can be used for multiple packet loss durations to determine the packet loss duration of the reference path. The multiple-transmission delay threshold can be the upper limit of the multiple-transmission selection of the first device, such as the time threshold that can be cached and waited, or it can be a threshold determined according to the transmission delay requirements of the reference service.
[0166] Determination method two: according to the congestion parameters of each transmission path, select a reference path for transmitting the message from the uncongested transmission path; determine the number of messages transmitted on the reference path to obtain the transmission mode; and adjust the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode.
[0167] Exemplarily, the first device determines the number of reference paths; and selects reference paths from non-congested transmission paths according to the determined number based on the congestion parameters of each transmission path. The first device may determine the number of reference paths based on experience, for example, determining the number of reference paths to be 1, or determining the number of reference paths based on the number of transmission paths for transmitting historical messages. For example, the first sending strategy indicates that historical messages are transmitted through two transmission paths, and the first device thereby determines the number of reference paths to be 2.
[0168] After determining the number of reference paths for transmitting messages, the first device starts to select reference paths, and the number of selected reference paths is equal to the determined number. The first device can randomly select a transmission path as a reference path, or can select a reference path according to the transmission delay of the transmission path. Taking the number 1 as an example, according to the order in which each transmission path receives historical messages, the transmission path that first receives the historical message and is not congested is selected as the reference path.
[0169] In one possible case, the first device may also select a reference path based on the congestion parameter and with reference to other transmission performance parameters. For example, determine a non-congested transmission path based on the congestion parameter; determine a first path with the lowest transmission delay among non-congested transmission paths, and determine a reference path from non-congested transmission paths based on the delay difference between the first path and other paths. For the process of determining a reference path based on the delay difference, refer to the process of determining a candidate path in the first determination method, which will not be repeated here.
[0170] Exemplarily, the first device may also determine a reference path based on congestion parameters and packet loss rate, and the determination process includes but is not limited to: the first device determines a non-congested transmission path based on the congestion parameters; and selects a reference path based on the packet loss rate of the non-congested transmission path. Among them, the first device may select a reference path based on the packet loss rates of all non-congested transmission paths, or may select two transmission paths with the lowest transmission delays based on the transmission delays of non-congested transmission paths, or may select two transmission paths with the lowest packet loss rates, thereby selecting a reference path based on the packet loss rates of the two transmission paths. Regarding the process of selecting a reference path based on the packet loss rate, reference may be made to the process of selecting a reference path from candidate paths based on the packet loss rate in determination method one, which will not be repeated here. In addition, the first device may also select a reference path based on the packet loss rate, congestion parameters, and delay difference. The selection process is similar to the process of determining a reference path based on the packet loss rate, congestion parameters, and delay difference in determination method one, and reference may be made to the relevant description.
[0171] Regardless of the method by which the first device determines the reference path, the number of transmissions of the message on the reference path can be determined. Exemplarily, the first device can be set based on experience, for example, when there is only one reference path, determine the number of transmissions to be multiple copies, and back up the messages that need to be transmitted to reduce the impact of path packet loss. Alternatively, when there are multiple transmission paths, determine the number of transmissions to be one copy each.
[0172] In addition, the first device may also determine the number of transmissions based on the packet loss rate. The process of determining the number of transmissions is similar to the process of determining the number of transmissions in the first determination method, and will not be repeated here. Regardless of the method used by the first device to determine the reference path and the number of transmissions, the second sending strategy may be obtained based on the reference path and the number of transmissions. For example, when the number of transmissions indicates that multiple copies of the message need to be transmitted on the reference path, the first device determines based on experience that the message is continuously transmitted on the reference path. Alternatively, the first device may determine the delay interval of multiple copies of the message based on the packet loss pattern of the reference path as shown in the first determination method to obtain the second sending strategy.
[0173] Determination method three: determine the reference path and transmission quantity for transmitting the message; when the reference path has multiple transmissions, determine the delay interval between transmitting multiple copies of the message on the reference path according to the packet loss pattern of the reference path to obtain the second sending strategy.
[0174] Exemplarily, the first device may determine the reference path and the number of transmissions based on experience, such as determining the transmission path for transmitting historical messages as the reference path, and determining the number of transmissions according to the number of historical messages transmitted by the transmission path. For example, transmission path A transmits two historical messages, and the first device thus determines that transmission path A is the reference path, and the number of transmissions is two. In one possible scenario, the first device may also select the transmission path with the longest suspension time for transmitting messages based on the suspension time of the transmission path. By using the suspended transmission path, it is possible to avoid occupying the transmission path currently being transmitted, causing the business on the transmission path currently being transmitted to be affected.
[0175] In a possible case, the first device may also select a reference path from a non-congested transmission path according to the congestion parameters of each transmission path. The process of determining the reference path according to the congestion parameter is similar to the process of determining the reference path in the second determination method. Only the congestion parameter may be used, or one or more of the packet loss rate and the delay difference may be combined on the basis of the congestion parameter. For a detailed description, please refer to the second determination method, which will not be repeated here.
[0176] In addition, the first device may also determine the reference path using only the packet loss rate, for example, selecting the transmission path with the smallest packet loss rate as the reference path, or determining the reference path using only the delay difference, or determining the reference path in combination with the packet loss rate and the delay difference. For the process of determining the reference path based on the delay difference and the packet loss rate and the delay difference, refer to the relevant description in the determination method 4, which will not be repeated here.
[0177] Similar to the situation in determination method 2, after determining the reference path, the first device can determine the number of transmissions based on experience or the number of reference paths, or can determine the number of transmission paths based on the packet loss rate. The detailed process can refer to the relevant content in determination method 2, which will not be repeated here. Regardless of the method used by the first device to determine the reference path and the number of transmissions, when the number of transmissions is multiple, it can determine the delay interval based on the packet loss pattern of the reference path to obtain the second sending strategy. Among them, the process of determining the delay interval based on the packet loss pattern can refer to the process of determining the delay interval based on the packet loss pattern in determination method 1, which will not be repeated here.
[0178] Determination method 4: when there are multiple transmission paths, select a reference path from the transmission paths according to the delay difference between the first path with the lowest transmission delay and other transmission paths, determine the transmission quantity of the reference path, and obtain the second sending strategy.
[0179] Exemplarily, the process of the first device selecting a reference path based on the delay difference includes: when the delay differences are all greater than the delay threshold, selecting a transmission path as a reference path from at least one transmission path; or, when at least one delay difference is less than the delay threshold, selecting a second path from other transmission paths whose delay difference with the first path meets the selection condition, and determining the reference path based on the first path and the second path.
[0180] Regarding the process of selecting a reference path from a transmission path according to the delay difference, reference may be made to the process of selecting a candidate path according to the transmission path and determining a reference path according to the candidate path in the determination method 1, and the description will not be repeated here. Exemplarily, the first device may choose to determine the reference path only according to the delay difference, for example, when the delay difference is greater than the delay threshold, the first path is selected as the reference path. Since the transmission delay of the first path is the lowest, the low delay requirement of the service can be achieved through transmission through the first path. For another example, when any delay difference is not greater than the delay threshold, the first path and the second path are determined as reference paths. The second path may be a transmission path, in which case the delay difference between the selected second path and the first path is the smallest. The second path may also be another number of transmission paths, and no matter how many second paths there are, the delay difference between the second path and the first path used to transmit the message meets the delay threshold, so when transmitting the message on the first path and the second path, the first device can smoothly perform de-duplication and selection, and will not exceed the delay requirement of the service while reducing the impact of packet loss.
[0181] In one possible case, the first device may also determine the reference path in combination with one or more of the packet loss rate and congestion parameters. The process of determining the reference path according to the congestion parameters and the delay difference can refer to the process of determining the reference path according to the congestion parameters and the delay difference in the second determination method, and will not be repeated here. Optionally, the process of determining the reference path according to the packet loss rate and the delay difference includes: when the delay difference is greater than the delay threshold, comparing the size relationship between the first path and the packet loss threshold, wherein the packet loss threshold is a threshold determined according to the packet loss rate of the second path whose transmission delay is second only to the first path, and is used to indicate whether the packet loss rate of the first path is much greater than the packet loss rate of the second path. When the packet loss rate of the first path is greater than the packet loss threshold, the packet loss rate of the first path is much greater than the packet loss rate of the second path, and the first device selects the second path as the reference path. Alternatively, when the packet loss rate of the first path is not greater than the packet loss threshold, the first device selects the first path as the reference path. When the delay difference between the first path and the second path is not greater than the delay threshold, the first device may determine the reference path according to the packet loss rate of the first path and the packet loss rate of the second path as shown in determination method 1, which is not repeated here.
[0182] Regardless of the method by which the first device determines the reference path, the number of transmissions of the reference path can be determined, and the second sending strategy can be determined based on the number of transmissions. The process of determining the number of transmissions of the reference path and determining the second sending strategy based on the number of transmissions can refer to the process of determining the number of transmissions of the reference path loss and determining the second sending strategy based on the number of transmissions in the second determination method, which can be set based on experience, or according to the packet loss rate, or according to the packet loss mode, and will not be repeated here.
[0183] S303: Apply a second sending strategy to transmit the message through one or more transmission paths of the at least one transmission path.
[0184] After determining the second sending strategy, the first device may send the second sending strategy to the second device, where the second sending strategy indicates a strategy for the second device to transmit messages through at least one transmission path. Afterwards, the second device may adjust the message transmission mode if there is a difference between the second sending strategy and the first sending strategy. Based on this, the first device may directly send the determined second sending strategy to the second device, and the second device may compare the first sending strategy with the second sending strategy. In one possible case, the first device may also compare the second sending strategy with the first sending strategy; if there is a difference between the second sending strategy and the first sending strategy, the second sending strategy may be sent to the second device.
[0185] The first device first compares the second sending strategy with the first sending strategy currently in use. If the sending strategy has not changed, that is, the second sending strategy is the same as the first sending strategy, the process of sending the second sending strategy to the second device is no longer executed, and the second device can transmit the message based on the first sending strategy. The second sending strategy is sent to the second device only when the sending strategy has changed, that is, the second sending strategy is different from the first sending strategy. Therefore, after the second device receives the second sending strategy, it does not need to compare and judge, and can directly adjust the strategy, which has high adjustment efficiency to ensure the message transmission quality of the reference service.
[0186] Exemplarily, the first device can send a notification message to the second device by carrying the second sending strategy in the notification message, thereby implementing the sending of the second sending strategy. The notification message includes the path identifier of the reference path and the number of transmissions on each reference path. When the number of transmissions is multiple, the notification message also carries a delay interval. The path identifier is, for example, a path identity document (ID) or a path sequence number. Optionally, for the case of calling the control device to determine the second sending strategy, the process of the control device applying the second sending strategy is similar to the process of the first device applying the sending strategy. Please refer to the relevant description in S303, which will not be repeated here.
[0187] In the case of calling the second device to determine the second sending strategy, the second device may compare the second sending strategy with the first sending strategy currently being applied after determining the second sending strategy, and adjust the sending strategy to the second sending strategy when there is a difference between the second sending strategy and the first sending strategy, and transmit the message through the transmission path according to the second sending strategy. In one possible case, a strategy table is stored in the second device for recording the currently used sending strategy, and the second device may modify the information stored in the strategy table to the second sending strategy based on the change of the sending strategy. The modified information is, for example, the path identifier of the reference path and the number of messages transmitted on each reference path, as well as the delay interval of the reference path when multiple messages need to be transmitted on a reference path. After the second device updates the information stored in the strategy table according to the second sending strategy, it may transmit the message according to the new strategy table.
[0188] Taking the second sending strategy of transmitting through path 1 and path 2, and path 1 continuously transmitting two messages and path 2 transmitting one message as an example, the process of the second device applying the second sending strategy includes obtaining messages to be transmitted, including message 1 and message 2, etc. The second device copies two messages to be transmitted to obtain three identical messages. Taking message 1 as an example, the three identical messages obtained by copying are original message 1, copy message 1 and copy message 1'. Afterwards, the second device continuously sends original message 1 and copy message 1 through path 1, and then sends original message 2, copy message 2, etc., and sends copy message 1' and copy message 2' through path 2, wherein the sending time of copy message 1' is the same as the sending time of original message 1, and the sending time of copy message 2' is the same as the sending time of original message 2.
[0189] In one possible implementation, if the first device is called to execute the message transmission method provided in the embodiment of the present application, after the second device transmits the message to the first device, the first device will also select the received messages, remove the duplicate messages in the received messages, and obtain a message sequence to be transmitted, and the messages included in the message sequence are different; the message sequence is sent to the downstream device according to the message sequence. For example, the first device parses the destination address of the message included in the message sequence, determines the downstream device according to the destination address, and sends the message sequence to the downstream device. Because the second device will copy the message and send multiple times when sending the message according to the second sending strategy, even if part of the message is lost on the transmission path, the first device will receive a copy of the message to restore the original message sequence.
[0190] In summary, the message transmission method provided in the embodiment of the present application dynamically adjusts the message sending strategy according to the transmission performance parameters, so that the transmission of the message is more in line with the path quality of the current transmission path, so as to avoid bandwidth waste when the transmission path quality is good, and to avoid aggravated congestion and a sharp increase in packet loss when the transmission path quality is poor. Whether to use one transmission path or multiple transmission paths is selected according to the delay difference between different transmission paths, so as to avoid selecting multiple transmission paths with too large delay differences, resulting in the delay difference exceeding the service tolerance or the tail end de-reselection and receiving capability range, and multiple transmissions have no effect. By sending multiple messages on a transmission path, the idle bandwidth of the low-latency path can be fully utilized, and the delay interval between the double-sent messages can be controlled at the level of tens to hundreds of microseconds, while reducing the packet loss rate to meet the message transmission requirements while maintaining a low delay. By parsing the first identifier, the acquisition of transmission performance parameters can be achieved, and the path measurement is light and efficient.
[0191] The above introduces the message transmission method of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a message transmission device. Figure 8 This is a schematic diagram of the structure of a message transmission device provided in an embodiment of the present application. Figure 8 As shown in the following multiple modules, the Figure 8 The message transmission device shown can perform the above Figure 3 It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Figure 8 As shown, the device comprises:
[0192] An acquisition module 801 is used to acquire a transmission performance parameter of each transmission path in at least one transmission path, wherein the transmission performance parameter of any transmission path indicates a path quality of any transmission path;
[0193] An adjustment module 802, configured to adjust the transmission strategy from a first transmission strategy to a second transmission strategy according to the transmission performance parameters of each transmission path, wherein the first transmission strategy and the second transmission strategy indicate different multiple transmission modes;
[0194] The application module 803 is used to apply the second sending strategy to transmit the message through one or more transmission paths of the at least one transmission path.
[0195] In one possible implementation, the adjustment module 802 is used to determine at least one candidate path that supports the transmission of a message from at least one transmission path; determine a transmission mode of the message according to a packet loss rate of the candidate path, and adjust the sending strategy from a first sending strategy to a second sending strategy according to the transmission mode, wherein the transmission mode indicates a reference path for transmitting the message and the number of messages to be transmitted, and the reference path is selected from at least one candidate path.
[0196] In a possible implementation, the adjustment module 802 is configured to select a candidate path from non-congested transmission paths according to congestion parameters of each transmission path.
[0197] In a possible implementation, the adjustment module 802 is used to determine a first path with the lowest transmission delay among uncongested transmission paths; select a second path from the other paths whose delay difference with the first path meets a selection condition based on the delay difference between the first path and the other paths, where the other paths are paths different from the first path among multiple uncongested transmission paths; when the delay difference between the first path and the second path is greater than a delay threshold, select a path from the first path and the second path as a candidate path based on the packet loss rates of the first path and the second path, or, when the delay difference between the first path and the second path is not greater than the delay threshold, select the first path and the second path as candidate paths.
[0198] In one possible implementation, the adjustment module 802 is used to select the second path as a candidate path when the packet loss rate of the first path is greater than the packet loss threshold, the packet loss threshold is determined according to the packet loss rate of the second path and a reference coefficient, and the packet loss threshold is greater than the packet loss rate of the second path; or, when the packet loss rate of the first path is not greater than the packet loss threshold, select the first path as the candidate path.
[0199] In one possible implementation, the adjustment module 802 is used to determine the number of transmission copies of the message based on the packet loss rate of the first path; when the number of transmission copies of the message is indicated as multiple copies, the reference path for transmitting the message and the number of transmission copies of the message on the reference path are determined based on the difference between the packet loss rates of the first path and the second path to obtain the transmission mode.
[0200] In one possible implementation, the adjustment module 802 is used to determine that the number of transmitted copies of the message is a single copy when the packet loss rate of the first path is not greater than a first threshold, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the first threshold, determine that the number of transmitted copies of the message is multiple copies.
[0201] In a possible implementation, the adjustment module 802 is further configured to, when the number of transmitted copies of the message is a single copy, determine the transmission mode to be to transmit one copy of the message on the first path.
[0202] In a possible implementation, the adjustment module 802 is used to select a reference path and the number of messages transmitted on the reference path according to the difference between the packet loss rates of the first path and the second path when the packet loss rate of the first path is not greater than the second threshold, and the second threshold is greater than the first threshold, and the second threshold indicates the path tolerance corresponding to the message; or, when the packet loss rate of the first path is greater than the second threshold, determine that the first path and the second path are reference paths for transmitting the message, and determine the number of messages transmitted on the reference path according to the difference between the packet loss rates of the first path and the second path.
[0203] In one possible implementation, the adjustment module 802 is used to determine that the first path and the second path are reference paths when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is not greater than the first threshold, and transmit a message on the first path and the second path respectively; or, when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is greater than the first threshold, determine that the first path is the reference path, and transmit multiple messages on the first path.
[0204] In a possible implementation, the adjustment module 802 is used to determine that a message is transmitted on the first path and the second path respectively, and the third threshold is greater than the second threshold, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is not greater than the second threshold; or, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold, determine that multiple messages are transmitted on the first path and one message is transmitted on the second path; or, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is not greater than the first threshold, determine that the packet loss rate of the first path is greater than the third threshold, and the packet loss rate of the second path is not greater than the first threshold. and the second path respectively; or, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the first threshold but not greater than the second threshold, determine to transmit one message on the first path and multiple messages on the second path; or, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the second threshold but not greater than the third threshold, determine to transmit multiple messages on the first path and one message on the second path; or, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the third threshold, determine to transmit multiple messages on the first path and the second path respectively.
[0205] In one possible implementation, there is one candidate path, and the adjustment module 802 is used to determine the transmission mode as transmitting a message on the candidate path when the packet loss rate of the candidate path is less than a first threshold, and the first threshold indicates the packet loss tolerance corresponding to the message; or, when the packet loss rate of the candidate path is not less than the first threshold, determine the transmission mode as transmitting multiple messages on the candidate path.
[0206] In one possible implementation, the adjustment module 802 is used to determine the delay interval of the message according to the packet loss pattern of the reference path when the transmission mode indicates that the number of transmissions of the message on the reference path is multiple, and use the delay interval and the transmission mode as the second sending strategy, wherein the delay interval indicates the sending time interval between each of the multiple messages.
[0207] In one possible implementation, the adjustment module 802 is used to determine the delay interval as the first parameter when the packet loss mode of the reference path is a random packet loss mode; or, when the packet loss mode of the reference path is a continuous packet loss mode, determine the minimum value of the packet loss duration of the reference path and the multiple delay threshold as the delay interval.
[0208] In one possible implementation, the adjustment module 802 is used to select a reference path for transmitting messages from uncongested transmission paths according to congestion parameters of each transmission path, determine the number of messages transmitted on the reference path, and obtain a transmission mode; and adjust the sending strategy from a first sending strategy to a second sending strategy according to the transmission mode.
[0209] In one possible implementation, the adjustment module 802 is used to determine a reference path for transmitting a message and the number of messages transmitted on the reference path from at least one transmission path to obtain a transmission mode; when the number of transmissions on the reference path is multiple, the delay interval of the message is determined according to the packet loss pattern of the reference path, and the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the delay interval and the transmission mode, where the delay interval indicates the sending time interval between each of the multiple messages.
[0210] In one possible implementation, the adjustment module 802 is used to select a reference path from the multiple transmission paths according to the delay difference between the first path with the lowest transmission delay and the other transmission paths when there are multiple transmission paths, determine the number of messages transmitted on the reference path, and obtain a transmission mode; and adjust the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode.
[0211] In one possible implementation, the transmission performance parameters include a packet loss rate, and an acquisition module 801 is used to determine at least one group of out-of-order pairs from multiple historical messages based on the sending order of each historical message in multiple historical messages transmitted on any transmission path, where the out-of-order pair includes two historical messages with adjacent receiving orders and non-adjacent sending orders; and determine the packet loss rate of any transmission path based on the sending order of the historical messages included in each group of out-of-order pairs.
[0212] In one possible implementation, the acquisition module 801 is used to determine the number of packet losses of each group of out-of-order pairs according to the sending order of historical messages included in each group of out-of-order pairs; determine the total number of packet losses of any transmission path according to the number of packet losses of each group of out-of-order pairs; and determine the packet loss rate of any transmission path according to the total number of packet losses and the total number of multiple historical messages.
[0213] In a possible implementation, the transmission performance parameters include congestion parameters, and the acquisition module 801 is used to determine multiple periodic pairs according to the sending order of multiple historical messages transmitted by any transmission path, the periodic pairs include two historical messages, and the sending intervals of the two historical messages included in different periodic pairs are the same; determine the jitter value of each periodic pair in the multiple periodic pairs, and determine the delay jitter value of any transmission path according to the jitter value of each periodic pair; determine the congestion parameter of any transmission path according to the delay jitter value of any transmission path and the packet loss rate of any transmission path, and the congestion parameter indicates whether any transmission path is congested.
[0214] In one possible implementation, the acquisition module 801 is used to determine the jitter value of each periodic pair based on the sending time and receiving time of the historical messages included in each periodic pair, the sending time indicates the time when the sender of the historical message sends the historical message, and the receiving time indicates the time when the receiver of the historical message receives the historical message.
[0215] In one possible implementation, the transmission performance parameters include the delay difference between any transmission path and other transmission paths. The acquisition module 801 is used to determine at least one message group from multiple historical messages transmitted on any transmission path and other transmission paths, and the message group includes two historical messages with the same sending order, and the two historical messages are respectively transmitted through any transmission path and other transmission path; according to the receiving time of the historical messages included in each message group, the reception time difference of each message group is calculated; and the delay difference between any transmission path and other transmission paths is determined according to the reception time difference of each message group.
[0216] In one possible implementation, the transmission performance parameters include a packet loss pattern, and an acquisition module 801 is used to determine the packet loss pattern of each group of out-of-order pairs according to the number of packet losses of each group of out-of-order pairs in at least one group of out-of-order pairs on the transmission path, where the number of packet losses of the out-of-order pairs is determined according to the sending order of historical messages transmitted on the transmission path; and determine the packet loss pattern of the transmission path according to the packet loss pattern of each group of out-of-order pairs.
[0217] In one possible implementation, the acquisition module 801 is used to, for any group of random pairs, determine that the packet loss mode of any group of random pairs is a random packet loss mode when the number of packet losses of any group of random pairs is equal to the second parameter; or, when the number of packet losses of any group of random pairs is greater than the second parameter, determine that the packet loss mode of any group of random pairs is a continuous packet loss mode.
[0218] In a possible implementation manner, the historical message includes a first identifier, and the first identifier indicates a sending order of the historical messages.
[0219] In a possible implementation manner, the historical message and the message transmitted by applying the second sending strategy belong to the same reference service, and the historical message is transmitted based on the first sending strategy.
[0220] In a possible implementation, the application module 803 is configured to send a second sending strategy to a sender of the message, where the second sending strategy instructs the sender to transmit the message through one or more transmission paths.
[0221] In a possible implementation, the application module 803 is configured to compare the second sending strategy with the first sending strategy; and when there is a difference between the second sending strategy and the first sending strategy, send the second sending strategy to the sending end.
[0222] The above device dynamically adjusts the message sending strategy according to the transmission performance parameters to make the message transmission more consistent with the path quality of the current transmission path, thereby meeting the message transmission requirements. In the case of good transmission path quality, bandwidth waste is avoided, and in the case of poor transmission path, congestion is avoided, resulting in a sharp increase in packet loss.
[0223] It should be understood that the above Figure 8 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0224] See also Fig. 9 , Fig. 9A schematic diagram of the structure of a network device 900 provided by an exemplary embodiment of the present application is shown. Fig. 9 The network device 900 shown is used to perform the above Figure 3 The operations involved in the message transmission method shown. The network device 900 is, for example, a switch, a router, etc. The network device 900 can be implemented by a general bus architecture.
[0225] like Fig. 9 As shown, the network device 900 includes at least one processor 901 , a memory 903 , and at least one communication interface 904 .
[0226] The processor 901 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 901 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0227] Optionally, the network device 900 further includes a bus. The bus is used to transmit information between the components of the network device 900. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0228] The memory 903 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 903 is, for example, independent and connected to the processor 901 via a bus. The memory 903 can also be integrated with the processor 901.
[0229] The communication interface 904 uses any transceiver-like device for communicating with other devices or communication networks, and the communication network can be Ethernet, a radio access network (RAN) or a wireless local area network (WLAN), etc. The communication interface 904 may include a wired communication interface and may also include a wireless communication interface. Specifically, the communication interface 904 may 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 may be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 904 may be used for the network device 900 to communicate with other devices.
[0230] In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as Fig. 9 0 and CPU1 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0231] In a specific implementation, as an embodiment, the network device 900 may include multiple processors, such as Fig. 9 901 and processor 905 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0232] In a specific implementation, as an embodiment, the network device 900 may further include an output device and an input device. The output device communicates with the processor 901 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 901 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0233] In some embodiments, the memory 903 is used to store the program code 910 for executing the solution of the present application, and the processor 901 can execute the program code 910 stored in the memory 903. That is, the network device 900 can implement the message transmission method provided by the method embodiment through the processor 901 and the program code 910 in the memory 903. The program code 910 may include one or more software modules. Optionally, the processor 901 itself may also store the program code or instruction for executing the solution of the present application.
[0234] In a specific embodiment, the network device 900 of the embodiment of the present application may correspond to the computing device in the above-mentioned various method embodiments.
[0235] in, Figure 3 Each step of the message transmission method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the network device 900. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0236] See also Fig.10 , Fig.10 FIG. 1 shows a schematic diagram of the structure of a network device 1000 provided by another exemplary embodiment of the present application. Fig.10 The network device 1000 shown is used to perform the above Figure 3 All or part of the operations involved in the message transmission method shown. The network device 1000 is, for example, a switch, a router, etc. The network device 1000 can be implemented by a general bus architecture.
[0237] like Fig.10 As shown, the network device 1000 includes: a main control board 1010 and an interface board 1030 .
[0238] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 1010 is used to control and manage various components in the network device 1000, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1010 includes: a central processing unit 1011 and a memory 1012.
[0239] The interface board 1030 is also called a line processing unit (LPU), a line card (linecard) or a service board. The interface board 1030 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1030 includes: a central processing unit 1031, a network processor 1032, a forwarding table entry memory 1034 and a physical interface card (physical interface card, PIC) 1033.
[0240] The central processing unit 1031 on the interface board 1030 is used to control and manage the interface board 1030 and communicate with the central processing unit 1011 on the main control board 1010 .
[0241] The network processor 1032 is used to implement the forwarding processing of the message. The network processor 1032 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 1032 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 1034. If the destination address of the message is the address of the network device 1000, the message is sent to the CPU (such as the central processor 1031) for processing; if the destination address of the message is not the address of the network device 1000, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.
[0242] The physical interface card 1033 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 1030 from it, and the processed message is sent from the physical interface card 1033. The physical interface card 1033 is also called a daughter card, which can be installed on the interface board 1030 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1032 for processing after checking the legitimacy of the message. In some embodiments, the central processor 1031 can also perform the functions of the network processor 1032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1032 is not required in the physical interface card 1033.
[0243] Optionally, the network device 1000 includes multiple interface boards, for example, the network device 1000 further includes an interface board 1040, and the interface board 1040 includes: a central processor 1041, a network processor 1042, a forwarding table entry memory 1044, and a physical interface card 1043. The functions and implementation methods of the components in the interface board 1040 are the same or similar to those of the interface board 1030, and are not described in detail here.
[0244] Optionally, the network device 1000 further includes a switching fabric board 1020. The switching fabric board 1020 may also be referred to as a switch fabric unit (SFU). When the network device 1000 has multiple interface boards, the switching fabric board 1020 is used to complete data exchange between the interface boards. For example, the interface board 1030 and the interface board 1040 may communicate through the switching fabric board 1020.
[0245] The main control board 1010 is coupled to the interface board. For example, the main control board 1010, the interface board 1030, the interface board 1040, and the switching network board 1020 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030 and the interface board 1040, and the main control board 1010 and the interface board 1030 and the interface board 1040 communicate through the IPC channel.
[0246] Logically, the network device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processing unit 1011. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1032 forwards the message received by the physical interface card 1033 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
[0247] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
[0248] In a specific embodiment, the network device 1000 corresponds to the above Figure 8 In some embodiments, Figure 8 The adjustment module 802 in the message device shown is equivalent to the central processor 1011 or the network processor 1032 in the network device 1000.
[0249] The embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor. 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 processor executes the message transmission method.
[0250] It should be understood that the processor may be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture.
[0251] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0252] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a ROM, a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an EEPROM or a flash memory. The volatile memory may be a RAM, which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (static RAM, SRAM), dynamic random access memory (dynamic random access memory, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (doubledata rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM).
[0253] The embodiment of the present application also provides a message transmission device, the device includes a processor, the processor is used to load and run at least one instruction, so that the message transmission device implements the message transmission method provided in the embodiment of the present application. Optionally, the device also includes a memory, the memory is coupled to the processor, and the memory is used to store at least one instruction.
[0254] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements any of the message transmission methods described above.
[0255] The embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and / or processes in the above method embodiments.
[0256] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes any of the message transmission methods described above.
[0257] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the message transmission methods described above.
[0258] 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 process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.
[0259] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the transmission performance parameters involved in this application are all obtained with full authorization.
[0260] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0261] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0262] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
[0263] The computer program code for implementing the method of the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable message transmission device, so that the program code, when executed by the computer or other programmable message transmission device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0264] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.
[0265] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0266] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0267] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0268] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0269] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0270] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0271] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0272] In the present application, the terms "first", "second", etc. are used to distinguish between identical or similar items having substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various described examples, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image. Both the first image and the second image may be images, and in some cases, may be separate and different images.
[0273] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0274] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0275] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0276] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0277] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0278] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0279] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0280] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Claims
1. A message transmission method, characterized in that: The method comprises: Acquire transmission performance parameters of each transmission path of at least one transmission path, wherein the transmission performance parameter of any transmission path indicates the path quality of the any transmission path; adjusting the sending strategy from a first sending strategy to a second sending strategy according to the transmission performance parameters of each transmission path, wherein the first sending strategy and the second sending strategy indicate different multiple sending modes; The second sending strategy is applied to transmit the message through one or more transmission paths of the at least one transmission path.
2. The method according to claim 1, characterized in that: The adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path includes: Determine at least one candidate path supporting transmission of the message from the at least one transmission path; The transmission mode of the message is determined according to the packet loss rate of the candidate path, and the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the transmission mode, the transmission mode indicates a reference path for transmitting the message and the number of transmissions of the message, and the reference path is selected from the at least one candidate path.
3. The method according to claim 2, characterized in that The determining, from the at least one transmission path, at least one candidate path supporting transmission of the message comprises: The candidate path is selected from non-congested transmission paths according to the congestion parameters of the transmission paths.
4. The method according to claim 3, characterized in that There are multiple uncongested transmission paths, and selecting the candidate path from the uncongested transmission paths includes: Determine a first path with the lowest transmission delay among the uncongested transmission paths; According to the delay difference between the first path and the other path, selecting a second path from the other paths whose delay difference with the first path meets a selection condition, wherein the other path is a path different from the first path among a plurality of uncongested transmission paths; When the delay difference between the first path and the second path is greater than a delay threshold, one path is selected from the first path and the second path as the candidate path according to the packet loss rates of the first path and the second path; or, when the delay difference between the first path and the second path is not greater than the delay threshold, the first path and the second path are selected as the candidate paths.
5. The method according to claim 4, characterized in that The selecting a path from the first path and the second path as the candidate path according to the packet loss rates of the first path and the second path includes: In the case where the packet loss rate of the first path is greater than a packet loss threshold, selecting the second path as the candidate path, the packet loss threshold is determined according to the packet loss rate of the second path and a reference coefficient, and the packet loss threshold is greater than the packet loss rate of the second path; Alternatively, when the packet loss rate of the first path is not greater than the packet loss threshold, the first path is selected as the candidate path.
6. The method according to claim 4, characterized in that The determining the transmission mode of the message according to the packet loss rate of the candidate path includes: Determining the number of transmission copies of the message according to the packet loss rate of the first path; When the number of transmission copies of the message is indicated as multiple copies, the reference path for transmitting the message and the number of transmissions of the message on the reference path are determined according to the difference between the packet loss rates of the first path and the second path to obtain the transmission mode.
7. The method according to claim 6, characterized in that The determining the number of transmission copies of the message according to the packet loss rate of the first path includes: When the packet loss rate of the first path is not greater than a first threshold, determining that the number of transmission copies of the message is a single copy, the first threshold indicating the packet loss tolerance corresponding to the message; Alternatively, when the packet loss rate of the first path is greater than the first threshold, it is determined that the number of transmission copies of the message is multiple.
8. The method according to claim 6 or 7, characterized in that: After determining the number of transmission copies of the message according to the packet loss rate of the first path, the method further includes: In the case where the number of transmitted copies of the message is a single copy, the transmission mode is determined to be transmitting a copy of the message on the first path.
9. The method according to claim 6 or 7, characterized in that: The determining, according to the difference between the packet loss rates of the first path and the second path, a reference path for transmitting the message and the number of transmissions of the message on the reference path comprises: In a case where the packet loss rate of the first path is not greater than a second threshold, selecting the reference path and the number of transmissions of the message on the reference path according to a difference between the packet loss rates of the first path and the second path, the second threshold being greater than the first threshold, and the second threshold indicating a path tolerance corresponding to the message; Alternatively, when the packet loss rate of the first path is greater than the second threshold, the first path and the second path are determined as reference paths for transmitting the message, and the number of transmissions of the message on the reference path is determined according to the difference between the packet loss rates of the first path and the second path.
10. The method according to claim 9, characterized in that The selecting the reference path and the number of transmissions of the message on the reference path according to the difference between the packet loss rates of the first path and the second path includes: When the packet loss rate of the first path is greater than a first threshold and not greater than the second threshold, and the packet loss rate of the second path is not greater than the first threshold, determining the first path and the second path as reference paths, and transmitting a message on the first path and the second path respectively; Alternatively, when the packet loss rate of the first path is greater than the first threshold and not greater than the second threshold, and the packet loss rate of the second path is greater than the first threshold, the first path is determined to be a reference path, and multiple messages are transmitted on the first path.
11. The method according to claim 9, characterized in that The determining the number of transmissions of the message on the reference path according to the difference between the packet loss rates of the first path and the second path includes: When the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is not greater than the second threshold, determining to transmit one message on the first path and one message on the second path respectively, and the third threshold is greater than the second threshold; Alternatively, when the packet loss rate of the first path is greater than the second threshold and not greater than the third threshold, and the packet loss rate of the second path is greater than the second threshold, it is determined to transmit multiple copies of the message on the first path and to transmit one copy of the message on the second path; Alternatively, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is not greater than the first threshold, determine to transmit one message on the first path and one message on the second path respectively; Alternatively, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the first threshold but not greater than the second threshold, it is determined to transmit one message on the first path and multiple messages on the second path; Alternatively, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the second threshold but not greater than the third threshold, it is determined to transmit multiple copies of the message on the first path and to transmit one copy of the message on the second path; Alternatively, when the packet loss rate of the first path is greater than the third threshold and the packet loss rate of the second path is greater than the third threshold, it is determined to transmit multiple messages on the first path and the second path respectively.
12. The method according to any one of claims 2 to 5, characterized in that: The candidate path is one, and determining the transmission mode of the message according to the packet loss rate of the candidate path includes: When the packet loss rate of the candidate path is less than a first threshold, determining the transmission mode to be transmitting a message on the candidate path, the first threshold indicating a packet loss tolerance corresponding to the message; Alternatively, when the packet loss rate of the candidate path is not less than the first threshold, the transmission mode is determined to be transmitting multiple messages on the candidate path.
13. The method according to any one of claims 2 to 12, characterized in that: The adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission mode includes: When the transmission mode indicates that the message is transmitted in multiple copies on the reference path, the delay interval of the message is determined according to the packet loss pattern of the reference path, and the delay interval and the transmission mode are used as the second sending strategy, and the delay interval indicates the sending time interval between each message in the multiple messages.
14. The method according to claim 13, characterized in that The determining the delay interval of the message according to the packet loss mode of the reference path includes: In a case where the packet loss mode of the reference path is a random packet loss mode, determining the delay interval as a first parameter; Alternatively, when the packet loss mode of the reference path is a continuous packet loss mode, the minimum value of the packet loss duration of the reference path and a multiple delay threshold is determined as the delay interval.
15. The method according to claim 1, characterized in that The adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path includes: Selecting a reference path for transmitting the message from a non-congested transmission path according to the congestion parameters of the transmission paths, determining the number of transmissions of the message on the reference path, and obtaining a transmission mode; The sending strategy is adjusted from a first sending strategy to a second sending strategy according to the transmission mode.
16. The method according to claim 1, characterized in that The adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path includes: Determine a reference path for transmitting the message and the number of transmissions of the message on the reference path from the at least one transmission path to obtain a transmission mode; In the case where the number of transmissions of the reference path is multiple, the delay interval of the message is determined according to the packet loss pattern of the reference path, and the sending strategy is adjusted from the first sending strategy to the second sending strategy according to the delay interval and the transmission pattern, and the delay interval indicates the sending time interval between each message in the multiple messages.
17. The method according to claim 1, characterized in that The adjusting the sending strategy from the first sending strategy to the second sending strategy according to the transmission performance parameters of each transmission path includes: In the case where there are multiple transmission paths, selecting a reference path from the multiple transmission paths according to the delay difference between the first path with the lowest transmission delay and the other transmission paths, determining the number of transmissions of the message on the reference path, and obtaining a transmission mode; The sending strategy is adjusted from a first sending strategy to a second sending strategy according to the transmission mode.
18. The method according to any one of claims 2 to 14, characterized in that: The transmission performance parameter includes a packet loss rate, and the acquiring the transmission performance parameter of each transmission path in the at least one transmission path includes: According to the sending order of each historical message in the multiple historical messages transmitted on any one of the transmission paths, at least one group of disordered pairs is determined from the multiple historical messages, wherein the disordered pair includes two historical messages whose receiving order is adjacent and whose sending order is not adjacent; The packet loss rate of any transmission path is determined according to the sending order of the historical messages included in each group of out-of-order pairs.
19. The method according to claim 18, characterized in that The determining the packet loss rate of any transmission path according to the sending order of the historical messages included in each group of out-of-order pairs includes: Determine the number of packet losses of each group of out-of-order pairs according to the sending order of historical messages included in each group of out-of-order pairs; Determine the total number of packet losses of any one transmission path according to the number of packet losses of each group of out-of-order pairs; The packet loss rate of any one of the transmission paths is determined according to the total number of packet losses and the total number of the plurality of historical messages.
20. The method according to any one of claims 3-11 or 15, characterized in that: The transmission performance parameter includes a congestion parameter, and the acquiring of the transmission performance parameter of each transmission path in the at least one transmission path includes: Determine a plurality of periodic pairs according to a sending order of a plurality of historical messages transmitted by any one of the transmission paths, wherein the periodic pairs include two historical messages, and the sending intervals of the two historical messages included in different periodic pairs are the same; Determine a jitter value of each of the multiple periodic pairs, and determine a delay jitter value of any one of the transmission paths according to the jitter values of each of the periodic pairs; A congestion parameter of any one of the transmission paths is determined according to a delay jitter value of any one of the transmission paths and a packet loss rate of any one of the transmission paths, wherein the congestion parameter indicates whether any one of the transmission paths is congested.
21. The method according to claim 20, characterized in that The determining of the jitter value of each periodic pair of the plurality of periodic pairs comprises: The jitter value of each periodic pair is determined according to the sending time and receiving time of the historical message included in each periodic pair, the sending time indicates the time when the sending end of the historical message sends the historical message, and the receiving time indicates the time when the receiving end of the historical message receives the historical message.
22. The method according to any one of claims 4-11 or 17, characterized in that: The transmission performance parameter includes a delay difference between any one transmission path and other transmission paths, and the acquiring of the transmission performance parameter of each transmission path in at least one transmission path includes: Determine at least one message group from a plurality of historical messages transmitted on any one transmission path and the other transmission paths, the message group comprising two historical messages in the same transmission order, the two historical messages being transmitted respectively through any one transmission path and the other transmission path; Calculating the reception time difference of each message group according to the reception time of the historical messages included in each message group; The delay difference between any one transmission path and the other transmission paths is determined according to the reception time difference of each message group.
23. The method according to any one of claims 13, 14 or 16, characterized in that: The transmission performance parameter includes a packet loss mode, and the obtaining of the transmission performance parameter of each transmission path in the at least one transmission path includes: Determining a packet loss mode of each group of out-of-order pairs according to the number of packet losses of each group of out-of-order pairs in at least one group of out-of-order pairs on the transmission path, wherein the number of packet losses of the out-of-order pairs is determined according to the sending order of historical messages transmitted on the transmission path; The packet loss pattern of the transmission path is determined according to the packet loss patterns of the groups of out-of-order pairs.
24. The method according to claim 23, characterized in that The determining the packet loss mode of each group of out-of-order pairs according to the number of packet losses of each group of out-of-order pairs in at least one group of out-of-order pairs on the transmission path includes: For any group of out-of-order pairs, when the number of packet losses of any group of out-of-order pairs is equal to the second parameter, determining that the packet loss mode of any group of out-of-order pairs is a random packet loss mode; Alternatively, when the number of packet losses of any group of out-of-order pairs is greater than the second parameter, it is determined that the packet loss mode of any group of out-of-order pairs is a continuous packet loss mode.
25. The method according to any one of claims 18 to 24, characterized in that: The historical message includes a first identifier, and the first identifier indicates a sending order of the historical message.
26. The method according to any one of claims 18 to 25, characterized in that: The historical message and the message transmitted using the second sending strategy belong to the same reference service, and the historical message is transmitted based on the first sending strategy.
27. The method according to any one of claims 1 to 26, characterized in that: The applying the second sending strategy to transmit the message through one or more transmission paths of the at least one transmission path includes: The second sending strategy is sent to a sender of the message, where the second sending strategy instructs the sender to transmit the message through the one or more transmission paths.
28. The method according to claim 27, characterized in that The sending the second sending strategy to the sending end of the message includes: comparing the second sending strategy with the first sending strategy; In a case where the second sending strategy is different from the first sending strategy, the second sending strategy is sent to the sending end.
29. A message transmission device, characterized in that: The device comprises: A transceiver module, used to perform the receiving and / or sending related operations performed in any of the methods described in claims 1-28; A processing module, used to perform other operations besides the receiving and / or sending related operations performed in any one of the methods described in claims 1-28.
30. A message transmission device, characterized in that: The device includes a processor, which is used to load and execute at least one instruction so that the message transmission device implements the message transmission method as described in any one of claims 1-28.
31. The device according to claim 30, characterized in that The device also includes a memory coupled to the processor, wherein the at least one instruction is stored in the memory.
32. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the message transmission method as described in any one of claims 1-28.
33. A chip, characterized in that: The chip includes a processor, and the processor is used to run program instructions or codes so that the device containing the chip executes the message transmission method as described in any one of claims 1-28.
34. The chip according to claim 33, characterized in that: The chip further includes: an input interface, an output interface and a memory. The input interface, the output interface, the processor and the memory are connected via an internal connection path. The memory contains the program instructions or codes.