A vehicle OD prediction method based on a Bayesian neural network

CN116258253BActive Publication Date: 2026-08-11TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-07
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,这种方法往往丧失了对拓扑关系的不确定性和随时间变化性的描述

Benefits of technology

[0035]本发明提出了一种基于贝叶斯神经网络的车辆OD预测方法,基于贝叶斯神经网络构建随时间变化的图结构,对时间进行编码再通过贝叶斯神经网络获取动态变化的图,使得OD预测结果能够展示出不同时间下地区间的联系,增强了预测结果的鲁棒性。通过使用贝叶斯方法将空间结构信息描述成与时间信息相关的概率分布,并且在过程中隐式地自适应学习和更新,实验证明,本发明的方法性能优于基准方法,同时能够给出不确定的方差。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116258253B_ABST
    Figure CN116258253B_ABST
Patent Text Reader

Abstract

A vehicle OD prediction method based on a Bayesian neural network includes the following steps: encoding time to construct time codes representing different time periods; using a spatiotemporal multi-graph convolutional network (ST-MGCN) as the model foundation, changing its graph structure from a static adjacency matrix to a Bayesian graph embedding; feeding the time codes as input into a linearly mapped Bayesian neural network; outputting the graph embedding as a probability distribution; and constructing a spatiotemporal Bayesian graph convolutional network (ST-BGCN) by sampling the corresponding graph embedding from the probability distribution at each step; and then using the ST-BGCN for vehicle OD prediction. This invention enables OD prediction results to show the connections between regions at different times, enhancing the robustness of the prediction results. Experiments demonstrate that the method of this invention outperforms benchmark methods and can provide uncertain variance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation, and in particular to a method for predicting vehicle origin-destination (OD) based on a Bayesian neural network. Background Technology

[0002] Vehicle origin-destination (OD) forecasting refers to predicting order volume for the next time period based on the number of orders from origin to destination in the current time period. Traffic forecasting is of great significance to urban transportation. As a more complex demand forecasting method, vehicle OD forecasting places greater emphasis on the overall changes in passenger travel within urban transportation, which is of great importance for studying road traffic conditions and urban road network construction. Taking taxi OD forecasting as an example, taxi demand forecasting can increase taxi revenue, improve road utilization, and alleviate road congestion.

[0003] Existing vehicle OD prediction methods primarily rely on graph convolutional neural networks (GCNs) and temporal prediction networks, such as recurrent neural networks (RNNs), long-short-term memory (LSTM) networks, and gated recurrent units (GRUs), to construct a spatiotemporal joint network for prediction. Current methods generally first use GCNs to aggregate and convolve information from surrounding nodes on the traffic map, then feed these latent variables into the temporal prediction network to predict future ODs. Specifically, the GCNs used for convolution... Figure 1 Generally, these are static graphs and cannot accurately represent how spatial correlation changes over time.

[0004] As mentioned above, existing taxi demand forecasting methods often combine spatiotemporal correlations for modeling. These methods typically use graph convolutional neural networks (GNNs) to learn topological relationships spatially, and then use time-series prediction neural networks, such as RNNs and LSTMs, to predict future supply and demand relationships temporally. The spatial information they apply is often based on fixed spatial structures, such as explicit graph structures like adjacency matrices and similarity matrices, to predict taxi demand. For example, some researchers have used three prior graphs—neighborhood, functional similarity, and transportation connectivity—to represent the connectivity relationships on the graph; others have used information from graphs such as points of interest (POIs) and weather for auxiliary purposes. However, this approach often loses the ability to describe the uncertainty and temporal variability of topological relationships.

[0005] It should be noted that the information disclosed in the background section above is only for understanding the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The main objective of this invention is to overcome the shortcomings of the aforementioned background technology and provide a vehicle OD prediction method based on Bayesian neural networks.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] A vehicle OD prediction method based on Bayesian neural networks includes the following steps:

[0009] Encode time to construct time codes for different moments to represent different time periods;

[0010] Based on the spatiotemporal multi-graph convolutional network ST-MGCN, the graph structure is changed from a static adjacency matrix to a Bayesian graph embedding. The temporal encoding is fed into a linearly mapped Bayesian neural network, and the graph embedding is output as a probability distribution. The corresponding graph embedding is obtained by sampling from the probability distribution each time, thus constructing the spatiotemporal Bayesian graph convolutional network ST-BGCN. The graph structure is constructed based on the Bayesian neural network and changes dynamically with time. The Bayesian method is used to describe the spatial structure information as a probability distribution related to the temporal information, and implicitly adaptively learns and updates during the process.

[0011] Vehicle origin-destination (OD) prediction is performed using the Spatiotemporal Bayesian Graph Convolutional Network (ST-BGCN) so that the OD prediction results can show the connections between regions at different times.

[0012] Furthermore, the vehicle OD prediction problem simplifies to solving the following functional form:

[0013] X t =f(X) t-1 ,X t-2 ,...X t-T ,O)

[0014] Among them, X t Let X be the corresponding OD requirement at time t. t-1 ,X t-2 ,...X t-T This represents the known OD situation over the T time periods before time t, and O represents the remaining auxiliary data. Based on the known information, the future OD situation is predicted.

[0015] Furthermore, the gated long short-term memory network CG-LSTM is used to mine and select feature information at different time points from the original features through a gating mechanism. Then, the relevant information mined is used as the input features of the Bayesian graph convolutional network BGCN and fed into BGCN for final prediction.

[0016] Furthermore, the CG-LSTM module of the gated long short-term memory network (GSM-LSTM) incorporates a channel attention gating mechanism, introducing attention coefficients with different weights at each time step. The LSTM network is used to learn and store information from different time periods, thereby uncovering temporal correlations and enabling the LSTM network to retain more useful information.

[0017] Furthermore, the data x used in OD prediction 1:T The form is (batch_size(B), nodes(n), seq_len(T), features(F)); first, aggregate the relevant information on the nodes to obtain the relevant features X of each node at different times. 1:T (B,N,T); The graph convolution part is used to learn the correlation of data on the graph. The graph part of the graph convolution uses a graph embedding generated by a Bayesian network. Then, it is concatenated with the original features to obtain the attention relationship at different nodes and times. The calculation formula is as follows:

[0018]

[0019] Then aggregate the attention information of the nodes. The attention information at each time step is adaptively adjusted through a two-layer fully connected network, and the original input X is then fed back through a Hadamard product. t The formula for calculating attention at different times is as follows:

[0020]

[0021] s 1:T =σ(W2σ(W1z) 1:T ))

[0022]

[0023] Among them, z 1:T The data format is (B,T);

[0024] Finally, at time T... As input to the LSTM, the data is fed into the LSTM temporal network to obtain the hidden information under different time sequences. At this time, the feature dimension of the data is (B,T,hidden_dim(H)).

[0025] Furthermore, in the Bayesian Graph Convolutional Network (BGCN), a set of time codes is used to represent different moments, encoded by day or week to reflect the cyclical nature of time. A set of linear Bayesian neural networks is used to construct the relationship between these time codes and the graph, which is represented as:

[0026]

[0027] Where T is the one-hot encoding constructed based on the time period. Taking a week as an example, the encoding is a one-dimensional vector of (7*24*d), where d is the number of time intervals set for the data within a unit hour, and W and b represent the weight parameters (7*24*d, N) and bias parameters N that need to be learned, respectively.

[0028] Furthermore, a Gaussian distribution is used to describe the prior distribution; by mapping the time vector of the above one-hot encoding to a graph embedding vector of size N with nodes, the attention intensity obtained by each node at different times is characterized, and the graph structure formed between nodes is obtained by transposing and multiplying the result of the graph embedding.

[0029] Furthermore, in the Bayesian Graph Convolutional Network (BGCN), some of the original prior graph structure is preserved to maintain stability in the later stages of the convergence process, forming the final graph:

[0030]

[0031] in, This represents the graph structure used in the final graph convolution, with a size consistent with the graph's Laplacian matrix. This represents the original graph structure.

[0032] Furthermore, the features learned from CG-LSTM are fed into the BGCN network, and the input_size and output_size of BGCN are set to match the hidden_dim in LSTM and the original input features to complete the final prediction.

[0033] A computer-readable storage medium storing a computer program, characterized in that, when executed by a processor, the computer program implements the vehicle OD prediction method based on a Bayesian neural network.

[0034] The present invention has the following beneficial effects:

[0035] This invention proposes a vehicle OD prediction method based on Bayesian neural networks. It constructs a time-varying graph structure using a Bayesian neural network, encodes time, and then uses the Bayesian neural network to obtain a dynamically changing graph. This allows the OD prediction results to show the connections between regions at different times, enhancing the robustness of the prediction results. By using the Bayesian method to describe spatial structure information as a probability distribution related to time information, and implicitly adaptively learning and updating during the process, experiments demonstrate that the proposed method outperforms benchmark methods and can provide uncertain variance. Attached Figure Description

[0036] Figure 1 This is a flowchart of the vehicle OD prediction method based on Bayesian neural networks according to the present invention.

[0037] Figure 2 This is a schematic diagram of the ST-BGCN structure according to an embodiment of the present invention.

[0038] Figure 3 This is a schematic diagram of a BGCN graph construction method according to an embodiment of the present invention.

[0039] Figure 4 This is a comparison chart of the RMSE and MAPE indices of the embodiments of the present invention and the benchmark method. Detailed Implementation

[0040] The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary and not intended to limit the scope and application of the present invention.

[0041] See Figure 1 This invention provides a vehicle OD prediction method based on a Bayesian neural network, comprising the following steps:

[0042] Encode time to construct time codes for different moments to represent different time periods;

[0043] Based on the spatiotemporal multi-graph convolutional network ST-MGCN, the graph structure is changed from a static adjacency matrix to a Bayesian graph embedding. Temporal encoding is fed into a linearly mapped Bayesian neural network, and the graph embedding is output as a probability distribution. The corresponding graph embedding is obtained by sampling from the probability distribution each time, thus constructing the spatiotemporal Bayesian graph convolutional network ST-BGCN. The graph structure is constructed based on the Bayesian neural network and dynamically changes over time. The Bayesian method is used to describe the spatial structure information as a probability distribution related to the time information, and implicitly adaptively learns and updates during the process.

[0044] Vehicle origin-destination (OD) prediction is performed using the Spatiotemporal Bayesian Graph Convolutional Network (ST-BGCN) so that the OD prediction results can show the connections between regions at different times.

[0045] Bayesian methods assume that the connections between events form a probability distribution. Given a prior distribution, the expected distribution is adjusted based on observed results, thus providing stronger confidence in the outcome. Combining the probabilistic information and uncertainty inherent in Bayesian methods, Bayesian neural networks are particularly suitable for predicting rapidly changing situations. This invention uses a novel graph embedding method to construct the adjacency graph structure required for graph convolution. First, time codes representing different time periods are constructed. Then, these time codes are fed as input into a linearly mapped Bayesian neural network, outputting an embedding as a probability distribution. The corresponding graph embedding is obtained by sampling from this probability distribution at each step. For this purpose, this invention uses a spatiotemporal multi-graph convolution network (ST-MGCN) as the model foundation, replacing the static adjacency matrix with the Bayesian graph embedding described above. This network structure is called a spatiotemporal Bayesian graph convolution network (ST-BGCN).

[0046] This invention constructs a time-varying graph structure based on a Bayesian neural network. By encoding time and then using the Bayesian neural network to obtain a dynamically changing graph, the OD prediction results can demonstrate the connections between regions at different times, enhancing the robustness of the prediction results. By using the Bayesian method to describe spatial structure information as a probability distribution related to time information, and implicitly adaptively learning and updating during the process, experiments demonstrate that the method of this invention outperforms benchmark methods and can provide uncertain variance.

[0047] The following describes specific embodiments of the present invention.

[0048] Problem Description

[0049] The vehicle OD prediction problem can generally be simplified to solving a function of the following form:

[0050] X t =f(X) t-1 ,X t-2 ,...X t-T ,O)

[0051] Among them, X tLet X be the corresponding OD (orient-destination) requirement at time t. t-1 ,X t-2 ,...X t-T This represents the known OD (Original Distance) situation over the T time periods prior to time t, where O represents other auxiliary data such as weather, distance, and unexpected events. Based on this known information, the future OD situation is predicted.

[0052] OD Prediction Network

[0053] The proposed OD prediction network ST-BGCN consists of two main steps. The first step uses a contextual gated LSTM (CG-LSTM) network to mine and select feature information at different time points from the original features through a gating mechanism. The second step uses the mined information as input features to the BGCN for final prediction. The prediction network and its inputs and outputs are described in detail below according to the steps.

[0054] CG-LSTM

[0055] The main feature of the CG-LSTM module is the addition of a channel attention gating mechanism, which introduces attention coefficients with different weights at each time step. Furthermore, this invention uses an LSTM network to learn and store information from different time periods. The main function of this step is to uncover temporal correlations, enabling the LSTM to retain more useful information.

[0056] Data used in OD prediction typically includes data x. 1: The form is (batch_size(B), nodes(n), seq_len(T), features(F)). First, aggregate the relevant information on the nodes to obtain the relevant features X of each node at different times. 1: (B,N,T). The graph convolution part is used to learn the relationships between data on the graph. The graph part of the graph convolution uses an embedding graph generated by a Bayesian network, which is described in detail in the BGCN section. The attention relationships at different nodes and times are then obtained by concatenating the graph with the original features. The calculation formula is as follows:

[0057]

[0058] Then aggregate the attention information of the nodes. The attention information at each time step is adaptively adjusted through a two-layer fully connected network, and the original input X is then fed back through a Hadamard product. t The formula for attention at different times is as follows:

[0059]

[0060] s 1: =σ(W2σ(W1z) 1: ))

[0061]

[0062] Among them, z 1: The data format is (B, T). Finally, the data at time T... As input to the LSTM, the data is fed into the LSTM temporal network to obtain the hidden information under different time sequences. At this time, the feature dimension of the data is (B,T,hidden_dim(H)).

[0063] BGCN

[0064] The core idea of ​​graph convolution is similar to that of a general convolutional neural network. It involves using a convolution kernel to connect nodes with their surrounding nodes, thereby uncovering implicit relationships between nodes. Its formula is generally expressed as:

[0065]

[0066] in, X represents the Laplace matrix of the graph, which is an N*N matrix where N is the number of nodes. l W represents the feature input of the l-th layer. l These are the parameters that the l-th layer needs to learn. (The sentence is incomplete and requires more context.) Perform orthogonal decomposition into U T LU, therefore X can be obtained. l+1 =σ(U T LUX l W l Furthermore, based on spectral theory, we can obtain...

[0067] X l+1 =σ(U T g θ (L)UX l )

[0068] The parameter that needs to be solved is the convolution kernel g. θ (L), considering the high cost of solving for the eigenvalues ​​of L and its higher-order terms, g is decomposed according to the Chebyshev polynomial decomposition method. θ (L) is decomposed into Chebyshev polynomials. For the corresponding Chebyshev polynomial, Where I is the identity matrix. The graph convolution process is finally represented as...

[0069]

[0070] The above describes the graph convolution process using the Chebyshev polynomial method. Since the graphs used in the original method are static graphs constructed based on prior knowledge, i.e. Because the hyperparameters are fixed, this method cannot accurately represent the changing relationships between nodes in the traffic graph at different times. Therefore, inspired by correlation-based graph attention mechanisms and graph embedding, this invention adds the use of graph embedding to represent the changes in the graph under different inputs.

[0071] To address this, the present invention proposes BGCN, which adds two parts to extend the application of the graph at different times.

[0072] (1) Add a set of time codes to represent different times, encoding them by day or week to reflect the cyclical nature of time. A linear Bayesian neural network is then used to construct the relationships between the aforementioned time codes and the graph. These relationships can be represented as:

[0073]

[0074] Where T is the one-hot encoding constructed based on the time period, taking a week as an example, the encoding is a one-dimensional vector of (7*24*d), and d is the number of time intervals set for the data within a unit hour. W and b represent the weight parameters (7*24*d, N) and bias parameters N to be learned, respectively, and the most commonly used Gaussian distribution is usually used to describe the prior distribution they satisfy. By mapping the time vector of the above one-hot encoding to an embedding vector of size N nodes, the attention intensity obtained by each node at different times is represented. Then, the graph structure formed between nodes is obtained by multiplying the transpose of the embedding result. This reduces the number of parameters and training time on the one hand, and on the other hand, it can better meet the positive semi-definite property of the matrix required in graph convolution. In the final prediction of the test set, the relevant parameters are sampled from the distribution satisfied by the learned W and b, and the final different values ​​are obtained through the above calculation process. This allows for more flexible changes to the graph, while the introduced Bayesian method can also introduce a certain degree of uncertainty into the graph prediction to represent the randomness of the graph at different times.

[0075] (2) Retaining most of the original prior graph structure to maintain stability in the later stages of the convergence process, the formula for forming the final graph is:

[0076]

[0077] in, This represents the graph structure used in the final graph convolution, with the same size as the Laplacian matrix mentioned above. Experiments showed that simply using... As a matrix used in graph convolution, it can speed up the convergence process to some extent, but the final learned result has limited performance compared to the results learned by the above methods. It represents the original graph structure, and retaining most of the fixed graph structure makes the result more stable.

[0078] In practical use, the features learned from CG-LSTM are fed into the BGCN network. The input_size and output_size of BGCN are set to match the hidden_dim in LSTM and the original input features to complete the final prediction.

[0079] Example 1

[0080] Taking New York's taxi demand as an example, the dataset uses the taxi OD demand of New York City in 2015 from paper [4]. The dataset divides the entire Manhattan area into 15*5 matrix regions with half-hour intervals, and counts the OD demand in each region. Because the amount of data for the whole year is large, the data of the first 90 days is selected as the training set, and the following 30 days are divided into validation and test sets with 15-day intervals. The first 5 time periods of each time period are used for prediction. Taking the training set as an example, the dataset structure is (90*24*2,75,5,75). Because this invention is based on the Bayesian graph structure at different times for prediction, the batch_size is simply set to 1. The elements in the dataset are fed into CG-LSTM according to the batch_size, and then the BGCN network is used to learn the features after passing through the gated network. The relevant methods are shown in Section 4. Among them, the training epoch is set to 500 to ensure that the results of both methods converge. In the final test set, the average of the results of 100 sets of weight parameters is taken to obtain the final prediction result.

[0081] Performance Analysis

[0082] In the experiments, the baseline method uses MSE for supervised learning. The method incorporating the Bayesian framework introduces the estimation and learning of the probability distribution, thus requiring the calculation of the relationship between the prior and posterior, as well as the impact on the final prediction likelihood term. Therefore, the loss function incorporates supervision of the weight mean and variance. RMSE and MAPE are used to demonstrate the prediction performance. The formulas for calculating RMSE and MAPE are:

[0083]

[0084]

[0085] Loss = MSE

[0086] Loss_bay = MSE + 10 -4 (KL(q(w) / (w))

[0087] Figure 2 An ST-BGCN structure according to an embodiment of the present invention is shown. Figure 3 A schematic diagram of a BGCN graph construction method according to an embodiment of the present invention is shown. Figure 4 The RMSE and MAPE indices of the embodiments of the present invention are shown in comparison with those of the benchmark method. Figure 4 The figure illustrates the changes in the aforementioned metrics in the prediction results during the network learning process. On one hand, the addition of the Bayesian method enables the network to converge faster. With an early stop of 100 to ensure the convergence of the Bayesian variance, the Bayesian method stops training at the 205th epoch. The figure shows that the adaptive graph embedding results can reasonably represent the structural changes of the graph to a certain extent, accelerating the convergence process. On the other hand, it can be seen that the convergence process of the relevant metrics on the validation set exhibits significant fluctuations. This is precisely the uncertainty caused by variance in the weighted sampling results, which is not present in the original fixed graph structure. In the final test, the RMSE and MAPE of the Bayesian method ST-BMGCN are slightly higher than those of ST-MGCN. This may be because the reparameterization method used during training samples relatively fewer points, leading to some error in the direction of the convergence process. However, the MAE is lower than the benchmark method, indicating better prediction results on the true values. This shows that the prediction results are more robust, which is acceptable considering the remaining metrics.

[0088] Table 1 Validation results of the test set

[0089]

[0090]

[0091] In summary, this invention is suitable for origin-destination traffic prediction in intelligent transportation. Building upon traditional methods, it proposes a high-confidence Bayesian neural network for OD prediction, which, compared to traditional methods, accelerates convergence speed without significantly reducing evaluation metrics. This invention introduces uncertainty into the graph structure of the graph neural network using Bayesian probability, making the prediction results more robust. Furthermore, this invention generates the graph through temporal features, reflecting the close relationship between space and time.

[0092] This invention introduces Bayesian methods into traffic time-series prediction. Previous Bayesian prediction methods were often related to one-dimensional time-series prediction, frequently lacking spatial information, thus leaving a significant gap in the market. Because the Bayesian method maintains a probability distribution during the learning process, its variance can characterize the confidence level of the prediction results. This invention also accelerates the convergence speed of neural networks for OD prediction.

[0093] This invention, used for predicting traffic origin-destination (OD) conditions, can provide more reliable forecasts for the taxi industry and related ride-hailing service providers, thereby guiding traffic scheduling and recommendations. Besides its application to taxis and other ride-hailing services, it can also be applied to demand scenarios such as subways and buses. In the former, it can reduce empty-load rates and increase driver and passenger revenue; in the latter, it can adjust peak-hour and off-peak service frequencies, as well as influence subsequent public transportation construction and urban planning. This invention can be applied to taxi services such as Didi Chuxing and Cao Cao Mobility, and also to urban traffic planning and management. Furthermore, it can be applied to smaller aspects of urban transportation demand, such as shared bicycles, and further to predict demand changes in large-scale travel modes such as aviation and railways.

[0094] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0096] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0097] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0098] The background section of this invention may include background information about the problems or environment in which the invention is being developed, and is not necessarily a description of prior art. Therefore, the content included in the background section does not constitute an admission of prior art by the applicant.

[0099] The above description provides a further detailed explanation of the present invention in conjunction with specific / preferred embodiments, and it should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various substitutions or modifications can be made to these described embodiments without departing from the concept of the present invention, and all such substitutions or modifications should be considered within the scope of protection of the present invention. In the description of this specification, the reference to terms such as "an embodiment," "some embodiments," "preferred embodiment," "example," "specific example," or "some examples," etc., indicates that the specific features, structures, materials, or characteristics described in connection with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications can be made herein without departing from the scope of protection of the patent application.

Claims

1. A vehicle OD prediction method based on Bayesian neural networks, characterized in that, Includes the following steps: Encode time to construct time codes for different moments to represent different time periods; Based on the spatiotemporal multi-graph convolutional network ST-MGCN, the graph structure is changed from a static adjacency matrix to a Bayesian graph embedding. Temporal encoding is fed into a linearly mapped Bayesian neural network, and the graph embedding is output as a probability distribution. The corresponding graph embedding is obtained by sampling from the probability distribution each time, thus constructing the spatiotemporal Bayesian graph convolutional network ST-BGCN. The graph structure is constructed based on the Bayesian neural network and dynamically changes over time. The Bayesian method is used to describe the spatial structure information as a probability distribution related to the time information, and implicitly adaptively learns and updates during the process. Vehicle origin-destination (OD) prediction is performed using the Spatiotemporal Bayesian Graph Convolutional Network (ST-BGCN) so that the OD prediction results can show the connections between regions at different times. The vehicle OD prediction problem can be simplified to solving the following functional form: in, for t The corresponding OD requirements at that time represent t Before the moment T Known OD data for a given time period O Representing the remaining auxiliary data, based on known information, we predict future OD conditions; Data used in OD prediction The form is (batch_size( B ), nodes( n ), seq_len( T ),features( F First, aggregate the relevant information on the nodes to obtain the relevant features of each node at different times. ( B , N , T The graph convolution part is used to learn the correlations of data on the graph. The graph part of the graph convolution uses a graph embedding generated by a Bayesian network. Then, it is concatenated with the original features to obtain the attention relationships at different nodes and times. The calculation formula is as follows: Then aggregate the attention information of the nodes. It adaptively adjusts the attention information at each time step through a two-layer fully connected network, and applies the Hadamard product to the original input. The formula for calculating attention at different times is as follows: in, The data format is ( B , T ); Finally, T At that moment As input to the LSTM, the data is fed into the LSTM temporal network to obtain implicit information under different time sequences. At this time, the feature dimension of the data is ( B , T hidden_dim( H )); In the Bayesian Graph Convolutional Network (BGCN), a set of time codes is used to represent different moments, encoded by day or week to reflect the cyclical nature of time. A set of linear Bayesian neural networks is used to construct the relationship between these time codes and the graph, which is represented as: in, The one-hot encoding is constructed based on time periods, and the encoding by week is (7*24*). d A one-dimensional vector, d The number of time intervals set for the data within a unit of hour. W and b These represent the weight parameters that need to be learned (7*24*). d , N and bias parameters N; In the Bayesian Graph Convolutional Network (BGCN), some of the original prior graph structure is preserved to maintain stability in the later stages of the convergence process, forming the final graph: in, This represents the graph structure used in the final graph convolution, with a size consistent with the graph's Laplacian matrix. This represents the original graph structure.

2. The vehicle OD prediction method based on Bayesian neural networks as described in claim 1, characterized in that, First, the gated long short-term memory network CG-LSTM is used to mine and select feature information at different time points from the original features through a gating mechanism. Then, the relevant information mined is used as the input features of the Bayesian graph convolutional network BGCN and fed into BGCN for final prediction.

3. The vehicle OD prediction method based on Bayesian neural networks as described in claim 2, characterized in that, The gated long short-term memory network (CG-LSTM) module described below incorporates a channel attention gating mechanism, introducing attention coefficients with different weights for each time step. The LSTM network is used to learn and store information from different time periods, thereby uncovering temporal correlations and enabling the LSTM network to retain more useful information.

4. The vehicle OD prediction method based on Bayesian neural networks as described in claim 1, characterized in that, The prior distribution is described using a Gaussian distribution; the time vector of the one-hot encoding described above is mapped to the number of nodes. N The graph embedding vector of size represents the attention intensity received by each node at different times. The graph embedding result is then transposed and multiplied to obtain the graph structure formed between the nodes.

5. The vehicle OD prediction method based on Bayesian neural networks as described in any one of claims 2 to 3, characterized in that, The features learned from CG-LSTM are fed into the BGCN network. The input_size and output_size of BGCN are set to match the hidden_dim in LSTM and the original input features to complete the final prediction.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the vehicle OD prediction method based on Bayesian neural networks as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Electromagnetic signal identification method and device for constructing graph convolutional network based on implicit knowledge

    CN110210330A

  • Satellite anomaly detection method based on Bayesian neural network

    CN110751199A