Eco intelligence: AI-Powered Router Management at TechnataHacks 2024

Personal Blog

Thursday, October 10, 2024

Eco intelligence: AI-Powered Router Management at TechnataHacks 2024

At TechnataHacks 2024, my team and I embarked on a project called Eco intelligence, an AI-powered router management system designed to tackle a growing issue in IT hubs: excessive energy consumption. With energy costs on the rise, especially in areas like Kanata North Technology Park, we knew that a smarter approach to managing the energy output of network routers could make a meaningful difference.

The Problem: Energy Consumption and Heat Waste

In large tech hubs, network routers are often running continuously, even when they're not in use. This leads to wasted energy and increased heat, which further escalates the need for cooling systems in server rooms and data centres. Our goal was to create a solution that could not only reduce energy consumption but also repurpose the excess heat generated by routers to help with cooling.

The Solution: AI-Driven Router Management

Our approach was to develop an AI-based system that could manage router activity dynamically. The idea was simple: routers that are not needed could automatically power down, while those in demand would stay active. By reducing the number of active routers during low-traffic periods, we could save energy. Additionally, we aimed to capture the heat generated by these routers and redirect it towards cooling the very spaces where the routers were located.

Technologies Used

To build this system, we integrated several technologies that allowed us to create a seamless, intelligent solution:

- Machine Learning Models: We used two models to predict traffic patterns and router usage.

- Linear Regression: This model helped predict continuous data such as bandwidth usage over time.

- Random Forest Regressor: With a max depth of 2 and a random state of 100, this model was used to handle more complex, non-linear traffic patterns and predict whether routers should be powered on or off based on historical data.

- Next.js for the Frontend: We chose Next.js for building the frontend because of its modern framework capabilities, allowing us to create an interactive web dashboard to display real-time data.

- The dashboard allowed users to view router status, energy savings, and heat management insights through visual components like charts.

- GSAP for Animations: To make the user interface visually appealing and smooth, we used GSAP for animations, which brought life to the user interactions on the web dashboard.

Training the Model: Data-Driven Insights

For the machine learning component, we needed traffic data to train our models. Instead of using real routers, we simulated traffic patterns based on publicly available datasets. Here's a quick breakdown of how we trained the models:

- Data Preparation: We first gathered network traffic data and cleaned it up to ensure it was ready for model training. This involved normalizing bandwidth usage, labelling traffic spikes, and categorizing periods of inactivity.

- Training Linear Regression: This model was trained on historical traffic data to predict average bandwidth usage in the future. It worked well for simple, continuous predictions.

- Training Random Forest: The Random Forest model was crucial for predicting whether a router should be on or off. By setting a max depth of 2, we ensured that the model wasn’t overly complex but still captured non-linear patterns in router usage.

Both models worked together to provide actionable insights. The linear regression predicted general trends, while the random forest classifier identified specific periods where routers could be turned off to save energy.

Linking Frontend and Backend

Once the models were trained, we had to integrate them into our web dashboard. This was one of the more challenging aspects of the project, as we needed to ensure that the predictions from our backend were accurately reflected in real-time on the frontend.

- API Development: We built a RESTful API using Node.js to connect the machine learning predictions with the frontend dashboard. The API served the predicted data to the frontend, which then displayed the current router status, expected usage, and potential energy savings.

- Handling Real-Time Data: One challenge we faced was making the system responsive to real-time traffic data. To overcome this, we created a simulation environment that could send mock traffic data to our backend, where the models would make predictions, and the frontend would update the dashboard accordingly.

### Challenges and Lessons Learned

No project is without its challenges, and Eco intelligence had a few hurdles along the way:

1. Data Simulation: Since we didn’t have access to a real IT hub’s router data, we had to simulate realistic traffic patterns, which was tricky. Ensuring the models were trained on accurate data was a key concern.

2. Real-Time Synchronization: Displaying real-time predictions on the frontend was a challenge due to the nature of machine learning models, which tend to process data in batches. We had to fine-tune the system to allow for near-real-time updates on the web dashboard.

3. Heat Integration: While we conceptually included the idea of redirecting heat from routers to cooling systems, this part of the project remains more theoretical at this stage. However, it's something we aim to explore further with physical hardware.

Final Outcome: Third Prize at TechnataHacks 2024

Our hard work paid off! Eco intelligence won us the third prize at TechnataHacks 2024. The judges were impressed by the combination of AI and energy-saving measures, especially the potential scalability for large IT hubs. We demonstrated not only the technology but also its real-world impact, showcasing how it could help reduce energy consumption and operational costs for large tech parks.

Looking Ahead

This project has sparked further interest in developing smarter energy solutions for IT infrastructure. In the future, we plan to refine the heat integration aspect and work with real-world routers to make the system even more robust.

Eco intelligence is more than just a hackathon project—it's a step toward making IT infrastructure greener and more efficient.