Method and system for improving defensiveness of industrial control protocol intrusion detection model
By adopting distillation learning and adversarial sample training methods in the industrial control protocol intrusion detection model, the problem of poor defense of the existing model is solved, and the robustness and accuracy of the model are improved.
Patent Information
- Application Number
- CN202411938375.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-15
AI Technical Summary
The existing industrial control protocol intrusion detection model has poor defense and is vulnerable to attacks. In practical applications, deep learning models are prone to false positives and have poor robustness.
The alternative model is trained through distillation learning based on the original data of traffic information, and the adversarial samples are generated and used to train the industrial control protocol intrusion detection model to improve the model's defense.
It improves the defense of the industrial control protocol intrusion detection model, reduces the misleading rate, and avoids data privacy leakage and security threats.
Smart Images

Figure CN119835034A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of substation information security and detection technology, and more specifically, relates to a method and system for improving the defensiveness of an industrial control protocol intrusion detection model. Background Art
[0002] As the power industry becomes increasingly dependent on the Internet, cybersecurity attacks pose a huge threat to the normal operation of enterprises. The power system is closely related to the production and life of modern society. Once it is attacked by a network, it may cause serious social impact and economic losses. The power industry faces various types of cyber attacks, including ransomware, distributed denial of service (DDoS) attacks, advanced persistent threat (APT) attacks, vulnerability exploits, and malware. In particular, nuclear power plants, as critical infrastructure, may have serious consequences once attacked. Therefore, it is crucial to protect and securely detect the network traffic of industrial control protocols.
[0003] At present, the messages transmitted by industrial control protocols are often in plain text, which provides attackers with opportunities to implement identity disguise and injection attacks. In addition, the data between different substations is also private, so it is very difficult to aggregate the flow data of all substations while ensuring security and privacy. In the prior art, common industrial control protection measures mainly focus on detecting the correctness of the message format, while in the field of intrusion detection, anomaly detection based on deep learning models is usually used. However, due to the limited amount of data in a single substation, the parameters of the trained deep learning model may not be optimized enough. In addition, in actual production applications, this deep learning model is prone to false alarms and has poor robustness. In real scenarios, industrial control systems face a variety of attacks, including adversarial attacks. The purpose of adversarial attacks is to deceive the deep learning model through small disturbances, resulting in its output errors. Therefore, the power industry needs to continuously improve the security protection measures of industrial control systems to ensure the stability and reliability of the system. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a method and system for improving the defensiveness of the industrial control protocol intrusion detection model. Based on the original data of the flow information, a substitution model is obtained by distillation learning training, and adversarial samples are generated by the substitution model. The adversarial samples are used to train the industrial control protocol intrusion detection model, which solves the problem that the industrial control protocol intrusion detection model has poor defense and is vulnerable to attacks.
[0005] The present invention adopts the following technical solution:
[0006] A first aspect of the present invention provides a method for improving the defensiveness of an industrial control protocol intrusion detection model, comprising the following steps:
[0007] Step 1: Based on the target industrial control protocol, obtain the original data set of flow information of the substation;
[0008] Step 2: Use the industrial control protocol intrusion detection model to classify the original data set of traffic information, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, combine the distillation loss and the prediction result loss to form a comprehensive loss function, and train the alternative model through the comprehensive loss function;
[0009] Step 3, calculate the gradient of the original data set of traffic information as input to the output of the alternative model through back propagation to generate perturbation noise; superimpose the perturbation noise on the original data set of traffic information to generate adversarial samples;
[0010] Step 4: Combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results based on the comprehensive loss function to identify attacks in the adversarial sample.
[0011] Preferably, using the industrial control protocol intrusion detection model to classify the original data set of flow information includes:
[0012] Extracting traffic data with protocol field features from the original data set of traffic information; the protocol field features include source address, destination address, protocol type, data payload length and timestamp;
[0013] Input the traffic data of the extracted protocol field features into the industrial control protocol intrusion detection model;
[0014] The classification probability distribution is generated through the Softmax function of the industrial control protocol intrusion detection model, where the classification probability distribution represents the confidence of the traffic data of the protocol field feature in the classification result;
[0015] The classification result is determined based on the maximum confidence of the classification probability distribution, and the classification result includes normal business traffic and offensive traffic.
[0016] Preferably, calculating the distillation loss based on the classification probability distribution includes:
[0017] Obtain the classification probability distribution of the industrial control protocol intrusion detection model for the original data set of traffic information as a reference distribution;
[0018] Obtain the classification probability distribution of the alternative model for the original data set of traffic information as the output distribution;
[0019] The distillation loss is defined by the KL divergence between the reference distribution and the output distribution, and is calculated as follows:
[0020]
[0021] Where, L dis represents the distillation loss; N represents the total number of samples in the original data set of traffic information; C represents the number of classification results; x i represents the i-th input sample; T k (x i ) represents the probability that the i-th input sample belongs to the k-th class in the reference distribution; S k (x i ) represents the probability that the i-th input sample belongs to the k-th class in the output distribution.
[0022] Preferably, calculating the prediction result loss based on the classification result includes:
[0023] Obtain the classification results generated by the industrial control protocol intrusion detection model for the original data set of traffic information;
[0024] Obtain the classification results generated by the alternative model for the original data set of traffic information;
[0025] Compare the consistency of the classification results between the industrial control protocol intrusion detection model and the alternative model, and calculate the deviation of the classification results;
[0026] The prediction result loss is defined based on the classification result deviation, satisfying the following relationship:
[0027]
[0028] Where, L pred Indicates the prediction result loss; I() indicates the indicator function which is 1 when the classification results are inconsistent and 0 when they are consistent; C P (x i ) represents the industrial control protocol intrusion detection model for the i-th input sample x i The classification result of C S (x i ) represents the substitution model for the i-th input sample x i The classification result; N represents the total number of samples in the original data set of traffic information.
[0029] Preferably, the comprehensive loss function formed by combining the distillation loss and the prediction result loss includes:
[0030] The comprehensive loss function is calculated using the following relationship:
[0031] L total =α·L dis +β·L pred
[0032] Where, L totalRepresents the comprehensive loss function; α represents the weight factor of the distillation loss; β represents the weight factor of the prediction result loss; in the process of training the alternative model through the comprehensive loss function, α and β are dynamically adjusted based on the numerical ratio of the distillation loss and the prediction result loss.
[0033] Preferably, training the alternative model by the comprehensive loss function comprises:
[0034] Based on the classification probability distribution and classification results generated by the surrogate model, the output of the surrogate model is updated by optimizing the comprehensive loss function;
[0035] The output of the surrogate model is updated based on the gradient as follows:
[0036]
[0037] In the formula, θ t represents the output of the surrogate model after the tth iteration; θ t+1 represents the output of the alternative model after the t+1th iteration; η represents the learning rate; Represents the gradient of the comprehensive loss function with respect to the output of the surrogate model.
[0038] Preferably, the gradient of the output of the alternative model using the original data set of traffic information as input is calculated by back propagation to generate disturbance noise, and the disturbance noise is superimposed on the original data set of traffic information to generate adversarial samples, including:
[0039] The original data set of traffic information is input into the substitution model as an input sample, and the classification probability distribution of the original data set of traffic information by the substitution model is obtained as the output distribution;
[0040] The gradient of the input sample to the output distribution is calculated by back propagation as follows:
[0041]
[0042] In the formula, Represents the gradient of the input sample to the output distribution; represents partial derivative; S(x) represents the output distribution generated by the alternative model; x represents the input sample;
[0043] Generate disturbance noise based on the calculated gradient, satisfying the following relationship:
[0044]
[0045] Where δ represents the generated disturbance noise; ∈ represents the disturbance intensity coefficient: sign(·) represents the sign function, which is used to determine the gradient direction;
[0046] The perturbation noise is added to the input sample to generate the adversarial sample according to the following relationship:
[0047] x adv =x+δ
[0048] In the formula, x adv Represents the generated adversarial examples.
[0049] A second aspect of the present invention provides a system for improving the defensiveness of an industrial control protocol intrusion detection model, including a flow information collection module, an alternative model training module, an adversarial sample generation module, and an industrial control protocol model optimization module;
[0050] The flow information acquisition module is used to obtain the original data set of flow information of the substation based on the target industrial control protocol;
[0051] The alternative model training module is used to classify the original data set of traffic information using the industrial control protocol intrusion detection model, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, and combine the distillation loss and the prediction result loss to form a comprehensive loss function. The alternative model is trained through the comprehensive loss function;
[0052] An adversarial sample generation module is used to calculate the gradient of the input sample of the original data set of traffic information to the output distribution of the alternative model through back propagation, generate perturbation noise, and superimpose the perturbation noise on the input sample of the original data set of traffic information to generate an adversarial sample;
[0053] The industrial control protocol model optimization module is used to combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results through a comprehensive loss function to identify attacks in adversarial samples.
[0054] A third aspect of the present invention provides a terminal, including a processor and a storage medium;
[0055] The storage medium is used to store instructions;
[0056] The processor is used to operate according to the instructions to execute the steps of a method for improving the defensiveness of an industrial control protocol intrusion detection model.
[0057] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for improving the defensiveness of an industrial control protocol intrusion detection model.
[0058] The beneficial effect of the present invention is that, compared with the prior art, the present invention targets the industrial control protocol intrusion detection model currently used in the power grid, and, based on the existing traffic data, trains a large number of adversarial samples, and uses the adversarial samples to train the industrial control protocol intrusion detection model, thereby improving the defense of the model, reducing the misleading rate of the industrial control protocol intrusion detection model, and avoiding data privacy leakage and security threats. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of the detection method in the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0061] like Figure 1 As shown, embodiment 1 of the present invention provides a method for improving the defensiveness of an industrial control protocol intrusion detection model, comprising the following steps:
[0062] Step 1: Based on the target industrial control protocol, obtain the original data set of flow information of the substation;
[0063] Preferably, step 1 specifically includes the following steps:
[0064] Obtain traffic information in the substation within a preset time period, including real network traffic data;
[0065] Evenly distribute the preset time period to each time period throughout the year to obtain the traffic of all industrial control protocol services as samples;
[0066] The acquired samples are used to produce an original dataset of real network traffic in the substation.
[0067] Step 2: Use the industrial control protocol intrusion detection model to classify the original data set of traffic information, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, combine the distillation loss and the prediction result loss to form a comprehensive loss function, and train the alternative model through the comprehensive loss function;
[0068] Preferably, the classifying the original data set of flow information by using the industrial control protocol intrusion detection model includes:
[0069] Extracting traffic data with protocol field features from the original data set of traffic information; the protocol field features include source address, destination address, protocol type, data payload length and timestamp;
[0070] Input the traffic data of the extracted protocol field features into the industrial control protocol intrusion detection model;
[0071] The classification probability distribution is generated through the Softmax function of the industrial control protocol intrusion detection model, where the classification probability distribution represents the confidence of the traffic data of the protocol field feature in the classification result;
[0072] The classification result is determined based on the maximum confidence of the classification probability distribution, and the classification result includes normal business traffic and offensive traffic.
[0073] Preferably, calculating the distillation loss based on the classification probability distribution includes:
[0074] Obtain the classification probability distribution of the industrial control protocol intrusion detection model for the original data set of traffic information as a reference distribution;
[0075] Obtain the classification probability distribution of the alternative model for the original data set of traffic information as the output distribution;
[0076] The distillation loss is defined by the KL divergence between the reference distribution and the output distribution, and is calculated as follows:
[0077]
[0078] Where, L dis represents the distillation loss; N represents the total number of samples in the original data set of traffic information; C represents the number of classification results; x i represents the i-th input sample; k represents; T k (x i ) represents the probability of the kth class in the reference distribution; S k (x i ) represents the probability of the kth class in the output distribution.
[0079] Preferably, calculating the prediction result loss based on the classification result includes:
[0080] Obtain the classification results generated by the industrial control protocol intrusion detection model for the original data set of traffic information;
[0081] Obtain the classification results generated by the alternative model for the original data set of traffic information;
[0082] Compare the consistency of the classification results between the industrial control protocol intrusion detection model and the alternative model, and calculate the deviation of the classification results;
[0083] The prediction result loss is calculated based on the classification result deviation definition using the following formula:
[0084]
[0085] Where, L pred Represents the prediction result loss; I represents the indicator function which is 1 when the classification results are inconsistent and 0 when they are consistent; C P (x i ) represents the classification result of the industrial control protocol intrusion detection model for the i-th sample; C S (x i ) represents the classification result of the alternative model for the i-th sample.
[0086] Preferably, the combined distillation loss and the prediction result loss to form a comprehensive loss function includes:
[0087] The comprehensive loss function is calculated as follows:
[0088] L total =α·L dis +β·L pred
[0089] Where, L total Represents the comprehensive loss function; α represents the weight factor of the distillation loss in the comprehensive loss function; β represents the weight factor of the prediction result loss in the comprehensive loss function; α and β are dynamically adjusted based on the numerical ratio of the distillation loss and the prediction result loss during the training process.
[0090] Preferably, the training of the substitution model by the comprehensive loss function comprises:
[0091] Based on the classification probability distribution and classification results generated by the surrogate model, the output of the surrogate model is updated by optimizing the comprehensive loss function;
[0092] The output of the surrogate model is updated based on the gradient as follows:
[0093]
[0094] In the formula, θ t represents the output of the current iteration of the surrogate model; θ t+1 represents the output of the alternative model after the t+1th iteration; η represents the learning rate; Represents the gradient of the comprehensive loss function with respect to the output of the surrogate model.
[0095] Specifically, step 2 also includes:
[0096] Use distillation learning to train the alternative model, and use the output of the target industrial control protocol intrusion detection model to guide the training of the alternative model;
[0097] KL divergence loss is used to quantify the difference between the output distribution of the alternative model and the distribution of the target industrial control protocol intrusion detection model T(X). For discrete random variables, the formula is as follows:
[0098]
[0099] Where:
[0100] P(X) represents the discrete probability distribution of the target industrial control protocol intrusion detection model of the industrial control protocol intrusion detection model; Q(X) represents the discrete probability distribution of the alternative model;
[0101] For continuous random variables, the formula is as follows:
[0102]
[0103] Where:
[0104] p(X) represents the probability density function of the target industrial control protocol intrusion detection model; q(X) represents the probability density function of the alternative model;
[0105] Adversarial sample support loss L bd , the formula is as follows:
[0106] L bd =d(T(X),S(X))·1{argmaxT(X)=argmaxS(X)}
[0107] Where:
[0108] 1{·} represents an indicator function, which takes the value 1 when the condition in the brackets is met, otherwise it takes the value 0;
[0109] argmaxT(X) represents the maximum probability category output by the target model;
[0110] argmaxS(X) represents the maximum probability category output by the alternative model;
[0111] Boundary support loss L adv , the formula is as follows:
[0112]
[0113] Where:
[0114] Represents the target model's response to adversarial samples The maximum probability category of the output;
[0115] Represents the alternative model for adversarial samples The maximum probability category of the output;
[0116] If the output of the model is a discrete probability distribution, L KL Select L KL1 ;
[0117] If the output of the model is a continuous probability distribution, L KL Select L KL2 .
[0118] According to the comprehensive loss function, the weights of the alternative model are updated through the back-propagation algorithm to gradually simulate the behavior and decision boundary of the target industrial control protocol intrusion detection model.
[0119] Step 3: Calculate the gradient of the original data set input of the traffic information to the output of the alternative model through back propagation to generate disturbance noise, and superimpose the disturbance noise on the original data set of the traffic information to generate adversarial samples;
[0120] Preferably, the step of calculating the gradient of the original data set input of the traffic information to the output of the alternative model by back propagation to generate disturbance noise, and superimposing the disturbance noise to the original data set of the traffic information to generate an adversarial sample includes:
[0121] The original data set of traffic information is input into the substitution model as an input sample, and the classification probability distribution of the original data set of traffic information by the substitution model is obtained as the output distribution;
[0122] The gradient of the input sample to the output distribution is calculated by back propagation as follows:
[0123]
[0124] In the formula, Represents the gradient of the input sample to the output distribution; represents the partial derivative; S(x) represents the output distribution generated by the alternative model; x represents the original data set of traffic information;
[0125] The perturbation noise is generated based on the calculated gradient, and the perturbation noise is calculated as follows:
[0126]
[0127] Where δ represents the generated disturbance noise; ∈ represents the disturbance intensity coefficient: sign(·) represents the sign function, which is used to determine the gradient direction;
[0128] The perturbation noise is superimposed on the input sample of the original data set of traffic information to generate adversarial samples as follows:
[0129] x adv =x+δ
[0130] In the formula, x adv Represents the generated adversarial examples.
[0131] Preferably, step 3 specifically includes the following steps:
[0132] Step 3.1, use the original traffic dataset as the initial input of the adversarial sample;
[0133] Step 3.2, input the initialized adversarial sample into the alternative model, use the neural network architecture to calculate the loss function of the alternative model, and obtain the gradient information;
[0134] The neural network architecture includes but is not limited to convolutional neural network (CNN), recurrent neural network (RNN), long short-term memory network (LSTM), Transformer, etc.;
[0135] Step 3.3, based on the obtained gradient information, generate adversarial traffic information through the fast gradient sign method FGSM;
[0136] In the present invention, the use of the fast gradient sign method FGSM to generate adversarial samples has the following benefits: efficient calculation and simple implementation, and can quickly generate adversarial traffic information for evaluating the defense capability of the target industrial control protocol intrusion detection model. At the same time, FGSM can reveal the vulnerabilities of the model, help improve and enhance the robustness of the model, and provide a baseline attack method to facilitate comparison and research of various defense strategies.
[0137] Preferably, step 3.3 specifically includes the following steps:
[0138] Step 3.3.1, generate the true label y of the traffic information of the adversarial sample;
[0139] Step 3.3.2: Use the classification model M to classify the original traffic dataset x ori Perform forward propagation and calculate the cross entropy loss function J(θ,x ori ,y), which is used to measure the difference between the model output and the true label. The formula is as follows:
[0140] J(θ,x ori ,y)=-∑ylog(M(x ori ))
[0141] Where:
[0142] θ represents the parameters of the model; x ori represents the original input traffic information, y represents the corresponding label; M(x ori ) represents the classification model M for the original traffic data set x ori The output probability distribution of
[0143] Step 3.3.3, according to the cross entropy loss function J(θ,x ori,y) uses the back propagation algorithm to calculate the input x ori Gradient
[0144] Step 3.3.4, based on the calculated gradient value, use the sign function to extract the gradient direction and generate attack noise. The amplitude of the attack noise is controlled by the parameter ∈. The formula is as follows:
[0145]
[0146] Where:
[0147] ∈ is a small positive number that controls the amplitude of the attack noise so that ‖η‖<∈;
[0148] Represents the input x ori Find the gradient;
[0149] η represents the generated attack noise;
[0150] Step 3.3.5: convert the original traffic dataset x ori Add the generated attack noise η to get the adversarial traffic information x adv , the formula is as follows:
[0151] x adv =x ori +η
[0152] Step 3.3.6, generate adversarial traffic information x adv Trim so that all flow values are within the control range.
[0153] In step 3.4, the generated adversarial traffic information is input into the target industrial control protocol intrusion detection model, the prediction results are recorded, the performance of the target industrial control protocol intrusion detection model on the original traffic information and the adversarial traffic information is compared, and the defense capability of the target industrial control protocol intrusion detection model against attacks is evaluated.
[0154] Step 4: Combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results based on the comprehensive loss function to identify attacks in the adversarial sample.
[0155] Preferably, step 4 specifically includes the following steps:
[0156] Step 4.1: The original traffic data set and the generated adversarial traffic information are used as training set samples for preprocessing, including data cleaning, standardization, and feature extraction.
[0157] Step 4.2, input the preprocessed training set samples into the target industrial control protocol intrusion detection model, and obtain the output of the model through forward propagation calculation;
[0158] Step 4.3, use the cross entropy loss function to measure the difference between the target industrial control protocol intrusion detection model output and the true label;
[0159] Preferably, in step 4.3, the cross entropy loss function is used to measure the difference between the target industrial control protocol intrusion detection model output and the true label, and the cross entropy loss function formula is as follows:
[0160] L = -∑(y·log(y hat ))
[0161] Where:
[0162] y represents the true label, y hat Represents the output of the model.
[0163] Step 4.4, calculate the gradient of the target industrial control protocol intrusion detection model parameters through the back propagation algorithm, and update the model weight parameters according to the gradient descent method;
[0164] Step 4.5, repeat the above steps, use the original traffic information and adversarial traffic information for multiple rounds of training, and terminate the training when the loss function converges or reaches the preset number of training rounds.
[0165] Example 2 of the present invention provides a system for improving the defensiveness of an industrial control protocol intrusion detection model, including a data acquisition module, a classification and loss calculation module, a replacement model training module, an adversarial sample generation module, and a training data optimization module.
[0166] A data acquisition module is used to obtain the original data set of flow information of the substation based on the target industrial control protocol;
[0167] The classification and loss calculation module is used to classify the original data set of traffic information using the industrial control protocol intrusion detection model, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, and combine the distillation loss and the prediction result loss to form a comprehensive loss function;
[0168] A surrogate model training module, used to train the surrogate model through a comprehensive loss function;
[0169] An adversarial sample generation module is used to calculate the gradient of the original data set input of the traffic information to the output of the alternative model through back propagation, generate perturbation noise, and superimpose the perturbation noise on the original data set of the traffic information to generate an adversarial sample;
[0170] The training data optimization module is used to combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results based on the comprehensive loss function to identify attacks in the adversarial sample.
[0171] The beneficial effect of the present invention is that, compared with the prior art, the present invention is aimed at the industrial control protocol intrusion detection model currently used in the power grid. Since the deep learning model itself is vulnerable to the threat of attack, under this attack threat, the misleading rate of the industrial control protocol intrusion detection model, data privacy leakage, security threat, and property loss will be increased. Based on the existing traffic data, a large number of adversarial samples are trained, and the adversarial samples and traffic samples are mixed to train the industrial control protocol intrusion detection model to improve the defense of the model. First, the traffic sample is used to train the alternative model to obtain the gradient information of the industrial control protocol intrusion detection model, and a large number of adversarial samples are generated according to the gradient information of the alternative model. The adversarial samples are used to improve the defense of the industrial control protocol intrusion detection model.
[0172] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0173] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0174] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0175] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for improving the defensiveness of an industrial control protocol intrusion detection model, characterized in that: The following steps are involved: Step 1: Based on the target industrial control protocol, obtain the original data set of flow information of the substation; Step 2: Use the industrial control protocol intrusion detection model to classify the original data set of traffic information, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, combine the distillation loss and the prediction result loss to form a comprehensive loss function, and train the alternative model through the comprehensive loss function; Step 3, calculate the gradient of the original data set of traffic information as input to the output of the alternative model through back propagation to generate disturbance noise; Superimpose perturbation noise onto the original data set of traffic information to generate adversarial samples; Step 4: Combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results based on the comprehensive loss function to identify attacks in the adversarial sample.
2. According to claim 1, a method for improving the defensiveness of an industrial control protocol intrusion detection model is characterized by: Using the industrial control protocol intrusion detection model to classify the original data set of traffic information includes: Extracting traffic data with protocol field features from the original data set of traffic information; the protocol field features include source address, destination address, protocol type, data payload length and timestamp; Input the traffic data of the extracted protocol field features into the industrial control protocol intrusion detection model; The classification probability distribution is generated through the Softmax function of the industrial control protocol intrusion detection model, where the classification probability distribution represents the confidence of the traffic data of the protocol field feature in the classification result; The classification result is determined based on the maximum confidence of the classification probability distribution, and the classification result includes normal business traffic and offensive traffic.
3. The method for improving the defensiveness of an industrial control protocol intrusion detection model according to claim 1, characterized in that: Calculating the distillation loss based on the classification probability distribution includes: Obtain the classification probability distribution of the industrial control protocol intrusion detection model for the original data set of traffic information as a reference distribution; Obtain the classification probability distribution of the alternative model for the original data set of traffic information as the output distribution; The distillation loss is defined by the KL divergence between the reference distribution and the output distribution, and is calculated as follows: Where, L dis represents the distillation loss; N represents the total number of samples in the original data set of traffic information; C represents the number of classification results; x i represents the i-th input sample; T k (x i ) represents the probability that the i-th input sample belongs to the k-th class in the reference distribution; S k (x i ) represents the probability that the i-th input sample belongs to the k-th class in the output distribution.
4. The method for improving the defensiveness of an industrial control protocol intrusion detection model according to claim 1, characterized in that: Calculating the prediction result loss based on the classification result includes: Obtain the classification results generated by the industrial control protocol intrusion detection model for the original data set of traffic information; Obtain classification results generated by the alternative model for the original data set of traffic information; Compare the consistency of the classification results between the industrial control protocol intrusion detection model and the alternative model, and calculate the deviation of the classification results; The prediction result loss is defined based on the classification result deviation, satisfying the following relationship: Where, L pred Indicates the prediction result loss; I() indicates the indicator function which is 1 when the classification results are inconsistent and 0 when they are consistent; C P (x i ) represents the industrial control protocol intrusion detection model for the i-th input sample x i The classification result of C S (x i ) represents the substitution model for the i-th input sample x i The classification result; N represents the total number of samples in the original data set of traffic information.
5. The method for improving the defensiveness of an industrial control protocol intrusion detection model according to claim 1, characterized in that: Combining the distillation loss and the prediction result loss to form a comprehensive loss function includes: The comprehensive loss function is calculated using the following relationship: L total =α·L dis +β·L pred Where, L total Represents the comprehensive loss function; α represents the weight factor of the distillation loss; β represents the weight factor of the prediction result loss; in the process of training the alternative model through the comprehensive loss function, α and β are dynamically adjusted based on the numerical ratio of the distillation loss and the prediction result loss.
6. A method for improving the defensiveness of an industrial control protocol intrusion detection model according to claim 1 or 5, characterized in that: Training alternative models with a comprehensive loss function includes: Based on the classification probability distribution and classification results generated by the surrogate model, the output of the surrogate model is updated by optimizing the comprehensive loss function; The output of the surrogate model is updated based on the gradient as follows: In the formula, θ t represents the output of the alternative model after the tth iteration; θ t+1 represents the output of the alternative model after the t+1th iteration; η represents the learning rate; represents the gradient of the comprehensive loss function with respect to the output of the surrogate model.
7. The method for improving the defensiveness of an industrial control protocol intrusion detection model according to claim 1, characterized in that: The gradient of the original data set of traffic information as input to the output of the alternative model is calculated by back propagation to generate perturbation noise, which is then superimposed on the original data set of traffic information to generate adversarial samples, including: The original data set of traffic information is input into the substitution model as an input sample, and the classification probability distribution of the original data set of traffic information by the substitution model is obtained as the output distribution; The gradient of the input sample to the output distribution is calculated by back propagation as follows: In the formula, Represents the gradient of the input sample to the output distribution; represents partial derivative; S(x) represents the output distribution generated by the alternative model; x represents the input sample; Generate disturbance noise based on the calculated gradient, satisfying the following relationship: Where δ represents the generated disturbance noise; ∈ represents the disturbance intensity coefficient: sign(·) represents the sign function, which is used to determine the gradient direction; The perturbation noise is added to the input sample to generate the adversarial sample according to the following relationship: x adv =x+δ In the formula, x adv Represents the generated adversarial examples.
8. A system for improving the defensiveness of an industrial control protocol intrusion detection model, comprising a flow information collection module, an alternative model training module, an adversarial sample generation module, and an industrial control protocol model optimization module, characterized in that: The flow information acquisition module is used to obtain the original data set of flow information of the substation based on the target industrial control protocol; The alternative model training module is used to classify the original data set of traffic information using the industrial control protocol intrusion detection model, obtain the classification probability distribution and classification results, calculate the distillation loss based on the classification probability distribution, calculate the prediction result loss based on the classification results, and combine the distillation loss and the prediction result loss to form a comprehensive loss function. The alternative model is trained through the comprehensive loss function; An adversarial sample generation module is used to calculate the gradient of the input sample of the original data set of traffic information to the output distribution of the alternative model through back propagation, generate perturbation noise, and superimpose the perturbation noise on the input sample of the original data set of traffic information to generate an adversarial sample; The industrial control protocol model optimization module is used to combine the adversarial sample with the original data set of traffic information to form a new training data set, input the new training data set into the industrial control protocol intrusion detection model, and adjust the classification probability distribution and classification results through a comprehensive loss function to identify attacks in adversarial samples.
9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Non-data-driven quantum federal learning method based on single communication
CN121390213A