Network Attack Detection System Based on Pattern Recognition
Through a pattern recognition-based network attack detection system, using a random forest model to detect network traffic in real time, it solves the problems of traditional methods of identifying attack behavior lag and high false alarm rates in complex environments, and achieves high accuracy and fast response network attacks Test.
Patent Information
- Application Number
- CN202411220802.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Traditional cyberattack detection methods are difficult to effectively identify hidden attack behaviors in complex and changing network environments, resulting in lagging detection and high false alarm rate.
The network attack detection system based on pattern recognition is adopted to obtain network traffic sample data through the data acquisition module, the feature selection module extracts key features, the model building module builds a random forest model, the pattern detection module detects network traffic in real time, and the prediction marking module generates prediction information. The network attack detection module generates early warning instructions.
It improves the accuracy and timeliness of network attack detection, reduces the false alarm rate, and ensures the stable operation of network security.
Smart Images

Figure CN118740521B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrical communication technology, and in particular to a network attack detection system based on pattern recognition. Background Art
[0002] With the rapid development of information technology and the widespread popularity of network applications, network attack methods are becoming increasingly complex and diverse, posing a severe challenge to network security. Especially in key areas such as enterprise networks, financial systems, and power communications, network attacks can lead to data leakage and service interruptions. Therefore, efficient and accurate detection of network attacks to ensure the safe and stable operation of network systems has become an urgent problem to be solved. Traditional network attack detection methods mostly rely on preset rule libraries or feature libraries to identify network threats by matching known attack patterns. However, with the continuous evolution of network attack technology, new attack methods emerge in an endless stream, and traditional methods are often difficult to deal with unknown attacks or variant attacks, resulting in low detection accuracy, slow response speed, and high false alarm and missed alarm rates. In addition, complex network environments and massive amounts of network data also bring huge computing pressure and challenges to traditional detection methods. Summary of the invention
[0003] The purpose of this application is to provide a network attack detection system based on pattern recognition to solve the technical problem that traditional detection methods are difficult to effectively identify hidden attack behaviors in complex and changeable network environments, resulting in delayed attack detection and high false alarm rate.
[0004] In view of the above problems, the present application provides a network attack detection system based on pattern recognition.
[0005] The present application provides a network attack detection system based on pattern recognition, and the system includes: a data acquisition module, which is used to collect data from a target network based on a network traffic monitoring unit to obtain a network traffic sample data set; a feature selection module, which is used to perform feature selection based on the network traffic sample data set to obtain multiple network traffic features; a model construction module, which is used to construct multiple decision trees based on the multiple network traffic features combined with multiple data patterns, and integrate the multiple decision trees to obtain a random forest model; a pattern detection module, which is used to perform pattern detection using the random forest model in combination with real-time network traffic data to generate a pattern detection result; a prediction marking module, which is used to predict and mark the real-time network traffic data of the target network according to the pattern detection result to generate network traffic prediction information; a network attack detection module, which is used to perform network attack detection based on the network traffic prediction information and generate an early warning instruction.
[0006] The technical solution provided in this application has at least the following technical effects or advantages:
[0007] In the network attack detection system based on pattern recognition, the data acquisition module of the system is responsible for monitoring and collecting traffic data in the target network to form a network traffic sample data set. These data are the basis for subsequent analysis. The feature selection module selects the most critical features for identifying network behavior from these huge data, and these features can reflect the core characteristics of network traffic. The model construction module uses these features and combines multiple data patterns to build multiple decision trees. Subsequently, these decision trees are integrated to form a random forest model. This model can learn and identify normal and abnormal patterns of network traffic based on historical data. The pattern detection module receives network traffic data in real time, uses the trained random forest model to detect these data, determines whether they conform to known normal or abnormal patterns, and generates corresponding detection results. The prediction labeling module labels the real-time network traffic data according to the detection results, predicts whether it may contain network attack behavior, and generates network traffic prediction information. Finally, the network attack detection module further analyzes and confirms whether there is network attack behavior based on these prediction information. Once an attack is detected, an early warning instruction is immediately generated so that countermeasures can be taken in time. The entire process realizes real-time monitoring, intelligent analysis and rapid response of network traffic, effectively improving the accuracy and timeliness of network attack detection.
[0008] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0010] Figure 1 This is a schematic diagram of the structure of the network attack detection system based on pattern recognition in this application;
[0011] Figure 2 A schematic diagram of the process of obtaining multiple network traffic features in the network attack detection system based on pattern recognition in this application.
[0012] Description of reference numerals:
[0013] Data collection module 1, feature selection module 2, model building module 3, pattern detection module 4, prediction labeling module 5, network attack detection module 6. DETAILED DESCRIPTION
[0014] This application solves the technical problem that traditional detection methods are difficult to effectively identify hidden attack behaviors in complex and changeable network environments, resulting in delayed attack detection and high false alarm rates, by providing a network attack detection system based on pattern recognition. This application achieves the technical effect of improving the accuracy and real-time performance of network attack detection and ensuring the security of the network through methods such as precise feature selection and integrated decision trees to build a random forest model.
[0015] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.
[0016] For examples, please see the attached Figure 1 , the present application provides a network attack detection system based on pattern recognition, the system specifically includes the following modules:
[0017] The data collection module is used to collect data from the target network based on the network traffic monitoring unit to obtain a network traffic sample data set.
[0018] Specifically, in the data collection module, the system terminal activates the key nodes of the target network, such as the network traffic monitoring unit deployed on routers, switches, servers, etc., which is responsible for capturing and recording the information of the passing data packets. After the monitoring unit starts working, it will collect the traffic data in the network in real time or at a certain frequency. These data include but are not limited to the source address, destination address, port number, protocol type, transmission size, timestamp and other key information of the data packet, which constitute the network traffic sample data set. These data reflect the details of the network activities and are the basis for subsequent analysis.
[0019] The feature selection module is used to perform feature selection based on the network traffic sample data set to obtain multiple network traffic features.
[0020] Specifically, in the feature selection module, since the collected network traffic sample data sets often contain noise, missing values and other problems, the system terminal performs data cleaning and preprocessing on the network traffic sample data sets, such as denoising, filling missing values, and standardization, to ensure the quality and consistency of the data. Subsequently, features related to network traffic analysis are extracted from the preprocessed data sets. These features include those based on the packet level, data flow, and other levels. After extracting these features, the system terminal selects the most relevant features through correlation analysis methods to obtain multiple network traffic features to remove redundant features, reduce the amount of calculation, and improve the generalization ability of the random forest model.
[0021] Further, if Figure 2 As shown, the present application provides a method for performing feature selection based on the network traffic sample data set to obtain multiple network traffic features, including:
[0022] The network traffic sample data set is traversed to perform data preprocessing to obtain a data packet length parameter, a traffic direction parameter, and a timestamp parameter; a multidimensional vector is constructed based on the data packet length parameter, the traffic direction parameter, and the timestamp parameter; a feature space is defined based on the multidimensional vector; a correlation analysis is performed on the network traffic sample data according to the feature space, feature selection is performed based on data correlation, and the multiple network traffic features are determined.
[0023] In a preferred embodiment, the system terminal traverses the collected network traffic sample data set, and in each traversal, extracts the total length and timestamp of the data packet from the header information of the data packet, and then determines the flow direction by the relative position of the source IP address and the destination IP address, that is, if the source IP address belongs to the local network, it is regarded as outbound traffic; otherwise, it is regarded as inbound traffic. In each extraction process, the system terminal deletes those data packets that do not contain key information or are repeated. If some data packets lack necessary parameters, such as timestamps, they are filled according to the information of adjacent data packets. Subsequently, the system terminal sorts the pre-processed data to obtain data packet length parameters, flow direction parameters, and timestamp parameters. Among them, the data packet length reflects the scale of data transmission and possible load types, the flow direction helps to analyze the nature of network interaction, and the timestamp records the time when the data packet is captured, which is crucial for analyzing the changes in traffic patterns over time. Afterwards, the obtained data packet length, flow direction, and timestamp are used to construct a multidimensional vector. These vectors are the basis of data analysis, and each vector represents multiple feature dimensions of a network traffic sample, which is convenient for subsequent mathematical and statistical analysis. Then, the system terminal uses all the constructed multidimensional vectors to form a feature space. In the feature space, each sample is regarded as a point, and the distance, density and other properties between these points will be used for subsequent analysis. After obtaining the feature space, in order to more effectively understand and utilize these features, the system terminal performs correlation analysis on the network traffic sample data. Correlation analysis aims to explore the relationship between different features and determine whether there is a certain dependence or correlation between them. In this process, the system terminal selects a suitable correlation measurement method according to the type of feature (such as continuous, discrete or time series). For example, for continuous features such as packet length, the system terminal uses the Pearson correlation coefficient to evaluate its linear relationship with other continuous features; while for discrete or classified features such as traffic direction, mutual information is used to evaluate the amount of shared information between it and continuous features or other discrete features. Based on the results of the above correlation analysis, the system terminal performs feature selection. In this process, the system terminal compares the analyzed packet length correlation, traffic direction correlation and timestamp correlation with the corresponding correlation threshold, and extracts multiple features greater than or equal to the corresponding correlation threshold as network traffic features. These features are not only representative, but can also be used in subsequent anomaly detection, providing strong support for network management and optimization.
[0024] The model building module is used to build multiple decision trees based on the multiple network traffic characteristics combined with multiple data patterns, and integrate the multiple decision trees to obtain a random forest model.
[0025] Specifically, in the model building module, after multiple network traffic features are determined, the system terminal builds multiple decision trees based on these network traffic features. Decision tree is an intuitive classification and regression method that recursively divides the data set into several non-intersecting subsets, and the data in each subset has the same attributes in terms of features to build a tree structure. In this process, each decision tree will learn independently based on the selected features and segmentation rules. Subsequently, the system terminal verifies these independent decision trees in combination with different data modes, that is, the representation of data in different dimensions or under different conditions, and integrates the verified decision trees to form a random forest model. This integration method is that each decision tree is built on a random subset of the data set, and each decision tree randomly selects a part of the features for segmentation during the construction process, which can increase the diversity and generalization ability of the model. Through this random forest model, the system terminal can process complex network traffic data and accurately identify abnormal patterns therein, thereby providing strong support for tasks such as network security monitoring.
[0026] Furthermore, the present application provides a method for constructing multiple decision trees based on the multiple network traffic features combined with multiple data patterns, including:
[0027] The multiple network traffic features are normalized to generate multiple standard features; based on the multiple standard features, the network traffic sample data set is divided into a training set and a test set; based on the multiple standard features, random selection is performed to construct a node splitting decision; according to the training set, the node splitting decision is executed recursively on the split nodes until a stop condition is reached, and the multiple data patterns are identified to construct multiple initial decision trees; the multiple initial decision trees are verified using the test set in combination with the multiple data patterns, and the multiple decision trees are constructed based on the verification results.
[0028] In a preferred embodiment, the system terminal performs normalization processing on the obtained multiple network traffic features, that is, the difference between each network traffic feature and the minimum value corresponding to the feature is calculated by the ratio of the difference between the maximum value and the minimum value corresponding to the feature, so as to obtain multiple standard features. Through this preprocessing step, the system terminal converts the feature values of different scales and ranges to the same scale, thereby eliminating the deviations that may be caused by the dimension difference between different features. The normalization process makes each feature have equal weight in the model training, which helps to improve the accuracy and stability of the model. Subsequently, the system terminal divides the network traffic sample data set according to the obtained multiple standard features to obtain multiple standard feature sets, and then extracts a preset proportion of data from each standard feature set as a training set, and uses the remaining data as a test set. Among them, the preset proportion is determined according to actual needs, usually 70%. Afterwards, the system terminal randomly selects some features from the multiple standard features as candidate features at each node, and selects an optimal feature from the candidate features for splitting. After selecting the feature, the system terminal determines the split point of the feature, that is, the specific value or condition of dividing the sample data into different subsets. For discrete features, the split point is usually a subset of feature values; for continuous features, the optimal split point is found through binary search in the CART algorithm. The system terminal summarizes these determined split points and constructs a node split decision. This is the core step in building a decision tree, which determines the split direction and splitting rules of each node in the tree. Then, the training set is randomly sampled with replacement to generate a sample subset, and then the sample subset is divided into multiple sub-nodes according to multiple standard features, and these sub-nodes are combined with the splitting criteria for recursive splitting until the stopping condition is reached, that is, the minimum node sample data all belong to the same category or reach the preset maximum depth. When the stopping condition is reached, the system terminal constructs an initial decision tree. Further, the training set is resampled multiple times to obtain multiple groups of sample subsets, and the above construction process is repeated to obtain multiple initial decision trees. Among them, the number of initial decision trees is determined based on the accuracy requirements. Subsequently, the data in the test set is input into each initial decision tree, and each initial decision tree will classify and predict the samples in the test set. During the verification process, we focus on understanding whether the initial decision tree can successfully identify data patterns similar to those in the training set on the test set, and use appropriate evaluation indicators such as accuracy, precision, recall, F1 value, mean square error, etc. to quantify the performance of the initial decision tree on the test set. In addition to the overall performance, the system terminal analyzes the ability of the initial decision tree in identifying specific data patterns, such as outliers and edge cases, by checking the branch structure, feature selection, and node splitting decisions of the initial decision tree. If it is found that some initial decision trees perform poorly on the test set, especially when they fail to accurately capture key data patterns, the construction process of these initial decision trees will be returned and adjusted, such as modifying the splitting criteria and adjusting the structure of the tree.After verification and adjustment, the system terminal built multiple decision trees. These decision trees will serve as components of the random forest model and provide strong support for network traffic analysis.
[0029] Further, the present application provides executing the node splitting decision according to the training set, recursively splitting the nodes until a stop condition is reached, and identifying the multiple data patterns to construct multiple initial decision trees, including:
[0030] Based on the training set, samples are randomly extracted with replacement to generate a sample subset, and the sample subset corresponds to each initial decision tree; the sample subset is divided into a plurality of sub-nodes according to the plurality of standard features; information gain is calculated based on the plurality of sub-nodes, and a splitting criterion is determined according to the calculation result; each initial decision tree is traversed and node splitting decision is recursively performed on each sub-node in combination with the splitting criterion, and data patterns are identified. When the minimum node sample data all belong to the same category, it is deemed that the stopping condition is met, the plurality of data patterns are generated, and the plurality of initial decision trees are constructed.
[0031] In an optional implementation, the system terminal randomly samples the training set with replacement to generate multiple sample subsets. These sample subsets are the basis for constructing each initial decision tree, and each decision tree corresponds to a unique sample subset. Subsequently, each sample subset is further subdivided into multiple subnodes according to multiple standard features, and each subnode corresponds to a standard feature. After that, the system terminal counts the number of occurrences of each standard feature in the training set, calculates the probability of each standard feature, and then uses the existing entropy formula to calculate the entropy of the entire training set. For each subnode corresponding to each standard feature, the system terminal divides the training set into multiple subsets according to different values or different segmentation points of each subnode. For each subset, repeat the above-mentioned category probability calculation and entropy calculation, and then calculate the conditional entropy of each standard feature. Then, the information gain of each standard feature is calculated using the existing information gain formula, and then all information gains are compared, and the feature with the largest information gain is selected as the splitting criterion of the current node. The larger the information gain, the greater the improvement in information purity that can be brought about by using the feature for splitting, that is, the more uncertainty is reduced. Furthermore, based on the determined splitting criteria, the system terminal recursively splits each child node until the stopping condition is met, that is, all samples in the minimum node sample data belong to the same category, which means that further splitting will no longer provide additional classification information. In the process of recursive splitting, patterns in the data are also constantly identified. The splitting of each node is based on a certain pattern in the data (that is, the relationship between the feature value and the category). As the tree grows, the data is divided into smaller and smaller subsets, each of which represents a specific pattern in the data. When the stopping condition is met, the initial decision tree is built, and the structure of the tree reflects multiple patterns in the data. Repeat the above process to build an initial decision tree for each sample subset. In this way, the system terminal obtains multiple initial decision trees, each of which captures different patterns in the data, but due to the randomness of sample sampling, there will be differences between them.
[0032] The pattern detection module is used to perform pattern detection using the random forest model in combination with real-time network traffic data to generate pattern detection results.
[0033] Specifically, in the pattern detection module, the system terminal performs the same preprocessing and feature extraction on the real-time captured network traffic data to obtain a format that the model can process. Subsequently, the processed real-time data is input into the random forest model. Multiple decision trees in the random forest model classify each data point as normal or attack, and then perform pattern detection on the classification results to obtain pattern detection results, which help quickly locate potential security threats and generate early warning instructions.
[0034] Furthermore, the present application provides a method for performing pattern detection using the random forest model in combination with real-time network traffic data to generate pattern detection results, including:
[0035] The real-time network traffic data is synchronized to the random forest model; the real-time network traffic data is matched with the multiple data patterns by traversing the multiple decision trees through the random forest model to obtain a network traffic matching result, wherein the network traffic matching result includes normal traffic data and attack traffic data; the real-time network traffic data is identified based on the normal traffic data and the attack traffic data to generate a binary classification data set; pattern detection is performed according to the binary classification data set to generate the pattern detection result.
[0036] In a preferred embodiment, the system terminal synchronizes the collected real-time network traffic data to the constructed random forest model. When the real-time network traffic data enters the random forest model, these data will be transmitted to each traversed decision tree and matched with the predefined data pattern in the tree. This matching process is essentially to determine whether each traffic data meets the characteristics of normal traffic or is closer to the characteristics of a certain attack traffic. Through such matching, the random forest model can distinguish between normal traffic data and attack traffic data to form a network traffic matching result. Subsequently, based on the matching results, the system terminal will identify each real-time network traffic data to clarify whether it is normal traffic or attack traffic. In this way, the real-time network traffic data will be converted into a binary classification data set containing clear labels. This data set is the basis for subsequent pattern detection and analysis. Afterwards, based on this binary classification data set, the system terminal performs further pattern detection, that is, parses the binary classification data set to determine whether the binary classification data set has a network parameter marked as 1. The purpose of this step is to extract representative features or patterns from the data, which represent certain specific network attack behaviors or abnormal traffic characteristics. Through pattern detection, the system terminal can generate a pattern detection result containing detailed information. This result not only points out which traffic is abnormal, but also reveals key information such as the specific type, source, and impact range of the abnormal traffic, helping them better understand the security situation in the network and take corresponding defensive measures.
[0037] Furthermore, the present application provides the method of identifying the real-time network traffic data based on the normal traffic data and the attack traffic data to generate a binary classification data set, including:
[0038] When the network traffic matching result only contains the normal traffic data and does not contain the attack traffic data, the network traffic matching result is marked as 0 and normal network parameters are generated; when the network traffic matching result contains the normal traffic data and the attack traffic data, or when the network traffic matching result only contains the attack traffic data, the network traffic matching result is marked as 1 and attack network parameters are generated; the real-time network traffic data is classified based on the normal network parameters and the attack network parameters to determine the binary classification data set.
[0039] In an optional implementation, if the network traffic matching result shows that all the data are normal traffic data, that is, no attack traffic is found, then the system terminal marks the result of this matching as 0, which means that the network is in a normal state, and generates a set of normal network parameters accordingly. These parameters include statistical characteristics, time distribution and other information of normal traffic. On the contrary, if attack traffic data is found in the network traffic matching result, whether the attack traffic appears alone or coexists with normal traffic, the system terminal marks the result of this matching as 1, which means that the network is attacked. At this time, the system terminal generates a set of attack network parameters, which record the key information such as the characteristics, source, and type of the attack traffic in detail. This information is crucial for rapid response to attacks. Based on the above-mentioned marking and parameter generation process, the system terminal classifies the real-time network traffic data and constructs a binary classification data set. This data set consists of two parts: one part is normal network traffic data marked as 0, and the other part is network traffic data containing attacks marked as 1. Such classification not only simplifies the data processing and analysis process, but also provides strong support for subsequent tasks such as pattern detection. By continuously updating and improving this binary classification dataset, system endpoints can better understand and respond to security threats in the network.
[0040] The prediction marking module is used to predict and mark the real-time network traffic data of the target network according to the pattern detection result to generate network traffic prediction information.
[0041] Specifically, in the prediction and labeling module, the system terminal uses the normal traffic pattern and attack traffic pattern in the pattern detection results to predict and label the real-time network traffic data. For each piece of traffic data entering the network, the system terminal will compare its characteristics with the known normal or attack pattern and predict which category it belongs to. This prediction process is to classify the real-time network traffic in real time through Euclidean distance. If the traffic data has a high degree of match with the normal traffic pattern, it is marked as normal traffic; if it has a high degree of match with the attack traffic pattern, it is marked as attack traffic, thereby generating network traffic prediction information. The prediction information will include the category label (normal or attack) of each traffic, helping the system terminal to quickly identify potential threats and take corresponding measures to protect network security.
[0042] The network attack detection module is used to perform network attack detection based on the network traffic prediction information and generate early warning instructions.
[0043] Specifically, in the network attack detection module, when the binary classification data set contains attack network parameters, the system terminal analyzes the network traffic prediction information and identifies the part marked as attack traffic. These traffic data indicate that the network is suffering or about to suffer some form of attack. At this time, the system terminal will generate a backtracking instruction and use this backtracking instruction to backtrack and locate the attack data source in the real-time network traffic data to determine the attack data source. Subsequently, an impact analysis is performed on the determined attack data source, and the analysis results are matched with the set protection level to generate corresponding early warning instructions. These instructions will be sent directly to network security personnel so that timely action can be taken to prevent or mitigate the impact of the attack.
[0044] Furthermore, the present application provides a method for performing network attack detection based on the network traffic prediction information and generating an early warning instruction, including:
[0045] When the binary classification data set has the attack network parameters, the target network is verified for network attack based on the network traffic prediction information; if the target network passes the network attack verification, a backtracking instruction is generated; the real-time network traffic data is traversed through the backtracking instruction to perform backtracking positioning and determine the attack data source; a network attack impact analysis is performed based on the attack data source to generate an attack level; network protection information is retrieved to match the protection level with the attack level according to the location of the attack data source; if the protection level does not match the attack level, an attack valid parameter is generated and the attack valid parameter is added to the early warning instruction.
[0046] In an optional implementation, when the binary classification data set has an identification of 1, that is, it has attack network parameters, the system terminal uses the network traffic prediction information to verify the attack on the target network. This step is based on whether there is data identified as 1 in the prediction information, and the purpose is to confirm whether the target network is or will be attacked by a network attack. If the network attack verification passes, that is, it is confirmed that the target network is or will be attacked, the system terminal will generate a backtracking instruction. The purpose of this instruction is to find the source of the attack, that is, the attack data source. Through this backtracking instruction, the system terminal traverses the real-time network traffic data, locates the specific attack data packet from a large amount of network traffic, and determines the key information such as the IP address and port of the attack data source. Once the attack data source is determined, the system terminal analyzes its position in the network topology structure based on the IP address of the attack data source, evaluates the number of nodes that may be affected by the attack, calculates the proportion of these nodes to the total nodes in the network area involved, and generates an attack impact coefficient. Then determine which network services or applications may be affected by the attack, that is, combine historical experience to estimate the time when these network services or applications will be stopped. Subsequently, according to industry security standards, different levels of attack levels are defined, and each level corresponds to an attack impact coefficient range and a stop operation time range. The system terminal compares the calculated attack impact coefficient and interception operation time with the range corresponding to each level to generate the corresponding attack level. After that, based on the current network protection information, identify the protection strategy for the known attack data source, determine the corresponding protection level, and then match this protection level with the generated attack level to determine whether the current protection measures are sufficient to deal with the current attack threat. If the protection level does not match the attack level, it means that the current protection measures may not be sufficient to resist the attack. At this time, the system terminal will generate attack validity parameters, which describe the specific characteristics and effectiveness of the attack. These parameters will be added to the early warning instructions so that network security personnel can keep abreast of the latest situation of the attack and take corresponding enhanced protection measures.
[0047] Furthermore, the present application provides the protection level, including:
[0048] Divide multiple risk points based on data sensitivity of the target network; construct multiple protection levels based on the multiple risk points, wherein there is a one-to-one correspondence between the multiple protection levels and the multiple risk points; associate the multiple protection levels with the multiple risk points, and store and generate the network protection information; extract the virtual position of the attack data source in the real-time network traffic data, and determine the location of the attack data source; traverse the network protection information to retrieve the location of the attack data source, and determine the protection level, wherein there is a corresponding relationship between the protection level and the location of the attack data source.
[0049] In an optional implementation, the system terminal conducts a detailed analysis of the target network and divides the network into multiple risk points according to the sensitivity of the data therein, such as personal privacy information, company secrets, state secrets, etc. These points represent areas in the network where data leakage or damage may have different levels of impact. For each identified risk point, the system terminal designs and builds a corresponding protection level according to its data sensitivity and potential risks. Each risk point corresponds to a specific protection level to ensure that appropriate security measures are taken for the point. Subsequently, each protection level is clearly associated with its corresponding risk point, and this information is stored as a benchmark for network protection. In this way, when a security incident occurs at any location in the network, the corresponding risk point and protection level can be quickly located. When an attack data source is detected, the specific location of the attack data source in the virtual network is determined by analyzing the real-time network traffic data. This is to accurately identify the source of the attack and the potential impact range. Then, the stored network protection information is used to traverse and retrieve the risk points that match the location of the attack data source. Once the corresponding risk point is found, the protection level that the attack data source should face can be determined. This protection level will guide the subsequent security response and the implementation of protection measures.
[0050] In summary, the network attack detection system based on pattern recognition provided by this application has the following technical effects:
[0051] This application obtains a network traffic sample data set from the target network through a data acquisition module, and pre-processes the data in a feature selection module to extract key features such as packet length, traffic direction, and timestamp. Subsequently, these features are used to build a decision tree in combination with multiple data patterns, and a random forest model is formed by integrating multiple decision trees. This model is used in the pattern detection module to analyze real-time network traffic, generate pattern detection results and network traffic prediction information. After that, prediction marking and classification are performed to divide the traffic data into normal traffic and attack traffic. According to the classification results, attack detection is performed in the network attack detection module, early warning instructions are generated, and when attack traffic is detected, backtracking positioning is triggered to analyze the attack source and its impact. Then, by comparing the protection level and attack level in the network protection information, the protection measures are dynamically adjusted to ensure network security. Finally, according to the location of the attack data source and the data sensitivity, the corresponding protection level is matched to optimize the network protection strategy. These technical effects jointly solve the technical problem that traditional detection methods are difficult to effectively identify hidden attack behaviors in complex and changeable network environments, resulting in delayed attack detection and high false alarm rates. They achieve the technical effect of improving the accuracy and real-time performance of network attack detection and ensuring the security of the network through methods such as precise feature selection and integrated decision trees to build random forest models.
[0052] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0053] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.
Claims
1. A network attack detection system based on pattern recognition, characterized in that: The system comprises: A data collection module is used to collect data from the target network based on the network traffic monitoring unit to obtain a network traffic sample data set; A feature selection module, used to perform feature selection based on the network traffic sample data set to obtain multiple network traffic features; A model building module, used to build multiple decision trees based on the multiple network traffic features combined with multiple data patterns, and integrate the multiple decision trees to obtain a random forest model, wherein the multiple data patterns are representations of data in different dimensions or under different conditions; A pattern detection module, used to perform pattern detection using the random forest model in combination with real-time network traffic data to generate pattern detection results, wherein the pattern detection results include specific types, sources, and impact ranges of abnormal traffic; A prediction and marking module, used to predict and mark the real-time network traffic data of the target network according to the pattern detection result, and generate network traffic prediction information, wherein the network traffic prediction information includes a category label of normal or attack for each traffic; A network attack detection module, used to perform network attack detection based on the network traffic prediction information and generate an early warning instruction; Wherein, performing network attack detection based on the network traffic prediction information and generating an early warning instruction includes: When the binary classification data set has attack network parameters, network attack verification is performed on the target network based on the network traffic prediction information, wherein the binary classification data set consists of two parts, one part is normal network traffic data marked as 0, and the other part is network traffic data containing attacks marked as 1; if the target network passes the network attack verification, a backtracking instruction is generated; the real-time network traffic data is traversed by the backtracking instruction to perform backtracking positioning and determine the attack data source; network attack impact analysis is performed based on the attack data source to generate an attack level; network protection information is retrieved to match the protection level with the attack level according to the location of the attack data source; if the protection level does not match the attack level, an attack valid parameter is generated and the attack valid parameter is added to the early warning instruction.
2. The network attack detection system based on pattern recognition as claimed in claim 1, characterized in that: Feature selection is performed based on the network traffic sample data set to obtain multiple network traffic features, including: Traversing the network traffic sample data set to perform data preprocessing to obtain data packet length parameters, traffic direction parameters, and timestamp parameters; Constructing a multidimensional vector based on the data packet length parameter, the traffic direction parameter, and the timestamp parameter; defining a feature space based on the multidimensional vector; The network traffic sample data is subjected to correlation analysis according to the feature space, and feature selection is performed based on data correlation to determine the multiple network traffic features.
3. The network attack detection system based on pattern recognition as claimed in claim 1, characterized in that: Building multiple decision trees based on the multiple network traffic features combined with multiple data patterns includes: Normalizing the multiple network traffic features to generate multiple standard features; Dividing the network traffic sample data set into a training set and a test set based on the multiple standard features; Performing random selection based on the multiple standard features to construct a node splitting decision; Execute the node splitting decision according to the training set, recursively split the nodes until a stop condition is reached, and identify the multiple data patterns to construct multiple initial decision trees; The multiple initial decision trees are verified using the test set in combination with the multiple data patterns, and the multiple decision trees are constructed based on the verification results.
4. The network attack detection system based on pattern recognition as claimed in claim 3, characterized in that: Executing the node splitting decision according to the training set and recursively splitting the nodes until a stop condition is reached, and identifying the multiple data patterns to construct multiple initial decision trees, including: Randomly extract samples with replacement based on the training set to generate a sample subset, wherein the sample subset has a corresponding relationship with each initial decision tree; Dividing the sample subset into a plurality of sub-nodes according to the plurality of standard features; Calculate information gain based on the multiple child nodes, and determine a splitting criterion according to the calculation result; Each initial decision tree is traversed and the node splitting decision is recursively executed on each child node in combination with the splitting criterion, and the data pattern is identified. When the minimum node sample data all belong to the same category, it is considered that the stopping condition is met, the multiple data patterns are generated, and the multiple initial decision trees are constructed.
5. The network attack detection system based on pattern recognition as claimed in claim 1, characterized in that: The random forest model is used in combination with real-time network traffic data to perform pattern detection and generate pattern detection results, including: Synchronizing the real-time network traffic data to the random forest model; Traversing the multiple decision trees through the random forest model to match the real-time network traffic data with the multiple data patterns to obtain a network traffic matching result, wherein the network traffic matching result includes normal traffic data and attack traffic data; The real-time network traffic data is identified based on the normal traffic data and the attack traffic data to generate a binary classification data set; Performing pattern detection according to the binary classification data set to generate the pattern detection result.
6. The network attack detection system based on pattern recognition as claimed in claim 5, characterized in that: The step of identifying the real-time network traffic data based on the normal traffic data and the attack traffic data to generate a binary classification data set includes: When the network traffic matching result only contains the normal traffic data and does not contain the attack traffic data, the network traffic matching result is marked as 0, and a normal network parameter is generated; When the network traffic matching result contains the normal traffic data and the attack traffic data, or when the network traffic matching result contains only the attack traffic data, marking the network traffic matching result as 1 and generating attack network parameters; The real-time network traffic data is classified based on the normal network parameters and the attack network parameters to determine the binary classification data set.
7. The network attack detection system based on pattern recognition as claimed in claim 1, characterized in that: The protection levels include: Divide multiple risk points based on the data sensitivity of the target network; Constructing multiple protection levels according to the multiple risk points, wherein there is a one-to-one correspondence between the multiple protection levels and the multiple risk points; Associating the multiple protection levels with the multiple risk points, and storing and generating the network protection information; Extracting the virtual position of the attack data source in the real-time network traffic data to determine the location of the attack data source; The network protection information is traversed to retrieve the location of the attack data source, and the protection level is determined. There is a corresponding relationship between the protection level and the location of the attack data source.
Citation Information
Patent Citations
Network security policy AI autonomous defense method and system based on security ontology modeling
CN114401113A
Power distribution communication network security situation awareness and abnormal intrusion detection method
CN114448657A
LoRaWAN network attack detection method based on decision tree
CN116707902A
Distribution network terminal attack consequence prediction and grading method
CN117834199A
Network security threat early warning analysis method and system
CN118214618A
