• 沒有找到結果。

3. System Architecture

3.2 CSHD Hierarchical Division Algorithm

3.2.2 Method

I. CSHD process flowchart

The Figure 3-3 shows the CSHD processing flowchart, there are three parts, including multiple relationships social network transform to multiple dimension space and list all CNETs, determining the relationship between CNETs in the same level and finding the node that not in communities and determine it.

Figure 3-3. CSHD DFD

A. Multiple relationship social network transform to multiple dimension space and list all CNETs

In the thesis, the multiple relationship social networks transform to multiple dimension space. Now, there are two relationships are the X bar and Y bar as shown in Figure 3-4. Then, this approach list all CNETs in dynamic social network and show in Figure 3-5.

Figure 3-4. Multiple relationship social network transform to multiple dimension space

Figure 3-5. List all CNETs B. List all CNETs process flowchart

Clam 1: the complete graphs have more than n nodes, and a complete graph must have a three nodes.

According to Theory 1, the maximal cliques are listed as CNET1, CNET2…CNETX in the dynamic social network. Because of the complete graph is NP problem. So, finding the optimal maximal complete graphs based on complete graphs.

There is strong connection with each other nodes in the complete graph. The Figure 3-6 show finds the optimal maximal complete graphs process.

Figure 3-6. List all CNETs DFD

C. Determine the relationship between CNETs in the same Level

In the first step, the dynamic social network is divided into a hierarchy of cells in which each cell at any intermediate level is divided into a 2*2 grid of four equal-size sub-cells at the next lower level. The partitioning procedure proceeds until the cell size at the bottom level within the minimum distinguishable unit of the dynamic social network as shown in Figure 3-7.

Figure 3-7. Hierarchy cell

The second step lists all CNETs. There are four cases between any two CNETs as shown in Figure 3-8. The first case (case A) shows overlapping at the same level in different cell between two CNETs. The second case (case B) presents overlapping at the same level in the same cell between two CNETs. The third case (case C) shows the separation at the same level in the same cell between two CNETs. The last case (case D) presents the separation at the same level in different cell between two CNETs.

Figure 3-8. The relationship between CNETs

In third step, the approach checks whether there is any overlap between CNETs in same level. If there is overlapping and the tow condition is satisfied, the proposed approach merges the community; otherwise, each CNET could be a community. The propose approach merge CNETs with satisfy the following two conditions:

(i) The first one is the number of common nodes CN, where CN= V*α, V is the current total number of nodes, α=2/v, v is the total number of nodes initially.

When we construct a community between two cliques with one common node compared with the two or more than two common nodes, their relationship is a relatively weak community.

(ii) The second condition is the distance between CNETs D, where 0 ≦D≦

[V*α]+[N*β], N is the current dynamic social network range. The β=1/n, n is

the dynamic social network range initially. The distance between the two cliques is 1 composed of a community compared with the distance between the cliques more than one; therefore, the relationship is a strong community.

As new nodes joining, the dynamic social network continues to expand its scope without changing α and β. Only the total number of nodes (V) and the range (N)

of the dynamic social network are changed.

In the final step, the proposed approach identifies the node which cannot be included in any CNET, and determines its belonging community by the location function.

The proposed algorithm is illustrated by the following example. Assume that the grid size of dynamic social network is 8 * 8, the initial total number of nodes is 19, the smallest unit of a coordinate system is 2s, therefore, the number of division is3 ([(log24/21)]). When there is no new joining nodes, if two cliques tries to merge, they have to satisfy the conditions: the common nodes CN equals to V*2/19, and the distance D between CNETs satisfies 0≦D≦[V*2/19]+[N*1/8].

Figure 3-9. First division

In the first division, the hierarchy cell of a 2*2 grid is shown in Figure 3-9, Due to CNETD and CNETE satisfy the two conditions with two common nodes and 0≦D

≦2(0≦D≦[19*2/19]+[8*1/8]). Therefore, we merge CNETs to a community and

shown in Table 3-1. The relationship between CNETA and CNETB; CNETG and CNETH; CNETH and CNETI are case B. The relationship between CNETC and CNETE; CNETE and CNETD are case A. The relationship between CNETA and CNETC; CNETF and CNETG; CNETF and CNETH; CNETF and CNETI are case C. The relationship between CNETA and CNETF; CNETA and CNETG and so on are case D.

Table 3-1. First division community

In the second division, the hierarchy cell of a 4*4 grid is shown in Figure 3-10.

Due to CNETG and CNETH; CNETH and CNETI satisfy the two conditions in which two common nodes and 0≦D≦2(0≦D≦[19*2/19]+[8*1/8]).And merge CNETs to a

community and shown in Table 3-2.

Figure 3-10. Second division Table 3-2. Second division community

In the third division, the hierarchy cell of a 8*8 grid is shown in Figure 3-11.Due to CNETA and CNETB;CNETD and CNETE;CNETH and CNETI satisfy the two

conditions in which two common nodes and 0 ≦ D ≦ 3(0 ≦ D ≦

[19*2/19]+[8*1/8]).And merge CNETs to a community and shown in Table 3-3.

Figure 3-11. Third division Table 3-3. Third division community

D. Finding nodes without communities

The last step, we find the node that not in Communities that is v6, v7 and v16.

Due to the node of v6 connect to community D and E. Therefore, the node of V6 is assigned to the community D and E. The node of v7 connect to community D and E, community H and I. Due to the distance between node v7 (6, 3) and community D and E(4, 4) is 5, and the other is 13. Therefore, node v7 is assigned community D and E.

Due to the node of v16 connects to community H and I. Therefore, the node of v16 is assigned to the community H and I.

The community detection generated close degree tables as shown in Table 3-4,Table 3-5 and Table 3-6. In the first division, the community A, B and C are in the same community, and the close degree is 1. In the second division, the community A, B and C is separate two communities. The community C close degree value is 1. The community A and B close degree value is 2.In the third division, the community A and B still closely and the value of close degree is 3. Therefore, we can observe the relationships between communities by this table, and analyze user behavior in order to predict future community behavior.

The pseducode of the proposed CHSD algorithm is show in the next page

Table 3-4. First division close degree

Table 3-5. Second division close degree

Table 3-6. Third division close degree

Algorithm: CSHD Algorithm

Input: People (Nodes) in Multiple Relationship Social Network ( Node ∈ SN ) Output: Community in Multi‐relationship Social Network

Begin

Multi-relationship Social Network transform to multiple dimension space To list CNETs in multiple dimension space

While(∀ Node ∈ SN ) If(Have Complete Figure)

Save to CNET End if

End While

Determine the relationship between CNETs in the same Level Multiple Relationship Social Network cut 2*2 cell

Value Search Level = [log(R/ ω)]

For (Determine Level is 1; Determine Level < Search Level; Determine Level ++)

Value V is current all of Node count;

Value D is distance between CNETs Value α is 2/v(the initial total nodes)

Value β is1/n(the initial dynamic social network range)

If(CNET’s Level in the Determine Level & Have the same Node of the N number & Value D between 0 and [V*α]+[N*β])

CNETs is the same Community End if

The cell cut 2*2 cells End for

Determine the Node that not in Communities relationship Nodes are the Set that the node is not in Communities;

Foreach(Node in Nodes )

Array Dists is Distance between Node and CNETs Foreach(Dist in Dists)

Find the Minimum Dist with the Communities Node and the community are the same community End Foreach

End Foreach END

相關文件