# A Hierarchical Mapping System for Flat Identifier to Locator Resolution Based on Active Degree
## 3 Mapping Items Flow Mechanism
### Mapping Item Query and Lifting Mechanism  
When the endpoint A (AID\({}_{\text{a}}\)) launches a communication to endpoint B (AID\({}_{\text{b}}\)), the access router of A needs query mapping information about B. Meanwhile, in order to avoid the access router of B querying the mapping information of A, A sends its own mapping information to B in the first communication. The main process of query mapping information is shown in Figure 4. The process includes six steps:  
_Step 1_: The access router sends a request to AMS for querying the relevant mapping items of AID\({}_{\text{b}}\);  
_Step 2_: It queries the relevant mapping items using the key AID\({}_{\text{b}}\) in ARMT of AMS. If successful, the value of F in the mapping items should be updated according to Formula (1), and returns the result;  
_Step 3_: AMS sends a query request to the corresponding NMS;  
_Step 4_: It queries the mapping of AID\({}_{\text{b}}\) in NRMT, if successful, the value of F in the mapping items should be updated according to Formula (1), and it starts the mapping item lifting mechanism mentions next in this Section, and returns the result;  
_Step 5_: NMS sends a query request to IMS;  
Figure 3: Mapping item initialization, update, and policy report (PR).  
_Step_: It queries the mapping of AID\({}_{\text{b}}\) in IMS, and adds the corresponding item in relevant NRMT, and returns the result; otherwise, the query fails (the intended user does not exist).  
It should be noted that once a unit of time \(\Delta\text{T}\) has passed, items in AMS and NMS should update their activity according to Formula (1). This allows the previously often used mapping item exit the current level when it is now no longer often used, as to avoid data contamination.  
The above-mentioned mapping items lifting mechanism decides how the mapping items flow up and down in HMAA according to their usage. It relates to these two levels: active local level and neutral transfer level. There are two different situations: (1) mapping items move from inert global level to neutral transfer level; and (2) the activity of mapping items is high enough and triggers the move from the neutral transfer level to active local level.  
We assume the minimum activity value of mapping items in an NMS at the neutral transfer level is \(F_{\text{rmin}}\), and the maximum value is \(F_{\text{rmax}}\). The minimum activity value of mapping items in an NMS at the active local level is \(F_{\text{rmin}}\), and the maximum value is \(F_{\text{rmax}}\). The above values are local property, that is, they are only valid for one mapping server.  
For case (1), in order to ensure the mapping items at the neutral transfer level are not deleted too quickly, set the element \(F\) of mapping items as \(F_{\text{rmax}}/2\).  
For case (2), assuming the number of AMS, which one NMS serves, is \(n\). To map an item in NRMT, if (\(F_{i}>n*F_{\text{rminin}}\)), then put the mapping item into the corresponding AMS and set the activity value as \(F_{\text{rmax}}/2\); move the mapping item with the smallest activity value from AMS to NRMT, and set the activity value as \(F_{\text{rmax}}/2\).  
The mapping item mentioned above moves from the low level to the high level. Conversely, if a mapping item (AID, RID, F) has a low query activity and other items need to enter the server, the AMS reports the mapping item to the corresponding NMS, and the NMS directly deletes the mapping item. Of course, it needs to report the address changes of the cache to the IMS.