# A Method for 5G-ICN Seamless Mobility Support Based on Router Buffered Data
## 4 Dynamic Buffer Resource Allocation Strategy  
In order to optimize the overall performance loss across all mobile data flows in the network, inspired by literature [38; 39], we designed a dynamic buffer resource allocation strategy (DBRAS). This strategy comprehensively considers three factors: the status of the mobile buffer, the transmission rate of the mobile data flow, and the business category of the mobile data flow. Referring to [39], we divide a buffer with fixed resources into \(G\) virtual partitions according to the business type. We define \(VP_{i}\) as the \(i\)-th virtual partition, and define \(T_{i}\) as the threshold of \(VP_{i}\). If \(B\) is the total buffer resource and \(G\) is the total business category, then \(B=\sum_{i=1}^{G}T_{i}\). The threshold \(T_{i}\) is related to different types of business traffic and business priorities, so \(T_{i}\) is redefined as shown in Formula (1). \[T_{i}=\frac{\theta_{i}\times B}{\sum_{j=1}^{G}\theta_{j}} \tag{1}\]  
In the Formula (1), \(\theta_{i}\) is the coefficient of virtual partition \(VP_{i}\), which follows Pareto distribution. The calculation formula of \(\theta_{i}\) is as follows. \[\theta_{i}=\left(priority_{i}\right)^{2}\times percent_{i} \tag{2}\]  
Among them, \(priority_{i}\) (\(0<priority_{i}\leq 1\)) is the priority of the \(i\)-th type of business traffic. For the highest priority category, the priority is equal to \(1\). \(percent_{i}\) is the proportion of the \(i\)-th type of business traffic. Business traffic changes dynamically over time, so virtual partition thresholds need to be updated regularly. It can be seen from Formula (2) that we need to regularly calculate the proportion of different types of business traffic. Let \(S_{i,n}\) represent the number of packets received by the \(i\)-th virtual partition in the \(n\)-th statistical period. The formula for calculating the proportion \(percent_{i,n}\) of the \(i\)-th type of business traffic in the \(n\)-th statistical period is:  
\[percent_{i,n}=\frac{S_{i,n}}{\sum_{j=1}^{G}S_{j,n}} \tag{3}\]  
In the mobile buffer, we create a buffer queue for each mobile data flow. Virtual partition \(VP_{i}\) maintains information related to the buffer queue of mobile data flows belonging to business type \(i\). \(\{q_{i,1},q_{i,2},\ldots,q_{i,F}\}\) is the buffer queue set in virtual partition \(VP_{i}\), and \(q_{i,k}\) is the identifier of the buffer queue of the mobile data flow \(Flow_{k}\) in the virtual partition \(VP_{i}\). This identifier can be jointly identified by the source EID and destination EID of the mobile data flow. The buffer queue information includes its length, the total number of received packets, and the total number of discarded packets. \(l_{i,k}\) is the length of the buffer queue \(q_{i,k}\). \(\sigma_{i,k}\) is the total number of packets received by the buffer queue \(q_{i,k}\). \(d_{i,k}\) is the total number of packets dropped by the buffer queue \(q_{i,k}\). The total queue length \(Q_{i}\) of virtual partition \(VP_{i}\) is calculated by Formula (4). \[Q_{i}=\sum_{k=1}^{F}l_{i,k} \tag{4}\]  
Assuming \(Q\) is the total queue length of \(G\) virtual partitions, then the \(Q\) calculation formula is as follows. \[Q=\sum_{i=1}^{G}Q_{i} \tag{5}\]  
DBRAS is related to the status of the mobile buffer. After receiving the packet, the mobile buffer decides whether to buffer the packet based on the current status. If \(Q<B\), we call the buffer state the allowed state, and the packet is allowed to be added to the buffer. If \(Q\geq B\), we call it a diagonal state, and a replacement or discard operation will occur. \[\left\{ \begin{array}{l}Q<B,\,\textit{allow status}\\ Q\geq B,\,\textit{diagonal state}\end{array} \right. \tag{6}\]  
To implement dynamic resource allocation strategies, a set of primitive operations is defined. At any time, the basic operations that can be taken include join operations, replace operations, and drop operations. Typically, such an action can be taken at any time.