Network traffic anomaly analysis method and system based on generative artificial intelligence

Through multi-modal generative artificial intelligence models and deep learning technology, combined with adversarial training and data balancing, the problem of insufficient generalization ability and poor real-time performance in network traffic anomaly analysis is solved, and efficient, accurate and real-time anomaly detection is achieved. Enhanced adversarial attack identification capabilities and decision-making efficiency.

CN118573474BActive Publication Date: 2024-10-01JIANGXI GUANGTOU YOUXUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411036027.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-01
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing generative artificial intelligence models have insufficient generalization capabilities, poor real-time performance, vulnerability to adversarial attacks, and imbalanced data sets in network traffic anomaly analysis, resulting in the inability to achieve efficient, accurate, and real-time anomaly detection.

Method used

It uses a multi-modal generative artificial intelligence model combined with deep learning technology to extract and fuse network traffic characteristic information through adversarial training and data balancing technology, and uses machine learning models to perform integrated learning to generate abnormal analysis results.

Benefits of technology

It significantly improves the accuracy of anomaly detection and the adaptability of the model, enhances the identification ability of adversarial attacks, improves the system's defense capabilities and decision-making efficiency, and solves the problems of slow data processing and insufficient decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573474B_ABST
    Figure CN118573474B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a network traffic anomaly analysis method and system based on generative artificial intelligence, including: obtaining a data packet passing through a network interface, the data packet including real-time network traffic; extracting feature information of the real-time network traffic in the data packet, and passing the feature information to a generative artificial intelligence model; using a trained generative artificial intelligence model to compare normal network traffic with feature information of real-time network traffic, and outputting anomaly detection results; using a machine learning model to classify and evaluate the anomaly detection results, outputting real labels, and using an integrated learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain anomaly analysis results. The disclosed method can realize efficient, accurate and real-time network traffic anomaly analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network traffic anomaly analysis, and in particular to a network traffic anomaly analysis method and system based on generative artificial intelligence. Background Art

[0002] In the field of network security, network traffic anomaly analysis is a key link in ensuring the security of information systems. With the rapid development of generative artificial intelligence (AI) technology, especially the emergence of models such as generative adversarial networks (GANs) and variational autoencoders (VAEs), the ability to generate and process data has been significantly improved. These technologies can not only generate highly realistic data, but can also be used in multiple fields such as data enhancement, privacy protection, and content creation. However, the widespread application of generative AI technology has also brought new security challenges, especially the abnormal behaviors that may occur in network traffic and processing, which may be caused by malicious attacks, system failures, or configuration errors.

[0003] Traditional data security anomaly detection methods usually rely on rule-based detection mechanisms that identify abnormal behaviors through predefined rules. However, this approach often seems to be powerless when faced with complex network environments and diverse attack methods. In addition, with the surge in data volume, traditional detection methods are also facing challenges in processing speed and accuracy. In order to meet these challenges, researchers have begun to explore the application of generative artificial intelligence and deep learning technologies in data security anomaly detection fields such as data asset management, data security assessment, and data security disposal. These technologies can learn normal behavior patterns from large amounts of data and automatically identify abnormal behaviors that deviate from these patterns. Despite some progress, existing generative artificial intelligence network traffic anomaly analysis systems still have some key problems, such as insufficient model generalization ability, poor real-time performance, and vulnerability to adversarial attacks. Summary of the invention

[0004] The present invention discloses a network traffic anomaly analysis method based on generative artificial intelligence to solve the following problems: the existing generative artificial intelligence models have limited generalization ability, insufficient real-time performance, cannot effectively deal with adversarial attack risks and imbalanced data sets, and cannot achieve efficient, accurate and real-time network traffic anomaly analysis.

[0005] According to one aspect of the present disclosure, a network traffic anomaly analysis method based on generative artificial intelligence is provided, comprising:

[0006] S10, acquiring a data packet passing through a network interface, wherein the data packet includes real-time network traffic;

[0007] S20, extracting characteristic information of real-time network traffic in the data packet, and passing the characteristic information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network;

[0008] S30, using the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and outputting the anomaly detection result;

[0009] S40, using a machine learning model to classify and evaluate the anomaly detection results, outputting true labels, and using an ensemble learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model using a cross-validation method to obtain a trained machine learning model;

[0010] The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results;

[0011] Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels;

[0012] The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

[0013] Preferably, extracting characteristic information of network traffic in the data packet includes:

[0014] Use deep data packet inspection technology to parse the content in the data packet, adopt a data cleaning algorithm to remove noise data in the content to obtain key information; use a deep learning algorithm to extract feature information in the key information.

[0015] Preferably, a deep learning algorithm is used to extract feature information from the key information, including: processing the feature information to obtain a labeled data set, using the labeled data set to train a classification model in the deep learning algorithm, and evaluating and tuning the classification model, and classifying and grading network traffic through the trained classification model.

[0016] Preferably, the method further comprises:

[0017] An association rule mining algorithm is used to mine the association rules of the log data in the abnormal analysis result, the abnormal analysis result is deeply analyzed according to the association rules, and an abnormal report is generated.

[0018] According to one aspect of the present disclosure, a network traffic anomaly analysis system based on generative artificial intelligence is provided, comprising:

[0019] A data packet acquisition module, which acquires data packets passing through a network interface, wherein the data packets include real-time network traffic;

[0020] A feature information extraction module extracts feature information of real-time network traffic in the data packet and transmits the feature information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network;

[0021] The anomaly detection result output module uses the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and then outputs the anomaly detection result;

[0022] An integrated learning module uses a machine learning model to classify and evaluate the anomaly detection results, outputs true labels, and uses an integrated learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model through a cross-validation method to obtain a trained machine learning model;

[0023] The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results;

[0024] Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels;

[0025] The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

[0026] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the above-mentioned network traffic anomaly analysis method based on generative artificial intelligence.

[0027] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned network traffic anomaly analysis method based on generative artificial intelligence is implemented.

[0028] Compared with the prior art, the beneficial effects of the present disclosure are:

[0029] 1) This disclosure adopts a multimodal generative artificial intelligence model, which extracts and fuses features of different modal data through deep learning technology, and can capture the complex correlations and subtle abnormal features between data. The design of this model structure enables the system to more finely identify abnormal patterns when processing data flow, thereby significantly improving the accuracy of anomaly detection.

[0030] 2) This disclosure uses adversarial training technology to enable the model to maintain stable performance when facing carefully constructed adversarial samples, effectively improving the model's ability to recognize malicious inputs and enhancing the system's defense capabilities.

[0031] 3) This paper adopts data enhancement, oversampling and undersampling techniques to balance the normal and abnormal samples in the training data set. In addition, the imbalance problem of the data set is handled through cost-sensitive learning and data balancing strategies, which further improves the model's ability to detect abnormal samples and enhances the model's adaptability and generalization ability.

[0032] 4) The present invention automatically generates decision suggestions based on anomaly detection results, assists security analysts in making rapid responses, improves the efficiency and accuracy of decision-making, solves the problems of slow data processing and insufficient decision support in the prior art, and improves the practicality and user satisfaction of the entire data security anomaly detection system.

[0033] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

[0034] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.

[0036] Figure 1 A flow chart of a network traffic anomaly analysis method based on generative artificial intelligence is shown;

[0037] Figure 2 A flow chart showing the steps for classifying and rating network traffic;

[0038] Figure 3 A schematic diagram of the specific training steps of the generative adversarial network is shown;

[0039] Figure 4 The structural block diagram of the network traffic anomaly analysis system based on generative artificial intelligence is shown. DETAILED DESCRIPTION

[0040] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0041] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0042] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0043] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0044] It can be understood that the above-mentioned network traffic anomaly analysis method and system embodiments based on generative artificial intelligence mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.

[0045] Existing generative artificial intelligence models are usually trained for specific data types and scenarios. They are easily affected by specific data distribution during the learning process, resulting in insufficient detection capabilities for new or variant anomalies. In addition, in a high-traffic data environment, due to the complexity of the algorithm itself or insufficient hardware resource configuration, the existing detection system may not be able to process all data in real time, resulting in detection delays and failure to meet real-time requirements. Generative artificial intelligence models may not fully consider the defense mechanism of adversarial attacks when designing, or the model itself is not robust enough, making it unable to effectively respond to adversarial attack risks such as malicious data flows carefully designed by attackers. When normal data far outnumbers abnormal data, this unbalanced data set distribution may cause the model to overfit normal data during the learning process and fail to fully learn the characteristics of abnormal data. In order to solve these problems, a network traffic anomaly analysis method based on generative artificial intelligence is proposed to achieve efficient, accurate and real-time network traffic anomaly analysis.

[0046] Based on the above ideas, the present invention proposes a network traffic anomaly analysis method based on generative artificial intelligence. Figure 1 A flow chart showing a method for analyzing network traffic anomalies based on generative artificial intelligence is shown. The method comprises:

[0047] S10, acquiring a data packet passing through a network interface, wherein the data packet includes real-time network traffic;

[0048] S20, extracting characteristic information of real-time network traffic in the data packet, and passing the characteristic information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network;

[0049] S30, using the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and outputting the anomaly detection result;

[0050] S40, using a machine learning model to classify and evaluate the anomaly detection results, outputting true labels, and using an ensemble learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model using a cross-validation method to obtain a trained machine learning model;

[0051] The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results;

[0052] Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels;

[0053] The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

[0054] In the embodiments of the present disclosure and other possible embodiments, generative artificial intelligence models such as generative adversarial networks (GANs) and variational autoencoders (VAEs) are used in combination with traditional machine learning algorithms to conduct in-depth analysis of network traffic, thereby being able to identify complex abnormal patterns, and based on the results of data asset management, data security event management, and data security disposal management, decision-making data security policies are implemented to generate intelligent data security protection capabilities. In addition, the system eventually automatically generates detailed abnormality reports to provide decision support for security analysts, significantly improving the efficiency and response speed of network security protection.

[0055] The specific steps of the network traffic anomaly analysis method based on generative artificial intelligence are as follows:

[0056] S10. Acquire data packets passing through a network interface, wherein the data packets include real-time network traffic.

[0057] In the embodiments of the present disclosure, the network traffic of the network interface is monitored in real time, including but not limited to data packets of TCP / IP, UDP, ICMP and other protocols. Advanced network sniffing technology is used to obtain data packets, such as using the libpcap library for data packet capture, which supports multiple network interfaces and protocols. Data packets captured through the network interface are transmitted to the preprocessing stage for further processing.

[0058] S20. Extract characteristic information of real-time network traffic in the data packet, and pass the characteristic information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing the parameters of the generator and the discriminator network.

[0059] In the embodiments of the present disclosure and other possible embodiments, the preprocessing stage includes data packet reassembly, protocol parsing, data cleaning and feature extraction. The content in the data packet is parsed using deep packet inspection (DPI) technology to extract key information, such as source IP, destination IP, port number, data packet size, timestamp, etc. In addition, a data cleaning algorithm is used to remove noise data in the content to obtain key information to ensure the accuracy of the analysis. The specific data cleaning algorithm uses a filter technology to identify and filter noise data. For example, a moving average or median filter is used to smooth time series data, or an anomaly detection algorithm based on clustering or density estimation is used to identify noise data and remove it. The preprocessing stage receives data packets from the network interface, parses and cleans them to obtain key information, and uses a deep learning algorithm to extract feature information from the key information.

[0060] In this embodiment, a deep learning algorithm is used to extract feature information from the key information, including: processing the feature information to obtain a labeled data set, using the labeled data set to train a classification model in the deep learning algorithm, and evaluating and tuning the classification model, and classifying and grading network traffic through the trained classification model. Through active discovery by scanning probes or through flow probe protocol analysis, target assets and data are labeled according to preset data features, and natural semantic recognition + machine learning technology is combined to improve the practice of diversity in the data classification and grading process, and then the network traffic is classified and graded according to the classification and grading strategy. Figure 2 As shown, the specific implementation steps are as follows:

[0061] S201. Use natural semantic recognition technology to perform semantic analysis and feature extraction on text data, such as using a bag-of-words model or a word embedding model to convert text into a vector representation.

[0062] S202: Based on the results of natural semantic recognition and combined with other data features, a labeled data set is obtained, which may include word frequency, TF-IDF value, part-of-speech tags, etc. of the text.

[0063] S203, using the labeled data set to train a classification model in a deep learning algorithm, such as a support vector machine (SVM), a decision tree, a random forest, etc. During the training process, the text features are associated with their corresponding classification labels for learning.

[0064] S204: Evaluate the trained classification model, and use methods such as cross-validation to evaluate its performance. Optimize the classification model based on the evaluation results, such as adjusting hyperparameters, feature selection, etc.

[0065] S205: Use the trained classification model to classify and grade the new network traffic. For text data, after converting it into a feature vector, use the trained classification model to predict its category or level.

[0066] By classifying and grading network traffic data, including malicious traffic, normal traffic, and abnormal traffic, the classification model automatically divides network traffic into different categories based on the characteristics of the data. By continuously optimizing the classification model and providing more representative data samples, the accuracy and diversity of classification can be improved.

[0067] S30. Use the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and output the anomaly detection result.

[0068] In the embodiments of the present disclosure and other possible embodiments, in the feature extraction stage, the system not only extracts traditional network traffic features, but also uses deep learning algorithms to extract advanced features from the data packet content, such as traffic patterns, abnormal behavior patterns, etc. These advanced features can better reflect the complexity and dynamics of network traffic.

[0069] The generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing the parameters of the generator and the discriminator network.

[0070] In this embodiment, generative artificial intelligence models such as generative adversarial networks (GANs) or variational autoencoders (VAEs) are used for training. These models can learn the normal distribution of network traffic, so that they can generate or reconstruct normal traffic and then identify abnormal traffic that does not conform to the normal pattern. After receiving the feature information of real-time network traffic, the generative artificial intelligence model uses the trained generative artificial intelligence model to analyze and identify potential abnormal behaviors. Figure 3 As shown in Figure 2, the specific training steps for generating adversarial networks are as follows:

[0071] S301. Collect normal network traffic as a training data set. The training data set should contain enough normal network traffic samples so that the model can learn the distribution and characteristics of normal network traffic.

[0072] S302, construct a generator and a discriminator, the generator is used to receive random noise as input and generate data samples similar to normal network traffic; the discriminator is used to receive samples generated by the generator or real normal network traffic samples, and try to distinguish which are forged samples from the generator and which are real normal network traffic samples.

[0073] The goal of the Generative Adversarial Network is to make the generator generate realistic samples as much as possible, while making it difficult for the discriminator to distinguish between the generated samples and the real normal network traffic samples. Therefore, two loss functions need to be defined: Generator Loss, which makes the samples generated by the generator closer to the real samples, and usually uses the discriminator to measure the error of the generated samples; Discriminator Loss, which measures the classification accuracy of the discriminator for the generated samples and the real samples, that is, the performance of the discriminator in distinguishing between real and fake samples.

[0074] S303, adversarial training is achieved by alternately optimizing the parameters of the generator and the discriminator. In each training iteration, the parameters of the discriminator network are first updated to minimize the loss of the discriminator so that it can better distinguish between real samples and generated samples. Then the parameters of the generator network are updated to minimize the loss of the generator so that the samples it generates are closer to real samples. Repeat the above steps until the samples generated by the generator reach a satisfactory level of realism or the upper limit of the number of training times is reached.

[0075] Furthermore, the generative AI model compares the characteristic information of normal network traffic with that of real-time network traffic, and detects anomalies by reconstructing errors or differences in generated samples. The system is also able to dynamically adjust the parameters of the generative AI model to adapt to changes in the network environment. The anomaly detection results will be passed to the machine learning ensemble model for further analysis.

[0076] S40, using a machine learning model to classify and evaluate the anomaly detection results, outputting true labels, and using an ensemble learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model using a cross-validation method to obtain a trained machine learning model;

[0077] The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results;

[0078] Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels;

[0079] The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

[0080] In the embodiments of the present disclosure and other possible embodiments, the output of the generative artificial intelligence model is combined with a supervised learning algorithm (such as support vector machine SVM, random forest, deep neural network DNN, etc.) to train the machine learning model to further improve the accuracy of anomaly detection. Support vector machine (SVM) is a supervised learning algorithm suitable for classification and regression tasks. In the field of network security, SVM is often used for anomaly detection and classification tasks, including anomaly detection and classification of network traffic.

[0081] In this embodiment, the steps of using a support vector machine (SVM) to train a machine learning model are as follows:

[0082] S401. Extract feature data from the anomaly detection results output by the generative artificial intelligence model. The feature data may be statistical features, spectrum features, time series features, etc. of network traffic. Label the extracted feature data, for example, label normal traffic as 1 and abnormal traffic as 0.

[0083] S402: Standardize or normalize the extracted feature data to ensure that the numerical ranges of different feature data are consistent, so as to improve the training effect of the machine learning model.

[0084] S403. When selecting SVM, it is necessary to consider choosing a suitable kernel function. Common kernel functions include linear kernel, polynomial kernel and Gaussian kernel. In the process of training a machine learning model using a labeled training data set, the machine learning model will look for an optimal hyperplane to separate data points of different categories while maximizing the classification interval. The hyperparameters of the machine learning model, such as the penalty parameter C and kernel function parameters, are tuned through methods such as cross-validation to improve the generalization ability of the model.

[0085] S404. After the machine learning model is trained, the performance of the trained machine learning model is evaluated by evaluation indicators. Common evaluation indicators include accuracy, recall, F1 score, etc. The cross-validation method is used to evaluate the generalization ability of the model. Common cross-validation methods include k-fold cross-validation and leave-one-out cross-validation.

[0086] S405. Use the trained machine learning model to predict the label of the new sample, thereby realizing anomaly detection or classification of network traffic.

[0087] The machine learning integration module receives anomaly detection results from the generative AI model and uses the trained machine learning model for classification and evaluation.

[0088] The training steps of the machine learning integration module are as follows:

[0089] S406. Prepare the output results of the generative artificial intelligence model and the machine learning model, which can be used directly as input features, or can be combined or reduced in dimension.

[0090] S407. Select an ensemble learning algorithm: Common ensemble learning algorithms include stacking, boosting, bagging, etc.

[0091] S408, using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain a prediction result;

[0092] The prediction results are input into the second-layer model, and the second-layer model is trained using the prediction results and the true labels, which is usually a simple classifier (such as logistic regression, decision tree).

[0093] S409, combine the first layer model and the second layer model to form a machine learning integrated model to obtain anomaly analysis results. Use the voting method to vote on the outputs of each single model and select the final classification result. Assign different weights to each single model and fuse the outputs of each model according to the weights.

[0094] S410. Use cross-validation method to evaluate the performance and generalization ability of the integrated model, and use indicators such as accuracy, recall rate, F1 score, etc. to evaluate the performance of the model.

[0095] Use ensemble learning methods, such as stacking or boosting, to fuse the outputs of generative AI models and machine learning models to obtain more robust anomaly analysis results.

[0096] Taking the stacking method as an example, the steps are as follows:

[0097] S411. Prepare training data including output results of the generative artificial intelligence model and the machine learning model.

[0098] S412. Select a set of basic models, including generative artificial intelligence models and machine learning models. These basic models can be different types of classifiers, such as decision trees, support vector machines, random forests, etc.

[0099] Use cross-validation to train the base model to ensure that the model has good generalization ability. Use the training data to train each base model and predict the validation set. Use the prediction results of each base model as new features to construct new training data.

[0100] S413. Select a secondary model, such as logistic regression, decision tree, etc., and use cross-validation to train the secondary model; use the new features generated by the first-layer model as input and the true label as the target output to train the secondary model.

[0101] S414. Use cross-validation or an independent test set to evaluate the performance of the stacked model. You can use indicators such as accuracy, recall, and F1 score to evaluate the performance of the model.

[0102] S415. Use the trained stacking model to predict the label of the new sample to achieve anomaly detection or classification of network traffic.

[0103] Furthermore, the detected anomaly analysis results are analyzed in depth, including the type of anomaly (such as DDoS attack, data leakage, malware communication, etc.), possible attack sources, affected systems, etc. The association rule mining algorithm is used to mine the association rules of the log data in the anomaly analysis results, and the anomaly analysis results are analyzed in depth according to the association rules, and an anomaly report is generated. The specific steps of using the association rule mining algorithm to conduct in-depth analysis of the detected anomaly are as follows:

[0104] S416. Assume that there is log data of a network security system, which contains records of various network activities, including source IP address, destination IP address, timestamp and other information.

[0105] S417. Use an association rule mining algorithm, such as the Apriori algorithm, to discover association rules between abnormal events.

[0106] The specific process is as follows:

[0107] Convert log data into a format suitable for association rule mining algorithms, usually by converting the data into transaction item sets, where each transaction item set represents a sequence of events;

[0108] Use the Apriori algorithm to mine association rules in log data. These association rules help discover frequent item sets and association relationships between abnormal events.

[0109] Analyze the association rules obtained by mining to identify the associations and patterns between abnormal events. For example, it can be found that there is a frequent simultaneous or sequential relationship between certain abnormal events, thereby inferring the possible attack chain or attack path.

[0110] S418. Based on the results of association rule mining, conduct in-depth analysis of abnormal events and generate a detailed abnormal report. The report content may include information such as the association between abnormal events, possible attack chains, and affected systems or resources. This information can help security analysts better understand the nature and impact of abnormal events, so as to formulate corresponding security strategies and countermeasures.

[0111] The specific example is as follows: The following two frequent item sets and association rules are found in the log data.

[0112] Frequent item set 1: {abnormal event A, abnormal event B, abnormal event C}

[0113] Frequent itemset 2: {abnormal event B, abnormal event D}

[0114] Association rule 1: {abnormal event A} -> {abnormal event B}

[0115] Association rule 2: {abnormal event C} -> {abnormal event D}

[0116] By analyzing these association rules, the following conclusions are drawn:

[0117] There may be a certain causal relationship between abnormal event A and abnormal event B, that is, the occurrence of abnormal event A may lead to the occurrence of abnormal event B.

[0118] There is also a certain correlation between abnormal event C and abnormal event D, that is, the occurrence of abnormal event C may lead to the occurrence of abnormal event D.

[0119] By further analyzing the relationship between abnormal event A and abnormal event C, the possible attack path or attack chain can be inferred.

[0120] Furthermore, the system automatically generates a detailed anomaly report, including the anomaly description, time, location, impact assessment, and recommended countermeasures. The report can be presented in a visual form, which is convenient for security analysts to quickly understand and respond. The report generation module converts the analysis results into an easy-to-understand report format and provides it to security analysts.

[0121] In this embodiment, security strategies are recommended based on the results of artificial intelligence analysis to provide intelligent suggestions for security decisions. Relying on in-depth analysis and risk assessment of data flow, potential security threats can be identified. Through security standard management, all security measures and processes are ensured to meet established standards. This provides a framework and guidance for recommending security strategies, ensuring that the formulation and implementation of strategies do not deviate from the organization's security policies and industry standards. From the above content, it can be seen that the network traffic anomaly analysis method based on generative artificial intelligence designed in the embodiment of the present disclosure can achieve efficient, accurate and real-time network traffic anomaly analysis.

[0122] As another aspect of the embodiments of the present disclosure, a network traffic anomaly analysis system 100 based on generative artificial intelligence is also provided. Figure 4 As shown, including:

[0123] Data packet acquisition module 1, acquires data packets passing through the network interface, wherein the data packets include real-time network traffic;

[0124] Feature information extraction module 2, extracts feature information of real-time network traffic in the data packet, and transmits the feature information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network;

[0125] The anomaly detection result output module 3 uses the trained generative artificial intelligence model to compare the normal network traffic with the characteristic information of the real-time network traffic, and then outputs the anomaly detection result;

[0126] An integrated learning module 4 uses a machine learning model to classify and evaluate the anomaly detection results, outputs a true label, and uses an integrated learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model through a cross-validation method to obtain a trained machine learning model;

[0127] The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results;

[0128] Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels;

[0129] The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

[0130] The advantage of the disclosed embodiment is that it can provide a comprehensive, efficient and robust network traffic anomaly analysis system, and can also be used to implement any of the methods in Example 1. The system integrates advanced generative artificial intelligence technology and deep learning methods to effectively solve the shortcomings of the prior art in terms of anomaly detection accuracy, real-time performance, model robustness and data processing efficiency, and meets the urgent needs of the modern network security field for intelligent and automated data security anomaly detection.

[0131] A possible alternative is to build a rule-based anomaly detection system (RB-ADS). This system relies on expert knowledge to develop a set of rules that define the boundaries of normal and abnormal behavior in data flow. RB-ADS identifies anomalies by matching events in the data stream with a predefined set of rules. For example, if an event in the data stream triggers multiple security rules, the system will mark the event as a potential anomaly. The advantages of this solution are: the rule system is easy to understand and implement because they are based on clear logic and conditions; the rule system provides a high degree of interpretability because each rule can be traced back to the logic and purpose behind it; once the rules are defined, the system can be quickly deployed and start detecting anomalies. The disadvantages are: the formulation of rules is highly dependent on expert knowledge, which may lead to knowledge gaps, especially in the face of emerging network threats; the rule system may have difficulty adapting to the rapidly changing network environment and evolving attack patterns; the predefined rules may not cover all possible anomalies, especially those unknown or newly emerging anomalies; as the network environment changes, the rules need to be constantly updated and maintained, which may lead to high maintenance costs.

[0132] In summary, although the rule-based anomaly detection system may be effective in certain specific scenarios, it cannot be compared with the generative artificial intelligence data flow anomaly analysis system disclosed in this disclosure in terms of adaptive learning ability, processing complexity and multimodal data, robustness and generalization ability, real-time performance and efficiency, etc. Therefore, the system disclosed in this disclosure has obvious advantages and advancement in technology and is difficult to be replaced by the rule-based system.

[0133] Based on the description of the above embodiments, it can be seen that the embodiments of the present disclosure can achieve the following technical effects:

[0134] 1) This disclosure adopts a multimodal generative artificial intelligence model, which extracts and fuses features of different modal data through deep learning technology, and can capture the complex correlations and subtle abnormal features between data. The design of this model structure enables the system to more finely identify abnormal patterns when processing data flow, thereby significantly improving the accuracy of anomaly detection.

[0135] 2) This disclosure uses adversarial training technology to enable the model to maintain stable performance when facing carefully constructed adversarial samples, effectively improving the model's ability to recognize malicious inputs and enhancing the system's defense capabilities.

[0136] 3) This paper adopts data enhancement, oversampling and undersampling techniques to balance the normal and abnormal samples in the training data set. In addition, the imbalance problem of the data set is handled through cost-sensitive learning and data balancing strategies, which further improves the model's ability to detect abnormal samples and enhances the model's adaptability and generalization ability.

[0137] 4) The present invention automatically generates decision suggestions based on anomaly detection results, assists security analysts in making rapid responses, improves the efficiency and accuracy of decision-making, solves the problems of slow data processing and insufficient decision support in the prior art, and improves the practicality and user satisfaction of the entire data security anomaly detection system.

[0138] The embodiment of the present disclosure also proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above-mentioned network traffic anomaly analysis method based on generative artificial intelligence. The electronic device can be provided as a terminal, a server, or other forms of equipment.

[0139] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned network traffic anomaly analysis method based on generative artificial intelligence is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.

[0140] Those skilled in the art will understand that in the above-mentioned network traffic anomaly analysis method and system based on generative artificial intelligence in the specific implementation mode, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0141] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0142] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. Network traffic anomaly analysis method based on generative artificial intelligence, It is characterized in that The steps include: S10, acquiring a data packet passing through a network interface, wherein the data packet includes real-time network traffic; S20, extracting characteristic information of real-time network traffic in the data packet, and passing the characteristic information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network; S30, using the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and outputting the anomaly detection result; S40, using a machine learning model to classify and evaluate the anomaly detection results, outputting true labels, and using an ensemble learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model using a cross-validation method to obtain a trained machine learning model; The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results; Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels; The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

2. The method according to claim 1, It is characterized in that Extracting characteristic information of network traffic in the data packet includes: Use deep data packet inspection technology to parse the content in the data packet, adopt a data cleaning algorithm to remove noise data in the content to obtain key information; use a deep learning algorithm to extract feature information in the key information.

3. The method according to claim 2, It is characterized in that The feature information in the key information is extracted using a deep learning algorithm, including: processing the feature information to obtain a labeled data set, using the labeled data set to train a classification model in the deep learning algorithm, evaluating and tuning the classification model, and classifying and grading network traffic through the trained classification model.

4. The method according to claim 1, It is characterized in that The method further comprises: An association rule mining algorithm is used to mine the association rules of the log data in the abnormal analysis result, the abnormal analysis result is deeply analyzed according to the association rules, and an abnormal report is generated.

5. Network traffic anomaly analysis system based on generative artificial intelligence, It is characterized in that include: A data packet acquisition module, which acquires data packets passing through a network interface, wherein the data packets include real-time network traffic; A feature information extraction module extracts feature information of real-time network traffic in the data packet and transmits the feature information to a generative artificial intelligence model; wherein the generative artificial intelligence model is trained using normal network traffic, including: collecting normal network traffic as a training data set, constructing a generator and a discriminator network, and training the generative artificial intelligence model by alternately optimizing parameters of the generator and the discriminator network; The anomaly detection result output module uses the trained generative artificial intelligence model to compare the characteristic information of normal network traffic with the real-time network traffic, and then outputs the anomaly detection result; An integrated learning module uses a machine learning model to classify and evaluate the anomaly detection results, outputs true labels, and uses an integrated learning method to fuse the outputs of the generative artificial intelligence model and the machine learning model to obtain an anomaly analysis result, wherein the machine learning model is trained using a supervised learning algorithm, including: extracting feature data from the anomaly detection results output by the generative artificial intelligence model, labeling the feature data to obtain a labeled training data set, training the machine learning model using the labeled training data set, and tuning the hyperparameters of the machine learning model through a cross-validation method to obtain a trained machine learning model; The outputs of the generative artificial intelligence model and the machine learning model are integrated, including: using the anomaly detection results of the generative artificial intelligence model and the real labels output by the machine learning model as training data, using the training data to train the first layer model, and predicting the training data through the first layer model to obtain prediction results; Input the prediction results into the second layer model, and train the second layer model using the prediction results and the true labels; The trained first-layer model and the second-layer model are combined to form a machine learning integration model to obtain abnormal analysis results.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the network traffic anomaly analysis method based on generative artificial intelligence as described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the network traffic anomaly analysis method based on generative artificial intelligence as described in any one of claims 1 to 4 is implemented.