# Research on the Prediction of Operator Users' Number Portability Based on Community Detection
## 2 Modeling and Experiment Comparison
### Build a Community Detection Network  
When we tried to address the user location attribute in this project, we found that because the words in the document and the nodes in the social network share statistical consistency, the idea of Word2 Vec could be transferred to the network embedding application [13]. Therefore, in this paper, we tried to combine the geographic attribute of telecom users with the network embedding method. Under the condition of limited customer characteristics, the existing regional characteristics of customers were integrated, the transformation was brought closer to reality on the basis of the traditional community network, and a multilayer community network model was built [14]. **Definition 1** (Single-layer network): _A single-layer network can be formalized as in Figure 3. Assuming the graph \(G=G\) (\(V\), \(E\)), where \(V\) represents a vertex (usually, a vertex represents an individual), and \(E\) represents a connection between vertices, indicating the existence of a certain connection between two individuals._  
Figure 2: Flowchart of Word2 Vec feature processing. A community network means that graph 'G' is composed of 'n' communities 'C', among which:  
\[\text{G}=\text{C}_{1}+\text{C}_{2}+\text{C}_{3}+\ldots+\text{C}_{n}\]  
**Definition 2** (Multilayer Network). : _A multilayer network can be defined as \(G_{M}=\{G_{1},\,G_{2},\,\ldots,\,G_{L},\,E_{M}\}\). Using Figure 4 as an example, \(L\) is the total number of layers and \(E_{M}\) is the set of edges between layers, (\(L=2\), \(E_{M}=\{Edge\,VI,\,Edge\,VII\}\)), \(G_{i}=(V_{i},\,E_{i})\) is the network at layer \(i\), where the set of nodes at layer \(i\) is \(V_{i}\subseteq V\), \(V\) is the set of all nodes in a multilayer network (\(V=\{V_{1},\,V_{2},\,\ldots,\,V_{N}\}\), \(V_{1}=\{A,\,B,\,C\}\)). \(E_{i}\subseteq{V_{i}}^{*}\,V_{i}\), is the set of edges in the \(i\)-th layer network (\(E_{1}=\{Edge\,I,\,Edge\,II\}\))._  
On the basis of the information presented above, and according to the actual situation of the operator, we introduced the auxiliary node to enable the community network to be understood better (as shown in Step 2). The regional network features were extracted from the established community network model through an improved method (as shown in Table 2) and added to the original feature set to optimize the classification model, improving the identification accuracy of customers leaving the network, and providing technical support for returning customers. Figure 4: General multilayer network diagram. Figure 3: General single-layer network diagram. Figure 5 shows the layout of the multilayer community network constructed in this paper. The specific method applied includes the following steps:  
Step 1: Initialize the data grid dictionary to store and output user geographic data. The user data grid inputted based on dictionary rules (a set of conventions used to define the structure and content of a dictionary) refers to the user's regional features. Initialize each data grid dictionary, traverse each data grid and the name in it, add the formatted user grid data to the cache, and output the data grid dictionary. In the context of community detection, a data grid dictionary can be used to represent the adjacency matrix of a network, where the keys represent the nodes, and the values represent the edges between them [15]. Step 2: Construct a new multilayer community network model of telecom users. Iterate over all the users, divide the grid based on their geographic attributes, and create a new node for each user based on their unique identity. For example, if we consider Grid 3_1 as area-A, then, the circular nodes in Grid 3_1 can represent all users living in area-A, and all users living in area-B are in another small grid, Grid 3_2, with no intersection between the grids. Step 3: In addition to the traditional community network, in this project, we add auxiliary nodes based on the actual situation.