# mohan123216/iot_bot architecture

> Architecture diagram of the GitHub repository mohan123216/iot_bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohan123216/iot_bot
- Repository: https://github.com/mohan123216/iot_bot

## Overview

HOMZ-Engine is a research-oriented intrusion-detection pipeline for UNSW Bot-IoT flows. Its operational workflow cleans and samples traffic, trains a class-balanced known-attack classifier, then applies open-set novelty scoring to separate known traffic from zero-day attacks. The repository also presents paper-benchmark evaluation, integrity checks, retraining verification, and dashboards. The README documents the system-level stages; excerpts show preprocessing, classifier feature engineering, and four novelty signals. Several downstream scripts are listed but not sampled, so their internal data exchanges are not inferred.

Main entry points: [`Live_Demonstration/run_live_panel_demo.py`](https://github.com/mohan123216/iot_bot/blob/main/Live_Demonstration/run_live_panel_demo.py) (Live demo controller), [`Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py`](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py) (Balanced classifier), [`Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py`](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py) (Stream preprocessing), [`Final_Proposed_Solution/03_Tier2_ZeroDay_Detection/03_run_zero_day_engine.py`](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/03_Tier2_ZeroDay_Detection/03_run_zero_day_engine.py) (Zero-day engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data preparation"]
  node_preprocess["Stream preprocessing"]
  node_cleaned[("Curated flow data")]
end

subgraph group_detect["Detection engine"]
  node_tier1["Balanced classifier"]
  node_tier2["Zero-day engine"]
  node_decision["Known or novel result"]
end

subgraph group_assurance["Evaluation and assurance"]
  node_benchmark["Table 9 benchmark"]
  node_audit["Integrity audit"]
  node_retrain["Retraining verification"]
end

subgraph group_review["Review and reporting"]
  node_dashboards["Presentation dashboards"]
  node_panel["Interactive review panel"]
  node_demo["Live demo controller"]
end

node_dataset(("UNSW Bot-IoT flows"))

node_dataset -->|"provides flows"| node_preprocess
node_preprocess -->|"cleans and samples"| node_cleaned
node_cleaned -->|"supplies training data"| node_tier1
node_tier1 -->|"passes class evidence"| node_tier2
node_tier2 -->|"scores novelty"| node_decision
node_cleaned -.->|"benchmarks held-out classes"| node_benchmark
node_cleaned -.->|"checks data integrity"| node_audit
node_cleaned -.->|"reproduces training"| node_retrain
node_tier1 -->|"retrains classifier"| node_retrain
node_decision -.->|"presents results"| node_dashboards
node_demo -->|"runs demo step"| node_preprocess
node_demo -->|"runs demo step"| node_tier1
node_demo -->|"runs demo step"| node_tier2
node_demo -->|"runs demo step"| node_benchmark
node_demo -->|"runs demo step"| node_audit
node_demo -->|"runs demo step"| node_dashboards
node_dashboards -.->|"supports review"| node_panel

click node_preprocess "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py"
click node_tier1 "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py"
click node_tier2 "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/03_Tier2_ZeroDay_Detection/03_run_zero_day_engine.py"
click node_benchmark "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/04_Paper_Table9_Benchmark/04_evaluate_paper_table9.py"
click node_audit "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/05_Integrity_Audit/05_rigorous_dual_evaluation_audit.py"
click node_retrain "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/retraining_verification/run_retraining_verification.py"
click node_dashboards "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/06_Presentation_Dashboards/generate_presentation_dashboards.py"
click node_panel "https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/08_Interactive_Panel_Review_Dashboard/launch_dashboard.py"
click node_demo "https://github.com/mohan123216/iot_bot/blob/main/Live_Demonstration/run_live_panel_demo.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_preprocess,node_cleaned toneBlue
class node_tier1,node_tier2,node_decision toneAmber
class node_benchmark,node_audit,node_retrain toneMint
class node_dashboards,node_panel,node_demo toneRose
class node_dataset toneIndigo
```

## Components

### Data preparation

- [Stream preprocessing](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py): `Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py`
- **Curated flow data**

### Detection engine

- [Balanced classifier](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py): `Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py`
- [Zero-day engine](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/03_Tier2_ZeroDay_Detection/03_run_zero_day_engine.py): `Final_Proposed_Solution/03_Tier2_ZeroDay_Detection/03_run_zero_day_engine.py`
- **Known or novel result**

### Evaluation and assurance

- [Table 9 benchmark](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/04_Paper_Table9_Benchmark/04_evaluate_paper_table9.py): `Final_Proposed_Solution/04_Paper_Table9_Benchmark/04_evaluate_paper_table9.py`
- [Integrity audit](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/05_Integrity_Audit/05_rigorous_dual_evaluation_audit.py): `Final_Proposed_Solution/05_Integrity_Audit/05_rigorous_dual_evaluation_audit.py`
- [Retraining verification](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/retraining_verification/run_retraining_verification.py): `Final_Proposed_Solution/retraining_verification/run_retraining_verification.py`

### Review and reporting

- [Presentation dashboards](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/06_Presentation_Dashboards/generate_presentation_dashboards.py): `Final_Proposed_Solution/06_Presentation_Dashboards/generate_presentation_dashboards.py`
- [Interactive review panel](https://github.com/mohan123216/iot_bot/blob/main/Final_Proposed_Solution/08_Interactive_Panel_Review_Dashboard/launch_dashboard.py): `Final_Proposed_Solution/08_Interactive_Panel_Review_Dashboard/launch_dashboard.py`
- [Live demo controller](https://github.com/mohan123216/iot_bot/blob/main/Live_Demonstration/run_live_panel_demo.py): `Live_Demonstration/run_live_panel_demo.py`

### Other components

- **UNSW Bot-IoT flows**

## Connections

- UNSW Bot-IoT flows → Stream preprocessing: provides flows (evidence: `Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py`)
- Stream preprocessing → Curated flow data: cleans and samples (evidence: `Final_Proposed_Solution/01_Data_Preprocessing/01_stream_clean_full_dataset.py`)
- Curated flow data → Balanced classifier: supplies training data (evidence: `Final_Proposed_Solution/02_Tier1_Known_Classification/02_train_balanced_multiclass.py`)
- Balanced classifier → Zero-day engine: passes class evidence
- Zero-day engine → Known or novel result: scores novelty
- Curated flow data → Table 9 benchmark: benchmarks held-out classes
- Curated flow data → Integrity audit: checks data integrity
- Curated flow data → Retraining verification: reproduces training
- Balanced classifier → Retraining verification: retrains classifier (evidence: `Final_Proposed_Solution/retraining_verification/run_retraining_verification.py`)
- Known or novel result → Presentation dashboards: presents results
- Live demo controller → Stream preprocessing: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Live demo controller → Balanced classifier: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Live demo controller → Zero-day engine: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Live demo controller → Table 9 benchmark: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Live demo controller → Integrity audit: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Live demo controller → Presentation dashboards: runs demo step (evidence: `Live_Demonstration/run_live_panel_demo.py`)
- Presentation dashboards → Interactive review panel: supports review
