## 3 System Model
### System Architecture  
In the section of System Architecture, we delve into the logical relationships among these sub-models, aiming to achieve dynamic traffic flow prediction. As shown in Figure 1, the system contains three processes during the traffic flow prediction, i.e., the traffic flow \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline Q & traffic flow data \\ s & the row of Q and the number of data for each variable \\ z & the column of Q and number of independent variables \\ \(\beta_{i}\) & regression coefficient \\ \(\delta\) & disturbance term \\ \(\overline{Q}\) & the column of Q and number of independent variables \\ \(L\) & the sum of the squares of the differences between the fitted values \\ \(\overline{Q}\) & mean value of real traffic data \\ j,p,m & the variables in the \(Q\) \\ k & selected variables \\ \(C_{t}\) & long-term memory cell \\ \(h_{t}\) & short-term memory cell \\ \(f_{t}\) & forget gate \\ \(\widehat{C}_{t}\),\(i_{t}\) & input gate \\ \(O_{t}\) & output gate \\ \(W_{f}\),\(W_{i}\),\(W_{c}\),\(W_{o}\),\(b_{f}\),\(b_{i}\),\(b_{c}\),\(b_{o}\) & weight value of gates \\ _epo_ & completed one iteration of all batches \\ _ww_ & window length \\ _rat_ & the rate of learning \\ _Cost_ & the cost of model \\ _Loss_ & the loss of model \\ _thr_ & threshold of epoch \\ _In_ & the number of input nodes \\ _Out_ & the number of output nodes \\ _Hid_ & the number of hidden layer nodes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of the main mathematical notations. analysis based on real-time information acquisition, the offline analysis to determine the training factors, and the online prediction for traffic flow. We assume that the traffic flow data is obtained via V2V and V2R communication in VANETs [16], which depends on our previous work [17; 18; 19]. The on-board unit (OBU) on vehicles enables V2V communication with other vehicles on the road segment and V2R communication with RSUs at intersections. The OBU records vehicle information like ID, position, and real-time speed. By obtaining real-time information about subsequent road segments from RSUs via V2R communication, the vehicle estimates travel time based on its recorded real-time speed. This information is relayed along the road segment until a relay vehicle enters the RSU communication range at intersections, allowing the RSU to receive real-time traffic information through V2R communication. The messages including the traffic flow data can be acquired and shared during vehicles and RSUs via the multi-hop and carry-and-forward transmission technology in VANETs. We obtain the traffic flow and speed information in unit time by the RSU (roadside unit) [20] and form the data set. The real-time traffic flow information is obtained by the cameras equipped on the roadside or the flowmeters directly connected to the RSU. The RSUs at the road interactions contain not only cache to store and relay the traffic data, but also a tiny server to complete the calculation and training tasks. Each RSU in the distributed system acquires and trains traffic flow data and hyper-parameters of the road segments it covers, and then, it uploads the results, completing the task in the offline sub-systems. Then, the RSU uploads the nearest cellular base station, which transmits the message to the offline system in the vehicle traffic server to complete the parameter setting of the MVHS-LSTM on the road. When the road segment has the prediction requirement, based on the collected information, the online system in the vehicle traffic server can provide global traffic flow prediction for the road. The paper considers the internal spatial correlation within road segments by incorporating their spatial properties (such as lane number, inter-vehicle distance and vehicle speed) into the matrix \(Q\).