## 4 An Architecture for IoT and Multimedia Data Handling
### Downstream Data Flow Management
#### 4.1.4 Content Access Mechanism  
The contents are accessed from Tier 1 devices. We classified the end-users into two categories: (1) Static or mobile end-users, and (2) end-users based on the content generator and consumer as we discussed before. Most of the IoT and IIoT devices are the content generators. The content consumers generate the content request packet and send it to the nearby connected devices. To describe the detailed content access mechanism, let us consider the Table 1 variable sets for including the definitions and notations. We use a set of EC types, \(\varepsilon\), in Tier 2 to provide the benefits of cloud computing and caching in the edge on the core and access network devices. All devices have the caching capabilities in Tier 2 and only EC has the computing capabilities. The combined caching resources of Tier 2 is CRL2. The list of the eNBs of Tier 2 is defined as \(L_{eNB}\). The Tier 2 devices are the neighbor device of Tier 1 devices. The velocity of Tier 1 mobile devices is V\({}_{\text{m}}\). The tier devices request \(\xi\) types of contents. The components of each content are defined as \(\mu_{i}\) = {\(\beta\), \(P_{C}\), \(t_{H}\), \(C_{R}\)}, where \(i\)\(\epsilon\)\(\xi\), \(\beta\) is the size of the content, \(P_{C}\) defines the content popularity, \(t_{H}\) is the last content hit or access time, and \(C_{R}\) indicates any types of computing requirements for the content. Figure 8: Enhanced hash caching. Figure 7: Problem with hash caching. An end-user sends a content request message for a type of content that is available in Tier 4, Tier 3, Tier 2, or the neighboring devices. The underlying communication technologies help the end-user to communicate with other devices. Generally, the Tier devices are directly connected to the Tier 2 devices. Therefore, the content request message is forwarded to Tier 2 devices. The content request message may be served by any Tier devices and the content will be forwarded to the content requester following the reverse path of the content request message. The served content is cached based on the content popularity mechanism that was described in Algorithm 2. There are enough caching resources in \(l_{2}\), and \(l_{2}\) is located at one-hop distance from the end-users. Therefore, we optimize the use of caching resources of corresponding \(l_{2}\) devices. Let \(P_{i,j}\) denotes the allocated caching resource, \(j\) on corresponding \(l_{2}\) devices for incoming content \(i\), where \(i\in\xi,j\in l_{2}\), and \(\varsigma\in l_{2}\). Considering the storage limitations in the \(l_{2}\) devices except for \(\varsigma\), the caching resources of \(\varsigma\) cover the storage limitations. The computing resources of \(\varsigma\), \(\Psi_{i,j}\) is allocated to the computing resource, \(j\) on the corresponding \(\varsigma\) for incoming content \(i\), where \(i\in\xi,j\in\varsigma\). To minimize the average latency [37] of the contents downloading process, we formulate our efficient caching mechanism based on Equation (1). \[\min_{\{P_{i,j},\,\forall\,\
u_{i,j}\}}\sum_{i=1}^{\xi}P_{c_{i}} \sum_{j=1}^{\eta_{\varsigma}^{max}}\Big{\{}\Big{(}\frac{\Gamma_{m}}{V_{m}\tau _{m}}-P_{i,j}\Big{)}\tau_{cs}+\psi_{i,j}\tau_{R}+P_{i,j}\tau_{m}\Big{\}}{\xi}, \tag{1}\]  
where \(\tau_{m}\), \(\tau_{R}\), and \(\tau_{cs}\) definitions are defined in Table 1. The distance between the Tier 4 devices and Tier 1 devices are long. Therefore, \(\tau_{cs}>\tau_{m}\) and the required computing time, \(\tau_{R}\), depends on the types of computing algorithm and the size of the content. If mobility occurs in the mobility supported devices in Tier 2 during the content access, then the contents are cached into multiple mobility supported