Traffic flow prediction is considered to be one of the fundamental technologies in intelligent transportation systems (ITSs) with a tremendous application prospect. Unlike traditional time series analysis tasks, the key challenge in traffic flow prediction lies in effectively modelling the highly complex and dynamic spatiotemporal dependencies within the traffic data. In recent years, researchers have proposed various methods to enhance the accuracy of traffic flow prediction, but certain issues still persist. For instance, some methods rely on specific static assumptions, failing to adequately simulate the dynamic changes in the data, thus limiting their modelling capacity. On the other hand, some approaches inadequately capture the spatiotemporal dependencies, resulting in the omission of crucial information and leading to unsatisfactory prediction outcomes. To address these challenges, this paper proposes a model called the Dynamic Spatial–Temporal Self-Attention Network (DSTSAN). Firstly, this research enhances the interaction between different dimension features in the traffic data through a feature augmentation module, thereby improving the model’s representational capacity. Subsequently, the current investigation introduces two masking matrices: one captures local spatial dependencies and the other captures global spatial dependencies, based on the spatial self-attention module. Finally, the methodology employs a temporal self-attention module to capture and integrate the dynamic temporal dependencies of traffic data. We designed experiments using historical data from the previous hour to predict traffic flow conditions in the hour ahead, and the experiments were extensively compared to the DSTSAN model, with 11 baseline methods using four real-world datasets. The results demonstrate the effectiveness and superiority of the proposed approach.
The optimization of the sawing process for Pinus kesiya Royle ex Gordon, an important timber used in construction and furniture, especially through the adjustment of parameters such as wood moisture content, cutting speed, and feed speed, not only helps reduce energy consumption and noise but also improves surface processing quality, thereby promoting green and environmentally friendly production. Therefore, this study selects the wood moisture content, cutting speed, and feed speed during the Single Pass Crosscut process of Pinus kesiya as the preliminary experimental parameters. Based on the Transformer model, a cutting prediction model for Pinus kesiya is established to predict three cutting performance indicators: cutting power consumption, surface roughness, and cutting noise. Meanwhile, Bayesian optimization was used to search for the optimal parameter combination within the specified cutting process parameter ranges that minimizes the objective function for these cutting performance indicators. Finally, experimental verification based on the optimal parameter combination shows that the average coefficient of determination for the cutting performance indicators is 0.937, the average mean squared error is 0.076, and the average mean absolute error is 0.186, indicating good agreement between the predicted and measured values.