Data transmission monitoring method and system based on switch

By monitoring queue length and rate in the switch, setting multiple warning thresholds, combining historical databases and hierarchical speed reduction, and optimizing data transmission strategies, the problem of slow network congestion response in the existing technology is solved, and more efficient and stable data transmission is achieved.

CN120281687AInactive Publication Date: 2025-07-08BENXI KAIYUE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510381160.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the case of network congestion, the monitoring mechanism that relies on specific packets triggers leads to slow response speed and insufficient indicator considerations, which affects data transmission efficiency and stability.

Method used

By continuously monitoring the queue length and data transmission rate of the switch port, setting up a variety of early warning thresholds, establishing a database based on historical congestion conditions, comprehensively judging the degree of congestion and graded speed reduction processing, and optimizing data transmission strategies in the event of mild congestion, and using Naive Bayes algorithm to predict congestion.

Benefits of technology

It improves the accuracy and flexibility of network congestion judgment, ensures the efficiency and stability of data transmission, reduces unnecessary speed reduction processing, and improves the system's adaptability and forward-looking nature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281687A_ABST
    Figure CN120281687A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission monitoring method and system based on a switch, and the system comprises an index collection and monitoring module, an early warning threshold adjustment module, a congestion degree comprehensive judgment module, a congestion optimization module, and a congestion prediction module, and relates to the technical field of switch data transmission. The method comprises the following steps: continuously monitoring the queue length of each port of a switch, setting a plurality of early warning threshold types, monitoring the data transmission rate of each port in real time, and establishing a historical congestion database according to a historical congestion condition. The multi-index comprehensive monitoring mode can more comprehensively reflect the network state, and compared with a single-index congestion judgment method, the accuracy of judging the network congestion degree is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of switch data transmission, and particularly to a data transmission monitoring method and system based on a switch. Background Art

[0002] With the rapid development of information technology, the demand for data transmission is constantly increasing, and the problem of network congestion is becoming increasingly prominent. In the process of data transmission, it is crucial to ensure efficient and stable data transmission.

[0003] Publication No. CN113411263B provides a data transmission method, device, equipment and storage medium. When it is detected that a congestion notification CNP packet is generated by a second node, it is monitored whether the second node continuously generates the CNP packet within a first time period; if so, it is determined whether the length of the send queue to be continuously increases; if the length of the send queue to be continuously increases, the switch is controlled to send the CNP packet to a first node at a first frequency, so that the first node adjusts the data transmission rate to the second node.

[0004] However, the above application still has the following problems:

[0005] The triggering mechanism needs to be triggered by a specific packet, and it is too dependent on the CNP packet generated by the second node to trigger the subsequent monitoring and processing processes. This makes the system may not be able to respond to the congestion situation in time when the packet is not received, reducing the sensitivity and response speed of the system to congestion. The index consideration is relatively less. The index consideration mainly judges around the length of the send queue to be, the generation situation of the CNP packet and the ECN marking threshold. In a complex network environment, these indexes may not be sufficient to comprehensively and accurately reflect the degree of network congestion, thus affecting the efficiency and stability of data transmission. Summary of the Invention

[0006] To solve the technical problems existing in the background art, the present invention proposes a data transmission monitoring method and system based on a switch.

[0007] The present invention proposes a data transmission monitoring system based on a switch, including:

[0008] Index collection and monitoring module: Continuously monitor the queue length of each port of the switch, set the warning threshold types for the queue length as a mild warning threshold, a moderate warning threshold and a severe warning threshold, and real-time monitor the data transmission rate of each port, and establish a historical congestion database according to the historical congestion situation;

[0009] Warning threshold adjustment module: Used to adjust the mild warning threshold, moderate warning threshold and severe warning threshold set for the queue length;

[0010] Comprehensive Congestion Degree Judgment Module: Comprehensively judge the congestion degree based on the queue lengths, data transmission rates, and historical congestion situations of each port, and accordingly reduce the transmission rate;

[0011] Congestion Optimization Module: When the queue length of the switch port reaches the mild warning threshold, the system automatically enters the congestion optimization mode, divides the data into large data and small data, fragments the data packets of the large data, and N small data located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted;

[0012] Congestion Prediction Module: According to the congestion prediction algorithm, predict whether the switch network will be congested under a given set of new eigenvalue conditions.

[0013] Preferably, in the Index Collection and Monitoring Module:

[0014] It is used to continuously monitor the queue lengths of each port of the switch, and set the warning threshold types for the queue length as the mild warning threshold, moderate warning threshold, and severe warning threshold;

[0015] It is used to monitor the data transmission rates of each port in real time, including the inflow rate and the outflow rate, and record the change trends of the inflow rate and the outflow rate per unit time;

[0016] It is used to establish a historical congestion database based on the historical congestion situations, and record the time of each congestion occurrence, the warning threshold type reached by the queue length, the duration, and whether data packet loss occurs.

[0017] Preferably, in the Warning Threshold Adjustment Module:

[0018] Within a unit time, the port queue length reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate, and no packet loss occurs. At this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged;

[0019] Within a unit time, the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate, and no packet loss occurs. At this time, increase the moderate warning threshold to L times the original moderate warning threshold, and the mild warning threshold and severe warning threshold remain unchanged;

[0020] Within a unit time, the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate, and no packet loss occurs. At this time, increase the severe warning threshold to L times the original severe warning threshold, and the mild warning threshold and moderate warning threshold remain unchanged;

[0021] Within a unit time, the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold. The mild warning threshold is reduced to K times the original mild warning threshold, while the moderate warning threshold and the severe warning threshold remain unchanged;

[0022] Within a unit time, the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold. The moderate warning threshold is reduced to K times the original moderate warning threshold, while the mild warning threshold and the severe warning threshold remain unchanged;

[0023] Within a unit time, the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold. The severe warning threshold is reduced to K times the original severe warning threshold, while the mild warning threshold and the moderate warning threshold remain unchanged.

[0024] Preferably, in the module for comprehensively judging the congestion degree:

[0025] When the port queue length reaches the mild warning threshold:

[0026] If the outflow rate is not lower than 90% of the inflow rate, no congestion warning notice and speed reduction processing are carried out temporarily, and continue to observe; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction;

[0027] If the outflow rate is lower than 90% of the inflow rate, no congestion warning notice and speed reduction processing are carried out temporarily, continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction;

[0028] When the port queue length reaches the moderate warning threshold:

[0029] If the outflow rate is not lower than 50% of the inflow rate, issue a congestion warning notice, but do not carry out speed reduction processing temporarily. At the same time, greatly increase the monitoring frequency and continuously pay attention to the change trends of the inflow rate and the outflow rate as well as the development of the port queue length; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the second-level speed reduction.

[0030] If the outflow rate is lower than 50% of the inflow rate, a congestion warning notice is issued, and the transmission rate is reduced at the rate of the first-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to observe in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the second-level speed reduction.

[0031] When the port queue length reaches the severe warning threshold:

[0032] If the outflow rate is not lower than 20% of the inflow rate, the transmission rate is reduced at the rate of the second-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to handle in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the third-level speed reduction;

[0033] If the outflow rate is lower than 20% of the inflow rate, the transmission rate is reduced at the rate of the third-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to handle in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the fourth-level speed reduction.

[0034] Preferably, in the comprehensive congestion degree judgment module:

[0035] For the first-level speed reduction, the transmission rate is reduced by 5% - 10%;

[0036] For the second-level speed reduction, the transmission rate is reduced by 20% - 30%;

[0037] For the third-level speed reduction, the transmission rate is reduced by 40% - 50%;

[0038] For the fourth-level speed reduction, the transmission rate is reduced by 60% - 70%;

[0039] For the first-level speed reduction, the second-level speed reduction, the third-level speed reduction, and the fourth-level speed reduction, when reducing the transmission rate, the minimum speed reduction amplitude is adopted at the beginning. If congestion still cannot be effectively alleviated, the first-level speed reduction, the second-level speed reduction, the third-level speed reduction, and the fourth-level speed reduction all adopt the method of gradually increasing the speed reduction amplitude at this time until the maximum allowable speed reduction amplitude.

[0040] Preferably, in the congestion optimization module:

[0041] When the switch port queue length reaches the mild warning threshold, the system automatically enters the congestion optimization mode:

[0042] First, set the discrimination threshold for the data size;

[0043] At the data sending end, when the data is about to enter the congestion queuing state, it is strictly inspected. If the data size exceeds the set threshold, it is marked as large data and given a specific marking code "BD". If the data size is below the threshold, it is marked as small data with the marking code "SD".

[0044] At this time, the data packets marked as large data are fragmented. During the fragmentation of the large data, N small data located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data are transmitted, the fragmented large data is then transmitted in turn.

[0045] Preferably, in the congestion optimization module:

[0046] When fragmenting the data packets marked as large data, the size of a single fragmented data is set to X, and the large data is divided into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a single fragmented data separately.

[0047] The size X of a single fragmented data is adjustable, and the number N of small data "jumping the queue" is adjustable.

[0048] Preferably, in the congestion prediction module:

[0049] The following is the specific process of congestion prediction based on the Naive Bayes algorithm:

[0050] Assume that the features in the historical congestion database are independent of each other, meeting the conditions of the Naive Bayes algorithm

[0051] Define the following variables:

[0052] C: Congestion state, represented by 1 and 0 for congestion occurring and not occurring respectively;

[0053] F1: Inflow rate feature, the amount of inflowing data per unit time;

[0054] F2: Outflow rate feature, the amount of outflowing data per unit time;

[0055] F3: Port queue length feature;

[0056] N: The total number of historical congestion events;

[0057] Next, perform data preprocessing:

[0058] Calculate P(F1|C = 1) and P(F1|C = 0), representing the probability distributions of the inflow rate in the case of congestion occurring and not occurring;

[0059] Similarly, calculate P(F2|C = 1) and P(F2|C = 0);

[0060] Represents the probability distribution of the outflow rate in the case of congestion and non - congestion;

[0061] P(F3|C = 1) and P(F3|C = 0);

[0062] Represents the probability distribution of the port queue length in the case of congestion and non - congestion;

[0063] Calculate the prior probability:

[0064] Calculate the prior probability of congestion

[0065] Calculate the prior probability of non - congestion P(C = 0)=1 - P(C = 1);

[0066] Predict the next congestion:

[0067] Given a set of new eigenvalue Use the naive Bayes formula to calculate the posterior probability of congestion

[0068]

[0069] Similarly, calculate the posterior probability of non - congestion

[0070] If

[0071] Then predict that congestion will occur under the new eigenvalue; otherwise, predict that congestion will not occur under the new eigenvalue.

[0072] A data transmission monitoring method based on a switch, comprising the following steps:

[0073] Conduct index collection and monitoring:

[0074] Continuously monitor the queue length of each port of the switch, and set the warning threshold types for the queue length as mild warning threshold, moderate warning threshold, and severe warning threshold;

[0075] Real - time monitor the data transmission rate of each port, including the inflow rate and the outflow rate, and record the change trend of the inflow rate and the outflow rate per unit time;

[0076] Establish a historical congestion database according to the historical congestion situation, and record the time of each congestion occurrence, the warning threshold type reached by the queue length, the duration, and whether data packet loss occurs;

[0077] Conduct a comprehensive judgment of the congestion degree:

[0078] When the port queue length reaches the mild warning threshold:

[0079] If the outflow rate is not less than 90% of the inflow rate, no congestion warning notification or speed reduction process will be carried out temporarily, and continue to observe; referring to the historical congestion situation over a period of time, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the first-level speed reduction;

[0080] If the outflow rate is less than 90% of the inflow rate, no congestion warning notification or speed reduction process will be carried out temporarily, continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situation over a period of time, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the first-level speed reduction;

[0081] When the port queue length reaches the moderate warning threshold:

[0082] If the outflow rate is not less than 50% of the inflow rate, issue a congestion warning notification, but do not carry out speed reduction temporarily, at the same time, greatly increase the monitoring frequency, and continuously pay attention to the change trends of the inflow rate and the outflow rate and the development of the port queue length; referring to the historical congestion situation over a period of time, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the second-level speed reduction.

[0083] If the outflow rate is less than 50% of the inflow rate, issue a congestion warning notification and reduce the transmission rate by the magnitude of the first-level speed reduction; referring to the historical congestion situation over a period of time, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the second-level speed reduction.

[0084] When the port queue length reaches the severe warning threshold:

[0085] If the outflow rate is not less than 20% of the inflow rate, reduce the transmission rate by the magnitude of the second-level speed reduction; referring to the historical congestion situation over a period of time, if a similar situation did not cause packet loss in the historical congestion situation, continue to handle in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the third-level speed reduction;

[0086] If the outflow rate is less than 20% of the inflow rate, reduce the transmission rate by the magnitude of the third-level speed reduction; referring to the historical congestion situation over a period of time, if a similar situation did not cause packet loss in the historical congestion situation, continue to handle in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate by the magnitude of the fourth-level speed reduction;

[0087] Wherein:

[0088] The first-level speed reduction reduces the transmission rate by 5% - 10%;

[0089] The second-level speed reduction reduces the transmission rate by 20% - 30%;

[0090] The third-level speed reduction reduces the transmission rate by 40% - 50%;

[0091] The fourth-level speed reduction reduces the transmission rate by 60% - 70%;

[0092] For the first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction, when reducing the transmission rate, the minimum speed reduction amplitude is adopted at the beginning. If congestion still cannot be effectively alleviated, the first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction will all adopt the method of gradually increasing the speed reduction amplitude at this time until the maximum allowed speed reduction amplitude;

[0093] Perform congestion optimization:

[0094] When the length of the switch port queue reaches the mild warning threshold, the system automatically enters the congestion optimization mode:

[0095] First, set the discrimination threshold for data size. At the data sending end, when the data is about to enter the congestion queuing state, it is strictly checked. If the data size exceeds the set threshold, it is marked as large data and given a specific mark code "BD"; if the data size is below the threshold, it is marked as small data, and the mark code is "SD";

[0096] At this time, perform fragmentation operations on the data packets marked as large data. During the process of fragmenting large data, N small data located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data are transmitted, the fragmented large data will be transmitted in turn;

[0097] When performing fragmentation operations on the data packets marked as large data, set the size of a single fragmented data as X, and divide the large data into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a single fragmented data;

[0098] The size X of a single fragmented data is adjustable, and the number N of small data "jumping the queue" is adjustable;

[0099] Perform warning threshold adjustment:

[0100] Within a unit time, the length of the port queue reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate, and there is no packet loss phenomenon. At this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged;

[0101] Within a unit of time, the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate, and there is no packet loss. At this time, increase the moderate warning threshold to L times the original moderate warning threshold, and keep the mild warning threshold and the severe warning threshold unchanged;

[0102] Within a unit of time, the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate, and there is no packet loss. At this time, increase the severe warning threshold to L times the original severe warning threshold, and keep the mild warning threshold and the moderate warning threshold unchanged;

[0103] Within a unit of time, the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold. Lower the mild warning threshold to K times the original mild warning threshold, and keep the moderate warning threshold and the severe warning threshold unchanged;

[0104] Within a unit of time, the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold. Lower the moderate warning threshold to K times the original moderate warning threshold, and keep the mild warning threshold and the severe warning threshold unchanged;

[0105] Within a unit of time, the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold. Lower the severe warning threshold to K times the original severe warning threshold, and keep the mild warning threshold and the moderate warning threshold unchanged;

[0106] Perform congestion prediction:

[0107] The following is the specific process of congestion prediction based on the Naive Bayes algorithm:

[0108] Assume that the features in the historical congestion database are independent of each other, which meets the condition definition of the Naive Bayes algorithm. Define the following variables:

[0109] C: Congestion status, using 1 and 0 to represent congestion occurred and no congestion occurred respectively;

[0110] F1: Inflow rate feature, the amount of incoming data within a unit of time;

[0111] F2: Outflow rate feature, the amount of outgoing data within a unit of time;

[0112] F3: Port queue length feature;

[0113] N: The total number of historical congestion events;

[0114] Next, perform data preprocessing:

[0115] Calculate P(F1|C = 1) and P(F1|C = 0);

[0116] Represents the probability distribution of the inflow rate in the case of congestion and non-congestion;

[0117] Similarly, calculate P(F2|C = 1) and P(F2|C = 0);

[0118] Represents the probability distribution of the outflow rate in the case of congestion and non-congestion;

[0119] P(F3|C = 1) and P(F3|C = 0);

[0120] Represents the probability distribution of the port queue length in the case of congestion and non-congestion;

[0121] Calculate the prior probability:

[0122] Calculate the prior probability of congestion

[0123] Calculate the prior probability of non-congestion P(C = 0) = 1 - P(C = 1);

[0124] Predict the next congestion:

[0125] Given a set of new eigenvalue Use the Naive Bayes formula to calculate the posterior probability of congestion

[0126]

[0127] Similarly, calculate the posterior probability of non-congestion

[0128] If

[0129] Then predict that congestion will occur under the new eigenvalue; otherwise, predict that congestion will not occur under the new eigenvalue.

[0130] In the present invention, the proposed data transmission monitoring method and system based on a switch have the following beneficial technical effects:

[0131] 1. Through the index collection and monitoring module, this application continuously monitors the queue lengths of each port of the switch, sets multiple warning threshold types, and real-time monitors the data transmission rates of each port. At the same time, it also establishes a historical congestion database according to the historical congestion situation. This comprehensive monitoring method of multiple indicators can more comprehensively reflect the network state. Compared with the method of judging congestion by a single indicator, it greatly improves the accuracy of judging the degree of network congestion and can take more targeted measures in different degrees of congestion situations, thus ensuring the efficiency and stability of data transmission.

[0132] 2. The warning threshold adjustment module can dynamically adjust the mild, moderate, and severe warning thresholds according to the actual network operation conditions. When the port queue length reaches a certain warning threshold multiple times within a unit time, but the outflow rate meets certain conditions and there is no packet loss, the corresponding warning threshold can be increased to avoid overly sensitive warning triggers; conversely, when the outflow rate is lower than a specific ratio but the port queue length does not trigger the corresponding warning threshold, the warning threshold is decreased to increase the system's sensitivity to congestion; this dynamic adjustment mechanism enables the system to better adapt to different network environments and data transmission requirements, improving the flexibility and self - adaptability of the system.

[0133] 3. In the comprehensive congestion degree judgment module, according to the port queue length, inflow and outflow rates, and historical congestion situations, a hierarchical speed reduction process is adopted. Different degrees of congestion correspond to different magnitudes of speed reduction, from level 1 speed reduction to level 4 speed reduction. When reducing the transmission rate, the minimum speed reduction magnitude is first used. If the congestion cannot be alleviated, the speed reduction magnitude is gradually increased; this method can not only effectively reduce data packet loss during congestion and maintain network stability, but also balance congestion handling and data transmission efficiency to a certain extent, avoiding excessive speed reduction from affecting normal data transmission services.

[0134] 4. When the switch port queue length reaches the mild warning threshold, the congestion optimization module automatically enters the congestion optimization mode. By setting a data size threshold to distinguish large data and small data, the large data is fragmented, and N small data behind the large data are allowed to "jump the queue" for priority transmission; in the case of mild network congestion, this mode can improve the transmission efficiency of small data, and at the same time reduce the transmission pressure of large data by fragmenting the large data, thereby overall improving the data transmission efficiency in the congestion scenario.

[0135] 5. The congestion prediction module is based on the Naive Bayes algorithm and uses the features in the historical congestion database for congestion prediction. Given a new set of feature values, it can predict the possibility of congestion occurring in the switch network; this forward - looking congestion prediction function allows the system to take measures in advance to avoid the occurrence of congestion, further improving the stability and efficiency of data transmission.

[0136] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present invention. Brief Description of the Drawings

[0137] Figure 1 is the principle block diagram of the system of the present invention;

[0138] Figure 2 is the working flow chart of the congestion optimization module of the present invention. Detailed Embodiments

[0139] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference signs throughout the drawings indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.

[0140] As Figure 1 - Figure 2 shown, a data transmission monitoring system based on a switch includes:

[0141] Index collection and monitoring module: Continuously monitor the queue lengths of each port of the switch, set warning threshold types for the queue lengths as mild warning threshold, moderate warning threshold, and severe warning threshold, and real-time monitor the data transmission rates of each port, and establish a historical congestion database according to the historical congestion situation;

[0142] Warning threshold adjustment module: Used to adjust the mild warning threshold, moderate warning threshold, and severe warning threshold set for the queue length;

[0143] Comprehensive congestion degree judgment module: Comprehensively judge the congestion degree according to the queue lengths, data transmission rates, and historical congestion situations of each port, and accordingly reduce the transmission rate;

[0144] Congestion optimization module: When the queue length of the switch port reaches the mild warning threshold, the system automatically enters the congestion optimization mode, divides the data into large data and small data, performs fragmentation operations on the data packets of the large data, and N small data located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted;

[0145] Congestion prediction module: According to the congestion prediction algorithm, predict whether congestion will occur in the switch network under a given set of new eigenvalue conditions.

[0146] In the index collection and monitoring module:

[0147] Used to continuously monitor the queue lengths of each port of the switch, and set warning threshold types for the queue lengths as mild warning threshold, moderate warning threshold, and severe warning threshold;

[0148] Used to real-time monitor the data transmission rates of each port, including the inflow rate and the outflow rate, and record the change trends of the inflow rate and the outflow rate per unit time;

[0149] Used to establish a historical congestion database according to the historical congestion situation, and record the time of each congestion occurrence, the warning threshold type reached by the queue length, the duration, and whether data packet loss occurs.

[0150] Through the index collection and monitoring module, this application continuously monitors the queue lengths of each port of the switch, sets multiple warning threshold types (mild, moderate, and severe warning thresholds), and real-time monitors the data transmission rates of each port (including the inflow rate and the outflow rate). At the same time, a historical congestion database is established based on the historical congestion situation. This comprehensive monitoring method of multiple indicators can more comprehensively reflect the network status. Compared with the method of judging congestion by a single indicator, it greatly improves the accuracy of judging the degree of network congestion;

[0151] It can take more targeted measures under different degrees of congestion, avoiding unnecessary speed reduction or other processing caused by misjudgment of a single indicator, thus ensuring the efficiency and stability of data transmission.

[0152] In the warning threshold adjustment module:

[0153] Within a unit time, if the port queue length reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate and there is no packet loss, at this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate and severe warning thresholds remain unchanged;

[0154] Within a unit time, if the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate and there is no packet loss, at this time, increase the moderate warning threshold to L times the original moderate warning threshold, and the mild and severe warning thresholds remain unchanged;

[0155] Within a unit time, if the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate and there is no packet loss, at this time, increase the severe warning threshold to L times the original severe warning threshold, and the mild and moderate warning thresholds remain unchanged;

[0156] Within a unit time, if the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold, reduce the mild warning threshold to K times the original mild warning threshold, and the moderate and severe warning thresholds remain unchanged;

[0157] Within a unit time, if the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold, reduce the moderate warning threshold to K times the original moderate warning threshold, and the mild and severe warning thresholds remain unchanged;

[0158] Within a unit time, if the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold, reduce the severe warning threshold to K times the original severe warning threshold, and the mild and moderate warning thresholds remain unchanged.

[0159] Through the index collection and monitoring module, this application continuously monitors the queue lengths of each port of the switch, sets multiple warning threshold types (mild, moderate, and severe warning thresholds), and real-time monitors the data transmission rates of each port (including the inflow rate and the outflow rate). At the same time, it also establishes a historical congestion database based on the historical congestion situation. This comprehensive monitoring method of multiple indicators can more comprehensively reflect the network state, and greatly improves the accuracy of judging the degree of network congestion compared with the method of judging congestion by a single indicator;

[0160] It can take more targeted measures under different degrees of congestion, avoiding unnecessary speed reduction or other processing caused by misjudgment of a single indicator, thus ensuring the efficiency and stability of data transmission.

[0161] In the comprehensive congestion degree judgment module:

[0162] When the port queue length reaches the mild warning threshold:

[0163] If the outflow rate is not less than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be carried out temporarily, and continue to observe; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction;

[0164] If the outflow rate is less than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be carried out temporarily, continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction;

[0165] When the port queue length reaches the moderate warning threshold:

[0166] If the outflow rate is not less than 50% of the inflow rate, issue a congestion warning notification, but do not carry out speed reduction processing temporarily. At the same time, greatly increase the monitoring frequency, and continuously pay attention to the change trends of the inflow rate and the outflow rate and the development of the port queue length; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the second-level speed reduction.

[0167] If the outflow rate is lower than 50% of the inflow rate, a congestion warning notice is issued, and the transmission rate is reduced at the rate of the first-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to observe in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the second-level speed reduction.

[0168] When the port queue length reaches the severe warning threshold:

[0169] If the outflow rate is not lower than 20% of the inflow rate, the transmission rate is reduced at the rate of the second-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to handle in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the third-level speed reduction;

[0170] If the outflow rate is lower than 20% of the inflow rate, the transmission rate is reduced at the rate of the third-level speed reduction; referring to the historical congestion situation over a period of time, if in the historical congestion situation, a similar situation did not result in packet loss, continue to handle in the current manner, and if in the historical congestion situation, a similar situation resulted in packet loss, the transmission rate is reduced at the rate of the fourth-level speed reduction.

[0171] In the comprehensive congestion degree judgment module:

[0172] The first-level speed reduction reduces the transmission rate by 5% - 10%;

[0173] The second-level speed reduction reduces the transmission rate by 20% - 30%;

[0174] The third-level speed reduction reduces the transmission rate by 40% - 50%;

[0175] The fourth-level speed reduction reduces the transmission rate by 60% - 70%;

[0176] For the first-level speed reduction, the second-level speed reduction, the third-level speed reduction, and the fourth-level speed reduction, when reducing the transmission rate, the minimum speed reduction amplitude is adopted at the beginning. If the congestion still cannot be effectively alleviated, the first-level speed reduction, the second-level speed reduction, the third-level speed reduction, and the fourth-level speed reduction all adopt the method of gradually increasing the speed reduction amplitude at this time until the maximum allowed speed reduction amplitude.

[0177] In the case of congestion, reducing the transmission rate can reduce the occurrence of data packet loss and maintain network stability.

[0178] In the comprehensive congestion degree judgment module, according to the port queue length, the inflow and outflow rates, and the historical congestion situation, speed reduction processing is carried out in levels. Different degrees of congestion correspond to different amplitudes of speed reduction. From the first-level speed reduction to the fourth-level speed reduction, the minimum speed reduction amplitude is adopted first when reducing the transmission rate. If the congestion cannot be alleviated, the speed reduction amplitude is gradually increased;

[0179] This method can not only effectively reduce data packet loss during congestion, maintain network stability, but also balance congestion handling and data transmission efficiency to a certain extent, avoiding excessive speed reduction from affecting normal data transmission services.

[0180] In the congestion optimization module:

[0181] When the switch port queue length reaches the mild warning threshold, the system automatically enters the congestion optimization mode:

[0182] First, set the discrimination threshold for data size;

[0183] At the data sending end, when the data is about to enter the congestion queuing state, it is strictly checked. If the data size exceeds the set threshold, it is marked as large data and given a specific mark code "BD". If the data size is below the threshold, it is marked as small data with the mark code "SD";

[0184] At this time, the data packets marked as large data are fragmented. During the fragmentation of large data, N small data packets located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data packets are transmitted, the fragmented large data packets are transmitted in turn.

[0185] In the congestion optimization module:

[0186] When fragmenting the data packets marked as large data, set the size of a single fragmented data as X, and divide the large data into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a separate fragmented data;

[0187] The size X of a single fragmented data is adjustable, and the number N of small data packets "jumping the queue" is adjustable.

[0188] When the switch port queue length reaches the mild warning threshold, the congestion optimization module automatically enters the congestion optimization mode. By setting the data size threshold to distinguish large data and small data, fragmenting the large data, and allowing N small data packets behind the large data to "jump the queue" for preferential transmission; this mode can improve the transmission efficiency of small data in the case of mild network congestion, and at the same time reduce the transmission pressure of large data by fragmenting the large data, thus overall improving the data transmission efficiency in the congestion scenario.

[0189] In the congestion prediction module:

[0190] The following is the specific process of congestion prediction based on the Naive Bayes algorithm:

[0191] Assume that the features in the historical congestion database are independent of each other and meet the condition definition of the Naive Bayes algorithm. Define the following variables:

[0192] C: Congestion status, represented by 1 and 0 for congestion occurring and not occurring respectively;

[0193] F1: Inflow rate feature, the amount of inflowing data per unit time;

[0194] F2: Outflow rate feature, the amount of outflowing data per unit time;

[0195] F3: Port queue length feature;

[0196] N: Total number of historical congestion events;

[0197] Next, perform data preprocessing:

[0198] Calculate P(F1|C = 1) and P(F1|C = 0), representing the probability distributions of the inflow rate in the case of congestion occurring and not occurring;

[0199] Similarly, calculate P(F2|C = 1), P(F2|C = 0);

[0200] Representing the probability distributions of the outflow rate in the case of congestion occurring and not occurring;

[0201] P(F3|C = 1) and P(F3|C = 0);

[0202] Representing the probability distributions of the port queue length in the case of congestion occurring and not occurring;

[0203] Calculate the prior probability:

[0204] Calculate the prior probability of congestion occurring

[0205] Calculate the prior probability of no congestion occurring P(C = 0) = 1 - P(C = 1);

[0206] Predict the next congestion:

[0207] Given a set of new eigenvalue Use the Naive Bayes formula to calculate the posterior probability of congestion occurring

[0208]

[0209] Similarly, calculate the posterior probability of no congestion occurring

[0210] If

[0211] Then predict that congestion will occur under the new eigenvalue; otherwise, predict that congestion will not occur under the new eigenvalue.

[0212] The congestion prediction module is based on the Naive Bayes algorithm and uses features (inflow rate, outflow rate, port queue length, etc.) in the historical congestion database to predict congestion. Given a new set of feature values, it can predict the likelihood of congestion occurring in the switch network; this forward-looking congestion prediction function allows the system to take measures in advance to avoid congestion and further improve the stability and efficiency of data transmission.

[0213] A data transmission monitoring method based on a switch, comprising the following steps:

[0214] Perform metric collection and monitoring:

[0215] Continuously monitor the queue lengths of each port of the switch, and set the warning threshold types for the queue lengths as mild warning threshold, moderate warning threshold, and severe warning threshold;

[0216] Real-time monitor the data transmission rates of each port, including the inflow rate and the outflow rate, and record the change trends of the inflow rate and the outflow rate per unit time;

[0217] Establish a historical congestion database based on historical congestion situations, and record the time of each congestion occurrence, the warning threshold type reached by the queue length, the duration, and whether data packet loss occurs;

[0218] Perform comprehensive judgment of the congestion degree:

[0219] When the port queue length reaches the mild warning threshold:

[0220] If the outflow rate is not less than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be performed temporarily, and continue to observe; referring to the historical congestion situations within a certain period, if this situation did not cause packet loss in the historical congestion situations, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situations, reduce the transmission rate at the first-level speed reduction amplitude;

[0221] If the outflow rate is less than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be performed temporarily, continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situations within a certain period, if this situation did not cause packet loss in the historical congestion situations, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situations, reduce the transmission rate at the first-level speed reduction amplitude;

[0222] When the port queue length reaches the moderate warning threshold:

[0223] If the outflow rate is not less than 50% of the inflow rate, a congestion warning notice is issued, but the speed reduction is not carried out temporarily. At the same time, the monitoring frequency is increased significantly, and the changing trends of the inflow rate, the outflow rate, and the port queue length are continuously monitored. Referring to the historical congestion situation over a period of time, if such a situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if such a situation caused packet loss in the historical congestion situation, reduce the transmission rate at the secondary speed reduction amplitude.

[0224] If the outflow rate is less than 50% of the inflow rate, a congestion warning notice is issued, and the transmission rate is reduced at the primary speed reduction amplitude. Referring to the historical congestion situation over a period of time, if such a situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if such a situation caused packet loss in the historical congestion situation, reduce the transmission rate at the secondary speed reduction amplitude.

[0225] When the port queue length reaches the severe warning threshold:

[0226] If the outflow rate is not less than 20% of the inflow rate, reduce the transmission rate at the secondary speed reduction amplitude. Referring to the historical congestion situation over a period of time, if such a situation did not cause packet loss in the historical congestion situation, continue to handle in the current manner; if such a situation caused packet loss in the historical congestion situation, reduce the transmission rate at the tertiary speed reduction amplitude;

[0227] If the outflow rate is less than 20% of the inflow rate, reduce the transmission rate at the tertiary speed reduction amplitude. Referring to the historical congestion situation over a period of time, if such a situation did not cause packet loss in the historical congestion situation, continue to handle in the current manner; if such a situation caused packet loss in the historical congestion situation, reduce the transmission rate at the quaternary speed reduction amplitude;

[0228] Primary speed reduction: reduce the transmission rate by 5% - 10%; the reduced transmission rate includes both the inflow rate and the outflow rate

[0229] Secondary speed reduction: reduce the transmission rate by 20% - 30%;

[0230] Tertiary speed reduction: reduce the transmission rate by 40% - 50%;

[0231] Quaternary speed reduction: reduce the transmission rate by 60% - 70%.

[0232] For primary speed reduction, secondary speed reduction, tertiary speed reduction, and quaternary speed reduction, when reducing the transmission rate, the minimum speed reduction amplitude is adopted at the beginning. If congestion still cannot be effectively alleviated, primary speed reduction, secondary speed reduction, tertiary speed reduction, and quaternary speed reduction all adopt the method of gradually increasing the speed reduction amplitude at this time until the maximum allowable speed reduction amplitude.

[0233] Note: The gradual decline and large fluctuations in the inflow rate reflect the response of upstream devices to network congestion and the behavioral differences of different data sources. The decline in the outflow rate indicates limited switch processing capacity and the impact of network congestion on data forwarding. Historical congestion conditions can provide a reference to help determine whether the current congestion is likely to develop into a serious problem. However, when the port queue length reaches the severe warning threshold, the reference value of historical conditions is relatively reduced, and measures should be taken first to alleviate congestion. Different warning thresholds correspond to different processing methods, aiming to minimize unnecessary congestion notifications and speed reduction processes as much as possible while ensuring the normal operation of the network, and improve the efficiency and stability of the network.

[0234] Congestion Optimization:

[0235] When the switch port queue length reaches the mild warning threshold, the system automatically enters the congestion optimization mode:

[0236] First, set a threshold for differentiating data sizes. Data above 30MB can be defined as large data, and data of 30MB and below can be defined as small data. This threshold can be flexibly adjusted according to the actual network environment and application requirements. At the data sending end, when the data is about to enter the congestion queue state, it is strictly checked. If the data size exceeds the set threshold, it is marked as large data and given a specific marking code "BD" (Big Data); if the data size is below the threshold, it is marked as small data, and the marking code is "SD" (Small Data).

[0237] At this time, perform fragmentation operations on the data packets marked as large data. By fragmenting large data packets, the length of the data packets can be effectively reduced, and the transmission pressure can be reduced. During the process of fragmenting large data, N small data behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data are transmitted, the fragmented large data is transmitted in turn. Such an optimization strategy can more efficiently utilize network resources and improve data transmission efficiency in the case of mild network congestion.

[0238] Set: N is an integer, N = 3.

[0239] When performing fragmentation operations on the data packets marked as large data, set the size of a single fragmented data as X, and divide the large data into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a single fragmented data separately;

[0240] The size X of a single fragmented data is adjustable, and the number N of small data "jumping the queue" is adjustable: for example, if the effect of fragmenting large data is not ideal, at this time, the size X of a single fragmented data can be reduced, or the number N of small data "jumping the queue" can be increased.

[0241] Adjust the warning threshold:

[0242] Within a unit time, the port queue length reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate, and there is no packet loss. At this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged. Let L be 1.05.

[0243] Within a unit time, the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate, and there is no packet loss. At this time, increase the moderate warning threshold to L times the original moderate warning threshold, and the mild warning threshold and severe warning threshold remain unchanged. Let L be 1.05.

[0244] Within a unit time, the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate, and there is no packet loss. At this time, increase the severe warning threshold to L times the original severe warning threshold, and the mild warning threshold and moderate warning threshold remain unchanged. Let L be 1.05.

[0245] Within a unit time, the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold. Reduce the mild warning threshold to K times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged. Let K be 0.95.

[0246] Within a unit time, the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold. Reduce the moderate warning threshold to K times the original moderate warning threshold, and the mild warning threshold and severe warning threshold remain unchanged. Let K be 0.95.

[0247] Within a unit time, the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold. Reduce the severe warning threshold to K times the original severe warning threshold, and the mild warning threshold and moderate warning threshold remain unchanged. Let K be 0.95.

[0248] The following is the specific process of congestion prediction based on the Naive Bayes algorithm:

[0249] Assume that the features in the historical congestion database are independent of each other, meeting the conditions of the Naive Bayes algorithm

[0250] Define the following variables:

[0251] C: Congestion status, using 1 and 0 to represent congestion occurred and no congestion occurred respectively;

[0252] F1: Inflow rate feature, the amount of inflow data within a unit time;

[0253] F2: Outflow rate feature, the amount of outflow data within a unit time;

[0254] F3: Port queue length feature;

[0255] N: Total number of historical congestion events;

[0256] Next, perform data preprocessing:

[0257] Calculate P(F1|C = 1) and P(F1|C = 0), representing the probability distributions of the inflow rate in the case of congestion and no congestion;

[0258] Similarly, calculate P(F2|C = 1) and P(F2|C = 0);

[0259] Represent the probability distributions of the outflow rate in the case of congestion and no congestion;

[0260] P(F3|C = 1) and P(F3|C = 0);

[0261] Represent the probability distributions of the port queue length in the case of congestion and no congestion;

[0262] Calculate the prior probability:

[0263] Calculate the prior probability of congestion

[0264] Calculate the prior probability of no congestion P(C = 0) = 1 - P(C = 1);

[0265] Predict the next congestion:

[0266] Given a set of new eigenvalue Use the Naive Bayes formula to calculate the posterior probability of congestion

[0267]

[0268] Similarly, calculate the posterior probability of no congestion

[0269] If

[0270] Then predict that congestion will occur under the new eigenvalue; otherwise, predict that congestion will not occur under the new eigenvalue.

[0271] Meanwhile, the content not described in detail in this specification belongs to the prior art well-known to those skilled in the art.

[0272] In the embodiments provided by the present invention, it should be understood that the disclosed system or method can be implemented in other ways. For example, the described embodiments of the invention are merely illustrative. For instance, the division of modules is only a logical function division, and there may be other division methods in actual implementation.

[0273] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules. They can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0274] In addition, in each embodiment of the present invention, the functional modules can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0275] For those skilled in the field of operation and maintenance, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the basic features of the present invention, the present invention can be implemented in other specific forms.

[0276] As mentioned above, the above is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent replacements or changes should be covered within the protection scope of the present invention.

Claims

1. A data transmission monitoring system based on a switch, characterized in that Including: Index collection and monitoring module: Continuously monitor the queue lengths of each port of the switch, set the warning threshold types for the queue lengths as mild warning threshold, moderate warning threshold, and severe warning threshold, and real-time monitor the data transfer rates of each port, and establish a historical congestion database based on the historical congestion situation; Warning threshold adjustment module: Used to adjust the mild warning threshold, moderate warning threshold, and severe warning threshold set for the queue length; Comprehensive congestion degree judgment module: Comprehensively judge the congestion degree according to the queue lengths, data transfer rates, and historical congestion situations of each port, and accordingly reduce the transfer rate; Congestion optimization module: When the queue length of the switch port reaches the mild warning threshold, the system automatically enters the congestion optimization mode, divides the data into large data and small data, performs fragmentation operations on the data packets of the large data, and N small data located behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted; Congestion prediction module: According to the congestion prediction algorithm, predict whether the switch network will be congested under a given set of new eigenvalue conditions.

2. The data transmission monitoring system based on a switch according to claim 1, wherein In the index collection and monitoring module: Used to continuously monitor the queue lengths of each port of the switch, and set the warning threshold types for the queue lengths as mild warning threshold, moderate warning threshold, and severe warning threshold; Used to real-time monitor the data transfer rates of each port, including the inflow rate and the outflow rate, and record the change trends of the inflow rate and the outflow rate per unit time; Used to establish a historical congestion database based on the historical congestion situation, and record including the time of each congestion occurrence, the warning threshold type reached by the queue length, the duration, and whether data packet loss occurs.

3. The data transmission monitoring system based on a switch according to claim 2, wherein In the warning threshold adjustment module: Within a unit time, the port queue length reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate, and no packet loss phenomenon occurs. At this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate warning threshold and the severe warning threshold remain unchanged; Within a unit time, the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate, and no packet loss phenomenon occurs. At this time, increase the moderate warning threshold to L times the original moderate warning threshold, and the mild warning threshold and the severe warning threshold remain unchanged; Within a unit time, the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate, and no packet loss phenomenon occurs. At this time, increase the severe warning threshold to L times the original severe warning threshold, and the mild warning threshold and the moderate warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold. Reduce the mild warning threshold to K times the original mild warning threshold, and the moderate warning threshold and the severe warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold. Reduce the moderate warning threshold to K times the original moderate warning threshold, and the mild warning threshold and the severe warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold. The severe warning threshold is reduced to K times the original severe warning threshold, and the mild warning threshold and the moderate warning threshold remain unchanged.

4. The data transmission monitoring system based on a switch according to claim 2 or 3, characterized in that In the module for comprehensively judging the congestion degree: When the port queue length reaches the mild warning threshold: If the outflow rate is not lower than 90% of the inflow rate, no congestion warning notice and speed reduction processing are carried out temporarily, and continue to observe; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction. If the outflow rate is lower than 90% of the inflow rate, no congestion warning notice and speed reduction processing are carried out temporarily, and continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situation within a certain period, if this situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the first-level speed reduction. When the port queue length reaches the moderate warning threshold: If the outflow rate is not lower than 50% of the inflow rate, issue a congestion warning notice, but do not carry out speed reduction processing temporarily. At the same time, greatly increase the monitoring frequency, and continuously pay attention to the change trends of the inflow rate and the outflow rate and the development of the port queue length; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the second-level speed reduction. If the outflow rate is lower than 50% of the inflow rate, issue a congestion warning notice and reduce the transmission rate at the rate of the first-level speed reduction; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to observe in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the second-level speed reduction. When the port queue length reaches the severe warning threshold: If the outflow rate is not lower than 20% of the inflow rate, reduce the transmission rate at the rate of the second-level speed reduction; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to process in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the third-level speed reduction; If the outflow rate is lower than 20% of the inflow rate, reduce the transmission rate at the rate of the third-level speed reduction; referring to the historical congestion situation within a certain period, if a similar situation did not cause packet loss in the historical congestion situation, continue to process in the current manner, if a similar situation caused packet loss in the historical congestion situation, reduce the transmission rate at the rate of the fourth-level speed reduction.

5. The data transmission monitoring system based on a switch according to claim 4, wherein In the module for comprehensively judging the congestion degree: The first-level speed reduction reduces the transmission rate by 5% - 10%; The second-level speed reduction reduces the transmission rate by 20% - 30%; The third-level speed reduction reduces the transmission rate by 40% - 50%; The fourth-level speed reduction reduces the transmission rate by 60% - 70%; The first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction all adopt the minimum speed reduction amplitude at the beginning when reducing the transmission rate. If congestion still cannot be effectively alleviated, the first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction all adopt the method of gradually increasing the speed reduction amplitude until the maximum allowable speed reduction amplitude.

6. The data transmission monitoring system based on a switch according to claim 1, wherein In the congestion optimization module: When the switch port queue length reaches the mild warning threshold, the system automatically enters the congestion optimization mode: First, set the discrimination threshold for data size; At the data sending end, when the data is about to enter the congestion queuing state, it is strictly checked. If the data size exceeds the set threshold, it is marked as large data and given a specific marking code "BD". If the data size is below the threshold, it is marked as small data, and the marking code is "SD"; At this time, the data packet marked as large data is fragmented. During the fragmentation of large data, N small data behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data are transmitted, the fragmented large data is transmitted in turn.

7. The data transmission monitoring system based on a switch according to claim 6, wherein In the congestion optimization module: When fragmenting the data packet marked as large data, set the size of a single fragmented data as X, and divide the large data into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a single fragmented data; The size X of a single fragmented data is adjustable, and the number N of small data "jumping the queue" is adjustable.

8. The data transmission monitoring system based on a switch according to claim 1, characterized in that, In the congestion prediction module: The following is the specific process of congestion prediction based on the Naive Bayes algorithm: Assume that the features in the historical congestion database are independent of each other and meet the conditions of the Naive Bayes algorithm Define the following variables: C: Congestion status, using 1 and 0 to represent congestion and no congestion respectively; F1: Inflow rate feature, the amount of inflowing data per unit time; F2: Outflow rate feature, the amount of outflowing data per unit time; F3: Port queue length feature; N: The total number of historical congestion events; Next, perform data preprocessing: Calculate P(F1|C = 1) and P(F1|C = 0), representing the probability distributions of the inflow rate in the case of congestion and no congestion; Similarly, calculate P(F2|C = 1), P(F2|C = 0); Represent the probability distributions of the outflow rate in the case of congestion and no congestion; P(F3|C = 1) and P(F3|C = 0); Represent the probability distributions of the port queue length in the case of congestion and no congestion; Calculate the prior probability: Calculate the prior probability of congestion occurring Calculate the prior probability of no congestion P(C = 0) = 1 - P(C = 1); Predict the next congestion: Given a new set of eigenvalues Use the Naive Bayes formula to calculate the posterior probability of congestion Similarly, calculate the posterior probability of no congestion If Then it is predicted that congestion will occur under the new feature values; otherwise, it is predicted that congestion will not occur under the new feature values.

9. A data transmission monitoring method based on a switch according to any one of claims 1-8, characterized in that, It includes the following steps: Carry out index collection and monitoring: Continuously monitor the queue lengths of each port of the switch, and set the warning threshold types for the queue length as mild warning threshold, moderate warning threshold, and severe warning threshold; Real-time monitor the data transmission rates of each port, including the inflow rate and the outflow rate, and record the change trends of the inflow rate and the outflow rate per unit time; Establish a historical congestion database based on historical congestion situations, recording the time of each congestion occurrence, the type of warning threshold reached by the queue length, the duration, and whether data packet loss occurred; Conduct a comprehensive judgment of the congestion degree: When the port queue length reaches the mild warning threshold: If the outflow rate is not lower than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be carried out temporarily, and continue to observe; referring to the historical congestion situations within a certain period, if this situation did not cause packet loss in the historical congestion situations, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the first-level speed reduction; If the outflow rate is lower than 90% of the inflow rate, no congestion warning notification and speed reduction processing will be carried out temporarily, continue to observe, and increase the monitoring frequency of the inflow rate and the outflow rate; referring to the historical congestion situations within a certain period, if this situation did not cause packet loss in the historical congestion situations, continue to observe in the current manner; if this situation caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the first-level speed reduction; When the port queue length reaches the moderate warning threshold: If the outflow rate is not lower than 50% of the inflow rate, issue a congestion warning notification, but do not carry out speed reduction processing temporarily, at the same time, greatly increase the monitoring frequency, and continuously pay attention to the change trends of the inflow rate and the outflow rate and the development of the port queue length; referring to the historical congestion situations within a certain period, if similar situations did not cause packet loss in the historical congestion situations, continue to observe in the current manner, if similar situations caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the second-level speed reduction. If the outflow rate is lower than 50% of the inflow rate, issue a congestion warning notification and reduce the transmission rate at the rate of the first-level speed reduction; referring to the historical congestion situations within a certain period, if similar situations did not cause packet loss in the historical congestion situations, continue to observe in the current manner, if similar situations caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the second-level speed reduction. When the port queue length reaches the severe warning threshold: If the outflow rate is not lower than 20% of the inflow rate, reduce the transmission rate at the rate of the second-level speed reduction; referring to the historical congestion situations within a certain period, if similar situations did not cause packet loss in the historical congestion situations, continue to process in the current manner, if similar situations caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the third-level speed reduction; If the outflow rate is lower than 20% of the inflow rate, reduce the transmission rate at the rate of the third-level speed reduction; referring to the historical congestion situations within a certain period, if similar situations did not cause packet loss in the historical congestion situations, continue to process in the current manner, if similar situations caused packet loss in the historical congestion situations, reduce the transmission rate at the rate of the fourth-level speed reduction; Among them: The first-level speed reduction reduces the transmission rate by 5% - 10%; The second-level speed reduction reduces the transmission rate by 20% - 30%; The third-level speed reduction reduces the transmission rate by 40% - 50%; The fourth-level speed reduction reduces the transmission rate by 60% - 70%; The first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction all adopt the minimum speed reduction amplitude at the beginning when reducing the transmission rate. If congestion still cannot be effectively alleviated, the first-level speed reduction, second-level speed reduction, third-level speed reduction, and fourth-level speed reduction all adopt the method of gradually increasing the speed reduction amplitude until the maximum allowed speed reduction amplitude; Perform congestion optimization: When the switch port queue length reaches the mild warning threshold, the system automatically enters the congestion optimization mode: First, set the discrimination threshold for data size. At the data sending end, when the data is about to enter the congestion queuing state, it is strictly checked. If the data size exceeds the set threshold, it is marked as large data and given a specific mark code "BD"; if the data size is below the threshold, it is marked as small data, and the mark code is "SD"; At this time, perform fragmentation operations on the data packets marked as large data. During the fragmentation of large data, N small data behind the large data in the port queue can "jump the queue" to the front of the large data and be preferentially transmitted. After these N small data are transmitted, the fragmented large data is then transmitted in turn; When performing fragmentation operations on the data packets marked as large data, set the size of a single fragmented data as X, and divide the large data into several fragments of size X. If the last part does not meet the size requirement of X, it is taken as a single fragmented data; The size X of a single fragmented data is adjustable, and the number N of small data "jumping the queue" is adjustable; Perform warning threshold adjustment: Within a unit time, the port queue length reaches the mild warning threshold M times, but the outflow rate is not lower than 95% of the inflow rate, and there is no packet loss. At this time, increase the mild warning threshold to L times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged; Within a unit time, the port queue length reaches the moderate warning threshold M times, but the outflow rate is not lower than 80% of the inflow rate, and there is no packet loss. At this time, increase the moderate warning threshold to L times the original moderate warning threshold, and the mild warning threshold and severe warning threshold remain unchanged; Within a unit time, the port queue length reaches the severe warning threshold M times, but the outflow rate is not lower than 45% of the inflow rate, and there is no packet loss. At this time, increase the severe warning threshold to L times the original severe warning threshold, and the mild warning threshold and moderate warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 90% of the inflow rate, but the port queue length still does not trigger the mild warning threshold. Reduce the mild warning threshold to K times the original mild warning threshold, and the moderate warning threshold and severe warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 50% of the inflow rate, but the port queue length still does not trigger the moderate warning threshold. Reduce the moderate warning threshold to K times the original moderate warning threshold, and the mild warning threshold and severe warning threshold remain unchanged; Within a unit time, the outflow rate is lower than 20% of the inflow rate, but the port queue length still does not trigger the severe warning threshold. Reduce the severe warning threshold to K times the original severe warning threshold, and the mild warning threshold and moderate warning threshold remain unchanged; Perform congestion prediction: The specific process of congestion prediction based on the Naive Bayes algorithm is as follows: Assume that the features in the historical congestion database are independent of each other, and the following variables are defined according to the condition of the Naive Bayes algorithm: C: Congestion status, where 1 and 0 are used to represent congestion occurrence and non-occurrence respectively; F1: Inflow rate feature, the amount of inflowing data per unit time; F2: Outflow rate feature, the amount of outflowing data per unit time; F3: Port queue length feature; N: The total number of historical congestion events; Next, perform data preprocessing: Calculate P(F1|C = 1) and P(F1|C = 0); Represent the probability distribution of the inflow rate in the case of congestion occurrence and non-occurrence; Similarly, calculate P(F2|C = 1) and P(F2|C = 0); Represent the probability distribution of the outflow rate in the case of congestion occurrence and non-occurrence; P(F3|C = 1) and P(F3|C = 0); Represent the probability distribution of the port queue length in the case of congestion occurrence and non-occurrence; Calculate the prior probability: Calculate the prior probability of congestion occurrence Calculate the prior probability of non-congestion occurrence P(C = 0) = 1 - P(C = 1); Predict the next congestion: Given a new set of eigenvalues Use the Naive Bayes formula to calculate the posterior probability of congestion occurring Similarly, calculate the posterior probability of no congestion occurring If Then it is predicted that congestion will occur under the new feature values; otherwise, it is predicted that congestion will not occur under the new feature values.

Citation Information

Patent Citations

  • A data transmission method, apparatus, device, and storage medium

    CN113411263B

Cited By

  • Traditional Chinese medicine remote diagnosis and treatment data transmission method and system

    CN120811984A

  • Congestion-aware load balancing method and related equipment

    CN121173746A

  • Data dynamic encryption method and system and computer program product

    CN122204566A