Loop detection method based on AI / ML
By setting up data collectors and AI/ML models at network nodes for loop detection, the problems of high latency and false alarm rate in traditional methods are solved, enabling real-time and accurate identification and autonomous resolution of network loops, thus improving the efficiency and stability of network fault handling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional loop detection methods suffer from high detection latency, high false alarm rate, poor adaptability to complex dynamic networks, difficulty in automatically locating loop causes and intelligently generating solutions, and lack of effective utilization of historical fault data, affecting the continuity and stability of network services.
An AI/ML-based loop detection method is adopted. Data collectors are set up at network nodes to collect network data in real time. After preprocessing, the data is input into the loop detection model for analysis. If a loop is detected, the cause is analyzed and a solution is generated. If the cause cannot be analyzed, a warning message is issued. The model performance is continuously optimized based on maintenance feedback data.
It enables real-time and accurate identification of network loops, analysis of fault causes, and generation of autonomous solutions, improving the efficiency and intelligence of network fault handling, shortening detection time, reducing false alarm rate and the need for manual intervention, and improving fault location accuracy and network stability.
Smart Images

Figure CN121664684A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network loop detection, specifically a loop detection method based on AI / ML. Background Technology
[0002] Network loops are a common type of fault in network communication. Their formation is mainly caused by physical connection errors (such as incorrect network cable connections or improper switch port loop configuration) and abnormal convergence of dynamic routing protocols during network topology changes (such as STP / RSTP protocol failure or configuration conflicts). Traditional loop detection methods often rely on static rule matching (such as MAC address drift detection or broadcast storm threshold judgment) or manual investigation, which suffers from high detection latency, high false alarm rates, and poor adaptability to complex dynamic networks. For example, when there are short-term traffic fluctuations or frequent topology adjustments in the network, static thresholds are prone to triggering false positives; while manual investigation requires maintenance personnel to check the link status and configuration information node by node, which often takes hours or even days in large networks, seriously affecting the continuity and stability of network services. Traditional methods struggle to automatically locate loop causes and intelligently generate solutions, resulting in low fault handling efficiency and a lack of effective utilization of historical fault data, failing to form a closed-loop fault handling and capability improvement mechanism. Summary of the Invention
[0003] This invention provides an AI / ML-based loop detection method to address the shortcomings of existing technologies.
[0004] This invention is achieved through the following technical solution: The AI / ML-based loop detection method includes the following steps: Step 1: Set up network data collectors at multiple network nodes to collect network data information of the corresponding nodes in real time; Step 2: Preprocess the collected network data; Step 3: Input the preprocessed data into the loop detection model, which then processes and analyzes the input data. Step 4: If the loop detection model detects a network loop, analyze the cause of the loop. If the cause of the loop can be analyzed, a solution can be developed and implemented, and the corresponding solution can be sent to the maintenance terminal. Step 5: If the cause of the out-of-loop circuit cannot be determined, a warning message will be sent to the maintenance terminal, indicating that relevant maintenance personnel need to perform maintenance. Step Six: After the relevant maintenance personnel complete the maintenance, they will feed back the fault information and solutions generated in the corresponding loop to the maintenance terminal. The maintenance terminal will use this feedback data to train the loop detection model and improve the accuracy of the loop detection model.
[0005] As described above, the loop detection method based on AI / ML, in step one, collects network node data information including node IP address, MAC address, port traffic data, packet forwarding path record, link layer protocol status information, and connection topology data between nodes, with the collection frequency set to once every 500 milliseconds.
[0006] As described above, the specific operations for preprocessing network data information in step two of the AI / ML-based loop detection method are as follows: noise reduction is performed on the original data to remove invalid values and duplicate data caused by network jitter or abnormal acquisition; time series alignment is used to unify asynchronous data from different nodes to the same time granularity.
[0007] The loop detection method based on AI / ML described above includes the following steps in the training process of the loop detection model in step three: Step 1: Collect network data information from five minutes before the occurrence of a network loop to the moment the network loop occurs under different network environments; Step 2: Divide the data obtained in Step 1 into a training set and a test set in a 3:1 ratio; Step 3: Construct a loop detection model and train it using the training set data. Optimize the loop detection model parameters using cross-validation. The learning rate during training is 0.05, and the number of iterations is 500. Step 4: After the loop detection model is trained in Step 3, use the data from the input test set to test the loop detection model. If the accuracy of the test result is ≥99%, the loop detection model training is complete. If the accuracy of the test result is <99%, return to Step 3 and train again until the accuracy of the test result is ≥99%.
[0008] As described above, the loop detection method based on AI / ML collects the following data in step 1: port traffic data, packet forwarding path records, link layer protocol status information, connection topology data between nodes, and the causes and solutions for corresponding network loop failures. During training, the input data includes port traffic data, packet forwarding path records, link layer protocol status information, and connection topology data between nodes, while the output data includes whether a network loop has occurred and the causes and solutions for network loop failures.
[0009] As described above, the loop detection method based on AI / ML involves training the loop detection model and then further validating it using a validation set. The ratio of normal network data to network data showing network loops in the validation set is 1:1. The normal network data in the validation set is randomly obtained from different network environments, while the network data showing network loops is obtained from network data outside the training and test sets. If the accuracy of the validation result is ≥99.5%, the loop detection model passes the validation. If the accuracy of the validation result is <99.5%, the loop detection model is trained using the data from the validation set with a learning rate of 0.05 and 100 iterations. Subsequently, unused normal network data and network data showing network loops are collected as a validation set for secondary validation. If the accuracy of the validation result is <99.5%, the above operation is repeated until the accuracy of the validation result is ≥99.5%.
[0010] As described above, in the AI / ML-based loop detection method, if the relevant fault problem is not resolved after the loop detection model generates a solution and executes it in step four, a warning message is immediately sent to the maintenance terminal.
[0011] As described above, in the AI / ML-based loop detection method, the loop detection model in step four analyzes the acquired data from different network nodes to determine the location of the network loop and transmits it to the maintenance terminal. The maintenance terminal then transmits the location of the network loop to the relevant inspection and maintenance personnel, who then perform maintenance on the corresponding location during subsequent inspections and maintenance.
[0012] As described above, in the AI / ML-based loop detection method, the warning information sent to the maintenance terminal in step five includes the timestamp of the fault occurrence, the IP addresses of the network nodes involved, the abnormal traffic characteristic values, and a preliminary loop risk level assessment.
[0013] As described above, in the AI / ML-based loop detection method, step six involves collecting and summarizing feedback information and its corresponding network information to form a feedback set. A new feedback set is constructed for every 100 sets of data collected, and the feedback set with 100 sets of data is used as the training set to train the loop detection model. The learning rate is 0.05, and the number of iterations is 300. Subsequent feedback sets are used to train the loop detection model in the same way.
[0014] The advantages of this invention are: by constructing an intelligent loop detection model, this invention achieves real-time and accurate identification of network loops, analysis of network loop fault causes, location of network loops, and generation of autonomous solutions. At the same time, it continuously optimizes model performance by combining maintenance feedback data, effectively overcoming the limitations of traditional methods in dynamic network environments, improving the efficiency and intelligence level of network fault handling, and providing more reliable technical support for ensuring stable network operation. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] like Figure 1 As shown, the AI / ML-based loop detection method includes the following steps: Step 1: Set up network data collectors at multiple network nodes to collect network data information of the corresponding nodes in real time; Step 2: Preprocess the collected network data; Step 3: Input the preprocessed data into the loop detection model, which then processes and analyzes the input data. Step 4: If the loop detection model detects a network loop, analyze the cause of the loop. If the cause of the loop can be analyzed, a solution can be developed and implemented, and the corresponding solution can be sent to the maintenance terminal. Step 5: If the cause of the out-of-loop circuit cannot be determined, a warning message will be sent to the maintenance terminal, indicating that relevant maintenance personnel need to perform maintenance. Step Six: After the relevant maintenance personnel complete the maintenance, they will feed back the fault information and solutions generated in the corresponding loop to the maintenance terminal. The maintenance terminal will use this feedback data to train the loop detection model and improve the accuracy of the loop detection model.
[0019] Specifically, the network node data information collected in step one of this embodiment includes the node's IP address, MAC address, port traffic data, packet forwarding path record, link layer protocol status information, and connection topology data between nodes. The collection frequency is set to once every 500 milliseconds to ensure the real-time nature and continuity of the data.
[0020] Specifically, the preprocessing of network data information in step two of this embodiment is as follows: noise reduction is performed on the original data to remove invalid values and duplicate data caused by network jitter or abnormal acquisition; time series alignment is used to unify asynchronous data from different nodes to the same time granularity.
[0021] More specifically, the training process of the loop detection model in step three of this embodiment includes the following steps: Step 1: Collect network data information from five minutes before the occurrence of a network loop to the moment the network loop occurs under different network environments; Step 2: Divide the data obtained in Step 1 into a training set and a test set in a 3:1 ratio; Step 3: Construct a loop detection model and train it using the training set data. Optimize the loop detection model parameters using cross-validation. The learning rate during training is 0.05, and the number of iterations is 500. Step 4: After the loop detection model is trained in Step 3, use the data from the input test set to test the loop detection model. If the accuracy of the test result is ≥99%, the loop detection model training is complete. If the accuracy of the test result is <99%, return to Step 3 and train again until the accuracy of the test result is ≥99%.
[0022] More specifically, in step 1 of this embodiment, the data collected includes port traffic data, packet forwarding path records, link layer protocol status information, connection topology data between nodes, and the causes and handling methods of corresponding network loop failures. During the training process, the data includes port traffic data, packet forwarding path records, link layer protocol status information, and connection topology data between nodes as input items, and whether a network loop occurs and the causes and handling methods of network loop failures as output items.
[0023] More specifically, after the loop detection model described in this embodiment is trained, it is further validated using a validation set. The ratio of normal network data to network data containing network loops in the validation set is 1:1. The normal network data in the validation set is randomly obtained from different network environments, while the network data containing network loops in the validation set is obtained from network data outside the training and test sets. If the accuracy of the validation result is ≥99.5%, the loop detection model passes the validation. If the accuracy of the validation result is <99.5%, the loop detection model is trained using the data in the validation set with a learning rate of 0.05 and 100 iterations. Subsequently, unused normal network data and network data containing network loops are collected as a validation set for secondary validation. If the accuracy of the validation result is <99.5%, the above operation is repeated until the accuracy of the validation result is ≥99.5%.
[0024] Furthermore, if the related fault problem is not resolved after the loop detection model provides a solution and executes it in step four of this embodiment, a warning message will be immediately sent to the maintenance terminal.
[0025] Furthermore, in step four of this embodiment, the loop detection model can determine the location of the network loop by analyzing the acquired data of different network nodes and transmit it to the maintenance terminal. The maintenance terminal then transmits the location of the network loop to the relevant inspection and maintenance personnel, who will then repair the corresponding location during subsequent inspection and maintenance.
[0026] Furthermore, in step five of this embodiment, the warning information sent to the maintenance terminal includes the timestamp of the fault occurrence, the IP addresses of the network nodes involved, the abnormal traffic characteristic values, and a preliminary assessment of the loop risk level.
[0027] Furthermore, in step six of this embodiment, the feedback information and its corresponding network information are collected and summarized to form a feedback set. A new feedback set is constructed for every 100 sets of data collected, and the feedback set with 100 sets of data is used as the training set to train the loop detection model. The learning rate is 0.05 and the number of iterations is 300. Subsequent feedback sets are used to train the loop detection model in the same way.
[0028] After six months of application, this invention, compared with traditional network loop fault detection methods, reduced the average network loop detection time by 72%, from 45 minutes to 12 minutes; the self-resolvement rate of loop faults increased to 68%, reducing the need for manual intervention by 53% compared to the traditional manual troubleshooting model; simultaneously, after continuous feedback data training, the accuracy of loop cause analysis gradually improved from the initial 91.2% to 98.6%, with a particularly significant improvement in recognition accuracy in complex multi-node intertwined loop scenarios, and the false alarm rate was controlled within 3%; the fault location accuracy after maintenance personnel arrive on-site reached 91% due to the location information provided by the model, and the availability parameter in the network stability index improved by 2.3 percentage points, effectively reducing economic losses caused by network faults.
[0029] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A loop detection method based on AI / ML, characterized in that: Includes the following steps: Step 1: Set up network data collectors at multiple network nodes to collect network data information of the corresponding nodes in real time; Step 2: Preprocess the collected network data; Step 3: Input the preprocessed data into the loop detection model, which then processes and analyzes the input data. Step 4: If the loop detection model detects a network loop, analyze the cause of the loop. If the cause of the loop can be analyzed, a solution can be developed and implemented, and the corresponding solution can be sent to the maintenance terminal. Step 5: If the cause of the out-of-loop circuit cannot be determined, a warning message will be sent to the maintenance terminal, indicating that relevant maintenance personnel need to perform maintenance. Step Six: After the relevant maintenance personnel complete the maintenance, they will feed back the fault information and solutions generated in the corresponding loop to the maintenance terminal. The maintenance terminal will use this feedback data to train the loop detection model and improve the accuracy of the loop detection model.
2. The loop detection method based on AI / ML according to claim 1, characterized in that: The network node data information collected in step one includes the node's IP address, MAC address, port traffic data, data packet forwarding path record, link layer protocol status information, and connection topology data between nodes. The collection frequency is set to once every 500 milliseconds.
3. The loop detection method based on AI / ML according to claim 1, characterized in that: The specific operations for preprocessing network data information in step two are as follows: noise reduction is performed on the original data to remove invalid values and duplicate data caused by network jitter or abnormal acquisition; time series alignment is used to unify asynchronous data from different nodes to the same time granularity.
4. The loop detection method based on AI / ML according to claim 1, characterized in that: The training process of the loop detection model in step three includes the following steps: Step 1: Collect network data information from five minutes before the occurrence of a network loop to the moment the network loop occurs under different network environments; Step 2: Divide the data obtained in Step 1 into a training set and a test set in a 3:1 ratio; Step 3: Construct a loop detection model and train it using the training set data. Optimize the loop detection model parameters using cross-validation. The learning rate during training is 0.05, and the number of iterations is 500. Step 4: After the loop detection model is trained in Step 3, use the data from the input test set to test the loop detection model. If the accuracy of the test result is ≥99%, the loop detection model training is complete. If the accuracy of the test result is <99%, return to Step 3 and train again until the accuracy of the test result is ≥99%.
5. The loop detection method based on AI / ML according to claim 4, characterized in that: The data collected in step 1 includes port traffic data, packet forwarding path records, link layer protocol status information, connection topology data between nodes, and the causes and solutions for corresponding network loop failures. During training, the data used as input items are port traffic data, packet forwarding path records, link layer protocol status information, and connection topology data between nodes, while the output items are whether a network loop occurs and the causes and solutions for network loop failures.
6. The loop detection method based on AI / ML according to claim 4, characterized in that: After the loop detection model is trained, it is further validated using a validation set. The ratio of normal network data to network data showing network loops in the validation set is 1:
1. The normal network data in the validation set is randomly obtained from different network environments, while the network data showing network loops in the validation set is obtained from network data outside the training and test sets. If the accuracy of the validation result is ≥99.5%, the loop detection model passes the validation. If the accuracy of the validation result is <99.5%, the loop detection model is trained using the data from the validation set with a learning rate of 0.05 and 100 iterations. Subsequently, unused normal network data and network data showing network loops are collected as a validation set for secondary validation. If the accuracy of the validation result is <99.5%, the above operation is repeated until the accuracy of the validation result is ≥99.5%.
7. The loop detection method based on AI / ML according to claim 1, characterized in that: If the loop detection model in step four fails to resolve the related fault after providing a solution and executing it, a warning message will be immediately sent to the maintenance terminal.
8. The loop detection method based on AI / ML according to claim 1, characterized in that: In step four, the loop detection model analyzes the data acquired from different network nodes to determine the location of the network loop and transmits it to the maintenance terminal. The maintenance terminal then transmits the location of the network loop to the relevant inspection and maintenance personnel, who then perform maintenance on the corresponding location during subsequent inspections and maintenance.
9. The loop detection method based on AI / ML according to claim 1, characterized in that: The warning information sent to the maintenance terminal in step five includes the timestamp of the fault occurrence, the IP addresses of the network nodes involved, the abnormal traffic characteristics, and a preliminary assessment of the loop risk level.
10. The loop detection method based on AI / ML according to claim 1, characterized in that: In step six, the feedback information and its corresponding network information are collected and summarized to form a feedback set. A new feedback set is constructed for every 100 sets of data collected. The feedback set with 100 sets of data is used as the training set to train the loop detection model. The learning rate is 0.05 and the number of iterations is 300. Subsequent feedback sets are used to train the loop detection model in the same way.