Expressway flow prediction method and device, electronic equipment and storage medium

By building a traffic prediction model that integrates multi-source data, the problem of low accuracy in highway traffic prediction in the existing technology is solved, higher precision traffic prediction is achieved, and traffic management optimization is supported.

CN120372542APending Publication Date: 2025-07-25LIAONING COMM TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510463709.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing highway traffic prediction methods rely on a single historical traffic data and lack the utilization of multi-source heterogeneous data, resulting in low prediction accuracy in complex traffic scenarios.

Method used

Build a traffic prediction model, integrate traffic data, road image data, event data, meteorological data, holiday data and charging policy data, and comprehensively analyze multi-source data features to improve prediction accuracy through knowledge graph construction modules, time feature extraction modules, spatial feature extraction modules, feature fusion modules and prediction modules.

Benefits of technology

Through the comprehensive analysis of multi-source data, the accuracy and reliability of highway traffic forecasts are improved, and high-precision traffic forecast results are generated, helping traffic management departments to formulate more effective guidance plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372542A_ABST
    Figure CN120372542A_ABST
Patent Text Reader

Abstract

The invention provides a traffic prediction method and device for a highway, electronic equipment and a storage medium. The method comprises the following steps: acquiring highway multi-source data; inputting the highway multi-source data into a knowledge graph construction module of a traffic prediction model to obtain a traffic prediction knowledge graph of the highway multi-source data; inputting the traffic flow data, the meteorological data and the holiday and festival data into a time feature extraction module to obtain time features of the highway multi-source data; inputting the road portrait data and the flow prediction knowledge graph into a spatial feature extraction module to obtain spatial features of the highway multi-source data; inputting the time features, the spatial features, the event data and the charging policy data into a feature fusion module to obtain fusion features of the highway multi-source data; and inputting the fused features into a prediction module to obtain a traffic prediction result of the expressway. Thus, through the constructed flow prediction model, the multi-source data of the expressway can be fused for flow prediction, and the accuracy of expressway flow prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of road traffic, and particularly to a traffic flow prediction method, device, electronic device and storage medium for highways. Background Art

[0002] The traffic flow prediction of highways refers to predicting the traffic flow of each section of highways within a certain period in the future by analyzing data. Accurate traffic flow prediction can help traffic management departments formulate diversion plans in advance, optimize signal control, reduce traffic accidents, and improve road traffic efficiency.

[0003] The existing traffic flow prediction methods for highways mainly rely on traditional statistical models and machine learning algorithms. Although these methods can provide traffic flow prediction to a certain extent, they only rely on historical traffic flow data of roads for prediction, with a single data dimension and lack of utilization of multi-source heterogeneous data such as highway road network structures. Since multi-source heterogeneous data such as highway road network structures have an important impact on the distribution and change of traffic flow, the accuracy of highway traffic flow prediction in existing solutions is relatively low in complex traffic scenarios. Summary of the Invention

[0004] In view of this, at least the embodiments of this application provide a traffic flow prediction method, device, electronic device and storage medium for highways. Through the constructed traffic flow prediction model, multi-source data of highways can be fused for traffic flow prediction, improving the accuracy of highway traffic flow prediction.

[0005] This application mainly includes the following aspects:

[0006] In a first aspect, an embodiment of this application provides a traffic flow prediction method for highways, and the method includes:

[0007] Obtain multi-source data of highways; the multi-source data of highways includes traffic flow data, road portrait data, event data, meteorological data, holiday data and toll policy data;

[0008] Input the multi-source data of highways into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source data of highways; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module and a prediction module;

[0009] Input the traffic flow data, meteorological data and holiday data into the time feature extraction module to obtain the time features of the multi-source data of highways;

[0010] Input the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source data of highways;

[0011] Input the time feature, spatial feature, event data, and toll policy data into the feature fusion module to obtain the fusion feature of the multi-source data of the highway;

[0012] Input the fusion feature into the prediction module to obtain the traffic flow prediction result of the highway.

[0013] In a second aspect, an embodiment of the present application further provides a traffic flow prediction device for a highway. The traffic flow prediction device for the highway includes:

[0014] A data acquisition module for acquiring multi-source data of the highway; the multi-source data of the highway includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data;

[0015] A first determination module for inputting the multi-source data of the highway into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source data of the highway; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module;

[0016] A second determination module for inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time feature of the multi-source data of the highway;

[0017] A third determination module for inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial feature of the multi-source data of the highway;

[0018] A fourth determination module for inputting the time feature, spatial feature, event data, and toll policy data into the feature fusion module to obtain the fusion feature of the multi-source data of the highway;

[0019] A traffic flow prediction module for inputting the fusion feature into the prediction module to obtain the traffic flow prediction result of the highway.

[0020] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, communication is carried out between the processor and the memory through the bus. When the machine-readable instructions are run by the processor, the steps of the traffic flow prediction method for the highway described above are executed.

[0021] Fourthly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the traffic prediction method for expressways as described above.

[0022] The traffic prediction method, device, electronic device and storage medium for expressways provided by the embodiments of the present application obtain multi-source data of expressways; the multi-source data of expressways includes traffic flow data, road portrait data, event data, meteorological data, holiday data and toll policy data; input the multi-source data of expressways into the knowledge graph construction module of the traffic prediction model to obtain the traffic prediction knowledge graph of the multi-source data of expressways; the traffic prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module and a prediction module; input the traffic flow data, meteorological data and holiday data into the time feature extraction module to obtain the time features of the multi-source data of expressways; input the road portrait data and the traffic prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source data of expressways; input the time features, spatial features, event data and toll policy data into the feature fusion module to obtain the fusion features of the multi-source data of expressways; input the fusion features into the prediction module to obtain the traffic prediction result of the expressway. In this way, through the constructed traffic prediction model, multi-source data of expressways can be fused for traffic prediction, improving the accuracy of expressway traffic prediction.

[0023] To make the above objects, features and advantages of the present application more obvious and understandable, the following specifically gives preferred embodiments and, in conjunction with the accompanying drawings, makes detailed descriptions as follows. Description of the Drawings

[0024] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0025] Figure 1 Shows a flowchart of a traffic prediction method for an expressway provided by an embodiment of the present application;

[0026] Figure 2 Shows a schematic structural diagram of a traffic prediction model in an embodiment of the present application;

[0027] Figure 3 Shows a functional module diagram of a traffic prediction device for an expressway provided by an embodiment of the present application;

[0028] Figure 4The figure shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.

[0030] For the convenience of understanding the present application, the technical solutions provided by the present application will be described in detail below with reference to specific embodiments.

[0031] The embodiments of the present application provide a traffic flow prediction method, device, electronic device, and storage medium for expressways. Through the constructed traffic flow prediction model, multi-source data of the expressway can be fused for traffic flow prediction, improving the accuracy of expressway traffic flow prediction.

[0032] Please refer to Figure 1 , Figure 1 which is a flowchart of a traffic flow prediction method for an expressway provided by an embodiment of the present application. As Figure 1 shown, the traffic flow prediction method for an expressway provided by the embodiment of the present application includes the following steps:

[0033] S101, obtain multi-source data of the expressway; the multi-source data of the expressway includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data.

[0034] Here, the multi-source data of expressways that need to be integrated are collected first. In the embodiments of this application, the multi-source data of expressways include traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data. Among them, the traffic flow data includes the historical traffic flow data of expressways, counted hourly. The road portrait data includes the proportion of vehicle types per hour for each toll unit of the expressway. The event data includes events such as road closures due to construction (duration and specific start date of the road closure), traffic control, and sudden traffic accidents. The meteorological data includes weather information such as rain, snow, sand and dust, and group fog. The holiday data includes information such as legal holidays and adjusted holidays. The toll policy data includes rate adjustments, preferential policies, etc. By collecting multi-source data and comprehensively capturing various factors affecting expressway traffic, a rich information basis can be provided for subsequent traffic flow prediction.

[0035] S102, input the multi-source data of the expressway into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source data of the expressway; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module.

[0036] Here, please refer to Figure 2 , Figure 2 which is the structural schematic diagram of the traffic flow prediction model in the embodiments of this application. As Figure 2 shown, the traffic flow prediction model 200 includes a knowledge graph construction module 210, a time feature extraction module 220, a spatial feature extraction module 230, a feature fusion module 240, and a prediction module 250. Specifically, input the multi-source data of the expressway into the knowledge graph construction module 210 of the traffic flow prediction model 200 to obtain the traffic flow prediction knowledge graph of the multi-source data of the expressway. In the embodiments of this application, by constructing the traffic flow prediction knowledge graph and combining the multi-source data with the topological structure of the expressway, a graph structure containing entities, relationships, and attributes is formed, which not only provides structured data support for subsequent feature extraction but also can better capture the complex relationships between data, improving the interpretability and predictability of the model.

[0037] S103, input the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the multi-source data of the expressway.

[0038] Here, input the traffic flow data, meteorological data, and holiday data into the time feature extraction module 220 to obtain the time features of the multi-source data of the expressway. Specifically, by extracting time features to capture the changing rules of traffic flow over time, as well as the impact of meteorological conditions and holidays on traffic flow, it helps the model better understand the traffic flow changes in the time dimension, thereby improving the accuracy of prediction.

[0039] S104, input the road image data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source data of the highway.

[0040] Here, input the road image data and the traffic flow prediction knowledge graph into the spatial feature extraction module 230 to obtain the spatial features of the multi-source data of the highway. Specifically, by extracting spatial features, capturing the traffic flow distribution and variation patterns between different sections of the highway, and combining the topological structure information in the traffic flow prediction knowledge graph, it helps the model to better understand the traffic flow changes in the spatial dimension, thereby improving the prediction accuracy.

[0041] S105, input the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fusion features of the multi-source data of the highway.

[0042] Here, input the time features, spatial features, event data, and toll policy data into the feature fusion module 240 to obtain the fusion features of the multi-source data of the highway. Specifically, through feature fusion, comprehensively process the time features, spatial features, event data, and toll policy data to generate more comprehensive fusion features, which helps the model to better capture the complex relationships between multi-source data, thereby improving the prediction accuracy and reliability.

[0043] S106, input the fusion features into the prediction module to obtain the traffic flow prediction result of the highway.

[0044] Here, input the fusion features into the prediction module 250 to obtain the traffic flow prediction result of the highway. Specifically, use the features after multi-source data fusion for traffic flow prediction, comprehensively considering the time features, spatial features, event data, and toll policy data, making full use of the advantages of multi-source data, improving the accuracy and reliability of traffic flow prediction, and thus generating a high-precision traffic flow prediction result for the highway.

[0045] Furthermore, the step of inputting the multi-source data of the highway into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source data of the highway includes:

[0046] Step a1, preprocess the multi-source data of the highway to obtain the preprocessed multi-source data.

[0047] Here, preprocessing the multi-source data of the highway includes data cleaning, normalization, and standardization processing to ensure the quality and consistency of the data. The preprocessed multi-source data will serve as the basis for subsequent construction of the traffic flow prediction knowledge graph.

[0048] Step a2: According to the constructed highway network knowledge graph, associate the preprocessed multi-source data with the entities in the highway network knowledge graph to obtain the traffic prediction knowledge graph.

[0049] Here, according to the constructed highway network knowledge graph, associate the preprocessed multi-source data with the entities in the highway network knowledge graph, and through attribute extension, dynamically integrate the multi-source data, and finally obtain the traffic prediction knowledge graph. The traffic prediction knowledge graph not only contains multi-source data, but also integrates the topological structure information of the highway, providing rich context information for subsequent feature extraction and prediction.

[0050] Further, construct the highway network knowledge graph according to the following steps:

[0051] Step b1: Collect highway infrastructure data; the highway infrastructure data includes toll station data, toll gantry data, toll road data, and toll unit data.

[0052] Here, in order to construct the highway network knowledge graph, it is first necessary to collect highway infrastructure data. In the embodiments of the present application, the highway infrastructure data includes toll station data, toll gantry data, toll road data, and toll unit data. Among them, the toll station data includes the name, location coordinates, number of lanes, and affiliated road section information of the toll station. The toll gantry data includes the number, location coordinates, affiliated toll unit, and connected road section information of the toll gantry. The toll road data includes the starting point, ending point, length, affiliated toll unit, affiliated toll road, connected gantry, and toll station information of the toll road. The toll unit data includes the number, included road sections, and mileage information of the toll unit.

[0053] Step b2: Define the entity types of each entity of the highway infrastructure and the relationship types between entities, and based on the highway infrastructure data, add attribute information to each entity of the highway infrastructure.

[0054] Here, based on the collected highway infrastructure data, the entity types of each entity in the highway infrastructure and the relationship types between entities are defined, and attribute information is added to each entity in the highway infrastructure. Specifically, the entity types of each entity in the highway infrastructure include toll stations, toll gantries, toll sections, and toll units. The relationship types between entities include the upstream and downstream relationship between toll stations, the management relationship between toll stations and toll sections, the inclusion relationship between toll sections and toll units, and the subordination relationship between toll gantries and toll units. The attribute information of the toll station entity includes the name, location coordinates, number of lanes, and information on the affiliated section of the toll station. The attribute information of the toll gantry entity includes the number, location coordinates, affiliated toll unit, and information on the connected section of the toll gantry. The attribute information of the toll section entity includes the starting point, ending point, length, affiliated toll unit, affiliated toll section, connected gantries, and toll station information of the toll section. The attribute information of the toll unit entity includes the number, included sections, and mileage information of the toll unit.

[0055] Step b3, based on the geographic information system data, the highway infrastructure data, the entity types and attribute information of each entity, and the relationship types between entities, construct the highway road network knowledge graph.

[0056] Here, based on the defined entity types, relationship types, and attribute information above, combined with geographic information system (GIS) data and highway infrastructure data, construct the highway road network knowledge graph. Specifically, first integrate the collected highway infrastructure data with GIS data to ensure the accuracy of the geographic coordinates and spatial relationships of each entity. Then construct a graph structure, with entities as nodes and relationships as edges. Each node contains its corresponding attribute information, and each edge represents the relationship between entities. Finally, store the constructed highway road network knowledge graph in a graph database for subsequent data query and analysis. Through the above steps, the obtained highway road network knowledge graph not only contains the topological structure information of the highway, but also integrates multi-source data, providing rich context information for subsequent feature extraction and traffic flow prediction. It not only improves the accuracy and reliability of the prediction, but also enhances the interpretability of the model, enabling traffic management personnel to more intuitively understand the prediction results and thus make more reasonable decisions.

[0057] Furthermore, inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the highway multi-source data includes:

[0058] Step c1, splice the features of the traffic flow data, meteorological data, and holiday data to obtain a multi-feature time series.

[0059] Here, in order to extract the time features of multi-source highway data, the embodiment of the present application constructs a multi-input Long Short-Term Memory (LSTM) model. LSTM is a special type of Recurrent Neural Network (RNN), specifically designed to capture long-term dependencies in time series data. By introducing a series of gating mechanisms, LSTM can effectively solve the problems of gradient vanishing and gradient explosion in traditional RNNs when dealing with long sequences. First, the traffic flow data, meteorological data, and holiday data need to be feature-stitched in the feature dimension to form a multi-feature time series as the input of the multi-input LSTM model.

[0060] Specifically, the traffic flow data can be expressed as:

[0061] x flow = [x1, x2, …, x t ; where x t represents the traffic flow at the t-th hour.

[0062] The meteorological data can be expressed as:

[0063] x weather = [w1, w2, …, w t ; where w t represents the meteorological features (including temperature, rainfall, wind speed, etc.) at the t-th hour.

[0064] The holiday data can be expressed as: x holiday = [d1, d2, …, d t .

[0065] The multi-feature time series after stitching can be expressed as:

[0066] x t = [x flow , x weather , x holiday ; where x t is a multi-dimensional vector.

[0067] Step c2: Input the multi-feature time series into the Long Short-Term Memory network model to obtain the time features of the multi-source highway data.

[0068] Here, input the multi-feature time series into the Long Short-Term Memory network model to obtain the time features of the multi-source highway data. Specifically, in the multi-input LSTM, the traffic flow data and meteorological data, etc. will jointly affect the hidden state and memory unit of the LSTM. The following is the formula model of the multi-input LSTM:

[0069] The input gate determines which new information will be added to the memory cell and can be expressed as:

[0070] i t = σ(W i · [h t-1 , x t + b i );

[0071] Where x t = [x flow , x weather , x holiday is the concatenated input; W i is the weight matrix of the input gate; b i is the bias term of the input gate; σ is the Sigmoid activation function.

[0072] The forget gate determines which information will be discarded from the memory cell and can be expressed as:

[0073] f t = σ(W f · [h t-1 , x t + b f );

[0074] Where W f is the weight matrix of the forget gate; b f is the bias term of the forget gate.

[0075] The candidate memory cell represents the new information that may be added to the memory cell and can be expressed as:

[0076]

[0077] Where: W c is the weight matrix of the candidate memory cell; b c is the bias term of the candidate memory cell.

[0078] Updating the memory cell by combining the information of the forget gate and the input gate can be expressed as:

[0079]

[0080] Where: C t is the memory cell at the current time step; C t-1 is the memory cell at the previous time step.

[0081] The output gate determines which information will be output to the hidden state and can be expressed as:

[0082] o t = σ(W o · [ht-1 , x t + b o );

[0083] Where: W o is the weight matrix of the output gate; b o is the bias term of the output gate.

[0084] The hidden state is the output of the LSTM, which contains the temporal features extracted from the input data and can be expressed as:

[0085]

[0086] Wherein, is the temporal feature output by the LSTM model, that is, the temporal feature of the multi-source highway data.

[0087] Furthermore, the step of inputting the road portrait data and the traffic prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source highway data includes:

[0088] Step d1, input the road portrait data and the traffic prediction knowledge graph into the graph attention network model to obtain the graph structure data of the highway road network.

[0089] Here, in order to extract the spatial features of the multi-source highway data, this method constructs a graph attention network (Graph Attention Network, GAT) model. The GAT model is a graph neural network (Graph Neural Network, GNN) model based on the attention mechanism, which can dynamically learn the importance weights between nodes, thereby better capturing the complex relationships in the graph structure. First, input the road portrait data and the traffic prediction knowledge graph into the GAT model. This step converts the multi-source data into graph structure data suitable for graph neural network processing, providing a basis for subsequent spatial feature extraction.

[0090] Step d2, based on the graph structure data, construct the node feature matrix and the adjacency matrix of each node of the highway road network.

[0091] Here, based on the graph structure data, construct the node feature matrix H and the adjacency matrix A of each node of the highway road network. The node feature matrix H contains the feature vectors of each node, and these feature vectors integrate the relevant information in the road portrait data and the traffic prediction knowledge graph. The adjacency matrix A represents the connection relationship between nodes and defines the graph structure.

[0092] Specifically, the node feature matrix H is an N×D matrix, where N is the total number of nodes and D is the feature dimension of each node, and can be expressed as:

[0093]

[0094] Among them, the toll station node feature vector can be expressed as:

[0095] h tollgate = [name code, longitude, latitude, number of lanes, section code to which it belongs, traffic flow, event code, meteorological code, holiday code, rate adjustment].

[0096] The toll gantry node feature vector can be expressed as:

[0097] h gantry = [number code, longitude, latitude, toll unit code to which it belongs, connecting section code, traffic flow, event code, meteorological code, holiday code, rate adjustment].

[0098] The toll road section node feature vector can be expressed as:

[0099] h road = [starting point code, ending point code, length, toll unit code to which it belongs, connecting gantry code, connecting toll station code, proportion of small vehicles, proportion of large vehicles, event code, meteorological code, holiday code, rate adjustment].

[0100] The toll unit node feature vector can be expressed as:

[0101] h section = [number code, included section code, mileage, proportion of small vehicles, proportion of large vehicles, event code, meteorological code, holiday code, rate adjustment].

[0102] The adjacency matrix A is an N×N matrix representing the connection relationship between nodes. The element A in the matrix ij indicates whether there is an edge between node i and node j: if there is, A ij = 1, otherwise A ij = 0.

[0103] Step d3: Calculate the attention coefficients between the nodes based on the node feature matrices and the adjacency matrix of the respective nodes.

[0104] Here, calculate the attention coefficients e between the nodes based on the node feature matrix H and the adjacency matrix A ij ; specifically, it can be expressed as:

[0105] e ij = a(Wh i , Wh j );

[0106] Among them, h i and h jis the feature vector of node i and node j. W is the weight matrix. a is the attention mechanism function (such as a single-layer neural network). Specifically, for toll station A (node i) and toll station B (node j), a single-layer neural network is used to calculate the attention coefficient e ij , which can be expressed as:

[0107] e ij =LeakyReLU(W[h i ||h j ).

[0108] This step dynamically learns the importance weights between nodes through the attention mechanism, so as to better capture the complex relationships in the graph structure.

[0109] Step d4, based on the node feature matrices, adjacency matrices of the respective nodes, and the attention coefficients between the respective nodes, determine the spatial features of the respective nodes.

[0110] Here, based on the node feature matrix H, the adjacency matrix A, and the attention coefficients e ij between the respective nodes, determine the spatial features of the respective nodes This step updates the feature vector of each node by aggregating the information of neighboring nodes, so as to capture the spatial relationship.

[0111] Specifically, use the SoftMax function to normalize the attention coefficients to obtain the normalized attention coefficients α ij , which is specifically expressed as:

[0112]

[0113] where N(i) is the set of neighbor nodes of node i, determined by the adjacency matrix A.

[0114] Specifically, for toll station A (node i), calculate its normalized attention coefficients α ij with all its neighbor nodes (such as toll station B, section 1). Then, according to the normalized attention coefficients α ij , aggregate the information of its neighbor nodes (such as toll station B, section 1) to generate a new feature representation of node i As the spatial features of the respective nodes, which can be expressed as:

[0115] Step d5, based on the spatial features of the respective nodes, determine the spatial features of the multi-source data of the highway.

[0116] Here, the spatial features of the respective nodes Determine the spatial characteristics of the multi-source data of the highway. These spatial characteristics will be used in the subsequent feature fusion module to form comprehensive features together with time characteristics, event data, and toll policy data for the final traffic flow prediction.

[0117] Furthermore, inputting the time characteristics, spatial characteristics, event data, and toll policy data into the feature fusion module to obtain the fusion characteristics of the multi-source data of the highway includes:

[0118] Step e1: Concatenate the time characteristics and spatial characteristics to obtain the first feature vector.

[0119] Here, concatenate the time characteristics and spatial characteristics to obtain the first feature vector h concat , specifically expressed as:

[0120]

[0121] Step e2: Encode the event data and toll policy data to obtain the second feature vector.

[0122] Here, encode the event data (such as road closures due to construction, traffic accidents) into the feature vector h event , and encode the toll policy data (such as rate adjustments, preferential policies) into the feature vector h policy to obtain the second feature vector [h event , h policy . Encoding the event data and toll policy data converts non-numerical external factors into numerical feature vectors for subsequent fusion processing.

[0123] Step e3: Use a fully connected layer to fuse the first feature vector and the second feature vector to obtain the fusion characteristics of the multi-source data of the highway.

[0124] Here, use a fully connected layer to fuse the concatenated feature h concat and the encoded feature [h event , h policy to obtain the fusion feature h fused , specifically expressed as:

[0125] h fused = σ(W f · [h concat , h event , h policy + b f );

[0126] where W f is the weight matrix, bf is the bias term, and σ is the activation function (such as ReLU). Finally, the fused feature h of the highway multi-source data is output fused .

[0127] Further, inputting the fused feature into the prediction module to obtain the traffic flow prediction result of the highway includes:

[0128] Inputting the fused feature into a fully connected neural network to obtain the traffic flow prediction result of the highway.

[0129] Here, the fused feature h of the highway multi-source data fused is input into a fully connected neural network to predict the traffic flow in the future time as the traffic flow prediction result of the highway, which is specifically expressed as:

[0130]

[0131] where W p is the weight matrix, and b p is the bias term.

[0132] A traffic flow prediction method for a highway provided by an embodiment of the present application includes: obtaining highway multi-source data; the highway multi-source data includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data; inputting the highway multi-source data into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the highway multi-source data; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module; inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the highway multi-source data; inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the highway multi-source data; inputting the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fused feature of the highway multi-source data; inputting the fused feature into the prediction module to obtain the traffic flow prediction result of the highway. In this way, through the constructed traffic flow prediction model, multi-source data of the highway can be fused for traffic flow prediction, improving the accuracy of highway traffic flow prediction.

[0133] Based on the same inventive concept, a traffic flow prediction device for a highway corresponding to the traffic flow prediction method for a highway provided in the above embodiment is further provided in an embodiment of the present application. Since the principle of solving problems by the device in the embodiment of the present application is similar to that of the traffic flow prediction method for a highway in the above embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0134] Please refer to Figure 3, Figure 3 This is a functional block diagram of a traffic flow prediction device for a highway provided by an embodiment of the present application. As Figure 3 shown, the traffic flow prediction device 300 for the highway includes:

[0135] A data acquisition module 310, configured to acquire multi-source data of the highway; the multi-source data of the highway includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data.

[0136] A first determination module 320, configured to input the multi-source data of the highway into a knowledge graph construction module of a traffic flow prediction model to obtain a traffic flow prediction knowledge graph of the multi-source data of the highway; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module.

[0137] A second determination module 330, configured to input the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the multi-source data of the highway.

[0138] A third determination module 340, configured to input the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source data of the highway.

[0139] A fourth determination module 350, configured to input the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fusion features of the multi-source data of the highway.

[0140] A traffic flow prediction module 360, configured to input the fusion features into the prediction module to obtain a traffic flow prediction result of the highway.

[0141] Further, when the first determination module 320 is configured to input the multi-source data of the highway into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source data of the highway, the first determination module 320 is specifically configured to:

[0142] Preprocess the multi-source data of the highway to obtain preprocessed multi-source data;

[0143] According to the constructed highway road network knowledge graph, associate the preprocessed multi-source data with the entities in the highway road network knowledge graph to obtain the traffic flow prediction knowledge graph.

[0144] Further, the first determination module 320 is used to construct the highway road network knowledge graph according to the following steps:

[0145] Collect highway infrastructure data; the highway infrastructure data includes toll station data, toll gantry data, toll road section data, and toll unit data;

[0146] Define the entity types of each entity in the highway infrastructure and the relationship types between entities, and based on the highway infrastructure data, add attribute information to each entity in the highway infrastructure;

[0147] Based on the geographic information system data, the highway infrastructure data, the entity types and attribute information of each entity, and the relationship types between entities, construct the highway road network knowledge graph.

[0148] Further, when the second determination module 330 is used to input the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the highway multi-source data, the second determination module 330 is specifically used for:

[0149] Perform feature splicing on the traffic flow data, meteorological data, and holiday data to obtain a multi-feature time series;

[0150] Input the multi-feature time series into a long short-term memory network model to obtain the time features of the highway multi-source data.

[0151] Further, when the third determination module 340 is used to input the road portrait data and the traffic flow prediction knowledge graph into the space feature extraction module to obtain the space features of the highway multi-source data, the third determination module 340 is specifically used for:

[0152] Input the road portrait data and the traffic flow prediction knowledge graph into a graph attention network model to obtain the graph structure data of the highway road network;

[0153] Based on the graph structure data, construct the node feature matrix and adjacency matrix of each node in the highway road network;

[0154] Based on the node feature matrix and adjacency matrix of each node, calculate the attention coefficients between each node;

[0155] Based on the node feature matrix, adjacency matrix of each node, and the attention coefficients between each node, determine the space features of each node;

[0156] Based on the space features of each node, determine the space features of the highway multi-source data.

[0157] Further, when the fourth determination module 350 is configured to input the time feature, spatial feature, event data, and toll policy data into the feature fusion module to obtain the fusion feature of the highway multi-source data, the fourth determination module 350 is specifically configured to:

[0158] Perform feature splicing on the time feature and the spatial feature to obtain a first feature vector;

[0159] Perform feature encoding on the event data and the toll policy data to obtain a second feature vector;

[0160] Use a fully connected layer to perform feature fusion on the first feature vector and the second feature vector to obtain the fusion feature of the highway multi-source data.

[0161] Further, when the traffic flow prediction module 360 is configured to input the fusion feature into the prediction module to obtain the traffic flow prediction result of the highway, the traffic flow prediction module 360 is specifically configured to:

[0162] Input the fusion feature into a fully connected neural network to obtain the traffic flow prediction result of the highway.

[0163] A traffic flow prediction device for a highway provided by an embodiment of the present application includes: a data acquisition module for acquiring highway multi-source data; the highway multi-source data includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data; a first determination module for inputting the highway multi-source data into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the highway multi-source data; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module; a second determination module for inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time feature of the highway multi-source data; a third determination module for inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial feature of the highway multi-source data; a fourth determination module for inputting the time feature, spatial feature, event data, and toll policy data into the feature fusion module to obtain the fusion feature of the highway multi-source data; a traffic flow prediction module for inputting the fusion feature into the prediction module to obtain the traffic flow prediction result of the highway. In this way, through the constructed traffic flow prediction model, multi-source data of the highway can be fused for traffic flow prediction, improving the accuracy of highway traffic flow prediction.

[0164] Based on the same inventive concept, please refer to Figure 4 , Figure 4 which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 4As shown, the electronic device 400 includes: a processor 410, a memory 420, and a bus 430.

[0165] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 runs, the processor 410 communicates with the memory 420 through the bus 430. When the machine-readable instructions are run by the processor 410, the steps of the traffic prediction method for highways provided in the above embodiments are executed. For the specific implementation manners, reference may be made to the method embodiments, which will not be elaborated herein.

[0166] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the traffic prediction method for highways provided in the above embodiments are executed. For the specific implementation manners, reference may be made to the method embodiments, which will not be elaborated herein.

[0167] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the foregoing method embodiments, which will not be elaborated herein.

[0168] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0169] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] In addition, the functional units in the embodiments provided in the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0171] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0172] It should be noted that: similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used for descriptive distinction and cannot be understood as indicating or implying relative importance.

[0173] Finally, it should be noted that: the above-mentioned embodiments are only specific implementation manners of this application, used to illustrate the technical solution of this application, rather than limiting it. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by this application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A traffic flow prediction method for expressways, characterized in that, The method includes: Obtaining multi-source highway data; the multi-source highway data includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data; Inputting the multi-source highway data into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source highway data; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module; Inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the multi-source highway data; Inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source highway data; Inputting the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fusion features of the multi-source highway data; Inputting the fusion features into the prediction module to obtain the traffic flow prediction result of the highway.

2. The traffic flow prediction method for expressways according to claim 1, characterized in that, The step of inputting the multi-source highway data into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source highway data includes: Preprocessing the multi-source highway data to obtain preprocessed multi-source data; According to the constructed highway road network knowledge graph, associating the preprocessed multi-source data with the entities in the highway road network knowledge graph to obtain the traffic flow prediction knowledge graph.

3. The traffic flow prediction method for expressways according to claim 2, wherein The highway road network knowledge graph is constructed according to the following steps: Collecting highway infrastructure data; the highway infrastructure data includes toll station data, toll gantry data, toll road section data, and toll unit data; Defining the entity types of each entity of the highway infrastructure and the relationship types between entities, and adding attribute information to each entity of the highway infrastructure based on the highway infrastructure data; Constructing the highway road network knowledge graph based on the geographic information system data, the highway infrastructure data, the entity types and attribute information of each entity, and the relationship types between entities.

4. The traffic flow prediction method for expressways according to claim 1, characterized in that, The step of inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the multi-source highway data includes: Performing feature splicing on the traffic flow data, meteorological data, and holiday data to obtain a multi-feature time series; Inputting the multi-feature time series into a long short-term memory network model to obtain the time features of the multi-source highway data.

5. The traffic flow prediction method for expressways according to claim 1, characterized in that The step of inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source highway data includes: Inputting the road portrait data and the traffic flow prediction knowledge graph into a graph attention network model to obtain the graph structure data of the highway road network; Based on the graph structure data, constructing the node feature matrix and adjacency matrix of each node of the highway road network; Calculate the attention coefficients between the respective nodes based on the node feature matrices and adjacency matrices of the respective nodes; Determine the spatial features of the respective nodes based on the node feature matrices, adjacency matrices of the respective nodes, and the attention coefficients between the respective nodes; Determine the spatial features of the multi-source highway data based on the spatial features of the respective nodes.

6. The traffic flow prediction method for expressways according to claim 1, characterized in that The step of inputting the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fusion features of the multi-source highway data includes: Perform feature concatenation on the time features and spatial features to obtain a first feature vector; Perform feature encoding on the event data and toll policy data to obtain a second feature vector; Use a fully connected layer to perform feature fusion on the first feature vector and the second feature vector to obtain the fusion features of the multi-source highway data.

7. The traffic flow prediction method for expressways according to claim 1, characterized in that The step of inputting the fusion features into the prediction module to obtain the traffic flow prediction result of the highway includes: Input the fusion features into a fully connected neural network to obtain the traffic flow prediction result of the highway.

8. A traffic flow prediction device for a highway, characterized in that, The traffic flow prediction device for the highway includes: A data acquisition module for acquiring multi-source highway data; the multi-source highway data includes traffic flow data, road portrait data, event data, meteorological data, holiday data, and toll policy data; A first determination module for inputting the multi-source highway data into the knowledge graph construction module of the traffic flow prediction model to obtain the traffic flow prediction knowledge graph of the multi-source highway data; the traffic flow prediction model further includes a time feature extraction module, a spatial feature extraction module, a feature fusion module, and a prediction module; A second determination module for inputting the traffic flow data, meteorological data, and holiday data into the time feature extraction module to obtain the time features of the multi-source highway data; A third determination module for inputting the road portrait data and the traffic flow prediction knowledge graph into the spatial feature extraction module to obtain the spatial features of the multi-source highway data; A fourth determination module for inputting the time features, spatial features, event data, and toll policy data into the feature fusion module to obtain the fusion features of the multi-source highway data; A traffic flow prediction module for inputting the fusion features into the prediction module to obtain the traffic flow prediction result of the highway.

9. An electronic device, characterized in that, including: A processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are run by the processor, the steps of the traffic flow prediction method for the highway according to any one of claims 1 to 7 are executed.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by the processor, the steps of the traffic flow prediction method for the highway according to any one of claims 1 to 7 are executed.

Citation Information

Cited By

  • Road toll prediction method and system based on portal network spatial-temporal feature fusion

    CN121684213A

  • A Highway Toll Prediction Method and System Based on Spatiotemporal Feature Fusion of Gantry Networks

    CN121684213B

  • Traffic flow prediction method, device, equipment and product

    CN121811640A