## 4 Proposed Local ID Mapping Scheme
### Topology-Based Local ID Mapping Algorithm  
The proposed local ID mapping scheme creates a topological fingerprint (TF) for an object that can represent its uniqueness. If TFs for objects with different local IDs are identical, then it can be concluded that the objects are the same.  
Figure 5 presents the flowchart for creating TFs for power system resources in a system and the resulting local ID-TF mapping table. Firstly, the algorithm loads all power system resources from the database of a system and creates objects for the resources using CIM. With the help of the CIM concept, all the objects can be considered from a standard point of view in terms of semantics so that the objects with different data semantics are unified. Then, a graph structure with node(i) as the root and edges is created. A node can be any type of conducting equipment (CEQ) such as a switch and line segment, whereas an edge is composed of terminals (Ts) and a connectivity node (CN) since the CIM-based topology can be represented by the node-breaker connectivity representation such as CEQ-T-CN-T-CEQ as illustrated in Figure 6. For the graph created, sorting is conducted and it is noted that a single common sorting rule should be applied to every graph because sorted graphs using different rules for the same topology cannot result in the same TF. In this paper, the following instructions are utilized for the common sorting rule.  
* A node with more child nodes is sorted to the left;
* A node with greater depth is sorted to the left.  
Once a graph structure is generated and sorted by the common rule, a TF(i) for a node(i), defined by a serialized string containing topological information for a node(i), is created. The TF is determined by the depth-first graph search (DFS) and the number of child nodes. It is worth mentioning that a common search rule, DFS used in this paper, should be applied to every graph as in the sorting rule. The number of child nodes for a node is used as a part of the TF and the whole TF is serialized as a combination of integer values according to the search order. The derived TF represents a distinguishable graph structure (fingerprint) for an arbitrary node (object or equipment). Figure 7 shows an example of the TF generation for a sample graph structure. Once a graph for node(i) is sorted by the common rule, it calculates the number of child nodes of node(i) as '1' since node(i) is root one and stores the value at the TF. Then, it goes to the next node (A) following the DFS algorithm, and '3' is calculated and stored because node A has three child nodes.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Challenges** & **Global Uniqueness of IDs** & **Mapping of Different Local IDs** \\ \hline \multirow{2}{*}{Description} & Duplicated IDs for different & Different local IDs for the same \\  & power system resources & power system resource \\ \hline \multirow{2}{*}{Solution} & Introduction of UUID managed & Introduction of a fast and efficient \\  & by a single authority & local ID mapping scheme \\ \hline \hline \end{tabular}
\end{table}
Table 1: Summary of identifier-related challenges.  
Similarly, other integer values are calculated and stored at TF for every search until the search is ended.  
Figure 5: Flowchart for creating local ID-TF mapping table.  
Figure 6: Connectivity model in CIM and a graph structure representation.  
Figure 7: An example of the TF generation for a sample graph structure.  
The algorithm in Figure 5 iterates until TFs are derived for all nodes in a graph. Then, a mapping table with local ID-TF pairs for all the objects is created. The algorithm can be applied to another system, resulting in a new mapping table. Different local IDs for the same object can be mapped by selecting IDs with the same TF. Figure 8 indicates a case with different sorting rules applied to the same graph structure. Although the graph has the same topology, different TFs are derived. Therefore, it should be ensured that the common rule is applied to a graph when the graph is sorted.