A data knowledge joint driving traffic flow prediction method

By constructing a traffic flow prediction model jointly driven by data and knowledge, and combining graph convolution and multi-layer linear transformation, the problem of limited accuracy in existing traffic flow prediction models is solved, and efficient, lightweight, and high-precision prediction is achieved.

CN117423235BActive Publication Date: 2026-05-12SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHWEST JIAOTONG UNIV
Filing Date
2023-11-22
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When existing traffic flow prediction models incorporate external knowledge, their prediction accuracy is limited by hardware resources, making it difficult to achieve efficient, lightweight, and high-precision predictions.

Method used

A data-knowledge joint-driven approach is adopted, combining graph convolution and multi-layer linear transformation to construct a traffic flow prediction neural network model. Spatial dependencies are captured through graph convolution, dynamic linear transformation weights are generated using timestamps, and traffic network relationships are constructed through data standardization, integrating static knowledge and dynamic temporal dependencies.

Benefits of technology

实现了更高的交通流量预测精度,降低了时间复杂性和空间复杂性,提升了经济效益。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117423235B_ABST
    Figure CN117423235B_ABST
Patent Text Reader

Abstract

The application provides a data and knowledge jointly driven traffic flow prediction method, and belongs to the technical field of traffic flow prediction. The method comprises the following steps: preprocessing traffic flow data of a current road network; configuring parameters of a traffic flow prediction neural network model, and constructing the traffic flow prediction neural network model; training the traffic flow prediction neural network model by using the preprocessed traffic flow data; and predicting future traffic flow signals of the road network by using an optimal traffic flow prediction neural network model obtained through training according to historical road network traffic flow data. The application solves the problems of insufficient knowledge integration and precision improvement bottleneck of a traditional deep learning traffic flow prediction method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic flow prediction technology, and in particular relates to a traffic flow prediction method driven by data and knowledge. Background Technology

[0002] Urban traffic flow prediction is a classic spatiotemporal series prediction problem, requiring the analysis and modeling of spatiotemporal big data with both temporal and spatial dependencies. Urban time series not only exhibit complex spatial relationships but also dynamic evolution and multimodal development, and are influenced by external factors such as uncertainty and abrupt changes. How to deeply analyze the high-dimensionality, nonlinearity, temporal relationships, and dynamic changes of urban traffic flow series data, and on this basis, construct reasonable and effective data mining methods, is a current research hotspot.

[0003] With advancements in computer hardware technology, the cost of acquiring powerful computing power and storage space has become increasingly lower, leading to larger and more effective neural network models. However, some scholars argue that neural networks should not rely solely on hardware. Incorporating existing scientific knowledge into deep learning can yield higher accuracy with fewer resources, improving economic efficiency. Generally, knowledge can be integrated in several ways: adding extra knowledge during data preprocessing; combining knowledge during machine learning model construction; and using knowledge to design appropriate penalties and incentives during model optimization. However, most of these methods belong to data-driven models, whose prediction accuracy depends on the authenticity and diversity of the training data. Without integrating knowledge, it is difficult to achieve high-precision predictions with limited computing resources.

[0004] Currently, some models have emerged that incorporate external knowledge. However, these models only embed external knowledge representations (mainly known information such as timestamps, map points of interest, and weather conditions) at a shallow level, without fully utilizing knowledge during the model construction process. Similar to traditional data-driven models, their prediction accuracy is limited by hardware. Therefore, how to further and effectively combine knowledge to dynamically construct efficient and lightweight neural network models, achieving traffic flow prediction driven by both data and knowledge, avoiding wasted computational resources, and improving the economic benefits of the method's application, is a problem worthy of further research. Summary of the Invention

[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a data-knowledge-driven traffic flow prediction method that solves the problem of insufficient knowledge integration and bottlenecks in accuracy improvement in traditional deep learning traffic flow prediction methods.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a traffic flow prediction method driven by data and knowledge, comprising the following steps:

[0007] S1. Preprocess the traffic flow data of the current road network;

[0008] S2. Configure the parameters of the traffic flow prediction neural network model and construct the traffic flow prediction neural network model.

[0009] S3. Train the traffic flow prediction neural network model using the preprocessed traffic flow data;

[0010] S4. Based on historical road network traffic flow data, use the trained optimal traffic flow prediction neural network model to predict future traffic flow signals of the road network, and complete the data-knowledge joint-driven traffic flow prediction.

[0011] The beneficial effects of this invention are as follows: Addressing the problem that existing traffic flow prediction models are becoming increasingly complex and redundant, leading to a bottleneck in accuracy improvement, this invention constructs a traffic flow prediction model that integrates data knowledge and joint driving forces. This model combines graph convolution with multi-layer linear transformation, effectively capturing the potential temporal and spatial dependencies in traffic flow sequence signals. Compared to existing methods, the temporal and spatial complexity of this invention is far lower than current mainstream deep learning methods, resulting in higher traffic flow prediction accuracy and greater economic benefits.

[0012] Further, step S1 includes the following steps:

[0013] S101. Using sensors in the urban road network, sample the current urban traffic flow of the road network at a certain frequency;

[0014] S102. For the missing values ​​in the sampled traffic flow data, use linear interpolation to fill in the missing values, and use zero-mean standardization to normalize the filled data.

[0015] S103. Based on the traffic flow data processed in step S102, construct the traffic network relationship;

[0016] S104. Based on the constructed traffic network relationship, construct the input information and target output signal of the traffic flow prediction neural network model, and complete the preprocessing of traffic flow data.

[0017] The beneficial effects of the above-mentioned further solutions are: by imputing missing values ​​in the sampled data, this invention reduces the impact of outliers on subsequent training. Standardizing the data helps the model converge and improves training efficiency.

[0018] Furthermore, the expression for the adjacency matrix in the traffic network relationship is as follows:

[0019] A = Floyd(V, E, W)

[0020] Where A represents the adjacency matrix in the traffic network, Floyd(·) represents the Floyd operation, V represents the set of n sensor locations in the traffic network, E represents the set of adjacent node edges in the traffic network, and W represents the weight of adjacent edges in the traffic network.

[0021] The beneficial effect of the above-mentioned further solutions is that the present invention, by modeling the traffic network, facilitates the reasoning of the relative positional relationships between network nodes.

[0022] Furthermore, S2 includes the following steps:

[0023] S201. Configure the parameters of the traffic flow prediction neural network model, wherein the parameters include the maximum number of training rounds, batch size, and initial learning rate;

[0024] S202. Construct a graph convolution module based on spatial relative relationships;

[0025] S203. Construct a time-aware dynamic linear transformation module;

[0026] S204. Construct a gated spatiotemporal mapping module to complete the construction of a neural network model for traffic flow prediction.

[0027] The beneficial effects of the above-mentioned further scheme are as follows: This invention utilizes the relative positional relationship matrix between road network nodes to generate an adaptive graph convolution kernel. After the traffic flow signal undergoes a graph convolution operation, additional static knowledge is embedded, achieving spatial dependency capture and knowledge fusion. Then, dynamic linear transformation weights and offsets are generated using the timestamps of the traffic signals, and a network structure is designed using common-sense knowledge to capture dynamic temporal dependencies. Finally, linear mappings are performed on the feature values ​​of each node at each time point in the traffic flow sequence from both temporal and spatial dimensions, reducing the dimensionality of the high-dimensional feature vector to achieve the final traffic flow prediction.

[0028] Furthermore, step S202 includes the following steps:

[0029] S2021. Calculate the relative position relationship matrix Q;

[0030] S2022. Based on the relative position relationship matrix Q, find the representation node v in the learnable weight space. i With node v j The weight eigenvalues ​​of the relation are used to obtain the embedding matrix E. r ;

[0031] S2023, According to the embedding matrix E r After removing weak connections and performing standardization, the message passing transition matrix A is obtained.r :

[0032] A r =SoftMax(Relu(E) r ))

[0033] Where SoftMax(·) represents the Soft function, and Relu(·) represents the Relu activation function;

[0034] S2024. Based on the number of sensors n, the daily sampling frequency a, and the number of days in a week, define three learnable embedding representation spaces.

[0035] S2025. Slice the learnable embedding representation space to obtain spatial and temporal information representation embeddings, wherein the spatial and temporal information representations include spatial location embeddings E. v , day timestamp position embedded E d Embedded with E for week timestamp position w ;

[0036] S2026, Embed the day timestamp position into E d Embedded with E for week timestamp position w Embedding addition, joint characterization of time position embedding E t ;

[0037] S2027, Embedding spatial location into E v Time and location embedded E t Concatenate with the hidden layer feature vector h after message passing:

[0038] h = A r χ e

[0039] Where, χ e This represents the historical time series after being filtered and upgraded.

[0040] S2028. The hidden layer feature vectors, which are concatenated with external knowledge, are fused using a linear mapping to complete the construction of a graph convolution module based on spatial relative relationships. The output expression of the graph convolution module is as follows:

[0041] Z srg =Relu((h||E v ||E t )Θ+b srg )

[0042] Among them, Z srg This represents the output of the graph convolution module based on spatial relative relationships, where Θ represents the weights, and b srg Indicates offset.

[0043] The beneficial effects of the above-mentioned further scheme are: after message passing on the traffic signal feature vector based on the spatial correlation of nodes, it is fused with additional knowledge, decoupling dynamic variables from static knowledge and avoiding the propagation of redundant information in the network.

[0044] Furthermore, step S203 includes the following steps:

[0045] S2031. Define two weight parameter spaces M(w) respectively. ld ), M(w lw ) and offset parameter space M(b ld M(b) lw );

[0046] S2032, According to the time signal For the weight parameter space M(w) ld ), M(w lw ) and offset parameter space M(b ld M(b) lw Perform spatial slicing to obtain a new weight parameter space. and offset parameter space

[0047]

[0048]

[0049] Among them, Z ld Z represents the output after a linear transformation based on the daily cycle sensing. lw This represents the output after a linear transformation by the perpetual sensing mechanism.

[0050] S2033, Output Z after linear transformation based on daily cycle sensing ld The output Z after the linear transformation of the periodic sensing lw The output Z of the time-aware dynamic linear transformation module is obtained. tl Complete the construction of the time-aware dynamic linear transformation module:

[0051] Z tl =Z ld +Z lw .

[0052] The beneficial effects of the above-mentioned further solutions are: by constructing time-aware modules, the present invention achieves efficient dynamic capture of the time dependence and time patterns of complex traffic flow sequences.

[0053] Furthermore, step S204 includes the following steps:

[0054] S2041, The output Z of the dynamic linear transformation module for time perception from both time and space dimensions. tl Perform dimensionality reduction processing;

[0055] S2042. Combine the dimensionality-reduced vector with the input χ of the shallow network. p Add them together, and then perform a Hadamard product on the outputs of the sigmoid activation function to obtain the output of the gated unit:

[0056]

[0057]

[0058] Z vt =Z tl ω v

[0059] Z tv =Z tl ω t

[0060] Among them, Z sm and Z tm Z represents the output of the gating unit after spatial mapping and temporal mapping, respectively. vt and Z tv These represent the hidden layer vectors after spatial mapping and temporal mapping, respectively. Represents the Hadama product, ω v ω represents the learnable spatial mapping parameter. t This represents the learnable time mapping parameters;

[0061] S2043. The outputs of the gating units after spatial mapping and temporal mapping are linearly transformed in the time dimension. The results of the linear transformation are concatenated and then input into the fully connected layer to obtain the predicted values ​​of the traffic flow prediction neural network model, thus completing the construction of the traffic flow prediction neural network model.

[0062] γ t =FC(Z) sm ||Z tm )

[0063] Where, γ t This represents the predicted traffic flow signal for the next M time points, and FC(·) indicates a fully connected layer operation.

[0064] The beneficial effects of the above-mentioned further solutions are: this invention models from both spatial and temporal dimensions, balancing spatial and temporal dependencies in the neural network feature transmission process. Concatenation with the input of shallow networks avoids model degradation. Gated unit activation is used to capture the nonlinear features of spatiotemporal sequences.

[0065] Furthermore, step S3 specifically includes:

[0066] The predicted value γ based on the traffic flow prediction neural network model t The parameters of the traffic flow prediction neural network model are iteratively updated using historical road network traffic flow data until the model converges, thus training the model.

[0067] The beneficial effect of the above-mentioned further solutions is that the present invention predicts the value γ. t By iteratively updating the parameters of the traffic flow prediction neural network model using historical road network traffic flow data, future traffic flow prediction can be achieved efficiently. Attached Figure Description

[0068] Figure 1 This is a flowchart of the method of the present invention.

[0069] Figure 2 This is a schematic diagram of the traffic flow prediction neural network model framework of the present invention. Detailed Implementation

[0070] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0071] Example

[0072] like Figure 1 As shown, this invention provides a data-knowledge-driven traffic flow prediction method, the implementation of which is as follows:

[0073] S1. Preprocess the traffic flow data of the current road network. The implementation method is as follows:

[0074] S101. Using sensors in the urban road network, sample the current urban traffic flow of the road network at a certain frequency;

[0075] S102. For the missing values ​​in the sampled traffic flow data, use linear interpolation to fill in the missing values, and use zero-mean standardization to normalize the filled data.

[0076] S103. Based on the traffic flow data processed in step S102, construct the traffic network relationship;

[0077] S104. Based on the constructed traffic network relationship, construct the input information and target output signal of the traffic flow prediction neural network model, and complete the preprocessing of traffic flow data.

[0078] In this embodiment, data acquisition was conducted using the Highway Performance Measurement System (PEMS) datasets PEMS07 and PEMS08, collected from Region 8 and Region 7. PEMS07 data was collected from May to August 2017, covering 883 stations and totaling 28,224 data points, with a sampling frequency of 5 minutes. PEMS08 data was collected from July to August 2016, covering 170 stations and totaling 17,856 data points, with a sampling frequency of 5 minutes. The sampled traffic signals were traffic flow data.

[0079] In this embodiment, data preprocessing involves standardizing the data using the standard score method.

[0080] In this embodiment, the traffic network relationship is constructed: the traffic network can be constructed from a traffic map. It represents that, where V = (v1, v2, ..., v n Let V be a set representing the locations of n sensors in the road network, E be the set of edges between adjacent nodes, and W be the weight of the adjacent edges, which can be simply the Euclidean distance between adjacent nodes, or the relative distance between two points measured according to the actual situation of the road network. Given V, E, and W, the nearest relative distance between each point can be roughly calculated using the following formula, thus obtaining the adjacency matrix A of the road network:

[0081] A = Floyd(V, E, W)

[0082] Floyd(·) represents the Floyd operation.

[0083] In this embodiment, traffic flow signal X t Indicates transportation network The traffic signal monitoring system uses observations from all sensors at time t. The sampling frequency of the monitors is *a* times per day. There are β attributes per week; if β = 2, it is divided into weekdays and weekends; if β = 7, it is classified as Monday, Tuesday, Wednesday, ..., Sunday. Time signals are used. These represent traffic flow signals X. t At time t, the traffic flow signal is at the i-th sampling time of the day (1,2,3,...,a) and the j-th state of the week (1,2,3,...,β). Let χ be the traffic flow signal over the past P time steps. p =X t:t+P-1 and X t Time signal As the input signal to the traffic flow prediction neural network model, the goal is to predict the traffic signal χ for the next M time steps. f =X t+P:t+P+M-1 The target output signal for the model.

[0084] S2. Configure the parameters of the traffic flow prediction neural network model and construct the traffic flow prediction neural network model. The implementation method is as follows:

[0085] S201. Configure the parameters of the traffic flow prediction neural network model, wherein the parameters include the maximum number of training rounds, batch size, and initial learning rate;

[0086] S202. Construct a graph convolution module based on spatial relative relationships. The implementation method is as follows:

[0087] S2021. Calculate the relative position relationship matrix Q;

[0088] S2022. Based on the relative position relationship matrix Q, find the representation node v in the learnable weight space. i With node v j The weight eigenvalues ​​of the relation are used to obtain the embedding matrix E. r ;

[0089] S2023, According to the embedding matrix E r After removing weak connections and performing standardization, the message passing transition matrix A is obtained. r ;

[0090] S2024. Based on the number of sensors n, the daily sampling frequency a, and the number of days in a week, define three learnable embedding representation spaces.

[0091] S2025. Slice the learnable embedding representation space to obtain spatial and temporal information representation embeddings, wherein the spatial and temporal information representations include spatial location embeddings E. v , day timestamp position embedded E d Embedded with E for week timestamp position w ;

[0092] S2026, Embed the day timestamp position into E d Embedded with E for week timestamp position w Embedding addition, joint characterization of time position embedding E t ;

[0093] S2027, Embedding spatial location into E v and time location embedding E t Concatenate with the output of the previous layer;

[0094] S2028. Based on the splicing result and the message passing process transition matrix A... r By using linear mapping to fuse the hidden layer feature vectors incorporating external knowledge, a graph convolution module based on spatial relative relationships is constructed.

[0095] In this embodiment, the relative position relationship matrix is ​​calculated. The i-th row of the relative position relationship matrix (1,2,3,...,n) represents the relationship between n nodes and v. i The relative positional relationships of the nodes. q ij =k,k∈(1,2,3,...,n), that is, among all nodes, v j The node is the distance v i The k-th nearest node to a node, expressed as follows: Relation v i Node and v j A unique relationship between nodes.

[0096] Utilizing q in the learnable weight space ij Find the representation v i Node and v j The weighted eigenvalues ​​of node relationships are used to obtain the embedding matrix E. r This represents the new adjacency matrix. Weak connections are removed using the ReLU activation function (·), and then normalized using the SoftMax function (·), thus obtaining a novel message passing transition matrix A. r :

[0097] A r =SoftMax(Relu(E) r )).

[0098] Based on the number of sensors N, the daily sampling frequency a, and the number of days in a week, three learnable embedding representation spaces are defined. Based on V, Slicing the learnable space yields spatial and temporal representations: spatial location embedding E v , day timestamp position embedded E d Embedded with E for week timestamp position w .

[0099] The daily timestamp position embedding is added to the weekly timestamp position embedding to jointly represent the time position embedding E. t :

[0100] E t =E d +E w

[0101] These known information are used to generate embedded representation vectors and hidden layer feature vectors h = A after message passing.r χ e The data is then concatenated. After message passing and information augmentation, the hidden layer feature vectors, which have incorporated external knowledge, are fused using a linear mapping. Graph convolution can be represented by the following formula:

[0102] Z srg =Relu((h||E v ||E t )Θ+b srg )

[0103] Among them, Z srg χ represents the output of the graph convolution module based on spatial relativity. e This represents the historical time series after dimensionality upscaling via a filter, where Θ represents the weights and b... srg Indicates offset.

[0104] S203. Construct a time-aware dynamic linear transformation module, the implementation method of which is as follows:

[0105] S2031. Define two weight parameter spaces M(w) respectively. ld ), M(w lw ) and offset parameter space M(b ld M(b) lw );

[0106] S2032, According to the time signal For the weight parameter space M(w) ld ), M(w lw ) and offset parameter space M(b ld M(b) lw Perform spatial slicing to obtain a new weight parameter space. and offset parameter space

[0107] S2033, Output Z after linear transformation based on daily cycle sensing ld The output Z after the linear transformation of the periodic sensing lw The output Z of the time-aware dynamic linear transformation module is obtained. tl The construction of a time-aware dynamic linear transformation module was completed.

[0108] In this embodiment, a common linear transformation can typically be expressed by the following equation:

[0109] Z line =Z srg w line +b line

[0110] Among them, w line b represents the weight.line This represents the offset in a linear transformation.

[0111] Since the goal of this layer is to capture the temporal correlation between past and future sequences, this invention extends the linear transformation to each time point, assuming a learnable weight parameter space M(w line )∈R P×e×c×M P represents the past time step, M represents the future time step to be predicted, e represents the embedding dimension, and c represents the hidden feature tensor dimension. Simultaneously, to learn the spatial heterogeneity of different nodes at the same time point, the learnable offset parameter space is generalized to M(b line )∈R n×c×M , where n represents the number of nodes.

[0112] Since the past-future mapping relationship may differ at different times, this invention flexibly selects the corresponding weights and offsets based on the timestamp of the historical sequence. First, two weight parameter spaces M(w) are defined respectively. ld ), M(w lw ) and offset parameter space M(b ld M(b) lw Subsequently, based on the time signal Slicing the weight parameter space and offset parameter space yields a new weight parameter space. and offset parameter space

[0113]

[0114]

[0115] Among them, Z ld Z represents the output after a linear transformation based on the daily cycle sensing. lw This represents the output after a linear transformation by the perpetual sensing mechanism.

[0116] Finally, the output Z after the linear transformation based on the daily cycle perception will be... ld The output Z after the linear transformation of the periodic sensing lw Adding them together yields the output Z of the time-aware dynamic linear transformation module. tl :

[0117] Z tl =Z ld +Z lw .

[0118] S204. Construct a gated spatiotemporal mapping module to complete the construction of the traffic flow prediction neural network model. The implementation method is as follows:

[0119] S2041, The output Z of the dynamic linear transformation module for time perception from both time and space dimensions. tl Perform dimensionality reduction processing;

[0120] S2042. Combine the dimensionality-reduced vector with the input χ of the shallow network. p The sums are then combined, and the outputs of the sigmoid activation function are used to perform a Hadamard product to obtain the output of the gated unit.

[0121] S2043. The outputs of the gating units after spatial mapping and temporal mapping are linearly transformed in the time dimension. The linear transformation results are concatenated and the concatenated results are input into the fully connected layer to obtain the predicted value of the traffic flow prediction neural network model, thus completing the construction of the traffic flow prediction neural network model.

[0122] In this embodiment, the output Z of the time-aware dynamic linear transformation module is analyzed from both time and space dimensions. tl Dimensionality reduction is performed. Taking spatial mapping as an example, Z... tl With learnable spatial mapping parameters ω v Multiplication yields the low-dimensional hidden layer vector Z. vt :

[0123] Z vt =Z tl ω v

[0124] Similarly, by utilizing the learnable time mapping parameter ω t The vector Z can be obtained. tv :

[0125] Z tv =Z tl ω t .

[0126] To prevent network degradation, the output Z... vt and Z tv The input χ of the shallow network is respectively output from the shallow network. p Add them together. Then, perform a Hadamard product with the output activated by sigmoid. Taking spatial mapping as an example, gated spatial mapping can be expressed by the following formula:

[0127]

[0128] Similarly, when the gated time mapping output is Z tv The gating unit output is Z. tm :

[0129]

[0130] Among them, Z sm and Ztm Z represents the output of the gating unit after spatial mapping and temporal mapping, respectively. vt and Z tv These represent the hidden layer vectors after spatial mapping and temporal mapping, respectively. Represents the Hadama product, ω v ω represents the learnable spatial mapping parameter. t This represents the learnable time mapping parameters.

[0131] Finally, Z sm and Z tm The outputs after performing a linear transformation on each time dimension are concatenated and fed into a fully connected layer to obtain the final predicted value, as shown in the following equation:

[0132]

[0133] Where, γ t It is the output of the model, representing the predicted values ​​of traffic signals at the next M time points. FC(·) indicates the fully connected layer operation.

[0134] In this embodiment, as Figure 2 As shown, the traffic flow prediction model driven by data knowledge is mainly divided into three parts: (1) a graph convolution module based on spatial relative relationships. This module learns the message transfer matrix of graph convolution through the relative positional relationship between nodes. After message transmission, additional embedded information is fused to obtain hidden features containing spatial relationships and embedded information. (2) a time-aware dynamic linear transformation module. This module selects the weights and variables in the linear transformation through daily and weekly periodic signals, thereby realizing the construction of the model guided by knowledge. (3) a gated spatiotemporal mapping module. This module maps high-dimensional hidden features from both time and space. It connects to the shallow input through a gated unit and finally uses a fully connected layer to fuse the outputs of both time and space to obtain the final prediction result of the target domain.

[0135] S3. The traffic flow prediction neural network model is trained using the preprocessed traffic flow data, specifically as follows:

[0136] The predicted value γ based on the traffic flow prediction neural network model t Using historical road network traffic flow data, the parameters of the traffic flow prediction neural network model are iteratively updated. Training steps S202-S204 are repeated until the traffic flow prediction neural network model converges, and finally the trained data-knowledge joint-driven traffic flow prediction model is output.

[0137] In this embodiment, preprocessed traffic flow data and predicted value γ are used. tThe parameters of the traffic flow prediction neural network model were trained, and the evaluation index of each training round was recorded. The sequence dataset was divided into training set, validation set and test set in a ratio of 7:1:2. The traffic flow prediction neural network model was trained using the training set. After the traffic flow prediction neural network model converged, the traffic flow prediction neural network model with the best MAE index was selected.

[0138] S4. Based on historical road network traffic flow data, use the trained optimal traffic flow prediction neural network model to predict future traffic flow signals of the road network, and complete the data-knowledge joint-driven traffic flow prediction.

[0139] In this embodiment, the historical traffic flow sequence of the test set is input into the optimal traffic flow prediction neural network model to obtain the traffic flow prediction value for future times. To verify that the traffic flow prediction method provided by this embodiment is superior to existing methods, the performance of this invention and similar cutting-edge methods in recent years are evaluated and compared using evaluation metrics, as shown in Tables 1 and 2.

[0140] Table 1

[0141]

[0142]

[0143] Table 2

[0144] Model MAE MAPE RMSE GraphWnet, 2019 15.06 9.51% 24.86 STSGCN, 2020 17.13 10.96% 26.79 STFGNN, 2021 16.64 10.56% 26.21 STGNCDE, 2022 15.46 9.92% 24.81 DDGCRN, 2023 14.40 9.40% 23.75 PDFormer, 2023 13.58 9.05% 23.51 This invention 13.51 8.39% 22.40

[0145] In this embodiment, the evaluation index specifically adopted is:

[0146] Root Mean Squared Error (RMSE):

[0147]

[0148] Mean Absolute Error (MAE):

[0149]

[0150] Mean Absolute Percentage Error (MAPE):

[0151]

[0152] in, Represents the predicted value, y i Let m represent the true value and 'm' represent the total number of samples. The closer the predicted result is to the true value... The closer to 0, the smaller the evaluation metric value, indicating better model performance.

[0153] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. The scope of the invention is defined by the appended claims rather than the foregoing description, and therefore all variations falling within the meaning and scope of the equivalents of the claims are intended to be embraced within the present invention.

Claims

1. A data-knowledge-driven traffic flow prediction method, characterized in that, Includes the following steps: S1. Preprocess the traffic flow data of the current road network; S2. Configure the parameters of the traffic flow prediction neural network model and construct the traffic flow prediction neural network model. S2 includes the following steps: S201. Configure the parameters of the traffic flow prediction neural network model, wherein the parameters include the maximum number of training rounds, batch size, and initial learning rate; S202. Construct a graph convolution module based on spatial relative relationships; Step S202 includes the following steps: S2021, Calculate the relative position relationship matrix ; S2022, Based on the relative positional relationship matrix Find representation nodes in the learnable weight space. With nodes The weight eigenvalues ​​of the relation are used to obtain the embedding matrix. ; S2023, According to the embedding matrix Weak connections are removed and standardized to obtain the message passing transition matrix. : in, express function, express Activation function; S2024, Based on the number of sensors Daily sampling frequency In addition to the number of days in a week, three learnable embedding representation spaces are defined; S2025. Slice the learnable embedding representation space to obtain spatial and temporal information representation embeddings, wherein the spatial and temporal information representations include spatial location embeddings. Embedded date and timestamp position Embedded with weekly timestamp position ; S2026, Embed the date timestamp position Embedded with weekly timestamp position Embedding addition, joint characterization of time position embedding ; S2027, Embedding spatial location Time and location embedding With the hidden layer feature vector after message passing To splice: in, This represents the historical time series after being filtered and upgraded. S2028. The hidden layer feature vectors, which are concatenated with external knowledge, are fused using a linear mapping to complete the construction of a graph convolution module based on spatial relative relationships. The output expression of the graph convolution module is as follows: in, This represents the output of the graph convolution module based on spatial relative relationships. Indicates weight, Indicates offset; S203. Construct a time-aware dynamic linear transformation module; S204. Construct a gated spatiotemporal mapping module to complete the construction of a neural network model for traffic flow prediction; S3. Train the traffic flow prediction neural network model using the preprocessed traffic flow data; S4. Based on historical road network traffic flow data, use the trained optimal traffic flow prediction neural network model to predict future traffic flow signals of the road network, and complete the data-knowledge joint-driven traffic flow prediction.

2. The data-knowledge-driven traffic flow prediction method according to claim 1, characterized in that, Step S1 includes the following steps: S101. Using sensors in the urban road network, sample the current urban traffic flow of the road network at a certain frequency; S102. For the missing values ​​in the sampled traffic flow data, use linear interpolation to fill in the missing values, and use zero-mean standardization to normalize the filled data. S103. Based on the traffic flow data processed in step S102, construct the traffic network relationship; S104. Based on the constructed traffic network relationship, construct the input information and target output signal of the traffic flow prediction neural network model, and complete the preprocessing of traffic flow data.

3. The data-knowledge-driven traffic flow prediction method according to claim 2, characterized in that, The adjacency matrix in the traffic network relationship is expressed as follows: in, This represents the adjacency matrix in the traffic network. This represents Freud's calculation. Indicating the transportation network n A set of sensor locations, This represents the set of edges between adjacent nodes in a transportation network. This represents the weight of adjacent edges in a transportation network.

4. The data-knowledge-driven traffic flow prediction method according to claim 1, characterized in that, Step S203 includes the following steps: S2031. Define two weight parameter spaces respectively. , and offset parameter space , ; S2032, According to the time signal , For the weight parameter space , and offset parameter space , Perform spatial slicing to obtain a new weight parameter space. , and offset parameter space , : in, This represents the output after a linear transformation based on the daily cycle sensing. This represents the output after a linear transformation by the perpetual sensing mechanism. S2033, Output after linear transformation based on daily cycle perception The output after linear transformation of the perpetual sensing The output of the time-aware dynamic linear transformation module is obtained. Complete the construction of the time-aware dynamic linear transformation module: 。 5. The data-knowledge-driven traffic flow prediction method according to claim 4, characterized in that, Step S204 includes the following steps: S2041, Output of the dynamic linear transformation module for time perception from both time and space dimensions. Perform dimensionality reduction processing; S2042. Combine the dimensionality-reduced vector with the input of the shallow network. Add them together, and then perform a Hadamard product on the outputs of the sigmoid activation function to obtain the output of the gated unit: in, and These represent the outputs of the gating unit after spatial mapping and temporal mapping, respectively. and These represent the hidden layer vectors after spatial mapping and temporal mapping, respectively. It represents the Hadamah accumulation. Represents the learnable spatial mapping parameters. This represents the learnable time mapping parameters; S2043. The outputs of the gating units after spatial mapping and temporal mapping are linearly transformed in the time dimension. The results of the linear transformation are concatenated and then input into the fully connected layer to obtain the predicted values ​​of the traffic flow prediction neural network model, thus completing the construction of the traffic flow prediction neural network model. in, Indicating a view on the future M Predicted values ​​of traffic flow signals at specific time points. This indicates a fully connected layer operation.

6. The data-knowledge-driven traffic flow prediction method according to claim 5, characterized in that, Step S3 specifically involves: Predicted values ​​based on traffic flow prediction neural network model The parameters of the traffic flow prediction neural network model are iteratively updated using historical road network traffic flow data until the model converges, thus training the model.