Novel protocol intelligent analysis method of industrial control system
The intelligent protocol analysis method using a DNN structure addresses inefficiencies and adaptability issues in traditional methods by automatically learning protocol features, ensuring high accuracy and adaptability in complex industrial control systems.
Patent Information
- Application Number
- CN202411341054.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-03
AI Technical Summary
Traditional industrial control protocol analysis methods face challenges in handling new protocols due to lack of prior knowledge, inefficiency, and difficulty in adapting to changes, particularly in complex systems with evolving protocols.
A novel intelligent protocol analysis method using a multi-layer DNN structure for industrial control systems, involving data collection, preprocessing, model training with stochastic gradient descent and regularization, and feature extraction with a softmax classifier to classify protocol types.
The method achieves high accuracy and adaptability in classifying new protocols, enabling efficient processing of large-scale data and detecting abnormal behaviors and security vulnerabilities.
Smart Images

Figure CN119071369A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial control and artificial intelligence, and in particular to a novel protocol intelligent analysis method for an industrial control system. Background Art
[0002] At present, traditional industrial control protocol analysis methods mainly rely on manual analysis and rule-based methods. For known protocols, these methods can analyze the protocol documents and specifications, establish corresponding analysis tools and rule bases, and perform protocol parsing and analysis. However, for new protocols, traditional methods have the following limitations:
[0003] Lack of prior knowledge: In complex industrial control systems, there are multiple types of protocols. Traditional methods may rely on manual analysis or be based on fixed rules, which makes it difficult to cope with the emergence of new protocols and complex protocol combinations. Since new protocols usually do not have public documents and specifications, traditional methods find it difficult to obtain sufficient prior knowledge for analysis.
[0004] Manual analysis is inefficient: Traditional manual analysis methods require a lot of manpower and time, and are difficult to handle large-scale protocol data.
[0005] Difficult to adapt to changes: New protocols may continue to evolve over time and with changes in application scenarios, and traditional methods are difficult to quickly adapt to these changes. Summary of the invention
[0006] The purpose of the present invention is to provide a novel intelligent protocol analysis method for an industrial control system, which solves the problems of lack of prior knowledge, low efficiency of manual analysis and difficulty in adapting to changes.
[0007] To achieve the above object, the present invention provides a novel protocol intelligent analysis method for an industrial control system, comprising the following steps:
[0008] S1. Data collection and preprocessing: By deploying network probes and protocol analyzers at key nodes of the production line, the network data packets flowing through are captured in real time. These data packets contain communication data of various protocols, including data of new protocols. For data of new protocols, due to the lack of prior knowledge, manual analysis and annotation methods are used to gradually build up an understanding of the new protocols.
[0009] S2. Deep learning model construction. A multi-layer DNN structure is designed, including input layer, hidden layer and output layer. The input layer receives the pre-processed protocol data. The hidden layer uses multiple neurons to perform nonlinear transformation on the data and extract features. The output layer classifies and analyzes the protocol based on the extracted features.
[0010] S3. Model training: Use labeled protocol data to train DNN, use the stochastic gradient descent algorithm to optimize the model parameters, and continuously reduce the model's prediction error; use random flipping and cropping to increase data diversity and improve the generalization ability of the model; and use L1 and L2 regularization to prevent model overfitting.
[0011] S4, protocol feature extraction and classification, automatically extract the features of protocol data through the hidden layer of DNN, including the length of the data packet, time interval, and statistical features of the data content, and use the softmax classifier to classify the extracted features to determine the protocol type to which the data packet belongs;
[0012] S5. Result evaluation, the accuracy, recall and F1 value were used to evaluate the performance of the model. The obtained model achieved high accuracy and recall in the classification task of the new protocol, proving the effectiveness of the new protocol intelligent analysis method.
[0013] Preferably, in step S1, the network data packets flowing through are captured in real time, including communication data of various protocols, including data of new protocols.
[0014] Preferably, in step S1, data cleaning and labeling are performed on the network data packets captured in real time, including data cleaning, noise and invalid data removal, and then the data is labeled according to known protocol characteristics and communication modes to distinguish different types of protocol data.
[0015] Preferably, data cleaning and labeling of network data packets captured in real time include data cleaning, removing noise and invalid data, and then labeling the data according to known protocol features and communication modes to distinguish different types of protocol data. For data of new protocols, due to the lack of prior knowledge, manual analysis and labeling methods are used to gradually establish an understanding of new protocols.
[0016] Preferably, in step S2, the input layer receives the pre-processed protocol data, including the byte sequence, timestamp, source address, and destination address of the industrial control protocol data packet;
[0017] The byte sequence is converted into an integer vector, the timestamp is normalized, each part of the source and destination addresses is converted into binary form, and the entire binary sequence is input into the neural network as a long vector;
[0018] The number of nodes in the input layer is determined based on the feature dimensions of byte sequence, timestamp, source address, and destination address.
[0019] Preferably, in step S2, the hidden layer is composed of a plurality of neurons, each neuron receives input from the previous layer and outputs after nonlinear processing through an activation function;
[0020] The calculation formula for each neuron is as follows:
[0021]
[0022] Among them, x i is the input of the previous layer, w i is the corresponding weight, b is the bias term, f is the activation function, and y is the output of the neuron;
[0023] The ReLU function is used as the activation function, and its calculation formula is as follows:
[0024] f(x) = max(0, x)
[0025] The ReLU function is used to avoid the gradient vanishing problem.
[0026] Preferably, in step S2, the number of nodes in the output layer is equal to the number of protocol categories, each node in the output layer corresponds to a protocol category, and its output value represents the probability that the input data belongs to the category, and the output value is converted into a probability distribution using a softmax function:
[0027]
[0028] Among them, y i is the output value of the th node in the output layer, k is the number of categories, and p i is the probability that the input data belongs to the i-th category;
[0029] The protocol category of the input data is determined according to the probability distribution of the output layer, and the category with the highest probability is selected as the prediction result.
[0030] Preferably, in step S3, the specific steps of optimizing the model are as follows:
[0031] During the training process, the cross entropy loss function is used to measure the difference between the model's predicted results and the actual results, as follows:
[0032]
[0033] Among them, y i is the true label, is the predicted probability of the model, n is the number of samples;
[0034] The stochastic gradient descent (SGD) algorithm is used as the optimization algorithm. By continuously updating the parameters of the model along the negative gradient direction of the loss function, the value of the loss function is gradually reduced. The specific update formula is as follows:
[0035]
[0036] Among them, w t and b t are the current weights and biases, α is the learning rate, and is the gradient of the loss function with respect to the weights and bias terms;
[0037] L1 regularization penalizes large weight values by adding the sum of the absolute values of the weights in the loss function:
[0038]
[0039] Where λ is the regularization parameter and m is the number of weights;
[0040] L2 regularization penalizes large weight values by adding the sum of the squares of the weights to the loss function:
[0041]
[0042] By adjusting the regularization parameter λ, the complexity of the model can be controlled to prevent overfitting.
[0043] Preferably, in step S4, the process of classifying the extracted features by the softmax classifier is as follows:
[0044] Assume that the output layer has K nodes, corresponding to K different protocol types;
[0045] For the input data x, after DNN forward propagation, the output of the output layer is the vector y=(y1,y2,…,y n );
[0046] The softmax function is defined as:
[0047]
[0048] Among them, p i Represents the probability that the input data belongs to the protocol type.
[0049] Therefore, the present invention adopts a novel protocol intelligent analysis method of an industrial control system with the above structure, which has the following beneficial effects:
[0050] (1) Automatic learning capability: Deep learning models can automatically learn features and patterns from large amounts of protocol data without the need for human intervention or prior knowledge.
[0051] (2) Efficiency: It can quickly process large-scale protocol data and improve analysis efficiency.
[0052] (3) Strong adaptability: It can adapt to the continuous changes and evolution of new protocols and has good generalization capabilities.
[0053] (4) High accuracy: Classification and analysis through automatically learned features can achieve higher accuracy and effectively discover abnormal behaviors and security vulnerabilities in the protocol.
[0054] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The present invention is a flowchart of a novel intelligent protocol analysis method for an industrial control system. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0057] 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 words "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.
[0058] Example
[0059] Take the automated production line of a smart factory as an example. The production line covers multiple different types of industrial equipment, including robots, sensors, controllers, etc. In this complex industrial control system, there are many traditional industrial control protocols such as Modbus and Profibus. At the same time, a new custom industrial control protocol is introduced for high-speed data transmission and collaborative control between specific devices. This new protocol uses a unique data format and communication mechanism.
[0060] like Figure 1 As shown, the present invention provides a novel protocol intelligent analysis method for an industrial control system, comprising the following steps:
[0061] S1. Data collection and preprocessing: By deploying network probes and protocol analyzers at key nodes of the production line, the network data packets flowing through are captured in real time. These data packets contain communication data of various protocols, including data of new protocols. For data of new protocols, due to the lack of prior knowledge, manual analysis and annotation methods are used to gradually build up an understanding of the new protocols.
[0062] S2. Deep learning model construction. A multi-layer DNN structure is designed, including input layer, hidden layer and output layer. The input layer receives the pre-processed protocol data. The hidden layer uses multiple neurons to perform nonlinear transformation on the data and extract features. The output layer classifies and analyzes the protocol based on the extracted features.
[0063] S3. Model training: Use labeled protocol data to train DNN, use the stochastic gradient descent algorithm to optimize the model parameters, and continuously reduce the model's prediction error; use random flipping and cropping to increase data diversity and improve the generalization ability of the model; and use L1 and L2 regularization to prevent model overfitting.
[0064] S4, protocol feature extraction and classification, automatically extract the features of protocol data through the hidden layer of DNN, including the length of the data packet, time interval, and statistical features of the data content, and use the softmax classifier to classify the extracted features to determine the protocol type to which the data packet belongs;
[0065] S5. Result evaluation, the accuracy, recall and F1 value were used to evaluate the performance of the model. The obtained model achieved high accuracy and recall in the classification task of the new protocol, proving the effectiveness of the new protocol intelligent analysis method.
[0066] In step S1, the network data packets flowing through are captured in real time, including communication data of various protocols, including data of new protocols.
[0067] In step S1, data cleaning and labeling are performed on the network data packets captured in real time, including data cleaning, noise and invalid data removal, and then the data is labeled according to known protocol features and communication modes to distinguish different types of protocol data.
[0068] Data cleaning and annotation of real-time captured network data packets include data cleaning, noise removal and invalid data removal, and then data annotation based on known protocol features and communication modes to distinguish different types of protocol data. For data of new protocols, due to the lack of prior knowledge, manual analysis and annotation methods are used to gradually build up an understanding of new protocols.
[0069] In step S2, the input layer receives the pre-processed protocol data, including the byte sequence, timestamp, source address, and destination address of the industrial control protocol data packet;
[0070] The byte sequence is converted into an integer vector, the timestamp is normalized, each part of the source and destination addresses is converted into binary form, and the entire binary sequence is input into the neural network as a long vector;
[0071] The fixed length of the byte sequence is 128 bytes, so the feature dimension of the byte sequence is 128.
[0072] The timestamp is represented as a floating point number and occupies one feature dimension.
[0073] The IP address is converted into an integer using integer representation, with the source address and destination address each occupying one feature dimension.
[0074] The MAC address is converted into an integer vector using the hexadecimal to integer method. Each MAC address is converted into an integer vector of length 6. Therefore, the source MAC address and the destination MAC address occupy a total of 12 feature dimensions.
[0075] The total feature dimension is 128+1+1+1+12=143, so the number of nodes in the input layer is 143.
[0076] In step S2, the hidden layer is composed of multiple neurons, each of which receives input from the previous layer and outputs it after nonlinear processing through an activation function;
[0077] The calculation formula for each neuron is as follows:
[0078]
[0079] Among them, x i is the input of the previous layer, w i is the corresponding weight, b is the bias term, f is the activation function, and y is the output of the neuron;
[0080] The ReLU function is used as the activation function, and its calculation formula is as follows:
[0081] f(x) = max(0, x)
[0082] The ReLU function is used to avoid the gradient vanishing problem.
[0083] And three hidden layers are used, and the number of nodes in each layer is 256, 128 and 64. Such a structure can effectively extract the characteristics of protocol data without being too complicated to cause overfitting.
[0084] In step S2, the number of nodes in the output layer is equal to the number of protocol categories. Each node in the output layer corresponds to a protocol category, and its output value represents the probability that the input data belongs to this category. The softmax function is used to convert the output value into a probability distribution:
[0085]
[0086] Among them, y i is the output value of the th node in the output layer, k is the number of categories, and p i is the probability that the input data belongs to the i-th category;
[0087] The protocol category of the input data is determined according to the probability distribution of the output layer, and the category with the highest probability is selected as the prediction result.
[0088] In step S3, the specific steps of optimizing the model are as follows:
[0089] During the training process, the cross entropy loss function is used to measure the difference between the model's predicted results and the actual results, as follows:
[0090]
[0091] Among them, y i is the true label, is the predicted probability of the model, n is the number of samples;
[0092] The stochastic gradient descent (SGD) algorithm is used as the optimization algorithm. By continuously updating the parameters of the model along the negative gradient direction of the loss function, the value of the loss function is gradually reduced. The specific update formula is as follows:
[0093]
[0094] Among them, w t and b t are the current weights and biases, α is the learning rate, and is the gradient of the loss function with respect to the weights and bias terms;
[0095] L1 regularization penalizes large weight values by adding the sum of the absolute values of the weights in the loss function:
[0096]
[0097] Where λ is the regularization parameter and m is the number of weights;
[0098] L2 regularization penalizes large weight values by adding the sum of the squares of the weights to the loss function:
[0099]
[0100] By adjusting the regularization parameter λ, the complexity of the model can be controlled to prevent overfitting.
[0101] In step S4, the process of classifying the extracted features by the softmax classifier is as follows:
[0102] Assume that the output layer has K nodes, corresponding to K different protocol types;
[0103] For the input data x, after DNN forward propagation, the output of the output layer is the vector y=(y1,y2,…,y n );
[0104] The softmax function is defined as:
[0105]
[0106] Among them, p i Represents the probability that the input data belongs to the protocol type.
[0107] During a fault diagnosis of a production line, some abnormal communication behaviors were discovered through the analysis of network data packets. Using the new protocol intelligent analysis method, it was quickly determined that these abnormal communications were caused by a specific device failure in the new protocol. Through further analysis and troubleshooting, the fault was repaired in a timely manner, avoiding long-term shutdown of the production line and improving production efficiency and system reliability.
[0108] Table 1 shows the accuracy, recall and F1 value of the model on different protocol types. It can be seen from Table 1 that
[0109] Table 1 Precision, recall and F1 value on different protocol types
[0110] Protocol Type Accuracy Recall F1 value Traditional Protocol 1 0.92 0.90 0.91 Traditional Protocol 2 0.90 0.88 0.89 New protocols 0.95 0.93 0.94
[0111] The model achieved high accuracy and recall in the classification task of new protocols, and the F1 value was also high, indicating that the model has good classification performance for new protocols.
[0112] The accuracy, recall and F1 value were used to evaluate the performance of the model. The obtained model achieved high accuracy and recall in the classification task of the new protocol.
[0113] Therefore, the present invention adopts the above-mentioned novel intelligent protocol analysis method for an industrial control system, which can automatically learn features and rules from a large amount of protocol data without manual intervention and prior knowledge. It can adapt to the continuous changes and evolution of new protocols and has good generalization ability. It can also quickly process large-scale protocol data, improve analysis efficiency, and classify and analyze automatically learned features with higher accuracy, which can effectively discover abnormal behaviors and security vulnerabilities in the protocol.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A new protocol intelligent analysis method for industrial control systems, It is characterized in that The following steps are involved: S1. Data collection and preprocessing: by deploying network probes and protocol analyzers at key nodes of the production line, the network data packets flowing through can be captured in real time and data cleaning and annotation can be performed; S2. Deep learning model construction. A multi-layer DNN structure is designed, including input layer, hidden layer and output layer. The input layer receives the pre-processed protocol data. The hidden layer uses multiple neurons to perform nonlinear transformation on the data and extract features. The output layer classifies and analyzes the protocol based on the extracted features. S3. Model training: Use labeled protocol data to train DNN, use the stochastic gradient descent algorithm to optimize the model parameters, and continuously reduce the model's prediction error; use random flipping and cropping to increase data diversity and improve the generalization ability of the model; and use L1 and L2 regularization to prevent model overfitting. S4, protocol feature extraction and classification, automatically extract the features of protocol data through the hidden layer of DNN, including the length of the data packet, time interval, and statistical features of the data content, and use the softmax classifier to classify the extracted features to determine the protocol type to which the data packet belongs; S5. Result evaluation, the accuracy, recall and F1 value were used to evaluate the performance of the model. The obtained model achieved high accuracy and recall in the classification task of the new protocol, proving the effectiveness of the new protocol intelligent analysis method.
2. According to claim 1, a novel protocol intelligent analysis method for industrial control systems, Features: In step S1, the network data packets flowing through are captured in real time, including communication data of various protocols, including data of new protocols.
3. According to claim 1, a novel protocol intelligent analysis method for industrial control systems, Features: In step S1, data cleaning and labeling are performed on the network data packets captured in real time, including data cleaning, noise and invalid data removal, and then the data is labeled according to known protocol features and communication modes to distinguish different types of protocol data.
4. According to claim 1, a novel protocol intelligent analysis method for an industrial control system, Features: In step S2, the input layer receives the pre-processed protocol data, including the byte sequence, timestamp, source address, and destination address of the industrial control protocol data packet; The byte sequence is converted into an integer vector, the timestamp is normalized, each part of the source and destination addresses is converted into binary form, and the entire binary sequence is input into the neural network as a long vector; The number of nodes in the input layer is determined based on the feature dimensions of byte sequence, timestamp, source address, and destination address.
5. According to claim 1, a novel protocol intelligent analysis method for industrial control systems, Features: In step S2, the hidden layer is composed of multiple neurons, each of which receives input from the previous layer and outputs it after nonlinear processing through an activation function; The calculation formula for each neuron is as follows: Among them, x i is the input of the previous layer, w i is the corresponding weight, b is the bias term, f is the activation function, and y is the output of the neuron; The ReLU function is used as the activation function, and its calculation formula is as follows: f(x) = max(0, x) The ReLU function is used to avoid the gradient vanishing problem.
6. According to claim 5, a novel protocol intelligent analysis method for industrial control systems, Features: In step S2, the number of nodes in the output layer is equal to the number of protocol categories. Each node in the output layer corresponds to a protocol category, and its output value represents the probability that the input data belongs to this category. The softmax function is used to convert the output value into a probability distribution: Among them, y i is the output value of the th node in the output layer, k is the number of categories, and p i is the probability that the input data belongs to the i-th category; The protocol category of the input data is determined according to the probability distribution of the output layer, and the category with the highest probability is selected as the prediction result.
7. According to claim 1, a novel protocol intelligent analysis method for industrial control systems, Features: In step S3, the specific steps of optimizing the model are as follows: During the training process, the cross entropy loss function is used to measure the difference between the model's predicted results and the actual results, as follows: Among them, y i is the true label, is the predicted probability of the model, n is the number of samples; The stochastic gradient descent (SGD) algorithm is used as the optimization algorithm. By continuously updating the parameters of the model along the negative gradient direction of the loss function, the value of the loss function is gradually reduced. The specific update formula is as follows: Among them, w t and b t are the current weights and biases, α is the learning rate, and is the gradient of the loss function with respect to the weights and bias terms; L1 regularization penalizes large weight values by adding the sum of the absolute values of the weights in the loss function: Where λ is the regularization parameter and m is the number of weights; L2 regularization penalizes large weight values by adding the sum of the squares of the weights to the loss function: By adjusting the regularization parameter λ, the complexity of the model can be controlled to prevent overfitting.
8. According to claim 7, a novel protocol intelligent analysis method for industrial control systems, Features: In step S4, the process of classifying the extracted features by the softmax classifier is as follows: Assume that the output layer has K nodes, corresponding to K different protocol types; For the input data x, after DNN forward propagation, the output of the output layer is the vector y=(y 1 ,y 2 ,…,y n ); The softmax function is defined as: Among them, p i Represents the probability that the input data belongs to the protocol type.
Citation Information
Cited By
Semantic modeling and mode recognition method and system for energy industrial control application instruction flow
CN121637153A
