WO2020134867A1 - 一种用于电力终端的异常数据的检测方法及装置 - Google Patents

一种用于电力终端的异常数据的检测方法及装置 Download PDF

Info

Publication number
WO2020134867A1
WO2020134867A1 PCT/CN2019/122142 CN2019122142W WO2020134867A1 WO 2020134867 A1 WO2020134867 A1 WO 2020134867A1 CN 2019122142 W CN2019122142 W CN 2019122142W WO 2020134867 A1 WO2020134867 A1 WO 2020134867A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
power terminal
neural network
address
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/122142
Other languages
English (en)
French (fr)
Inventor
朱朝阳
周亮
徐文渊
应欢
张天晨
韩丽芳
冀晓宇
缪思薇
朱亚运
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
State Grid Zhejiang Electric Power Co Ltd
China Electric Power Research Institute Co Ltd CEPRI
State Grid Corp of China SGCC
Original Assignee
Zhejiang University ZJU
State Grid Zhejiang Electric Power Co Ltd
China Electric Power Research Institute Co Ltd CEPRI
State Grid Corp of China SGCC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU, State Grid Zhejiang Electric Power Co Ltd, China Electric Power Research Institute Co Ltd CEPRI, State Grid Corp of China SGCC filed Critical Zhejiang University ZJU
Publication of WO2020134867A1 publication Critical patent/WO2020134867A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning

Definitions

  • the present application relates to the field of smart grid security, for example, a method and device for detecting abnormal data of a power terminal.
  • the present application provides a method for detecting abnormal data of a power terminal, which satisfies the needs of attack detection, attack identification, and attack prevention methods for electric power industrial control systems.
  • the present application provides a method for detecting abnormal data of a power terminal, including: acquiring historical flow data of a power terminal and preprocessing the historical flow data; and characterizing the pre-processed historical flow data Construct and output feature data; divide the feature data into training set data and test set data, input the training set data and the test set data to the neural network and train the neural network; will need
  • the detected power terminal data is input as input data to the trained neural network, and a detection result indicating whether the power terminal data to be detected is normal is obtained.
  • the present application also provides an apparatus for detecting abnormal data of a power terminal, including: a data acquisition unit configured to acquire historical flow data of the power terminal and preprocessing the historical flow data data; a feature construction unit, set In order to perform feature construction on the pre-processed historical traffic data and output feature data; the training unit is configured to divide the feature data into training set data and test set data, and divide the training set data and the test Set the data input to the neural network and train the neural network; the output unit is set to use the power terminal data to be detected as input data and input to the trained neural network to obtain whether the power terminal data needs to be detected Normal test results.
  • a data acquisition unit configured to acquire historical flow data of the power terminal and preprocessing the historical flow data data
  • a feature construction unit set In order to perform feature construction on the pre-processed historical traffic data and output feature data
  • the training unit is configured to divide the feature data into training set data and test set data, and divide the training set data and the test Set the data input to the neural network and train the neural network
  • FIG. 1 is a schematic flowchart of a method for detecting abnormal data of a power terminal according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a power terminal abnormal data prediction process involved in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a device for detecting abnormal data of a power terminal according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for detecting abnormal data of a power terminal provided by the present application.
  • the method provided by the embodiment of the present application is described in detail below in conjunction with FIG. 1.
  • the detection method includes steps S101 to step S104.
  • step S101 the historical flow data of the power terminal is acquired, and the historical flow data is pre-processed.
  • TCP transmission control protocol
  • power industrial control protocol content data in the historical flow data of the power terminal.
  • the extracted is IEC 60870- 5-104 agreement content.
  • the TCP data and the electric power industrial control protocol data form a data set, and the extracted data set is denoted as D.
  • the data set D is the pre-processed historical flow data, where the data set D has m rows and n columns, positive samples The data is represented as P, and the negative sample data is represented as N.
  • the extracted power terminal TCP protocol content data including: src: message source Internet Protocol (Internet Protocol (IP) address; dst: message destination IP address; src_port: message source port number; dst_port: message destination port number ; Seq: sequence number value; ack: header confirmation flag value; len: message length; flag: message flag value; check_sum: 16-bit checksum value.
  • IP Internet Protocol
  • the extracted power industrial control protocol content data includes: protocol_type: protocol type; protocol_format: protocol format; data: industrial control protocol message length; control_domain_1: control domain octet 1 value; control_domain_2: control domain octet 2 The value of control_domain_3: control domain octet 3 value; control_domain_4: control domain octet 4 value.
  • the binning method to denoise the TCP data and the power industrial control protocol data, that is, replace the noise value with the average of the neighboring values, to achieve denoising of the power terminal message data
  • the current data is TCP data
  • the next value is the top 5 data and the bottom 5 data of the current TCP data, so the average value of the next value is the average of these 10 data.
  • the current value of the next value The upper 5 data and the lower 5 data of the industrial control protocol data, the average of the neighboring values is the average of these 10 data.
  • the number of positive sample data and the number of negative sample data in the data set are balanced by the following method .
  • the data set obtained after oversampling is expressed as: Among them, p represents the number of positive sample data, n represents the number of negative sample data, a represents the multiple of oversampling processing, and d'represents the number of samples in the oversampling data set.
  • the number of negative sample data in the data set is less than the number of positive sample data
  • undersampling is performed on the sample data in the data set, that is, the number of positive sample data and negative sample data is balanced by randomly eliminating the majority of positive sample data Distribution
  • the data set obtained after sampling processing is expressed as: Where p'represents the number of positive sample data, n'represents the number of negative sample data, a'represents the multiple of undersampling processing, and d" represents the number of samples in the data set after undersampling.
  • step S102 the pre-processed historical flow data is subjected to feature construction, and the feature data is output.
  • step S103 the feature data is divided into training set data and test set data, and the training set data and test set data are input to a neural network and the neural network is trained.
  • the TensorFlow tool can be used to build a Long Short-Term Memory (LSTM) neural network architecture.
  • LSTM Long Short-Term Memory
  • Exemplary model.add(Dense(cat_num, activation 'softmax')), where cat_num is the input dimension of the upper neuron.
  • compile the model set the evaluation method to ‘accuracy’, the optimization method to ‘adam’, and the loss function to ‘binary_crossentropy’ to use logarithmic loss.
  • the historical traffic data of the feature data can be divided into training set data D_tr and test set data D_val according to the ratio of 1:5, to ensure that the data distribution of the training set data and the test set data is consistent, that is, the training set
  • the average number of data and test set data satisfies the formula E(D_tr) ⁇ E(D_val)
  • the median of training set data and test set data satisfies the formula var(D_tr) ⁇ var(D_val)
  • training set data and test set data The variance of satisfies the formula M(D_tr) ⁇ M(D_val).
  • X_train and y_train are the feature and label columns in the training set data
  • X_test and y_test are the feature and label columns in the test set data, respectively, to complete the training of the neural network model.
  • step S104 the power terminal data to be detected is used as input data and input to the trained neural network to obtain a detection result indicating whether the power terminal data to be detected is normal.
  • the power terminal data to be detected is power terminal data that can generate TCP data and power industrial control protocol data, that is, only power terminal data that can generate TCP data and power industrial control protocol data can be detected using the trained neural network.
  • Record the power terminal data to be detected as D_ts and input it to the trained LSTM neural network; the LSTM neural network calculates the probability value P (label 1
  • D_ts of the power terminal data to be detected belongs to positive sample data ) And the probability value P (label 0
  • D_ts) of the power terminal data that needs to be detected belongs to negative sample data; the probability value that the power terminal data that needs to be detected belongs to positive sample data is greater than the power terminal that needs to be detected The number belongs to the probability value of negative sample data, that is, in the case of P(label 1
  • the present application also provides a device 500 for detecting abnormal data of a power terminal, which is used to execute a method for detecting abnormal data of a power terminal according to any embodiment of the present application.
  • the device 500 includes The data acquisition unit 510, the feature construction unit 520, the training unit 530, and the output unit 540.
  • the data acquiring unit 510 is configured to acquire historical flow data of the power terminal, and pre-process the historical flow data.
  • the feature construction unit 520 is configured to perform feature construction on the pre-processed historical flow data and output feature data.
  • the training unit 530 is configured to divide the feature data into a training set data and a test set data, input the training set data and the test set data to a neural network, and train the neural network.
  • the output unit 540 is configured to input power terminal data to be detected as input data to the trained neural network to obtain a detection result indicating whether the power terminal data to be detected is normal.
  • the present application provides a method for detecting abnormal data of a power terminal.
  • detection of abnormal data of the power terminal is realized.
  • feature extraction feature extraction
  • building neural network model training neural network model. Then the model is used to detect the data of the power terminal to quickly and accurately find the abnormal data of the power terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开了一种用于电力终端的异常数据的检测方法,包括:获取电力终端的历史流量数据,并对所述历史流量数据进行预处理;对预处理后的所述历史流量数据进行特征构造,并输出特征数据;将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练;将需要检测的电力终端数据作为输入数据输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。

Description

一种用于电力终端的异常数据的检测方法及装置
本申请要求在2018年12月29日提交中国专利局、申请号为201811641352.X的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及智能电网安全领域,例如一种用于电力终端的异常数据的检测方法及装置。
背景技术
能源是人类生存发展的重要物质资源,在第二次工业革命后,电力成为人类社会使用的主要能源之一。在电力系统中,电网的主要作用是分配电能和传输电能。在21世纪网络时代,电网作为能源基础设施也必然离不开信息化,信息化在具有高度灵活性的同时,也带来了很多威胁和不确定性。可远程访问和控制的实时数据采集与监视控制(Supervisory Control And Data Acquisition,SCADA)系统,可远程访问和控制的可编程逻辑控制器(Programmable Logic Controller,PLC)在给我们带来便利的同时,也给恶意攻击者以可乘之机。为了保障电网的安全运行,需要研究针对电力工控系统的攻击检测、攻击识别和攻击防范的方法。
发明内容
本申请提供一种用于电力终端的异常数据的检测方法,满足了针对电力工控系统的攻击检测、攻击识别和攻击防范方法的需求。
本申请提供一种用于电力终端的异常数据的检测方法,包括:获取电力终端的历史流量数据,并对所述历史流量数据进行预处理;对预处理后的所述历史流量数据的进行特征构造,并输出特征数据;将所述特征数据数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练;将需要检测的电力终端数据作为输入数据,输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。
本申请同时提供一种用于电力终端的异常数据的检测装置,包括:数据获 取单元,设置为获取电力终端的历史流量数据,并对所述历史流量数据数据进行预处理;特征构造单元,设置为对预处理后的所述历史流量数据进行特征构造,并输出特征数据;训练单元,设置为将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练;输出单元,设置为将需要检测的电力终端数据作为输入数据,输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。
附图说明
图1是本申请一实施例提供的一种用于电力终端的异常数据的检测方法流程示意图;
图2是本申请一实施例涉及的LSTM神经网络搭建流程图;
图3是本申请一实施例涉及的电力终端异常数据预测流程示意图;
图4是本申请一实施例涉及的一种用于电力终端的异常数据的检测装置示意图。
具体实施方式
参看图1,图1是本申请提供的一种用于电力终端的异常数据的检测方法流程示意图,下面结合图1对本申请实施例提供的方法进行详细说明,如图所示该检测方法包括步骤S101至步骤S104。
在步骤S101中,获取电力终端的历史流量数据,并对所述历史流量数据进行预处理。
采集电力终端的历史流量数据,提取所述电力终端的历史流量数据中的传输控制协议(Transmission Control Protocol,TCP)内容数据和电力工控协议内容数据,在本实施例中,提取的是IEC 60870-5-104协议内容。
所述TCP数据和电力工控协议数据组成数据集,将提取到的该数据集记为D,数据集D即为预处理后的历史流量数据,其中数据集D具有m行和n列,正样本数据表示为P,负样本数据表示为N。提取出的电力终端TCP协议内容数据,包括:src:报文源互联网协议(Internet Protocol,IP)地址;dst:报文目标IP地址;src_port:报文源端口号;dst_port:报文目标端口号;seq:序列号的值;ack:首部确认标志值;len:报文长度;flag:报文标志值;check_sum: 16位校验和值。提取出的电力工控协议内容数据,包括:protocol_type:协议类型;protocol_format:协议格式;data:工控协议报文长度;control_domain_1:控制域八位位组1的值;control_domain_2:控制域八位位组2的值;control_domain_3:控制域八位位组3的值;control_domain_4:控制域八位位组4的值。然后,使用分箱法对所述TCP数据和电力工控协议数据进行去噪处理,即用临近值的均值替代噪声值,实现对电力终端报文数据的去噪,在当前数据为TCP数据的情况下,临近值即为当前TCP数据的上边5条数据和下边5条数据,因此临近值的均值即为这10条数据的均值,在当前数据为电力工控协议数据的情况下,临近值当前电力工控协议数据的上边5条数据和下边5条数据,临近值的均值即为这10条数据的均值。
在所述TCP数据和电力工控协议数据组成的数据集中,正样本数据的数量和负样本数据的数量不相等的情况下,通过下面的方法平衡数据集中的正样本数据数量和负样本数据的数量。
在数据集中负样本数据的数量大于正样本数据的数量的情况下,对数据集中的样本数据进行过采样处理,即通过随机复制样本中占少数的正样本数据中的实例来增加数据集中样本数据的数量,示例性的,在本方法中正样本数据占少数的情况下,进行过采样处理后得到数据集表示为:
Figure PCTCN2019122142-appb-000001
其中,p表示正样本数据的数量,n表示负样本数据的数量,a表示过采样处理的倍数,d'表示过采样后的数据集的样本数量。
在数据集中负样本数据的数量小于正样本数据的数量的情况下,对数据集中的样本数据进行欠采样处理,即通过随机消除占多数的正样本数据来平衡正样本数据和负样本数据的数量分布,示例性的,进行采样处理后得到的数据集表示为:
Figure PCTCN2019122142-appb-000002
其中,p'表示正样本数据的数量,n'表示负样本数据的数量,a'表示欠采样处理的倍数,d”表示欠采样后的数据集的样本数量。
在步骤S102中,对预处理后的所述历史流量数据进行特征构造,并输出特征数据。
下面为构造预处理后的所述历史流量数据的特征的详细过程:计算固定源IP地址到固定目的IP地址中的报文长度;计算固定源IP地址到固定目的IP地址中工控报文长度;计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组1的值;计算计算固定源IP地址到固定目的IP地址中不同协议格式 报文数量;计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组2的值;计算数据中不同协议格式报文数量;计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组3的值;计算固定源IP地址到固定目的IP地址中不同协议格式报文数量;计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组4的值;计算工控协议报文长度占报文总长度的比例。
在步骤S103中,将所述特征数据分为训练集数据和测试集数据,将训练集数据和测试集数据输入至神经网络并对所述神经网络进行训练。
在一实施例中,可以使用TensorFlow工具,搭建长短期记忆(Long Short-Term Memory,LSTM)神经网络架构,搭建流程请参看图2,首先初始化序贯模型。然后,设置所述LSTM神经网络层的输入维数为训练集维数,设置输出维数,示例性的,添加一个LSTM神经网络层,其输入维数为训练集维数,输出维数为32。例如model.add(LSTM(16,input_shape=(1,X_train.shape[2]))),其中X_train为训练集。设置所述LSTM神经网络的中间全连接层的输入节点数,使用的激活函数为ReLu,所述激活函数表达式为:f(x)=max(0,x)。示例性的,所述LSTM神经网络还可以添加一个中间全连接层(Dense),设置Dense输入节点数为32,激活函数为activation=’relu’,relu(The Rectified Linear Unit)激活函数表达式为:f(x)=max(0,x)。例如,model.add(Dense(units=32,activation=’relu’))。
接下来再添加一个输出全连接层(Dense),设置该Dense层输入节点32,激活函数activation=’softmax’,即为归一化指数函数。示例性的model.add(Dense(cat_num,activation=’softmax’)),式中cat_num为上层神经元输入维数。最后对模型进行编译,设置评价方法为’accuracy’,优化方式为’adam’,损失函数为’binary_crossentropy’,即使用对数损失。示例性的,model.complie(loss=’binary_crossentropy’,optimizer=‘adam’,metrics=[‘accuracy’]),完成LSTM神经网络架构的搭建。
在搭建完LSTM网络模型后,可以将特征数据的历史流量数据按照1:5的比例分为训练集数据D_tr和测试集数据D_val,保证训练集数据和测试集数据的数据分布一致,即训练集数据和测试集数据的平均数满足公式E(D_tr)≈E(D_val),训练集数据和测试集数据的中位数满足公式var(D_tr)≈var(D_val),训练集数据和测试集数据的方差满足公式M(D_tr)≈M(D_val)。
使用训练集对LSTM神经网络进行训练,设置循环次数epoch=10。示例性的,model.fit(X_train,y_train,validation_data=(X_test,y_test),epoch=10)。式中, X_train和y_train分别为训练集数据中的特征和标签列;X_test和y_test分别为测试集数据中特征和标签列,完成对神经网络模型的训练。使用测试集数据对训练后的LSTM神经网络进行测试。
在步骤S104中,将需要检测的电力终端数据作为输入数据,输入至训练后的神经网络中,得到表明所述需要检测的电力终端数据是否正常的检测结果。
上述需要检测的电力终端数据为可以产生TCP数据和电力工控协议数据的电力终端数据,即只有可以产生TCP数据和电力工控协议数据的电力终端数据才可以使用该训练后的神经网络进行检测。将需要检测的电力终端数据记为D_ts,并输入至训练后的LSTM神经网络;所述LSTM神经网络计算出所述需要检测的电力终端数据属于正样本数据的概率值P(label=1|D_ts)和所述需要检测的电力终端数据属于负样本数据的概率值P(label=0|D_ts);在所述需要检测的电力终端数据属于正样本数据的概率值大于所述需要检测的电力终端数属于负样本数据的概率值,即P(label=1|D_ts)>0.5的情况下,输出表明该需要检测的电力终端数据为正常数据的检测结果,在所述需要检测的电力终端数据属于正样本数据的概率值小于或者等于所述需要检测的电力终端数据属于负样本数据的概率值,即P(label=1|D_ts)≤0.5情况下,输出表明该需要检测的电力终端数据为异常数据的检测结果,使用所述训练后的神经网络输出所述需要预测的电力终端数据是正常数据或是异常数据的流程请参看图3,从图3中可以看出,输入一条需要检测的电力终端数据,该需要检测的电力终端数据记为D_ts,通过所述训练后的神经网络,在根据LSTM神经网络计算出的所述需要检测测的电力终端数据属于正样本数据的概率小于属于所述需要检测的电力终端数据负样本数据的概率的情况下,输出表明该需要检测的电力终端数据为异常数据的检测结果。
从获取电力终端的历史流量数据,到搭建LSTM神经网络并对所述神网络进行训练,最终通过所述LSTM神经网络输出需要预测的电力终端数据是正常数据或是异常数据。
本申请同时提供一种用于电力终端的异常数据的检测装置500,用于执行本申请任意实施例提供的一种用于电力终端的异常数据的检测方法,参见图4,该检测装置500包括数据获取单元510、特征构造单元520、训练单元530及输出单元540。
数据获取单元510,设置为获取电力终端的历史流量数据,并对所述历史流 量数据进行预处理。
特征构造单元520,设置为对预处理后的所述历史流量数据进行特征构造,并输出特征数据。
训练单元530,设置为将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练。
输出单元540,设置为将需要检测的电力终端数据作为输入数据输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。
本申请提供的一种用于电力终端的异常数据的检测方法,通过对电力终端的历史流量数据进行数据挖掘分析,实现对电力终端异常数据的检测。通过历史流量数据预处理、特征提取、搭建神经网络模型、训练神经网络模型。再利用该模型对电力终端的数据进行检测,快速准确发现电力终端的异常数据。

Claims (10)

  1. 一种用于电力终端的异常数据的检测方法,包括:
    获取电力终端的历史流量数据,并对所述历史流量数据进行预处理;
    对预处理后的所述历史流量数据进行特征构造,并输出特征数据;
    将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练;
    将需要检测的电力终端数据作为输入数据输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。
  2. 根据权利要求1所述的方法,其中,所述获取电力终端的历史流量数据,并对所述历史流量数据进行预处理,包括:
    采集电力终端的历史流量数据;
    提取所述电力终端的历史流量数据中的传输控制协议TCP数据和电力工控协议数据,所述TCP数据和所述电力工控协议数据组成数据集;
    其中所述数据集具有m行n列样本数据,所述数据集包括正样本数据和负样本数据。
  3. 根据权利要求2所述的方法,在对所述历史流量数据进行预处理的步骤之后,还包括:
    使用分箱法对所述数据集进行去噪处理。
  4. 根据权利要求3所述的方法,在使用分箱法对所述数据集进行去噪处理之后,还包括:
    在所述数据集中所述正样本数据的数量和所述负样本数据的数量不相等的情况下,执行以下步骤:
    在所述数据集中负样本数据的数量大于正样本数据的数量的情况下,对所述数据集进行过采样处理,过采样处理后得到的数据集表示为:
    Figure PCTCN2019122142-appb-100001
    其中,p为正样本数据的数量,n为负样本数据的数量,a为过采样处理的倍数,d'表示过采样后的数据集的样本数量;
    在所述数据集中负样本数据的数量小于正样本数据的数量的情况下,对所述数据集进行欠采样处理,欠采样处理后得到的数据集表示为:,
    Figure PCTCN2019122142-appb-100002
    其中,p'为正样本数据的数量,n'为负样本数据的数量, a'为欠采样处理的倍数,d”表示欠采样后的数据集的样本数量。
  5. 根据权利要求1所述的方法,其中,对预处理后的所述历史流量数据进行特征构造,并输出特征数据,包括:
    计算固定源互联网协议IP地址到固定目的IP地址中的报文长度;
    计算固定源IP地址到固定目的IP地址中工控报文长度;
    计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组1的值;
    计算计算固定源IP地址到固定目的IP地址中不同协议格式报文数量;
    计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组2的值;
    计算数据中不同协议格式报文数量;
    计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组3的值;
    计算固定源IP地址到固定目的IP地址中不同协议格式报文数量;
    计算固定源IP地址到固定目的IP地址中不同协议格式控制域八位位组4的值;
    计算工控协议报文长度占报文总长度的比例。
  6. 根据权利要求1所述的方法,其中,所述将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练,包括:
    使用TensorFlow工具,搭建长短期记忆LSTM神经网络架构;
    将所述特征数据按照1:5的比例分为训练集数据和测试集数据;
    使用所述训练集数据对所述LSTM神经网络进行训练,使用所述测试集数据对训练后的LSTM神经网络进行测试。
  7. 根据权利要求6所述的方法,其中,所述LSTM神经网络架构包括:序贯模型、神经网络层、中间全连接层和输出全连接层;所述使用TensorFlow工具,搭建LSTM神经网络架构,包括:
    初始化所述序贯模型;
    设置所述神经网络层的输入维数为训练集维数,设置输出维数;
    设置所述中间全连接层的输入节点数,使用的激活函数为ReLu,所述激活 函数表达式为:f(x)=max(0,x);
    设置所述输出全连接层的输入节点,使用的激活函数为归一化指数函数activation=’softmax’;
    对所述序贯模型进行编译,以完成所述LSTM神经网络架构的搭建。
  8. 根据权利要求6所述的方法,所述将所述特征数据按照1:5的比例分为训练集数据和测试集数据,包括:
    按照以下条件对所述训练集数据和测试集数据进行划分:
    所述训练集数据的平均数和所述测试集数据的平均数满足以下公式:E(D_tr)≈E(D_val);
    所述训练集数据的中位数和所述测试集数据的中位数满足以下公式:var(D_tr)≈var(D_val);
    所述训练集数据数据的方差和所述测试集数据数据的方差满足以下公式:M(D_tr)≈M(D_val);
    其中,D_tr为训练集数据数据,D_val为测试集数据数据。
  9. 根据权利要求1所述的方法,其中,所述将需要检测的电力终端数据作为输入数据输入至训练后的神经网络中,得到表明所述需要检测的电力终端数据是否正常的检测结果,包括:
    将需要检测的电力终端数据记为D_ts,并输入至所述训练后的神经网络中;
    所述训练后的神经网络计算出所述需要检测的电力终端数据属于正样本数据的概率值P(label=1|D_ts)和所述需要检测的电力终端数据属于负样本数据的概率值P(label=0|D_ts);
    在所述需要检测的电力终端数据属于正样本数据的概率值大于所述需要检测的电力终端数据属于负样本数据的概率值的情况下,输出表明所述需要检测判断的电力终端数据为正常数据的检测结果,在所述需要检测的电力终端数据属于正样本数据的概率值小于或者等于所述需要检测的电力终端数据属于负样本数据的概率值的情况下,输出表明所述需要检测的电力终端数据为为异常数据的检测结果。
  10. 一种用于电力终端的异常数据的检测装置,包括数据获取单元、特征构造单元、训练单元和输出单元;
    数据获取单元,设置为获取电力终端的历史流量数据,并对所述历史流量数据进行预处理;
    特征构造单元,设置为对预处理后的所述历史流量数据进行特征构造,并输出特征数据;
    训练单元,设置为将所述特征数据分为训练集数据和测试集数据,将所述训练集数据和所述测试集数据输入至神经网络并对所述神经网络进行训练;
    输出单元,设置为将需要检测的电力终端数据作为输入数据输入至训练后的神经网络,得到表明所述需要检测的电力终端数据是否正常的检测结果。
PCT/CN2019/122142 2018-12-29 2019-11-29 一种用于电力终端的异常数据的检测方法及装置 Ceased WO2020134867A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811641352.XA CN109922038A (zh) 2018-12-29 2018-12-29 一种用于电力终端的异常数据的检测方法及装置
CN201811641352.X 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020134867A1 true WO2020134867A1 (zh) 2020-07-02

Family

ID=66960071

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122142 Ceased WO2020134867A1 (zh) 2018-12-29 2019-11-29 一种用于电力终端的异常数据的检测方法及装置

Country Status (2)

Country Link
CN (1) CN109922038A (zh)
WO (1) WO2020134867A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984503A (zh) * 2020-08-17 2020-11-24 网宿科技股份有限公司 一种监控指标数据异常数据识别的方法及装置
CN114114910A (zh) * 2021-11-12 2022-03-01 浙江大学 一种基于模型-数据混合驱动的电力工控系统动态异常检测方法
CN114331001A (zh) * 2021-11-26 2022-04-12 国网山东省电力公司营销服务中心(计量中心) 一种自适应匹配的电力终端异常工单分派方法及系统
CN115618283A (zh) * 2022-12-02 2023-01-17 中国汽车技术研究中心有限公司 一种跨站点脚本攻击检测方法、装置、设备及存储介质
CN116049675A (zh) * 2023-02-14 2023-05-02 重庆赛宝工业技术研究院有限公司 一种基于低碳经济的新能源数据异常检测方法
CN116662573A (zh) * 2023-06-15 2023-08-29 上海康达电力安装工程有限公司 一种应用于电力能源管控的知识图谱预测方法及装置

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922038A (zh) * 2018-12-29 2019-06-21 中国电力科学研究院有限公司 一种用于电力终端的异常数据的检测方法及装置
CN110460576A (zh) * 2019-07-11 2019-11-15 珠海市鸿瑞信息技术股份有限公司 一种多功能网络安全态势感知系统
CN114128215B (zh) * 2019-07-23 2023-05-12 日本电信电话株式会社 异常检测装置、异常检测方法以及记录介质
CN110401191B (zh) * 2019-07-29 2020-12-08 浙江大学 基于时序逻辑的电动车充电桩业务逻辑一致性分析方法
CN110719275B (zh) * 2019-09-30 2021-04-02 南方电网科学研究院有限责任公司 一种基于报文特征的电力终端漏洞攻击检测方法
CN111160419B (zh) * 2019-12-13 2023-04-18 中国电力科学研究院有限公司 一种基于深度学习的电子式互感器数据分类预测方法及装置
CN111127251A (zh) * 2019-12-23 2020-05-08 南方电网科学研究院有限责任公司 基于lstm神经网络的攻击识别方法及并网接口装置
CN111061152B (zh) * 2019-12-23 2021-04-27 深圳供电局有限公司 基于深度神经网络的攻击识别方法及智慧能源功率控制装置
CN111786986B (zh) * 2020-06-29 2021-08-27 华中科技大学 一种数控系统网络入侵防范系统及方法
CN111865947B (zh) * 2020-07-08 2021-07-20 浙江大学 一种基于迁移学习的电力终端异常数据生成方法
CN111738364B (zh) * 2020-08-05 2021-05-25 国网江西省电力有限公司供电服务管理中心 一种基于用户负荷与用电参量相结合的窃电检测方法
CN112016248B (zh) * 2020-08-31 2024-10-22 华北电力大学 一种基于Elman神经网络SCR脱硝系统不良数据辨识方法
CN112491849B (zh) * 2020-11-18 2022-08-05 深圳供电局有限公司 一种基于流量特征的电力终端漏洞攻击防护方法
DE112021005667T5 (de) * 2021-01-06 2023-09-14 Robert Bosch Gesellschaft mit beschränkter Haftung Verfahren und Einrichtung zum Erkennen von Anomalien in einer mechanischen Einrichtung oder einem mechanischen Bauteil
CN113052490A (zh) * 2021-04-15 2021-06-29 全球能源互联网研究院有限公司 一种电力工控系统协同防御方法、装置及存储介质
CN113671287B (zh) * 2021-08-16 2024-02-02 广东电力通信科技有限公司 电网自动化终端智能检测方法、系统和可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221651A (zh) * 2011-03-11 2011-10-19 太原理工大学 一种矿用隔爆型干式变压器故障在线诊断及预警方法
CN107063349A (zh) * 2017-04-17 2017-08-18 云南电网有限责任公司电力科学研究院 一种诊断变压器故障的方法及装置
US20180101765A1 (en) * 2016-10-07 2018-04-12 Global Optimal Technology, Inc. System and method for hierarchically building predictive analytic models on a dataset
CN108881250A (zh) * 2018-06-28 2018-11-23 广东电网有限责任公司 电力通信网络安全态势预测方法、装置、设备及存储介质
CN109088744A (zh) * 2018-06-28 2018-12-25 广东电网有限责任公司 电力通信网络异常入侵检测方法、装置、设备及存储介质
CN109922038A (zh) * 2018-12-29 2019-06-21 中国电力科学研究院有限公司 一种用于电力终端的异常数据的检测方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10015189B2 (en) * 2016-02-09 2018-07-03 International Business Machine Corporation Detecting and predicting cyber-attack phases in adjacent data processing environment regions
CN106685689B (zh) * 2016-10-26 2019-08-27 浙江工商大学 一种基于深度学习的sdn流表冲突检测装置及方法
CN106817363B (zh) * 2016-12-24 2020-06-26 国网江苏省电力公司信息通信分公司 基于神经网络的智能电表异常检测方法
CN106656637B (zh) * 2017-02-24 2019-11-26 国网河南省电力公司电力科学研究院 一种电网异常检测方法及装置
CN107122790B (zh) * 2017-03-15 2021-06-11 华北电力大学 基于混合神经网络和集成学习的非侵入式负荷识别算法
CN107730025B (zh) * 2017-09-01 2021-04-09 国网浙江省电力公司绍兴供电公司 一种基于电量变动的供电企业现金流量预测模型
CN108154223B (zh) * 2017-12-22 2022-04-15 北京映翰通网络技术股份有限公司 基于网络拓扑及长时序信息的配电网工况录波分类方法
CN108460089B (zh) * 2018-01-23 2022-03-01 海南师范大学 基于Attention神经网络的多元特征融合中文文本分类方法
CN108761377A (zh) * 2018-05-28 2018-11-06 国网福建省电力有限公司电力科学研究院 一种基于长短时记忆模型的电能计量装置异常检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221651A (zh) * 2011-03-11 2011-10-19 太原理工大学 一种矿用隔爆型干式变压器故障在线诊断及预警方法
US20180101765A1 (en) * 2016-10-07 2018-04-12 Global Optimal Technology, Inc. System and method for hierarchically building predictive analytic models on a dataset
CN107063349A (zh) * 2017-04-17 2017-08-18 云南电网有限责任公司电力科学研究院 一种诊断变压器故障的方法及装置
CN108881250A (zh) * 2018-06-28 2018-11-23 广东电网有限责任公司 电力通信网络安全态势预测方法、装置、设备及存储介质
CN109088744A (zh) * 2018-06-28 2018-12-25 广东电网有限责任公司 电力通信网络异常入侵检测方法、装置、设备及存储介质
CN109922038A (zh) * 2018-12-29 2019-06-21 中国电力科学研究院有限公司 一种用于电力终端的异常数据的检测方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984503A (zh) * 2020-08-17 2020-11-24 网宿科技股份有限公司 一种监控指标数据异常数据识别的方法及装置
CN111984503B (zh) * 2020-08-17 2023-12-01 网宿科技股份有限公司 一种监控指标数据异常数据识别的方法及装置
CN114114910A (zh) * 2021-11-12 2022-03-01 浙江大学 一种基于模型-数据混合驱动的电力工控系统动态异常检测方法
CN114114910B (zh) * 2021-11-12 2023-10-27 浙江大学 一种基于模型-数据混合驱动的电力工控系统动态异常检测方法
CN114331001A (zh) * 2021-11-26 2022-04-12 国网山东省电力公司营销服务中心(计量中心) 一种自适应匹配的电力终端异常工单分派方法及系统
CN115618283A (zh) * 2022-12-02 2023-01-17 中国汽车技术研究中心有限公司 一种跨站点脚本攻击检测方法、装置、设备及存储介质
CN116049675A (zh) * 2023-02-14 2023-05-02 重庆赛宝工业技术研究院有限公司 一种基于低碳经济的新能源数据异常检测方法
CN116662573A (zh) * 2023-06-15 2023-08-29 上海康达电力安装工程有限公司 一种应用于电力能源管控的知识图谱预测方法及装置

Also Published As

Publication number Publication date
CN109922038A (zh) 2019-06-21

Similar Documents

Publication Publication Date Title
WO2020134867A1 (zh) 一种用于电力终端的异常数据的检测方法及装置
CN117411703B (zh) 一种面向Modbus协议的工业控制网络异常流量检测方法
CN109063745B (zh) 一种基于决策树的网络设备类型识别方法及系统
CN109600363B (zh) 一种物联网终端网络画像及异常网络访问行为检测方法
CN111191767B (zh) 一种基于向量化的恶意流量攻击类型的判断方法
CN111131314B (zh) 网络行为的检测方法、装置、计算机设备和存储介质
CN112804123B (zh) 一种用于调度数据网的网络协议识别方法及系统
JP6564799B2 (ja) 閾値決定装置、閾値決定方法及びプログラム
CN106559261A (zh) 一种基于特征指纹的变电站网络入侵检测与分析方法
CN110868404B (zh) 一种基于tcp/ip指纹的工控设备自动识别方法
CN111107107B (zh) 网络行为的检测方法、装置、计算机设备和存储介质
CN112671724B (zh) 一种终端安全检测分析方法、装置、设备及可读存储介质
CN116405261A (zh) 基于深度学习的恶意流量检测方法、系统及存储介质
CN119583115B (zh) 一种基于生成对抗网络模型的goose协议报文异常检测方法
CN117493797A (zh) 一种物联网设备的故障预测方法及装置、电子设备、存储介质
CN116389116A (zh) 基于人工智能的工业控制系统网络安全态势感知系统
CN106935038B (zh) 一种停车检测系统及检测方法
CN112565308B (zh) 基于网络流量的恶意应用检测方法、装置、设备及介质
CN115118447A (zh) 工控网络流量的安全判别方法、装置、电子装置和介质
CN109842511B (zh) 一种tcp性能参数的确定方法及系统
CN102098346B (zh) 一种在未知流量中识别p2p流媒体流量的方法
CN116915447A (zh) 网络流量异常检测方法、装置、电子设备及存储介质
CN120528640A (zh) 一种加密网络异常流量检测方法、系统、设备及介质
CN111131322B (zh) 网络行为的检测方法、装置、计算机设备和存储介质
CN111865947A (zh) 一种基于迁移学习的电力终端异常数据生成方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19902580

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19902580

Country of ref document: EP

Kind code of ref document: A1