WO2021243848A1 - 一种无线传感网异常检测方法 - Google Patents
一种无线传感网异常检测方法 Download PDFInfo
- Publication number
- WO2021243848A1 WO2021243848A1 PCT/CN2020/108778 CN2020108778W WO2021243848A1 WO 2021243848 A1 WO2021243848 A1 WO 2021243848A1 CN 2020108778 W CN2020108778 W CN 2020108778W WO 2021243848 A1 WO2021243848 A1 WO 2021243848A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- data set
- penalty coefficient
- wireless sensor
- sensor network
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/06—Testing, supervising or monitoring using simulated traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the invention relates to a wireless sensor network abnormality detection method integrating fuzzy twin support vector machines and adaptive iterative optimization, and belongs to the technical field of sensor network data processing.
- Wireless Sensor Networks is a distributed sensor network, the end of which is a sensor that can perceive and inspect the outside world.
- the wireless sensor network is easy to deploy, low in price, and can be a large-scale self-organizing network, and the sensor has the characteristics of miniaturization, intelligence, and multi-function. Therefore, wireless sensor networks are widely used in agricultural production, environmental detection, intelligent transportation, smart home and other fields. For example, in the process of agricultural production, through the establishment of WSN agricultural environment automatic detection system, real-time collection and control of the temperature, humidity, light intensity, growth law of precious cash crops and other factors affecting the growth of crops can be effectively improved. The degree of intensive agricultural production will improve the scientific nature of agricultural production and planting.
- One is a wireless sensor network anomaly detection method based on artificial immunity and K-means clustering. This method compresses and stores the data collected by the sensor network monitoring nodes, and then adopts the K-means clustering method to gather normal data and abnormal data into different clusters to complete abnormal data detection.
- the other method is a global abnormal data detection method based on a widening histogram, which aggregates dynamic perception data into a widened histogram by data fusion and executes the detection process.
- the above method of using artificial immunity and K-means clustering has the disadvantage that when the monitoring data is compressed and stored, if the data does not show a certain regularity, it cannot effectively save resources and improve the detection efficiency; and it simply uses traditional methods.
- the K-means clustering method cannot effectively improve the monitoring accuracy.
- Another method for detecting global abnormal data based on a widening histogram does not effectively improve the accuracy of abnormal data monitoring.
- the current wireless sensor network anomaly detection has the problems of low efficiency, low precision, and weak generalization ability.
- the present invention proposes a wireless sensor network anomaly detection method, which combines fuzzy twin support vector machine and adaptive iterative optimization to solve the problem that the current wireless sensor network has low anomaly detection efficiency and accuracy.
- a wireless sensor network abnormality detection method which is characterized in that it includes the following steps;
- the data preprocessing includes data normalization processing, class imbalance processing, and division of training data sets and detection data sets.
- S3 Establish a wireless sensor network anomaly detection model, use adaptive iterative optimization to search for the penalty coefficient C of the fuzzy twin support vector machine, and use the training data set as data input to establish a wireless sensor network anomaly detection model;
- S4 Use the established wireless sensor network anomaly detection model, use the detection data set as the input of the model, and determine the normal data and abnormal data in the detection data set according to the output result of the model, and complete the wireless sensor network abnormal data detection.
- the wireless sensor network anomaly detection model is a fuzzy twin support vector machine anomaly detection model, and the steps to establish the model are:
- the kernel function K(x,z) is introduced to map the input value of the low-dimensional space to the high-dimensional space for inner product operation, thereby realizing non-linearity. Linear separable after linear transformation;
- the penalty coefficient C is a prerequisite for solving the objective optimization function, and the penalty coefficient C of the fuzzy twin support vector machine is searched for by adaptive iterative optimization.
- Each subset search strategy is executed as follows:
- groupA performs local target search according to formula (1):
- groupB performs a global target search according to formula (2):
- groupC performs global target search according to formula (3):
- groupA performs a local target search according to formula (1):
- groupB performs a global target search according to formula (2):
- groupC performs a global target search according to formula (4):
- RandomValue represents a random number in the range [5,20]
- ⁇ is the weight
- Best-performing data point processing According to formula (5), calculate the determined value and location of the penalty coefficient of the best-performing data point in the current and historical iterations, and They are the determined values of the penalty coefficients of the best-performing data points in the current iteration and historical iterations;
- (X axis , Y axis ) and (X axisc , Y axisc ) represent the positions of the best data points in the current iteration and historical iterations;
- step S315) if more than the Update the determined value and position of the penalty coefficient of the best-performing data point in the historical iteration to step S315) The determined value and position of the penalty coefficient of the best-performing data point under the search conditions,
- step S2 the synthetic minority oversampling technology is used to perform class imbalance processing on the detection data set, and the specific steps are:
- the proportion of abnormal data is generally lower than that of normal data. Therefore, the abnormal data is regarded as a minority class.
- step S2 the processing formula for normalizing the detection data set is:
- x i represents the original data set of data
- X i represents the processed data normalization
- X i ⁇ [0,1] min is the minimum value of the original data set
- max is the maximum value of the original data set.
- step S318) the smallest C value is selected as the optimal penalty coefficient of the anomaly detection model.
- step S31 select the amount of training data set As the size of the optimization data set M.
- 3/5 of the data is left as the detection data.
- Set X test .
- step S31 the radial basis kernel function is selected, ⁇ is the nuclear parameter.
- the detection method of the present invention is based on the fusion theory, fusing the fuzzy twin support vector machine and the wireless sensor network anomaly detection system with adaptive iterative optimization.
- the main purpose is to solve the current wireless sensor network abnormality detection efficiency. High, low precision, and weak generalization ability.
- the system has been tested and demonstrated strong detection capabilities, higher classification accuracy, and a wider range of application scenarios. Its generalization ability is strong, and it can be widely used in many wireless sensor network anomaly detection environments. Accuracy and efficiency of detection.
- FIG. 1 is a flowchart of the method described in the embodiment
- Figure 2 is a flowchart of iterative optimization of the penalty coefficient C of the fuzzy twin support vector machine.
- This embodiment discloses a wireless sensor network abnormality detection method, as shown in FIG. 1, including the following steps:
- the wireless sensor network monitoring node collects a set of monitoring data every fixed time interval ⁇ t, and sends it to the base station in a wireless multi-hop manner, and the base station will receive the original data set X;
- S2 Data preprocessing, normalization of numerical variables on the original data set X, division of training data sets, detection data sets, and data imbalance processing;
- S3 Establish an anomaly detection model, use the training data set to construct and solve the quadratic programming problem with convex constraints, and build a fuzzy twin support vector machine anomaly detection model;
- the detection data set is input as the fuzzy twin support vector machine anomaly detection model, and it is judged whether the data is abnormal data according to the label value of each group of data.
- step S2 this method uses the maximum-minimum method to normalize each group of data x i in the original data set X, the formula is:
- 2/5 of the data set X is randomly selected to form the training data set X train , and label information is artificially added to the training data set X train.
- y i 1 it means that the data is normal data
- y i 1 it means that the data is abnormal data.
- the remaining 3/5 data is used as the test data set X test .
- the synthetic minority oversampling technique (SMOTE) is used for class imbalance processing.
- the basic idea of the SMOTE algorithm is to analyze the minority samples and artificially synthesize new samples based on the minority samples and add them to the data set.
- the SMOTE algorithm includes the following steps:
- S21 The proportion of abnormal data is generally lower than that of normal data, so the abnormal data is regarded as a minority.
- S22 Set a sampling ratio according to the sample imbalance ratio to determine the sampling magnification N. For each minority sample x, randomly select 3 samples from its K nearest neighbors, and assume that the selected nearest neighbor is x n .
- step S3 establishing a fuzzy twin support vector machine anomaly detection model includes the following steps:
- the kernel function K(x,z) is hereby introduced to map the input value of the low-dimensional space to the high-dimensional space for inner product operation, thereby realizing non-linearity.
- the linearity after linear transformation is separable.
- the present invention selects the radial basis kernel function: ⁇ is a nuclear parameter.
- the training data set X train is used as the training input data set of the fuzzy twin support vector machine anomaly detection model.
- C is the penalty coefficient
- ⁇ i is the slack variable
- w is the weight
- b is the bias
- y i (w ⁇ x i +b) is the output of the fuzzy twin support vector machine anomaly detection model corresponding to x i;
- step S32 According to step S31, the penalty coefficient C is a prerequisite for solving the objective optimization function.
- Using adaptive iterative optimization to search for the penalty coefficient C of the fuzzy twin support vector machine includes the following steps:
- Target search travel distance DS ⁇ *((max gen -k)/max gen ) ⁇
- groupA performs local target search according to formula (1):
- groupB performs a global target search according to formula (2):
- groupC performs global target search according to formula (3):
- groupA performs a local target search according to formula (1):
- groupB performs a global target search according to formula (2):
- groupC performs a global target search according to formula (4):
- RandomValue represents a random number in the interval [5,20];
- S32.4 Calculate the distance D between all data points in the data set M and the origin, and take the reciprocal of the sum of the distance D as the penalty coefficient judgment value S.
- the penalty coefficient C M*S i , the value of M needs to be modified according to the domain of C.
- step S32.5 For all the determined penalty coefficients C, go back to step S31, use the training data set as data input to obtain the classification decision function, and obtain the classification accuracy of the anomaly detection model established by each penalty coefficient C i . According to the classification accuracy, the fitness function is obtained:
- ⁇ is the weight
- (X axis , Y axis ) and (X axisc , Y axisc ) represent the positions of the best data points in the current iteration and the historical iteration.
- step S32.8 if more than the Update the determined value and position of the penalty coefficient of the best-performing data point in the historical iteration to the determined value and position of the penalty coefficient of the best-performing data point under the search conditions in step S32.8.
- step S32.8 if Less than Only update the position of the best data point under the search conditions in step S32.8.
- step S32.11 Return to step S32.3 to perform the next iteration optimization until the current iteration number meets the maximum iteration number, and the search is terminated. At this time, the penalty coefficient C determined in each iteration is obtained. According to experience, the larger the penalty coefficient C, the greater the classification error, so the smallest C value is selected as the penalty coefficient of the final anomaly detection model. Using the finally determined penalty coefficient C as the return value, return to step S31 to establish an abnormality detection model.
- step S4 the detection data set is input into the established fuzzy twin support vector machine anomaly detection model.
- the data whose model output value is -1 is the abnormal data in the original data set, and the data whose model output value is 1 is Normal data in the original data set.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
本发明公开一种无线传感器网异常检测方法,本方法基于融合理论,融合模糊孪生支持向量机和自适应迭代寻优的无线传感网异常检测系统,主要目的是解决当前无线传感网异常检测效率不高、精度不高、泛化能力较弱的问题。该系统经过测试,展示出强大的检测能力、更高的分类准确率和更广泛的应用场景,其泛化能力较强,可广泛的应用于诸多无线传感网络异常检测环境中,更提高了检测的准确性和高效性。
Description
本发明涉及一种融合模糊孪生支持向量机和自适应迭代寻优的无线传感网异常检测方法,属于传感器网数据处理技术领域。
无线传感网络(Wireless Sensor Networks,WSN)是一种分布式传感网络,它的末梢是可以感知和检查外部世界的传感器。无线传感网部署方便、价格低廉、可以大规模自组织网络,并且传感器具备微型化、智能化、多功能化等特点。因此无线传感网被广泛应用于农业生产、环境检测、智能交通、智能家居等领域。例如在农业生产过程中,通过建立WSN农业环境自动检测系统,实时采集和控制大棚种植室内及土壤的温度、湿度,光照强度,珍贵经济作物的生长规律等影响农作物生长的因素,可以有效的提高农业集约化生产程度,提高农业生产种植的科学性。为了及时的监测出各种可能发生的突发事件(森林火灾、交通堵塞、室内空气污染),必须准确、迅速的判断出传感器采集到的异常数据,这对于应对突发事件,迅速采取有效措施,这对于避免事件的发生或者降低影响具有十分重要的意义。
近年来,在学术以及工业等领域的共同推进下,无线传感网络异常检测领域取得了许多成果。目前主要的无线传感网络异常检测方法和系统如下:
一种是基于人工免疫和K均值聚类的无线传感网异常检测方法。该方法将传感网监测节点采集到的数据进行压缩存储,然后采取K均值聚类的方法,将正常数据和异常数据聚集到不同的类簇,从而完成异常数据检测。
另一种方法是基于变宽直方图的全局异常数据的检测方法,它将动态感知数据以数据融合的方式聚合成为变宽的直方图并执行检测过程。
但是,上述利用人工免疫和K均值聚类的方法,缺点在于对监测数据进行压缩存储时,若数据没有呈现一定的规律性,并不能有效的节约资源和提高检测效率;并且单纯的利用传统的K均值聚类方法也不能有效的提高监测精度。另一种基于变宽直方图的全局异常数据的检测方法并没有有效的提升异常数据监测精度。当前无线传感网异常检测存在效率不高、精度不高、泛化能力较弱的问题。
技术方案
为了解决现有技术存在的问题,本发明提出了一种无线传感网异常检测方法,融合模糊孪生支持向量机和自适应迭代寻优,解决当前无线传感网异常检测效率不高、精度不高、 泛化能力较弱的问题。
为了解决所述技术问题,本发明采用的技术方案是:1、一种无线传感网异常检测方法,其特征在于:包括以下步骤;
S1、传感器监测节点实时汇集来自各个传感器监测的数据,形式原始数据集x={x
1,x
2,...,x
i,...,x
n},x
i∈R
n,i=1,2,...,n,x
i表示传感器采集的数据,并以无线通信的方式进行传输和存储;
S2、对传感器采集到的数据集进行数据预处理,所述数据预处理包括数据归一化处理、类不平衡处理以及训练数据集、检测数据集的划分,归一化处理后的数据集为X={X
1,X
2,...,X
i,...,X
n};
S3:建立无线传感网异常检测模型,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C,将训练数据集作为数据输入,建立无线传感网异常检测模型;
S4:利用已经建立的无线传感网异常检测模型,将检测数据集作为模型的输入,根据模型的输出结果,判断检测数据集中正常数据和异常数据,完成无线传感网异常数据检测。
进一步的,无线传感网异常检测模型为模糊孪生支持向量机异常检测模型,建立该模型的步骤为:
S31)、为了避免无线传感网数据在低维空间不能线性可分的情况,引入核函数K(x,z)将低维空间的输入值映射到高维空间进行内积运算,从而实现非线性变换后的线性可分;
S32)、将训练数据集作为模糊孪生支持向量机异常检测模型训练输入数据集;
s.t.y
i(w·x
i+b)≥1-ξ
i
S33)、设置目标优化函数:ξ
i≥0,i=1,2,...,n,其中,C为惩罚系数,ξ
i为松弛变量,w表示权重,b表示偏置,y
i(w·x
i+b)表示x
i对应的模糊孪生支持向量机异常检测模型输出;
S34)、引入拉格朗日函数将目标优化函数转换为对偶问题:
S36)、得到分类决策函数:
S37)、惩罚系数C是求解目标优化函数的前提条件,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C。
进一步的,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C具体步骤为:
S38)、初始化寻优数据集M={(X
1,Y
1),(X
2,Y
2),...,(X
i,Y
i)},i=1,2,...,L,L代表数据集M的大小,根据训练数据集的大小动态选择;数据集M中的数据(X
i,Y
i)包含两个特征,分别是当前位置(X
axisc,Y
axisc)和历史位置(X
axis,Y
axis),它们的取值范围是[0,100],初始化最大迭代次数max
gen,max
gen的取值与训练数据集的数据量呈反比;
S39)、将数据集M随机划分为三个子集groupA、groupB、groupC,分别执行本地目标搜索和全局目标搜索;目标搜索行进距离DS=θ*((max
gen-k)/max
gen)
α,
K是当前迭代次数,k=1,2,...,max
gen;
S310)、各个子集搜索策略按照如下方式执行:
如果k<max
gen/20,
groupA根据公式(1)执行本地目标搜索:
groupB根据公式(2)执行全局目标搜索:
groupC根据公式(3)执行全局目标搜索:
如果k>=max
gen/20,
groupA根据公式(1)执行本地目标搜索:
groupB根据公式(2)执行全局目标搜索:
groupC根据公式(4)执行全局目标搜索:
RandomValue表示区间[5,20]范围内的随机数;
S311)、计算惩罚系数判定值S:计算数据集M中所有数据点与原点距离D,取距离D的和的倒数为惩罚系数判定值S,惩罚系数C=M*S
i,M的取值根据C的定义域进行修正,对于数据集M中每一个数据点,都能确定一个当前迭代次数中惩罚系数C,
S312)、适应度函数计算:求出由每一个惩罚系数C所建立的异常检测模型的分类准确率accuracy
i,
适应度函数Function(S
i)=accuracy
i×η×S
i,
η是权值;
S313)、惩罚系数确定值计算:
得到当前迭代和历史迭代表现最佳数据点的惩罚系数确定值以及位置,
S315)、为了平衡数据点的全局搜索能力和本地搜索能力,每个数据点位置利用公式(7)更新:
此时,(X
axis,Y
axis)和(X
axisc,Y
axisc)代表当前迭代和历史迭代表现最佳数据点的位置;
S318)异常检测模型的最优惩罚系数:所有迭代寻优执行结束,得到每次迭代确定的惩罚系数C。
进一步的,步骤S2中,利用合成少数类过采样技术对检测数据集进行类不平衡处理,具体步骤为:
S21)、异常数据比例一般低于正常数据,故将异常数据作为少数类,对于异常数据中每一个样本x,以欧氏距离为标准计算它到少数类样本集S中所有样本的距离,得到其K近邻,S={(x
i,y
i)|y
i=-1},i=1,2,...,n,y
i表示对训练数据集仍添加的标签信息,当y
i=1时,代表该数据是正常数据,当y
i=-1时,代表该数据是异常数据;
S22)、根据样本不平衡比例设置一个采样比例以确定采样倍率N,对于每一个少数类样本x,从其K近邻中随机选择3个样本,假设选择的近邻为x
n;
S23)、对于每一个随机选出的近邻x
n,分别与原样本按照如下的公式构建新的样本:x
new=x+rand(0,1)*|x-x
n|;
S24)、将构建的新的样本添加到训练数据集中。
进一步的,步骤S2中,对检测数据集进行归一化的处理公式为:
其中,x
i表示原始数据集中的数据,X
i表示归一化处理后的数据,X
i∈[0,1],min是原始数据集中的最小值,max是原始数据集的最大值。
进一步的,步骤S318)中,选择最小的C值作为异常检测模型的最优惩罚系数。
进一步的,随机选取归一化后数据集X的2/5构成训练数据集X
train,对训练数据集X
train人为添加标签信息,X
train={(x
1,y
1),(x
2,y
2),...,(x
n,y
n)},其中x
i∈R
n,y
i∈{+1,-1},i=1,2,...,n,y
i为人为添加的标签信息,当y
i=1时,代表该数据是正常数据,当y
i=-1时,代表该数据是异常数据,数据集X中,剩下3/5的数据作为检测数据集X
test。
本发明的有益效果:本发明所述检测方法基于融合理论,融合模糊孪生支持向量机和自适应迭代寻优的无线传感网异常检测系统,主要目的是解决当前无线传感网异常检测效率不高、精度不高、泛化能力较弱的问题。该系统经过测试,展示出强大的检测能力、更高的分类准确率和更广泛的应用场景,其泛化能力较强,可广泛的应用于诸多无线传感网络异常检测环境中,更提高了检测的准确性和高效性。
图1为实施例所述方法的流程图;
图2为模糊孪生支持向量机的惩罚系数C迭代寻优的流程图。
下面结合附图和具体实施例对本发明作进一步的说明。
实施例1
本实施例公开一种无线传感器网异常检测方法,如图1所示,包括以下步骤:
S1:数据采集,无线传感网络监测节点每隔一个固定时间间隔Δt收集一组监测数据,并以无线多跳的方式将其发送给基站,基站将收到原始数据集X;
S2:数据预处理,对原始数据集X进行数值变量的归一化和训练数据集、检测数据集的划分以及数据不平衡的处理;
S3:建立异常检测模型,利用训练数据集构造并求解带凸约束的二次规划问题,构建模糊孪生支持向量机异常检测模型;
S4:异常数据检测,将检测数据集作为模糊孪生支持向量机异常检测模型输入,根据每组数据的标签值判断该数据是否为异常数据。
在步骤S1中,原始数据集X={x
1,x
2,...,x
n},其中x
i∈R
n,i=1,2,...,n,x
i表示传感器检测到的数据。
在步骤S2中,本方法采用最大-最小值方法对原始数据集X中的每一组数据x
i进行归一化处理,公式为:
归一化处理后得到数据集X={X
1,X
2,...,X
n},每组数据X
i∈[0,1],min和max分别是 每组监测数据的最小值和最大值。
本实施例中,随机选取数据集X的2/5构成训练数据集X
train,对训练数据集X
train人为添加标签信息。X
train={(x
1,y
1),(x
2,y
2),...,(x
n,y
n)},其中x
i∈R
n,y
i∈{+1,-1},i=1,2,...,n。当y
i=1时,代表该数据是正常数据,当y
i=-1时,代表该数据是异常数据。数据集X中,剩下3/5的数据作为检测数据集X
test。
为了克服样本的不平衡性问题,使用合成少数类过采样技术(SMOTE)进行类不平衡处理。SMOTE算法的基本思想是对少数类样本进行分析并根据少数类样本人工合成新样本添加到数据集中。所述SMOTE算法包括以下步骤:
S21:异常数据比例一般低于正常数据,故将异常数据作为少数类,对于异常数据中每一个样本x,以欧氏距离为标准计算它到少数类样本集S中所有样本的距离,得到其K近邻。S={(x
i,y
i)|y
i=-1},i=1,2,...,n。
S22:根据样本不平衡比例设置一个采样比例以确定采样倍率N,对于每一个少数类样本x,从其K近邻中随机选择3个样本,假设选择的近邻为x
n。
S23:对于每一个随机选出的近邻x
n,分别与原样本按照如下的公式构建新的样本:
x
new=x+rand(0,1)*|x-x
n|,
S24:将构建的新的样本添加到数据集X
train中。
进一步,在步骤S3中,建立模糊孪生支持向量机异常检测模型包括以下步骤:
S31:为了避免无线传感网数据在低维空间不能线性可分的情况,特此引入核函数K(x,z)将低维空间的输入值映射到高维空间进行内积运算,从而实现非线性变换后的线性可分。本发明选择径向基核函数:
σ为核参数。
(1)将训练数据集X
train作为模糊孪生支持向量机异常检测模型训练输入数据集。
(2)目标优化函数:
s.t.y
i(w·x
i+b)≥1-ξ
i
ξ
i≥0,i=1,2,...,n,
其中,C为惩罚系数,ξ
i为松弛变量,w表示权重,b表示偏置,y
i(w·x
i+b)表示x
i对应的模糊孪生支持向量机异常检测模型输出;
引入拉格朗日函数将目标优化函数转换为对偶问题:
(4)得到分类决策函数:
S32:根据步骤S31可知,惩罚系数C是求解目标优化函数的前提条件,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C包括以下步骤:
S32.1:初始化寻优数据集M={(X
1,Y
1),(X
2,Y
2),...,(X
i,Y
i)},i=1,2,...,L,L代表数据集M的大小,根据训练数据集的大小动态选择,一般选取训练数据集数据量的
数据集M中的数据(X
i,Y
i)包含两个特征,分别是当前位置(X
axisc,Y
axisc)和历史位置(X
axis,Y
axis),它们的取值范围是[0,100]。初始化最大迭代次数max
gen,max
gen的取值与训练数据集的数据量呈反比。
S32.2:将数据集M随机划分为三个子集groupA、groupB、groupC,分别执行本地目标搜索和全局目标搜索;本地目标搜索是指目标搜索只在本数据集合内执行,全局搜索是指目标搜索在整个空间内执行。目标搜索行进距离DS=θ*((max
gen-k)/max
gen)
α,
K是当前迭代次数,k=1,2,...,max
gen,本实施例中,max
gen=100。
S32.3:判断当前迭代次数和最大迭代次数的大小关系
如果k<max
gen/20:
groupA根据公式(1)执行本地目标搜索:
groupB根据公式(2)执行全局目标搜索:
groupC根据公式(3)执行全局目标搜索:
如果k>=max
gen/20:
groupA根据公式(1)执行本地目标搜索:
groupB根据公式(2)执行全局目标搜索:
groupC根据公式(4)执行全局目标搜索:
其中RandomValue表示区间[5,20]范围内的随机数;
S32.4:计算数据集M中所有数据点与原点距离D,取距离D的和的倒数为惩罚系数判定值S。惩罚系数C=M*S
i,M的取值需要根据C的定义域进行修正。本发明取C∈[0,1000],将S的范围限制在[0,100],因此M=10。对于数据集M中每一个数据点,都能确定一个当前迭代次数中惩罚系数C。
S32.5:对所有确定的惩罚系数C,回到步骤S31中,将训练数据集作为数据输入,得到分类决策函数,求出由每一个惩罚系数C所建立的异常检测模型的分类准确率accuracy
i。根据分类准确率得到适应度函数:
Function(S
i)=accuracy
i×η×S
i
η是权值。
得到当前迭代和历史迭代表现最佳数据点的惩罚系数确定值以及位置。
S32.8:为了平衡数据点的全局搜索能力和本地搜索能力,每个数据点位置利用公式(7)更新:
此时,(X
axis,Y
axis)和(X
axisc,Y
axisc)代表当前迭代和历史迭代表现最佳数据点的位置。
S32.11:回到步骤S32.3进行下一次迭代寻优,直到当前迭代次数满足最大迭代次数,终止搜索。此时,得到每次迭代确定的惩罚系数C。根据经验表明,惩罚系数C越大,分类误差往往会越大,因此选择最小的C值作为最终异常检测模型的惩罚系数。将最终确定的惩罚系数C作为返回值,回到步骤S31中,建立异常检测模型。
在步骤S4中,将检测数据集输入到已经建立的模糊孪生支持向量机异常检测模型中,模型输出值为-1的数据即为原始数据集中的异常数据,模型输出值为1的数据即为原始数据集中的正常数据。
最后说明的是,以上优选实施例仅用以说明本发明的技术方案而非限制,尽管通过上述优选实施例已经对本发明进行了详细的描述,但本领域技术人员应当理解,可以在形式上和细节上对其作出各种各样的改变,而不偏离本发明权利要求书所限定的范围。
Claims (9)
- 一种无线传感网异常检测方法,其特征在于:包括以下步骤;S1、传感器监测节点实时汇集来自各个传感器监测的数据,形成原始数据集x={x 1,x 2,...,x i,...,x n},x i∈R n,i=1,2,...,n,x i表示传感器采集的数据,并以无线通信的方式进行传输和存储;S2、对传感器采集到的数据集进行数据预处理,所述数据预处理包括数据归一化处理、类不平衡处理以及训练数据集、检测数据集的划分,归一化处理后的数据集为X={X 1,X 2,...,X i,...,X n};S3:建立无线传感网异常检测模型,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C,将训练数据集作为数据输入,建立无线传感网异常检测模型;S4:利用已经建立的无线传感网异常检测模型,将检测数据集作为模型的输入,根据模型的输出结果,判断检测数据集中正常数据和异常数据,完成无线传感网异常数据检测。
- 根据权利要求1所述的无线传感网异常检测方法,其特征在于:无线传感网异常检测模型为模糊孪生支持向量机异常检测模型,建立该模型的步骤为:S31)、为了避免无线传感网数据在低维空间不能线性可分的情况,引入核函数K(x,z)将低维空间的输入值映射到高维空间进行内积运算,从而实现非线性变换后的线性可分;S32)、将训练数据集作为模糊孪生支持向量机异常检测模型训练输入数据集;s.t.y i(w·x i+b)≥1-ξ iS33)、设置目标优化函数:ξ i≥0,i=1,2,...,n,其中,C为惩罚系数,ξ i为松弛变量,w表示权重,b表示偏置,y i(w·x i+b)表示x i对应的模糊孪生支持向量机异常检测模型输出;S34)、引入拉格朗日函数将目标优化函数转换为对偶问题:S36)、得到分类决策函数:S37)、惩罚系数C是求解目标优化函数的前提条件,利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C。
- 根据权利要求1或2所述的无线传感网异常检测方法,其特征在于:利用自适应迭代寻优搜索模糊孪生支持向量机的惩罚系数C具体步骤为:S38)、初始化寻优数据集M={(X 1,Y 1),(X 2,Y 2),...,(X i,Y i)},i=1,2,...,L,其中L代表数据集M的大小,根据训练数据集的大小动态选择,;数据集M中的数据(X i,Y i)包含两个特征,分别是当前位置(X axisc,Y axisc)和历史位置(X axis,Y axis),它们的取值范围是[0,100],初始化最大迭代次数max gen,max gen的取值与训练数据集的数据量呈反比;S39)、将数据集M随机划分为三个子集groupA、groupB、groupC,分别执行本地目标搜索和全局目标搜索;目标搜索行进距离DS=θ*((max gen-k)/max gen) α,θ∈[5,10], K是当前迭代次数,k=1,2,...,max gen;S310)、各个子集搜索策略按照如下方式执行:如果k<max gen/20,groupA根据公式(1)执行本地目标搜索:groupB根据公式(2)执行全局目标搜索:groupC根据公式(3)执行全局目标搜索:如果k>=max gen/20,groupA根据公式(1)执行本地目标搜索:groupB根据公式(2)执行全局目标搜索:groupC根据公式(4)执行全局目标搜索:RandomValue表示区间[5,20]范围内的随机数;S311)、计算惩罚系数判定值S:计算数据集M中所有数据点与原点距离D,取距离D的和的倒数为惩罚系数判定值S,惩罚系数C=M*S i,M的取值根据C的定义域进行修正,对于数据集M中每一个数据点,都能确定一个当前迭代次数中惩罚系数C,S312)、适应度函数计算:求出由每一个惩罚系数C所建立的异常检测模型的分类准确率accuracy i,适应度函数Function(S i)=accuracy i×η×S i,η是权值;S313)、惩罚系数确定值计算:得到当前迭代和历史迭代表现最佳数据点的惩罚系数确定值以及位置,S315)、为了平衡数据点的全局搜索能力和本地搜索能力,每个数据点位置利用公式(7)更新:此时,(X axis,Y axis)和(X axisc,Y axisc)代表当前迭代和历史迭代表现最佳数据点的位置;S318)异常检测模型的最优惩罚系数:所有迭代寻优执行结束,得到每次迭代确定的惩罚系数C。
- 根据权利要求1所述的无线传感网异常检测方法,其特征在于:步骤S2中,利用合成少数类过采样技术对检测数据集进行类不平衡处理,具体步骤为:S21)、异常数据比例一般低于正常数据,故将异常数据作为少数类,对于异常数据中每一个样本x,以欧氏距离为标准计算它到少数类样本集S中所有样本的距离,得到其K近邻,S={(x i,y i)|y i=-1},i=1,2,...,n,y i表示对训练数据集仍添加的标签信息,当y i=1时,代表该数据是正常数据,当y i=-1时,代表该数据是异常数据;S22)、根据样本不平衡比例设置一个采样比例以确定采样倍率N,对于每一个少数类样本x, 从其K近邻中随机选择3个样本,假设选择的近邻为x n;S23)、对于每一个随机选出的近邻x n,分别与原样本按照如下的公式构建新的样本:x new=x+rand(0,1)*|x-x n|;S24)、将构建的新的样本添加到训练数据集中。
- 根据权利要求3所述的无线传感网异常检测方法,其特征在于:步骤S318)中,选择最小的C值作为异常检测模型的最优惩罚系数。
- 根据权利要求1所述的无线传感网异常检测方法,其特征在于:随机选取归一化后数据集X的2/5构成训练数据集X train,对训练数据集X train人为添加标签信息,X train={(x 1,y 1),(x 2,y 2),...,(x n,y n)},其中x i∈R n,y i∈{+1,-1},i=1,2,...,n,y i为人为添加的标签信息,当y i=1时,代表该数据是正常数据,当y i=-1时,代表该数据是异常数据,数据集X中,剩下3/5的数据作为检测数据集X test。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010497988.2A CN111654874B (zh) | 2020-06-03 | 2020-06-03 | 一种无线传感网异常检测方法 |
CN202010497988.2 | 2020-06-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021243848A1 true WO2021243848A1 (zh) | 2021-12-09 |
Family
ID=72348442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/108778 WO2021243848A1 (zh) | 2020-06-03 | 2020-08-13 | 一种无线传感网异常检测方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111654874B (zh) |
WO (1) | WO2021243848A1 (zh) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114219157A (zh) * | 2021-12-17 | 2022-03-22 | 西南石油大学 | 一种基于最优决策和动态分析的烷烃气体红外光谱测量方法 |
CN114240913A (zh) * | 2021-12-21 | 2022-03-25 | 歌尔股份有限公司 | 半导体的异常分析方法、装置、终端设备以及存储介质 |
CN114354654A (zh) * | 2022-01-07 | 2022-04-15 | 中国矿业大学 | 基于dw-knn的煤炭水分含量快速无损检测方法 |
CN114637620A (zh) * | 2022-03-10 | 2022-06-17 | 南京开特信息科技有限公司 | 一种基于svm算法的数据库系统异常分类预测方法 |
CN114969669A (zh) * | 2022-07-27 | 2022-08-30 | 深圳前海环融联易信息科技服务有限公司 | 数据平衡度处理方法、联合建模系统、设备和介质 |
CN115019510A (zh) * | 2022-06-29 | 2022-09-06 | 华南理工大学 | 一种基于动态自适应生成对抗网络的交通数据修复方法 |
CN116436819A (zh) * | 2023-02-22 | 2023-07-14 | 深圳市昆腾电源科技有限公司 | 并机ups通信异常检测方法、装置及并机ups系统 |
CN116723034A (zh) * | 2023-07-03 | 2023-09-08 | 深圳市奥晏科技发展有限公司 | 一种用于互联网信息安全的智能数据监测系统及方法 |
CN117100293A (zh) * | 2023-10-25 | 2023-11-24 | 武汉理工大学 | 一种基于多维特征融合网络的肌肉疲劳检测方法和系统 |
CN117332359A (zh) * | 2023-12-01 | 2024-01-02 | 国网江苏省电力有限公司南通供电分公司 | 一种电力数据传输异常检测方法及系统 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112421772B (zh) * | 2020-10-23 | 2022-05-13 | 国网福建省电力有限公司 | 多跳d2d组网下数据驱动的配电网在线异常检测装置及方法 |
CN113364652B (zh) * | 2021-06-30 | 2023-07-25 | 脸萌有限公司 | 网卡流量测试方法、装置、网络设备、系统及可读介质 |
CN113420825A (zh) * | 2021-07-07 | 2021-09-21 | 国能龙源蓝天节能技术有限公司 | 一种基于支持向量机的异常数据检测方法及电子设备 |
CN113992718B (zh) * | 2021-10-28 | 2022-10-04 | 安徽农业大学 | 一种基于动态宽度图神经网络的群体传感器异常数据检测方法和系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018126984A2 (zh) * | 2017-01-06 | 2018-07-12 | 江南大学 | 一种基于mea-bp神经网络wsn异常检测方法 |
CN108876001A (zh) * | 2018-05-03 | 2018-11-23 | 东北大学 | 一种基于孪生支持向量机的短期电力负荷预测方法 |
CN110072205A (zh) * | 2019-03-25 | 2019-07-30 | 南京邮电大学 | 一种用于无线传感网异常数据检测的分层聚合方法 |
CN110287896A (zh) * | 2019-06-27 | 2019-09-27 | 北京理工大学 | 一种基于异质分层pso和svm的人体行为识别方法 |
CN110568127A (zh) * | 2019-09-09 | 2019-12-13 | 北京工业大学 | 一种基于时域加权的空气污染物浓度监测方法 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105791051B (zh) * | 2016-03-25 | 2019-06-21 | 中国地质大学(武汉) | 基于人工免疫和k均值聚类的无线传感网异常检测方法及系统 |
CN106482967B (zh) * | 2016-10-09 | 2019-10-29 | 湖南工业大学 | 一种代价敏感支持向量机机车车轮检测系统及方法 |
CN109143848A (zh) * | 2017-06-27 | 2019-01-04 | 中国科学院沈阳自动化研究所 | 基于fcm-gasvm的工业控制系统入侵检测方法 |
CN107379899B (zh) * | 2017-07-07 | 2018-06-29 | 淮阴工学院 | 一种基于无线传感器网络的轮胎状态智能监测系统 |
CN108052968B (zh) * | 2017-12-08 | 2021-11-12 | 哈尔滨工程大学 | 一种qsfla-svm的感知入侵检测方法 |
CN109816119A (zh) * | 2019-02-02 | 2019-05-28 | 南京邮电大学 | 一种基于无监督学习的无线传感器异常数据检测方法 |
CN110309886B (zh) * | 2019-07-08 | 2022-09-20 | 安徽农业大学 | 基于深度学习的无线传感器高维数据实时异常检测方法 |
CN110516733A (zh) * | 2019-08-23 | 2019-11-29 | 西南石油大学 | 一种基于改进多分类孪生支持向量机的测井岩性识别方法 |
-
2020
- 2020-06-03 CN CN202010497988.2A patent/CN111654874B/zh active Active
- 2020-08-13 WO PCT/CN2020/108778 patent/WO2021243848A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018126984A2 (zh) * | 2017-01-06 | 2018-07-12 | 江南大学 | 一种基于mea-bp神经网络wsn异常检测方法 |
CN108876001A (zh) * | 2018-05-03 | 2018-11-23 | 东北大学 | 一种基于孪生支持向量机的短期电力负荷预测方法 |
CN110072205A (zh) * | 2019-03-25 | 2019-07-30 | 南京邮电大学 | 一种用于无线传感网异常数据检测的分层聚合方法 |
CN110287896A (zh) * | 2019-06-27 | 2019-09-27 | 北京理工大学 | 一种基于异质分层pso和svm的人体行为识别方法 |
CN110568127A (zh) * | 2019-09-09 | 2019-12-13 | 北京工业大学 | 一种基于时域加权的空气污染物浓度监测方法 |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114219157A (zh) * | 2021-12-17 | 2022-03-22 | 西南石油大学 | 一种基于最优决策和动态分析的烷烃气体红外光谱测量方法 |
CN114219157B (zh) * | 2021-12-17 | 2023-10-17 | 西南石油大学 | 一种基于最优决策和动态分析的烷烃气体红外光谱测量方法 |
CN114240913A (zh) * | 2021-12-21 | 2022-03-25 | 歌尔股份有限公司 | 半导体的异常分析方法、装置、终端设备以及存储介质 |
CN114354654A (zh) * | 2022-01-07 | 2022-04-15 | 中国矿业大学 | 基于dw-knn的煤炭水分含量快速无损检测方法 |
CN114354654B (zh) * | 2022-01-07 | 2023-03-21 | 中国矿业大学 | 基于dw-knn的煤炭水分含量快速无损检测方法 |
CN114637620A (zh) * | 2022-03-10 | 2022-06-17 | 南京开特信息科技有限公司 | 一种基于svm算法的数据库系统异常分类预测方法 |
CN114637620B (zh) * | 2022-03-10 | 2024-04-16 | 南京开特信息科技有限公司 | 一种基于svm算法的数据库系统异常分类预测方法 |
CN115019510B (zh) * | 2022-06-29 | 2024-01-30 | 华南理工大学 | 一种基于动态自适应生成对抗网络的交通数据修复方法 |
CN115019510A (zh) * | 2022-06-29 | 2022-09-06 | 华南理工大学 | 一种基于动态自适应生成对抗网络的交通数据修复方法 |
CN114969669A (zh) * | 2022-07-27 | 2022-08-30 | 深圳前海环融联易信息科技服务有限公司 | 数据平衡度处理方法、联合建模系统、设备和介质 |
CN114969669B (zh) * | 2022-07-27 | 2022-11-15 | 深圳前海环融联易信息科技服务有限公司 | 数据平衡度处理方法、联合建模系统、设备和介质 |
CN116436819A (zh) * | 2023-02-22 | 2023-07-14 | 深圳市昆腾电源科技有限公司 | 并机ups通信异常检测方法、装置及并机ups系统 |
CN116723034A (zh) * | 2023-07-03 | 2023-09-08 | 深圳市奥晏科技发展有限公司 | 一种用于互联网信息安全的智能数据监测系统及方法 |
CN116723034B (zh) * | 2023-07-03 | 2024-05-28 | 深圳市奥晏科技发展有限公司 | 一种用于互联网信息安全的智能数据监测系统及方法 |
CN117100293A (zh) * | 2023-10-25 | 2023-11-24 | 武汉理工大学 | 一种基于多维特征融合网络的肌肉疲劳检测方法和系统 |
CN117100293B (zh) * | 2023-10-25 | 2024-02-06 | 武汉理工大学 | 一种基于多维特征融合网络的肌肉疲劳检测方法和系统 |
CN117332359A (zh) * | 2023-12-01 | 2024-01-02 | 国网江苏省电力有限公司南通供电分公司 | 一种电力数据传输异常检测方法及系统 |
CN117332359B (zh) * | 2023-12-01 | 2024-02-09 | 国网江苏省电力有限公司南通供电分公司 | 一种电力数据传输异常检测方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN111654874A (zh) | 2020-09-11 |
CN111654874B (zh) | 2023-02-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021243848A1 (zh) | 一种无线传感网异常检测方法 | |
Jiang et al. | Outlier detection approaches based on machine learning in the internet-of-things | |
Burdakis et al. | Detecting outliers in sensor networks using the geometric approach | |
KR102369167B1 (ko) | 머신러닝을 이용한 지능형 스마트팜 운영 시스템 | |
Cheng et al. | An intelligent scheme for big data recovery in Internet of Things based on multi-attribute assistance and extremely randomized trees | |
CN116545954B (zh) | 基于物联网的通信网关数据传输方法及系统 | |
CN110083190A (zh) | 一种基于减法聚类分类器的青椒温室环境智能监测系统 | |
Hajjej et al. | An efficient deployment approach for improved coverage in wireless sensor networks based on flower pollination algorithm | |
Wang et al. | Design of the Sports Training Decision Support System Based on the Improved Association Rule, the Apriori Algorithm. | |
Bhatnagar et al. | Machine learning techniques to reduce error in the internet of things | |
CN113365323A (zh) | 一种用于无线传感网络中的低能耗多径传输方法 | |
Mody et al. | Cluster head selection algorithm for wireless sensor networks using Machine learning | |
Singh et al. | An improved energy-efficient BBO-based PEGASIS protocol in wireless sensors network | |
Xiu et al. | HRC-mCNNs: A hybrid regression and classification multibranch CNNs for automatic meter reading with smart shell | |
Hao et al. | Retracted: Research on Key Technologies of Intelligent Agriculture Based on Agricultural Big Data | |
CN115619605A (zh) | 一种基于语义信息的传统民居环境质量评估方法 | |
Gokulakannan | DeepQ based automated irrigation systems using deep belief WSN | |
Sangheethaa et al. | An Improved Anomaly Detection in Wireless Sensor Network using Artificial Intelligence Evolving Optimization Tools | |
Hussein | Data Reduction Algorithms for Wireless Sensor Networks Applications | |
Ajmera et al. | Crop, Fertilizer, & Irrigation Recommendation using Machine Learning Techniques | |
Yan et al. | Research and Mining of Intelligent Home User Behavior Pattern Based on Machine Learning | |
Perumal et al. | Energy efficiency optimization in clustered wireless sensor networks via machine learning algorithms | |
Li et al. | Edge Computing-based Defect Identification Model of Power IoT Edge Side Devices | |
Zhou et al. | Graph Learning Enhanced UAV Swarms Based Multiple Targets Tracking | |
Dogra et al. | Integration of WSN and IoT: Its Applications and Technologies |
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: 20939399 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: 20939399 Country of ref document: EP Kind code of ref document: A1 |