## 5 CNN-LSTM Model Architecture
The CNN-LSTM model is tailored for MMS-DSR in Figure 4. The architecture is designed to predict and optimize both routing and beamforming decisions, ensuring robust communication in urban environments with dynamic traffic patterns and network topologies. The model begins with an input layer that handles raw data with dimensions of \(90\times 5\), reflecting the collected metrics. This structure allows the model to process the network metrics across time, ensuring that spatial and temporal features are captured effectively. The CNN layers apply convolutional filters, producing feature maps (\(90\times 32\)) that detect critical spatial patterns in the network, such as congestion areas or interference zones. The spatially processed data are then passed to the LSTM layers, which capture long-term temporal dependencies. These layers output 32 features each, providing a deep temporal analysis that is essential for predicting future network states. The dense layer consolidates the spatio-temporal features learned from the CNN and LSTM layers into a final representation that summarizes the model's prediction about future network conditions. These outputs represent the decision variables or routing recommendations based on the spatial and temporal patterns captured in the previous layers. These decision variables could, for instance, predict the most efficient route, optimal beamforming vectors, or other routing-related metrics. Following the dense layer, the model applies a softmax function to output probabilities for different routing actions or strategies. This allows the MMS-DSR protocol to make probabilistic decisions about route stability, optimal paths, and necessary beamforming adjustments. The output directly influences MMS-DSR's decision-making process, enabling it to dynamically adjust routes and beamforming strategies in real-time, based on predicted network conditions. By predicting future network states, such as route stability and optimal beamforming vectors, the CNN-LSTM model significantly enhances the MMS-DSR protocol's ability to maintain robust communication links, especially in urban environments where network dynamics can change rapidly. The CNN-LSTM model used in the MMS-DSR protocol is trained using historical traffic data collected from urban environments. These data include a variety of urban traffic scenarios characterized by different vehicle speeds, directions, network loads, and communication metrics. The dataset consists of traffic data collected over a span of six months, covering different traffic patterns, peak and off-peak hours and congestion scenarios. Figure 4: CNN-LSTM model architecture for MMS-DSR. The model training is conducted using MATLAB, which provides a robust environment for machine learning model development. The data are pre-processed to normalize features and handle missing values, ensuring consistency and accuracy in the training process. The training dataset consists of approximately 500,000 samples, and the data are split into 70% training, 15% validation, and 15% test sets. The training process is performed on a centralized server with global knowledge of the historical traffic data. The training is performed offline, using the entire dataset to capture long-term trends and relationships. The model is then periodically updated with new data as the traffic patterns evolve. To further improve the understanding of the proposed architecture, main fundamentals theoretical concepts about CNN-LSTM are proofed in the Appendix A.