CN-117423235-B - Traffic flow prediction method driven by data knowledge combination
Abstract
The invention provides a traffic flow prediction method driven by data knowledge combination, which belongs to the technical field of traffic flow prediction and comprises the following steps of preprocessing traffic flow data of a current road network; the method comprises the steps of configuring parameters of a traffic flow prediction neural network model, constructing the traffic flow prediction neural network model, training the traffic flow prediction neural network model by utilizing preprocessed traffic flow data, and predicting future traffic flow signals of a road network by utilizing an optimal traffic flow prediction neural network model obtained by training according to historical road network traffic flow data. The method solves the problems that the knowledge is not integrated enough and the precision is improved to be in the bottleneck in the traditional deep learning traffic flow prediction method.
Inventors
- HU JIE
- WANG YUYAN
- DU SHENGDONG
- LI TIANRUI
Assignees
- 西南交通大学
Dates
- Publication Date
- 20260512
- Application Date
- 20231122
Claims (6)
- 1. The traffic flow prediction method driven by the combination of data and knowledge is characterized by comprising the following steps of: s1, preprocessing traffic flow data of a current road network; S2, configuring parameters of a traffic flow prediction neural network model, and constructing the traffic flow prediction neural network model; The step S2 comprises the following steps: s201, configuring parameters of a traffic flow prediction neural network model, wherein the parameters comprise the maximum training wheel number, the batch size and the initial learning rate; s202, constructing a graph convolution module based on a space relative relation; The step S202 includes the steps of: S2021 calculating relative positional relationship matrix ; S2022 based on relative positional relationship matrix Searching for a characterization node in a learnable weight space And node Weight characteristic values of the relations to obtain an embedded matrix ; S2023 according to the embedding matrix Removing weak connection, and performing standardization processing to obtain a message transfer process transfer matrix : Wherein, the Representation of The function of the function is that, Representation of Activating a function; S2024, according to the number of sensors Sampling frequency per day And days of the week, defining three learnable embedded characterization spaces; S2025, slicing the leachable embedded characterization space to obtain characterization embedded of spatial information and time information, wherein the characterization of the spatial information and the time information comprises spatial position embedding Date time stamp location embedding And week timestamp location embedding ; S2026 embedding the time of day stamp location And week timestamp location embedding Embedding and adding, joint characterization time position embedding ; S2027 embedding the spatial position Time position embedding With hidden layer feature vectors after message passing Splicing: Wherein, the Representing a historical time sequence after filter dimension increase; s2028, fusing hidden layer feature vectors spliced with external knowledge by utilizing linear mapping to complete construction of a graph rolling module based on a space relative relation, wherein an expression of output of the graph rolling module is as follows: Wherein, the Representing the output of a graph convolution module based on the spatial relative relationship, The weight is represented by a weight that, Representing the offset; s203, constructing a dynamic linear transformation module based on time perception; S204, constructing a gating space-time mapping module, and completing construction of a traffic flow prediction neural network model; s3, training a traffic flow prediction neural network model by utilizing the preprocessed traffic flow data; and S4, predicting future traffic flow signals of the road network by utilizing the optimal traffic flow prediction neural network model obtained through training according to the historical road network traffic flow data, and completing traffic flow prediction driven by the data knowledge.
- 2. The data knowledge integration driven traffic flow prediction method according to claim 1, wherein the step S1 comprises the steps of: S101, sampling urban traffic flow of a current road network according to a certain frequency by utilizing a sensor in the urban road network; s102, aiming at the missing value in the sampled traffic flow data, filling the missing value of the data by using a linear interpolation method, and normalizing the filled data by using zero mean normalization; s103, constructing a traffic road network relation according to the traffic flow data processed in the step S102; s104, constructing input information and target output signals of a traffic flow prediction neural network model according to the constructed traffic road network relationship, and finishing preprocessing of traffic flow data.
- 3. The data knowledge joint driving traffic flow prediction method according to claim 2, wherein the expression of the adjacency matrix in the traffic road network relationship is as follows: Wherein, the Representing an adjacency matrix in a traffic road network relationship, Representing the florid operation and, Representing a collection of n sensor locations in a traffic network, Representing a collection of adjacent node edges in a traffic network, And the weight of the adjacent edge in the traffic network is represented.
- 4. The data knowledge integration driven traffic flow prediction method according to claim 1, wherein the step S203 comprises the steps of: s2031, respectively defining two weight parameter spaces 、 And offset parameter space 、 ; S2032, according to the time signal 、 For weight parameter space 、 And offset parameter space 、 Performing space slicing operation to obtain new weight parameter space 、 And offset parameter space 、 : Wherein, the Representing the output after linear transformation of the day-to-period perception, Representing the output after the week-perceived linear transformation; s2033, output after linear transformation based on the daily cycle perception And week-aware linearly transformed output Obtaining the output of the time-aware dynamic linear transformation module And (3) completing the construction of a dynamic linear transformation module based on time perception: 。
- 5. The data knowledge integration driven traffic flow prediction method according to claim 4, wherein the step S204 comprises the steps of: s2041, output of time-aware dynamic linear transformation module in two dimensions of time and space respectively Performing dimension reduction treatment; s2042, inputting the vector after dimension reduction and the shallow network Adding, and taking the output of sigmod activated functions as Hadamard product to obtain the output of the gating unit: Wherein, the And The outputs of the gating cells after spatial mapping and temporal mapping are represented respectively, And Representing the spatially mapped and temporally mapped hidden layer vectors, The product of the Hadamard is represented, Representing the spatial mapping parameters that can be learned, Representing a learnable time mapping parameter; S2043, respectively carrying out linear transformation on the output of the gating unit after spatial mapping and time mapping in the time dimension, splicing the linear transformation results, inputting the splicing results to the full-connection layer to obtain the predicted value of the traffic flow prediction neural network model, and completing construction of the traffic flow prediction neural network model: Wherein, the Representing predicted values of traffic flow signals for M time points in the future, Indicating full connectivity layer operation.
- 6. The method for predicting traffic flow driven by data knowledge integration according to claim 5, wherein the step S3 specifically comprises: predicting a predicted value of the neural network model according to traffic flow And the historical road network traffic flow data are used for carrying out iterative updating on the traffic flow prediction neural network model parameters until the traffic flow prediction neural network model converges so as to train the traffic flow prediction neural network model.
Description
Traffic flow prediction method driven by data knowledge combination Technical Field The invention belongs to the technical field of traffic flow prediction, and particularly relates to a traffic flow prediction method driven by data and knowledge. Background Urban road traffic flow prediction is a classical spatiotemporal sequence prediction problem that requires analysis and modeling of spatiotemporal big data that contain both temporal and spatial dependencies. The urban time sequence not only has a complex spatial relationship, but also has the characteristics of dynamic evolution and multi-mode development, and is influenced by external factors such as uncertainty, mutation and the like. How to deeply analyze the high-dimensional, nonlinear, time relation and dynamic change rule of the urban traffic flow sequence data, and construct a reasonable and effective data mining method on the basis, is a hotspot problem of current research. With the progress of computer hardware technology, the cost of acquiring strong computing power and storage space becomes lower, the neural network model becomes larger and larger, and the model effect is better. However, the neural network is considered by a learner not to be supported by hardware only, and if the existing scientific knowledge can be added in deep learning, the result with higher precision can be obtained by using fewer resources, and the economic efficiency is improved. In general, knowledge can be incorporated from adding additional knowledge during data preprocessing, combining knowledge during machine learning model construction, using knowledge to design appropriate penalties and incentives during model optimization, and the like. However, most of these methods belong to data-driven models, the prediction accuracy of which depends on the authenticity and diversity of training data, and cannot be combined with knowledge, and it is difficult to achieve high-accuracy prediction with only a small amount of computing resources. Some models which integrate with external knowledge also appear at present, however, only the external knowledge characterization (mainly including known information such as time stamps, map interest points and weather conditions) is embedded in a shallow layer of the model, and knowledge is not fully utilized in the process of constructing the model. Similar to the traditional data driven model, its prediction accuracy is limited by hardware. Therefore, how to further and effectively combine knowledge, dynamically construct an efficient and lightweight neural network model, realize traffic flow prediction driven by data and knowledge together, avoid wasting computing resources, and promote the application economic benefit of the method, thus being a problem worthy of research. Disclosure of Invention Aiming at the defects in the prior art, the data-knowledge combined driving traffic flow prediction method provided by the invention solves the problems that the knowledge is not integrated into the traditional deep learning traffic flow prediction method, and the precision is improved to be in the bottleneck. In order to achieve the purpose, the technical scheme adopted by the invention is that the traffic flow prediction method driven by the combination of data and knowledge comprises the following steps: s1, preprocessing traffic flow data of a current road network; S2, configuring parameters of a traffic flow prediction neural network model, and constructing the traffic flow prediction neural network model; s3, training a traffic flow prediction neural network model by utilizing the preprocessed traffic flow data; and S4, predicting future traffic flow signals of the road network by utilizing the optimal traffic flow prediction neural network model obtained through training according to the historical road network traffic flow data, and completing traffic flow prediction driven by the data knowledge. Aiming at the problems that the structure of the existing traffic flow prediction model is more complex and redundant and the precision is improved to be in a bottleneck, the traffic flow prediction model which is driven by combining data knowledge is built, and the graph convolution and the multi-layer linear transformation are combined by using the model, so that potential time dependence and space dependence in traffic flow sequence signals can be effectively captured. Further, the step S1 includes the steps of: S101, sampling urban traffic flow of a current road network according to a certain frequency by utilizing a sensor in the urban road network; s102, aiming at the missing value in the sampled traffic flow data, filling the missing value of the data by using a linear interpolation method, and normalizing the filled data by using zero mean normalization; s103, constructing a traffic road network relation according to the traffic flow data processed in the step S102; s104, constructing input information and target output signals