Industrial control system flow anomaly detection method based on deep learning

Through the deep learning model and long-short-term memory network, the network traffic characteristics of the industrial control system are extracted and future behaviors are predicted. This solves the problem of insufficient recognition ability and real-time performance of traffic anomaly detection in the existing technology, and achieves accurate identification and detection of complex anomalies. Quick response ensures the security and stability of the system.

CN118713855AInactive Publication Date: 2024-09-27WENZHOU POLYTECHNIC
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410657250.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-25
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing traffic anomaly detection methods in industrial control systems are difficult to identify complex network traffic patterns, lack the ability to predict future traffic behavior, and lack real-time and efficiency in the traffic anomaly detection process, making them unable to effectively respond to new and complex network attacks.

Method used

Using a method based on deep learning, by introducing deep learning models and long short-term memory networks, network traffic data are collected and preprocessed in real time, high-dimensional feature vectors are extracted, traffic pattern recognition models are built, future traffic behavior is predicted, and anomalies are generated through difference vectors Detection model to achieve real-time traffic anomaly detection and multi-level alarms.

Benefits of technology

It significantly improves the accuracy and early warning capabilities of flow anomaly detection, ensures the safe and stable operation of the industrial control system, can quickly respond to and handle abnormal situations, and reduces the harm of abnormal flow to the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713855A
    Figure CN118713855A
Patent Text Reader

Abstract

The invention relates to the technical field of industrial control system network security, in particular to an industrial control system flow anomaly detection method based on deep learning, which comprises the following steps: S1, collecting network flow data in real time; s2, carrying out preprocessing on the network flow data; s3, carrying out feature extraction on the preprocessed flow data; s4, performing flow pattern recognition on the feature vectors extracted in the S3, and constructing a flow pattern recognition model; s5, predicting traffic behaviors in a period of time in the future, and generating predicted traffic data; and S6, comparing the predicted traffic data generated in the step S5 with the actual traffic data in the step S2. According to the invention, by introducing the deep learning model and the long short-term memory network (LSTM), accurate identification of a complex traffic mode, effective prediction of a future traffic behavior, real-time traffic anomaly detection and rapid response of a multi-level alarm mechanism are realized, and the detection accuracy, early warning capability and safety of an industrial control system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial control system network security technology, and in particular to an industrial control system flow anomaly detection method based on deep learning. Background Art

[0002] With the widespread application of industrial control systems (ICS) in various fields, their network security has become a crucial issue. Industrial control systems achieve automated control of industrial processes through complex network structures. Anomaly detection of network traffic plays a key role in ensuring system security and stable operation. However, the complexity and variability of the industrial control system network environment make traditional traffic anomaly detection methods based on rules and statistical models face huge challenges. These methods often find it difficult to maintain efficiency and accuracy when processing large-scale, high-dimensional and dynamically changing traffic data, and cannot effectively deal with new and complex network attack methods.

[0003] The present invention aims to solve the problems of traffic anomaly detection existing in the prior art, which mainly include the following aspects: first, the existing methods are insufficient in identifying complex network traffic patterns, and it is difficult to accurately extract and characterize traffic anomaly features; second, traditional detection models lack the ability to predict future traffic behavior and cannot provide early warning of potential traffic anomalies; finally, the prior art lacks real-time and high efficiency in the process of traffic anomaly detection and cannot effectively respond to traffic anomalies as soon as they occur.

[0004] Therefore, the present invention proposes a flow anomaly detection method for an industrial control system based on deep learning. By introducing a deep learning model and a long short-term memory network, the accuracy, real-time and early warning capabilities of flow anomaly detection are improved, thereby ensuring the safe and stable operation of the industrial control system. Summary of the invention

[0005] Based on the above objectives, the present invention provides an industrial control system flow anomaly detection method based on deep learning.

[0006] The method for detecting abnormal flow in industrial control systems based on deep learning includes the following steps:

[0007] S1: Collect network traffic data in real time through traffic sensors in industrial control systems and store the collected data in a database;

[0008] S2: preprocessing the network traffic data, specifically including data cleaning, denoising and normalization, to obtain preprocessed traffic data;

[0009] S3: Use the deep learning model to extract features from the preprocessed traffic data and extract high-dimensional feature vectors that can reflect the abnormal characteristics of traffic;

[0010] S4: Based on the deep learning model of long short-term memory network, the feature vector extracted in S3 is used to perform traffic pattern recognition and build a traffic pattern recognition model;

[0011] S5: Using the traffic pattern recognition model constructed in S4, predict the traffic behavior in the future and generate predicted traffic data;

[0012] S6: Compare the predicted traffic data generated in S5 with the actual traffic data in S2, calculate the difference between the two, and generate a difference vector;

[0013] S7: Input the difference vector generated in S6 as training data into the deep neural network for supervised learning to generate an anomaly detection model capable of identifying traffic anomalies;

[0014] S8: The real-time collected traffic data is processed by S2 to S6 and input into the anomaly detection model trained in S7 to perform real-time traffic anomaly detection;

[0015] S9: When a flow anomaly is detected in S8, different levels of alarm information are generated according to the anomaly level, and prompts are given through the alarm device of the industrial control system.

[0016] Furthermore, the S1 specifically includes:

[0017] S11: Deploy flow sensors at various key nodes of the industrial control system, including the main control server entrance, the communication interface between each subsystem, the firewall port connected to the external network and each major data exchange center; the flow sensor includes a flow meter and a data acquisition module, wherein the flow meter is used to monitor the transmission rate and flow characteristics of network data packets in real time, and the data acquisition module is used to convert the monitored data into a digital signal;

[0018] S12: Transmitting the digital signal to a data acquisition server through a network interface of the industrial control system, wherein the data acquisition server includes a cache module and a data transmission module, wherein the cache module is used to temporarily store the flow data collected in real time, and the data transmission module is used to transmit the cached data to a central database through a secure transmission protocol, wherein the transmission protocol includes HTTPS and SSL / TLS;

[0019] S13: Establishing a dedicated traffic data storage area in the central database, using big data storage technology to store traffic data to ensure storage efficiency and data integrity, wherein the big data storage technology is Hadoop or NoSQL database;

[0020] S14: The traffic data stored in the central database is backed up and encrypted regularly to prevent data loss and unauthorized access. The encryption process uses the Advanced Encryption Standard AES algorithm to encrypt the data.

[0021] Furthermore, the S2 specifically includes:

[0022] S21: performing data cleaning on the network traffic data, specifically including deleting incomplete data records and abnormal values, identifying and deleting data that does not conform to the normal range through preset rules, and the preset rules include setting the data packet size range and the transmission time window;

[0023] S22: De-noising the cleaned data by using wavelet transform technology to decompose the signal into different frequency components, remove high-frequency noise components, and retain useful low-frequency information;

[0024] S23: normalizing the denoised data, using a minimum-maximum normalization method to scale the data to a preset range to eliminate differences between different feature dimensions, and obtaining preprocessed traffic data.

[0025] Furthermore, the S3 specifically includes:

[0026] S31: Input the preprocessed traffic data into the convolutional neural network and use the convolutional layer to extract features. The calculation formula of the convolutional layer is: Among them, x i,j is the i,jth data point of the preprocessed traffic data, w m,n,k is the m,nth weight of the kth convolution kernel, b k is the bias of the kth convolution kernel, y i,j,k is the convolution output of the kth convolution kernel at position i, j;

[0027] S32: The output result of the convolutional layer is input to the pooling layer for dimensionality reduction. The calculation formula of the pooling layer is: i,j,k =max 0≤m<M,0≤n<N (x i+m,j+n ), where x i,j is the output data of the convolution layer, max represents the maximum pooling operation, y i,j,k is the pooling output, i, j is the starting position of the pooling window, and k is the channel of the pooling layer;

[0028] S33: Flatten the output of the pooling layer and input it into the fully connected layer to generate a high-dimensional feature vector. The calculation formula of the fully connected layer is: Among them, x i is the i-th input data point after flattening, w i,k is the i,kth weight of the fully connected layer, bk is the kth bias of the fully connected layer, y k is the kth output of the fully connected layer;

[0029] S34: The output result of the fully connected layer is processed by an activation function, using the ReLU activation function. The calculation formula of the activation function is: y=max(0,x), where x is the output data of the fully connected layer, and y is the output of the activation function. The result after processing by the activation function is a high-dimensional feature vector reflecting the abnormal characteristics of the traffic.

[0030] Furthermore, the S4 specifically includes:

[0031] S41: Input the high-dimensional feature vector generated in S3 into the long short-term memory network;

[0032] S42: Perform traffic pattern recognition on the output of the LSTM network, specifically by stacking multiple layers of LSTM networks to increase the depth of the network to capture complex time dependencies; and t as a high-dimensional representation of traffic patterns;

[0033] S43: The output of the long short-term memory network is classified through the fully connected layer. The calculation formula of the classification layer is: y = softmax (W y ·h T +b y ), where W y is the weight matrix of the classification layer; b y is the bias vector of the classification layer; h T is the output of the last LSTM network unit; is the Softmax activation function, which is used to convert the output into a probability distribution;

[0034] S44: Constructing a traffic pattern recognition model according to the classification result, wherein the model can recognize normal traffic patterns and abnormal traffic patterns.

[0035] Furthermore, the S5 specifically includes:

[0036] S51: Input the real-time collected traffic data into the traffic pattern recognition model constructed in S4 to obtain the high-dimensional representation h of the current traffic pattern t ;

[0037] S52: The high-dimensional representation h of the current traffic pattern t As input, it is passed to the long short-term memory network for future traffic prediction;

[0038] S53: Predict the traffic data in the future based on the output of the long short-term memory network and generate predicted traffic data The calculation formula is: in, is the predicted traffic data at the next moment; W o is the weight matrix of the output layer; b o is the bias vector of the output layer; h t+1 is the output hidden state of the long short-term memory network;

[0039] S54: Repeat S51 to S53 to gradually predict the traffic data at multiple moments in the future until a predicted traffic data sequence within a predetermined time range is obtained.

[0040] Furthermore, the S6 specifically includes:

[0041] S61: The predicted flow data generated in step S5 is Align with the actual traffic data preprocessed in S2 to ensure that the two correspond to the same timestamps and data points;

[0042] S62: Calculate the difference between the predicted flow data and the actual flow data, specifically using the mean square error formula, which is: Where N is the number of samples of flow data; is the i-th predicted traffic data point; x i is the i-th actual flow data point; is the square difference between the predicted data and the actual data;

[0043] S63: Calculate the difference at each time point to generate a difference vector d t , the formula is: t =x t -x t , where d t is the difference at the tth time point; x t is the predicted traffic data at the tth time point; x t is the actual traffic data at the tth time point;

[0044] S64: Combine the difference vectors of all time points to form a complete difference vector sequence D, the formula is: D = [d1 , d2 , … , d T ], where D is the difference vector sequence; d t is the difference vector for each time point; T is the total number of time points in the prediction time range.

[0045] Furthermore, the S7 specifically includes:

[0046] S71: Use the difference vector sequence D generated in step S6 as training data, the difference vector sequence includes the difference vectors d at multiple time points t , where each d t Represents the difference between the predicted flow data and the actual flow data at the tth time point;

[0047] S72: labeling the difference vector sequence, labeling normal traffic and abnormal traffic with different labels according to known traffic data, and generating a labeled training data set;

[0048] S73: inputting the labeled training data set into a deep neural network for training, where the structure of the deep neural network includes an input layer, multiple hidden layers and an output layer;

[0049] S74: During the training process, the weights and biases of the neural network are updated using the back propagation algorithm and the gradient descent optimization algorithm;

[0050] S75: After the training is completed, an anomaly detection model is generated, which can identify traffic anomalies according to the input difference vector and output corresponding anomaly detection results.

[0051] Furthermore, the S8 specifically includes:

[0052] S81: preprocessing the real-time collected traffic data through S2, specifically including data cleaning, denoising and normalization processing, to obtain preprocessed traffic data;

[0053] S82: extracting features from the preprocessed traffic data through S3, and using a convolutional neural network to extract a high-dimensional feature vector reflecting traffic anomaly features;

[0054] S83: Use S4 to identify the traffic pattern of the feature vector and construct a high-dimensional representation of the current traffic pattern based on the long short-term memory network model;

[0055] S84: input the high-dimensional representation of the current traffic pattern into S5 to predict traffic behavior, use the long short-term memory network model to predict traffic data in the future, and generate predicted traffic data;

[0056] S85: Compare the predicted flow data with the actual flow data in S2, calculate the difference according to step S6, and generate a difference vector;

[0057] S86: Input the generated difference vector to the anomaly detection model trained in S7. The calculation formula of the anomaly detection model is: y=σ(W·D+b), where D is the input difference vector; W is the weight matrix of the anomaly detection model; b is the bias vector of the anomaly detection model; y is the output result of the anomaly detection; σ is the activation function;

[0058] S87: Determine whether there is a flow anomaly based on the output result of the anomaly detection model. When y exceeds a preset threshold, it is determined to be a flow anomaly.

[0059] Furthermore, the S9 specifically includes:

[0060] S91: when a flow anomaly is detected in S8, the severity of the flow anomaly is determined according to the output result y of the anomaly detection model;

[0061] S92: Classify the abnormality into different levels, including mild, moderate and severe, and the specific classification criteria are determined according to the preset threshold range;

[0062] S93: Generate alarm information of corresponding levels according to the detected abnormality level, including minor abnormality, medium abnormality and severe abnormality; wherein, minor abnormality is used to generate low-level alarm information to prompt the system administrator to pay attention to the abnormal situation; medium abnormality is used to generate medium-level alarm information to prompt the system administrator to conduct inspection and analysis; severe abnormality is used to generate high-level alarm information to immediately notify the system administrator and trigger the emergency processing mechanism;

[0063] S94: Alarm prompts are issued through the alarm device of the industrial control system, including low-level alarms, medium-level alarms and high-level alarms: among them, low-level alarms record abnormal information through system logs and send emails or text messages to notify system administrators; medium-level alarms pop up an alarm prompt window on the system interface and send emails or text messages to notify system administrators; high-level alarms will activate the system's sound and visual alarm devices, and urgently notify system administrators via phone, text messages or instant messaging tools.

[0064] Beneficial effects of the present invention:

[0065] The present invention realizes accurate recognition of complex traffic patterns by introducing deep learning models and long short-term memory networks (LSTM). The deep learning models can extract high-dimensional feature vectors from preprocessed traffic data, while the LSTM models can capture the time dependency and dynamic change characteristics of traffic data, significantly improving the accuracy of traffic anomaly detection. The combination of feature extraction and pattern recognition enables the system to effectively identify various complex and new types of traffic anomalies, thereby improving the comprehensiveness and accuracy of detection.

[0066] The present invention, by constructing a traffic pattern recognition model based on LSTM, the system can predict the traffic behavior in the future and generate predicted traffic data. This prediction mechanism not only enables the system to detect potential abnormal traffic in advance, but also provides an important reference for traffic management and optimization. The comparison between the predicted traffic data and the actual traffic data can generate a difference vector, which provides a richer and more accurate basis for anomaly detection and enhances the system's early warning capability and protection effect.

[0067] The present invention ensures the security and stability of the industrial control system through real-time flow anomaly detection and multi-level alarm mechanism, can generate alarm information of different levels according to the detected anomaly level, and promptly notify the system administrator through multiple alarm devices, thereby realizing rapid response and processing of flow anomalies. This multi-level alarm mechanism not only improves the flexibility and effectiveness of the alarm, but also ensures that the abnormal situation is paid attention to and processed in the first time, reduces the harm that the flow anomaly may cause to the industrial control system, and ensures the normal operation and safety protection of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the present invention 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 for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 A schematic diagram of a flow anomaly detection method according to an embodiment of the present invention;

[0070] Figure 2 The figure is a flowchart of feature extraction according to an embodiment of the present invention. DETAILED DESCRIPTION

[0071] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0072] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0073] like Figure 1-Figure 2 As shown, the industrial control system flow anomaly detection method based on deep learning includes the following steps:

[0074] S1: Collect network traffic data in real time through traffic sensors in industrial control systems and store the collected data in a database;

[0075] S2: preprocessing the network traffic data, including data cleaning, denoising and normalization, to obtain preprocessed traffic data;

[0076] S3: Use the deep learning model to extract features from the preprocessed traffic data and extract high-dimensional feature vectors that can reflect the abnormal characteristics of traffic;

[0077] S4: Based on the long short-term memory network (LSTM) deep learning model, the feature vector extracted in S3 is used to perform traffic pattern recognition and build a traffic pattern recognition model;

[0078] S5: Using the traffic pattern recognition model constructed in S4, predict the traffic behavior in the future and generate predicted traffic data;

[0079] S6: Compare the predicted traffic data generated in S5 with the actual traffic data in S2, calculate the difference between the two, and generate a difference vector;

[0080] S7: input the difference vector generated in S6 as training data into a deep neural network (DNN) for supervised learning to generate an anomaly detection model capable of identifying traffic anomalies;

[0081] S8: The real-time collected traffic data is processed by S2 to S6 and input into the anomaly detection model trained in S7 to perform real-time traffic anomaly detection;

[0082] S9: When a flow anomaly is detected in S8, different levels of alarm information are generated according to the anomaly level, and prompts are given through the alarm device of the industrial control system.

[0083] S1 specifically includes:

[0084] S11: Deploy flow sensors at key nodes of the industrial control system, including the main control server entrance, the communication interface between subsystems, the firewall port connected to the external network, and the main data exchange centers; the flow sensor includes a flow meter and a data acquisition module, wherein the flow meter is used to monitor the transmission rate and flow characteristics of network data packets in real time, and the data acquisition module is used to convert the monitored data into digital signals;

[0085] S12: transmitting the digital signal to the data acquisition server through the network interface of the industrial control system, the data acquisition server includes a cache module and a data transmission module, the cache module is used to temporarily store the real-time collected flow data, the data transmission module is used to transmit the cached data to the central database through a secure transmission protocol, the transmission protocol includes HTTPS and SSL / TLS;

[0086] S13: A dedicated traffic data storage area is set up in the central database, and big data storage technology is used for storage to ensure the storage efficiency and data integrity of traffic data. The big data storage technology is Hadoop or NoSQL database;

[0087] S14: Regularly back up and encrypt the traffic data stored in the central database to prevent data loss and unauthorized access. The encryption process uses the Advanced Encryption Standard AES algorithm to encrypt data. Through the above steps, real-time collection and secure storage of industrial control system network traffic data can be achieved, ensuring the integrity and security of the data, and providing a reliable data basis for subsequent traffic anomaly detection.

[0088] S2 specifically includes:

[0089] S21: performing data cleaning on the network traffic data, specifically including deleting incomplete data records and abnormal values, identifying and deleting data that does not conform to the normal range through preset rules, and the preset rules include setting the data packet size range and the transmission time window;

[0090] S22: De-noising the cleaned data by using wavelet transform technology to decompose the signal into different frequency components, remove high-frequency noise components, and retain useful low-frequency information;

[0091] S23: The denoised data is normalized by using the Min-Max Normalization method to scale the data to a preset range (such as 0 to 1) to eliminate the differences between different feature dimensions, thereby obtaining preprocessed traffic data. This ensures that all features are within the same dimensional range and eliminates dimensional differences between different features, which helps to improve the effects of subsequent feature extraction and model training.

[0092] S3 specifically includes:

[0093] S31: Input the preprocessed traffic data into the convolutional neural network and use the convolutional layer to extract features. The calculation formula of the convolutional layer is: Among them, x i,j is the i,jth data point of the preprocessed traffic data, w m,n,k is the m,nth weight of the kth convolution kernel, b k is the bias of the kth convolution kernel, y i,j,k is the convolution output of the kth convolution kernel at position i, j;

[0094] S32: The output result of the convolutional layer is input to the pooling layer for dimensionality reduction. The calculation formula of the pooling layer is: i,j,k =max 0≤m<M,0≤n<N (x i+m,j+n ), where x i,j is the output data of the convolution layer, max represents the maximum pooling operation, y i,j,k is the pooling output, i, j is the starting position of the pooling window, and k is the channel of the pooling layer;

[0095] S33: Flatten the output of the pooling layer and input it into the fully connected layer to generate a high-dimensional feature vector. The calculation formula of the fully connected layer is: Among them, x i is the i-th input data point after flattening, w i,k is the i,kth weight of the fully connected layer, b k is the kth bias of the fully connected layer, y k is the kth output of the fully connected layer;

[0096] S34: Perform activation function processing on the output result of the fully connected layer, using the ReLU activation function, and the calculation formula of the activation function is: y=max(0,x), where x is the output data of the fully connected layer, and y is the output of the activation function. The result after processing by the activation function is a high-dimensional feature vector reflecting the characteristics of traffic anomaly. Through the above steps, the convolutional neural network is used to extract features of the preprocessed traffic data to generate a high-dimensional feature vector that can reflect the characteristics of traffic anomaly, providing high-quality input data for subsequent traffic pattern recognition and anomaly detection.

[0097] S4 specifically includes:

[0098] S41: Input the high-dimensional feature vector generated in S3 into the long short-term memory network (LSTM), and calculate it using the following formula:

[0099] f t =σ(W f ·[h t-1 , x t ]+b f );

[0100] i t =σ(W i ·[h t-1 , x t ]+b i );

[0101]

[0102] o t =σ(W o ·[h t-1 , x t ]+b o );

[0104] h t =o t tanh(C t ), where x t is the input feature vector at the current moment; h t-1 is the hidden state at the previous moment; f t For the forget gate; i t is the input gate; is the candidate memory; C t is the memory status at the current moment; o t is the output gate; h t is the hidden state at the current moment; W f ,W i ,W C ,W o are the weight matrices of each gate; bf ,b i ,b C ,b o are the bias vectors of each gate respectively; σ is the Sigmoid activation function, defined as Tanh is the hyperbolic tangent activation function, defined as

[0105] S42: Perform traffic pattern recognition on the output of the LSTM network, specifically by stacking multiple layers of LSTM networks to increase the depth of the network to capture complex time dependencies; and t as a high-dimensional representation of traffic patterns;

[0106] S43: The output of the long short-term memory network is classified through the fully connected layer. The calculation formula of the classification layer is: y = softmax (W y ·h T +b y ), where W y is the weight matrix of the classification layer; b y is the bias vector of the classification layer; h T is the output of the last LSTM network unit; is the Softmax activation function, which is used to convert the output into a probability distribution;

[0107] S44: Build a traffic pattern recognition model based on the classification results. The model can identify normal traffic patterns and abnormal traffic patterns. Through the above steps, the feature vector extracted from S3 is used for traffic pattern recognition based on the long short-term memory network to build a traffic pattern recognition model, which provides a reliable pattern basis for subsequent traffic behavior prediction and anomaly detection.

[0108] S5 specifically includes:

[0109] S51: Input the real-time collected traffic data into the traffic pattern recognition model constructed in S4 to obtain the high-dimensional representation h of the current traffic pattern t ;

[0110] S52: The high-dimensional representation h of the current traffic pattern t As input, it is passed to the long short-term memory network (LSTM) for future traffic prediction. The specific calculation formula is:

[0111] f t+1 =σ(W f ·[h t , x t ]+b f );

[0112] it+1 =σ(W i ·[h t , x t ]+b i );

[0113]

[0114] o t+1 =σ(W o ·[h t , x t ]+b o );

[0116] h t+1 =o t+1 tanh(C t+1 ), where x t is the input feature vector at the current moment; h t is the hidden state at the current moment; f t+1 For the next moment of forgetfulness; i t+1 is the input gate for the next moment; is the candidate memory for the next moment; C t+1 is the memory state of the next moment; o t+1 is the output gate at the next moment; h t+1 is the hidden state at the next moment;

[0117] S53: According to the output h of the long short-term memory network t+1 Predict traffic data for a period of time in the future and generate predicted traffic data The calculation formula is: in, is the predicted traffic data at the next moment; W o is the weight matrix of the output layer; b o is the bias vector of the output layer; h t+1 is the output hidden state of the long short-term memory network;

[0118] S54: Repeat S51 to S53, and gradually predict the traffic data at multiple moments in the future until a predicted traffic data sequence within a predetermined time range is obtained; through the above steps, the traffic pattern recognition model constructed in S4 is used to predict the traffic behavior in the future period based on the long short-term memory network (LSTM), and the predicted traffic data is generated to provide data support for subsequent traffic anomaly detection.

[0119] S6 specifically includes:

[0120] S61: The predicted flow data generated in step S5 is Align with the actual traffic data preprocessed in S2 to ensure that the two correspond to the same timestamps and data points;

[0121] S62: Calculate the difference between the predicted flow data and the actual flow data, specifically using the mean square error (MSE) formula for calculation, the formula is: Where N is the number of samples of flow data; is the i-th predicted traffic data point; x i is the i-th actual flow data point; is the square difference between the predicted data and the actual data;

[0122] S63: Calculate the difference at each time point to generate a difference vector d t , the formula is: Among them, d t is the difference at the tth time point; is the predicted traffic data at the tth time point; x t is the actual traffic data at the tth time point;

[0123] S64: Combine the difference vectors of all time points to form a complete difference vector sequence D, the formula is: D = [d1, d2, ..., d T ], where D is the difference vector sequence; d t is the difference vector for each time point; T is the total number of time points within the predicted time range; through the above steps, the predicted traffic data generated in step S5 is compared with the actual traffic data in step S2, the difference between the two is calculated, and a difference vector is generated to provide a basis for subsequent anomaly detection.

[0124] S7 specifically includes:

[0125] S71: Use the difference vector sequence D generated in step S6 as training data, the difference vector sequence includes the difference vectors d at multiple time points t , where each d t Represents the difference between the predicted flow data and the actual flow data at the tth time point;

[0126] S72: labeling the difference vector sequence, labeling normal traffic and abnormal traffic with different labels according to known traffic data, and generating a labeled training data set;

[0127] S73: inputting the labeled training data set into a deep neural network (DNN) for training, where the structure of the deep neural network includes an input layer, multiple hidden layers, and an output layer;

[0128] S74: During the training process, the weights and biases of the neural network are updated using the backpropagation algorithm and the gradient descent optimization algorithm. The specific steps include: Where L is the loss function, calculated using mean square error (MSE); N is the number of samples in the training data; y i is the actual label of the i-th sample; is the predicted output of the i-th sample; the formula for updating weights and biases is:

[0129] Among them, w is the weight of the neural network; b is the bias of the neural network; η is the learning rate (LearningRate); is the gradient of the loss function with respect to the weight; is the gradient of the loss function with respect to the bias;

[0130] S75: After the training is completed, an anomaly detection model is generated, which can identify traffic anomalies according to the input difference vector and output corresponding anomaly detection results.

[0131] S8 specifically includes:

[0132] S81: preprocessing the real-time collected traffic data through S2, specifically including data cleaning, denoising and normalization processing, to obtain preprocessed traffic data;

[0133] S82: extracting features from the preprocessed traffic data through S3, and using a convolutional neural network (CNN) to extract a high-dimensional feature vector reflecting traffic anomaly features;

[0134] S83: The feature vector is used for traffic pattern recognition through S4, and a high-dimensional representation of the current traffic pattern is constructed based on a long short-term memory network (LSTM) model;

[0135] S84: input the high-dimensional representation of the current traffic pattern into S5 to predict traffic behavior, use the long short-term memory network model to predict traffic data in the future, and generate predicted traffic data;

[0136] S85: Compare the predicted flow data with the actual flow data in S2, calculate the difference according to step S6, and generate a difference vector;

[0137] S86: Input the generated difference vector to the anomaly detection model trained in S7. The calculation formula of the anomaly detection model is: y = σ (W·D + b), where D is the input difference vector; W is the weight matrix of the anomaly detection model; b is the bias vector of the anomaly detection model; y is the output result of the anomaly detection; σ is the activation function, specifically the Sigmoid function

[0138] S87: According to the output results of the anomaly detection model, determine whether there is a flow anomaly. When y exceeds the preset threshold, it is determined to be a flow anomaly and triggers the corresponding alarm mechanism. Through the above steps, the real-time collected flow data is processed through steps S2 to S6 and input into the anomaly detection model trained in step S7 to perform real-time flow anomaly detection, thereby providing an efficient flow anomaly monitoring and alarm mechanism for the industrial control system.

[0139] S9 specifically includes:

[0140] S91: when a flow anomaly is detected in S8, the severity of the flow anomaly is determined according to the output result y of the anomaly detection model;

[0141] S92: Classify the abnormality into different levels, including mild, moderate and severe, and the specific classification criteria are determined according to the preset threshold range;

[0142] S93: Generate alarm information of corresponding levels according to the detected abnormality level, including minor abnormality, medium abnormality and severe abnormality; wherein, minor abnormality is used to generate low-level alarm information to prompt the system administrator to pay attention to the abnormal situation; medium abnormality is used to generate medium-level alarm information to prompt the system administrator to conduct inspection and analysis; severe abnormality is used to generate high-level alarm information to immediately notify the system administrator and trigger the emergency processing mechanism;

[0143] S94: Alarm prompts are issued through the alarm device of the industrial control system, including low-level alarms, medium-level alarms and high-level alarms: among them, low-level alarms record abnormal information through the system log and send emails or text messages to notify the system administrator; medium-level alarms pop up an alarm prompt window on the system interface and send emails or text messages to notify the system administrator; high-level alarms will activate the system's sound and visual alarm devices (such as buzzers, warning lights, etc.), and urgently notify the system administrator through phone calls, text messages or instant messaging tools;

[0144] S95: Record all alarm information and processing logs for subsequent analysis and improvement of the flow anomaly detection system; through the above steps, when a flow anomaly is detected in step S8, different levels of alarm information are generated according to the anomaly level, and prompts are given through the alarm device of the industrial control system to ensure that the system administrator is aware of and handles the anomaly in a timely manner, thereby ensuring the safe and stable operation of the industrial control system.

[0145] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. Industrial control system traffic anomaly detection method based on deep learning, It is characterized in that The following steps are involved: S1: Collect network traffic data in real time through traffic sensors in industrial control systems and store the collected data in a database; S2: preprocessing the network traffic data, specifically including data cleaning, denoising and normalization, to obtain preprocessed traffic data; S3: Use the deep learning model to extract features from the preprocessed traffic data and extract high-dimensional feature vectors that can reflect the abnormal characteristics of traffic; S4: Based on the deep learning model of long short-term memory network, the feature vector extracted in S3 is used to perform traffic pattern recognition and build a traffic pattern recognition model; S5: Using the traffic pattern recognition model constructed in S4, predict the traffic behavior in the future and generate predicted traffic data; S6: Compare the predicted traffic data generated in S5 with the actual traffic data in S2, calculate the difference between the two, and generate a difference vector; S7: Input the difference vector generated in S6 as training data into the deep neural network for supervised learning to generate an anomaly detection model capable of identifying traffic anomalies; S8: The real-time collected traffic data is processed by S2 to S6 and input into the anomaly detection model trained in S7 to perform real-time traffic anomaly detection; S9: When a flow anomaly is detected in S8, different levels of alarm information are generated according to the anomaly level, and prompts are given through the alarm device of the industrial control system.

2. According to the method for detecting abnormal flow in industrial control systems based on deep learning in claim 1, It is characterized in that The S1 specifically includes: S11: Deploy flow sensors at various key nodes of the industrial control system, including the main control server entrance, the communication interface between each subsystem, the firewall port connected to the external network and each major data exchange center; the flow sensor includes a flow meter and a data acquisition module, wherein the flow meter is used to monitor the transmission rate and flow characteristics of network data packets in real time, and the data acquisition module is used to convert the monitored data into a digital signal; S12: Transmitting the digital signal to a data acquisition server through a network interface of the industrial control system, wherein the data acquisition server includes a cache module and a data transmission module, wherein the cache module is used to temporarily store the flow data collected in real time, and the data transmission module is used to transmit the cached data to a central database through a secure transmission protocol, wherein the transmission protocol includes HTTPS and SSL / TLS; S13: Establishing a dedicated traffic data storage area in the central database, and using big data storage technology to store traffic data to ensure storage efficiency and data integrity, wherein the big data storage technology is Hadoop or NoSQL database; S14: The traffic data stored in the central database is backed up and encrypted regularly to prevent data loss and unauthorized access. The encryption process uses the Advanced Encryption Standard AES algorithm to encrypt the data.

3. According to the method for detecting abnormal flow in industrial control systems based on deep learning in claim 1, It is characterized in that The S2 specifically includes: S21: performing data cleaning on the network traffic data, specifically including deleting incomplete data records and abnormal values, identifying and deleting data that does not conform to the normal range through preset rules, and the preset rules include setting the data packet size range and the transmission time window; S22: De-noising the cleaned data by using wavelet transform technology to decompose the signal into different frequency components, remove high-frequency noise components, and retain useful low-frequency information; S23: normalizing the denoised data, using a minimum-maximum normalization method to scale the data to a preset range to eliminate differences between different feature dimensions, and obtaining preprocessed traffic data.

4. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 1, It is characterized in that The S3 specifically includes: S31: Input the preprocessed traffic data into the convolutional neural network and use the convolutional layer to extract features. The calculation formula of the convolutional layer is: Among them, x i,j is the i,jth data point of the preprocessed traffic data, w m,n,k is the m,nth weight of the kth convolution kernel, b k is the bias of the kth convolution kernel, y i,j,k is the convolution output of the kth convolution kernel at position i, j; S32: The output result of the convolutional layer is input to the pooling layer for dimensionality reduction. The calculation formula of the pooling layer is: i,j,k =max 0≤m<M,0≤n<N (x i+m,j+n ), where x i,j is the output data of the convolutional layer, max represents the maximum pooling operation, y i,j,k is the pooling output, i, j is the starting position of the pooling window, and k is the channel of the pooling layer; S33: Flatten the output of the pooling layer and input it into the fully connected layer to generate a high-dimensional feature vector. The calculation formula of the fully connected layer is: Among them, x i is the i-th input data point after flattening, w i,k is the i,kth weight of the fully connected layer, b k is the kth bias of the fully connected layer, y k is the kth output of the fully connected layer; S34: The output result of the fully connected layer is processed by an activation function, using the ReLU activation function. The calculation formula of the activation function is: y=max(0,x), where x is the output data of the fully connected layer and y is the output of the activation function. The result after processing by the activation function is a high-dimensional feature vector reflecting the abnormal characteristics of the traffic.

5. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 1, It is characterized in that The S4 specifically includes: S41: Input the high-dimensional feature vector generated in S3 into the long short-term memory network; S42: Perform traffic pattern recognition on the output of the LSTM network, specifically by stacking multiple layers of LSTM networks to increase the depth of the network to capture complex time dependencies; and t as a high-dimensional representation of traffic patterns; S43: The output of the long short-term memory network is classified through the fully connected layer. The calculation formula of the classification layer is: y = softmax (W y ·h T +b y ), where W y is the weight matrix of the classification layer; b y is the bias vector of the classification layer; h T is the output of the last LSTM network unit; is the Softmax activation function, which is used to convert the output into a probability distribution; S44: Constructing a traffic pattern recognition model according to the classification result, wherein the model can recognize normal traffic patterns and abnormal traffic patterns.

6. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 1, It is characterized in that The S5 specifically includes: S51: Input the real-time collected traffic data into the traffic pattern recognition model constructed in S4 to obtain the high-dimensional representation h of the current traffic pattern t ; S52: The high-dimensional representation h of the current traffic pattern t As input, it is passed to the long short-term memory network for future traffic prediction; S53: Predict the traffic data in the future based on the output of the long short-term memory network and generate predicted traffic data The calculation formula is: in, is the predicted traffic data at the next moment; W o is the weight matrix of the output layer; b o is the bias vector of the output layer; h t+1 is the output hidden state of the long short-term memory network; S54: Repeat S51 to S53 to gradually predict the traffic data at multiple moments in the future until a predicted traffic data sequence within a predetermined time range is obtained.

7. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 6, It is characterized in that The S6 specifically includes: S61: The predicted flow data generated in step S5 is Align with the actual traffic data preprocessed in S2 to ensure that the two correspond to the same timestamps and data points; S62: Calculate the difference between the predicted flow data and the actual flow data, specifically using the mean square error formula, which is: Where N is the number of samples of flow data; is the i-th predicted traffic data point; x i is the i-th actual flow data point; is the square difference between the predicted data and the actual data; S63: Calculate the difference at each time point to generate a difference vector d t , the formula is: Among them, d t is the difference at the tth time point; is the predicted traffic data at the tth time point; x t is the actual traffic data at the tth time point; S64: Combine the difference vectors of all time points to form a complete difference vector sequence D, the formula is: D = [d 1 , d 2 , … , d T ], where D is the difference vector sequence; d t is the difference vector for each time point; T is the total number of time points in the prediction time range.

8. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 7, It is characterized in that The S7 specifically includes: S71: Use the difference vector sequence D generated in step S6 as training data, the difference vector sequence includes the difference vectors d at multiple time points t , where each d t Represents the difference between the predicted flow data and the actual flow data at the tth time point; S72: labeling the difference vector sequence, labeling normal traffic and abnormal traffic with different labels according to known traffic data, and generating a labeled training data set; S73: inputting the labeled training data set into a deep neural network for training, where the structure of the deep neural network includes an input layer, multiple hidden layers and an output layer; S74: During the training process, the weights and biases of the neural network are updated using the back propagation algorithm and the gradient descent optimization algorithm; S75: After the training is completed, an anomaly detection model is generated, which can identify traffic anomalies according to the input difference vector and output corresponding anomaly detection results.

9. The method for detecting abnormal flow rate in an industrial control system based on deep learning according to claim 8, It is characterized in that The S8 specifically includes: S81: preprocessing the real-time collected traffic data through S2, specifically including data cleaning, denoising and normalization processing, to obtain preprocessed traffic data; S82: extracting features from the preprocessed traffic data through S3, and using a convolutional neural network to extract a high-dimensional feature vector reflecting traffic anomaly features; S83: Use S4 to identify the traffic pattern of the feature vector and construct a high-dimensional representation of the current traffic pattern based on the long short-term memory network model; S84: input the high-dimensional representation of the current traffic pattern into S5 to predict traffic behavior, use the long short-term memory network model to predict traffic data in the future, and generate predicted traffic data; S85: Compare the predicted flow data with the actual flow data in S2, calculate the difference according to step S6, and generate a difference vector; S86: Input the generated difference vector to the anomaly detection model trained in S7. The calculation formula of the anomaly detection model is: y=σ(W·D+b), where D is the input difference vector; W is the weight matrix of the anomaly detection model; b is the bias vector of the anomaly detection model; y is the output result of the anomaly detection; σ is the activation function; S87: Determine whether there is a flow anomaly based on the output result of the anomaly detection model. When y exceeds a preset threshold, it is determined to be a flow anomaly.

10. The method for detecting abnormal flow in an industrial control system based on deep learning according to claim 9, It is characterized in that The S9 specifically includes: S91: when a flow anomaly is detected in S8, the severity of the flow anomaly is determined according to the output result y of the anomaly detection model; S92: Classify the abnormality into different levels, including mild, moderate and severe, and the specific classification criteria are determined according to the preset threshold range; S93: Generate alarm information of corresponding levels according to the detected abnormality level, including minor abnormality, medium abnormality and severe abnormality; wherein, minor abnormality is used to generate low-level alarm information to prompt the system administrator to pay attention to the abnormal situation; medium abnormality is used to generate medium-level alarm information to prompt the system administrator to conduct inspection and analysis; severe abnormality is used to generate high-level alarm information to immediately notify the system administrator and trigger the emergency processing mechanism; S94: Alarm prompts are issued through the alarm device of the industrial control system, including low-level alarms, medium-level alarms and high-level alarms: among them, low-level alarms record abnormal information through system logs and send emails or text messages to notify system administrators; medium-level alarms pop up an alarm prompt window on the system interface and send emails or text messages to notify system administrators; high-level alarms will activate the system's sound and visual alarm devices, and urgently notify system administrators via phone, text messages or instant messaging tools.

Citation Information

Cited By

  • Intelligent access control method, device and equipment based on P2P (Peer-to-Peer) communication and medium

    CN119360492A

  • A method, device, equipment and medium for intelligent access control based on P2P communication

    CN119360492B

  • Abnormal flow detection method based on multilevel time-frequency decomposition and graph neural network

    CN120017330A

  • Cellular traffic prediction method and system based on multilayer meta-learning model

    CN120201481A

  • Secondary water supply control method and system based on artificial intelligence

    CN120968047A