# Real-Time Evaluation of the Improved Eagle Strategy Model in the Internet of Things
## 4 Case Study  
The IoT is the foundation of the Smart Toilet system, which was developed to collect real-time data from sensors installed in toilet facilities to improve the efficiency with which toilet cleaning resources and peripherals are sourced. Figure 11 shows the overall architecture of a Smart Toilet, where the sensors are connected to the IoT device to get information and prompt the WS. There are three phases of Smart Toilet systems, namely (1) the Sensory Phase, (2) the Cloud Management Phase, and lastly, (3) Mobile Application and Web Development [38]. The sensory phase is where the IoT programming and sensor installation occurs. Figure 12 illustrates the electrical diagram of the Smart Toilet system, where the sensors are connected to the IoT device to get information and prompt the WS. \begin{table}
\begin{tabular}{p{34.1 pt}} \hline \hline
**Algorithm of Improved Eagle Strategy** \\ \hline
1: _Set initial population size to 5824._ \\
2: _Set initial lowest cluster similarity score to 0._ \\
3: _Choose a service randomly and get its similarity score with the user’s requirement._ \\
4: _Divide the population into 4 clusters using the k-means algorithm._ \\
5: _Get the user requirement and iterate over each cluster._ \\
6: _If similarity score is less than 0.9:_ \\
7: _Choose a new service randomly._ \\
8: _Else:_ \\
9: _Compose the chosen service._ \\
10: _Choose another service randomly._ \\
11: _Select a service with high fitness value by sorting services in each cluster by fitness value in ascending order and randomly selecting a service with the highest fitness value._ \\
12: _Return the selected service_ \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Algorithm of Improved Eagle Strategy. Figure 10: Flowchart for substitution of service. Referring to Figure 12, TTGO is a brand of development boards based on the ESP32 microcontroller. TTGO boards typically include an ESP32 microcontroller, additional components such as an OLED display, a battery management circuit, and various sensors and communication modules. The specific features of each board vary depending on the model, but all of them are designed to be easy to use and provide a convenient platform for developing IoT projects. TTGO is a powerful, low-cost, low-power system-on-a-chip (SoC) microcontroller with integrated Wi-Fi and Bluetooth capabilities [39]. It is designed for the IoT and other wireless communication applications. Microcontrollers use traditional methods to work on low-dimensional structured sensor data (for example, temperature and humidity). They make simple inferences at the edge of their processing [40]. Within the Smart Toilet system, the IES model plays a pivotal role in enhancing the software-driven capabilities of the IoT architecture. By integrating the IES model, we ensure robust system security and a user-responsive service by efficiently selecting optimal WS based on predefined QoS attributes. This focus on software optimization allows for predictive maintenance and effective resource management, contributing to the system's overall performance and reliability. In the sensory phase of the Smart Toilet system, sensors collect real-time data essential for service optimization. The IES model utilizes this sensory data to enhance the decision-making process for service selection. By analyzing the data in the context of  
Figure 11: Overall Architecture of Smart Toilet. Figure 12: Electrical diagram of Smart Toilet System. user requirements and service response times, the IES model ensures the selection of the most efficient services. This software-focused approach allows for a more intelligent and responsive Smart Toilet system, highlighting the practical application of the IES model in a real-world scenario. The next phase is cloud management. The raw data gathered from IoT devices, which are also known as \"real-time data\", are stored in Open Innovation Platform (OIP) cloud telemetry storage [13].