## 4 Algorithm Design  
In this section, the improved MVHS-LSTM is designed to balance the accuracy and computing cost, which considers the parameters heuristically. In the analysis of the MVHS-LSTM model for data prediction, there are five variables that have a large impact on the prediction of the results, i.e., the number of hidden layer units of the MVHS-LSTM model, ratio of training and test data, learning rate, window length, and epoch. Due to the uncertainty and continuous time series of traffic data, the system cannot input the entire data for learning at the beginning. The system involves window length to control the number of input data per time. The window length refers to the number of data points processed by the model each time. The extent of the window length directly correlates with the amount of contextual information that the model can incorporate, thereby enhancing its capacity to comprehend and predict the protracted trends within the sequence. Nevertheless, excessively protracted window lengths can result in undue complexity, rendering the model challenging to train and potentially introducing extraneous noise information. Conversely, a window that is unduly brief may constrain the model's representational prowess, preventing it from fully encompassing the long-term dependencies of the data and impeding its ability to comprehensively learn the inherent patterns and laws governing the data. The MVHS-LSTM cell learns the data \(Q^{\prime}_{t}\), within the length of the window and also combines the long-time memory cell \(C_{t-1}\) and short-time memory cell \(h_{t-1}\) of the previous time cell. The system outputs the short-time prediction \(h_{t}\) by learning MVHS-LSTM. Then, the time window slides from one unit to the next. The process loops eventually obtains all of the forecast data. According to reference [29], we select hold-out method to determine the ratio of training and test, which denotes 7:3. This method aims to divide the available data set into training and testing subsets, which are used for model training and performance evaluation,respectively. We select a 7:3 ratio for training and testing data, which is a common choice that provides an adequate amount of data for model training while reserving a sufficient portion for performance evaluation. Based on reference [30], the number of hidden layer nodes of neural network can be determined as follows:  
\[Hid=\sqrt{a_{1}In^{2}+a_{2}InOut+a_{3}Out^{2}+a_{4}In+a_{5}Out+a_{6}} \tag{16}\]  
where \(Hid\) is the number of hidden layer nodes, \(In\) represents the number of input nodes, and \(Out\) denotes the number of output nodes. The number of input layer nodes determines the granularity at which the model extracts information from the raw data, which is used to capture important features of the data. The number of hidden layer nodes determines the ability of the LSTM model to process information internally. The more hidden layer nodes there are, the more complex features the model can learn, but it also increases the complexity and training difficulty of the model. The number of output layer nodes generally corresponds to the number of predicted values for each time step. The relationship between them is that the input layer converts the raw data into a format that the model can process, while the hidden layer is responsible for extracting and memorizing useful information from the input data and ultimately producing prediction results through the output layer. The calculation needs to be rounded to adjust \(\vec{a}\). In this article, the input is represented by the \(Q\) matrix, and the number of columns in the \(Q\) matrix is used as \(In\) to denote the number of input nodes. Since the input consists of a single predicted value, \(Out\) in this article is equal to 1. So the above formula can be simplified to  
\[Hid=\sqrt{a_{1}In^{2}+a_{2}In+a_{3}} \tag{17}\]  
An epoch signifies the total count of instances where the model has comprehensively traversed the entire dataset throughout the training process.