[go: up one dir, main page]

CN106055568A - Automatic friend grouping method for social network based on single-step association adding - Google Patents

Automatic friend grouping method for social network based on single-step association adding Download PDF

Info

Publication number
CN106055568A
CN106055568A CN201610338452.XA CN201610338452A CN106055568A CN 106055568 A CN106055568 A CN 106055568A CN 201610338452 A CN201610338452 A CN 201610338452A CN 106055568 A CN106055568 A CN 106055568A
Authority
CN
China
Prior art keywords
user
iteration
group
community
users
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.)
Granted
Application number
CN201610338452.XA
Other languages
Chinese (zh)
Other versions
CN106055568B (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.)
Anhui University
Original Assignee
Anhui 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 Anhui University filed Critical Anhui University
Priority to CN201610338452.XA priority Critical patent/CN106055568B/en
Publication of CN106055568A publication Critical patent/CN106055568A/en
Application granted granted Critical
Publication of CN106055568B publication Critical patent/CN106055568B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06Q10/40
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an automatic friend grouping method for a social network based on single-step association adding. The method is characterized in that the social network is described as a binary group; and an overlapped association detection algorithm based on the single-step association adding is used to solve problems in automatic friend grouping of the social network. The method disclosed by the invention has the advantages that friend circles in the social network can be grouped automatically and rapidly; and efficiency and accuracy of the grouping are increased. In this way, more reliable friends can be recommended for a user through the accurate friend grouping; and unnecessary troubles generated when the user searches the friends in the same camp can be reduced.

Description

一种基于单步添加团的社交网络的朋友自动分组方法A method for automatic grouping of friends in a social network based on single-step group addition

技术领域technical field

本发明涉及社交网络中朋友自动分组技术领域,具体来说就是提出一种基于单步添加团的社交网络的朋友自动分组方法。The invention relates to the technical field of automatic grouping of friends in a social network, and specifically proposes a method for automatic grouping of friends in a social network based on single-step group addition.

背景技术Background technique

随着互联网时代的到来,社交网络犹如雨后春笋得到了迅速地发展,吸引了国内外学者的广泛关注。社交网络的出现改变了人们传统的思考、交流、工作及生活方式,越来越多用户选择加入在线社交网络进行信息的交流,社交网络的用户规模呈爆炸式增长,加剧了网络中信息增长的速度。网络信息的加剧导致用户无法从海量的数据中选择自己所需的信息,也就是用户面临信息过载问题。如果用户对自己所在的在线社交网络进行手动的朋友分组,这样不仅费时还费力,导致很多用户没有对他们的朋友进行分类,因此,大多数社交网站都会根据用户的某些公共属性自动为用户分类好友。With the advent of the Internet age, social networks have grown rapidly like mushrooms after rain, attracting extensive attention from scholars at home and abroad. The emergence of social networks has changed people's traditional thinking, communication, work and lifestyle. More and more users choose to join online social networks for information exchange. speed. The intensification of network information makes it impossible for users to choose the information they need from the massive data, that is, users face the problem of information overload. If users manually group friends in their online social network, it is not only time-consuming and laborious, but many users do not classify their friends. Therefore, most social networking sites automatically classify users according to some public attributes of users. friend.

目前社交网络朋友推荐中的自动分组问题包含两类研究方法:At present, the automatic grouping problem in social network friend recommendation contains two types of research methods:

一类研究方法是基于社交网络全局特征的研究方法,这类方法需要探测社交网络中所有的链路结构,获知网络的全局信息。但是这类方法计算成本较高,在复杂的社交网络中可能会影响推荐算法的高效性。One type of research method is based on the global characteristics of the social network. This type of method needs to detect all the link structures in the social network and obtain the global information of the network. However, such methods are computationally expensive and may affect the efficiency of recommendation algorithms in complex social networks.

一类研究方法是基于社交网络局部结构特性,该类方法以网络中节点的结构为研究对象实现朋友推荐中的朋友分组问题。这类方法计算复杂度较低,但是通常由于所给信息不充分导致社交网络中朋友分组不准确。One type of research method is based on the local structural characteristics of social networks. This type of method takes the structure of nodes in the network as the research object to realize the friend grouping problem in friend recommendation. This type of method has low computational complexity, but it usually results in inaccurate grouping of friends in social networks due to insufficient information given.

发明内容Contents of the invention

本发明针对现有技术中存在的不足之处,提供一种基于单步添加团的社交网络的朋友自动分组方法,以期能快速实现社交网络中朋友圈自动分组,提高分组效率和准确性,从而可以通过准确的朋友分组,为用户推荐更可靠地朋友,减少用户在搜索志同道合朋友时产生的不必要麻烦。Aiming at the deficiencies in the prior art, the present invention provides a method for automatically grouping friends in social networks based on single-step group addition, in order to quickly realize automatic grouping of circles of friends in social networks, improve grouping efficiency and accuracy, and thereby Through accurate friend grouping, more reliable friends can be recommended for users, reducing unnecessary troubles for users when searching for like-minded friends.

本发明为解决技术问题采用如下技术方案:The present invention adopts following technical scheme for solving technical problems:

本发明一种基于单步添加团的社交网络的朋友自动分组方法的特点是按如下步骤进行:A kind of friend automatic grouping method based on the social network of single-step adding group of the present invention is to carry out according to the following steps:

步骤一、定义所述社交网络表征为二元组{V,E},V={v1,v2,…,vi,…,vn}表示所述社交网络中所有用户的集合,vi表示第i个用户;n为用户的总数;E={eij|i=1,2,…,n;j=1,2,…,n}表示任意两个用户之间的联系的集合;eij表示第i个用户vi与第j个用户vj之间的联系;若eij=1表示第i个用户vi与第j个用户vj之间有边相连,且第i个用户vi与第j个用户vj互为称为邻居用户;若eij=0,表示第i个用户vi与第j个用户vj之间无边相连,即不存在联系;Step 1. Define the social network representation as a binary group {V, E}, V={v 1 , v 2 ,...,v i ,...,v n } represents the set of all users in the social network, v i represents the i-th user; n is the total number of users; E={e ij |i=1,2,...,n; j=1,2,...,n} represents the set of links between any two users ; e ij represents the connection between the i-th user v i and the j-th user v j ; if e ij = 1, it means that there is an edge connection between the i-th user v i and the j-th user v j , and the i-th user The first user v i and the jth user v j are mutually called neighbor users; if e ij = 0, it means that there is no boundless connection between the i-th user v i and the j-th user v j , that is, there is no connection;

步骤二、采用基于单步添加团的重叠网络社团检测算法将所述社交网络G划分成k个分组集合,记为C={C1,C2,…,Cx,…,CX};Cα表示第x个分组;x=1,2,…,X;从而实现社交网络的朋友自动分组。Step 2. Divide the social network G into k grouping sets by adopting an overlapping network community detection algorithm based on single-step adding groups, denoted as C={C 1 ,C 2 ,...,C x ,...,C X }; C α represents the xth group; x=1,2,...,X; thereby realizing the automatic grouping of friends in the social network.

本发明所述的基于单步添加团的社交网络的朋友自动分组方法的特点也在于,The feature of the automatic grouping method of friends based on the social network of single-step adding groups according to the present invention is also that,

所述步骤二中的基于单步添加团的重叠网络社团检测算法是按如下步骤进行:The overlapping network community detection algorithm based on single-step added groups in the step 2 is carried out as follows:

步骤0、初始化x=1;以所述社交网络的所有用户的集合V作为第x个预备组的候选用户集合,记为V(x);定义迭代变量t;定义迭代变量r;Step 0, initialization x=1; With the set V of all users of the social network as the candidate user set of the xth preliminary group, denoted as V (x) ; Define iteration variable t; Define iteration variable r;

步骤1、初始化t=1;Step 1. Initialize t=1;

步骤2、从所述第x个预备组的候选用户V(x)中随机选取第t次迭代的用户v(x)(t)Step 2, randomly selecting the user v (x)(t) of the tth iteration from the candidate user V (x) of the xth preliminary group;

步骤3、利用式(1)计算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)Step 3. Calculate the clustering coefficient G (x)(t) of the user v (x)(t) of the t-th iteration by using formula (1):

GG (( xx )) (( tt )) == 22 mm vv (( xx )) (( tt )) sthe s vv (( xx )) (( tt )) (( sthe s vv (( xx )) (( tt )) -- 11 )) -- -- -- (( 11 ))

式(1)中,表示第x个预备组中第t次迭代的用户v(x)(t)的邻居用户的数量,表示第t次迭代的用户v(x)(t)的所有个邻居用户间的有边相连的边数;In formula (1), Denotes the number of neighbor users of user v (x)(t) at iteration t in the preparation group x, Denotes all The number of connected edges between neighboring users;

步骤4、利用式(1)计算第x个预备组中第t次迭代的用户v(x)(t)个邻居用户的聚类系数,并分别与算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)比较,若能找到具有最大聚类系数且最大聚类系数大于G(x)(t)的邻居用户,则将所找到的邻居用户作为第x个预备组中第t+1次迭代的用户v(x)(t+1);并执行步骤5;否则,保留所述第t次迭代的用户v(x)(t)作为第x个预备组中的核心用户;Step 4. Use formula (1) to calculate the user v (x)(t) of the t-th iteration in the x-th preliminary group The clustering coefficients of neighboring users are compared with the clustering coefficient G (x)(t) of user v (x)(t) in the t-th iteration, if the largest clustering coefficient and the largest clustering can be found The neighbor user whose coefficient is greater than G (x) (t) , then the neighbor user found is used as the user v (x) (t+1) of the t+1 iteration in the xth preparation group; and perform step 5; Otherwise, retain the user v (x)(t) of the tth iteration as the core user in the xth preliminary group;

步骤5、将t+1赋值给t;并重复执行步骤3;Step 5. Assign t+1 to t; and repeat step 3;

步骤6、初始化r=1;Step 6, initialize r=1;

步骤7、找到第x个预备组中第t次迭代的核心用户v(x)(t)所连接的一个k团;所述核心用户v(x)(t)所连接的k团中的所有用户均为邻居用户;以所述核心用户v(x)(t)所连接的k团作为第x个预备组中第r次迭代的社团C(x)(r);k≥3;Step 7, find a k group connected by the core user v (x)(t) of the tth iteration in the xth preliminary group; all the k groups connected by the core user v (x) (t) The users are all neighbor users; the k group connected with the core user v (x) (t) is used as the community C (x) (r) of the rth iteration in the xth preliminary group; k≥3;

步骤8、根据式(2)计算第x个预备组中第r次迭代的社团C(x)(r)的社团适应度值F(x)(r)Step 8. Calculate the community fitness value F (x)(r) of the community C (x)(r) of the r-th iteration in the x-th preliminary group according to formula (2):

Ff (( xx )) (( rr )) == KK ii nno (( xx )) (( rr )) (( KK ii nno (( xx )) (( rr )) ++ KK oo uu tt (( xx )) (( rr )) )) αα -- -- -- (( 22 ))

式(2)中,α是可调节的参数;分别表示第r次迭代初始社团C(x)(r)的内部度数和外部度数,内部度数为第r次迭代的社团C(x)(r)中所有用户间有边相连的边数的2倍;外部度数为第r次迭代的社团C(x)(r)中所有用户与外部用户有边相连的边数;In formula (2), α is an adjustable parameter; respectively represent the internal degree and external degree of the initial community C (x)(r) in the rth iteration, and the internal degree Twice the number of connected edges between all users in the community C (x)(r) of the rth iteration; the external degree is the number of edges connecting all users and external users in the community C (x)(r) of the rth iteration;

步骤9、找到第r次迭代的社团C(x)(r)中所有用户的邻居用户并进行并集处理,从而构成第x个预备组中第r次迭代的社团C(x)(r)的邻居用户;Step 9. Find the neighbor users of all users in the community C (x)(r) of the r-th iteration and perform union processing to form the community C (x)(r) of the r-th iteration in the x-th preliminary group neighbor users;

步骤10、判断所述第x个预备组中第r次迭代的社团C(x)(r)的邻居用户各自是否存在自身所连接的一个k团;若存在,则将邻居用户各自的所连接的一个k团分别加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;若不存在,则直接将相应的邻居用户加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;Step 10, judging whether the neighbor users of the community C (x)(r) of the r-th iteration in the x-th preparation group have a k group connected to themselves; A k group of the r-th iteration is added to the community C (x)(r) of the r-th iteration to calculate the corresponding community fitness value; if it does not exist, the corresponding neighbor user is directly added to the r-th iteration of the community C ( Calculate the corresponding community fitness value in x)(r) ;

步骤11、若能找到使得所述社团适应度值F(x)(r)增值最大的邻居用户或邻居用户所连接的k团;则将增值最大的邻居用户或邻居用户所连接的k团加入到第r次迭代的初始社团C(x)(r)中,并作为第r+1次迭代的社团C(x)(r+1),执行步骤12;否则,保所述第x个预备组中第r次迭代的初始社团C(x)(r)作为第x个分组;并执行步骤13;Step 11. If it is possible to find the neighbor user or the k clique connected to the neighbor user that makes the community fitness value F (x)(r) increase the most; then add the neighbor user or the k clique connected to the neighbor user with the largest increase to the initial community C (x)(r) of the rth iteration, and as the community C (x)(r+1) of the r+1th iteration, perform step 12; otherwise, keep the xth preliminary The initial community C (x)(r) of the rth iteration in the group is used as the xth grouping; and step 13 is performed;

步骤12、将r+1赋值给r;并重复执行步骤8;Step 12, assign r+1 to r; and repeat step 8;

步骤13、从所述第x个预备组的候选用户V(x)中去除所述第x个分组,从而获得第x+1个预备组的候选用户V(x+1)Step 13, removing the xth group from the candidate user V (x) of the xth preliminary group, thereby obtaining the candidate user V (x+1) of the x+1th preliminary group;

步骤14、将x+1赋值给x;并返回步骤1执行,从而得到X个分组,进而实现社交网络的朋友自动分组。Step 14. Assign x+1 to x; and return to step 1 for execution, so as to obtain X groups, and then realize the automatic grouping of friends in social networks.

与已有技术相比,本发明有益效果体现在:Compared with the prior art, the beneficial effects of the present invention are reflected in:

1、本发明根据局部社团扩充的思想,在对社交网络进行朋友自动分组时采用基于单步添加团的社团扩充方式,以完成社交网络的自动分组。本发明在社团扩充过程只需要获取社交网络中用户的局部信息就可以完成用户自动分组,无需获知整个社交网络的全局信息和节点信息,这样可以快速的检测出社交网络的各个朋友分组,获得社交网络中较为准确的朋友分组结果;解决了基于全局结构特征方法高计算成本的问题,也解决了某些基于局部结构特征方法中网络划分不准确的问题。1. According to the idea of local community expansion, the present invention adopts a community expansion method based on single-step adding groups when automatically grouping friends in a social network to complete the automatic grouping of social networks. In the community expansion process, the present invention only needs to obtain the local information of users in the social network to complete the automatic grouping of users without knowing the global information and node information of the entire social network, so that each friend group of the social network can be quickly detected, and social More accurate friend grouping results in the network; it solves the problem of high computational cost based on global structural feature methods, and also solves the problem of inaccurate network division in some methods based on local structural features.

2、在进行朋友自动分组时首先要选择初始朋友分组,本发明的初始朋友分组是通过核心节点搜索得到的。核心节点作为一个分组或者图中最特殊的节点,是分组的中心节点并对分组内用户的连通起着关键作用,这样可以在一定程度上避免由初始分组选择不准确带来的随机性,从而提高了社交网络朋友自动分组的准确性。2. When performing automatic grouping of friends, the initial friend grouping must first be selected, and the initial friend grouping of the present invention is obtained through core node search. As a group or the most special node in the graph, the core node is the central node of the group and plays a key role in the connection of users in the group, which can avoid the randomness caused by the inaccurate selection of the initial group to a certain extent, thus Improved the accuracy of automatic grouping of social network friends.

3、目前存在的基于局部扩充的方法在朋友分组过程中每次只加入一个用户节点,没有充分考虑用户节点的局部信息会导致分组不准确。本发明引用团的概念:团是一个完全连通子图,它们在分组划分过程中极有可能同属于一个分组,所以如果一个用户节点属于某一个分组,那么该用户节点所在的团也更有可能成为这个分组的一部分。本发明在扩充时每次添加一个团,不仅考虑了被添加用户点与已有分组的连接强度,同时较好考虑了被添加用户内部的连接情况,更可以准确的发现属于同时多个分组的用户。3. In the current method based on local expansion, only one user node is added each time in the friend grouping process, and the local information of the user node is not fully considered, which will lead to inaccurate grouping. The present invention refers to the concept of clique: a clique is a fully connected subgraph, and they are very likely to belong to the same group during the group division process, so if a user node belongs to a certain group, then the clique where the user node is located is also more likely Be part of this group. When the present invention adds a group each time, it not only considers the connection strength between the added user point and the existing group, but also better considers the internal connection situation of the added user, and can more accurately find the group belonging to multiple groups at the same time. user.

附图说明Description of drawings

图1为本发明算法流程图;Fig. 1 is the algorithm flowchart of the present invention;

图2为本发明举例的一个简单网络示意图。Fig. 2 is a schematic diagram of a simple network example of the present invention.

具体实施方式detailed description

在实施例中,一种基于单步添加团的社交网络朋友自动分组方法将社交网络中的朋友自动分组问题转化为复杂网络社团检测问题,通过利用基于单步添加团的复杂网络社团检测算法来解决社交网络中朋友自动分组问题,从而得到社交网络中的朋友分组;具体地说是按如下步骤进行:In an embodiment, a method for automatically grouping friends in a social network based on one-step group addition converts the problem of automatic grouping of friends in a social network into a complex network community detection problem, by using a complex network community detection algorithm based on one-step group addition Solve the problem of automatic grouping of friends in the social network, so as to obtain the grouping of friends in the social network; specifically, proceed as follows:

步骤一、定义所述社交网络表征为二元组{V,E},V={v1,v2,…,vi,…,vn}表示所述社交网络中所有用户的集合,vi表示第i个用户;n为用户的总数;E={eij|i=1,2,…,n;j=1,2,…,n}表示任意两个用户之间的联系的集合;eij表示第i个用户vi与第j个用户vj之间的联系;若eij=1表示第i个用户vi与第j个用户vj之间有边相连,且第i个用户vi与第j个用户vj互为称为邻居用户;若eij=0,表示第i个用户vi与第j个用户vj之间无边相连,即不存在联系;如图2所示为一个包含11个用户的简单社交网络结构图,其中每个节点代表社交网络中的用户,每条边代表用户之间存在联系;Step 1. Define the social network representation as a binary group {V, E}, V={v 1 , v 2 ,...,v i ,...,v n } represents the set of all users in the social network, v i represents the i-th user; n is the total number of users; E={e ij |i=1,2,...,n; j=1,2,...,n} represents the set of links between any two users ; e ij represents the connection between the i-th user v i and the j-th user v j ; if e ij = 1, it means that there is an edge connection between the i-th user v i and the j-th user v j , and the i-th user A user v i and a jth user v j are called neighbor users; if e ij = 0, it means that there is no boundless connection between the i-th user v i and the j-th user v j , that is, there is no connection; as shown in 2 shows a simple social network structure diagram containing 11 users, where each node represents a user in the social network, and each edge represents a connection between users;

步骤二、采用基于单步添加团的重叠网络社团检测算法将所述社交网络G划分成k个分组集合,记为C={C1,C2,…,Cx,…,CX};Cα表示第x个分组;x=1,2,…,X;从而实现社交网络的朋友自动分组。Step 2. Divide the social network G into k grouping sets by adopting an overlapping network community detection algorithm based on single-step adding groups, denoted as C={C 1 ,C 2 ,...,C x ,...,C X }; C α represents the xth group; x=1,2,...,X; thereby realizing the automatic grouping of friends in the social network.

具体的说,如图1所示,基于单步添加团的重叠网络社团检测算法是按如下步骤进行:Specifically, as shown in Figure 1, the overlapping network community detection algorithm based on single-step addition of cliques is carried out as follows:

步骤0、初始化x=1;以所述社交网络的所有用户的集合V作为第x个预备组的候选用户集合,记为V(x);定义迭代变量t;定义迭代变量r;Step 0, initialization x=1; With the set V of all users of the social network as the candidate user set of the xth preliminary group, denoted as V (x) ; Define iteration variable t; Define iteration variable r;

步骤1、初始化t=1;Step 1. Initialize t=1;

步骤2、从所述第x个预备组的候选用户V(x)中随机选取第t次迭代的用户v(x)(t)Step 2, randomly selecting the user v (x)(t) of the tth iteration from the candidate user V (x) of the xth preliminary group;

步骤3、利用式(1)计算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)Step 3. Calculate the clustering coefficient G (x)(t) of the user v (x)(t) of the t-th iteration by using formula (1):

GG (( xx )) (( tt )) == 22 mm vv (( xx )) (( tt )) sthe s vv (( xx )) (( tt )) (( sthe s vv (( xx )) (( tt )) -- 11 )) -- -- -- (( 11 ))

式(1)中,表示第x个预备组中第t次迭代的用户v(x)(t)的邻居用户的数量,表示第t次迭代的用户v(x)(t)的所有个邻居用户间的有边相连的边数;In formula (1), Denotes the number of neighbor users of user v (x)(t) at iteration t in the preparation group x, Denotes all The number of connected edges between neighboring users;

步骤4、利用式(1)计算第x个预备组中第t次迭代的用户v(x)(t)个邻居用户的聚类系数,并分别与算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)比较,若能找到具有最大聚类系数且最大聚类系数大于G(x)(t)的邻居用户,则将所找到的邻居用户作为第x个预备组中第t+1次迭代的用户v(x)(t+1);并执行步骤5;否则,保留所述第t次迭代的用户v(x)(t)作为第x个预备组中的核心用户;Step 4. Use formula (1) to calculate the user v (x)(t) of the t-th iteration in the x-th preliminary group The clustering coefficients of neighboring users are compared with the clustering coefficient G (x)(t) of user v (x)(t) in the t-th iteration, if the largest clustering coefficient and the largest clustering can be found The neighbor user whose coefficient is greater than G (x) (t) , then the neighbor user found is used as the user v (x) (t+1) of the t+1 iteration in the xth preparation group; and perform step 5; Otherwise, retain the user v (x)(t) of the tth iteration as the core user in the xth preliminary group;

步骤5、将t+1赋值给t;并重复执行步骤3;Step 5. Assign t+1 to t; and repeat step 3;

步骤6、初始化r=1;Step 6, initialize r=1;

步骤7、找到第x个预备组中第t次迭代的核心用户v(x)(t)所连接的一个k团;所述核心用户v(x)(t)所连接的k团中的所有用户均为邻居用户;以所述核心用户v(x)(t)所连接的k团作为第x个预备组中第r次迭代的社团C(x)(r);k≥3;例如在图2中,假设初始预备组由用户节点{1,2,3,4,5}构成,此时,设置k=3;Step 7, find a k group connected by the core user v (x)(t) of the tth iteration in the xth preliminary group; all the k groups connected by the core user v (x) (t) The users are all neighbor users; the k group connected by the core user v (x) (t) is used as the community C (x) (r) of the rth iteration in the xth preliminary group; k≥3; for example, in In Fig. 2, it is assumed that the initial preparation group is composed of user nodes {1, 2, 3, 4, 5}, at this time, k=3 is set;

步骤8、根据式(2)计算第x个预备组中第r次迭代的社团C(x)(r)的社团适应度值F(x )(r)Step 8. Calculate the community fitness value F (x )(r) of the community C (x)(r) of the r-th iteration in the x-th preliminary group according to formula (2):

Ff (( xx )) (( rr )) == KK ii nno (( xx )) (( rr )) (( KK ii nno (( xx )) (( rr )) ++ KK oo uu tt (( xx )) (( rr )) )) αα -- -- -- (( 22 ))

式(2)中,α是可调节的参数;分别表示第r次迭代初始社团C(x)(r)的内部度数和外部度数,内部度数为第r次迭代的社团C(x)(r)中所有用户间有边相连的边数的2倍;外部度数为第r次迭代的社团C(x)(r)中所有用户与外部用户有边相连的边数,根据公式(2)计算出第1个预备分组{1,2,3,4,5}的适应度值为0.824;In formula (2), α is an adjustable parameter; respectively represent the internal degree and external degree of the initial community C (x)(r) in the rth iteration, and the internal degree Twice the number of connected edges between all users in the community C (x)(r) of the rth iteration; the external degree is the number of edges connecting all users and external users in the community C (x)(r) of the r-th iteration, and calculate the first preliminary group {1,2,3,4,5} according to formula (2) The fitness value of is 0.824;

步骤9、找到第r次迭代的社团C(x)(r)中所有用户的邻居用户并进行并集处理,从而构成第x个预备组中第r次迭代的社团C(x)(r)的邻居用户,这样可知第1个预备分组{1,2,3,4,5}的邻居用户为{6,7,8};Step 9. Find the neighbor users of all users in the community C (x)(r) of the r-th iteration and perform union processing to form the community C (x)(r) of the r-th iteration in the x-th preliminary group Neighbor users, so we know that the neighbor users of the first preliminary group {1,2,3,4,5} are {6,7,8};

步骤10、判断所述第x个预备组中第r次迭代的社团C(x)(r)的邻居用户各自是否存在自身所连接的一个k团;若存在,则将邻居用户各自的所连接的一个k团分别加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;若不存在,则直接将相应的邻居用户加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;则本实施例中,第1个预备分组{1,2,3,4,5}的邻居用户{6,7,8}所连接的k团分别为{(6,7,8),(6,7,8),(8,9,11)};Step 10, judging whether the neighbor users of the community C (x)(r) of the r-th iteration in the x-th preparation group have a k group connected to themselves; A k group of the r-th iteration is added to the community C (x)(r) of the r-th iteration to calculate the corresponding community fitness value; if it does not exist, the corresponding neighbor user is directly added to the r-th iteration of the community C ( Calculate the corresponding community fitness value in x)(r) ; then in this embodiment, k The groups are {(6,7,8), (6,7,8), (8,9,11)};

步骤11、若能找到使得所述社团适应度值F(x)(r)增值最大的邻居用户或邻居用户所连接的k团;则将增值最大的邻居用户或邻居用户所连接的k团加入到第r次迭代的初始社团C(x)(r)中,并作为第r+1次迭代的社团C(x)(r+1),执行步骤12;否则,保所述第x个预备组中第r次迭代的初始社团C(x)(r)作为第x个分组;并执行步骤13;本实施例中,通过计算可知6号用户所在的k团加入第1个预备组{1,2,3,4,5}得到的分组{1,2,3,4,5,6,7,8}的适应度值为0.897,使得分组的适应度值增加最大,因此选择6号用户连接的k团加入到预备分组中得到新的分组{1,2,3,4,5,6,7,8},如果再添加新的用户或用户所连接的k团不会使分组的适应度值增加,因此得到这个社交网络的第1个分组为{1,2,3,4,5,6,7,8};Step 11. If it is possible to find the neighbor user or the k clique connected to the neighbor user that makes the community fitness value F (x)(r) increase the most; then add the neighbor user or the k clique connected to the neighbor user with the largest increase to the initial community C (x)(r) of the rth iteration, and as the community C (x)(r+1) of the r+1th iteration, perform step 12; otherwise, keep the xth preliminary The initial community C (x)(r) of the rth iteration in the group is used as the xth group; and step 13 is executed; in this embodiment, it can be known through calculation that the k group where the No. 6 user belongs to join the first preliminary group {1 ,2,3,4,5} The fitness value of the group {1,2,3,4,5,6,7,8} obtained is 0.897, which makes the fitness value of the group increase the most, so choose user 6 The connected k group is added to the preliminary group to get a new group {1, 2, 3, 4, 5, 6, 7, 8}, if adding a new user or the k group connected by the user will not make the group adapt The degree value increases, so the first group of this social network is {1,2,3,4,5,6,7,8};

步骤12、将r+1赋值给r;并重复执行步骤8;Step 12, assign r+1 to r; and repeat step 8;

步骤13、从所述第x个预备组的候选用户V(x)中去除所述第x个分组,从而获得第x+1个预备组的候选用户V(x+1),此时,图2示例中候选用户为{9,10,11,12};Step 13, removing the xth group from the candidate user V (x) of the xth preliminary group, thereby obtaining the candidate user V (x+1) of the x+1th preliminary group, at this time, Fig. 2 The candidate users in the example are {9,10,11,12};

步骤14、将x+1赋值给x;并返回步骤1执行,从而得到X个分组,进而实现社交网络的朋友自动分组,在图2展示的示例中,应用本发明得到的朋友自动分组为{1,2,3,4,5,6,7,8}和{9,10,11,12}。Step 14, assign x+1 to x; and return to step 1 for execution, thereby obtaining X groups, and then realize the automatic grouping of friends in social networks. In the example shown in Figure 2, the automatic grouping of friends obtained by applying the present invention is { 1,2,3,4,5,6,7,8} and {9,10,11,12}.

Claims (2)

1.一种基于单步添加团的社交网络的朋友自动分组方法,其特征是按如下步骤进行:1. a kind of friend automatic grouping method based on the social network of single-step adding group, it is characterized in that carry out as follows: 步骤一、定义所述社交网络表征为二元组{V,E},V={v1,v2,…,vi,…,vn}表示所述社交网络中所有用户的集合,vi表示第i个用户;n为用户的总数;E={eij|i=1,2,…,n;j=1,2,…,n}表示任意两个用户之间的联系的集合;eij表示第i个用户vi与第j个用户vj之间的联系;若eij=1表示第i个用户vi与第j个用户vj之间有边相连,且第i个用户vi与第j个用户vj互为称为邻居用户;若eij=0,表示第i个用户vi与第j个用户vj之间无边相连,即不存在联系;Step 1. Define the social network representation as a binary group {V, E}, V={v 1 , v 2 ,...,v i ,...,v n } represents the set of all users in the social network, v i represents the i-th user; n is the total number of users; E={e ij |i=1,2,...,n; j=1,2,...,n} represents the set of links between any two users ; e ij represents the connection between the i-th user v i and the j-th user v j ; if e ij = 1, it means that there is an edge connection between the i-th user v i and the j-th user v j , and the i-th user The first user v i and the jth user v j are mutually called neighbor users; if e ij = 0, it means that there is no boundless connection between the i-th user v i and the j-th user v j , that is, there is no connection; 步骤二、采用基于单步添加团的重叠网络社团检测算法将所述社交网络G划分成k个分组集合,记为C={C1,C2,…,Cx,…,CX};Cα表示第x个分组;x=1,2,…,X;从而实现社交网络的朋友自动分组。Step 2. Divide the social network G into k grouping sets by adopting an overlapping network community detection algorithm based on single-step adding groups, denoted as C={C 1 ,C 2 ,...,C x ,...,C X }; C α represents the xth group; x=1,2,...,X; thereby realizing the automatic grouping of friends in the social network. 2.根据权利要求1所述的基于单步添加团的社交网络的朋友自动分组方法,其特征在于:所述步骤二中的基于单步添加团的重叠网络社团检测算法是按如下步骤进行:2. the friend automatic grouping method based on the social network of single-step adding group according to claim 1, it is characterized in that: the overlapping network community detection algorithm based on single-step adding group in described step 2 is to carry out as follows: 步骤0、初始化x=1;以所述社交网络的所有用户的集合V作为第x个预备组的候选用户集合,记为V(x);定义迭代变量t;定义迭代变量r;Step 0, initialization x=1; With the set V of all users of the social network as the candidate user set of the xth preliminary group, denoted as V (x) ; Define iteration variable t; Define iteration variable r; 步骤1、初始化t=1;Step 1. Initialize t=1; 步骤2、从所述第x个预备组的候选用户V(x)中随机选取第t次迭代的用户v(x)(t)Step 2, randomly selecting the user v (x)(t) of the tth iteration from the candidate user V (x) of the xth preliminary group; 步骤3、利用式(1)计算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)Step 3. Calculate the clustering coefficient G (x)(t) of the user v (x)(t) of the t-th iteration by using formula (1): GG (( xx )) (( tt )) == 22 mm vv (( xx )) (( tt )) sthe s vv (( xx )) (( tt )) (( sthe s vv (( xx )) (( tt )) -- 11 )) -- -- -- (( 11 )) 式(1)中,表示第x个预备组中第t次迭代的用户v(x)(t)的邻居用户的数量,表示第t次迭代的用户v(x)(t)的所有个邻居用户间的有边相连的边数;In formula (1), Denotes the number of neighbor users of user v (x)(t) at iteration t in the preparation group x, Denotes all The number of connected edges between neighboring users; 步骤4、利用式(1)计算第x个预备组中第t次迭代的用户v(x)(t)个邻居用户的聚类系数,并分别与算第t次迭代的用户v(x)(t)的聚类系数G(x)(t)比较,若能找到具有最大聚类系数且最大聚类系数大于G(x)(t)的邻居用户,则将所找到的邻居用户作为第x个预备组中第t+1次迭代的用户v(x)(t+1);并执行步骤5;否则,保留所述第t次迭代的用户v(x)(t)作为第x个预备组中的核心用户;Step 4. Use formula (1) to calculate the user v (x)(t) of the t-th iteration in the x-th preliminary group The clustering coefficients of neighboring users are compared with the clustering coefficient G (x)(t) of user v (x)(t) in the t-th iteration, if the largest clustering coefficient and the largest clustering can be found The neighbor user whose coefficient is greater than G (x) (t) , then the neighbor user found is used as the user v (x) (t+1) of the t+1 iteration in the xth preparation group; and perform step 5; Otherwise, retain the user v (x)(t) of the tth iteration as the core user in the xth preliminary group; 步骤5、将t+1赋值给t;并重复执行步骤3;Step 5. Assign t+1 to t; and repeat step 3; 步骤6、初始化r=1;Step 6, initialize r=1; 步骤7、找到第x个预备组中第t次迭代的核心用户v(x)(t)所连接的一个k团;所述核心用户v(x)(t)所连接的k团中的所有用户均为邻居用户;以所述核心用户v(x)(t)所连接的k团作为第x个预备组中第r次迭代的社团C(x)(r);k≥3;Step 7, find a k group connected by the core user v (x)(t) of the tth iteration in the xth preliminary group; all the k groups connected by the core user v (x) (t) The users are all neighbor users; the k group connected with the core user v (x) (t) is used as the community C (x) (r) of the rth iteration in the xth preliminary group; k≥3; 步骤8、根据式(2)计算第x个预备组中第r次迭代的社团C(x)(r)的社团适应度值F(x)(r)Step 8. Calculate the community fitness value F (x)(r) of the community C (x)(r) of the r-th iteration in the x-th preliminary group according to formula (2): Ff (( xx )) (( rr )) == KK ii nno (( xx )) (( rr )) (( KK ii nno (( xx )) (( rr )) ++ KK oo uu tt (( xx )) (( rr )) )) αα -- -- -- (( 22 )) 式(2)中,α是可调节的参数;分别表示第r次迭代初始社团C(x)(r)的内部度数和外部度数,内部度数为第r次迭代的社团C(x)(r)中所有用户间有边相连的边数的2倍;外部度数为第r次迭代的社团C(x)(r)中所有用户与外部用户有边相连的边数;In formula (2), α is an adjustable parameter; respectively represent the internal degree and external degree of the initial community C (x)(r) in the rth iteration, and the internal degree Twice the number of connected edges between all users in the community C (x)(r) of the rth iteration; the external degree is the number of edges connecting all users and external users in the community C (x)(r) of the rth iteration; 步骤9、找到第r次迭代的社团C(x)(r)中所有用户的邻居用户并进行并集处理,从而构成第x个预备组中第r次迭代的社团C(x)(r)的邻居用户;Step 9. Find the neighbor users of all users in the community C (x)(r) of the r-th iteration and perform union processing to form the community C (x)(r) of the r-th iteration in the x-th preliminary group neighbor users; 步骤10、判断所述第x个预备组中第r次迭代的社团C(x)(r)的邻居用户各自是否存在自身所连接的一个k团;若存在,则将邻居用户各自的所连接的一个k团分别加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;若不存在,则直接将相应的邻居用户加入到第r次迭代的社团C(x)(r)中计算相应的社团适应度值;Step 10, judging whether the neighbor users of the community C (x)(r) of the r-th iteration in the x-th preparation group have a k group connected to themselves; A k group of the r-th iteration is added to the community C (x)(r) of the r-th iteration to calculate the corresponding community fitness value; if it does not exist, the corresponding neighbor user is directly added to the r-th iteration of the community C ( Calculate the corresponding community fitness value in x)(r) ; 步骤11、若能找到使得所述社团适应度值F(x)(r)增值最大的邻居用户或邻居用户所连接的k团;则将增值最大的邻居用户或邻居用户所连接的k团加入到第r次迭代的初始社团C(x)(r)中,并作为第r+1次迭代的社团C(x)(r+1),执行步骤12;否则,保所述第x个预备组中第r次迭代的初始社团C(x)(r)作为第x个分组;并执行步骤13;Step 11. If it is possible to find the neighbor user or the k clique connected to the neighbor user that makes the community fitness value F (x)(r) increase the most; then add the neighbor user or the k clique connected to the neighbor user with the largest increase to the initial community C (x)(r) of the rth iteration, and as the community C (x)(r+1) of the r+1th iteration, perform step 12; otherwise, keep the xth preliminary The initial community C (x)(r) of the rth iteration in the group is used as the xth grouping; and step 13 is performed; 步骤12、将r+1赋值给r;并重复执行步骤8;Step 12, assign r+1 to r; and repeat step 8; 步骤13、从所述第x个预备组的候选用户V(x)中去除所述第x个分组,从而获得第x+1个预备组的候选用户V(x+1)Step 13, removing the xth group from the candidate user V (x) of the xth preliminary group, thereby obtaining the candidate user V (x+1) of the x+1th preliminary group; 步骤14、将x+1赋值给x;并返回步骤1执行,从而得到X个分组,进而实现社交网络的朋友自动分组。Step 14. Assign x+1 to x; and return to step 1 for execution, so as to obtain X groups, and then realize the automatic grouping of friends in social networks.
CN201610338452.XA 2016-05-18 2016-05-18 A method for automatic grouping of friends in social networks based on single-step addition of groups Active CN106055568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610338452.XA CN106055568B (en) 2016-05-18 2016-05-18 A method for automatic grouping of friends in social networks based on single-step addition of groups

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610338452.XA CN106055568B (en) 2016-05-18 2016-05-18 A method for automatic grouping of friends in social networks based on single-step addition of groups

Publications (2)

Publication Number Publication Date
CN106055568A true CN106055568A (en) 2016-10-26
CN106055568B CN106055568B (en) 2019-06-28

Family

ID=57176615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610338452.XA Active CN106055568B (en) 2016-05-18 2016-05-18 A method for automatic grouping of friends in social networks based on single-step addition of groups

Country Status (1)

Country Link
CN (1) CN106055568B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978705A (en) * 2019-02-26 2019-07-05 华中科技大学 Combo discovering method in a kind of social networks enumerated based on Maximum Clique
CN110287237A (en) * 2019-06-25 2019-09-27 上海诚数信息科技有限公司 An Efficient Community Data Mining Method Based on Social Network Structure Analysis

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209999A1 (en) * 2004-03-19 2005-09-22 Kenny Jou Systems and methods for class designation in a computerized social network application
CN101227422A (en) * 2007-11-26 2008-07-23 腾讯科技(深圳)有限公司 Method and system for locating linkman locality grouping
CN101344940A (en) * 2008-08-21 2009-01-14 魏芳 Network overlapped corporation detection method based on global partition and local expansion
CN101887573A (en) * 2010-06-11 2010-11-17 北京邮电大学 Method and system for social network clustering association analysis based on core points
CN102347917A (en) * 2011-11-04 2012-02-08 西安电子科技大学 Contact semantic grouping method for network message communication
CN102611588A (en) * 2012-03-28 2012-07-25 西安电子科技大学 Method for detecting overlapped community network based on automatic phase conversion clustering
CN102662964A (en) * 2012-03-05 2012-09-12 北京千橡网景科技发展有限公司 Method and device for grouping friends of user
CN102930362A (en) * 2012-09-17 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for grouping contact persons in address list and mobile terminal
CN103345531A (en) * 2013-07-26 2013-10-09 苏州大学 Method and device for determining network community in complex network
CN103400299A (en) * 2013-07-02 2013-11-20 西安交通大学 Method for detecting network overlapped communities based on overlapped point identification
CN103426042A (en) * 2012-05-15 2013-12-04 腾讯科技(深圳)有限公司 Method and system for grouping in social network
CN103870547A (en) * 2014-02-26 2014-06-18 华为技术有限公司 Grouping processing method and device of contact persons
CN104021233A (en) * 2014-06-30 2014-09-03 电子科技大学 Social network friend recommendation method based on community discovery
CN104199964A (en) * 2014-09-19 2014-12-10 大连民族学院 Information processing method and information processing device
CN104731962A (en) * 2015-04-03 2015-06-24 重庆邮电大学 Method and system for friend recommendation based on similar associations in social network
CN104854889A (en) * 2013-05-02 2015-08-19 东莞宇龙通信科技有限公司 Terminal and method for grouping contact persons
CN105045833A (en) * 2015-06-30 2015-11-11 北京嘀嘀无限科技发展有限公司 Classification method and apparatus for user friend relations

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209999A1 (en) * 2004-03-19 2005-09-22 Kenny Jou Systems and methods for class designation in a computerized social network application
CN101227422A (en) * 2007-11-26 2008-07-23 腾讯科技(深圳)有限公司 Method and system for locating linkman locality grouping
CN101344940A (en) * 2008-08-21 2009-01-14 魏芳 Network overlapped corporation detection method based on global partition and local expansion
CN101887573A (en) * 2010-06-11 2010-11-17 北京邮电大学 Method and system for social network clustering association analysis based on core points
CN102347917A (en) * 2011-11-04 2012-02-08 西安电子科技大学 Contact semantic grouping method for network message communication
CN102662964A (en) * 2012-03-05 2012-09-12 北京千橡网景科技发展有限公司 Method and device for grouping friends of user
CN102611588A (en) * 2012-03-28 2012-07-25 西安电子科技大学 Method for detecting overlapped community network based on automatic phase conversion clustering
CN103426042A (en) * 2012-05-15 2013-12-04 腾讯科技(深圳)有限公司 Method and system for grouping in social network
CN102930362A (en) * 2012-09-17 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for grouping contact persons in address list and mobile terminal
CN104854889A (en) * 2013-05-02 2015-08-19 东莞宇龙通信科技有限公司 Terminal and method for grouping contact persons
CN103400299A (en) * 2013-07-02 2013-11-20 西安交通大学 Method for detecting network overlapped communities based on overlapped point identification
CN103345531A (en) * 2013-07-26 2013-10-09 苏州大学 Method and device for determining network community in complex network
CN103870547A (en) * 2014-02-26 2014-06-18 华为技术有限公司 Grouping processing method and device of contact persons
CN104021233A (en) * 2014-06-30 2014-09-03 电子科技大学 Social network friend recommendation method based on community discovery
CN104199964A (en) * 2014-09-19 2014-12-10 大连民族学院 Information processing method and information processing device
CN104731962A (en) * 2015-04-03 2015-06-24 重庆邮电大学 Method and system for friend recommendation based on similar associations in social network
CN105045833A (en) * 2015-06-30 2015-11-11 北京嘀嘀无限科技发展有限公司 Classification method and apparatus for user friend relations

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978705A (en) * 2019-02-26 2019-07-05 华中科技大学 Combo discovering method in a kind of social networks enumerated based on Maximum Clique
CN110287237A (en) * 2019-06-25 2019-09-27 上海诚数信息科技有限公司 An Efficient Community Data Mining Method Based on Social Network Structure Analysis
CN110287237B (en) * 2019-06-25 2021-07-09 上海诚数信息科技有限公司 A community data mining method based on social network structure analysis

Also Published As

Publication number Publication date
CN106055568B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN107291945B (en) High-precision clothing image retrieval method and system based on visual attention model
CN103699617B (en) A kind of community discovery method based on random walk
CN104933624A (en) Community discovery method of complex network and important node discovery method of community
CN103426042A (en) Method and system for grouping in social network
CN104199969B (en) Web data analysis method and device
CN105335524B (en) A kind of graph search method applied to extensive irregular eutectic data
CN103400299B (en) Method for detecting network overlapped communities based on overlapped point identification
CN115114484A (en) Abnormal event detection method and device, computer equipment and storage medium
CN110765582A (en) Scenario division method of self-organizing center K-means microgrid based on Markov chain
CN102819611B (en) Local community digging method of complicated network
CN110263260A (en) A kind of community detection method towards social networks
CN107578136A (en) Overlapping Community Discovery Method Based on Random Walk and Seed Expansion
CN104317908A (en) Outlier detection method based on three-way decision and distance
CN106055568A (en) Automatic friend grouping method for social network based on single-step association adding
CN108830307A (en) A kind of Combo discovering method of k- core covering
CN108287866A (en) Community discovery method based on node density in a kind of large scale network
CN108319677A (en) The alignment schemes of the cyberrelationship figure of dynamic change
CN114925217A (en) High-value path discovery method based on relational attribute weighting
CN104573036A (en) A Distance-Based Algorithm for Solving Representative Node Sets in Two-Dimensional Space
CN107332687B (en) A Link Prediction Method Based on Bayesian Estimation and Common Neighbors
CN107018027B (en) Link prediction method based on Bayesian estimation and common neighbor node degree
CN115130044B (en) A method and system for identifying influential nodes based on second-order H-index
CN105897469A (en) Fault detection method and fault detection device for wireless sensor network
TWI524695B (en) Node-based sequential implicit enumeration method and system thereof
CN107622449A (en) A Community Discovery Method Based on Weighted Modularity

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