Traffic flow prediction methods, systems, and equipment based on intra-block convolution and axis weight mapping

By employing intra-block convolution and axis-weighted mapping, combined with the causal constraints and lightweight feature processing of TCN, the problems of high computational cost and weak capture of causal evolution patterns in existing models are solved, achieving efficient and accurate traffic flow prediction, suitable for real-time prediction and decision-making in complex traffic scenarios.

CN121260012BActive Publication Date: 2026-03-10NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing Transformer-based traffic flow prediction models suffer from high computational overhead, high memory consumption, and an inability to effectively capture the causal evolution of traffic flow in large-scale traffic systems. Furthermore, they lack efficient prediction methods that combine the advantages of patching strategies and TCN networks.

Method used

By employing intra-block convolution and axis remapping, the method divides data into blocks, extracts intra-block temporal features, projects and remaps features, and utilizes the causal constraints and lightweight feature processing capabilities of TCN, combined with a predictive decoder to generate high-precision future traffic flow prediction results.

Benefits of technology

It reduces computational complexity and memory overhead, improves the ability to capture local traffic flow dynamics, achieves efficient traffic flow prediction, and supports real-time prediction and decision-making in complex traffic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121260012B_ABST
    Figure CN121260012B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of artificial intelligence technology and discloses a traffic flow prediction method, system, and device based on intra-block convolution and axis remapping. The invention divides the input traffic flow time series into multiple data blocks; uses a temporal convolutional network as the backbone to independently extract local temporal features within each data block; transforms the dimension representing the data block index into a channel dimension through axis remapping, thereby reorganizing the discrete block features into a structured multi-channel feature tensor; maps the tensor to the target dimension through a projection head network to obtain an encoded representation; and inputs the encoded representation into a prediction decoder to generate a prediction result for future traffic flow. This invention integrates the local temporal capture capability of TCN with the strong representation capability of modern sequence models, achieving both high computational efficiency and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a traffic flow prediction method, system, and device based on intra-block convolution and axis weight mapping. Background Technology

[0002] In recent years, with the tremendous success of Transformer models in Natural Language Processing (NLP), their powerful ability to capture long-range dependencies has been introduced into the time series domain. A series of Transformer-based prediction models, such as Informer and Autoformer, have been proposed. In particular, the PatchTST model, drawing on the ideas of VisionTransformer in computer vision, divides time series data into multiple "patches" as input tokens. This approach not only effectively reduces the sequence length and alleviates the inherent quadratic computational complexity of self-attention mechanisms, but also preserves the local contextual information of the sequence to a certain extent, achieving significant performance improvements in tasks such as traffic flow prediction.

[0003] However, Transformer-based solutions still have inherent limitations when applied to large-scale transportation systems. First, the permutation-invariance of the self-attention mechanism inherently lacks awareness of temporal order. Even with the introduction of location encoding, the capture of strict causal evolutionary patterns in traffic flow (such as the propagation of upstream congestion downstream) may be weakened. Second, although patching strategies reduce complexity, the computational overhead and memory consumption of the self-attention mechanism remain significant bottlenecks restricting its application in real-time traffic guidance and early warning systems requiring high timeliness when faced with massive concurrent sequences generated by thousands of monitoring points covering the entire city.

[0004] On the other hand, convolutional neural networks (CNNs), especially temporal convolutional networks (TCNs), have proven to be effective architectures for processing time-series data due to their strict causal constraints, stable gradients, and flexible receptive fields achieved through dilated convolutions. TCNs have efficient parallel computing capabilities, and their computational complexity is linearly related to the sequence length, which is much lower than that of the Transformer model. This gives them a natural advantage in processing high-frequency, long-term traffic flow data.

[0005] Currently, there is a lack of traffic flow prediction solutions that combine the advantages of both patching strategies and TCN networks. Specifically, there is a lack of methods that can efficiently process long sequences by transforming them into sets of shorter sequences through patching, while simultaneously leveraging the lightweight nature and temporal modeling advantages of TCN to deeply understand the local dynamics within each traffic flow data block. Furthermore, based on the extracted local dynamic features, a highly efficient feature recombination and decoding mechanism should be used to directly generate high-precision future traffic flow predictions to support understanding and decision-making in more complex traffic scenarios. Therefore, developing a novel traffic flow time series prediction method that is computationally efficient, preserves fine-grained local temporal information, and exhibits excellent prediction performance has significant theoretical and practical value. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing a traffic flow prediction method, system, and device based on intra-block convolution and axis weight mapping. This method can integrate the local temporal capture capability of TCN with the strong representation capability of modern sequence models (such as LLM), achieving high computational efficiency and accuracy, and promoting the application of more advanced artificial intelligence technologies in the prediction and analysis of complex traffic scenarios.

[0007] Specifically, the present invention is implemented using the following technical solutions.

[0008] On one hand, this invention provides a traffic flow prediction method based on intra-block convolution and axis weight mapping, comprising:

[0009] Data partitioning: The input traffic flow time series of each batch is partitioned along the time axis to obtain a set of short traffic flow data blocks; the input traffic flow time series of each batch is a three-dimensional tensor. Where B is the batch size, C is the number of channels, and S is the length of the traffic flow time series; the tensor representation of the set of short-sequence traffic flow data blocks is a three-dimensional tensor with batch dimension BC. , For channel dimension, The data block length; the block operation divides the input traffic flow time series of each batch from a three-dimensional tensor. Forming a four-dimensional tensor The batch size B and the number of channels C are combined into a single dimension to form a three-dimensional tensor. ;

[0010] Extracting intra-block temporal features: For the three-dimensional tensor formed after the data is divided into blocks, a temporal convolutional network is used to independently extract the temporal features of each data block contained therein, so as to obtain the intra-block feature representation corresponding to each data block;

[0011] Feature projection: The intra-block feature representation corresponding to each data block output by the temporal convolutional network is reshaped, and the batch dimension BC and channel dimension are combined. Merging them yields a two-dimensional tensor. , The length of the data block; determined by the weight matrix. The defined linear projection layer will determine the data block length. Mapping to the target dimension D yields the output of the linear projection layer; through parallel residual connections, a one-dimensional transpose convolution is used to transform the two-dimensional tensor. The feature dimension, namely the data block length, is from... The sampled value is upsampled to the target dimension D and then added to the output of the linear projection layer to obtain the fused feature tensor. ;

[0012] Remapping: Remapping the fused feature tensor The first dimension, i.e., the size is The dimensions are broken down into and Dimension, thus forming a dimension as A new tensor; apply a 1×1 depthwise separable convolution along the channel dimension. Each channel is processed independently, and the final output is a structured coded representation. ;

[0013] Predictive Decoding: Receiving the structured encoded representation via a predictive decoder It is then decoded into predicted values ​​for future traffic flow time series.

[0014] Furthermore, the backbone of the temporal convolutional network is composed of several residual layers stacked together, and each residual layer contains several sub-modules; each sub-module consists of a series of sequential operations: causal dilated one-dimensional convolution, root mean square layer normalization, activation function, and random deactivation.

[0015] Furthermore, the causal-dilated one-dimensional convolution operation is implemented through the following steps:

[0016] Asymmetric one-dimensional filling is performed on the end of the input traffic flow time series that represents the past time step, which is used as the filling side.

[0017] A standard causal dilated one-dimensional convolution operation is performed on the asymmetric one-dimensional padded sequence. This causal dilated one-dimensional convolution operation uses a filter of size K and a dilation rate of d on the time series X, and is defined as follows:

[0018]

[0019] in, This represents the output of the convolution operation at time step t; Represents the input traffic flow time series; Represents the convolution kernel, It is its kth weight; Represents the size of the convolution kernel; Represents the porosity, controlling the sampling interval of the convolution kernel weights; It is the index of the convolution kernel, from 0 to K-1; This represents the historical input values ​​up to the current time step t, determined by the hole rate d and the kernel index k.

[0020] The sequence output by the causal-drilled one-dimensional convolution operation is sliced ​​from the end opposite to the filling side, and some elements are removed. The length of the slice is equal to the length of the asymmetric one-dimensional filling.

[0021] Furthermore, the traffic flow prediction method based on intra-block convolution and axis weight mapping also includes the method of forming a three-dimensional tensor. Then, layer normalization is applied to each traffic flow data block obtained.

[0022] Furthermore, the prediction decoder consists of one or more linear projection layers, multilayer perceptrons, or deep learning networks.

[0023] Furthermore, the traffic flow prediction method based on intra-block convolution and axis remapping further includes performing temporal decomposition preprocessing on the traffic flow time series of each batch before the data is segmented to obtain trend components. Seasonal portion and residual components The trend component T reflects the long-term growth or decline trend of traffic flow; the seasonal component S embodies traffic patterns with fixed cycles; and the residual component R represents traffic flow fluctuations caused by random, non-periodic events.

[0024] The trend component Seasonal portion and residual components Data is divided into blocks, temporal features within each block are extracted, features are projected, and remapped to obtain three independent structured coding representations. , and Subsequently, these three independent structured coded representations are merged and fed together into the prediction decoder to generate traffic flow prediction results based on component decomposition.

[0025] Furthermore, the time series decomposition preprocessing employs STL decomposition or its neural network variant to decompose the traffic flow time series of each batch into a trend component T, a seasonal component S, and a residual component R.

[0026] Furthermore, the traffic flow prediction method based on intra-block convolution and axis weight mapping further includes preprocessing the input traffic flow time series of each batch before the data is segmented; the preprocessing includes performing a reversible instance normalization operation on the input traffic flow time series of each batch, and performing a corresponding inverse normalization operation on the predicted value after the predicted value is output in the prediction decoding step to restore the numerical scale.

[0027] On the other hand, the present invention also provides a traffic flow prediction system based on intra-block convolution and axle load mapping, which implements the above-mentioned traffic flow prediction method based on intra-block convolution and axle load mapping. The traffic flow prediction system based on intra-block convolution and axle load mapping includes a data receiving module, a data segmentation module, an intra-block feature extraction module, a feature projection and remapping module, and a prediction decoding module.

[0028] The data receiving module receives the input traffic flow time series for each batch;

[0029] The data segmentation module performs segmentation operations on the traffic flow time series along the time axis to obtain a set of short-sequence traffic flow data blocks. The tensor representation of the set of short-sequence traffic flow data blocks is a three-dimensional tensor.

[0030] The intra-block feature extraction module uses a temporal convolutional network to independently extract the temporal features of the three-dimensional tensor formed after the data is divided into blocks, thereby obtaining the intra-block feature representation corresponding to each data block.

[0031] The feature projection and remapping module performs feature projection and remapping on the intra-block feature representation to generate a structured coded representation;

[0032] The prediction decoding module receives the structured encoded representation through the prediction decoder and decodes it into predicted values ​​of future traffic flow time series.

[0033] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the traffic flow prediction method based on intra-block convolution and axle load mapping described above.

[0034] Compared with existing technologies, the traffic flow prediction method, system, and device based on intra-block convolution and axis weight mapping of the present invention have the following advantages:

[0035] Computational Efficiency and Parallelism: By employing an intra-block processing mechanism centered on TCN to replace global self-attention, the computational complexity of this invention is linearly related to the sequence length and the number of blocks, significantly reducing computational and memory overhead, and supporting highly parallel processing of all data blocks. This enables the traffic flow prediction method of this invention to efficiently process massive concurrent data from city-level monitoring networks, better meeting the timeliness requirements of real-time traffic prediction and guidance systems.

[0036] Local Temporal Fidelity: This invention focuses feature extraction on individual "data blocks," leveraging TCN's powerful ability to capture causal relationships and local patterns to ensure that the local dynamic information of the original sequence can be learned and preserved with high fidelity. This demonstrates higher predictive accuracy when identifying and predicting key dynamic changes such as the formation, development, and dissipation of traffic congestion.

[0037] This invention achieves an efficient encoder-decoder prediction paradigm: the "axis weight mapping" is not merely a simple dimensionality transformation; functionally, it acts as a highly efficient encoder. Its structured representation of a "multi-channel sequence," combined with the predictive decoder, can directly adapt to the input paradigm of downstream autoregressive models (such as LLM), effectively solving the interface mismatch problem between traditional convolutional encoders and modern sequence-to-sequence prediction paradigms. This constitutes a complete and efficient prediction framework with strong modularity and compatibility. This provides a new technical path for using cutting-edge technologies such as large-scale language models for complex traffic event reasoning, attribution analysis, and decision support.

[0038] Independence and flexibility of representation: The projector head can selectively use operations such as depthwise separable convolution, ensuring that information from different channels (i.e., different data blocks) does not unnecessarily cross during final feature calibration, thus maintaining the independence of each local representation. Simultaneously, this encoding framework can be used not only for the original sequence but also flexibly applied to different time-series components after decomposition, possessing broad applicability. For example, the steps of this invention can be applied to the long-term growth trend, intraday peak cycle, and random event impact derived from traffic flow data decomposition, thereby making the prediction model of this invention more refined and robust.

[0039] The traffic flow prediction method, system, and device based on intra-block convolution and axon-weight mapping of this invention replace the highly complex self-attention mechanism with a lightweight TCN, significantly reducing computational overhead and making it more suitable for real-time traffic prediction tasks. It also enhances the fine-grained capture of local traffic flow dynamics (such as the formation and dissipation of congestion). Its unique axon-weight mapping step generates a structured token representation, which, combined with the prediction decoder, constitutes an efficient and complete traffic flow prediction framework. This framework can seamlessly interface with downstream autoregressive models (such as large language models), serving as an efficient traffic flow time-series tokenization tool with strong compatibility and modular application value in complex traffic event analysis and decision-making. Attached Figure Description

[0040] Figure 1 This is a system schematic diagram according to an embodiment of the present invention.

[0041] Figure 2 This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation

[0042] The present invention will now be described in further detail with reference to the embodiments and the accompanying drawings.

[0043] One embodiment of the present invention is a traffic flow prediction system based on intra-block convolution and axis weight mapping, such as... Figure 1 As shown, it includes a data receiving module, a data segmentation module, an intra-block feature extraction module, a feature projection and remapping module, and a prediction decoding module.

[0044] The system comprises the following modules: a data receiving module receives traffic flow time series data from various batches; a data segmentation module segments the traffic flow time series along the time axis to obtain a set of short traffic flow data blocks; an intra-block feature extraction module independently extracts the temporal features within each traffic flow data block using a temporal convolutional network to obtain an intra-block feature representation corresponding to each data block; a feature projection and remapping module projects and remaps the intra-block feature representations to generate a structured coded representation; and a prediction decoding module receives the structured coded representation through a prediction decoder and decodes it into predicted values ​​for future traffic flow time series.

[0045] The traffic flow prediction method based on intra-block convolution and axis weight mapping of the present invention, such as Figure 2 As shown, it includes the following steps:

[0046] I. Data Blocking

[0047] The input traffic flow time series of each batch is divided into blocks along the time axis to obtain a set of short traffic flow data blocks. The number of data blocks (i.e., channel dimension) It can be calculated using the following formula:

[0048]

[0049] Where S is the length of a batch of traffic flow time series input. and For hyperparameters, For data block length, This is the sliding step size.

[0050] This step aims to transform a long sequence (an input batch of traffic flow time series) into a set of short sequence data blocks to facilitate subsequent parallel processing and local feature extraction.

[0051] Suppose that the input traffic flow time series is a three-dimensional tensor Where B represents the batch size, C represents the number of channels, and in traffic flow prediction scenarios, C can represent the number of sensors at different monitoring points, or different traffic indicators at the same monitoring point, such as traffic volume, average speed, and occupancy rate; S represents the length of the traffic flow time series, representing the total number of time steps of historical traffic data. The original three-dimensional tensor is then processed through block operations. Form a four-dimensional tensor , For channel dimension, This represents the length of the data block.

[0052] To facilitate the subsequent processing of each data block as an independent unit, the four-dimensional tensor needs to be processed. The batch size B and the number of channels C are transformed into a single dimension, forming a three-dimensional tensor with a batch size of BC. , For channel dimension, The tensor is the length of the data block. That is, the tensor representation of the set of short sequence data blocks.

[0053] Preferably, in another embodiment, layer normalization (such as RMSnorm) is then applied to each data block to stabilize the training process, ultimately yielding the initial tokenized sequence. :

[0054]

[0055] After performing this preferred step, the As input to step two; when this preferred step is not performed, the... As input for step two.

[0056] II. Extracting Intra-Block Temporal Features

[0057] The three-dimensional tensor obtained in step one (i.e. or The temporal features of each data block contained therein are extracted independently using a temporal convolutional network (TCN) to obtain the intra-block feature representation corresponding to each data block.

[0058] This step aims to learn the internal traffic flow evolution patterns from traffic data blocks of each time segment (e.g., a 15-minute or 1-hour period). A Temporal Convolutional Network (TCN) is used as the backbone.

[0059] The TCN backbone network consists of several (e.g.) The system consists of stacked residual layers, each containing several (e.g., M) sub-modules. Each sub-module comprises a series of sequential operations: causal dilated one-dimensional convolution (Conv1D), root mean square normalization (RMSNorm), activation function, and dropout, ultimately outputting the intra-block feature representation corresponding to each data block.

[0060] Preferably, in order to strictly guarantee the causality of the convolution operation and maintain the sequence length, the causal dilated one-dimensional convolution operation is implemented through the following combination of steps:

[0061] 1. Asymmetric Padding: Asymmetric one-dimensional padding is performed on the end of the input traffic flow time series representing past time steps, such as replication padding. The length P of the padding is determined by the kernel size K and the hole ratio d of the sub-module, with the specific relationship as follows: .

[0062] 2. Standard Convolution: Perform standard causal dilated one-dimensional convolution operation on asymmetric one-dimensional padded sequences.

[0063] The key to TCN lies in the design of its causal convolution and dilated convolution. A causal dilated one-dimensional convolution operation on a time series X, using a filter W of size K and a dilation rate d, is defined as follows:

[0064]

[0065] in, This represents the output of the convolution operation at time step t; Represents the input traffic flow time series; Represents the convolution kernel (or filter). It is its kth weight; Represents the size of the convolution kernel; Represents the porosity, controlling the sampling interval of the convolution kernel weights; These are the indices of the convolution kernel, ranging from 0 to K-1; This represents the historical input values ​​up to the current time step t, determined by the hole rate d and the kernel index k.

[0066] This design ensures that the output at time t depends only on the input at time t and before, and that a huge receptive field can be obtained by exponentially increasing d.

[0067] 3. Output slicing: The sequence output by the causal-drilled one-dimensional convolution operation is sliced ​​(Chomping) from the other end opposite to the padding side (representing the side of the future time step), removing some elements. The length of the removed elements is equal to the length of the asymmetric one-dimensional padding.

[0068] By performing a series of operations—"filling, convolution, and slicing"—it is ensured that the output at any time step t depends only on the input at time step t and before, thus achieving causal constraints and ensuring that the length of the output sequence is strictly consistent with the length of the input sequence.

[0069] Specifically, for the TCN network in the 1st There are m residual layers and the m-th submodule, whose input is... That is, the TCN network in the 1st The operation flow for the intermediate feature tensor output by the residual layer and the (m-1)th submodule is as follows:

[0070]

[0071]

[0072] in, The initial input tensor of the TCN network; the hole rate As the depth of submodules increases exponentially, for example... ; is the activation function, such as GELU (Gaussian Error Linear Unit); p is the random inactivation rate.

[0073] After all After one residual layer and M submodules, the final output intra-block feature representation is as follows: Importantly, the TCN backbone network strictly maintains the length of the input sequence, meaning that the third dimension of the output is still the data block length. .

[0074] III. Feature Projection and Remapping

[0075] Feature projection and remapping are closely linked, together completing the transformation from independent intra-block features to the final structured token representation. This includes:

[0076] 3-1) Structural Reorganization and Linear Projection:

[0077] The intra-block feature representation corresponding to each data block output by the TCN backbone network Reshape the batch dimension (BC) and channel dimension. Merging them yields a two-dimensional tensor. , The length is the data block length. This allows for parallel, position-independent linear projections of the features of all data blocks.

[0078] Through the weight matrix The defined linear projection layer will determine the data block length. Mapping to the target dimension D yields the output of the linear projection layer. To preserve information from the original signal, a parallel residual connection is introduced. This parallel residual connection uses a one-dimensional transposed convolution (TConv) to transform the two-dimensional tensor... The feature dimension (i.e., the data block length dimension) also changed from The sampled value is upsampled to the target dimension D and then added to the output of the linear projection layer to obtain the fused feature tensor. .

[0079]

[0080]

[0081] in, The intra-block feature representation for each data block output by the TCN network, with dimension 1. ; for The reshaped 2D tensor has dimensions of . ; The weight matrix of the linear projection layer; For activation functions; for The representation after linear projection and activation; For a one-dimensional transpose convolution operation, the last dimension of the input tensor is transformed from... Mapping (upsampling) to D; This is the fused feature tensor obtained by adding the linear projection path and the residual path.

[0082] 3-2) Axle load mapping and final output:

[0083] fuse feature tensors Reshape back to a three-dimensional form, separating the merged dimensions to form a single dimension. The new tensor. At this point, the number of data blocks... It has become a new channel dimension.

[0084] Finally, to perform independent final calibration of the features for each channel (i.e., each data block), a 1×1 depthwise separable convolution is applied. ), along the channel dimension Each channel operates independently, preventing information mixing across channels (i.e., across data blocks), thus preserving the independence of each data block's representation. The final output is a structured coded representation. as follows:

[0085]

[0086] in, The output fused feature tensor has dimension . ; It is a reshaping operation that changes the dimension of the input tensor from Convert to ; This represents a depthwise separable convolution operation with a kernel size of 1×1, which operates along the channel dimension. Each channel operates independently to achieve feature calibration without mixing information from different data blocks (channels); The final output is a structured encoded representation with dimensions of . .

[0087] The final output structured coded representation E is a structured time-series coded representation used as input to the downstream predictive decoder. Each channel (the second dimension) encodes the deep temporal information of a traffic flow data block in the original traffic flow time series.

[0088] IV. Predictive Decoding

[0089] The structured encoded representation, the final output from step three, is received by the prediction decoder. (its dimensions are) And decode it into predicted values ​​of future traffic flow time series.

[0090] Preferably, the prediction decoder (or "prediction head") consists of one or more linear projection layers, multilayer perceptrons (MLPs), or other deep learning networks (such as Transformer decoding layers). For example, the prediction decoder could be a simple linear projection layer that maps the last dimension (feature dimension D) of the input tensor to a preset future prediction step. Output prediction results .

[0091]

[0092] Wherein, the prediction result It is a tensor, which is the predicted value of future traffic flow; the size H of one dimension of the tensor corresponds to the time step of the future prediction.

[0093] Preferably, in another embodiment, in order to specifically model the dynamics of different properties in the time series, a component-factored encoding strategy can be adopted. Specifically, this includes:

[0094] 1) For each batch of traffic flow time series input, a time series decomposition preprocessing step is performed, for example, using the existing STL decomposition (Seasonal and Trend decomposition using Loess, seasonal trend decomposition based on local weighted regression) to obtain trend components. Seasonal portion and residual components In traffic flow scenarios, these components have clear physical meanings. The trend component (T) reflects the long-term growth or decline trend of traffic flow caused by factors such as urban development and population changes. The seasonal component (S) reflects traffic patterns with fixed cycles, such as intraday morning and evening peak hours and weekly commuting patterns. The residual component (R) represents traffic flow fluctuations caused by random, non-periodic events such as traffic accidents and sudden weather changes.

[0095] 2) Define an “encoding module”, which is functionally a combination of performing step one (data segmentation), step two (extraction of temporal features within blocks) and step three (feature projection and remapping) as described in this invention.

[0096] 3) Instantiate three independent encoding modules that do not share weights, with parameters as follows: Trend components Seasonal portion and residual components The data are input into their respective encoding modules, where they are divided into blocks, temporal features within the blocks are extracted, features are projected, and remapped to obtain three independent structured encoded representations. , and Subsequently, these three independent structured coded representations can be merged (e.g., by addition or concatenation along the channel dimension) and fed together into the prediction decoder in step four to generate the final traffic flow prediction result based on component decomposition.

[0097] This approach allows each encoding module to focus on learning the dynamic patterns of specific components. For example, The encoder focuses on learning the long-term growth patterns of traffic flow. The encoder focuses on learning intraday commuting peak patterns, while The encoder focuses on capturing abnormal fluctuations caused by sudden events such as traffic accidents.

[0098] Preferably, in another embodiment, to better capture the dynamics of different patterns in the time series, the input traffic flow time series of each batch can be preprocessed before step one. This preprocessing includes, but is not limited to:

[0099] Reversible Instance Normalization (RevIN): This normalizes the input traffic flow time series instances in each batch to mitigate the impact of distribution shifts in the sequence data caused by factors such as holidays, large events, or road construction. After the reversible instance normalization process is completed, and the predicted value is output in the prediction decoding (step four), the predicted value is subjected to a corresponding inverse normalization operation to restore the numerical scale.

[0100] The traffic flow prediction method, system, and device based on intra-block convolution and axon-weight mapping of this invention replace the highly complex self-attention mechanism with a lightweight TCN, significantly reducing computational overhead and making it more suitable for real-time traffic prediction tasks. It also enhances the fine-grained capture of local traffic flow dynamics (such as the formation and dissipation of congestion). Its unique axon-weight mapping step generates a structured token representation, which, combined with the prediction decoder, constitutes an efficient and complete traffic flow prediction framework. This framework can seamlessly interface with downstream autoregressive models (such as large language models), serving as an efficient traffic flow time-series tokenization tool with strong compatibility and modular application value in complex traffic event analysis and decision-making.

[0101] Those skilled in the art should understand that the embodiments of the present invention are not limited to the specific structures and parameters described above. The number of network layers, convolutional kernel size, activation function, etc., can be adjusted and modified according to specific application scenarios and needs, and these modifications do not depart from the scope of protection claimed by the present invention.

[0102] In some embodiments, certain aspects of the above-described techniques may be implemented by one or more processors of a processing system executing software. The software includes one or more sets of executable instructions stored or otherwise tangibly implemented on a non-transitory computer-readable storage medium. The software may include instructions and certain data that, when executed by one or more processors, manipulate one or more processors to perform one or more aspects of the above-described techniques. The non-transitory computer-readable storage medium may include, for example, magnetic or optical disk storage devices, solid-state storage devices such as flash memory, cache, random access memory (RAM), or other non-volatile memory devices. The executable instructions stored on the non-transitory computer-readable storage medium may be source code, assembly language code, object code, or other instruction formats interpreted or otherwise executed by one or more processors.

[0103] Computer-readable storage media can include any storage medium or combination of storage media that can be accessed by a computer system during use to provide instructions and / or data to the computer system. Such storage media can include, but are not limited to, optical media (e.g., optical discs (CDs), digital versatile optical discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tapes, or magnetic hard disks), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or microelectromechanical systems (MEMS) based storage media. Computer-readable storage media can be embedded in a computing system (e.g., system RAM or ROM), fixedly attached to a computing system (e.g., a magnetic hard disk drive), removably attached to a computing system (e.g., an optical disc or universal serial bus-based (USB) flash memory), or coupled to a computer system via a wired or wireless network (e.g., network-accessible storage (NAS)).

[0104] Please note that not all activities or elements described in the general description above are essential, a particular activity or part of the apparatus may not be essential, and one or more further activities or included elements may be performed in addition to those described. Furthermore, the order in which the activities are listed does not necessarily represent the order in which they are performed. Moreover, these concepts have been described with reference to specific embodiments. However, those skilled in the art will recognize that various modifications and changes can be made without departing from the scope of this disclosure as set forth in the following claims. Therefore, the specification and drawings are to be considered illustrative rather than restrictive, and all such modifications are included within the scope of this disclosure.

[0105] The benefits, other advantages, and solutions to problems have been described above with respect to specific embodiments. However, any benefits, advantages, solutions to problems, and any features that may lead to or make any benefit, advantage, or solution more apparent should not be construed as critical, essential, or essential features of any or all claims. Furthermore, the specific embodiments disclosed above are merely illustrative, as the disclosed subject matter can be modified and implemented in different but equivalent ways that would be apparent to those skilled in the art benefiting from the teachings herein. There is no intention to limit the details of the constructions or designs shown herein other than those described in the claims. Therefore, it is apparent that the specific embodiments disclosed above can be altered or modified, and all such changes are considered to be within the scope of the disclosed subject matter.

Claims

1. A traffic flow prediction method based on in-block convolution and axis remapping, characterized in that, Comprising: data chunking: chunking the input traffic flow time series of each batch along the time axis to obtain a set of short sequence traffic flow data chunks; The traffic flow time series of each batch of the input is a three-dimensional tensor , wherein B is a batch size, C is a number of channels, and S is a length of the traffic flow time series; and the tensor representation of the set of traffic flow data blocks of the group of short sequences is a three-dimensional tensor with a batch dimension of BC , is a channel dimension, is a data block length; the channel dimension , wherein S is a length of the traffic flow time series of each batch of the input, and is a hyperparameter, is a data block length, is a sliding step; the blocking operation forms a four-dimensional tensor from the traffic flow time series of each batch of the input, which is a three-dimensional tensor , and combines the batch size B and the number of channels C into one dimension to form a three-dimensional tensor ; extracting intra-chunk time series features: using a temporal convolution network to independently extract the time series features of each data chunk contained in the three-dimensional tensor formed after the data chunking, to obtain an intra-chunk feature representation corresponding to each data chunk; Feature projection: reshaping the intra-block feature representation corresponding to each data block output by the temporal convolution network, merging the batch dimension BC and the channel dimension C into a two-dimensional tensor , is the data block length; mapping the data block length to the target dimension D through a linear projection layer defined by a weight matrix , obtaining the linear projection layer output; through a parallel residual connection, using a one-dimensional transpose convolution to upsample the feature dimension of the two-dimensional tensor , i.e. the data block length dimension, from to the target dimension D, and then adding it to the linear projection layer output, obtaining the fusion feature tensor ;​ remap: split the first dimension of the fused feature tensor , i.e. the dimension of size into and dimensions, thus forming a new tensor of dimension ; apply a 1x1 depthwise separable convolution along the channel dimension acting independently on each channel, resulting in a structured encoded representation ; Predictive decoding: receiving the structured encoded representation by a predictive decoder and decoding it into a prediction of the future traffic flow time series.

2. The traffic flow prediction method based on in-block convolution and axis remapping according to claim 1, characterized in that, the backbone network of the temporal convolution network is stacked by a plurality of residual layers, each residual layer contains a plurality of sub-modules; each sub-module is composed of a series of sequential operations: causal dilated one-dimensional convolution, root mean square layer normalization, activation function, random deactivation.

3. The traffic flow prediction method based on in-block convolution and axis remapping according to claim 2, characterized in that, The causal dilated one-dimensional convolution operation is realized by the following steps: one end of the input traffic flow time series representing the past time step is taken as the padding side to perform asymmetric one-dimensional padding; performing standard causal dilated one-dimensional convolution operation on the sequence after asymmetric one-dimensional padding, the causal dilated one-dimensional convolution operation uses a filter of size K and a causal dilated one-dimensional convolution operation with a dilation rate d on the time series X, which is defined as follows: , wherein, represents the output of the convolution operation at time step t; represents the input traffic flow time series; represents the convolution kernel, is its k-th weight; represents the size of the convolution kernel; represents the dilation rate, controlling the interval of convolution kernel weight sampling; is the index of the convolution kernel, from 0 to K-1; represents the historical input value before the current time step t, determined by the dilation rate d and the convolution kernel index k; slice the sequence output by the causal dilated one-dimensional convolution operation from the other end opposite to the padding side, remove part of the elements, and the length is equal to the length of the asymmetric one-dimensional padding.

4. The traffic flow prediction method based on in-block convolution and axis remapping according to claim 1, characterized in that, Also included in the formation of the three-dimensional tensor Layer normalization is then applied to each traffic flow data chunk obtained.

5. The block-wise convolution and axis remapping based traffic flow prediction method of claim 1, wherein, The prediction decoder is composed of one or more linear projection layers, multi-layer perceptron or deep learning network.

6. The traffic flow prediction method based on in-block convolution and axis remapping according to claim 1, characterized in that, Further comprising, before the data block, carrying out time series decomposition pretreatment on the batches of traffic flow time series to obtain a trend component , a seasonal component and a residual component ; the trend component T reflects the long-term growth or decline trend of traffic flow; The seasonal component S represents the traffic pattern with fixed period; the residual component R represents the traffic fluctuation caused by random, non-periodic events; the trend component , the seasonal component , and the residual component are respectively data chunking, extracting intra-block timing features, feature projection and remapping to obtain three independent structured coding representations , and ; Subsequently, the three independent structured coding representations are merged and input into the prediction decoder together to generate traffic flow prediction results based on component decomposition.

7. The block-wise convolution and axis remapping based traffic flow prediction method according to claim 6, characterized in that, The time series decomposition preprocessing adopts STL decomposition or its neural network variant to decompose the traffic flow time series of each batch into trend component T, seasonal component S and residual component R.

8. The traffic flow prediction method based on block-wise convolution and axis remapping according to any one of claims 1-7, characterized in that, It also includes preprocessing the input traffic flow time series of each batch before the data chunking; the preprocessing includes reversible instance normalization operation on the input traffic flow time series of each batch, and after outputting the prediction value in the prediction decoding step, corresponding inverse normalization operation is performed on the prediction value to restore the value scale.

9. A system for traffic flow prediction based on intra-block convolution and axis remapping, implementing the method for traffic flow prediction based on intra-block convolution and axis remapping according to any one of claims 1-8, characterized in that, Comprising data receiving module, data chunking module, intra-chunk feature extraction module, feature projection and remapping module and prediction decoding module; The data receiving module receives the input traffic flow time series of each batch; The data chunking module chunks the traffic flow time series along the time axis to obtain a set of short sequence traffic flow data chunks, and the tensor representation of the set of short sequence traffic flow data chunks is a three-dimensional tensor; The intra-chunk feature extraction module independently extracts the time series features inside the three-dimensional tensor formed after the data chunking using a temporal convolution network to obtain an intra-chunk feature representation corresponding to each data chunk; The feature projection and remapping module performs feature projection and remapping on the intra-chunk feature representation to generate a structured coding representation; The prediction decoding module receives the structured encoded representation via a prediction decoder and decodes it into predicted values of the future traffic flow time series.

10. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program, when executed by a processor, implements the steps of the method for traffic flow prediction based on in-block convolution and axis remapping according to any one of claims 1-8.

Citation Information

Patent Citations

  • Traffic prediction method based on adaptive spatial self-attention map convolution

    CN112801404A

  • Non-stationary traffic prediction method based on wave flow decomposition and time delay perception

    CN120409841A