In recent years, neural network models have been extensively applied in flood prediction due to their superior performance. However, most studies aimed at enhancing models have simply stacked basic models, overlooking the need for designs specific to the physical attributes of hydrological data. While stacking basic models can enhance flood prediction to a degree, they often introduce significant unnecessary complexity redundancy. Moreover, improvement strategies are challenging to generalize across different models. To address this issue, a widely applicable Two-Dimensional Hidden Layer (Td) architecture is proposed. Unlike single hidden layer architectures, this design specifically tackles hydrological data’s spatiotemporal characteristics. Discretizing spatiotemporal information in flood and rainfall data yields an abstract, two-dimensional representation of the hydrological data to enhance the model’s ability to utilize hydrological information. Using a Td structure instead of the single hidden layer in Recurrent Neural Network (RNN), Long Short-Term Memory (LSTM), Bidirectional Long Short-Term Memory (BiLSTM), and Convolutional Neural Network (CNN), the TdRNN, TdLSTM, TdBiLSTM, and TdCNN models are developed to assess the novel structure’s impact on foundational models. Experiments were conducted using empirical flood process data from the LouDe Station in Shandong, China, and the NingXiang Station in Hunan, China. The results indicate that, compared to benchmark models, network models incorporating a Td structure exhibit superior adaptability across various lead times. For instance, at the LouDe Station, with a one-hour lead time, the TdCNN model showed improvements in the Nash-Sutcliffe Efficiency Coefficient (NSE), Kling-Gupta Efficiency Coefficient (KGE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) performance metrics by 26.24%, 33.48%, 62.51%, and 56.88%, respectively, compared to the CNN model. The new models also demonstrated significant performance enhancements under other conditions. The experimental results demonstrate that the Td structure is an effective and versatile model improvement strategy. It enhances the prediction accuracy by strengthening the model’s ability to utilize information. This study may contribute to the development of a flood prediction system and provide data to support subsequent reservoir scheduling and disaster mitigation planning.