Highway OD and path flow prediction method, electronic device and storage medium

By constructing a model based on graph neural networks and hierarchical flow networks, and using data from the highway toll system, spatiotemporal features are extracted for OD and path flow prediction, solving the lag problem of real-time prediction and achieving high-precision OD and path flow prediction.

CN115952920BActive Publication Date: 2026-06-09FUJIAN EXPRESSWAY NETWORK OPERATION CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUJIAN EXPRESSWAY NETWORK OPERATION CO LTD
Filing Date
2023-01-13
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies cannot achieve real-time prediction of highway origin-destination (OD) and route flow. In particular, due to the lag in ETC data, it is impossible to grasp the real-time OD distribution. Traditional methods have limitations in real-time prediction.

Method used

A model based on graph neural networks and hierarchical flow networks is constructed. Temporal and spatial features are extracted through a spatiotemporal convolution model. Real-time OD and path flow prediction is performed using highway toll system data. Graph structure learning units, temporal convolution units, spatial convolution units and output units are used, combined with a fully connected matrix for flow prediction.

Benefits of technology

It enables real-time prediction of OD and path flow on highways, improves prediction accuracy, solves the problem of real-time OD and path flow prediction, and constructs an integrated model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115952920B_ABST
    Figure CN115952920B_ABST
Patent Text Reader

Abstract

The expressway OD and path flow prediction method, electronic equipment and storage medium belong to the technical field of expressway intelligent prediction management. In order to solve the problem of real-time prediction of expressway OD flow and path flow, the present application constructs a space-time convolution model, including a graph structure learning unit, a time convolution unit, a space convolution unit and an output unit, which is used for predicting the time series of expressway entrance flow and outputting the predicted entrance flow; a hierarchical flow model is constructed; the predicted entrance flow is mapped to the OD matrix and the path matrix through two fully connected matrices in turn, and the reverse propagation mechanism of the neural network is used for predicting the expressway OD flow and the path flow; then, model training and model prediction are carried out. The present application realizes an integrated model for predicting entrance flow, OD flow and path flow, and the hierarchical flow model solves the problem of OD and path flow prediction under the condition of being unable to obtain real-time OD and path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent predictive management technology for highways, specifically relating to methods for predicting highway OD and route traffic, electronic devices, and storage media. Background Technology

[0002] OD matrix prediction and OD route prediction are important parts of highway travel demand forecasting and are important bases for highway operation and management. Due to limitations in data acquisition technology, highway forecasting mainly focuses on traffic flow prediction at stations or cross sections.

[0003] With the development of intelligent management and control of highways, higher real-time performance and prediction accuracy are required for OD matrices and route prediction to support real-time online vehicle simulation, as well as congestion warnings and travel guidance. The development and widespread adoption of ETC technology, through detailed individual vehicle travel data, reconstructs multi-dimensional information such as travel time, OD, route, and journey time for each vehicle. This leverages the advantages of data obtained through network toll collection, including comprehensive sample size, low cost, and high timeliness, providing new opportunities for OD and route prediction on highways. However, since OD data can only be statistically analyzed after a trip is completed, real-time OD distribution cannot be grasped. Therefore, how to utilize real-time entry and exit data, constrained by entry and exit flow, to infer real-time OD distribution and even route distribution is a pressing issue that needs to be addressed.

[0004] Most domestic and international research on OD matrix estimation utilizes cross-sectional (entrance / exit or road segment) statistical data for inverse OD matrix estimation. Common methods include: 1. Generalized least squares model: This involves establishing a dynamic OD matrix estimation algorithm for highways, estimating the time-varying OD matrix through road segment traffic volume and travel time. 2. Backpropagation (BP) neural network: Using highway entrance traffic as network input, weights are assigned to the ODs to be optimized, and highway exit traffic as network output. The model is trained using a BP neural network to calculate the OD matrix. These methods require knowledge of both inbound and outbound traffic for OD matrix estimation. However, in real-time prediction, outbound traffic statistics are subject to lag. Therefore, these OD matrix estimation methods are only applicable to reconstructing OD data for completed journeys. With the widespread adoption of ETC (Electronic Toll Collection), historical OD data can be directly obtained from individual vehicle details in the toll management system; OD reconstruction alone is no longer sufficient for control requirements. After the construction period from 2010 to 2020, research on highway OD matrix estimation has gradually decreased.

[0005] A spatiotemporal long short-term memory (STLSTM) model was constructed, and the temporal features of each OD sequence were individually constructed. Spatial dependency features were constructed through a spatial relation matrix. After training with an LSTM model, the prediction results were output through a fully connected network after a weighted sum of the time and spatial dimensions (Lin Youfang, Yin Kang, Dang Yi, et al. OD passenger demand prediction based on spatiotemporal LSTM [J]. Journal of Beijing Jiaotong University, 2019, 43(1):8.). However, for non-ticketed transportation systems, directly predicting the OD matrix by constructing a neural network model is not feasible. Due to the lag in OD data, statistics can only be collected after the trip is completed, making OD prediction inconsistent with the conditions of general time series prediction models. Therefore, the above methods have limitations in application.

[0006] The invention disclosed in publication number CN112001548A, entitled "A Deep Learning-Based OD Passenger Flow Prediction Method," utilizes a deep neural network model to construct a connection between real-time passenger flow data and future OD matrix data. However, because the neural network model lacks interpretability when mapped to the physical world, it is difficult to apply in practice. Summary of the Invention

[0007] The problem to be solved by this invention is to predict the OD and path flow of highways in real time, and to propose a method, electronic device and storage medium for predicting the OD and path flow of highways.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] A method for predicting OD and path flow on highways includes the following steps:

[0010] S1. Data Acquisition: Based on the highway toll system, collect detailed vehicle data, obtain inbound traffic data of highway toll stations, driving routes composed of gantry sequence and route traffic data, for model training;

[0011] Obtain real-time inbound traffic data from highway toll stations for model prediction;

[0012] S2. Construct a spatiotemporal convolutional model: including graph structure learning units, temporal convolutional units, spatial convolutional units, and output units, used to predict the time series of highway inbound traffic and output the predicted inbound traffic.

[0013] S3. Construct a hierarchical flow model: The predicted inbound traffic obtained in step S2 is mapped onto the OD matrix and path matrix in sequence through two fully connected matrices. The OD traffic and path traffic are predicted for the highway through the backpropagation mechanism of the neural network.

[0014] S4. Model Training: Input the inbound traffic data of the highway toll stations obtained in step S1 into the spatiotemporal convolution model, with the goal of minimizing the loss between the predicted result and the inbound traffic volume during the predicted period, and complete the training of the spatiotemporal convolution model; then input the inbound traffic volume, OD traffic volume and path traffic volume of each time slice into the hierarchical flow model, with the goal of minimizing the loss between the predicted value and the actual value of each layer, and complete the training of the hierarchical flow model.

[0015] S5. Model Prediction: Input the real-time inbound traffic of the highway toll station into the spatiotemporal convolutional model trained in step S4 to obtain the predicted inbound traffic. Then input the predicted inbound traffic into the hierarchical flow model trained in step S4 to obtain the predicted OD traffic and the predicted path traffic.

[0016] Furthermore, the method for constructing the graph structure learning unit in step S2 includes the following steps:

[0017] S2.1 Set the number of highway toll stations to N. Through embedding layer learning, represent each station as a D-dimensional vector and output a matrix. It is the set of real numbers;

[0018] S2.2 Input the site representation matrix E into the graph structure learning unit to obtain the graph adjacency matrix. Used to represent hidden relationships between sites;

[0019] S2.3 The constructed graph structure learning unit is:

[0020] M1=tanh(αE1Θ1)

[0021] M2=tanh(αE2Θ2)

[0022]

[0023]

[0024] Where E1 and E2 are matrices output by the training stations after the embedding layer, reflecting the number of stations and the order in which they enter the model, Θ1 and Θ2 are linear transformations, M1 and M2 are intermediate results of the station representation matrices after linear transformation, α is the model hyperparameter, A is the adjacency matrix, and W is a mask matrix composed of 0s and 1s.

[0025] Furthermore, the method for constructing the temporal convolutional unit in step S2 includes the following steps:

[0026] S2.4. Set the input time series U0 of the inbound traffic flow of the highway toll station, specifically a traffic flow time series of length T:

[0027]

[0028] Where: F0 is the input feature dimension;

[0029] S2.5. The time series U0 of the inbound traffic flow of the highway toll stations is convolved with s convolution kernels of different sizes to obtain the temporal convolution features. Use padding methods during convolution to ensure that the input and output lengths are consistent:

[0030] Where: Fs is the dimension of the output temporal convolutional feature;

[0031] U s =Relu(…(Relu(U0*Γ1)*Γ2)…)*Γ s

[0032] Where * represents the convolution operation, Γ1, ..., Γ s For s convolution kernels of different sizes, K is the size of the convolution kernel;

[0033] S2.6. Apply the temporal convolutional features obtained in step S2.5 using the sigmoid and tanh functions as activation functions, and then perform another convolution. The output X is:

[0034] X = sigmoid(U s )*tanh(U s )

[0035] Where X represents the output feature of the temporal convolutional unit.

[0036] Furthermore, the method for constructing the spatial convolutional unit in step S2 includes the following steps:

[0037] S2.7. Set the input spatial convolution feature H0 as:

[0038] H0 = X

[0039] S2.8. Since the graph adjacency matrix is ​​an asymmetric matrix, therefore... and Extract the dependencies between a site and its associated sites and the sites it is associated with:

[0040]

[0041] Among them, H K The feature is a spatial convolutional feature that has undergone k spatial convolutional layers, where k is the number of spatial convolutional layers and λ is a hyperparameter used to control the ratio of original state information to hidden state information.

[0042] S2.9. After concatenating the spatial convolutional features of each layer, pass them through the convolution kernel Γ.out The output is the spatial convolutional feature H. out :

[0043] H out =[H 1 H k ]*Γ out .

[0044] Furthermore, the specific implementation method of the output unit in step S2 includes the following steps: Temporal convolutional units and spatial convolutional units are sequentially superimposed, and then output after passing through an activation function and a basic convolution to obtain the predicted inbound traffic Y:

[0045] Y = Relu(Relu(H) out )*Γ o1 )*Γ o2

[0046] Among them, Γ o1 ,Γ o2 is the convolution kernel for the output unit.

[0047] Furthermore, the specific implementation method of step S3 includes the following steps:

[0048] S3.1 The expression for the flow relationship between each layer of the hierarchical flow model is as follows:

[0049]

[0050]

[0051] in, Let be the inbound traffic originating from station i at time t. Let represent the OD traffic from station i to station j at time t, and the path traffic from station i to station j with path p selected at time t, respectively. Assign weights to the trainees;

[0052] S3.2, The predicted inbound traffic obtained in step S2 Following the hierarchical flow model in step S3.1, traffic is sequentially allocated to destinations to form different OD pairs, and then allocated to different paths to express the traffic allocation process of the transportation network. Adjacent levels are associated through a fully connected matrix, and each level can obtain historical data for training the model, which promotes the convergence of the model.

[0053] Furthermore, in step S4, the Adam optimizer is used during model training, and the formula for calculating the root mean square loss function is as follows:

[0054]

[0055] Where Loss1 is the loss function of the spatiotemporal convolution model, y i This represents the actual inbound traffic. This is the predicted inbound traffic volume.

[0056]

[0057] Where Loss2 is the loss function of the hierarchical flow model, h ij This represents the actual OD flow value. For OD flow prediction, g ijp This represents the actual path traffic value. Here, N represents the predicted path traffic, and P represents the number of stations and the number of paths.

[0058] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the highway OD and path flow prediction method.

[0059] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for predicting highway OD and path flow.

[0060] The beneficial effects of this invention are:

[0061] This invention presents a method for predicting OD and path flow on highways, proposing a method based on graph neural networks and hierarchical flow networks. First, a graph neural network model is constructed to extract temporal and spatial convolutional features to predict the time series of highway entrance traffic. Then, a hierarchical flow network model is constructed, mapping the predicted highway entrance traffic to the OD and path matrices sequentially through two fully connected matrices. Finally, the backpropagation mechanism of the neural network is used to predict highway OD and path flow.

[0062] The present invention provides a method for predicting OD and route traffic flow on highways, which realizes an integrated model for predicting inbound traffic flow, OD traffic flow, and route traffic flow. The hierarchical flow model adopted solves the problem of predicting OD and route traffic flow when real-time OD and route traffic flow cannot be obtained.

[0063] The present invention discloses a method for predicting OD and path flow of highways, which employs graph neural networks and hierarchical flow network models to consider the implicit and explicit spatial correlations of the highway network, respectively, and achieves better prediction accuracy than traditional time-series-based prediction models. Attached Figure Description

[0064] Figure 1 This is a flowchart of a highway OD and path flow prediction method according to the present invention;

[0065] Figure 2 This is a schematic diagram of the spatiotemporal convolution model structure described in this invention;

[0066] Figure 3 This is a flowchart illustrating the construction of a hierarchical flow model as described in this invention;

[0067] Figure 4 This is a flowchart of the model prediction described in this invention. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.

[0069] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.

[0070] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1-4 Detailed explanation is as follows: Specific implementation method one:

[0072] A method for predicting OD and path flow on highways includes the following steps:

[0073] S1. Data Acquisition: Based on the highway toll system, collect detailed vehicle data, obtain inbound traffic data of highway toll stations, driving routes composed of gantry sequence and route traffic data, for model training;

[0074] Obtain real-time inbound traffic data from highway toll stations for model prediction;

[0075] S2. Construct a spatiotemporal convolutional model: including graph structure learning units, temporal convolutional units, spatial convolutional units, and output units, used to predict the time series of highway inbound traffic and output the predicted inbound traffic.

[0076] Furthermore, the method for constructing the graph structure learning unit in step S2 includes the following steps:

[0077] S2.1 Set the number of highway toll stations to N. Through embedding layer learning, represent each station as a D-dimensional vector and output a matrix. It is the set of real numbers;

[0078] S2.2 Input the site representation matrix E into the graph structure learning unit to obtain the graph adjacency matrix. Used to represent hidden relationships between sites;

[0079] S2.3 The constructed graph structure learning unit is:

[0080] M1=tanh(αE1Θ1)

[0081] M2=tanh(αE2Θ2)

[0082]

[0083]

[0084] Where E1 and E2 are matrices output by the training stations after the embedding layer, reflecting the number of stations and the order in which they enter the model; Θ1 and Θ2 are linear transformations; M1 and M2 are intermediate results of the station representation matrices after linear transformation; α is the model hyperparameter; A is the adjacency matrix; and W is a mask matrix composed of 0s and 1s.

[0085] Furthermore, in the construction of the graph structure learning unit, the assumption of sparse connection is adopted, that is, the relationship between stations is not fully connected. The mask matrix W is used to retain the top κ related stations with the highest weights in matrix A for each station. That is, the weights of the top κ stations with the highest correlation with each station are reset to 1, and the weights of the remaining stations are reset to 0.

[0086] Furthermore, the method for constructing the temporal convolutional unit in step S2 includes the following steps:

[0087] S2.4. Set the input time series U0 of the inbound traffic flow of the highway toll station, specifically a traffic flow time series of length T:

[0088]

[0089] Where: F0 is the input feature dimension;

[0090] S2.5. The time series U0 of the inbound traffic flow of the highway toll stations is convolved with s convolution kernels of different sizes to obtain the time convolution feature. Use padding methods during convolution to ensure that the input and output lengths are consistent:

[0091] Where: Fs is the dimension of the output temporal convolutional feature;

[0092] U s =Relu(…(Relu(U0*Γ1)*Γ2)…)*Γ s

[0093] Where * represents the convolution operation, Γ1, ..., Γ s For s convolution kernels of different sizes, K is the size of the convolution kernel;

[0094] S2.6. Apply the temporal convolutional features obtained in step S2.5 using the sigmoid and tanh functions as activation functions, and then perform another convolution. The output X is:

[0095] X = sigmoid(U s )*tanh(U s )

[0096] Where X represents the output feature of the temporal convolutional unit;

[0097] Furthermore, the specific implementation method of the spatial convolution unit in step S2 includes the following steps:

[0098] S2.7. Set the input spatial convolution feature H0 as:

[0099] H0 = X

[0100] S2.8. Since the graph adjacency matrix is ​​an asymmetric matrix, therefore... and Extract the dependencies between a site and its associated sites and the sites it is associated with:

[0101]

[0102] Among them, H K The feature is a spatial convolutional feature that has undergone k spatial convolutional layers, where k is the number of spatial convolutional layers and λ is a hyperparameter used to control the ratio of original state information to hidden state information.

[0103] S2.9. After concatenating the spatial convolutional features of each layer, pass them through the convolution kernel Γ. out The output is the spatial convolutional feature H. out :

[0104] H out =[H 1 H k ]*Γ out ;

[0105] Furthermore, the specific implementation method of the output unit in step S2 includes the following steps: Temporal convolutional units and spatial convolutional units are sequentially superimposed, and then output after passing through an activation function and a basic convolution to obtain the predicted inbound traffic Y:

[0106] Y = Relu(Relu(H) out )*Γ o1 )*Γ o2

[0107] Among them, Γ o1 ,Γ o2 The convolution kernel for the output unit;

[0108] S3. Construct a hierarchical flow model: The predicted inbound traffic obtained in step S2 is mapped onto the OD matrix and path matrix in sequence through two fully connected matrices. The OD traffic and path traffic are predicted for the highway through the backpropagation mechanism of the neural network.

[0109] Furthermore, the specific implementation method of step S3 includes the following steps:

[0110] S3.1 The expression for the flow relationship between each layer of the hierarchical flow model is as follows:

[0111]

[0112]

[0113] in, Let be the inbound traffic originating from station i at time t. Let represent the OD traffic from station i to station j at time t, and the path traffic from station i to station j with path p selected at time t, respectively. Assign weights to the trainees;

[0114] S3.2, The predicted inbound traffic obtained in step S2 According to the hierarchical flow model in step S3.1, the data is sequentially allocated to the destination to form different OD pairs, and then allocated to different paths to express the flow allocation process of the transportation network. Adjacent layers are associated through a fully connected matrix. Each layer can obtain historical data for training the model and promote the convergence of the model.

[0115] S4. Model Training: Input the inbound traffic data of the highway toll stations obtained in step S1 into the spatiotemporal convolution model, with the goal of minimizing the loss between the predicted result and the inbound traffic volume during the predicted period, and complete the training of the spatiotemporal convolution model; then input the inbound traffic volume, OD traffic volume and path traffic volume of each time slice into the hierarchical flow model, with the goal of minimizing the loss between the predicted value and the actual value of each layer, and complete the training of the hierarchical flow model.

[0116] Furthermore, in step S4, the Adam optimizer is used during model training, and the formula for calculating the root mean square loss function is as follows:

[0117]

[0118] Where Loss1 is the loss function of the spatiotemporal convolution model, y i This represents the actual inbound traffic. This is the predicted inbound traffic volume.

[0119]

[0120] Where Loss2 is the loss function of the hierarchical flow model, h ij This represents the actual OD flow value. For OD flow prediction, g ijp This represents the actual path traffic value. Here, N represents the predicted path traffic, and P represents the number of stations and the number of paths.

[0121] S5. Model Prediction: Input the real-time inbound traffic of the highway toll station into the spatiotemporal convolutional model trained in step S4 to obtain the predicted inbound traffic. Then input the predicted inbound traffic into the hierarchical flow model trained in step S4 to obtain the predicted OD traffic and the predicted path traffic.

[0122] The highway OD and route flow prediction method described in this embodiment realizes an integrated model for predicting inbound flow, OD flow, and route flow.

[0123] The highway OD and path flow prediction method described in this embodiment constructs a prediction model with temporal and spatial double convolution, which can effectively improve the accuracy of the prediction model.

[0124] The highway OD and route flow prediction method described in this embodiment uses a hierarchical flow model to solve the problem of OD and route flow prediction under conditions where real-time OD and route data cannot be obtained. Specific Implementation Method Two:

[0126] An electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the highway OD and path flow prediction method described in Specific Embodiment 1.

[0127] The computer device of the present invention may include a processor and a memory, such as a microcontroller containing a central processing unit. Furthermore, when the processor executes the computer program stored in the memory, it implements the steps of the aforementioned recommendation method for modifyable relationship-driven recommendation data based on CREO software.

[0128] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0129] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as sound playback, image playback, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices. Specific implementation method three:

[0131] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the highway OD and path flow prediction method described in Specific Embodiment 1.

[0132] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by the processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. The computer-readable storage medium stores a computer program. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-described modeling method for modifyable relation-driven modeling data based on CREO software can be implemented.

[0133] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0134] The key technical points and areas for protection of this invention are: the technical approach for predicting OD (Original Demand) and path traffic. A spatiotemporal convolutional model and a hierarchical flow model are constructed, and the models are trained using historical time-slice inbound traffic, OD traffic, and path traffic. During real-time inference, real-time inbound traffic is input into the trained spatiotemporal convolutional model and hierarchical flow model to predict future inbound traffic, OD, and path traffic.

[0135] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0136] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for predicting OD and path flow on highways, characterized in that: Includes the following steps: S1. Data Acquisition: Based on the highway toll system, collect detailed vehicle data, obtain inbound traffic data of highway toll stations, driving routes composed of gantry sequence and route traffic data, for model training; Obtain real-time inbound traffic data from highway toll stations for model prediction; S2. Construct a spatiotemporal convolutional model: including graph structure learning units, temporal convolutional units, spatial convolutional units, and output units, used to predict the time series of highway inbound traffic and output the predicted inbound traffic. The method for constructing the graph structure learning unit in step S2 includes the following steps: S2.1 The number of highway toll stations is as follows: Through learning via the embedding layer, each site is represented as 3D vector, output matrix , It is the set of real numbers; S2.2, The matrix The input is fed into the graph structure learning unit to obtain the graph adjacency matrix. This is used to represent hidden relationships between sites; S2.3 The constructed graph structure learning unit is: ; ; ; ; in, This is a matrix output by the embedding layer from the trainable sites, reflecting the number of sites and their order of entry into the model. For linear transformation, This is the intermediate result of the site's representation matrix after linear transformation. For model hyperparameters, It is an adjacency matrix. It is a mask matrix consisting of 0s and 1s; S3. Construct a hierarchical flow model: The predicted inbound traffic obtained in step S2 is mapped onto the OD matrix and path matrix in sequence through two fully connected matrices. The OD traffic and path traffic are predicted for the highway through the backpropagation mechanism of the neural network. The specific implementation method of step S3 includes the following steps: S3.1 The expression for the flow relationship between each layer of the hierarchical flow model is as follows: ; ; in, for From the site Departure traffic entering the station, They represent From the site Arrive at the station OD flow From the site Arrive at the station The selected path is Path traffic, They are respectively The corresponding weights to be assigned for training; S3.2, The predicted inbound traffic obtained in step S2 T is the length of the time series of the inbound traffic at the highway toll station. According to the hierarchical flow model in step S3.1, the traffic is sequentially allocated to the destination to form different OD pairs, and then allocated to different paths to express the traffic allocation process of the transportation network. Adjacent levels are associated through a fully connected matrix. Each level can obtain historical data for training the model and promote the convergence of the model. S4. Model Training: Input the inbound traffic data of the highway toll stations obtained in step S1 into the spatiotemporal convolution model, with the goal of minimizing the loss between the predicted result and the inbound traffic volume during the predicted period, and complete the training of the spatiotemporal convolution model; then input the inbound traffic volume, OD traffic volume and path traffic volume of each time slice into the hierarchical flow model, with the goal of minimizing the loss between the predicted value and the actual value of each layer, and complete the training of the hierarchical flow model. S5. Model Prediction: Input the real-time inbound traffic of the highway toll station into the spatiotemporal convolutional model trained in step S4 to obtain the predicted inbound traffic. Then input the predicted inbound traffic into the hierarchical flow model trained in step S4 to obtain the predicted OD traffic and the predicted path traffic.

2. The method for predicting OD and path flow on highways according to claim 1, characterized in that: The method for constructing the temporal convolutional unit in step S2 includes the following steps: S2.

4. Set the input time series U0 of the inbound traffic flow of the highway toll station, specifically with a length of... Traffic time series: ; in: The feature dimension is the input. S2.5, The input time series of inbound traffic flow from highway toll stations, U0, is processed... Temporal convolution features are obtained by convolution with kernels of different sizes. During convolution, padding methods are used to ensure that the input and output lengths are consistent: Where: Fs is the dimension of the output temporal convolutional feature; ; Where * represents the convolution operation. for Convolutional kernels of different sizes, , The size of the convolution kernel; S2.

6. Apply the temporal convolutional features obtained in step S2.5 using the sigmoid and tanh functions as activation functions, and then perform another convolution. The output X is: ; Where X represents the output feature of the temporal convolutional unit.

3. The method for predicting OD and path flow on highways according to claim 2, characterized in that: The method for constructing the spatial convolutional unit in step S2 includes the following steps: S2.

7. Set the input spatial convolution feature H0 as: ; S2.

8. Since the graph adjacency matrix is ​​an asymmetric matrix, therefore... and Extract the dependencies between a site and its associated sites and the sites it is associated with: ; Among them, H (k) The features are spatial convolutional features after k layers of spatial convolution, where k is the number of spatial convolutional layers. This is a hyperparameter used to control the ratio of raw state information to hidden state information; S2.

9. Concatenate the spatial convolutional features of each layer and then pass them through a convolution kernel. Output, obtain the spatial convolutional features. : 。 4. The method for predicting OD and path flow on highways according to claim 3, characterized in that: The specific implementation method of the output unit in step S2 includes the following steps: Temporal convolutional units and spatial convolutional units are stacked sequentially, then passed through an activation function and a basic convolution for output, to obtain the predicted inbound traffic Y: ; in, is the convolution kernel for the output unit.

5. The method for predicting OD and path flow on highways according to claim 4, characterized in that: In step S4, the Adam optimizer is used during model training. The formula for calculating the loss function with the root mean square is as follows: ; Where Loss1 is the loss function of the spatiotemporal convolution model. This represents the actual inbound traffic. This is the predicted inbound traffic volume. ; Where Loss2 is the loss function of the hierarchical flow model. This represents the actual OD flow value. This is the predicted value of OD flow. This represents the actual path traffic value. Here, N represents the predicted path traffic, and P represents the number of stations and the number of paths.

6. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the highway OD and path flow prediction method according to any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the highway OD and path flow prediction method according to any one of claims 1-5.