diff --git a/API/system_design.md b/API/system_design.md index f4e85ad..4d5c392 100644 --- a/API/system_design.md +++ b/API/system_design.md @@ -1,2 +1,84 @@ # System design -Are we going to have two parts? Like Diffusion and Protocol Generator? \ No newline at end of file +In this document, the original paper is refer as "Spatio-Temporal Diffusion Model for Cellular Traffic Generation (STOUTER)". + +>[!WARNING] +> We should decide which option to use, A or B. +> +> Check "High level" section for details. + +# Questions to be considered +1. Do we need time series graph model? + - If so, how do we show key points aside from the original paper? (Like, just applying it to other protocols?) + +2. If we focusing on security level, should we use time-focusing model? + +## The original approach + +### What do they generate +The STOUTER model generates synthetic traffic features, such as the spatio-temporal distribution of cellular traffic, including: + +- The timing and frequency of requests. + +- The spatial distribution (e.g., base station-specific traffic). + +- The uncertainty in traffic demand (fluctuations in traffic patterns). + +These are aggregated features of the traffic and do not represent raw packet data (like what you would capture in a pcap file). + +The generated features can be used for network performance analysis, resource optimization, and traffic prediction, rather than for raw traffic simulation. + + +### What kinds of data needed +**tl;dr**: Features-extracted traffic + + +The paper specifically mentions the use of aggregated traffic data, which likely includes pre-processed or feature-extracted information, such as: + +- Hourly traffic statistics: For example, the traffic volume at a base station for each hour of the day. + +- Weekly patterns: Patterns showing traffic fluctuations across different days of the week (e.g., weekends vs. weekdays). + +- Base station features: Features derived from geographical and operational data about base stations, such as the number of points of interest (POIs) in the area covered by the base station (e.g., shops, schools, hospitals, etc.). + +- Spatio-temporal data: This includes encoding spatial dependencies (proximity between base stations) and temporal dependencies (time of day, day of the week) using graphs. + + +### The workflow +1. **Input**: The user provides initial traffic data for a base station or multiple base stations (historical data). This input is processed and used to initialize the temporal and base station graphs. + +2. **Forward Process (Noise Addition)**: The model adds noise to the input traffic data over multiple steps until it is close to a Gaussian distribution. This is done by iteratively applying the forward diffusion process. + +3. **Reverse Process (Denoising)**: Starting from the noisy data (Gaussian distribution), the STUnet model is used to predict and iteratively remove the noise, reconstructing realistic traffic data. + +4. **Generated Traffic Output**: The final denoised data represents synthetic cellular traffic that preserves both spatio-temporal and uncertainty patterns, making it highly realistic for use in downstream applications. + + +## Our design +We should discuss these! + +Should we like, generating raw packets? + +### High level +**NB**: There's like feature-extracted dataset(For industral network, should double check if it's modbus/dnp3). + +We don't need to write parser if using existing dataset. + +So the workflow is like: + +1. Train the model based on input + +2. Model generates features + +3. Generator(written in rust) uses features to generate raw traffic. + +Between step 2 and step 3, we need to define APIs. + + +Here's two options: + +- Option A: Rust binary calls functions from python(The diffusion stuffs, which should like return features) + +- Option B: Python calls rust exposed generator APIs(like passing features to them, and get raw packets) + +We need to decide which one to use. +