CN104994170B - Distributed clustering method based on hybrid cytokine analysis model in sensor network - Google Patents

Distributed clustering method based on hybrid cytokine analysis model in sensor network Download PDF

Info

Publication number
CN104994170B
CN104994170B CN201510414218.6A CN201510414218A CN104994170B CN 104994170 B CN104994170 B CN 104994170B CN 201510414218 A CN201510414218 A CN 201510414218A CN 104994170 B CN104994170 B CN 104994170B
Authority
CN
China
Prior art keywords
node
data
nodes
iteration
clustering
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.)
Expired - Fee Related
Application number
CN201510414218.6A
Other languages
Chinese (zh)
Other versions
CN104994170A (en
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.)
Nanjing Tian Gu Information Technology Co ltd
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
Nanjing Post and Telecommunication University
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 Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201510414218.6A priority Critical patent/CN104994170B/en
Publication of CN104994170A publication Critical patent/CN104994170A/en
Application granted granted Critical
Publication of CN104994170B publication Critical patent/CN104994170B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Complex Calculations (AREA)

Abstract

本发明公开了传感器网络中基于混合因子分析模型的分布式聚类方法,该方法用混合因子分析模型来建模传感器网络中各节点处待聚类的数据,各节点基于自身数据计算局部充分统计量,而后将该量扩散广播给其邻居节点,当节点收到所有来自邻居节点的局部充分统计量之后,其可以获得联合充分统计量,并基于该统计量估计出混合因子分析模型中的各个参数,最终基于估计出的模型完成聚类。本发明建立混合因子分析模型可以在聚类的同时完成数据的降维,采用分布式聚类方式,避免传统的集中式处理方式中由中心节点带来的网络崩溃。在本发明分布式聚类方法中,各节点间传输的是充分统计量而不是数据,既大大节省了通信开销,又可以较好地保护数据中的隐私信息。

The invention discloses a distributed clustering method based on a mixed factor analysis model in a sensor network. The method uses a mixed factor analysis model to model the data to be clustered at each node in the sensor network, and each node calculates local sufficient statistics based on its own data. Then the quantity is spread and broadcasted to its neighbor nodes. When the node receives all the local sufficient statistics from the neighbor nodes, it can obtain the joint sufficient statistics, and based on the statistics, estimate each factor in the mixed factor analysis model. parameters, and finally complete the clustering based on the estimated model. The present invention establishes a mixed factor analysis model to complete data dimensionality reduction while clustering, adopts a distributed clustering mode, and avoids network collapse caused by a central node in a traditional centralized processing mode. In the distributed clustering method of the present invention, sufficient statistics are transmitted between nodes instead of data, which not only greatly saves communication overhead, but also better protects private information in data.

Description

传感器网络中基于混合因子分析模型的分布式聚类方法A Distributed Clustering Method Based on Mixed Factor Analysis Model in Sensor Networks

技术领域technical field

本发明涉及一种传感器网络中基于混合因子分析模型的分布式聚类方法,属于数据的并行分布式处理方法与应用的技术领域。The invention relates to a distributed clustering method based on a mixed factor analysis model in a sensor network, and belongs to the technical field of data parallel distributed processing methods and applications.

背景技术Background technique

传感器网络是由部署在监测区域里的大量静止或移动的微型传感器节点所组成的,其单个传感器节点对于数据的采集、存储、处理和传输的能力十分有限。因此,对于传感器网络中的数据处理而言,需要对传统的数据处理进行改进。目前,在传感器中的数据处理主要有两种方式,集中式处理和分布式处理。在集中式处理方式中,将其中某个节点指定为中心节点,其他节点将采集到的原始数据传输汇总到中心节点,在中心节点处完成数据的处理,而后再将处理结果返回到各节点。该方式的缺点在于一旦中心节点失效则会给整个网络带来致命影响。另一种处理方式为分布式处理。在该方式中,所有节点地位相同,通过邻居节点间的通信和协作,最终完成数据处理任务。与集中式数据处理相比,分布式处理可以避免因为中心节点的失效所带来的不利影响,整个网络的鲁棒性更强。而本发明能够很好地解决上面的问题。The sensor network is composed of a large number of stationary or mobile miniature sensor nodes deployed in the monitoring area, and its single sensor node has very limited ability to collect, store, process and transmit data. Therefore, for data processing in sensor networks, traditional data processing needs to be improved. At present, there are mainly two ways of data processing in sensors, centralized processing and distributed processing. In the centralized processing method, one of the nodes is designated as the central node, and other nodes transmit and summarize the collected raw data to the central node, complete the data processing at the central node, and then return the processing results to each node. The disadvantage of this method is that once the central node fails, it will have a fatal impact on the entire network. Another processing method is distributed processing. In this method, all nodes have the same status, and through communication and cooperation among neighboring nodes, the data processing task is finally completed. Compared with centralized data processing, distributed processing can avoid the adverse effects caused by the failure of the central node, and the robustness of the entire network is stronger. And the present invention can well solve the above problems.

发明内容Contents of the invention

本发明目的在于解决了现有技术的缺陷,提出了一种在传感器网络中基于混合因子分析模型的分布式聚类方法,聚类是指通过一定的方法将数据分成多个类的过程。由聚类所生成的类是一组数据对象的集合,这些对象与同一个簇中的对象彼此相似,与其他簇中的对象相异。由于在聚类中,数据所属的类标签是未知的,因此在机器学习领域,对数据的聚类是一个无监督学习的过程。现有的数据聚类方法很多,但是绝大多数假设全部数据的聚类都在一个处理中心上完成,而在传感器网络中,分布式处理十分关键,因此,该方法正是为了解决这一问题,设计一种基于混合因子分析模型的分布式聚类方法。其优点主要有:(1)混合因子分析模型可以有效的处理高维数据;(2)通过设计节点间协作方式,只传输中间结果就可以获得满意的聚类结果,与传输原始数据方式相比,既减小了通信的开销,又保护了数据上的隐私信息,确保了网络中的数据安全。The purpose of the present invention is to solve the defects of the prior art, and propose a distributed clustering method based on a mixed factor analysis model in a sensor network. Clustering refers to the process of dividing data into multiple classes by a certain method. A class generated by clustering is a collection of data objects that are similar to objects in the same cluster and different from objects in other clusters. Since in clustering, the class label to which data belongs is unknown, so in the field of machine learning, clustering data is an unsupervised learning process. There are many existing data clustering methods, but most of them assume that the clustering of all data is completed on a processing center, and in sensor networks, distributed processing is very critical, so this method is just to solve this problem , to design a distributed clustering method based on a mixed factor analysis model. Its main advantages are: (1) The mixed factor analysis model can effectively process high-dimensional data; (2) By designing the cooperation mode between nodes, only the intermediate results can be transmitted to obtain satisfactory clustering results, compared with the original data transmission method , which not only reduces the communication overhead, but also protects the privacy information on the data and ensures the data security in the network.

本发明解决其技术问题所采取的技术方案是:一种传感器网络中基于混合因子分析模型的分布式聚类方法,该方法包括如下步骤:The technical scheme adopted by the present invention to solve the technical problems is: a distributed clustering method based on a mixed factor analysis model in a sensor network, the method comprising the following steps:

设传感器网络中有M个传感器节点,第m个节点采集到Nm个数据,表示为其中ym,n表示节点m处的第n个数据,维度为p。用混合因子分析模型(MFA)来描述Ym(m=1,...,M)的分布,注意所有节点的数据公用同一个MFA。MFA为一个成分数为I的混合模型;对于每一数据ym,n,其可以表示为:Suppose there are M sensor nodes in the sensor network, and the mth node collects N m data, expressed as Among them, y m,n represents the nth data at node m, and the dimension is p. Use the mixed factor analysis model (MFA) to describe the distribution of Y m (m=1,...,M), and note that the data of all nodes share the same MFA. MFA is a mixed model with component number I; for each data y m,n , it can be expressed as:

ym,n=μi+Aium,n+em,n,i以概率πi(i=1,...,I),y m,ni +A i u m,n +e m,n,i with probability π i (i=1,...,I),

其中,μi为第i个混合成分的p维均值矢量,um,n为与数据ym,n相对应的低维空间中的因子,它的维数为q(q<<p),服从高斯分布N(um,n|0,Iq),q的值根据具体问题中p的大小进行选取,一般取q=p/6~p/2之间的任意整数;Ai为(p×q)的因子载荷矩阵;误差变量em,n,i服从高斯分布N(em,n,i|0,Di),其中Di为(p×p)的对角矩阵;概率πi满足那么MFA的参数集合Θ为{πi,Aii,Di}i=1,...,I。注意,对于所有节点,其待估计的MFA参数集合中各个参数值相同。Among them, μ i is the p-dimensional mean value vector of the i-th mixed component, u m,n is the factor in the low-dimensional space corresponding to the data y m,n , and its dimension is q (q<<p), Obey the Gaussian distribution N(u m,n |0,I q ), the value of q is selected according to the size of p in the specific problem, generally any integer between q=p/6~p/2; A i is ( p×q) factor loading matrix; error variables e m,n,i obey Gaussian distribution N(e m,n,i |0,D i ), where D i is a diagonal matrix of (p×p); probability π i satisfies Then the parameter set Θ of the MFA is {π i , A i , μ i , D i } i=1,...,I . Note that for all nodes, each parameter value in the MFA parameter set to be estimated is the same.

此外,每个节点的数据传输范围设为W,对于当前节点m,所有与其距离小于W的节点为其邻居节点,节点m的邻居节点集合表示为Rm。图1中表示了某个传感器网络中节点各个节点之间的关系,其中圆表示节点,如果两个节点之间有边相连,则表示两个节点之间可以互相通信,传输信息。图1中的虚线框表示节点的m的Rm。在本发明中,网络拓扑在分布式聚类实施之前已经确定好,并且要保证任意两个节点之间直接或经过多跳之后互通。In addition, the data transmission range of each node is set to W. For the current node m, all nodes whose distance is less than W are its neighbor nodes, and the set of neighbor nodes of node m is denoted as R m . Figure 1 shows the relationship between nodes in a sensor network, where a circle represents a node, and if two nodes are connected by an edge, it means that the two nodes can communicate with each other and transmit information. The dotted box in Fig. 1 represents Rm for m of the node. In the present invention, the network topology has been determined before the implementation of distributed clustering, and it is necessary to ensure that any two nodes communicate directly or after multiple hops.

本发明的传感器网络拓扑和描述数据分布的MFA建立好之后,则开始分布式聚类过程,如图2所示,其具体步骤包括:After the sensor network topology of the present invention and the MFA describing data distribution are established, the distributed clustering process starts, as shown in Figure 2, and its specific steps include:

步骤1:初始化;传感器网络中有M个传感器节点,第m个节点采集到Nm个数据,表示为其中ym,n表示节点m处的第n个数据,维度为p;网络拓扑已经事先确定,节点m的邻居节点集合表示为Rm;用混合因子分析模型(MFA)来描述Ym(m=1,...,M)的分布,所有节点的数据共用同一个MFA;MFA的参数集合为{πi,Aii,Di}i=1,...,I,其中πi为第i个混合成分的权重,Ai为第i个混合成分的(p×q)的因子载荷矩阵,q为低维因子的维度,取q=p/6~p/2之间的任意整数;μi为第i个混合成分的p维均值矢量,Di为第i个混合成分的误差的协方差矩阵;Step 1: Initialization; there are M sensor nodes in the sensor network, and the mth node collects N m data, expressed as Among them, y m, n represent the nth data at node m, and the dimension is p; the network topology has been determined in advance, and the set of neighbor nodes of node m is represented as R m ; use mixed factor analysis model (MFA) to describe Y m (m =1,...,M), the data of all nodes share the same MFA; the parameter set of MFA is {π i ,A ii ,D i } i=1,...,I , where π i is the weight of the i-th mixed component, A i is the (p×q) factor loading matrix of the i-th mixed component, and q is the dimension of the low-dimensional factor, which is between q=p/6~p/2 Any integer of ; μ i is the p-dimensional mean vector of the i-th mixed component, and D i is the covariance matrix of the error of the i-th mixed component;

首先,设定MFA中的混合成分数I,也是待聚类的类别个数;根据I,p和q来设定MFA中各参数的初始值;其中,各节点处的 从该节点采集到的数据中随机选取,中的每个元素都从标准正态分布N(0,1)中生成;此外,每个节点l将其采集到的数据个数Nl广播给其邻居节点;当某个节点m收到它的所有邻居节点l(l∈Rm)广播来的数据个数之后,该节点根据下式来计算权重clmFirst, set the mixture fraction I in MFA, which is also the number of categories to be clustered; set the initial value of each parameter in MFA according to I, p and q; among them, the Randomly select from the data collected by the node, and Each element in is generated from the standard normal distribution N(0,1); in addition, each node l broadcasts the number of data N l it collects to its neighbor nodes; when a node m receives it After the number of data broadcasted by all neighbor nodes l(l∈R m ), the node calculates the weight c lm according to the following formula:

初始化完成后,迭代计数器iter=1,开始迭代过程;After the initialization is completed, the iteration counter iter=1, and the iteration process starts;

步骤2:局部计算;在每个节点l处,基于其采集到的数据Yl,首先计算出中间变量gi,Ωi和<zl,n,i>,(n=1,...,Nl;i=1,...,I):Step 2: Local calculation; at each node l, based on the collected data Y l , first calculate the intermediate variables g i , Ω i , and < zl,n,i >, (n=1,..., Nl ; i=1,...,I):

其中,为前一次迭代完成之后得到的参数值(首次迭代时为参数的初始值<zl,n,i>表示节点l处第n个数据yl,n属于第i个类(混合成分)的概率;in, The parameter value obtained after the previous iteration is completed (the initial value of the parameter in the first iteration <z l,n,i > indicates the probability that the nth data y l,n at node l belongs to the i-th class (mixed component);

接着,节点计算局部充分统计量包括:Next, the node computes the local sufficient statistics include:

步骤3:广播扩散;传感器网络中的每个节点l将计算好的局部充分统计量LSSl广播扩散给其邻居节点;Step 3: broadcast diffusion; each node l in the sensor network broadcasts the calculated local sufficient statistic LSS l to its neighbor nodes;

步骤4:联合计算;当节点m(m=1,...,M)收到来自其所有邻居节点l(l∈Rm)的LSSl后,节点m计算出联合充分统计量 Step 4: Joint calculation; when node m(m=1,...,M) receives LSS l from all its neighbor nodes l(l∈R m ), node m calculates joint sufficient statistics

步骤5:估计参数;节点m(m=1,...,M)根据上一步计算出的CSSm,估计出Θ={πi,Aii,Di}i=1,...,I,其中,{πii}i=1,...,I的估计过程如下:Step 5: Estimate parameters; node m (m=1,...,M) estimates Θ={π i ,A i , μ i ,D i } i=1,. ..,I , where {π ii } i=1,...,I, the estimation process is as follows:

对于{Ai,Di}i=1,...,I的估计,过程如下:For the estimation of {A i ,D i } i=1,...,I , the process is as follows:

步骤6:判决收敛;节点m(m=1,...,M)计算当前迭代下的对数似然值:Step 6: Judgment convergence; node m (m=1,...,M) calculates the logarithmic likelihood value under the current iteration:

如果logp(Ym|Θ)-logp(Ymold)<ε,则收敛,停止迭代;否则执行步骤2,开始下一次迭代(iter=iter+1);其中Θ表示当前迭代估计出的参数值,Θold表示上一次迭代中估计的参数值,即,相邻两次迭代的对数似然值小于阈值ε,算法收敛;ε取10-5~10-6中的任意值;由于网络中各节点是并行处理数据,因此所有不可能在一次迭代中同时收敛;当节点l已经收敛而节点m尚未收敛时,则节点l不再发送LSSl,也不再接收邻居节点传输的信息;节点m则用最后一次收到的节点l发来的LSSl更新其CSSm;未收敛的节点继续迭代,直至网络中所有节点都收敛;If logp(Y m |Θ)-logp(Y mold )<ε, it converges and stops iteration; otherwise, execute step 2 and start the next iteration (iter=iter+1); where Θ indicates that the current iteration estimates , Θ old represents the parameter value estimated in the last iteration, that is, the logarithmic likelihood value of two adjacent iterations is less than the threshold ε, and the algorithm converges; ε takes any value from 10 -5 to 10 -6 ; Since each node in the network processes data in parallel, it is impossible to converge at the same time in one iteration; when node l has converged but node m has not yet converged, node l will no longer send LSS l , and will no longer receive LSS l transmitted by neighbor nodes. information; node m updates its CSS m with the last received LSS l from node l; unconverged nodes continue to iterate until all nodes in the network converge;

步骤7:聚类输出;经过步骤1-步骤6之后,节点m(m=1,...,M)得到与其每个数据相对应的<zm,n,i>(n=1,...,Nm;i=1,...,I),将<zm,n,i>(i=1,...,I)中的最大值所对应的序号作为ym,n所最终分配到的类Cm,n,即:Step 7: Clustering output; after step 1-step 6, node m (m=1,...,M) gets each data Corresponding <z m,n,i >(n=1,...,N m ; i=1,...,I), will <z m,n,i >(i=1,.. .,I) The serial number corresponding to the maximum value is the class C m,n to which y m ,n is finally assigned, namely:

用这样的方式得到所有节点上的所有数据的聚类结果 Get the clustering results of all data on all nodes in this way

本发明用混合因子分析模型来建模传感器网络中各节点处待聚类的数据,各节点基于自身数据计算局部充分统计量,而后将该量扩散广播给其邻居节点,当节点收到所有来自邻居节点的局部充分统计量之后,其可以获得联合充分统计量,并基于该统计量估计出混合因子分析模型中的各个参数,最终基于估计出的模型完成聚类。本发明建立的混合因子分析模型可以在聚类的同时完成数据的降维,并且采用分布式聚类方式,避免了传统的集中式处理方式中由中心节点带来的网络崩溃,此外,在本发明的分布式聚类方法中,各节点间传输的是充分统计量而不是数据,既大大节省了通信开销,又可以较好地保护数据中的隐私信息,使得采用该方法的系统安全性大大增加。The present invention uses the mixed factor analysis model to model the data to be clustered at each node in the sensor network. Each node calculates local sufficient statistics based on its own data, and then spreads the amount to its neighbor nodes. When the node receives all After local sufficient statistics of neighbor nodes, it can obtain joint sufficient statistics, and estimate each parameter in the mixed factor analysis model based on the statistics, and finally complete clustering based on the estimated model. The mixed factor analysis model established by the present invention can complete data dimensionality reduction while clustering, and adopts a distributed clustering method, which avoids the network collapse caused by the central node in the traditional centralized processing method. In addition, in this In the distributed clustering method invented, sufficient statistics are transmitted between nodes instead of data, which not only greatly saves communication overhead, but also better protects private information in data, making the system security using this method greatly improved. Increase.

有益效果:Beneficial effect:

1.本发明中所采用的混合因子分析器能够对高维数据进行降维,从而在降维的同时顺利完成聚类,获得更好的聚类性能。1. The mixed factor analyzer used in the present invention can reduce the dimensionality of high-dimensional data, thereby successfully completing clustering while reducing dimensionality, and obtaining better clustering performance.

2.本发明中所采用的基于混合因子分析模型的分布式聚类方法,使得传感器网络中的各个节点可以充分利用其它节点的数据中所包含的信息,聚类性能优于集中式方法。2. The distributed clustering method based on the mixed factor analysis model adopted in the present invention enables each node in the sensor network to fully utilize the information contained in the data of other nodes, and the clustering performance is better than the centralized method.

3.本发明中所采用的基于混合因子分析模型的分布式聚类方法,在节点协作过程中,交换局部充分统计量而不是直接传输原始数据,由于局部充分统计量的数量和维度远小于数据,因此这种方式一方面节省了通信的开销,另一方面,有利于充分保护数据中的隐私信息,提高了采用本方法的系统的安全性能。3. The distributed clustering method based on the mixed factor analysis model used in the present invention, in the process of node cooperation, exchanges local sufficient statistics instead of directly transmitting original data, because the quantity and dimension of local sufficient statistics are much smaller than data , so on the one hand, this method saves the communication overhead, on the other hand, it is beneficial to fully protect the private information in the data, and improves the security performance of the system using this method.

附图说明Description of drawings

图1为本发明的传感器网络中节点m的邻居节点集Rm,以及节点之间收发局部充分统计量(即:LSS)的示意图。FIG. 1 is a schematic diagram of the neighbor node set R m of node m in the sensor network of the present invention, and local sufficient statistics (ie: LSS) sent and received between nodes.

图2为本发明涉及的传感器网络中基于混合因子分析模型的分布式聚类方法的流程图。Fig. 2 is a flow chart of the distributed clustering method based on the mixed factor analysis model in the sensor network involved in the present invention.

图3为本发明的实施例中各节点处的数据聚类结果示意图。FIG. 3 is a schematic diagram of data clustering results at each node in an embodiment of the present invention.

具体实施方式Detailed ways

下面结合说明书附图对本发明创造作进一步的详细说明。The invention will be described in further detail below in conjunction with the accompanying drawings.

为了更好地说明本发明涉及的传感器网络中基于混合因子分析模型的分布式聚类方法,将其应用于酒成分数据的聚类。在一些国家中,在不同区域里分布有一些检测站,用于检测酒中的各成分含量。送到检测站的酒的种类不同。因此需要对相似类别的酒进行聚类。如果该检测站可以和其他检测站组成传感网,通过互相协作,可以充分利用其他检测站中酒的数据,从而提高聚类准确性。这里,待聚类的酒数据来源于UCI机器学习数据库,这里有178个数据,总共来自3个类。每个数据的维度为13,表示酒中各个成分的含量。传感器网络中有8个节点,每个节点的平均邻居节点数为2,网络是可连通的(任意两个节点之间都存在直接或间接到达的路径)。因此在本例子中,M=8,p=13,I=3,q=3。此外,各节点的处的数据数量:N1=21,N2=22,N3=21,N4=21,N5=22,N6=22,N7=21,N8=28;各节点的邻居节点:R1={3,5,6},R2={3,5},R3={1,4,2},R4={3},R5={1,2},R6={1,7},R7={6,8},R8={3,7}。In order to better illustrate the distributed clustering method based on the mixed factor analysis model in the sensor network involved in the present invention, it is applied to the clustering of wine component data. In some countries, there are some testing stations distributed in different regions for testing the content of various components in wine. The type of wine sent to the testing station varies. Therefore, it is necessary to cluster wines of similar categories. If the detection station can form a sensor network with other detection stations, through mutual cooperation, it can make full use of the wine data in other detection stations, thereby improving the clustering accuracy. Here, the wine data to be clustered comes from the UCI machine learning database. There are 178 data here, which come from 3 categories in total. The dimension of each data is 13, indicating the content of each component in the wine. There are 8 nodes in the sensor network, the average number of neighbor nodes of each node is 2, and the network is connectable (there is a direct or indirect path between any two nodes). So in this example, M=8, p=13, I=3, q=3. In addition, the amount of data at each node: N 1 =21, N 2 =22, N 3 =21, N 4 =21, N 5 =22, N 6 =22, N 7 =21, N 8 =28; Neighbor nodes of each node: R 1 ={3,5,6}, R 2 ={3,5}, R 3 ={1,4,2}, R 4 ={3}, R 5 ={1, 2}, R 6 ={1,7}, R 7 ={6,8}, R 8 ={3,7}.

按照发明内容(图2所示)的流程,开始分布式聚类:According to the process of the content of the invention (shown in Figure 2), start distributed clustering:

(1)初始化:设定MFA中参数的初始值。其中,各节点处的 从节点的数据中随机选取,中的每个元素都从标准正态分布N(0,1)中生成。此外,每个节点l(l=1,...,M)将其采集到的数据个数Nl广播给其邻居节点。当某个节点m收到它的所有邻居节点广播来的数据个数之后,该节点计算权重clm(1) Initialization: Set the initial value of the parameters in the MFA. Among them, at each node randomly selected from the node's data, and Each element in is generated from a standard normal distribution N(0,1). In addition, each node l (l=1, . . . , M) broadcasts the number N l of collected data to its neighbor nodes. When a node m receives the number of data broadcasted by all its neighbor nodes, the node calculates the weight c lm :

该权重的含义为用于衡量节点m的各邻居节点l(l∈Rm)每次传输的信息在节点m处的重要性。初始化完成后,迭代计数器iter=1,开始迭代过程。The meaning of the weight is to measure the importance of the information transmitted by each neighbor node l(l∈R m ) of the node m at the node m. After the initialization is completed, the iteration counter iter=1, and the iteration process starts.

(2)局部计算:此步骤不需要邻居节点的信息。在每个节点l处,基于其采集到的数据Yl,首先计算出gi,Ωi和<zl,n,i>,(n=1,...,Nl;i=1,...,I):(2) Local calculation: This step does not require the information of neighbor nodes. At each node l, based on the collected data Y l , first calculate g i , Ω i , and < zl,n,i >, (n=1,..., Nl ; i=1,...,I):

其中为前一次迭代完成之后得到的参数值(首次迭代时为参数的初始值<zl,n,i>表示节点l处第n个数据yl,n属于第i个类(混合成分)的概率。in The parameter value obtained after the previous iteration is completed (the initial value of the parameter in the first iteration <z l,n,i > represents the probability that the nth data y l,n at the node l belongs to the i-th class (mixture component).

其次,节点计算局部充分统计量如下:Second, the nodes compute local sufficient statistics as follows:

(3)广播扩散:传感器网络中的每个节点l将计算好的局部统计量LSSl广播扩散给其邻居节点,如图1所示。(3) Broadcast diffusion: Each node l in the sensor network broadcasts the calculated local statistics LSS l to its neighbor nodes, as shown in Figure 1.

(4)联合计算:当节点m(m=1,...,M)收到来自其所有邻居节点l(l∈Rm)的LSSl后,节点m计算出联合充分统计量 (4) Joint calculation: when node m (m=1,...,M) receives LSS l from all its neighbor nodes l(l∈R m ), node m calculates joint sufficient statistics

(5)估计参数:节点m(m=1,...,M)根据上一步计算出的CSSm,估计出Θ={πi,Aii,Di}i=1,...,I,其中,{πii}i=1,...,I的估计过程如下:(5) Estimated parameters: node m (m=1,...,M) estimates Θ={π i ,A i , μ i ,D i } i=1,. ..,I , where {π ii } i=1,...,I, the estimation process is as follows:

对于{Ai,Di}i=1,...,I的估计,过程如下:For the estimation of {A i ,D i } i=1,...,I , the process is as follows:

(6)判决收敛:节点m(m=1,...,M)计算当前迭代下的对数似然值:(6) Judgment convergence: node m (m=1,...,M) calculates the logarithmic likelihood value under the current iteration:

如果logp(Ym|Θ)-logp(Ymold)<ε,则收敛,停止迭代;否则执行步骤(2),开始下一次迭代(iter=iter+1);其中Θ表示当前迭代估计出的参数值,Θold表示上一次迭代中估计的参数值,即,相邻两次迭代的对数似然值小于阈值ε,算法收敛;ε取10-5~10-6中的任意值;值得注意的是,由于网络中各节点是并行处理数据,因此所有不可能在一次迭代中同时收敛;例如,当节点l已经收敛而节点m尚未收敛时,则节点l不再发送LSSl,也不再接收邻居节点传输的信息;节点m则用最后一次收到的节点l发来的LSSl更新其CSSm;未收敛的节点继续迭代,直至网络中所有节点都收敛。If logp(Y m |Θ)-logp(Y mold )<ε, converge and stop iteration; otherwise, execute step (2) and start the next iteration (iter=iter+1); where Θ represents the current iteration Estimated parameter value, Θ old represents the parameter value estimated in the last iteration, that is, the logarithmic likelihood value of two adjacent iterations is less than the threshold ε, and the algorithm converges; ε takes any value from 10 -5 to 10 -6 It is worth noting that since each node in the network processes data in parallel, it is impossible to converge at the same time in one iteration; for example, when node l has converged but node m has not yet converged, node l will no longer send LSS l , and no longer receive information transmitted by neighbor nodes; node m updates its CSS m with the last received LSS l sent by node l ; unconverged nodes continue to iterate until all nodes in the network converge.

(7)聚类输出。经过步骤(1)-(6)之后,节点m(m=1,...,M),得到与其每个数据{ym,n}n=1,...,Nm相对应的<zm,n,i>(n=1,...,Nm;i=1,...,I),将<zm,n,i>,i=1,...,I中的最大值所对应的序号作为ym,n所最终分配到的类Cm,n,即:(7) Cluster output. After steps (1)-(6), node m (m=1,...,M) obtains <z corresponding to each of its data {y m,n } n=1,...,Nm m,n,i >(n=1,...,N m ; i=1,...,I), will <z m,n,i >, i=1,...,I The serial number corresponding to the maximum value is used as the class C m,n to which y m,n is finally assigned, namely:

用这样的方式得到所有节点上的所有数据的聚类结果 Get the clustering results of all data on all nodes in this way

性能评价:Performance evaluation:

将采用本发明所涉及聚类方法所得到的结果和正确的类属结果进行比较,从而可以评价和衡量出本发明所涉及的方法的有效性和准确性。各节点处的聚类结果如图3所示,该图的横坐标表示178个数据,非空缺的位置表示该数据被分到了那个节点,纵坐标表示该数据被分到的类别序号(共3类)。在该图中,“o”表示正确聚类的数据,“x”表示错误聚类的数据。从图3中,8个节点处的聚类正确率为:100%,100%,95.2%,95.5%,100%,95.5%,100%,92.9%。总共只有五个数据被错误的聚类,整个网络的平均正确率为97.2%。和采用集中式传输的方法获得的结果(98%)相比,其正确率基本相同。而集中式传输的缺点是十分明显的,其一,一旦中心节点失效,则整个网络崩溃;其二,各节点直接将原始数据传输给中心节点,不仅增加了网络中的通信负担,而且容易泄露数据中的隐私。因此,采用本发明的方法克服了以上的缺点,获得了很好的分布式聚类性能。Will adopt the result that the clustering method involved in the present invention obtains Compared with the correct generic results, the effectiveness and accuracy of the method involved in the present invention can be evaluated and measured. The clustering results at each node are shown in Figure 3. The abscissa of the figure represents 178 data, the non-vacant position represents the node to which the data is assigned, and the ordinate represents the category number to which the data is assigned (a total of 3 kind). In this figure, "o" indicates correctly clustered data and "x" indicates incorrectly clustered data. From Figure 3, the clustering accuracy at 8 nodes is: 100%, 100%, 95.2%, 95.5%, 100%, 95.5%, 100%, 92.9%. In total, only five data were incorrectly clustered, and the average correct rate of the entire network was 97.2%. Compared with the result (98%) obtained by the centralized transmission method, the correct rate is basically the same. The shortcomings of centralized transmission are very obvious. First, once the central node fails, the entire network will collapse; second, each node directly transmits the original data to the central node, which not only increases the communication burden in the network, but also easily leaks Privacy in data. Therefore, the above disadvantages are overcome by adopting the method of the present invention, and good distributed clustering performance is obtained.

本发明请求保护的范围并不仅仅局限于本具体实施方式的描述。The scope of protection claimed in the present invention is not limited only to the description of this specific embodiment.

Claims (2)

1.传感器网络中基于混合因子分析模型的分布式聚类方法,其特征在于,所述方法包括如下步骤:1. the distributed clustering method based on mixed factor analysis model in the sensor network, it is characterized in that, described method comprises the steps: 步骤1:初始化;传感器网络中有M个传感器节点,第m个节点采集到Nm个数据,表示为其中ym,n表示节点m处的第n个数据,维度为p;网络拓扑已经事先确定,节点m的邻居节点集合表示为Rm;用混合因子分析模型(MFA)来描述Ym(m=1,...,M)的分布,所有节点的数据共用同一个MFA;MFA的参数集合为{πi,Aii,Di}i1,...,I,其中πi为第i个混合成分的权重,Ai为第i个混合成分的(p×q)的因子载荷矩阵,q为低维因子的维度,取q=p/6~p/2之间的任意整数;μi为第i个混合成分的p维均值矢量,Di为第i个混合成分的误差的协方差矩阵;Step 1: Initialization; there are M sensor nodes in the sensor network, and the mth node collects N m data, expressed as Among them, y m, n represent the nth data at node m, and the dimension is p; the network topology has been determined in advance, and the set of neighbor nodes of node m is represented as R m ; use mixed factor analysis model (MFA) to describe Y m (m =1,...,M), the data of all nodes share the same MFA; the parameter set of MFA is {π i ,A ii ,D i } i = 1 ,..., I , where π i is the weight of the i-th mixed component, A i is the (p×q) factor loading matrix of the i-th mixed component, and q is the dimension of the low-dimensional factor, which is between q=p/6~p/2 Any integer of ; μ i is the p-dimensional mean vector of the i-th mixed component, and D i is the covariance matrix of the error of the i-th mixed component; 首先,设定MFA中的混合成分数I,也是待聚类的类别个数;根据I,p和q来设定MFA中各参数的初始值;其中,各节点处的 从该节点采集到的数据中随机选取,中的每个元素都从标准正态分布N(0,1)中生成;此外,每个节点l将其采集到的数据个数Nl广播给其邻居节点;当某个节点m收到它的所有邻居节点l(l∈Rm)广播来的数据个数之后,该节点根据下式来计算权重clmFirst, set the mixture fraction I in MFA, which is also the number of categories to be clustered; set the initial value of each parameter in MFA according to I, p and q; among them, the Randomly select from the data collected by the node, and Each element in is generated from the standard normal distribution N(0,1); in addition, each node l broadcasts the number of data N l it collects to its neighbor nodes; when a node m receives it After the number of data broadcasted by all neighbor nodes l(l∈R m ), the node calculates the weight c lm according to the following formula: 初始化完成后,迭代计数器iter=1,开始迭代过程;After the initialization is completed, the iteration counter iter=1, and the iteration process starts; 步骤2:局部计算;在每个节点l处,基于其采集到的数据Yl,首先计算出中间变量gi,Ωi和<zl,n,i>,(n=1,...,Nl;i=1,...,I):Step 2: Local calculation; at each node l, based on the collected data Y l , first calculate the intermediate variables g i , Ω i , and <z l , n, i >, (n=1,...,N l ; i=1,...,I): 其中,为前一次迭代完成之后得到的参数值,首次迭代时为参数的初始值<zl,n,i>表示节点l处第n个数据yl,n属于第i个类混合成分的概率;in, It is the parameter value obtained after the previous iteration is completed, and it is the initial value of the parameter at the first iteration <z l,n,i >indicates the probability that the nth data y l,n at node l belongs to the i-th class mixture component; 接着,节点计算局部充分统计量包括:Next, the node computes the local sufficient statistics include: ; 步骤3:广播扩散;传感器网络中的每个节点l将计算好的局部充分统计量LSSl广播扩散给其邻居节点;Step 3: broadcast diffusion; each node l in the sensor network broadcasts the calculated local sufficient statistic LSS l to its neighbor nodes; 步骤4:联合计算;当节点m(m=1,...,M)收到来自其所有邻居节点l(l∈Rm)的LSSl后,节点m计算出联合充分统计量 Step 4: Joint calculation; when node m(m=1,...,M) receives LSS l from all its neighbor nodes l(l∈R m ), node m calculates joint sufficient statistics 步骤5:估计参数;节点m(m=1,...,M)根据上一步计算出的,估计出 ,其中,{πii}i=1,...,I的估计过程如下:Step 5: Estimate parameters; node m (m=1,...,M) is calculated according to the previous step , estimated , where {π ii } i=1,..., the estimation process of I is as follows: 对于{Ai,Di}i=1,...,I的估计,过程如下:For the estimation of {A i ,D i } i=1,...,I , the process is as follows: 步骤6:判决收敛;节点m(m=1,...,M)计算当前迭代下的对数似然值:Step 6: Judgment convergence; node m (m=1,...,M) calculates the logarithmic likelihood value under the current iteration: 如果logp(Ym|Θ)-logp(Ymold)<ε,则收敛,停止迭代;否则执行步骤2,开始下一次迭代(iter=iter+1);其中Θ表示当前迭代估计出的参数值,Θold表示上一次迭代中估计的参数值,即,相邻两次迭代的对数似然值小于阈值ε,算法收敛;ε取10-5~10-6中的任意值;由于网络中各节点是并行处理数据,因此所有不可能在一次迭代中同时收敛;当节点l已经收敛而节点m尚未收敛时,则节点l不再发送 LSSl,也不再接收邻居节点传输的信息;节点m则用最后一次收到的节点l发来的LSSl更新其CSSm;未收敛的节点继续迭代,直至网络中所有节点都收敛;If logp(Y m |Θ)-logp(Y mold )<ε, it converges and stops iteration; otherwise, execute step 2 and start the next iteration (iter=iter+1); where Θ indicates that the current iteration estimates , Θ old represents the parameter value estimated in the last iteration, that is, the logarithmic likelihood value of two adjacent iterations is less than the threshold ε, and the algorithm converges; ε takes any value from 10 -5 to 10 -6 ; Since each node in the network processes data in parallel, it is impossible to converge at the same time in one iteration; when node l has converged but node m has not yet converged, node l will no longer send LSS l , and will no longer receive LSS l transmitted by neighbor nodes. information; node m updates its CSS m with the last received LSS l from node l; unconverged nodes continue to iterate until all nodes in the network converge; 步骤7:聚类输出;经过步骤1-步骤6之后,节点m(m=1,...,M)得到与其每个数据相对应的<zm,n,i>(n=1,...,Nm;i=1,...,I),将<zm,n,i>(i=1,...,I)中的最大值所对应的序号作为ym,n所最终分配到的类Cm,n,即:Step 7: Clustering output; after step 1-step 6, node m (m=1,...,M) gets each data Corresponding <z m,n,i >(n=1,...,N m ; i=1,...,I), will <z m,n,i >(i=1,.. .,I) The serial number corresponding to the maximum value is the class C m,n to which y m ,n is finally assigned, namely: 得到所有节点上的所有数据的聚类结果 Get the clustering results of all data on all nodes 2.根据权利要求1所述的传感器网络中基于混合因子分析模型的分布式聚类方法,其特征在于:所述方法应用于酒成分数据的聚类。2. The distributed clustering method based on the mixed factor analysis model in the sensor network according to claim 1, characterized in that: the method is applied to the clustering of wine component data.
CN201510414218.6A 2015-07-15 2015-07-15 Distributed clustering method based on hybrid cytokine analysis model in sensor network Expired - Fee Related CN104994170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510414218.6A CN104994170B (en) 2015-07-15 2015-07-15 Distributed clustering method based on hybrid cytokine analysis model in sensor network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510414218.6A CN104994170B (en) 2015-07-15 2015-07-15 Distributed clustering method based on hybrid cytokine analysis model in sensor network

Publications (2)

Publication Number Publication Date
CN104994170A CN104994170A (en) 2015-10-21
CN104994170B true CN104994170B (en) 2018-06-05

Family

ID=54305921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510414218.6A Expired - Fee Related CN104994170B (en) 2015-07-15 2015-07-15 Distributed clustering method based on hybrid cytokine analysis model in sensor network

Country Status (1)

Country Link
CN (1) CN104994170B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550704B (en) * 2015-12-10 2019-01-01 南京邮电大学 Distributed high dimensional data classification method based on mixing common factor analyzer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404664A (en) * 2008-11-05 2009-04-08 湖南大学 Network positioning and optimizing algorithm based on node clustering
CN102752784A (en) * 2012-06-19 2012-10-24 电子科技大学 Detection method of distribution type event domain based on graph theory in wireless sensor network
WO2013036892A1 (en) * 2011-09-08 2013-03-14 Attagene, Inc. Systems and methods for assessment of biosimilarity
CN103226595A (en) * 2013-04-17 2013-07-31 南京邮电大学 Clustering method for high dimensional data based on Bayes mixed common factor analyzer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404664A (en) * 2008-11-05 2009-04-08 湖南大学 Network positioning and optimizing algorithm based on node clustering
WO2013036892A1 (en) * 2011-09-08 2013-03-14 Attagene, Inc. Systems and methods for assessment of biosimilarity
CN102752784A (en) * 2012-06-19 2012-10-24 电子科技大学 Detection method of distribution type event domain based on graph theory in wireless sensor network
CN103226595A (en) * 2013-04-17 2013-07-31 南京邮电大学 Clustering method for high dimensional data based on Bayes mixed common factor analyzer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于混合因子分析的分布估计算法;杨晔宏 等;《信息与控制》;20060831;第35卷(第4期);全文 *

Also Published As

Publication number Publication date
CN104994170A (en) 2015-10-21

Similar Documents

Publication Publication Date Title
JP2014204436A5 (en)
CN102546059A (en) Non-supervision clustering-based distributed cooperative spectrum sensing method for cognitive self-organizing network
CN103634902B (en) Novel indoor positioning method based on fingerprint cluster
CN105574191B (en) Online community network multi-source point information source tracing system and method
CN102638802A (en) Hierarchical cooperative combined spectrum sensing algorithm
CN103916860B (en) Outlier data detection method based on space time correlation in wireless senser cluster l network
CN103533571B (en) Fault-tolerant event detecting method based on temporal voting strategy
CN111556454A (en) A Weighted DV_Hop Node Location Method Based on Minimum Mean Square Error Criterion
CN103987118B (en) Access point k-means clustering method based on received signal strength signal ZCA whitening
CN103716187B (en) Network topology structure determination method and system
CN113422695A (en) Optimization method for improving robustness of topological structure of Internet of things
CN106998299B (en) The recognition methods of the network equipment, apparatus and system in data center network
CN105337639B (en) Low-voltage power line communication quasi- spider web point shape network-building method
CN102905363B (en) Factor graph based positioning method
CN102137413B (en) Method and device for detecting basic service set identify (BSSID) conflict
CN104994170B (en) Distributed clustering method based on hybrid cytokine analysis model in sensor network
CN103347279B (en) Based on transmission method and the system of risk assessment
CN102378217A (en) Beacon node credit assessment method in localization in wireless sensor networks
CN105792138B (en) The positioning of indoor WLAN user and behavior analysis method based on line segment density
CN104540203A (en) Performance optimizing method for wireless body area network based on independent sets
CN105530663A (en) Method and device for detecting changes in base number of cluster members under Internet of Vehicles
CN103402255B (en) A kind of improvement DV-Hop localization method based on the weighting of corrected value error
CN106603294B (en) A kind of synthesis vulnerability assessment method based on power communication web frame and state
CN104581734A (en) Method and device for dividing network communities
CN112055419A (en) A Statistical-based Correlation Method for Communication Signals

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201207

Address after: Room 214, building D5, No. 9, Kechuang Avenue, Zhongshan Science and Technology Park, Jiangbei new district, Nanjing, Jiangsu Province

Patentee after: Nanjing Tian Gu Information Technology Co.,Ltd.

Address before: Yuen Road Qixia District of Nanjing City, Jiangsu Province, No. 9 210023

Patentee before: NANJING University OF POSTS AND TELECOMMUNICATIONS

Effective date of registration: 20201207

Address after: Gulou District of Nanjing City, Jiangsu Province, Beijing Road No. 20 210024

Patentee after: STATE GRID JIANGSU ELECTRIC POWER Co.,Ltd. INFORMATION & TELECOMMUNICATION BRANCH

Address before: Room 214, building D5, No. 9, Kechuang Avenue, Zhongshan Science and Technology Park, Jiangbei new district, Nanjing, Jiangsu Province

Patentee before: Nanjing Tian Gu Information Technology Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180605

CF01 Termination of patent right due to non-payment of annual fee