
Traffic flow forecasting faces substantial challenges arising from intertwined heterogeneous temporal dynamics and complex spatial dependencies. A key difficulty lies in balancing long-term stable trends with short-term abrupt disturbances. To address these challenges, a framework named the Spatiotemporal Trend–Event Decoupling Mamba Graph Network (STEDMGN) is proposed. First, a temporal signal separation layer is constructed using a multi-scale decomposition and reconstruction mechanism to divide the raw sequence into trend and event components. This design enables dynamic pattern decoupling across multiple scales. Subsequently, a dual-frequency spatiotemporal encoder is introduced. The trend branch integrates multi-head attention with a Mamba-based state space layer to capture cross-period long-term dependencies, whereas the event branch employs causal convolution to model short-term abrupt disturbances. In the spatial dimension, trend-oriented and event-oriented graph convolutional networks are incorporated. These networks combine static priors, adaptive adjacency, and feature-driven dynamic graph structures to enhance the representation of both stable topologies and time-varying propagation. Finally, a fusion-gated decoder employs gated units and a query-driven fusion strategy to integrate the two feature types. A subsequent regression layer then generates multi-step forecasts. Extensive experiments on four public PeMS datasets demonstrate that the STEDMGN substantially outperforms state-of-the-art methods. The results provide an accurate and scalable solution for large-scale urban traffic flow forecasting.

Accurately predicting the remaining shelf life can effectively reduce the risk of spoilage during the storage process of agricultural products. The quality of agricultural products can be indirectly indicated by changes in environmental parameters. To better explore the intrinsic relationship between key environmental parameters during banana storage and their remaining shelf life, this paper proposes a novel causal convolution lightweight Transformer network. This model utilizes causal convolution operations to mine the temporal features of sensor data and applies positional encoding to the input signals. It employs a Transformer encoder to extract and fuse features while also utilizing a probabilistic sparse self-attention mechanism instead of the conventional self-attention mechanism. Moreover, a distillation operation is introduced, which effectively reduces the number of trainable parameters in the Transformer-based model and shortens the training time. Compared to traditional machine learning algorithms (BP, SVM) and conventional time series data mining algorithms (LSTM, RNN), the proposed prediction method achieves a mean squared error of 0.0221, a root mean squared error of 0.1486, a mean absolute error of 0.1101, and a maximum prediction error of 0.2221 days, allowing for more accurate and efficient predictions of bananas’ remaining shelf life.