Heterogeneous traffic flow spatial spillover prediction method inspired by fick's law
By using a method based on Fick's law, the traffic flow sequence is decomposed into a main time component and a residual representation, and the local propagation intensity is dynamically adjusted. This solves the problems of error accumulation and heterogeneous traffic flow processing in existing models, and achieves efficient traffic flow prediction.
Patent Information
- Application Number
- CN202611703892.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
Existing traffic flow prediction models are prone to error accumulation when dealing with the evolution of the main body and local fluctuations. The spatial propagation mechanism cannot dynamically adjust the local propagation intensity and is difficult to effectively handle the differences in heterogeneous traffic flows and low or intermittent flow phenomena.
Inspired by Fick's law, this method maps traffic flow sequences to a unified hidden representation, decomposes them into main time components and residual representations, adjusts the adjacency matrix using node-level spatial overflow coefficients, constructs dynamic hyperedges through local spectral propagation and higher-order propagation, and performs gating operations in conjunction with effective flow probability to optimize the flow regression objective and spatial overflow coefficient constraints.
Accurately characterizing the spatial spillover effect of heterogeneous traffic flows enhances the model's ability to perceive the associated states of complex road networks and improves its predictive robustness in multi-type traffic scenarios across all time periods.
Smart Images

Figure CN123182425A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic data prediction technology, specifically to a method for predicting spatial overflow of heterogeneous traffic flows inspired by Fick's law. Background Technology
[0002] Traffic flow prediction requires extrapolating future traffic conditions based on historical observation data from road monitoring points, thus providing a basis for traffic operation monitoring and control. Existing methods typically rely on time series models or graph neural networks to extract the periodic trends of nodes and aggregate spatial information using adjacency relationships. However, actual road network traffic observation data simultaneously contains relatively smooth main temporal evolution and short-term local state fluctuations. Most existing prediction models process these two types of changes through the same data propagation process, which easily leads to the mixing of periodic evolution characteristics and local disturbance characteristics, resulting in error accumulation during multi-step prediction.
[0003] Existing road propagation mechanisms have limitations when dealing with spatial structural relationships. If the model relies on a fixed, predefined road map for spatial information aggregation, it is often difficult to dynamically adjust the local interaction intensity between different road segments based on the current real-time traffic congestion or sparse state. If a completely data-driven relational learning approach is adopted, it is easy to deviate from the topological constraints of actual physical roads, resulting in connections inconsistent with the real road network structure. Furthermore, real road networks involve a mix of vehicle types, and existing models often use shared hidden representations to handle heterogeneous traffic flows, weakening the differences in flow scale and spatial interaction intensity between different traffic types. Moreover, existing spatial propagation operations mostly use adjacent node pairs as the basic unit, making it difficult to effectively extract and represent the joint relationships formed by multiple discrete road nodes under the same traffic conditions.
[0004] Furthermore, low or intermittent traffic flow is a frequent occurrence in real-world traffic scenarios. Most existing prediction schemes rely on a single continuous amplitude regression target for network training and prediction. When faced with sparse nighttime observations or occasional zero-value data from the road network, the underlying network calculations are prone to generating continuous small non-zero floating-point values, making it impossible to accurately distinguish between continuous amplitude fluctuations and the discrete state of whether there is effective vehicle passage. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a spatial spillover prediction method for heterogeneous traffic flow inspired by Fick's law. This method solves the problem of error accumulation caused by the mixed processing of main evolution and local fluctuations in existing traffic flow prediction models, as well as the problem that the spatial propagation mechanism cannot dynamically adjust the local propagation intensity according to real-time traffic conditions while following the road network topology.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A spatial spillover prediction method for heterogeneous traffic flows inspired by Fick's law includes the following steps:
[0008] Read historical heterogeneous traffic flow sequences and road directed graphs, and map the historical heterogeneous traffic flow sequences into a unified hidden representation;
[0009] The unified hidden representation is decomposed into a main temporal component and a residual representation;
[0010] The residual representation is projected to generate a key representation and a value representation;
[0011] Node-level spatial overflow coefficients are generated based on the residual representation, the original adjacency matrix corresponding to the directed road graph is adjusted using the node-level spatial overflow coefficients, and local spectral propagation is performed on the value representation.
[0012] A dynamic hyperedge is constructed using the value representation and the key representation after local spectral propagation, and higher-order propagation is performed to output the residual prediction result.
[0013] The main time component is projected onto the prediction window to generate the main trend prediction result;
[0014] Estimating the effective flow probability based on the aforementioned historical heterogeneous traffic flow sequence;
[0015] The residual prediction result is added to the main trend prediction result, and the effective flow probability is used to perform gating operation on the added result to generate the final prediction result. During the training phase, the flow regression target, the effective flow identification target, and the spatial overflow coefficient constraint target are jointly optimized.
[0016] Preferably, mapping the historical heterogeneous traffic flow sequences to a unified hidden representation includes:
[0017] Perform linear mapping calculations along the feature dimensions on the historical heterogeneous traffic flow sequences to generate traffic state embeddings;
[0018] Within the network model, node spatial embedding and adaptive spatiotemporal embedding are set, and the node spatial embedding and the adaptive spatiotemporal embedding are extended along the batch dimension and the historical time dimension.
[0019] The unified hidden representation is obtained by concatenating the traffic state embedding, the expanded node space embedding, and the expanded adaptive spatiotemporal embedding along the feature dimension.
[0020] Preferably, the unified hidden representation is decomposed into a main temporal component and a residual representation, including:
[0021] The endpoint replication method is used to perform data filling operations at both ends of the time dimension of the unified hidden representation to generate a filled extended representation;
[0022] For the padding extended representation, a one-dimensional convolutional sliding computation in the temporal dimension is performed using a learnable temporal filter for each hidden channel to extract the main temporal component;
[0023] The difference between the unified hidden representation and the main temporal component is calculated to obtain the residual representation.
[0024] Preferably, projecting the residual representation to generate a key representation and a value representation includes:
[0025] The residual representation is mapped to multiple prototype global feature representations, and the prototype global feature representations are divided into independent components along the feature dimension;
[0026] Using a learnable mapping parameter matrix configured independently for each of the prototypes, the basic key representation and basic value representation of each of the prototypes are calculated respectively;
[0027] Multiple cross-category interactive perspectives are set up, and a weighted summation operation is performed on the basic key representation and the basic value representation in the prototype dimension using learnable blending parameters to generate the fused key representation and the value representation.
[0028] Preferably, the process includes generating node-level spatial overflow coefficients based on the residual representation, adjusting the original adjacency matrix corresponding to the directed road graph using the node-level spatial overflow coefficients, and performing local spectral propagation on the value representation, including:
[0029] The residual representation at the corresponding time step is processed using a multilayer perceptron, and a positive node-level spatial overflow coefficient is generated by smoothing and approximating rectified linear unit function constraints.
[0030] The initial connection values in the original adjacency matrix are adjusted using the node-level space overflow coefficient to construct a state-dependent adjacency matrix;
[0031] Based on the state-related adjacency matrix, a corresponding state-related graph Laplacian matrix is established. After scaling the eigenvalue range of the state-related graph Laplacian matrix, the local spectral propagation is performed on the value representation under each cross-category interaction perspective using Chebyshev polynomials.
[0032] Preferably, a dynamic hyperedge is constructed using the value representation and the key representation after local spectral propagation, and higher-order propagation is performed to output the residual prediction result, including:
[0033] The value representations after local spectrum propagation are fused along the cross-category interaction perspective to generate a comprehensive value representation, and the key representations are averaged along the cross-category interaction perspective to generate a comprehensive key representation;
[0034] Calculate the inner product of the composite value representation and the transpose of the composite key representation, and take the average value of the node relationships for different prototype combinations to generate a node relationship heatmap;
[0035] The set of central nodes is determined by summing the corresponding dimensions of the node relationship heatmap, and the Top-K associated nodes with the highest association strength are selected for each central node to construct the dynamic hyperedge. A dynamic node-to-hyperedge association matrix is established based on the number of member nodes retained in each hyperedge.
[0036] Based on the dynamic node-to-hyperedge association matrix, a hyperedge degree matrix and a node degree matrix are generated respectively. The node features are aggregated to the dynamic hyperedge in sequence, and the learnable weight matrix is combined with the backpropagation from the dynamic hyperedge to the node to generate a high-order node feature representation. The residual prediction result is then output through linear mapping.
[0037] Preferably, the main time component is projected onto the prediction window to generate the main trend prediction result, including:
[0038] A linear transformation operation on the time dimension is performed on the main time component using a learnable time projection matrix, mapping the historical time dimension to the target predicted time dimension;
[0039] The feature projection matrix is used to perform a linear mapping calculation of the category dimension, which transforms the hidden feature dimension into the actual traffic category dimension, and outputs the subject trend prediction result that is strictly aligned on the tensor shape.
[0040] Preferably, estimating the effective flow probability based on the historical heterogeneous traffic flow sequence includes:
[0041] The historical heterogeneous traffic flow sequence is processed using a two-layer one-dimensional convolutional network along the historical time dimension to extract event features;
[0042] The event features are subjected to average pooling along the time dimension. The prediction time dimension is reconstructed using learnable projection parameters and a multilayer perceptron, and feature space mapping is performed. After being processed by the Sigmoid function, an event probability tensor is output. The elements in the event probability tensor represent the probability of effective traffic flow at each time step, each road node, and each traffic category.
[0043] Preferably, the residual prediction result is added to the main trend prediction result, and the effective flow probability is used to perform a gating operation on the added result to generate the final prediction result, including:
[0044] The residual prediction tensor corresponding to the residual prediction result is added to the main trend prediction tensor corresponding to the main trend prediction result to generate the added tensor.
[0045] The summed tensor is multiplied element-wise with the event probability tensor corresponding to the effective flow probability. The event probability tensor is used as a soft gating coefficient to scale the amplitude at the corresponding position of the summed tensor, generating the final prediction tensor as the final prediction result.
[0046] Preferably, during the training phase, the traffic regression objective, the effective traffic identification objective, and the spatial overflow coefficient constraint objective are jointly optimized, including:
[0047] By combining the regression task weights and the event task weights, an overall joint training objective is constructed, consisting of the traffic regression objective, the effective traffic identification objective, and the spatial overflow coefficient constraint objective. The network parameters are then updated using the backpropagation algorithm.
[0048] When calculating the traffic regression target, a mask is used to eliminate errors caused by missing observation locations, and batch updates are skipped when the training batch does not contain valid observation data.
[0049] When calculating the effective traffic identification target, the effective traffic label is extracted by combining the preset event threshold, and the focus loss algorithm with positive and negative sample balance coefficient and category weight is used for calculation;
[0050] When calculating the spatial overflow coefficient constraint target, a quadratic constraint around a constant 1 is applied to the node-level spatial overflow coefficients generated by each spatial encoding layer of the network model, and the average is taken for each network layer.
[0051] This invention provides a spatial overflow prediction method for heterogeneous traffic flow based on Fick's law. It has the following advantages:
[0052] 1. This invention decomposes the unified hidden representation into a main time component and a residual representation, and introduces a node-level spatial spillover coefficient based on the current traffic state to dynamically adjust the original road adjacency matrix for the residual representation. This avoids the error accumulation caused by the conventional model mixing the periodic evolution of traffic flow with short-term local fluctuations, and adaptively reflects the non-uniform dynamic propagation intensity between adjacent nodes under different micro-road conditions, thereby accurately characterizing the spatial spillover effect of heterogeneous traffic flow in the local road network.
[0053] 2. This invention effectively solves the technical challenges of sharing traffic flow features across multiple categories and extracting high-order spatial relationships by projecting the residual representation into latent space components containing independent mapping relationships and establishing a cross-category interactive perspective. At the same time, it constructs dynamic hyperedges based on the fused key-value representation for high-order graph propagation. While preserving the differences in traffic characteristics of each traffic category, it realizes the cross-transmission of state changes between different categories. Furthermore, by using the hyperedge structure to overcome the binary relation limitation of a single physical connected edge, it organizes multiple discrete nodes exhibiting common traffic change characteristics into the same spatial neighborhood for feature aggregation, thereby enhancing the model's ability to perceive the overall associated state of complex road networks.
[0054] 3. This invention introduces an independent event perception branch to estimate the probability of effective traffic flow, and uses element-wise gating to directly regulate the sum of residual prediction and main trend prediction. Combined with the overall joint training objective including focus loss and spatial regularization term, it effectively solves the defect of traditional continuous amplitude regression that is prone to continuous small floating-point errors when dealing with low traffic flow or intermittent traffic flow. By jointly modeling the traffic flow regression task and the effective traffic flow identification task, the model can reasonably handle zero traffic flow state caused by sparse nighttime observations of the road network or occasional events, and improve the prediction robustness of the system in multi-class traffic scenarios at all times. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] See attached document Figure 1 This invention provides a spatial overflow prediction method for heterogeneous traffic flow inspired by Fick's law. This method takes historical heterogeneous traffic flow sequences and a directed road graph as input, and outputs traffic flow prediction data for multiple future time steps, each road node, and each traffic category. Node spatial embedding and adaptive spatiotemporal embedding are configured as learnable representations within the model, requiring no additional input of holidays, weather, vehicle trajectories, or external variables. The prediction method includes the following steps:
[0058] S1, read historical heterogeneous traffic flow sequences and road directed graphs, and map traffic observation data into a unified hidden representation;
[0059] S2, extract the main time component in the time dimension of the unified hidden representation, and subtract the main time component from the original unified hidden representation to obtain the residual representation;
[0060] S3 projects the residual representation onto multiple prototypes, establishes independent key and value mappings for each prototype, and forms multiple cross-category interactive perspectives through learnable parameters;
[0061] S4. Generate positive node-level spatial overflow coefficients based on the current residual state, adjust the road adjacency matrix using the node-level spatial overflow coefficients to construct the state correlation graph Laplace matrix, and perform local spectrum propagation using Chebyshev polynomials.
[0062] S5. Construct a node relationship heatmap using the value representation fused after local spectrum propagation and the key representation averaged along the interactive perspective. Select the central node and its Top-K associated nodes to construct a dynamic hyperedge. Perform higher-order propagation from node to hyperedge and from hyperedge to node in sequence.
[0063] S6 projects the main time component from the historical window to the prediction window, generating the main trend prediction result;
[0064] S7 extracts event features from the original historical heterogeneous traffic flow sequence and estimates the probability of effective flow occurring at each road node and traffic category in the future;
[0065] S8 adds the residual prediction result of the higher-order propagation output to the main trend prediction result, and uses the effective flow probability to perform element-wise gating operation on the added result to generate the final prediction result. During the training phase, it jointly optimizes the flow regression target, the effective flow identification target, and the spatial overflow coefficient constraint target.
[0066] During the execution of the prediction system, step S1 mainly involves transforming the feature dimensions of the multi-dimensional raw traffic observation data to generate a unified hidden representation suitable for deep learning network computation. Specifically, this includes the following sub-steps:
[0067] S101, read the historical heterogeneous traffic flow sequence and the directed road graph containing road topological relationships. Based on the actual traffic monitoring scenario, the input tensor representation of the historical heterogeneous traffic flow sequence is set as follows: .in, Indicates the batch size of the data input. Indicates the duration of the history window. This represents the total number of road nodes. This represents the total number of traffic categories monitored by the system. For example, traffic categories may include different types of vehicle sequences such as passenger cars and freight trucks. The duration of the historical window corresponds to the number of historical observation steps within a preset sampling interval. The directed road graph is pre-built based on the actual physical road network connections, and the order of nodes in its corresponding original adjacency matrix is related to the input tensor. The node dimensions are arranged in a corresponding order. The set historical window only retrieves observation data before the prediction start time for calculation.
[0068] S102 performs a linear mapping calculation along the feature dimension on the input historical heterogeneous traffic flow sequence to generate a traffic state embedding. The mathematical expression of this calculation is:
[0069] ;
[0070] In the formula, This represents the traffic state embedding generated by the mapping, which carries the basic state feature information of various traffic flows; as well as These represent the learnable weight parameters and learnable bias parameters, respectively, that perform the linear mapping operation in the network model. From the perspective of data processing principles, raw traffic flow data typically has different numerical distributions and dimensions. Projecting it onto a high-dimensional feature space through a learnable parameter matrix helps the network extract deep features. For The linear mapping calculation can be implemented by those skilled in the art using a fully connected layer structure or a one-dimensional convolution operation. The basic operation rules are well-known in the field and will not be elaborated here.
[0071] S103, set up node space embedding within the model structure and adaptive spatiotemporal embedding Node space embedding Used to represent the spatial differences between different road nodes, such as the inherent differences in traffic attributes of different intersections due to their geographical location, its tensor shape is initialized as a two-dimensional parameter matrix corresponding to the number of road nodes. Adaptive Spatiotemporal Embedding This is used to supplement potential spatiotemporal evolution patterns that are difficult to represent directly by predefined road structures, such as the synchronous congestion during morning and evening rush hours in commercial districts that are not directly limited by physical road network connections. Node spatial embedding With adaptive spatiotemporal embedding The parameters are updated throughout the overall training process of the model.
[0072] S104, embed the node space With adaptive spatiotemporal embedding Extend the operation along the batch dimension and the historical time dimension. Because... and The batch size and time length dimension parameters are missing during initialization. To meet the requirements of the deep learning computing framework, these parameters need to be copied and filled in the corresponding dimensions so that the expanded tensor shape is consistent with the traffic state embedding in the batch and time dimensions. Alignment. Embed traffic status. Embedded Node Space and the extended adaptive spatiotemporal embedding By concatenating along the feature dimensions, a unified hidden representation is obtained. The mathematical expression of its operational logic is as follows:
[0073] ;
[0074] In the formula, the symbol This indicates splicing along the feature dimension. Traffic state embedding is defined. The feature dimension included is Node space embedding The feature dimension included is Adaptive spatiotemporal embedding The feature dimension included is After concatenating the feature dimensions, the output is the unified hidden representation. The feature dimension is set to It satisfies the relation .
[0075] In the specific implementation process, , and The specific values are configured based on the scale of the road network nodes and computing resources. In a specific prediction scenario for a road node, the dimension of the traffic state embedding features can be configured. The feature dimension of the node space embedding is 24. The adaptive spatiotemporal embedding feature dimension is 32. The feature dimension of the unified hidden representation after concatenation is 72. The value is 128. The output is the unified hidden representation. This serves as input data for subsequent traffic decomposition steps.
[0076] In step S2 of the prediction method, actual traffic observation data simultaneously contains both basic temporal evolution and local short-term variations. Treating both types of variations through the same spatial propagation process can easily lead to a mixture of characteristics between periodic demand and local disturbances. Therefore, this step processes the unified hidden representation along a temporal dimension, separating the smooth evolution component from the local fluctuation component for subsequent network branches to calculate separately. The specific processing includes the following sub-steps:
[0077] S201 sets a learnable temporal filter per hidden channel along the temporal dimension of the unified hidden representation. The specific network implementation for per-hidden-channel filtering involves performing independent one-dimensional convolutional sliding calculations for each feature dimension in the unified hidden representation, with no sharing of convolutional weights between channels. The kernel length of this temporal filter is set to... In an implementation scenario based on a specific historical window, the length of the time filter kernel can be configured. The value is 13.
[0078] To ensure the time series length remains consistent before and after filtering, an endpoint copying method is used to pad the unified hidden representation at both ends of the time dimension. Endpoint copying involves repeatedly padding the feature data at the beginning and end of the time series with the original values, where the length of the padding at each end is determined by the length of the filtering kernel. After performing adaptation calculations and data padding, a corresponding padded extended representation is generated. .
[0079] S202, using the set time filter to perform padding extension representation We perform time-dimensional calculations to extract the main time component from the observed data. This main time component is used to characterize the relatively smooth overall evolution of traffic flow changes. The mathematical expression for the extraction calculation is as follows:
[0080] ;
[0081] In this formula, Indicates the main time component at time step and the Feature extraction values on each hidden channel; Indicates the time filter at the 1st A hidden passage and located within the time window. Learnable filter weights; The fill extension indicates the data value at the corresponding sliding calculation position; Indicates the first The learnable bias parameters correspond to each hidden channel. For the filtering and extraction operation of sequence data in the time dimension, those skilled in the art can use a one-dimensional convolutional network layer combined with a sliding window. The basic forward propagation and backward update rules of its weight parameters are well-known techniques in the field and will not be elaborated here.
[0082] S203, after obtaining the main temporal components, calculate the difference between the original unified hidden representation and the main temporal components to obtain the corresponding residual representation. Actual traffic flow observation data typically includes both main temporal evolution and short-term local variations. Through difference calculation, the residual representation strips away the periodic trend in traffic flow at the data level, serving to accommodate short-term local disturbances relative to the main temporal evolution. The mathematical expression of this calculation is:
[0083] ;
[0084] In this formula, This represents the residual obtained from decoupling. This represents the original unified hidden representation generated in step S1. This represents the extracted main time component. After the above decomposition operation, the subsequent network structure is processed according to the traffic flow variation characteristics. Residual representation. Proceed to the next processing step of the prediction method to perform subsequent road spatial propagation calculations; Main temporal component Skip the local road propagation and hypergraph propagation steps and directly enter the trend projection network branch.
[0085] In step S3 of the prediction method, a feature space reconstruction operation is performed on the residual representation output in step S2. Real-world traffic networks contain different types of vehicles, such as passenger cars and freight trucks. Different traffic categories share the same road environment, but their flow rates and spatial influence vary. This processing addresses these category differences by establishing latent space components, enabling the prediction model to extract and share cross-category traffic flow information from multiple perspectives. The specific processing includes the following sub-steps:
[0086] S301 maps the residual representation to multiple prototypes through a linear projection operation. Each prototype serves as a latent space component expressing potential class relationships, used to distinguish heterogeneous traffic flows in the deep learning network. The total number of traffic categories input to the prediction model is set to... The corresponding generation One prototype. The mathematical expression for this linear projection calculation is:
[0087] ;
[0088] In the formula, This represents the overall feature representation of the prototype generated by projection; This represents the residual output after the preceding flow decomposition step; This represents the learnable projection matrix that enables feature space transformation. The network model internally configures this learnable projection matrix based on a fully connected network layer structure. This learnable projection matrix is configured to assist in achieving dimensionality symmetry in subsequent partitioning operations. The total dimension of the output features can be divided by the total number of traffic categories. Divisible by.
[0089] S302, Representing the overall features of the prototype Divide equally along the feature dimension into There are 1 independent components. Let the set of components after partitioning be . These components correspond to the potential characteristics of different traffic categories at the business computing level, and each component establishes a data correspondence with a specific prototype. For each independent component corresponding to a prototype, key mappings and value mappings are established separately. For the first... The operational equations for key-value representations of prototypes are as follows:
[0090] ;
[0091] ;
[0092] In the operational equation, The value range corresponds to 1 to ; Indicates the first The basic key representation of the prototype generation; Indicates the first The basic value representation generated by each prototype; and Represented as the first Each prototype has an independently configurable learnable mapping parameter matrix. Through this independently mapped network structure design, the model can preserve the differentiated feature representations of each traffic category within the latent space.
[0093] S303, after obtaining the basic key representation and basic value representation of each prototype, sets the network model internally. This approach employs a cross-category interaction perspective, utilizing learnable hybrid parameters to perform weighted summation on the prototype dimension. While preserving the differences in features within its own category, it fuses feature data from other traffic categories. Taking a real-world business scenario as an example, when truck traffic flow in the road network experiences a sudden change, the change in its traffic status can be propagated to the passenger vehicle category's value representation through a weighted summation process, thereby fitting the mutual influence between different vehicle types at the feature space level. For the objective... A prototype in a selected cross-category interaction perspective The mathematical expression of the computational logic for key and value representations under the given conditions is as follows:
[0094] ;
[0095] ;
[0096] In the formula, Indicates the generated target number A prototype in perspective The value after fusion is represented; Indicates the generated target number A prototype in perspective The fused key representation; Indicates the prototype index number of the traversal; and These correspond to the numbers calculated and obtained in sub-step S302, respectively. The basic value representation and basic key representation of a prototype; and The learnable hybrid parameters, which are numerically updated as the model is trained, are used as cross-fusion weights when computing value representations and key representations, respectively.
[0097] During the model parameter configuration phase, the total number of interactive viewpoints The hyperparameters can be set as presets based on the processor's computational load, such as the total number of viewpoints. Set to 4; learnable network tensor variables based on learnable hybrid parameter configuration. For the linear mapping parameters and fusion weights configured in the above network computation, those skilled in the art can use the standard gradient descent algorithm for deep learning models to update the parameters. The basic optimization process is well-known in the field and will not be elaborated here. Generated through multi-view weighted summation. as well as It is configured as a key-value representation for a specific category and output to subsequent steps to participate in subsequent road space propagation calculations.
[0098] In step S4 of the prediction method, a node-level spatial overflow coefficient is generated based on the current residual state. This coefficient is used to adjust the road adjacency matrix and perform local spectral propagation.
[0099] In Fick's law, the diffusion flux of matter is dynamically affected by the diffusion coefficient of the medium. Corresponding to the road network traffic flow scenario, the spatial spillover of local sudden traffic congestion or short-term fluctuations is similar to the diffusion process of matter to the surrounding area. The node-level spatial spillover coefficient characterizes the dynamic conduction capacity of each road node as a diffusion medium.
[0100] Predefined directed road graphs are typically static structures, which cannot flexibly adapt to the dynamic effects of traffic congestion or sparseness in real-world business data. This step, however, allows the spatial propagation range to still be determined by the road topology, while simultaneously enabling the intensity of local interactions between different nodes to dynamically change with the current traffic conditions. This allows for the simulation of non-uniform diffusion and spillover processes driven by actual traffic conditions using deep networks. The specific processing steps include the following sub-steps:
[0101] S401, for historical time steps The residual state at the current time step is processed using a multilayer perceptron to generate the corresponding node-level spatial overflow coefficient. The mathematical expression of the calculation process is as follows:
[0102] ;
[0103] In the formula, Indicates time step The set of space overflow coefficients for each generated node; Indicates at time step The residual representation; MLP represents a multilayer perceptron; This represents a smoothed approximation of a rectified linear unit function. Physically, the spatial spillover coefficient represents the activity of traffic flow propagation between adjacent road nodes and must be constrained to be a positive number. Combined with specific network layers, the multilayer perceptron is internally configured as a cascaded structure containing fully connected layers and activation functions, mapping multidimensional residual features to scalar values, and then employing... The function applies a positive activation constraint to its output.
[0104] S402, based on the obtained node-level spatial overflow coefficient, combined with the original adjacency matrix of the directed road graph. Construct a state-dependent adjacency matrix. This matrix is used to adjust the weights of connected edges while preserving the physical road network connectivity. The calculation rules for its matrix elements are as follows:
[0105] ;
[0106] In the formula, Indicates at time step Constructed state-dependent adjacency matrix Middle node To the node Connection weights; and Representing nodes respectively and nodes At time step Spatial overflow coefficient; Represents the nodes in the original adjacency matrix To the node The initial connection value. According to this calculation rule, when there are no nodes in the physical road diagram... To the node When connecting, Zero, It remains at zero; when a connection exists, its local propagation strength is jointly regulated by the spatial overflow coefficients of the two endpoints.
[0107] This calculation rule concretizes the technical concept of Fick's Law into a basic mathematical operator, namely, the intensity of flow fluctuation diffusion between adjacent nodes is jointly determined by the medium properties of the road network space at both ends, enabling the model to accurately characterize the adaptive spatial spillover effect of heterogeneous traffic flow under different micro road conditions.
[0108] S403, based on the constructed state-related adjacency matrix, establishes the corresponding state-related graph Laplacian matrix and performs local spectrum propagation using Chebyshev polynomials. The mathematical expression for calculating the graph Laplacian matrix is:
[0109] ;
[0110] In the formula, The Laplace matrix represents the state-related graph; Represents the adjacency matrix related to the state The corresponding degree matrix is calculated by... The row elements are summed to form the diagonal values, and the off-diagonal elements are set to zero. This applies to the Laplace matrix. Scaling is performed on the eigenvalue range to generate a scaled form. This scaling process maps the matrix eigenvalues to the interval [-1, 1] to satisfy the convergence condition of the polynomial expansion. Subsequently, local propagation is performed on the value representations from each interaction perspective, mathematically expressed as:
[0111] ;
[0112] In the formula, Indicates the target number A prototype in perspective and time step The value generated after local spectral propagation is performed. Indicates scaling format; Indicates the first Chebyshev polynomial of order 1; This represents the corresponding learnable coefficient; This indicates the maximum propagation order set. In the specific computing architecture configuration, the maximum propagation order can be... The value is set to 3; The value after pre-fusion indicates the value at time step. The data components. The underlying derivation of frequency domain filtering on a graph structure using Chebyshev polynomials can be implemented by those skilled in the art with reference to the general theory of signal processing, and will not be elaborated here.
[0113] S404, after completing local spectral propagation, performs feature dimension recombination operations on the generated value representation and the preceding key representation, respectively, to generate the final key-value representation used to construct dynamic spatial relationships. The propagated value representations are then fused along the interaction perspective, and the key representations are averaged along the interaction perspective. The mathematical expression of the operation is:
[0114] ;
[0115] ;
[0116] In the formula, This represents the comprehensive value obtained after fusion calculation along the interactive perspective, used to carry traffic status information propagated through the road space; This represents the composite key representation obtained by averaging along the interactive perspective. and The prototype index number of the traversal; Total number of categories; The total number of interactive viewpoints set; These are learnable hybrid parameters that are updated synchronously with the backpropagation of gradients from network layers; This represents the key representation component after pre-fusion. The generated... and The output is used in the propagation steps of the dynamic hypergraph as the underlying input data for constructing higher-order relations in the space.
[0117] In step S5 of the prediction method, a higher-order relationship is constructed using the key-value representation output from the previous step. Conventional road propagation uses node pairs as the basic unit, which is insufficient to express the joint relationships formed by multiple road nodes under the same traffic conditions. Through dynamic spatial overflow hypergraph propagation, the network model can transcend the binary relation constraints connecting single physical road segments, organizing multiple discrete nodes exhibiting common traffic change characteristics into the same higher-order spatial neighborhood for feature aggregation. The specific processing includes the following sub-steps:
[0118] S501 constructs a node relationship heatmap using the value representation fused after local road propagation and the key representation averaged along the interaction perspective. This calculation measures the similarity of different nodes in the hidden feature space through matrix inner products. The average value of node relationships for different prototype combinations is calculated; the mathematical expression of the calculation process is as follows:
[0119] ;
[0120] In the formula, Indicates at time step The generated comprehensive node relationship heatmap; This represents the composite value generated from the preceding steps and fused along the interactive perspective; This represents the composite key representation generated by the preceding steps and averaged along the interactive perspective; symbol This represents the matrix transpose operation; Indicates the total number of traffic categories; and This represents the prototype index number of the unequal traversal in the summation calculation.
[0121] S502, based on a node relationship heatmap, calculates the overall association strength of each node, selects a central node, and constructs a dynamic hyperedge for each central node by choosing the node with the highest association strength. The model sums the relationship heatmap along the corresponding dimensions to determine the set of central nodes. The mathematical expression of the operation is as follows:
[0122] ;
[0123] In the formula, This represents the selected set of center nodes; Indicates the total number of road nodes; Nodes in a node relationship heatmap With nodes The associated numerical value; This represents the total number of hyperedges, and its value is constrained to not exceed the total number of road nodes. ; This represents the operation of retrieving a set of items with the largest values. Let the first item be... The center node of the superedge is The dynamic node-to-hyperedge association matrix The element calculation logic is as follows:
[0124] ;
[0125] In the formula, Represents a node With super-edge Connection weights between them; This represents the number of member nodes retained for each hyperedge, and its value does not exceed the total number of road nodes. In a specific implementation scenario based on road traffic flow prediction, the number of member nodes retained for each hyperedge can be determined by considering the road network size. The value is set to 16. This construction rule allows multiple nodes that are not directly physically adjacent but share common traffic changes to be organized into the same higher-order spatial neighborhood.
[0126] S503, based on the constructed incidence matrix, performs higher-order hypergraph propagation. The propagation process consists of aggregation operations from nodes to hyperedges and propagation operations from hyperedges to nodes. The mathematical expressions for these operations are as follows:
[0127] ;
[0128] ;
[0129] In the formula, This represents the hyperedge feature representation generated after node features are aggregated to the hyperedge; This represents the higher-order node feature representation generated after backpropagation from the hyperedge to the node; Represents the hypermarginality matrix; Represents the node degree matrix; This represents the learnable weight matrix configured during hyperedge propagation; For the correlation matrix The transpose of the matrix. To ensure the consistency of matrix forward propagation operations, the hypermarginal matrix... By analyzing the correlation matrix The degree matrix is generated by summing the elements of each column and placing them on the diagonal. By analyzing the correlation matrix The sum of each row element is calculated and placed on the diagonal to generate the result.
[0130] S504 collects high-order node feature representations from different prototypes and concatenates them along the feature dimensions. The concatenated feature tensor is transformed by a linear mapping layer to obtain the residual space representation, which then reaches the output branch composed of the prediction head. For the network structure of the prediction head, engineers can use network branches containing fully connected layers or one-dimensional convolutional layers to map the dimensions of deep implicit features to target business dimensions corresponding to the prediction time window length and the number of traffic categories. The prediction head then maps this representation to residual predictions within the future window. At the physical state level of traffic flow, residual prediction It strips away the daily cyclical patterns, corresponding to short-term fluctuations in traffic flow caused by sudden events such as traffic accidents and congestion in the road network. The output residual prediction... It is then passed on to subsequent data fusion and joint training steps.
[0131] In step S6 of the prediction method, the main temporal component is projected along the time dimension from the historical window to the prediction window to generate the main trend prediction. In the overall prediction architecture, the residual space modeling path handles local road propagation and short-term disturbances, while the main trend path constructed in this step is used to extract the main temporal evolution of the nodes themselves. The two complement each other in the network structure. The specific processing includes the following sub-steps:
[0132] S601: Within the network model, the main time component output from the traffic decomposition step is received, and its time dimension is mapped using a configured learnable time projection matrix. The initial time dimension of the main time component corresponds to the length of the input historical window. Through a linear transformation operation of this time projection matrix, the historical time dimension is directly mapped to the target prediction time dimension. At the network implementation level, those skilled in the art can configure a fully connected network layer to perform the function of this time projection matrix, with its input feature dimension set to the number of historical time steps and its output feature dimension set to the number of future time steps to be predicted. This operation, in terms of physical state extrapolation, realizes the transformation of traffic flow smooth evolution characteristics into future time periods.
[0133] In S602, after completing the time-dimensional projection transformation, the model further uses a feature projection matrix to map the data to the category dimension. At this point, the data tensor retains the feature dimension of the unified hidden representation. The network model calculates the linear mapping of the feature projection matrix to transform the deep hidden feature dimension into the actual traffic category dimension, outputting a main trend prediction. This feature projection process also relies on the linear mapping layer structure inside the network model. Its input size corresponds to the dimension of the unified hidden representation, and its output size corresponds to the total number of traffic categories preset by the system.
[0134] S603, after the above two dimensional mapping operations, outputs the main trend prediction. The tensor is strictly aligned in shape. The model ensures that the resulting main trend predictions are accurate. Residual prediction with preceding hypergraph propagation output They share identical batch, prediction time, road node, and traffic category dimensions. In practical applications of transportation services, the main trend prediction... This represents the baseline of regular traffic flow evolution, independent of localized, sporadic events on the road network, such as the inherent traffic patterns of roads unaffected by short-term disturbances like traffic accidents. The generated main trend prediction... The next step is data fusion and joint training, which involves combined calculations with residual prediction.
[0135] In step S7 of the prediction method, event features are extracted from the original historical traffic flow sequence, and the probability of effective traffic flow occurring at each road node and traffic category in the future is estimated. For low-flow or intermittent flow states in the road network, continuous amplitude regression is prone to producing non-zero small floating-point values during prediction. This step establishes an independent branch, combining the original input sequence to estimate the probability of actual traffic flow occurring at future times. The specific processing includes the following sub-steps:
[0136] S701 receives the original historical heterogeneous traffic flow sequence and performs one-dimensional convolution calculations along the historical time dimension to extract event features. The original observation data retains undecomposed flow amplitude and intermittent zero-value information. The network model is configured with a two-layer one-dimensional convolutional network to process this input. The operational equation for event feature extraction is:
[0137] ;
[0138] In the formula, This represents the extracted event features; This represents the original historical heterogeneous traffic flow sequence as input; This represents a one-dimensional convolution operation along the historical time dimension; and These represent the learnable convolutional kernels of the first and second layers, respectively. and This represents the learnable bias parameters of the corresponding layer; This represents the GELU activation function, which is the Gaussian error linear unit activation function.
[0139] S702 performs time-dimensional pooling and feature space mapping on the acquired event features, outputting a probability prediction tensor. Since pooling eliminates the historical time dimension from the input data, the network model reconstructs the prediction time dimension using subsequent learnable projection parameters and a multilayer perceptron, mapping the features to the target business dimension. The mathematical expression for generating the probability prediction tensor is:
[0140] ;
[0141] In the formula, Represents the probability tensor of the generated events; This represents the average pooling operation along the time dimension; and These represent the learnable projective weights and their corresponding bias parameters, respectively. Represents a multilayer perceptron; This represents the Sigmoid function. For the basic connection operations of pooling, linear projection, and multilayer perceptrons, those skilled in the art can implement them using standard deep learning network layers, which are well-known techniques in the field and will not be elaborated upon here.
[0142] S703, the output event probability tensor The shape configuration is ,in Indicates the batch size of the data input. Indicates the prediction window length. This represents the total number of road nodes. This represents the total number of traffic categories monitored by the system. The network layers within the multilayer perceptron map latent features to the prediction window length. and number of traffic categories The corresponding numerical values are then determined, and the shape of the data tensor is readjusted to precisely align with the aforementioned dimensions. This is achieved by applying the Sigmoid function. The values of each element in the system are naturally constrained to between 0 and 1. In terms of business implications, This represents the probability of non-zero effective flow at each prediction time step, specific road node, and specific traffic category. This probability prediction result is output to subsequent steps to control the output of continuous flow amplitude.
[0143] In step S8 of the prediction method, the residual prediction is added to the main trend prediction, and the final prediction result is generated by element-wise gating operation using the effective flow probability. During the training phase, the flow regression objective, the effective flow identification objective, and the spatial overflow coefficient constraint objective are jointly optimized. The specific processing includes the following sub-steps:
[0144] S801 adds the residual prediction result output from the previous step to the main trend prediction result as a tensor, and then performs element-wise multiplication with the effective flow probability output from the event-aware gating branch. The mathematical expression of the fusion calculation is:
[0145] ;
[0146] In the formula, This represents the final predicted tensor generated; This indicates the residual prediction results; This indicates the main trend prediction results; Represents the probability tensor of effective traffic; This represents an element-wise multiplication operation. At the physical business level, the two amplitude prediction paths respectively deduce the basic evolution cycle and short-term local fluctuations. The sum of the two restores the continuous traffic flow amplitude. The effective flow probability acts as a switch. When the model determines that there are no actual vehicles passing through a certain time step, the summed amplitude is directly adjusted to zero, thereby mitigating the continuous small numerical errors generated by the model under low flow conditions.
[0147] S802, during the training phase of the network model, an overall joint training objective is constructed, consisting of traffic regression loss, effective traffic identification loss, and node-level spatial overflow coefficient regularization term. The traffic regression loss, effective traffic identification loss, and node-level spatial overflow coefficient regularization term correspond to the specific mathematical implementations of the aforementioned traffic regression objective, effective traffic identification objective, and spatial overflow coefficient constraint objective, respectively. The mathematical expression of the overall joint training objective is:
[0148] ;
[0149] In the formula, This represents the total loss caused by network forward propagation; Indicates the loss due to traffic regression; This indicates the loss in identifying valid traffic. This represents the regularization term for the node-level space overflow coefficient; and These represent the weight hyperparameters that control the importance of the corresponding tasks.
[0150] In a preferred embodiment, based on the numerical magnitude of the traffic flow prediction scenario, technicians can adjust the weights. and The initial values of are all set to 1 to maintain the gradient balance between the regression and classification tasks.
[0151] S803 calculates the flow regression loss by flattening the prediction tensor at each location and using a mask to eliminate missing observation data locations caused by equipment failure or communication interruption. The mathematical expression for the regression loss is:
[0152] ;
[0153] In the formula, This indicates the index position corresponding to a specific batch, prediction time step, road node, and traffic category after the data is flattened; This represents the final predicted value after gating; This indicates the actual traffic flow at that location; A mask indicating the validity of observations. Valid observations... Take 1, missing observations Set to 0. Actual observed effective zero flow will still participate normally in the error regression. When the training batch contains no effective observation data at all, the network control flow will skip that batch and will not perform loss calculation and parameter update operations.
[0154] S804 sets a threshold to extract valid traffic labels and calculates the valid traffic identification loss. Let... Indicates position The specific traffic category to which it belongs. This sets the event threshold for this category. The event threshold is configured using a traffic count with the same unit as the original input; for example, the event threshold for passenger vehicles can be set to 2, while the event threshold for other categories such as trucks can be set to 0. When the actual traffic... Strictly greater than At that time, set the actual label Take 1, otherwise Take 0. Let For event probability In position The model's predicted output, the alignment probability with the true class. The calculation logic is as follows:
[0155] ;
[0156] The event loss is calculated using a focus loss algorithm with class weights, and its mathematical expression is as follows:
[0157] ;
[0158] In the formula, This represents the total number of locations containing valid labels; This represents the pre-set category weights to address traffic category imbalances; This represents the focusing parameter, used to reduce the impact of easily classifiable time steps on the gradient. In general applications, it can be set to 2. The positive and negative sample balance coefficient is calculated according to the following rules: The proportionality coefficient is defined as follows: ,in and These refer to the number of positive and negative labels for the traffic category, statistically estimated by the network model in the first training batch. To balance computational efficiency and prevent training oscillations caused by sampling bias in subsequent local batches, this statistical value is used consistently throughout the entire training process. In the underlying computational operator implementation of the network model, the algorithm calls the numerically stable binary cross-entropy operator instead of the native logarithmic calculation to avoid the gradient explosion problem that occurs when the network directly calculates logarithms with low probability.
[0159] S805 calculates the spatial overflow coefficient regularization term. In the specific network architecture implementation, the hidden layer network, which performs operations such as local propagation to extract deep spatiotemporal features, is configured to include... The model employs a stacked structure of spatial coding layers. The node coefficients generated by each spatial coding layer are subject to a quadratic constraint around a specific constant 1, and the coefficients are averaged across all network layers. Its mathematical expression is:
[0160] ;
[0161] In the formula, Indicates the number of spatial coding layers in the model configuration; For the network layer index of the spatial layer; For sample indexes within a batch; For time step index; For node indexing; This indicates the set regularization weights, which can be configured to... The value is 0.01. The physical principle of this constraint is that when the coefficient is 1, the adjusted adjacency matrix is equal to the original adjacency matrix; this regularization objective requires the model to suppress excessive deviation of edge weights while adjusting the adjacency propagation intensity using traffic conditions.
[0162] S806, the network model is based on the established overall joint training objective. The system utilizes the backpropagation algorithm of conventional deep learning for gradient calculation and network parameter updates. Upon completion of model training and deployment to the actual inference phase, the system reads the latest historical window observation data before the prediction starting point and the static directed road graph in real time. It then sequentially calculates the traffic flow values for each future time step, node, and traffic category through forward propagation.
[0163] Specific application examples:
[0164] To further illustrate the technical solution of the present invention, a specific application example is given below, combining a specific traffic monitoring scenario with the specific tensor dimension evolution and numerical calculation process.
[0165] Taking a road traffic dataset of a city road network in a certain region as an example, the total number of road nodes included in the road network is set. The system needs to handle 190, representing the total number of traffic categories comprised of passenger cars, freight cars, heavy freight cars, container trucks, and motorcycles. Five categories were set up for independent multi-step prediction. The system's sampling interval was set to 5 minutes, and the model was configured to predict the traffic conditions for the next 30 minutes based on historical observations from the past 60 minutes. The corresponding historical time step length was... The prediction time step length is 12. The value is 6. This is the set data batch size for the processor during training or inference. It is 32.
[0166] Under the above configuration, the model's data forward pass and tensor numerical evolution process are as follows: In the input and representation construction phase, the system receives data of shape... The original historical heterogeneous traffic flow sequence tensor. The network first maps it from 5-dimensional traffic category features to a feature dimension through a linear layer. The model embeds 24 traffic states. Simultaneously, it internally generates and expands the feature dimension. Node spatial embedding and feature dimension of 32 An adaptive spatiotemporal embedding of 72 is used. The three elements are concatenated along the feature dimension, resulting in an output shape of... The unified hidden representation, this 128-dimensional data carries high-dimensional features that integrate the physical topology and evolution patterns of the road network.
[0167] During the traffic decomposition phase, the model configures the filter kernel length for each of the 128 hidden channels. A one-dimensional sliding-time filter with a value of 13 is used. Due to the data padding strategy of endpoint replication, the shapes of the main time component tensor and the residual representation tensor extracted by the filtering operation are both maintained. .
[0168] In the residual space modeling path, the residual representation is first linearly projected and divided into five corresponding latent space prototypes, generating key-value representations for category fusion from various interaction perspectives. Subsequently, positive space overflow coefficients are generated for each node based on the current residual features. The original directed graph adjacency matrix is used, and the weights of connected edges are dynamically adjusted by the coefficients of the two endpoints. The model sets the highest propagation order. The value is 3, and local spectral propagation is performed on the dynamically adjusted graph structure using the corresponding Chebyshev polynomial. In the hypergraph construction phase, the result is calculated based on the key representation. The node relationship heatmap is generated, and for the selected central node, the number of member nodes to be retained for each hyperedge is set. The value is 16, thus assigning the top 16 member nodes by association strength to form a dynamic hyperedge. After feature aggregation and distribution calculation of the hypergraph, the output shape is obtained through residual prediction head mapping. The residual prediction tensor.
[0169] In the main trend projection stage, the decomposed main time component is compressed from 12 dimensions to 6 using a learnable time projection matrix. Then, the 128-dimensional hidden features are mapped to 5-dimensional traffic categories using a feature projection matrix. The output shape is also strictly aligned. The main trend prediction tensor.
[0170] In the event-aware gating stage, the raw data undergoes one-dimensional convolution and pooling operations, and directly outputs a shape without introducing future labels. The event probability tensor is then used. Finally, the residual prediction tensor is added to the main trend prediction tensor, and element-wise multiplied with the event probability tensor. In actual physical deduction results, this gating operation effectively suppresses the cumulative error of small floating-point numbers, such as the prediction of 0.01 for the category of extra-large trucks in the early morning when it should be zero.
[0171] To further verify the effectiveness of the technical solution in the embodiments of the present invention, comparative experiments were conducted. Conventional performance evaluation indicators in this field include mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). The lower the value of each indicator, the smaller the error in the predicted result deviating from the actual observed flow, and the higher the prediction accuracy.
[0172] Using the test set of the dataset as a benchmark, the proposed heterogeneous traffic flow spatial overflow prediction method based on Fick's law is compared with the benchmark models commonly used in the field in the prior art through a quantitative comparison of multi-step prediction errors.
[0173]
[0174] As shown in Table 1, the prediction method of this invention outperforms the comparison algorithms in all three evaluation metrics. A detailed analysis of the test data reveals that existing graph convolution schemes (such as STGCN) typically rely on static, fixed road topologies, failing to adaptively adjust the propagation intensity of adjacent road segments when facing sudden local road conditions, resulting in significant errors. While time-series schemes (such as STID) excel at extracting periodic patterns, they have limitations in capturing the high-order coupled linkage features of multiple spatial nodes. The method of this invention independently processes the subject evolution through flow decomposition and utilizes the Fick kernel and hyperedge construction mechanism to handle the dynamic spatial overflow of residuals, demonstrating a lower prediction error level.
[0175] Further analysis of the time-series fitting between the ground truth values collected from actual roadside equipment and the predicted values generated ahead of time by the model of this invention reveals that for categories such as passenger vehicles with large flow scales and strong smooth periodicity, the model accurately captures their basic evolution trend. For heterogeneous categories such as freight trucks with small flow scales and intermittent zero flow characteristics, due to the switching constraint of the event-aware gating branch in the joint training objective, the model smoothly adjusts the predicted values to fit the zero baseline during low flow periods, avoiding invalid numerical oscillations, demonstrating the comprehensiveness and accuracy of joint modeling for heterogeneous traffic flows.
Claims
1. A spatial overflow prediction method for heterogeneous traffic flow inspired by Fick's law, characterized in that, Includes the following steps: Read historical heterogeneous traffic flow sequences and road directed graphs, and map the historical heterogeneous traffic flow sequences into a unified hidden representation; The unified hidden representation is decomposed into a main temporal component and a residual representation; The residual representation is projected to generate a key representation and a value representation; Node-level spatial overflow coefficients are generated based on the residual representation, the original adjacency matrix corresponding to the directed road graph is adjusted using the node-level spatial overflow coefficients, and local spectral propagation is performed on the value representation. A dynamic hyperedge is constructed using the value representation and the key representation after local spectral propagation, and higher-order propagation is performed to output the residual prediction result. The main time component is projected onto the prediction window to generate the main trend prediction result; Estimating the effective flow probability based on the aforementioned historical heterogeneous traffic flow sequence; The residual prediction result is added to the main trend prediction result, and the effective flow probability is used to perform gating operation on the added result to generate the final prediction result. During the training phase, the flow regression target, the effective flow identification target, and the spatial overflow coefficient constraint target are jointly optimized.
2. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, Mapping the historical heterogeneous traffic flow sequences to a unified hidden representation includes: Perform linear mapping calculations along the feature dimensions on the historical heterogeneous traffic flow sequences to generate traffic state embeddings; Within the network model, node spatial embedding and adaptive spatiotemporal embedding are set, and the node spatial embedding and the adaptive spatiotemporal embedding are extended along the batch dimension and the historical time dimension. The unified hidden representation is obtained by concatenating the traffic state embedding, the expanded node space embedding, and the expanded adaptive spatiotemporal embedding along the feature dimension.
3. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, The unified hidden representation is decomposed into a main temporal component and a residual representation, including: The endpoint replication method is used to perform data filling operations at both ends of the time dimension of the unified hidden representation to generate a filled extended representation; For the padding extended representation, a one-dimensional convolutional sliding computation in the temporal dimension is performed using a learnable temporal filter for each hidden channel to extract the main temporal component; The difference between the unified hidden representation and the main temporal component is calculated to obtain the residual representation.
4. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, Projecting the residual representation to generate key and value representations includes: The residual representation is mapped to multiple prototype global feature representations, and the prototype global feature representations are divided into independent components along the feature dimension; Using a learnable mapping parameter matrix configured independently for each of the prototypes, the basic key representation and basic value representation of each of the prototypes are calculated respectively; Multiple cross-category interactive perspectives are set up, and a weighted summation operation is performed on the basic key representation and the basic value representation in the prototype dimension using learnable blending parameters to generate the fused key representation and the value representation.
5. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 4, characterized in that, Node-level spatial overflow coefficients are generated based on the residual representation. These coefficients are then used to adjust the original adjacency matrix corresponding to the directed road graph. Local spectral propagation is then performed on the value representation, including: The residual representation at the corresponding time step is processed using a multilayer perceptron, and a positive node-level spatial overflow coefficient is generated by smoothing and approximating rectified linear unit function constraints. The initial connection values in the original adjacency matrix are adjusted using the node-level space overflow coefficient to construct a state-dependent adjacency matrix; Based on the state-related adjacency matrix, a corresponding state-related graph Laplacian matrix is established. After scaling the eigenvalue range of the state-related graph Laplacian matrix, the local spectral propagation is performed on the value representation under each cross-category interaction perspective using Chebyshev polynomials.
6. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 5, characterized in that, Using the value representation and key representation after local spectral propagation, a dynamic hyperedge is constructed and higher-order propagation is performed to output residual prediction results, including: The value representations after local spectrum propagation are fused along the cross-category interaction perspective to generate a comprehensive value representation, and the key representations are averaged along the cross-category interaction perspective to generate a comprehensive key representation; Calculate the inner product of the composite value representation and the transpose of the composite key representation, and take the average value of the node relationships for different prototype combinations to generate a node relationship heatmap; The set of central nodes is determined by summing the corresponding dimensions of the node relationship heatmap, and the Top-K associated nodes with the highest association strength are selected for each central node to construct the dynamic hyperedge. A dynamic node-to-hyperedge association matrix is established based on the number of member nodes retained in each hyperedge. Based on the dynamic node-to-hyperedge association matrix, a hyperedge degree matrix and a node degree matrix are generated respectively. The node features are aggregated to the dynamic hyperedge in sequence, and the learnable weight matrix is combined with the backpropagation from the dynamic hyperedge to the node to generate a high-order node feature representation. The residual prediction result is then output through linear mapping.
7. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, The main time component is projected onto the prediction window to generate the main trend prediction result, including: A linear transformation operation on the time dimension is performed on the main time component using a learnable time projection matrix, mapping the historical time dimension to the target predicted time dimension; The feature projection matrix is used to perform a linear mapping calculation of the category dimension, which transforms the hidden feature dimension into the actual traffic category dimension, and outputs the subject trend prediction result that is strictly aligned on the tensor shape.
8. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, Estimating the effective flow probability based on the aforementioned historical heterogeneous traffic flow sequences includes: The historical heterogeneous traffic flow sequence is processed using a two-layer one-dimensional convolutional network along the historical time dimension to extract event features; The event features are subjected to average pooling along the time dimension. The prediction time dimension is reconstructed using learnable projection parameters and a multilayer perceptron, and feature space mapping is performed. After being processed by the Sigmoid function, an event probability tensor is output. The elements in the event probability tensor represent the probability of effective traffic flow at each time step, each road node, and each traffic category.
9. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 8, characterized in that, The residual prediction result is added to the main trend prediction result, and the final prediction result is generated by gating the added result using the effective flow probability, including: The residual prediction tensor corresponding to the residual prediction result is added to the main trend prediction tensor corresponding to the main trend prediction result to generate the added tensor. The summed tensor is multiplied element-wise with the event probability tensor corresponding to the effective flow probability. The event probability tensor is used as a soft gating coefficient to scale the amplitude at the corresponding position of the summed tensor, generating the final prediction tensor as the final prediction result.
10. The spatial overflow prediction method for heterogeneous traffic flow based on Fick's law as described in claim 1, characterized in that, During the training phase, the traffic regression objective, the effective traffic identification objective, and the spatial overflow coefficient constraint objective are jointly optimized, including: By combining the regression task weights and the event task weights, an overall joint training objective is constructed, consisting of the traffic regression objective, the effective traffic identification objective, and the spatial overflow coefficient constraint objective. The network parameters are then updated using the backpropagation algorithm. When calculating the traffic regression target, a mask is used to eliminate errors caused by missing observation locations, and batch updates are skipped when the training batch does not contain valid observation data. When calculating the effective traffic identification target, the effective traffic label is extracted by combining the preset event threshold, and the focus loss algorithm with positive and negative sample balance coefficient and category weight is used for calculation; When calculating the spatial overflow coefficient constraint target, a quadratic constraint around a constant 1 is applied to the node-level spatial overflow coefficients generated by each spatial encoding layer of the network model, and the average is taken for each network layer.
