Network equipment control method and system, electronic equipment and storage medium

By obtaining traffic data from target network devices, analyzing abnormal situations and scanning the metadata of the counterpart devices, the rapid identification and control of the source of network traffic abnormalities is achieved, and the problem of SNMP identifying and locating traffic abnormalities in complex network environments is solved, and the problem of SNMP identifying and locating traffic abnormalities in complex network environments is improved. The efficiency and security of network management.

CN118972225APending Publication Date: 2024-11-15VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411034185.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing SNMP protocol is difficult to quickly and accurately identify and locate the source of traffic abnormalities in the network when facing complex network environments.

Method used

By obtaining traffic data from the target network device, analyzing and determining abnormal traffic alarm information, and scanning the peer network device to obtain device metadata based on this information to control it, including measures such as limiting bandwidth or disconnection.

Benefits of technology

It improves the accuracy of traffic anomaly detection and positioning, enhances the intelligence of network equipment management, optimizes resource allocation and network planning, and improves the stability and security of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972225A_ABST
    Figure CN118972225A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a network equipment control method and system, applied to a server, and the method comprises the following steps: obtaining traffic data from target network equipment; analyzing the traffic data to determine abnormal traffic alarm information, wherein the abnormal traffic alarm information is used for indicating an abnormal traffic condition in a network accessed by the target network equipment; scanning opposite-end network equipment of the target network equipment according to the abnormal traffic alarm information to obtain equipment metadata, wherein the equipment metadata is used for describing detailed information of the opposite-end network equipment; and controlling the opposite terminal network equipment according to the abnormal traffic alarm information and the equipment metadata. According to the embodiment of the invention, the accuracy of traffic anomaly detection and positioning is remarkably improved, the intelligence of network equipment management is enhanced, resource allocation and network planning are optimized, the efficiency of network management is improved, and the security of the network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a control method for network equipment, a control system for network equipment, an electronic device, and a computer-readable storage medium. Background Art

[0002] Simple Network Management Protocol (SNMP) is a standard network management protocol widely used in modern network management. It is used to manage and monitor network devices such as servers, workstations, routers, switches, printers, etc.

[0003] SNMP enables network administrators to collect various key indicators of network devices in real time, such as traffic data of switch ports, including bit rate (bits per second) and packet rate (packets per second). This data is essential for evaluating network health, identifying potential bottlenecks, and planning resource allocation. In addition, SNMP allows remote configuration of network device parameters to ensure the adaptability and stability of the network in a dynamic environment.

[0004] However, SNMP still has some limitations. For example, in the face of increasingly complex network environments, SNMP cannot quickly and accurately identify and locate the source of traffic anomalies in the network. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a control method of a network device, a control system of a network device, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a control method for a network device, which is applied to a server, and the method includes: obtaining traffic data from a target network device; analyzing the traffic data to determine abnormal traffic alarm information, wherein the abnormal traffic alarm information is used to indicate abnormal traffic conditions in the network to which the target network device is connected; scanning the opposite network device of the target network device according to the abnormal traffic alarm information to obtain device metadata, wherein the device metadata is used to describe detailed information of the opposite network device; and controlling the opposite network device according to the abnormal traffic alarm information and the device metadata.

[0007] Optionally, the acquiring the flow data from the target network device includes: acquiring the flow data from the target network device periodically or in real time through a flow collector.

[0008] Optionally, the analyzing the traffic data to determine abnormal traffic alarm information includes: storing the traffic data in a monitoring and alarm system; using the monitoring and alarm system to analyze the traffic data to determine the abnormal traffic alarm information; and pushing the abnormal traffic alarm information to a target network device management service through an alarm component of the monitoring and alarm system.

[0009] Optionally, pushing the abnormal traffic alarm information to a target network device management service through an alarm component of the monitoring and alarm system includes: pushing the abnormal traffic alarm information to a push application programming interface of the target network device management service through the alarm component.

[0010] Optionally, scanning the opposite network device of the target network device according to the abnormal traffic alarm information to obtain device metadata includes: based on a simple network management protocol and the abnormal traffic alarm information, scanning a network topology map where the opposite network device is located to obtain the device metadata.

[0011] Optionally, the controlling the peer network device according to the abnormal traffic alarm information and the device metadata includes: determining the control strategy and / or operation content of the peer network device according to the abnormal traffic alarm information and the device metadata; and sending management and control instructions to the peer network device in accordance with the simple network management protocol, so that the peer network device executes the control strategy and / or the operation content according to the management and control instructions.

[0012] Optionally, after acquiring the traffic data from the target network device, the method further includes: generating and updating the network topology map according to the traffic data.

[0013] An embodiment of the present invention also discloses a control system for network equipment, which is applied to a server, and the system includes: a traffic data acquisition module, which is used to acquire traffic data from a target network equipment; a traffic data analysis module, which is used to analyze the traffic data to determine abnormal traffic alarm information, wherein the abnormal traffic alarm information is used to indicate abnormal traffic conditions in a network to which the target network equipment is connected; a metadata scanning module, which is used to scan the opposite network equipment of the target network equipment according to the abnormal traffic alarm information to obtain device metadata, wherein the device metadata is used to describe detailed information of the opposite network equipment; and a network equipment control module, which is used to control the opposite network equipment according to the abnormal traffic alarm information and the device metadata.

[0014] Optionally, the flow data acquisition module is used to obtain the flow data from the target network device periodically or in real time through a flow collector.

[0015] Optionally, the traffic data analysis module includes: a traffic data storage module, used to store the traffic data in a monitoring and alarm system; an alarm information determination module, used to use the monitoring and alarm system to analyze the traffic data and determine the abnormal traffic alarm information; and an alarm information push module, used to push the abnormal traffic alarm information to the target network device management service through the alarm component of the monitoring and alarm system.

[0016] Optionally, the alarm information push module is used to push the abnormal traffic alarm information to the push application programming interface of the target network device management service through the alarm component.

[0017] Optionally, the metadata scanning module is used to scan the network topology map where the opposite network device is located to obtain the device metadata based on a simple network management protocol and the abnormal traffic alarm information.

[0018] Optionally, the network device control module includes: a policy content determination module, used to determine the control policy and / or operation content of the peer network device based on the abnormal traffic alarm information and the device metadata; a management and control instruction sending module, used to send management and control instructions to the peer network device in accordance with the simple network management protocol, so that the peer network device executes the control policy and / or the operation content according to the management and control instructions.

[0019] Optionally, the system further comprises: a topology map generation and updating module, configured to generate and update the network topology map according to the traffic data after the traffic data acquisition module acquires the traffic data from the target network device.

[0020] An embodiment of the present invention further discloses an electronic device, comprising: one or more processors; and one or more machine-readable media storing instructions thereon, which, when executed by the one or more processors, enables the electronic device to execute the control method of the network device as described above.

[0021] The embodiment of the present invention further discloses a computer-readable storage medium, wherein a computer program stored in the storage medium enables a processor to execute the control method of the network device as described above.

[0022] The embodiments of the present invention include the following advantages:

[0023] The control scheme of the network device provided by the embodiment of the present invention is applied to a server, which obtains flow data from a target network device, and then analyzes the flow data to determine abnormal flow alarm information, and the abnormal flow alarm information is used to indicate the abnormal flow situation in the network accessed by the target network device. Next, the peer network device of the target network device is scanned according to the abnormal flow alarm information to obtain device metadata, and the device metadata is used to describe the detailed information of the peer network device. Then, the peer network device is controlled according to the abnormal flow alarm information and the device metadata.

[0024] The embodiment of the present invention generates abnormal traffic alarm information by analyzing traffic data, and can detect traffic anomalies faster and more accurately. In addition, by further scanning the opposite network device of the target network device, the source of abnormal traffic can be more accurately located, thereby improving the accuracy of traffic anomaly detection and positioning. Not only is it limited to passive data collection and monitoring, but it can also actively control network devices. According to the abnormal traffic alarm information and device metadata, the source device of the abnormal traffic can be controlled, such as limiting its bandwidth, disconnecting or taking other control measures. This intelligent management method can more effectively deal with abnormal situations in the network and ensure the stability and security of the network. Through more accurate traffic anomaly detection and positioning, network administrators can better understand the actual use and potential problems of the network. This information is crucial for resource allocation and network planning. Administrators can adjust the allocation of network resources, optimize network performance, and plan in advance to deal with possible network bottlenecks or failures based on abnormal traffic alarm information and device metadata. Through automated traffic data analysis and abnormal traffic alarm generation, the workload of manual monitoring and analysis by network administrators is greatly reduced. At the same time, automated peer device scanning and control measures also simplify the process of network device management, making network management more efficient. By timely detecting and controlling the source of abnormal traffic, network attacks and other security threats can be more effectively prevented. For example, when abnormal traffic is detected, potential attack sources can be quickly located and controlled to prevent them from causing greater damage to the network. This active defense mechanism significantly improves network security.

[0025] In summary, the embodiments of the present invention significantly improve the accuracy of traffic anomaly detection and positioning, enhance the intelligence of network equipment management, optimize resource allocation and network planning, improve the efficiency of network management, and improve network security. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flowchart of a method for controlling a network device according to an embodiment of the present invention;

[0027] Figure 2It is a schematic diagram of the principle of a solution for processing abnormal traffic of a switch according to an embodiment of the present invention;

[0028] Figure 3 It is a structural block diagram of a control system of a network device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] The network device control scheme proposed in the embodiment of the present invention obtains flow data from the target network device and generates abnormal flow alarm information by analyzing the flow data, which significantly improves the accuracy of flow anomaly detection and positioning. Based on the abnormal flow alarm information, the peer network device of the target network device is further scanned to obtain device metadata, so as to more accurately identify the source of abnormal flow. Finally, based on the abnormal flow alarm information and device metadata, control measures can be implemented on the peer network device, such as limiting bandwidth or disconnecting.

[0031] Reference Figure 1 , shows a flowchart of a method for controlling a network device according to an embodiment of the present invention. The method for controlling a network device can be applied to a server, and the method for controlling a network device can specifically include the following steps:

[0032] Step 101, obtaining flow data from a target network device.

[0033] In the embodiment of the present invention, the traffic data includes various key indicators, such as bit rate (Bits Per Second, BPS for short) and packet rate (Packets Per Second, PPS for short), and these traffic data reflect the traffic conditions of the target network device in different time periods.

[0034] In actual application, the network administrator first needs to determine the target network device to be monitored. The target network device can be a switch, router, server, etc. The target network device is usually a key node in the network, and its traffic status directly affects the performance and stability of the entire network. The target network device usually supports SNMP for monitoring and managing the device. The administrator needs to configure the SNMP agent (Agent) on the target network device and set the relevant Management Information Base (MIB) entries so that the traffic data can be collected remotely. Send a request to the target network device through the SNMP management station (Manager) to obtain the required traffic data. These requests can be queries for the object identifier (OID) specified in the MIB, such as the number of input / output bytes and packets of the interface. The SNMP agent of the target network device responds to the request and returns the corresponding traffic data. After receiving the traffic data, the management station stores it in the local database for subsequent analysis.

[0035] For example: Suppose a network administrator needs to monitor the port traffic of a switch. The administrator first configures the SNMP agent on the switch and ensures that the MIB contains the OIDs related to the interface traffic. For example, ifInOctets and ifOutOctets represent the number of input bytes and output bytes of the interface, respectively. Next, the administrator uses the SNMP management tool to send a request to the switch to query these OIDs. The switch responds to the request and returns the number of input and output bytes of the corresponding port. The administrator stores this data in the database and records it in time series to form a complete traffic data chain.

[0036] Step 102: Analyze the traffic data to determine abnormal traffic alarm information.

[0037] In the embodiments of the present invention, traffic data analysis is a key step in detecting potential problems in the network. Abnormal traffic can be discovered through analysis, helping network administrators to take timely measures to ensure the normal operation of the network.

[0038] In actual application, the traffic data obtained from the target network device is preprocessed. Preprocessing includes data cleaning (removing invalid or erroneous data), data format conversion, and time alignment. Ensure the integrity and consistency of the data to lay the foundation for subsequent analysis. Use historical traffic data to establish a baseline model of normal traffic patterns. The baseline model reflects the traffic characteristics of the network under normal conditions, including average traffic, traffic peak, fluctuation range, etc. This can be achieved through statistical analysis, machine learning, and other methods. Compare the acquired traffic data with the baseline model to identify abnormal traffic patterns. Abnormal traffic patterns include sudden increases in traffic, sudden decreases in traffic, and abnormal traffic fluctuations. These abnormal patterns may be caused by network attacks, equipment failures, or configuration errors. Various anomaly detection algorithms are applied to identify abnormal traffic. For example, the threshold-based method can set upper and lower limits for traffic, and exceeding the range is considered abnormal; the machine learning-based method can automatically detect anomalies by training models; and the time series analysis-based method can detect sudden changes in traffic. Once abnormal traffic is detected, abnormal traffic alarm information will be generated. Abnormal traffic alarm information is used to indicate abnormal traffic conditions in the network to which the target network device is connected. Abnormal traffic alarm information includes abnormal type, occurrence time, involved equipment and traffic details, etc. This information will help administrators quickly understand abnormal situations and take corresponding measures.

[0039] For example: Suppose a network administrator monitors the traffic data of a switch port and inputs the data into the anomaly detection system after preprocessing. Based on historical data, the system establishes a normal traffic baseline model for the port and finds that the traffic normally fluctuates between 100 megabits per second (Mbps) and 500Mbps. One day, the system detects that the traffic on the port suddenly increases to 800Mbps, which is beyond the normal range. The system applies the threshold detection algorithm to identify this anomaly and generates an alarm message: On a certain day and at a certain time, the traffic on the switch port is abnormal, and the current traffic is 800Mbps, which exceeds the normal upper limit of 500Mbps. After receiving the alarm, the administrator quickly checks whether the port is under attack or has a fault.

[0040] Step 103: Scan the peer network device of the target network device according to the abnormal traffic alarm information to obtain device metadata.

[0041] In an embodiment of the present invention, the abnormal traffic alarm information generated in the previous step is parsed to determine the target network device and the corresponding abnormal port to be scanned. This step ensures the accuracy and pertinence of the scan. Based on the abnormal port involved in the alarm information, the opposite network device connected to it is determined. The opposite network device connected to the port can be identified by the physical address (Media Access Control address, MAC) table of the switch or the address resolution protocol (ARP) table of the router. An SNMP request is sent to the target network device to obtain the device metadata of the opposite network device connected to the abnormal port. The device metadata is used to describe the detailed information of the opposite network device. These device metadata include the IP address, MAC address, device model, firmware version, interface status, etc. of the opposite network device. After receiving the device metadata of the opposite network device, the device metadata is collected and stored. These device metadata will be used for subsequent analysis and control. The collected device metadata is analyzed to understand the details of the opposite network device. For example, through the IP address of the opposite network device, its location in the network can be further tracked; through the device model and firmware version, its performance and security can be evaluated.

[0042] For example: Assume that in the previous step, the network administrator detected abnormal traffic on a switch port and the system generated relevant alarm information. After parsing the alarm information, the administrator determined that a server was connected to the port. Next, the administrator used SNMP to request the MAC address table of the switch and found the MAC address of the opposite server connected to the abnormal port. Then, the IP address corresponding to the MAC address was queried through the ARP table. Further, the administrator sent an SNMP request to the IP address to obtain detailed metadata of the server, including the server model, firmware version, operating system version, and current interface status. After collecting this information, the system stored and analyzed it and found that the server had recently undergone a firmware upgrade, which may have caused abnormal traffic.

[0043] Step 104: Control the peer network device according to the abnormal traffic alarm information and the device metadata.

[0044] In an embodiment of the present invention, the possible causes of abnormal traffic are deeply analyzed based on abnormal traffic alarm information and device metadata. The root cause of the abnormality is determined by considering factors such as the status of the peer network device, recent configuration changes, and firmware version. Based on the analysis results, a specific control strategy is formulated. The control strategy includes limiting bandwidth, blocking ports, adjusting device configuration, or directly disconnecting the connection. The selection of these strategies should be determined based on the specific situation and the severity of the abnormal traffic. The formulated control strategy is executed through network management tools or by directly configuring the device. For example, you can request to modify the device configuration parameters, limit bandwidth, or close abnormal ports; you can also manually execute configuration commands by remotely logging into the device. After executing the control measures, continue to monitor the traffic situation of the peer network device to verify the effectiveness of the control measures. Ensure that the abnormal traffic is alleviated or eliminated and the network resumes normal operation. If the problem is not solved, the control strategy needs to be further adjusted until the problem is solved.

[0045] For example: Assume that in the previous step, the administrator discovered that a server had abnormal traffic due to a firmware upgrade. After detailed analysis, it was decided to mitigate the abnormal traffic by limiting the bandwidth of the server. The administrator formulated a control policy and requested to modify the bandwidth limit parameters of the switch port to limit the bandwidth of the port to 100Mbps. After executing the control measures, the administrator continued to monitor the traffic of the port and found that the traffic had returned to normal and the abnormal situation had been resolved. If the abnormal traffic is still not eliminated, the administrator may need to further check the server configuration or take other control measures, such as blocking the port or disconnecting.

[0046] The control scheme of the network device provided by the embodiment of the present invention is applied to a server, which obtains flow data from a target network device, and then analyzes the flow data to determine abnormal flow alarm information. The abnormal flow alarm information is used to indicate the abnormal flow situation in the network to which the target network device is connected. Next, the peer network device of the target network device is scanned according to the abnormal flow alarm information to obtain device metadata. The device metadata is used to describe the detailed information of the peer network device. Then, the peer network device is controlled according to the abnormal flow alarm information and the device metadata.

[0047] The embodiment of the present invention generates abnormal traffic alarm information by analyzing traffic data, and can detect traffic anomalies faster and more accurately. In addition, by further scanning the opposite network device of the target network device, the source of abnormal traffic can be more accurately located, thereby improving the accuracy of traffic anomaly detection and positioning. Not only is it limited to passive data collection and monitoring, but it can also actively control network devices. According to the abnormal traffic alarm information and device metadata, the source device of the abnormal traffic can be controlled, such as limiting its bandwidth, disconnecting or taking other control measures. This intelligent management method can more effectively deal with abnormal situations in the network and ensure the stability and security of the network. Through more accurate traffic anomaly detection and positioning, network administrators can better understand the actual use and potential problems of the network. This information is crucial for resource allocation and network planning. Administrators can adjust the allocation of network resources, optimize network performance, and plan in advance to deal with possible network bottlenecks or failures based on abnormal traffic alarm information and device metadata. Through automated traffic data analysis and abnormal traffic alarm generation, the workload of manual monitoring and analysis by network administrators is greatly reduced. At the same time, automated peer device scanning and control measures also simplify the process of network device management, making network management more efficient. By timely detecting and controlling the source of abnormal traffic, network attacks and other security threats can be more effectively prevented. For example, when abnormal traffic is detected, potential attack sources can be quickly located and controlled to prevent them from causing greater damage to the network. This active defense mechanism significantly improves network security.

[0048] In summary, the embodiments of the present invention significantly improve the accuracy of traffic anomaly detection and positioning, enhance the intelligence of network equipment management, optimize resource allocation and network planning, improve the efficiency of network management, and improve network security.

[0049] In an exemplary embodiment of the present invention, one implementation method of obtaining flow data from a target network device is to obtain flow data from the target network device periodically or in real time through a flow collector. In actual application, a flow collector is deployed in the network. The flow collector can be an independent hardware device or a software installed on a server or workstation. Its main function is to capture and record flow data passing through the network device. Set the parameters of the flow collector so that it can communicate with the target network device. This includes configuring the IP address, interface information, and SNMP settings of the target network device. Set the collection frequency of the flow collector according to network requirements and traffic characteristics. The collection frequency can be periodic (such as every minute, every five minutes) or real-time (every second) collection. Real-time collection can provide more detailed flow data, which helps to quickly identify and respond to abnormal situations. The flow collector starts working and obtains flow data from the target network device periodically or in real time. These flow data include key indicators such as bit rate (Bits Per Second, referred to as BPS) and packet rate (Packets Per Second, referred to as PPS). The collected flow data is stored in a local database or a remote server for subsequent analysis. Preprocess and analyze the collected traffic data. Preprocessing includes steps such as data cleaning, format conversion, and time alignment. Analysis can use statistical methods, machine learning algorithms, or other analytical tools to identify abnormal traffic patterns and potential network problems.

[0050] For example, suppose a large enterprise deploys a traffic collector to monitor the network traffic in its data center. The administrator installs the traffic collector on a dedicated server and configures it to communicate with the core switch. Through SNMP settings, the traffic collector can periodically obtain traffic data from each port of the switch. In order to better monitor network traffic, the administrator sets the collection frequency to once every minute. This means that every minute the traffic collector sends a request to the switch to obtain the bit rate and packet rate data of each port. This data is stored in the enterprise's data warehouse for subsequent analysis.

[0051] The embodiment of the present invention accurately captures and records the flow data of the target network device through a flow collector. The regular or real-time collection method ensures the timeliness and accuracy of the data, which helps to fully understand the network status. Real-time flow data collection can quickly identify and respond to abnormal situations in the network. For example, problems such as sudden increase in flow and sudden decrease in flow can be discovered and handled in the first time, reducing the impact on the business. By analyzing the collected flow data, bottlenecks and potential problems in the network can be identified, so that measures can be taken to optimize network configuration and resource allocation. For example, measures such as adjusting server backup plans and optimizing flow routing can significantly improve network performance. The flow collector can detect abnormal flow patterns, which is crucial for preventing network attacks and other security threats. Automated flow data collection and analysis reduces the workload of administrators for manual monitoring and analysis, and improves work efficiency. Administrators can devote more time and energy to network planning and optimization. By regularly collecting flow data, a comprehensive historical data record can be established. These records are not only helpful for long-term trend analysis, but also can serve as a reference for future network expansion and upgrades.

[0052] In an exemplary embodiment of the present invention, an implementation method of analyzing traffic data to determine abnormal traffic alarm information is to store the traffic data in a monitoring and alarm system; use the monitoring and alarm system to analyze the traffic data to determine abnormal traffic alarm information; and push the abnormal traffic alarm information to the target network device management service through the alarm component of the monitoring and alarm system. In the actual application process, the traffic data obtained from the target network device is stored in the monitoring and alarm system. The monitoring and alarm system can be an independent hardware device or a software deployed on a server. Its main function is to record and store network traffic data to provide a basis for subsequent analysis. The monitoring and alarm system performs real-time or periodic analysis on the stored traffic data. The analysis method includes statistical analysis, machine learning algorithms, rule engines, etc., which are used to identify abnormal patterns and potential problems in traffic. For example, by setting traffic thresholds, detecting traffic mutations, identifying abnormal traffic patterns, etc., the system can detect abnormal situations in traffic. When the monitoring and alarm system detects abnormal traffic, abnormal traffic alarm information is generated. The alarm information includes a detailed description of the abnormal traffic, the time when the abnormality occurs, the affected devices and ports, etc. This information provides network administrators with detailed fault diagnosis clues, which facilitates rapid location and handling of problems. The monitoring and alarm system pushes abnormal traffic alarm information to the target network device management service through its alarm component. The alarm component can notify the administrator in a variety of ways (such as email, SMS, instant messaging, etc.) to ensure timely response and processing of alarm information.

[0053] For example, suppose a medium-sized enterprise deploys a monitoring and alarm system to manage its internal network traffic. The administrator regularly stores the traffic data obtained by the traffic collector in the monitoring and alarm system. The system analyzes this data in real time to detect abnormalities in the network. The system detects that the network traffic of a server suddenly increases significantly. Through statistical analysis and rule engines, the system identifies that this is an abnormal traffic and generates detailed abnormal traffic alarm information. The alarm information includes the start time, duration, bit rate and packet rate of the abnormal traffic, and the related servers and ports. The alarm component of the monitoring and alarm system pushes this abnormal traffic alarm information to the network administrator via email.

[0054] The monitoring and alarm system in the embodiment of the present invention can analyze the stored traffic data in real time and promptly discover abnormal situations in the network. This helps network administrators to respond and handle problems quickly and reduce the impact on the business. The system can generate detailed abnormal traffic alarm information, including the description of the abnormal traffic, time, and affected devices. This provides administrators with accurate fault diagnosis clues, which facilitates rapid location and resolution of problems. The alarm component of the monitoring and alarm system can push alarm information in a variety of ways, such as e-mail, text messages, instant messages, etc., to ensure that administrators can receive alarm information in a timely manner and take prompt action. Through automated monitoring and alarming, the workload of manual monitoring and analysis is reduced, and the efficiency of network management is improved. Administrators can devote more time and energy to network optimization and planning, reducing management costs.

[0055] In an exemplary embodiment of the present invention, an implementation method of pushing abnormal traffic alarm information to a target network device management service through an alarm component of a monitoring and alarm system is to push abnormal traffic alarm information to a push application programming interface (Application Programming Interface, API) of a target network device management service through an alarm component. In actual application, the traffic data is analyzed by the aforementioned monitoring and alarm system, and after the system detects abnormal traffic, detailed abnormal traffic alarm information is generated. The alarm information includes a description of the abnormal traffic, the time of occurrence, the affected device and port, etc. In the monitoring and alarm system, the alarm component is configured so that it can communicate with the push API of the target network device management service. This includes setting the address of the API, the authentication method, and the format and content of the pushed data. According to the requirements of the target network device management service, the alarm information is formatted to ensure that the pushed data complies with the API specification. This may involve converting the data into JavaScript Object Notation (JSON) or eXtensible Markup Language (XML) format. Through the alarm component, the formatted abnormal traffic alarm information is pushed to the API of the target network device management service. After receiving the alarm information, the target network device management service confirms and processes it. The system can record the alarm information, notify the relevant administrators, and take corresponding control measures according to the alarm content.

[0056] For example: Suppose a large enterprise deploys a monitoring and alarm system to manage network traffic in its data center. The system is configured with an alarm component to push abnormal traffic alarm information to the API of the target network device management service. The administrator configures the address and authentication method of the API in the system and sets the format conversion rules for the alarm information. The system detects that the traffic on a certain switch port suddenly surges and exceeds the preset threshold. The system generates a detailed abnormal traffic alarm information, describing the characteristics of the abnormal traffic, the time of occurrence, and the affected device ports. The alarm component converts this alarm information into JSON format and pushes it to the API of the target network device management service.

[0057] In the embodiment of the present invention, through the alarm component and API, the alarm information can be transmitted to the target network device management service in real time, ensuring that the network administrator can quickly receive abnormal traffic alarms and take timely measures to respond. The use of API for information push reduces the steps of manual intervention and realizes the automation of alarm information transmission and processing. The use of alarm components and APIs ensures the accurate transmission of information, and the alarm information will not be lost or tampered with during the transmission process, ensuring the integrity and reliability of the data. By configuring the alarm component and API, the push method and content format of the alarm information can be flexibly set according to the needs to adapt to different management services and business needs.

[0058] In an exemplary embodiment of the present invention, an implementation method of scanning the opposite network device of the target network device according to the abnormal traffic alarm information to obtain the device metadata is to scan the network topology map where the opposite network device is located to obtain the device metadata based on the simple network management protocol and the abnormal traffic alarm information. In the actual application process, the abnormal traffic alarm information is generated by the monitoring and alarm system. The information usually includes the description of the abnormal traffic, the time of occurrence, the affected device and port, etc. These data provide a basis for further network analysis. According to the abnormal traffic alarm information, the network topology map is accessed. The network topology map is a visual representation of the network structure, which shows the connection relationship between each network device. The network topology map is usually provided by a network management system or a network design document, which can help understand the physical and logical connections between network devices. Based on the network topology map and SNMP, the opposite network device mentioned in the abnormal traffic alarm information is scanned. The opposite network device is scanned using SNMP to obtain the device metadata. The obtained device metadata is combined with the abnormal traffic alarm information for comprehensive analysis. By analyzing the status and connection status of the opposite network device, it can be determined whether the abnormal traffic is related to device failure, configuration problems or network attacks, so as to formulate corresponding solutions.

[0059] For example, suppose an enterprise's network management system generates an abnormal traffic alarm, indicating that the traffic on a switch port has suddenly increased. The administrator checks the network topology through the system and finds that the switch port is connected to another router. To further analyze the source of the abnormal traffic, the administrator decides to scan the router to obtain device metadata. A request is sent to the router through SNMP to obtain the device metadata. The returned information includes the router's model, IP address, operating status, interface list, and other devices connected to it. The administrator finds that a portion of the router's interfaces are processing a large amount of traffic, which is consistent with the abnormal traffic in the alarm information. Further analysis shows that an interface on this router is directly connected to a server within the company, and the server has recently started a large number of data backup tasks, resulting in a sharp increase in traffic. With this information, the administrator can confirm the root cause of the abnormal traffic and take measures to optimize the server's backup tasks and reduce the pressure on the network.

[0060] By scanning peer network devices and obtaining device metadata, the embodiments of the present invention can gain an in-depth understanding of the status and configuration of each device in the network. This helps to identify the source of abnormal traffic and its possible scope of impact. Combining abnormal traffic alarm information and device metadata, the fault point can be accurately located. For example, by identifying the peer device and connection status, it can be determined whether the abnormal traffic is caused by device failure, configuration problems, or network attacks. Obtaining device metadata is helpful for network optimization and resource allocation. For example, understanding the operating status of the device and the usage of the interface can optimize the network topology and load balancing and improve network performance. Through SNMP and network topology diagrams, key information can be quickly obtained, shortening fault diagnosis and processing time. This method reduces manual investigation and guesswork and improves the efficiency of network management.

[0061] In an exemplary embodiment of the present invention, an implementation method of controlling a peer network device according to abnormal traffic alarm information and device metadata is to determine the control strategy and / or operation content of the peer network device according to the abnormal traffic alarm information and device metadata; send a control instruction to the peer network device according to the simple network management protocol, so that the peer network device executes the control strategy and / or operation content according to the control instruction. In the actual application process, the abnormal traffic alarm information obtained by the monitoring system and the device metadata obtained from the peer network device are comprehensively analyzed. This process helps to clarify the specific situation of the network abnormality and the status of the relevant equipment. Based on the above analysis, determine the appropriate control strategy and / or operation content. For example, if the traffic abnormality of a certain device is caused by a configuration error, a strategy for correcting the configuration can be formulated; if a potential security threat is found, a strategy for isolating or blocking suspicious traffic can be formulated. According to the determined control strategy, specific control instructions are generated through SNMP. These instructions may include operations such as modifying device configuration, restarting device interface, and adjusting traffic priority. The generated control instructions are sent to the peer network device through SNMP. SNMP allows remote management and configuration of network devices, so that administrators can implement control measures without interrupting network operation. After receiving the control command, the peer network device will perform the corresponding control operation according to the command content. The device status and network traffic will be adjusted according to the control strategy to restore normal operation or further prevent potential threats.

[0062] For example, suppose that a company's network monitoring system detects a sudden surge in traffic on a switch and generates an abnormal traffic alarm. Through SNMP scanning, it is found that a port on another router connected to the switch also has abnormal traffic. After analyzing the alarm information and device metadata, it is found that the abnormal traffic comes from an internal server that is performing a large amount of unauthorized data transmission. Based on this analysis, it is decided to implement a traffic restriction policy on the router to prevent the abnormal traffic from spreading further, and at the same time plan to check and correct the server configuration. Generate instructions through SNMP to instruct the router to limit the bandwidth of the relevant ports, give priority to normal business traffic, and reduce the impact of abnormal traffic. These instructions are sent to the router through SNMP and executed immediately after the router receives them. The port bandwidth is restricted and the abnormal traffic is effectively controlled.

[0063] By analyzing alarm information and device metadata, the embodiments of the present invention can quickly determine the root cause of the problem and formulate targeted control strategies. Through reasonable control strategies and operations, the normal state of network devices can be quickly adjusted and restored, the impact of abnormal traffic on network operation can be reduced, and the overall stability of the network can be improved. For potential security threats, isolation and blocking measures can be quickly implemented to prevent the attack from spreading further and protect the security of network devices and data.

[0064] In an exemplary embodiment of the present invention, after obtaining flow data from a target network device, an implementation method is to generate and update a network topology map based on the flow data. In actual application, flow data is obtained from the target network device through SNMP or other monitoring tools. These data include key indicators such as the bit rate, packet rate, and flow direction of each network device port. The obtained flow data is analyzed to identify the connection relationship and flow path between network devices. The analysis content includes information such as the source address and destination address of the flow, the flow size, and the flow type, which can reveal the actual communication status between network devices. According to the analysis results, the current network topology map is generated. The network topology map is a visual representation of the network structure, showing each network device and its connection relationship. In the process of generating the topology map, the system will draw the physical location, logical connection, interface status and other information of the network device on the map to form a comprehensive network structure map. As the network devices and flow conditions change, the network topology map is updated regularly or in real time. By continuously monitoring and analyzing the flow data, the changes in the network structure are reflected in a timely manner to ensure that the network topology map is always kept up to date. The generated and updated network topology map is stored in the network management system, and a visual interface is provided for administrators to view and analyze. Through the intuitive topology map display, administrators can quickly understand the overall structure of the network and the status of each device.

[0065] For example: Assume that an enterprise network management system regularly obtains traffic data from network devices such as switches and routers. After analyzing this data, the system generates and updates the network topology map to help administrators better understand the network structure and traffic distribution. Specifically, traffic data is obtained from the ports of each switch and router, and the bit rate and packet rate of each port are identified. After analyzing the data, it is found that there is a large amount of data transmission between switch A and router B, and the port utilization rate is high. Based on the analysis results, a network topology map is generated. The topology map shows the connection relationship between switch A and router B, and the traffic situation of each port is marked. As the traffic data continues to be collected, the system finds that switch C has added a new connection to switch A, and the traffic is gradually increasing. The system automatically updates the topology map and adds this new connection to the map. The updated network topology map is stored in the network management system. The administrator can view the latest network structure map through the system interface and intuitively understand the connection relationship and traffic distribution between network devices.

[0066] By generating and updating a network topology map, the embodiment of the present invention can fully understand the physical and logical structure of the network, clearly display each network device and its connection relationship, and help quickly locate and solve network problems. Real-time updating of the network topology map can reflect the dynamic changes of the network structure, timely discover new or changed connections, and help to timely identify and respond to network anomalies. By analyzing the topology map generated by traffic data, high-traffic paths and bottlenecks in the network can be identified, network resource configuration can be optimized, and network performance can be improved. The visual network topology map display can intuitively understand the network status, reduce complex manual analysis and troubleshooting work, and improve the efficiency and accuracy of network management. Based on the real-time updated topology map, faulty devices and connections can be quickly located, fault diagnosis and processing time can be shortened, and network reliability and stability can be improved. The data support provided by the topology map is helpful for network planning and decision-making. For example, when planning network expansion, the topology map can be referred to to understand the existing network structure and traffic situation, and a reasonable expansion plan can be formulated.

[0067] Based on the above description of the control method embodiment of a network device, a solution for handling abnormal traffic of a switch is introduced below. Figure 2 , shows a schematic diagram of the principle of a solution for processing abnormal traffic of a switch according to an embodiment of the present invention. The solution for processing abnormal traffic of the switch involves switch equipment, traffic collector (such as SNMPExporter), monitoring and alarm system (such as Prometheus), alarm component (such as Alert Manager), switch management service, etc. Among them, the traffic collector, monitoring and alarm system, alarm component and switch management service can be deployed in a server.

[0068] As a traffic collector, SNMP Exporter extracts traffic data from switch devices periodically or in real time. The extracted traffic data is passed to Prometheus. Prometheus stores traffic data for analysis and query. Through Prometheus's analysis of traffic data, abnormal traffic data is determined, abnormal traffic alarm information is generated, and the abnormal traffic alarm information is pushed to Alert Manager. After receiving the abnormal traffic alarm information, Alert Manager sends the abnormal traffic alarm information to the switch management service through the push API (such as webhook). Based on the abnormal traffic alarm information, the switch management service uses SNMP to scan the peer network devices of the switch device and collects the device metadata of the peer network devices. The switch management service locates the source device of the abnormal traffic based on the device metadata and abnormal traffic alarm information. The switch management service sends control instructions to the source device or corresponding port of the abnormal traffic through SNMP, such as adjusting the traffic control strategy, restarting the service, etc., so as to control the peer network device.

[0069] In addition, the switch management service can also draw a network topology map based on the extracted traffic data.

[0070] The embodiment of the present invention can take control actions on the source device of abnormal traffic immediately through an automated control instruction sending mechanism, such as limiting the traffic of a specific port, rerouting the traffic or adjusting the switch configuration, effectively curbing abnormal conditions, avoiding potential network congestion or security threats, and ensuring the continuity and stability of network operation. SNMPExporter is creatively integrated with Prometheus and Alert Manager to form an efficient and sensitive monitoring and alarm mechanism. This integrated solution not only covers a comprehensive range but also has high adaptability and scalability, ensuring real-time and accurate grasp of the network status. By deeply analyzing and processing the massive switch performance and traffic data collected by SNMP Exporter and using the switch management service, it is possible to unravel complex network activities, quickly identify data abnormal patterns, and accurately locate the root cause of the abnormality. Once the source of the abnormality is determined through the above analysis, the preset control measures are immediately activated, including but not limited to dynamically adjusting the traffic control strategy, starting the defense mechanism, or triggering the automatic recovery process. The active intervention mechanism effectively prevents the spread of network anomalies and ensures the stability and security of network services. It covers a closed-loop feedback mechanism from monitoring, analysis, decision-making to execution, ensuring the continuous optimization of monitoring and management activities. By collecting alarm response effects and network operation feedback, it continuously iterates and optimizes monitoring strategies and exception handling rules, improving the system's adaptability.

[0071] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0072] Reference Figure 3 , shows a structural block diagram of a control system of a network device according to an embodiment of the present invention. The control system of the network device can be applied to a server, and the control system of the network device can specifically include the following modules.

[0073] The flow data acquisition module 31 is used to acquire flow data from the target network device;

[0074] A flow data analysis module 32, used for analyzing the flow data to determine abnormal flow alarm information, wherein the abnormal flow alarm information is used to indicate abnormal flow conditions in the network to which the target network device is connected;

[0075] A metadata scanning module 33, configured to scan the peer network device of the target network device according to the abnormal traffic alarm information to obtain device metadata, wherein the device metadata is used to describe detailed information of the peer network device;

[0076] The network device control module 34 is used to control the opposite network device according to the abnormal traffic alarm information and the device metadata.

[0077] In an exemplary embodiment of the present invention, the flow data acquisition module 31 is used to acquire the flow data from the target network device periodically or in real time through a flow collector.

[0078] In an exemplary embodiment of the present invention, the traffic data analysis module 32 includes:

[0079] A flow data storage module, used for storing the flow data into a monitoring and alarm system;

[0080] An alarm information determination module, used to analyze the flow data using the monitoring and alarm system to determine the abnormal flow alarm information;

[0081] The alarm information push module is used to push the abnormal traffic alarm information to the target network device management service through the alarm component of the monitoring and alarm system.

[0082] In an exemplary embodiment of the present invention, the alarm information push module is used to push the abnormal traffic alarm information to the push application programming interface of the target network device management service through the alarm component.

[0083] In an exemplary embodiment of the present invention, the metadata scanning module 33 is used to scan the network topology diagram where the opposite network device is located to obtain the device metadata based on the simple network management protocol and the abnormal traffic alarm information.

[0084] In an exemplary embodiment of the present invention, the network device control module 34 includes:

[0085] A policy content determination module, used to determine the control policy and / or operation content of the peer network device according to the abnormal traffic alarm information and the device metadata;

[0086] The control instruction sending module is used to send control instructions to the opposite network device according to the simple network management protocol, so that the opposite network device executes the control strategy and / or the operation content according to the control instructions.

[0087] In an exemplary embodiment of the present invention, the system further comprises:

[0088] The topology map generation and updating module is used to generate and update the network topology map according to the traffic data after the traffic data acquisition module 31 acquires the traffic data from the target network device.

[0089] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0090] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0091] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0092] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0095] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0097] The control method of a network device and a control system of a network device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for controlling a network device, characterized in that: Applied to a server, the method comprises: Obtain traffic data from target network devices; Analyze the traffic data to determine abnormal traffic alarm information, where the abnormal traffic alarm information is used to indicate abnormal traffic conditions in the network to which the target network device is connected; Scan the peer network device of the target network device according to the abnormal traffic alarm information to obtain device metadata, where the device metadata is used to describe detailed information of the peer network device; The peer network device is controlled according to the abnormal traffic alarm information and the device metadata.

2. The method according to claim 1, characterized in that The obtaining of traffic data from the target network device includes: The flow data is obtained from the target network device periodically or in real time through a flow collector.

3. The method according to claim 1, characterized in that The analyzing the traffic data to determine abnormal traffic alarm information includes: storing the flow data into a monitoring and alarm system; Analyzing the traffic data using the monitoring and alarm system to determine the abnormal traffic alarm information; The abnormal traffic alarm information is pushed to the target network device management service through the alarm component of the monitoring and alarm system.

4. The method according to claim 3, characterized in that The step of pushing the abnormal traffic alarm information to the target network device management service through the alarm component of the monitoring and alarm system includes: The abnormal traffic alarm information is pushed to the push application programming interface of the target network device management service through the alarm component.

5. The method according to claim 1, characterized in that: The scanning of the opposite network device of the target network device according to the abnormal traffic alarm information to obtain device metadata includes: Based on the simple network management protocol and the abnormal traffic alarm information, the network topology diagram where the opposite network device is located is scanned to obtain the device metadata.

6. The method according to claim 5, characterized in that The controlling the peer network device according to the abnormal traffic alarm information and the device metadata includes: Determine the control strategy and / or operation content of the peer network device according to the abnormal traffic alarm information and the device metadata; According to the simple network management protocol, a management and control instruction is sent to the opposite network device, so that the opposite network device executes the control strategy and / or the operation content according to the management and control instruction.

7. The method according to claim 5, characterized in that After acquiring the flow data from the target network device, the method further includes: The network topology map is generated and updated according to the traffic data.

8. A control system for a network device, characterized in that: Applied to a server, the system comprises: A flow data acquisition module, used to acquire flow data from a target network device; A flow data analysis module, used for analyzing the flow data to determine abnormal flow alarm information, wherein the abnormal flow alarm information is used to indicate abnormal flow conditions in the network to which the target network device is connected; A metadata scanning module, used for scanning the opposite network device of the target network device according to the abnormal traffic alarm information to obtain device metadata, wherein the device metadata is used to describe detailed information of the opposite network device; The network device control module is used to control the opposite network device according to the abnormal traffic alarm information and the device metadata.

9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to execute the control method of the network device as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the control method of the network device as claimed in any one of claims 1 to 7.