A communication protocol congestion monitoring method based on acceleration device
By obtaining and analyzing the protocol characteristics and delay information of the link, classifying link types and calculating the congestion coefficient, the accuracy problem of multi-link congestion monitoring under the TCP to UDP protocol is solved, and effective congestion of multiple links is achieved. Level judgment.
Patent Information
- Application Number
- CN202410813450.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing technology cannot perform accurate congestion monitoring in the scenario where the TCP protocol is converted into the UDP protocol. Especially when data is transmitted through multiple communication links, it cannot take into account the congestion of multiple links.
By obtaining the protocol characteristics of the link during the data transmission process, input it into the pre-built type differentiation model, which is divided into round-trip delay and one-way delay links. Based on the RTT value and data transmission characteristics, the delay in the future time is predicted and the chain calculation The congestion coefficient of the road, and the congestion level is determined based on the coefficient.
It achieves accurate monitoring of congestion on multiple links in a scenario where the TCP protocol is converted into a UDP protocol and transmitted through multiple communication links, and provides judgment of mild, moderate and severe congestion.
Smart Images

Figure CN118400328B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication congestion monitoring, and more specifically, to a communication protocol congestion monitoring method based on an acceleration device. Background Art
[0002] In recent years, real-time streaming media such as IP telephony, online video conferencing, and distance education have been widely used. Most of these applications use the UDP protocol for transmission. The UDP protocol is a connectionless protocol. Compared with the TCP protocol, although it has certain advantages in transmission speed, it also lacks congestion control mechanism and has poor transmission reliability. In order to combine the advantages of the TCP protocol with the advantages of the UDP protocol, an acceleration device is deployed on the TCP client. The acceleration device has a service process that can terminate the TCP connection on the client side and re-initiate the TCP connection on the server side. The TCP protocol is converted to the UDP protocol for transmission between the acceleration devices, and reliable transmission similar to TCP is realized on the upper layer of UDP. The existing technology usually monitors congestion on the link using a single protocol, which is not suitable for the scenario of converting the TCP protocol to the UDP protocol.
[0003] For example, the Chinese patent with publication number CN114020395A provides a method, device, terminal and storage medium for virtual desktop network acceleration. The patent is based on the client agent process sending information about the network type of the network between the client agent process and the host agent process to the host agent process through a control channel. If the network type is a custom type, the data channel of the UDP protocol is used as the data forwarding channel between the client agent process and the host agent process; if the network type is a non-custom type, the data channel of the TCP protocol is used as the data forwarding channel between the client agent process and the host agent process.
[0004] Although the above patent can choose to use UDP protocol or TCP protocol according to the network type, the above patent is not in the scenario where TCP protocol is converted to UDP protocol, and data transmission is completed through multiple communication links, then multiple communication links will have protocol conversion or non-conversion situations, and the congestion monitoring methods corresponding to TCP protocol and UDP protocol are different. Therefore, the existing technology cannot take the above factors into consideration, resulting in the inability to perform accurate congestion monitoring.
[0005] In view of this, the present invention proposes a communication protocol congestion monitoring method based on an acceleration device to solve the above problem. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art, the present invention provides a communication protocol congestion monitoring method based on an acceleration device.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A communication protocol congestion monitoring method based on an acceleration device, comprising:
[0009] S10: obtaining protocol features of S links during data transmission, where the protocol features include at least one of a port number, a number of data retransmissions, and a packet loss rate; inputting the protocol features into a pre-built type differentiation model to obtain a congestion prediction type, where the congestion prediction type includes a round-trip delay and a one-way delay, and S is an integer greater than 1;
[0010] S20: dividing the S links into K first links and M second links based on the congestion prediction type, where S=K+M, K and M are integers greater than 0;
[0011] S30: When the congestion prediction type is round-trip delay, respectively obtain the RTT values of the first N data packets of the first link and the corresponding first data transmission characteristics, predict the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, obtain the target data transmission volumes corresponding to the K first links, and calculate the congestion coefficient of the first link based on the K future RTT values and the K target data transmission volumes;
[0012] S40: When the congestion prediction type is one-way delay, the one-way delays of the first P data packets of the M second links and the corresponding second data transmission characteristics are respectively obtained, the one-way delay at a future time is predicted based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the congestion coefficient of the second link is calculated according to the one-way delays at the M future times;
[0013] S50: Determine a congestion level according to the first link congestion coefficient and the second link congestion coefficient.
[0014] Furthermore, the method for constructing the type differentiation model includes:
[0015] Obtain h groups of training data, where h is a positive integer greater than 1, and the training data includes historical protocol features and historical congestion prediction types. Use the historical protocol features and historical congestion prediction types as sample sets, divide the sample sets into training sets and test sets, build a classifier, use the historical protocol features in the training set as input data, use the historical congestion prediction types in the training set as output data, train the classifier to obtain an initial classifier, test the initial classifier using the test set, and output the initial classifier with an accuracy greater than a preset threshold as a type distinction model.
[0016] Further, the method of dividing the S links into K first links and M second links based on the congestion prediction type includes:
[0017] The congestion prediction types corresponding to the S links are traversed. When the congestion prediction type corresponding to the link is round-trip delay, the link is marked as the first link. When the congestion prediction type corresponding to the link is one-way delay, the link is marked as the second link.
[0018] Further, the method for predicting the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics includes:
[0019] The RTT values of the first N data packets and the corresponding first data transmission characteristics are combined into a real-time first data set, and the real-time first data set is input into a pre-built round-trip delay model to obtain the RTT value at a future time.
[0020] Furthermore, the method for constructing the round-trip delay model includes:
[0021] A fixed step size L and a sliding window length are preset, and the first historical data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the round-trip delay model, and the historical RTT values after the fixed step size L are predicted as the output. The subsequent historical RTT values of each training sample are used as the prediction target. The prediction accuracy is used as the training target to train the round-trip delay model; a round-trip delay model is generated that predicts the RTT values at future moments based on the first historical data set.
[0022] Further, the method for calculating the congestion coefficient of the first link based on K future RTT values and K target data transmission volumes includes:
[0023] ;
[0024] Where FLC is the first link congestion coefficient, is the RTT value of the i-th first link at the future time, is the minimum RTT value of the first N data packets corresponding to the i-th first link, is the target data transmission volume of the i-th first link, is the standard data transmission volume of the first link, is a natural constant, and are weight factors, .
[0025] Further, the method for predicting the one-way delay at a future time based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics includes:
[0026] A real-time second data set is formed based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the real-time second data set is input into a pre-built one-way delay model to obtain the one-way delay at a future moment.
[0027] Furthermore, the method for constructing the one-way delay model includes:
[0028] A fixed step size L and a sliding window length are preset, and the historical second data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the one-way delay model, and the historical one-way delay after the fixed step size L is predicted as the output. The subsequent historical one-way delay of each training sample is used as the prediction target. The prediction accuracy is used as the training target, and the one-way delay model is trained to generate a one-way delay model that predicts the one-way delay at future moments based on the historical second data set.
[0029] Further, the method for calculating the congestion coefficient of the second link according to the one-way delays at M future moments includes:
[0030] ;
[0031] Where SLC is the congestion coefficient of the second link, For the One-way delay of the second link at a future time, For the The minimum one-way delay of the first P data packets corresponding to the second link, For the The maximum one-way delay of the first P data packets corresponding to the second link.
[0032] Furthermore, the congestion level includes mild congestion, moderate congestion and severe congestion, and the method for determining the congestion level according to the first link congestion coefficient and the second link congestion coefficient includes:
[0033] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is less than the preset first coefficient threshold, the congestion level is light congestion;
[0034] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is greater than or equal to the preset first coefficient threshold, the congestion level is moderate congestion;
[0035] When the second link congestion coefficient is greater than or equal to a preset second coefficient threshold, the congestion level is severe congestion.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The present invention first obtains the protocol features of S links in the data transmission process, inputs the protocol features into a pre-built type differentiation model, obtains the congestion prediction type, and divides the S links into K first links and M second links based on the congestion prediction type. When the congestion prediction type is a round-trip delay, the congestion coefficient of the first link is calculated based on K RTT values at future moments and K target data transmission volumes. When the congestion prediction type is a one-way delay, the congestion coefficient of the second link is calculated according to the one-way delays at M future moments. Finally, the congestion level is determined according to the congestion coefficient of the first link and the congestion coefficient of the second link. In the scenario where the TCP protocol is converted to the UDP protocol and data transmission is completed through multiple communication links, the present invention comprehensively considers the congestion conditions of multiple communication links, thereby realizing accurate congestion monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of a communication protocol congestion monitoring method based on an acceleration device in the present invention;
[0039] Figure 2 A schematic diagram of a computer-readable storage medium in the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Example 1
[0042] See also Figure 1 As shown, this embodiment discloses a communication protocol congestion monitoring method based on an acceleration device, including:
[0043] S10: obtaining protocol features of S links during data transmission, where the protocol features include at least one of a port number, a number of data retransmissions, and a packet loss rate; inputting the protocol features into a pre-built type differentiation model to obtain a congestion prediction type, where the congestion prediction type includes a round-trip delay and a one-way delay, and S is an integer greater than 1;
[0044] It should be noted that the link mentioned above refers to the path for data transmission. Each link may use different network protocols for data transmission, such as TCP and UDP. This embodiment is applied to the scenario where the TCP protocol is converted to the UDP protocol. Therefore, in this embodiment, the link only uses the TCP protocol, or uses both the TCP protocol and the UDP protocol, and the TCP protocol will be converted to the UDP protocol.
[0045] It should be added that TCP and UDP use different port numbers for communication. By checking the target port number, the protocol used for data transmission can be determined. Usually, known TCP port numbers include 80 (HTTP), 443 (HTTPS), 21 (FTP), etc., and known UDP port numbers include 53 (DNS), 67 / 68 (DHCP), 161 (SNMP), etc. TCP has a retransmission mechanism and will retransmit when data packets are lost. Since UDP is a connectionless protocol, it does not provide reliable data transmission and error detection mechanisms. Therefore, when the link uses both TCP and UDP, retransmission is rarely performed. The packet loss rate refers to the proportion of data packets lost in network communication. TCP transmission is more stable, so the corresponding packet loss rate of TCP is lower.
[0046] It can be understood that the types of congestion prediction methods mentioned above include round-trip delay and one-way delay. The round-trip delay is composed of the propagation time of the communication link, the processing time at the end of the system, and the queuing and processing time in the router cache. The one-way delay is the difference between the timestamp value in the reception confirmation message sent by the receiving end and the timestamp value in the message sent by the sending end. In the prior art, such as Wireshark, tcpdump, etc., network data packets can be captured and their round-trip delay or one-way delay can be analyzed. This embodiment will not be described in detail.
[0047] The construction method of type differentiation model includes:
[0048] Obtain h groups of training data, where h is a positive integer greater than 1, and the training data includes historical protocol features and historical congestion prediction types. The historical protocol features and historical congestion prediction types are used as sample sets, and the sample sets are divided into training sets and test sets. A classifier is constructed, and the historical protocol features in the training set are used as input data, and the historical congestion prediction types in the training set are used as output data. The classifier is trained to obtain an initial classifier, and the initial classifier is tested using the test set. The initial classifier having an accuracy greater than a preset threshold is output as a type discrimination model, and the initial classifier is preferably a naive Bayes model or a support vector machine model.
[0049] S20: dividing the S links into K first links and M second links based on the congestion prediction type, where S=K+M, K and M are integers greater than 0;
[0050] The method for dividing S links into K first links and M second links based on congestion prediction types includes:
[0051] Traverse the congestion prediction types corresponding to the S links. When the congestion prediction type corresponding to the link is round-trip delay, mark the link as the first link. When the congestion prediction type corresponding to the link is one-way delay, mark the link as the second link.
[0052] It can be understood that, following the above-mentioned present embodiment, the link only adopts the TCP protocol, or adopts the TCP protocol and the UDP protocol at the same time. When there is only a TCP connection, the propagation time of the communication link and the processing time of the system end are relatively fixed. Therefore, in order to improve the accuracy of the prediction, the round-trip delay method is used to predict the congestion of the link. Then the first link represents the communication link that only adopts the TCP protocol. When the TCP protocol and the UDP protocol are adopted at the same time, only the one-way delay method can be used to predict the congestion of the link. Then the second link represents the communication link that adopts the TCP protocol and the UDP protocol at the same time.
[0053] S30: When the congestion prediction type is round-trip delay, respectively obtain the RTT values of the first N data packets of the first link and the corresponding first data transmission characteristics, predict the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, obtain the target data transmission volumes corresponding to the K first links, and calculate the congestion coefficient of the first link based on the K future RTT values and the K target data transmission volumes;
[0054] In this embodiment, the first data transmission feature includes but is not limited to bandwidth utilization and data packet queuing delay. It can be understood that each data packet will have an RTT value and a corresponding first data transmission feature during the transmission of the data packet through the first link. In the above, the bandwidth utilization can be obtained in real time through a traffic monitoring tool, such as SNMP or NetFlow, and the data packet queuing delay can be obtained in real time through a traffic analysis tool, such as Wireshark or tcpdump.
[0055] The method for predicting the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics includes:
[0056] The RTT values of the first N data packets and the corresponding first data transmission characteristics form a real-time first data set, and the real-time first data set is input into a pre-built round-trip delay model to obtain an RTT value at a future time;
[0057] It can be understood that each element in the above-mentioned real-time first data set includes an RTT value and a corresponding first data transmission feature;
[0058] The method for constructing the round-trip delay model includes:
[0059] A fixed step size L and a sliding window length are preset, and the first historical data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the round-trip delay model, and the historical RTT value after the fixed step size L is predicted as the output. The subsequent historical RTT value of each training sample is used as the prediction target, and the prediction accuracy is used as the training target to train the round-trip delay model; a round-trip delay model is generated for predicting the RTT value at a future time according to the first historical data set, and the round-trip delay model is optimized as a recurrent neural network model;
[0060] It should be noted that the sliding window method is a conventional technical means of the recurrent neural network model, and the present invention will not be described in principle here; however, in order to facilitate the implementation of the present invention, the present invention provides the following example of the sliding window method:
[0061] Assume that we want to use historical data [1,2,3,4,5,6] to train a recurrent neural network model. In this embodiment, we take the prediction time step as 1 as an example, set the fixed step size to 1, and set the sliding window length to 3; then 3 groups of training samples and corresponding prediction target data are generated: [1,2,3], [2,3,4] and [3,4,5] are used as training samples, and [4], [5] and [6] are used as prediction targets respectively;
[0062] The prediction accuracy can be measured using mean square error or mean absolute error as the loss function, and the weights and biases of the model are updated through the back-propagation algorithm to generate a round-trip delay model;
[0063] It should be added that each element in the historical first data set includes a historical RTT value and a historical first data transmission feature;
[0064] The method for calculating the congestion coefficient of the first link based on K future RTT values and K target data transmission volumes includes:
[0065] ;
[0066] Where FLC is the first link congestion coefficient, is the RTT value of the i-th first link at the future time, is the minimum RTT value of the first N data packets corresponding to the i-th first link, is the target data transmission volume of the i-th first link, is the standard data transmission volume of the first link, is a natural constant, and are weight factors, ;
[0067] In this embodiment, the target data transmission volume of the i-th first link may be obtained by prediction, or may be obtained by directly obtaining the real-time data transmission volume and calculating it. For example, when the RTT value at a future time is predicted based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, the real-time data transmission volume during this period is obtained, and the average value thereof is calculated as the target data transmission volume, because the real-time data transmission volume during a period of time can also reflect the congestion situation of the first link, and the above-mentioned standard data transmission volume is usually a fixed value preset according to expert experience;
[0068] It can be understood that the larger the data transmission volume of the communication link, the more congested the communication link is. The larger the RTT value at a future moment, the larger the round-trip delay of the communication link is, indicating that the communication link is more congested. Therefore, the first link congestion coefficient is positively correlated with the degree of congestion of the communication link.
[0069] S40: When the congestion prediction type is one-way delay, the one-way delays of the first P data packets of the M second links and the corresponding second data transmission characteristics are respectively obtained, the one-way delay at a future time is predicted based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the congestion coefficient of the second link is calculated according to the one-way delays at the M future times;
[0070] In this embodiment, the second data transmission feature includes but is not limited to bandwidth utilization and data packet queuing delay. It can be understood that the bandwidth utilization in the second data transmission feature has the same meaning as the bandwidth utilization in the first data transmission feature, and the acquisition method is also the same. The data packet queuing delay is the same, and this embodiment will not be described in detail.
[0071] The method for predicting the one-way delay at a future time based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics includes:
[0072] A real-time second data set is formed based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the real-time second data set is input into a pre-built one-way delay model to obtain the one-way delay at a future time;
[0073] It can be understood that each element in the above-mentioned real-time second data set includes a one-way delay and a corresponding second data transmission characteristic;
[0074] The construction method of the one-way delay model includes:
[0075] A fixed step size L and a sliding window length are preset, and the historical second data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the one-way delay model, and the historical one-way delay after the fixed step size L is predicted as the output. The subsequent historical one-way delay of each training sample is used as the prediction target. The prediction accuracy is used as the training target, and the one-way delay model is trained to generate a one-way delay model that predicts the one-way delay at a future moment according to the historical second data set. The one-way delay model is preferably a recurrent neural network model.
[0076] In this embodiment, each element in the historical second data set includes a historical one-way delay and a historical second data transmission feature;
[0077] The method for calculating the congestion coefficient of the second link according to the one-way delays at M future moments includes:
[0078] ;
[0079] Where SLC is the congestion coefficient of the second link, For the One-way delay of the second link at a future time, For the The minimum one-way delay of the first P data packets corresponding to the second link, For the The maximum one-way delay of the first P data packets corresponding to the second link;
[0080] It should be noted that the larger the one-way delay at the future time, the more congested the communication link is, so the second link congestion coefficient is positively correlated with the degree of congestion of the communication link;
[0081] S50: determining a congestion level according to the first link congestion coefficient and the second link congestion coefficient;
[0082] The congestion levels include mild congestion, moderate congestion, and severe congestion. The method for determining the congestion level according to the first link congestion coefficient and the second link congestion coefficient includes:
[0083] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is less than the preset first coefficient threshold, the congestion level is light congestion;
[0084] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is greater than or equal to the preset first coefficient threshold, the congestion level is moderate congestion;
[0085] When the congestion coefficient of the second link is greater than or equal to the preset second coefficient threshold, the congestion level is severe congestion;
[0086] It can be understood that the first link represents a communication link that only uses the TCP protocol, and the second link represents a communication link that uses both the TCP protocol and the UDP protocol. Since the TCP protocol has a relatively stable congestion control mechanism, while the UDP protocol does not have a relatively stable congestion control mechanism, when the corresponding second link congestion coefficient is greater than or equal to the preset second coefficient threshold, it indicates that the communication link that uses both the TCP protocol and the UDP protocol is in a serious congestion state and needs to be processed immediately, so the congestion level is set to severe congestion;
[0087] In this embodiment, the protocol features of S links in the data transmission process are first input into a pre-built type differentiation model to obtain a congestion prediction type, and the S links are divided into K first links and M second links based on the congestion prediction type. When the congestion prediction type is a round-trip delay, the congestion coefficient of the first link is calculated based on K future RTT values and K target data transmission volumes. When the congestion prediction type is a one-way delay, the congestion coefficient of the second link is calculated based on M future one-way delays. Finally, the congestion level is determined based on the congestion coefficient of the first link and the congestion coefficient of the second link. In this embodiment, when the TCP protocol is converted to the UDP protocol and data transmission is completed through multiple communication links, the congestion conditions of multiple communication links are comprehensively considered to achieve accurate congestion monitoring.
[0088] Example 2
[0089] This embodiment provides a communication protocol congestion monitoring system based on an acceleration device on the basis of Embodiment 1, including:
[0090] Classification detection module: used to obtain the protocol features of S links during data transmission, where the protocol features include at least one of the port number, the number of data retransmissions, and the packet loss rate; input the protocol features into the pre-built type differentiation model to obtain the congestion prediction type, where the congestion prediction type includes round-trip delay and one-way delay, where S is an integer greater than 1;
[0091] It should be noted that the link mentioned above refers to the path for data transmission. Each link may use different network protocols for data transmission, such as TCP and UDP. This embodiment is applied to the scenario where the TCP protocol is converted to the UDP protocol. Therefore, in this embodiment, the link only uses the TCP protocol, or uses both the TCP protocol and the UDP protocol, and the TCP protocol will be converted to the UDP protocol.
[0092] It can be understood that the types of congestion prediction methods mentioned above include round-trip delay and one-way delay. The round-trip delay is composed of the propagation time of the communication link, the processing time at the end of the system, and the queuing and processing time in the router cache. The one-way delay is the difference between the timestamp value in the reception confirmation message sent by the receiving end and the timestamp value in the message sent by the sending end. In the prior art, such as Wireshark, tcpdump, etc., network data packets can be captured and their round-trip delay or one-way delay can be analyzed. This embodiment will not be described in detail.
[0093] The construction method of type differentiation model includes:
[0094] Obtain h groups of training data, where h is a positive integer greater than 1, and the training data includes historical protocol features and historical congestion prediction types. The historical protocol features and historical congestion prediction types are used as sample sets, and the sample sets are divided into training sets and test sets. A classifier is constructed, and the historical protocol features in the training set are used as input data, and the historical congestion prediction types in the training set are used as output data. The classifier is trained to obtain an initial classifier, and the initial classifier is tested using the test set. The initial classifier having an accuracy greater than a preset threshold is output as a type discrimination model, and the initial classifier is preferably a naive Bayes model or a support vector machine model.
[0095] A division module: used for dividing S links into K first links and M second links based on the congestion prediction type, where S=K+M, K and M are integers greater than 0;
[0096] The method for dividing S links into K first links and M second links based on congestion prediction types includes:
[0097] Traverse the congestion prediction types corresponding to the S links. When the congestion prediction type corresponding to the link is round-trip delay, mark the link as the first link. When the congestion prediction type corresponding to the link is one-way delay, mark the link as the second link.
[0098] It can be understood that, following the above-mentioned present embodiment, the link only adopts the TCP protocol, or adopts the TCP protocol and the UDP protocol at the same time. When there is only a TCP connection, the propagation time of the communication link and the processing time of the system end are relatively fixed. Therefore, in order to improve the accuracy of the prediction, the round-trip delay method is used to predict the congestion of the link. Then the first link represents the communication link that only adopts the TCP protocol. When the TCP protocol and the UDP protocol are adopted at the same time, only the one-way delay method can be used to predict the congestion of the link. Then the second link represents the communication link that adopts the TCP protocol and the UDP protocol at the same time.
[0099] The first prediction module is used for, when the congestion prediction type is round-trip delay, respectively obtaining the RTT values of the first N data packets of the first link and the corresponding first data transmission characteristics, predicting the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, obtaining the target data transmission volumes corresponding to the K first links, and calculating the congestion coefficient of the first link based on the K future RTT values and the K target data transmission volumes;
[0100] In this embodiment, the first data transmission feature includes but is not limited to bandwidth utilization and data packet queuing delay. It can be understood that each data packet will have an RTT value and a corresponding first data transmission feature during the transmission of the data packet through the first link. In the above, the bandwidth utilization can be obtained in real time through a traffic monitoring tool, such as SNMP or NetFlow, and the data packet queuing delay can be obtained in real time through a traffic analysis tool, such as Wireshark or tcpdump.
[0101] The method for predicting the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics includes:
[0102] The RTT values of the first N data packets and the corresponding first data transmission characteristics form a real-time first data set, and the real-time first data set is input into a pre-built round-trip delay model to obtain an RTT value at a future time;
[0103] It can be understood that each element in the above-mentioned real-time first data set includes an RTT value and a corresponding first data transmission feature;
[0104] The method for calculating the congestion coefficient of the first link based on K future RTT values and K target data transmission volumes includes:
[0105] ;
[0106] Where FLC is the first link congestion coefficient, is the RTT value of the i-th first link at the future time, is the minimum RTT value of the first N data packets corresponding to the i-th first link, is the target data transmission volume of the i-th first link, is the standard data transmission volume of the first link, is a natural constant, and are weight factors, ;
[0107] In this embodiment, the target data transmission volume of the i-th first link may be obtained by prediction, or may be obtained by directly obtaining the real-time data transmission volume and calculating it. For example, when the RTT value at a future time is predicted based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, the real-time data transmission volume during this period is obtained, and the average value thereof is calculated as the target data transmission volume, because the real-time data transmission volume during a period of time can also reflect the congestion situation of the first link, and the above-mentioned standard data transmission volume is usually a fixed value preset according to expert experience;
[0108] It can be understood that the larger the data transmission volume of the communication link, the more congested the communication link is. The larger the RTT value at a future moment, the larger the round-trip delay of the communication link is, indicating that the communication link is more congested. Therefore, the first link congestion coefficient is positively correlated with the degree of congestion of the communication link.
[0109] The second prediction module is used for, when the congestion prediction type is one-way delay, obtaining the one-way delays of the first P data packets of the M second links and the corresponding second data transmission characteristics, predicting the one-way delay at a future time based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and calculating the congestion coefficient of the second link according to the one-way delays at the M future times;
[0110] In this embodiment, the second data transmission feature includes but is not limited to bandwidth utilization and data packet queuing delay. It can be understood that the bandwidth utilization in the second data transmission feature has the same meaning as the bandwidth utilization in the first data transmission feature, and the acquisition method is also the same. The data packet queuing delay is the same, and this embodiment will not be described in detail.
[0111] The method for predicting the one-way delay at a future time based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics includes:
[0112] A real-time second data set is formed based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the real-time second data set is input into a pre-built one-way delay model to obtain the one-way delay at a future time;
[0113] It can be understood that each element in the above-mentioned real-time second data set includes a one-way delay and a corresponding second data transmission characteristic;
[0114] The method for calculating the congestion coefficient of the second link according to the one-way delays at M future moments includes:
[0115] ;
[0116] Where SLC is the congestion coefficient of the second link, For the One-way delay of the second link at a future time, For the The minimum one-way delay of the first P data packets corresponding to the second link, For the The maximum one-way delay of the first P data packets corresponding to the second link;
[0117] It should be noted that the larger the one-way delay at the future time, the more congested the communication link is, so the second link congestion coefficient is positively correlated with the degree of congestion of the communication link;
[0118] Level determination module: used to determine the congestion level according to the first link congestion coefficient and the second link congestion coefficient;
[0119] The congestion levels include mild congestion, moderate congestion, and severe congestion. The method for determining the congestion level according to the first link congestion coefficient and the second link congestion coefficient includes:
[0120] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is less than the preset first coefficient threshold, the congestion level is light congestion;
[0121] When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is greater than or equal to the preset first coefficient threshold, the congestion level is moderate congestion;
[0122] When the congestion coefficient of the second link is greater than or equal to the preset second coefficient threshold, the congestion level is severe congestion;
[0123] It can be understood that the first link represents a communication link that only uses the TCP protocol, and the second link represents a communication link that uses both the TCP protocol and the UDP protocol. Since the TCP protocol has a relatively stable congestion control mechanism, while the UDP protocol does not have a relatively stable congestion control mechanism, when the corresponding second link congestion coefficient is greater than or equal to the preset second coefficient threshold, it indicates that the communication link that uses both the TCP protocol and the UDP protocol is in a serious congestion state and needs to be processed immediately, so the congestion level is set to severe congestion.
[0124] Example 3
[0125] like Figure 2 As shown, this embodiment discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the above-mentioned communication protocol congestion monitoring method based on an acceleration device is implemented.
[0126] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters, weights and thresholds in the formula are set by technicians in this field according to actual conditions.
[0127] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may 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 or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may 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 may be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired network or a wireless network. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media sets. The available medium may 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. The semiconductor medium may be a solid-state hard disk.
[0128] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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 the present invention.
[0129] 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 units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0130] In the several embodiments provided by the present invention, 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 units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0133] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0134] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A communication protocol congestion monitoring method based on an acceleration device, characterized in that: include: S10: obtaining protocol features of S links during data transmission, where the protocol features include at least one of a port number, a number of data retransmissions, and a packet loss rate; inputting the protocol features into a pre-built type differentiation model to obtain a congestion prediction type, where the congestion prediction type includes a round-trip delay and a one-way delay, and S is an integer greater than 1; S20: dividing the S links into K first links and M second links based on the congestion prediction type, where S=K+M, K and M are integers greater than 0; S30: When the congestion prediction type is round-trip delay, respectively obtain the RTT values of the first N data packets of the first link and the corresponding first data transmission characteristics, predict the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics, obtain the target data transmission volumes corresponding to the K first links, and calculate the congestion coefficient of the first link based on the K future RTT values and the K target data transmission volumes; S40: When the congestion prediction type is one-way delay, the one-way delays of the first P data packets of the M second links and the corresponding second data transmission characteristics are respectively obtained, the one-way delay at a future time is predicted based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the congestion coefficient of the second link is calculated according to the one-way delays at the M future times; S50: Determine a congestion level according to the first link congestion coefficient and the second link congestion coefficient.
2. According to the method for monitoring communication protocol congestion based on an acceleration device according to claim 1, it is characterized in that: The method for constructing the type differentiation model includes: Obtain h groups of training data, where h is a positive integer greater than 1, and the training data includes historical protocol features and historical congestion prediction types. Use the historical protocol features and historical congestion prediction types as sample sets, divide the sample sets into training sets and test sets, build a classifier, use the historical protocol features in the training set as input data, use the historical congestion prediction types in the training set as output data, train the classifier to obtain an initial classifier, test the initial classifier using the test set, and output the initial classifier with an accuracy greater than a preset threshold as a type distinction model.
3. According to the communication protocol congestion monitoring method based on the acceleration device of claim 1, it is characterized in that: The method for dividing S links into K first links and M second links based on congestion prediction types includes: The congestion prediction types corresponding to the S links are traversed. When the congestion prediction type corresponding to the link is round-trip delay, the link is marked as the first link. When the congestion prediction type corresponding to the link is one-way delay, the link is marked as the second link.
4. The communication protocol congestion monitoring method based on an acceleration device according to claim 1, characterized in that: The method for predicting the RTT value at a future time based on the RTT values of the first N data packets and the corresponding first data transmission characteristics includes: The RTT values of the first N data packets and the corresponding first data transmission characteristics are combined into a real-time first data set, and the real-time first data set is input into a pre-built round-trip delay model to obtain the RTT value at a future time.
5. A communication protocol congestion monitoring method based on an acceleration device according to claim 4, characterized in that: The method for constructing the round-trip delay model includes: A fixed step size L and a sliding window length are preset, and the first historical data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the round-trip delay model, and the historical RTT values after the fixed step size L are predicted as the output. The subsequent historical RTT values of each training sample are used as the prediction target. The prediction accuracy is used as the training target to train the round-trip delay model; a round-trip delay model is generated that predicts the RTT values at future moments based on the first historical data set.
6. A communication protocol congestion monitoring method based on an acceleration device according to claim 4, characterized in that: The method for calculating the first link congestion coefficient based on K future RTT values and K target data transmission volumes includes: ; Where FLC is the first link congestion coefficient, is the RTT value of the i-th first link at the future time, is the minimum RTT value of the first N data packets corresponding to the i-th first link, is the target data transmission volume of the i-th first link, is the standard data transmission volume of the first link, is a natural constant, and are weight factors, .
7. The method for monitoring communication protocol congestion based on an acceleration device according to claim 1, characterized in that: The method for predicting the one-way delay at a future time based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics includes: A real-time second data set is formed based on the one-way delays of the first P data packets and the corresponding second data transmission characteristics, and the real-time second data set is input into a pre-built one-way delay model to obtain the one-way delay at a future moment.
8. The method for monitoring communication protocol congestion based on an acceleration device according to claim 7, characterized in that: The method for constructing the one-way delay model includes: A fixed step size L and a sliding window length are preset, and the historical second data set is converted into multiple training samples using a sliding window method. The training samples are used as the input of the one-way delay model, and the historical one-way delay after the fixed step size L is predicted as the output. The subsequent historical one-way delay of each training sample is used as the prediction target. The prediction accuracy is used as the training target, and the one-way delay model is trained to generate a one-way delay model that predicts the one-way delay at future moments based on the historical second data set.
9. The communication protocol congestion monitoring method based on an acceleration device according to claim 7, characterized in that: The method for calculating the congestion coefficient of the second link according to the one-way delays at M future moments includes: ; Where SLC is the congestion coefficient of the second link, For the One-way delay of the second link at a future time, For the The minimum one-way delay of the first P data packets corresponding to the second link, For the The maximum one-way delay of the first P data packets corresponding to the second link.
10. The communication protocol congestion monitoring method based on an acceleration device according to claim 3, characterized in that: The congestion level includes mild congestion, moderate congestion and severe congestion. The method for determining the congestion level according to the first link congestion coefficient and the second link congestion coefficient includes: When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is less than the preset first coefficient threshold, the congestion level is light congestion; When the congestion coefficient of the second link is less than the preset second coefficient threshold, and the congestion coefficient of the first link is greater than or equal to the preset first coefficient threshold, the congestion level is moderate congestion; When the second link congestion coefficient is greater than or equal to a preset second coefficient threshold, the congestion level is severe congestion.
