An ATM Knowledge Graph-Based Method of Dynamic . . .
491
Fig. 3. The graph can be changed to fuse various kinds of data dynamically according
to the need. a Add new node and edges. b Remove old node and edges.
can use degree distribution, average path length, and clustering coefficient index
to describe the characteristic of the graph in the future.
Besides, we consider the graph as a dynamic change graph, as shown in Fig. 3,
new nodes and edges can be added into the graph at any time. Also, old nodes
can be removed from the graph along with the related edges.
3.2 Breadth-First and Depth-First Search-Based Correlation
Analysis Method
Based on the ATM knowledge graph, we try to do some correlation analysis with
breadth-first and depth-first search in the graph.
For the breadth-first search, we can get the relevant features of the searched
feature. Algorithm 1 shows the overall process of the breadth-first search.
Algorithm 1 Breadth-first search method
1: Function BFS (center node, distance):
2: Initialize a queue q and a list result list;
3: q.push back(center node);
4: center node.distance = 0;
5: while q is not empty do
6:
first node = q[0];
7:
if first node.distance > distance then
8:
break;
9:
end if
10:
first node.visited flag = true;
11:
result list.push back(first node)
12:
q.pop front();
13:
Get all the adjacent nodes of first node and put them in a temporary list adjacent list;
14:
for each adj node in adjacent list do
15:
if adj node.visited flag is not true then
16:
adj node.distance = first node.distance + 1;
17:
q.push back(adj node);
18:
end if
19:
end for
20: end while
21: return result list;
491
Fig. 3. The graph can be changed to fuse various kinds of data dynamically according
to the need. a Add new node and edges. b Remove old node and edges.
can use degree distribution, average path length, and clustering coefficient index
to describe the characteristic of the graph in the future.
Besides, we consider the graph as a dynamic change graph, as shown in Fig. 3,
new nodes and edges can be added into the graph at any time. Also, old nodes
can be removed from the graph along with the related edges.
3.2 Breadth-First and Depth-First Search-Based Correlation
Analysis Method
Based on the ATM knowledge graph, we try to do some correlation analysis with
breadth-first and depth-first search in the graph.
For the breadth-first search, we can get the relevant features of the searched
feature. Algorithm 1 shows the overall process of the breadth-first search.
Algorithm 1 Breadth-first search method
1: Function BFS (center node, distance):
2: Initialize a queue q and a list result list;
3: q.push back(center node);
4: center node.distance = 0;
5: while q is not empty do
6:
first node = q[0];
7:
if first node.distance > distance then
8:
break;
9:
end if
10:
first node.visited flag = true;
11:
result list.push back(first node)
12:
q.pop front();
13:
Get all the adjacent nodes of first node and put them in a temporary list adjacent list;
14:
for each adj node in adjacent list do
15:
if adj node.visited flag is not true then
16:
adj node.distance = first node.distance + 1;
17:
q.push back(adj node);
18:
end if
19:
end for
20: end while
21: return result list;
