Network intrusion detection method based on machine learning

Through the machine learning-based network intrusion detection method, the independent learning and regular update of the model are achieved, which solves the problem of insufficient detection capabilities and adaptability of traditional methods, and improves the real-time response capabilities of network security.

CN119602984APending Publication Date: 2025-03-11华能(浙江)能源开发有限公司长兴分公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411444956.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Traditional network intrusion detection methods cannot conduct independent learning and cannot update models regularly, resulting in insufficient detection capabilities and adaptability, and it is difficult to effectively identify and prevent potential security threats.

Method used

Using machine learning-based network intrusion detection methods, the independent learning and regular update of the model is achieved through steps such as data collection, feature extraction, model selection, model training and evaluation, real-time detection and continuous learning.

Benefits of technology

This method can gradually improve detection capabilities and adaptability, effectively identify and block potential security threats, and improve the real-time response capabilities of network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602984A_ABST
    Figure CN119602984A_ABST
Patent Text Reader

Abstract

The invention relates to the field of network security, in particular to a network intrusion detection method based on machine learning. The invention discloses a network intrusion detection method based on machine learning. The method comprises the following steps: data collection: carrying out network flow capture and data preprocessing; feature extraction: extracting flow features and calculating statistical features; model selection: performing supervised learning or unsupervised learning, and selecting a model; model training and evaluation: carrying out model training and evaluating model performance; real-time detection: performing real-time detection on the trained model, including deploying the model and an alarm system; and continuous learning: carrying out continuous learning on the trained model. According to the method, self-learning can be carried out, the model can be updated regularly by using new flow data, the detection capability and adaptability can be gradually improved, and potential security threats can be effectively identified and prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security, and more specifically to a network intrusion detection method based on machine learning. Background Art

[0002] Network intrusion detection can monitor network traffic in real time and detect abnormal activities so as to respond to potential security threats in a timely manner. It can identify and classify various network attacks, such as denial of service attacks, network scanning, malware propagation, etc., so as to take defensive measures in advance. It can record network activities and suspicious events and provide detailed logs for subsequent analysis and evidence collection. It can help organizations identify security vulnerabilities and deficiencies by analyzing detected intrusion activities, thereby improving network security strategies and control measures. It can provide real-time information about network security situation to help security teams conduct risk assessment and decision-making. However, traditional network intrusion detection methods cannot be learned autonomously by machines, cannot regularly update models with new traffic data, and cannot gradually improve detection capabilities and adaptability. Summary of the invention

[0003] In order to overcome the shortcomings of the prior art, the present invention provides a network intrusion detection method based on machine learning, which has the beneficial effects of being able to perform autonomous learning, regularly update the model with new traffic data, gradually improve detection capabilities and adaptability, and effectively identify and prevent potential security threats.

[0004] A network intrusion detection method based on machine learning comprises the following steps:

[0005] Data collection: network traffic capture and data preprocessing;

[0006] Feature extraction: extract traffic features and calculate statistical features;

[0007] Model selection: Perform supervised learning or unsupervised learning and select a model;

[0008] Model training and evaluation: Perform model training and evaluate model performance;

[0009] Real-time detection: Perform real-time detection on the trained model, including deploying the model and alarm system;

[0010] Continuous learning: Continuously learn the trained model.

[0011] The network traffic capture is to collect network traffic data using tools such as Wireshark or tcpdump.

[0012] The data preprocessing is to clean and format the data and remove redundant information and outliers.

[0013] The traffic characteristics are important features extracted from traffic data, including packet size, transmission time, and protocol type.

[0014] The statistical features are statistical features for calculating traffic, including total traffic volume and traffic peak value.

[0015] The supervised learning is trained using labeled data sets, including decision trees, random forests, support vector machines, and neural networks.

[0016] The unsupervised learning is to use a clustering algorithm or anomaly detection algorithm to identify abnormal patterns for unlabeled data.

[0017] The model training is to train the selected machine learning model using the prepared data set;

[0018] The performance of the evaluation model is to evaluate the detection accuracy and recall rate of the model through cross-validation, confusion matrix, and F1-score indicators.

[0019] The deployment model is to deploy the trained model to the network and monitor the traffic in real time;

[0020] The alarm system triggers an alarm in time and records relevant information when abnormal activities are detected.

[0021] The continuous learning is to regularly update the model with new traffic data to improve detection capability and adaptability.

[0022] The beneficial effects of the network intrusion detection method based on machine learning of the present invention are:

[0023] It can conduct autonomous learning and regularly update models with new traffic data, which can gradually improve detection capabilities and adaptability, and effectively identify and prevent potential security threats. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0025] Figure 1 is a flow chart of a network intrusion detection method based on machine learning;

[0026] Figure 2 The figure is a specific flow chart of a network intrusion detection method based on machine learning. DETAILED DESCRIPTION

[0027] like Figure 1-2 As shown, a network intrusion detection method based on machine learning includes the following steps:

[0028] Data collection: network traffic capture and data preprocessing;

[0029] Feature extraction: extract traffic features and calculate statistical features;

[0030] Model selection: Perform supervised learning or unsupervised learning and select a model;

[0031] Model training and evaluation: Perform model training and evaluate model performance;

[0032] Real-time detection: Perform real-time detection on the trained model, including deploying the model and alarm system;

[0033] Continuous learning: Continuously learn the trained model.

[0034] The network traffic capture is to collect network traffic data using tools such as Wireshark or tcpdump.

[0035] The data source can use public datasets such as KDD Cup 99, CICIDS2017, or UNSW-NB15, which have annotated normal traffic and different types of attack traffic.

[0036] The data preprocessing is to clean and format the data and remove redundant information and outliers.

[0037] Clean data to remove irrelevant fields; handle missing values;

[0038] Encoding categorical features: Convert categorical data (such as IP protocol, service type) into numerical form. One-Hot Encoding can be used.

[0039] Normalization / Standardization: Normalize numerical features (such as normalizing to [0,1]) or standardize (mean is 0, variance is 1) to improve model training results.

[0040] The traffic characteristics are important features extracted from traffic data, including packet size, transmission time, and protocol type.

[0041] Select features that have a great impact on detection accuracy, such as source and destination IP addresses, source and destination ports, packet size, protocol type, duration, etc. Use algorithms such as Lasso or feature importance evaluation in random forests to automatically select important features.

[0042] The statistical features are statistical features for calculating traffic, including total traffic volume and traffic peak value.

[0043] The supervised learning is trained using labeled data sets, including decision trees, random forests, support vector machines, and neural networks.

[0044] The unsupervised learning is to use a clustering algorithm or anomaly detection algorithm to identify abnormal patterns for unlabeled data.

[0045] Select Model:

[0046] Random Forest: Performs well on most data sets and determines the final result by voting among multiple decision trees.

[0047] Support Vector Machine (SVM): Suitable for processing high-dimensional data and can handle complex boundaries using kernel functions.

[0048] The model training is to train the selected machine learning model using the prepared data set;

[0049] The dataset is divided into training set (70%), validation set (15%) and test set (15%).

[0050] Use the training set to train the model and use the validation set for parameter tuning.

[0051] The performance of the evaluation model is to evaluate the detection accuracy and recall rate of the model through cross-validation, confusion matrix, and F1-score indicators.

[0052] The deployment model is to deploy the trained model to the network and monitor the traffic in real time;

[0053] Analyze true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN).

[0054] The alarm system triggers an alarm in time and records relevant information when abnormal activities are detected.

[0055] Integrate the trained model into the network monitoring system, such as using Flask to build an API interface.

[0056] By writing scripts, real-time traffic data is analyzed regularly and input into the model for classification.

[0057] The continuous learning is to regularly update the model with new traffic data to improve detection capability and adaptability.

[0058] Continuously update model training and retrain the model using new normal / attack data.

[0059] Obtain feedback from actual testing, evaluate prediction results, and adjust feature selection and model parameters.

[0060] Machine learning algorithms include decision trees, random forests, support vector machines, and deep learning;

[0061] Decision Trees: Easy to explain and implement, but prone to overfitting.

[0062] Random Forest: Improves accuracy through integrated learning and is suitable for processing high-dimensional data.

[0063] Support Vector Machine (SVM): Suitable for small sample high-dimensional data, and can handle nonlinear problems through kernel functions.

[0064] Deep learning: such as convolutional neural networks (CNN) and recurrent neural networks (RNN), which are suitable for processing complex data features.

Claims

1. A network intrusion detection method based on machine learning, characterized in that: The following steps are involved: Data collection: network traffic capture and data preprocessing; Feature extraction: extract traffic features and calculate statistical features; Model selection: Perform supervised learning or unsupervised learning and select a model; Model training and evaluation: Perform model training and evaluate model performance; Real-time detection: Perform real-time detection on the trained model, including deploying the model and alarm system; Continuous learning: Continuously learn the trained model.

2. A network intrusion detection method based on machine learning according to claim 1, characterized in that: The network traffic capture is to collect network traffic data using tools such as Wireshark or tcpdump.

3. The network intrusion detection method based on machine learning according to claim 1 is characterized in that: The data preprocessing is to clean and format the data and remove redundant information and outliers.

4. The network intrusion detection method based on machine learning according to claim 1, characterized in that: The traffic characteristics are important features extracted from traffic data, including packet size, transmission time, and protocol type.

5. The network intrusion detection method based on machine learning according to claim 1, characterized in that: The statistical features are statistical features for calculating traffic, including total traffic volume and traffic peak value.

6. The network intrusion detection method based on machine learning according to claim 1 is characterized in that: The supervised learning is trained using labeled data sets, including decision trees, random forests, support vector machines, and neural networks.

7. The network intrusion detection method based on machine learning according to claim 1 is characterized in that: The unsupervised learning is to use a clustering algorithm or anomaly detection algorithm to identify abnormal patterns for unlabeled data.

8. The network intrusion detection method based on machine learning according to claim 1, characterized in that: The model training is to train the selected machine learning model using the prepared data set; The performance of the model is evaluated by cross-validation, confusion matrix, and F1-score indicators to evaluate the detection accuracy and recall rate of the model.

9. The network intrusion detection method based on machine learning according to claim 1, characterized in that: The deployment model is to deploy the trained model to the network and monitor the traffic in real time; The alarm system triggers an alarm in time and records relevant information when abnormal activities are detected.

10. The network intrusion detection method based on machine learning according to claim 1, characterized in that: The continuous learning is to regularly update the model with new traffic data to improve detection capability and adaptability.

Citation Information

Cited By

  • Self-learning algorithm and device for network configuration auditing rule

    CN119854127A

  • Flow monitoring rule adaptive adjustment method and system based on machine learning

    CN120110950A