Method and system for predicting road transport vehicle driving risk uncertainty
By combining deep learning methods with multi-source data and multi-graph fusion models, the accuracy and real-time performance of road transport vehicle driving risk prediction have been improved, enabling the quantification of risk uncertainty and enhancing the reliability and real-time performance of road traffic safety management.
Patent Information
- Application Number
- CN202510936347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing road transport vehicle driving risk prediction models suffer from problems such as low prediction accuracy, poor real-time early warning, coarse spatiotemporal granularity, and difficulty in capturing risk uncertainty, making them particularly difficult to meet practical application needs in complex environments.
A deep learning-based method for predicting the uncertainty of road transport vehicle driving risks is adopted. By acquiring the number of alarms, traffic flow and multi-graph static adjacency matrix, and using a dynamic graph construction layer, multi-graph fusion module, temporal and spatial feature extraction module and multiquantile prediction output module, combined with geographical, social and road network environment data, the STQuantileNet model is constructed to achieve risk prediction for future time steps.
It enables accurate short-term prediction of road transport vehicle driving risks, possesses the ability to quantify uncertainty, improves the reliability and real-time performance of early warning, and provides a solid theoretical foundation for road traffic safety.
Smart Images

Figure CN120808595B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle driving risk prediction technology, specifically to a method and system for predicting the uncertainty of road transport vehicle driving risk based on deep learning. Background Technology
[0002] In recent years, with the development of the internet and mobile devices, the massive amounts of alarm and trajectory data recorded by onboard monitoring systems for road transport vehicles have provided rich training data for predictive models, effectively overcoming the scarcity of accident data. This massive data volume has enabled the widespread application of deep learning methods in the field of driving risk prediction. Regarding data sources, there is a growing emphasis on integrating multi-source data and multi-dimensional features, incorporating various external factors such as geographical, road, and social environments to construct more complex spatiotemporal prediction models.
[0003] In the road traffic system, road transport vehicles face a higher risk of accidents due to the complex differences in vehicle type and cargo type, especially under adverse weather and high-risk road conditions. Furthermore, the consequences of accidents involving road transport vehicles are more severe compared to other types of vehicles. Therefore, the safety supervision of road transport vehicles has become a key and challenging aspect of traffic safety management.
[0004] Existing risk prediction models are generally based on historical road traffic accident data. However, traffic accident data is characterized by rarity and time lag, and its distribution is highly uneven across time and space, severely impacting the training efficiency and generalization ability of the models. This results in problems such as low prediction accuracy, poor real-time warnings, and coarse spatiotemporal granularity. Furthermore, most existing models are deterministic point prediction models or single-distribution parameterized models. The former struggles to capture the uncertainty of risk, while the latter relies on a specific statistical distribution and has weak generalization ability, both of which fail to meet practical application needs. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for predicting the uncertainty of driving risks of road transport vehicles based on deep learning, so as to solve at least one of the technical problems existing in the background art.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for predicting the uncertainty of driving risks of road transport vehicles, comprising:
[0008] Obtain the spatiotemporal sequence of alarm counts, the spatiotemporal sequence of traffic flow, and the static adjacency matrix of multiple graphs at the current time step;
[0009] A pre-trained road transport vehicle driving risk uncertainty prediction model is used to process the acquired spatiotemporal sequences of alarm numbers, traffic flow, and multi-graph static adjacency matrices to obtain the number of road transport vehicle alarms at future time steps. The road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a temporal and spatial feature extraction module, and a multi-quantile prediction output module. The dynamic graph construction layer extracts the dependency between alarm numbers and traffic flow, constructing a dynamic graph adjacency matrix for road transport vehicle traffic flow. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm numbers to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm numbers to extract their spatial dependencies. The multi-quantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0010] As a further limitation of the first aspect of the present invention, the terrain and elevation data of the grid are obtained, a geographic environment vector is constructed, the cosine similarity method is used to measure the similarity between the two vectors, and a geographic environment similarity adjacency matrix with the grid as nodes is constructed.
[0011] As a further limitation of the first aspect of the present invention, the number of POIs of each type in the grid is obtained, and POI vectors are constructed, wherein the dimension of the POI vector is the number of POI categories, and the value is the density of each category of POI in the grid; the cosine similarity method is used to measure the similarity between two POI vectors, and a social environment similarity adjacency matrix is constructed; the road and bridge tunnel data of each level in the grid are obtained, and a six-dimensional road network structure vector is constructed, including road density information, bridge density, and tunnel density, and a road network structure similarity adjacency matrix is constructed using cosine similarity; the latitude and longitude coordinates of the center point of each grid are obtained, the distance between each grid is calculated, and a grid distance adjacency matrix is constructed.
[0012] As a further limitation of the first aspect of the present invention, the dynamic graph construction layer includes: trajectory spatiotemporal sequence data is first input in parallel to two feature extraction blocks, block1 and block2, each block containing a convolutional layer, a batch normalization layer and a ReLU activation function, and the output is two feature vectors. Then, batch matrix multiplication, activation functions, and normalization are used to obtain an N×N matrix M. flow This enables the adaptive generation of dynamic graphs showing the trajectory flow relationship between different grids based on historical trajectory data.
[0013] As a further limitation of the first aspect of the present invention, the temporal feature extraction module consists of multiple temporal convolutional network layers, each TCN layer being followed by a batch normalization layer and a Dropout layer; the spatial feature extraction module consists of multiple diffusion map convolutional network layers, each D-GCN layer being followed by a Dropout layer.
[0014] As a further limitation of the first aspect of the present invention, the area to be predicted is rasterized, and the number of alarms in each raster is calculated. Each node of the KDTree_weighted model corresponds to each raster, and its weight is the number of alarms in the raster. After sorting the nodes according to their spatial positions, a binary search is used to find a position where the sum of the weights of the left and right subtrees is equal or closest to equal as the dividing hyperplane, and the left and right subtrees are divided. This logic is recursively applied to finally achieve a relatively balanced sum of node weights in each leaf node, thereby achieving a balanced, non-overlapping, and highly efficient spatial grid division.
[0015] Secondly, the present invention provides a road transport vehicle driving risk uncertainty prediction system, comprising:
[0016] The acquisition module is used to acquire the spatiotemporal sequence of alarm counts, the spatiotemporal sequence of traffic flow, and the static adjacency matrix of multiple graphs at the current time step.
[0017] The processing module utilizes a pre-trained road transport vehicle driving risk uncertainty prediction model to process the acquired spatiotemporal sequences of alarm counts, traffic flow, and multi-graph static adjacency matrices to obtain the number of road transport vehicle alarms at future time steps. The road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a temporal and spatial feature extraction module, and a multi-quantile prediction output module. The dynamic graph construction layer extracts the dependency between alarm counts and traffic flow, constructing a dynamic graph adjacency matrix for road transport vehicle traffic flow. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm counts to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm counts to extract their spatial dependencies. The multi-quantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0018] Thirdly, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the deep learning-based method for predicting the uncertainty of road transport vehicle driving risks as described in the first aspect.
[0019] Fourthly, the present invention provides a computer device including a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the road transport vehicle driving risk uncertainty prediction method based on deep learning as described in the first aspect.
[0020] Fifthly, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the deep learning-based method for predicting the uncertainty of road transport vehicle driving risks as described in the first aspect.
[0021] The beneficial effects of this invention are: high reliability and the ability to quantify uncertainty. It takes into account the impact of geographical environment, social environment and road network structure on driving risks, and realizes accurate short-term prediction of driving risks of road transport vehicles. It provides strong technical support for improving the reliability and real-time performance of vehicle driving risk warnings, and provides a solid theoretical foundation for improving road traffic safety from both time and space dimensions.
[0022] The advantages of additional aspects of the invention will be set forth more clearly in the following description or will be learned by practice of the invention. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of the method for predicting the uncertainty of driving risks of road transport vehicles based on deep learning, as described in an embodiment of the present invention.
[0025] Figure 2 This is a schematic diagram of the STQuantileNet model structure according to an embodiment of the present invention. Detailed Implementation
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0027] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0028] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as here.
[0029] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.
[0030] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the specific features, structures, materials, or characteristics described may 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, as well as the features of those different embodiments or examples.
[0031] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0032] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.
[0033] The core objective of this invention is to provide more accurate and reasonable predictions of driving risks for road transport vehicles. This invention utilizes real-time alarm and trajectory data from vehicle monitoring systems, and establishes a multi-source database and dynamic and static graphs by collecting geographical, social, and road network data. Addressing the uneven spatial distribution of alarm data, a weighted tree model is proposed, along with an adaptive grid partitioning method to achieve a balanced distribution of alarm numbers across grids. For the issues of risk prediction and uncertainty capture, an innovative multiquantile regression model integrating multi-temporal graph neural networks is proposed, enabling accurate short-term predictions of driving risks for road transport vehicles while effectively capturing the uncertainty of driving risks. This provides a theoretical basis and technical support for improving the efficiency of road traffic risk identification and perfecting accident prevention mechanisms.
[0034] To predict the uncertainty of road transport vehicle driving risks, this invention provides a risk prediction method based on deep learning and multiquantile regression prediction, including: acquiring trajectory data and alarm data of road transport vehicles and analyzing their spatiotemporal distribution characteristics. Spatially, alarm events exhibit significant unevenness and high clustering in some areas. Temporally, both trajectory and alarm data show periodic variations on a daily basis, and there is a strong positive correlation between the two. Considering the spatial distribution characteristics, an adaptive grid partitioning model KDTree_weighted is proposed to achieve a balanced distribution of alarm numbers across grids, realizing balanced, non-overlapping, and highly efficient spatial grid partitioning. Considering the temporal distribution characteristics, an input time slice structure consisting of three parts is constructed: the nearest time slice, the previous day's time slice, and the previous week's time slice. This effectively assists the prediction model in fully learning the short-term dynamic changes and long-term periodic patterns of risk alarms. Geographic environment data, POI data, and road network structure data are acquired and multi-source data fusion and processing are performed. To capture spatial dependencies, a geographic environment similarity map, a social environment similarity map, a road network structure similarity map, and a grid distance map were constructed using grids as nodes. A multiquantile regression model, STQuantileNet, based on spatiotemporal graph convolution, was proposed to predict the number of road transport vehicle alarms. The model's input data consists of the number of road transport vehicle trajectories, the number of alarms, and three static graphs. The output is the multiple quantile values for each grid at each of the next T_out time steps, enabling the prediction of risk uncertainty. Comparative and ablation experiments were conducted to analyze the prediction results and verify the model's effectiveness and the application effects of each component.
[0035] The road transport vehicle driving risk uncertainty prediction method provided by this invention has good prediction effect, high reliability, and uncertainty quantification capability. It takes into account the impact of geographical environment, social environment, and road network structure on driving risk, and realizes accurate short-term prediction of road transport vehicle driving risk. It provides strong technical support for improving the reliability and real-time performance of vehicle driving risk early warning, and provides a solid theoretical foundation for improving road traffic safety from both time and space dimensions.
[0036] Example 1
[0037] In this embodiment 1, a road transport vehicle driving risk uncertainty prediction system is first provided, including: an acquisition module, used to acquire the spatiotemporal sequence of alarm quantity, the spatiotemporal sequence of traffic flow, and the multi-graph static adjacency matrix at the current time step; a processing module, used to process the acquired spatiotemporal sequence of alarm quantity, the spatiotemporal sequence of traffic flow, and the multi-graph static adjacency matrix using a pre-trained road transport vehicle driving risk uncertainty prediction model, to obtain the number of road transport vehicle alarms at future time steps; wherein, the road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a time and space feature extraction module, and a multi-quantile prediction output module; the dynamic graph construction layer is used for The system extracts the dependency between alarm count and traffic flow to construct a dynamic adjacency matrix for road transport vehicle traffic. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm counts to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm counts to extract their spatial dependencies. The multiquantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0038] The training method for the road transport vehicle driving risk uncertainty prediction model described in this embodiment includes: acquiring training data; the training data includes a spatiotemporal sequence of road transport vehicle alarm counts, a spatiotemporal sequence of road transport vehicle traffic flow, and a multi-graph static adjacency matrix within multiple historical time intervals. The driving risk uncertainty prediction model is trained based on the aforementioned spatiotemporal sequence of alarm counts, spatiotemporal sequence of traffic flow, and multi-graph static adjacency matrix as input, and on the road transport vehicle alarm count at future time steps as output.
[0039] In this embodiment, based on the above system, a method for predicting the uncertainty of road transport vehicle driving risk is implemented, including: the road transport vehicle driving risk uncertainty prediction model includes an input layer, a road transport vehicle flow dynamic graph construction layer (hereinafter referred to as "dynamic graph construction layer"), a multi-graph fusion module, a time and space feature extraction module, and a multiquantile prediction output module.
[0040] The input layer is used to select a sliding window of appropriate size to process the spatiotemporal sequences of alarm counts and traffic flow, respectively, and receives four static graph adjacency matrices: a geographic environment similarity map, a social environment similarity map, a road network structure similarity map, and a grid distance map. The dynamic graph construction layer is used to extract the dependency relationship between alarm counts and traffic flow and construct a dynamic graph adjacency matrix for road transport vehicle flow. The multi-graph fusion module is used to calculate the feature information weight coefficients of each spatial graph structure and perform multi-graph fusion. The temporal feature extraction module is used to process the spatiotemporal sequence of alarm counts and extract its temporal dependency relationship. The spatial feature extraction module is used to process the fused graph and the spatiotemporal sequence of alarm counts and extract its spatial dependency relationship. The multiquantile prediction output module is used to fuse the feature information of all time steps and spatial graph structures, use a dedicated multilayer perceptron (MLP) to estimate the median as the central reference, and obtain subsequent quantiles by accumulating non-negative increments or decrements. These increments or decrements are generated by a parallel MLP with a ReLU activation function to obtain prediction outputs at multiple quantiles.
[0041] The construction of the geographic environment similarity map includes: acquiring topographic and elevation data of the grid, constructing geographic environment vectors, using the cosine similarity method to measure the similarity between two vectors, and thus constructing a geographic environment similarity adjacency matrix M with grid nodes. geo .
[0042] The construction of the social environment similarity map includes: obtaining the number of POIs of each category in the grid, constructing POI vectors, where the dimension of the POI vector is the number of POI categories, and the value is the density of each category of POIs in the grid. The cosine similarity method is used to measure the similarity between two POI vectors, thereby constructing the social environment similarity adjacency matrix M. poi .
[0043] The construction of the road network structure similarity map includes: acquiring road and bridge / tunnel data at various levels of the grid; constructing a six-dimensional road network structure vector, including road density information at four levels (expressways and arterial roads, urban arterial roads, urban secondary arterial roads, and urban secondary roads), bridge density, and tunnel density; and constructing a road network structure similarity adjacency matrix M using cosine similarity. road .
[0044] The construction of the grid distance map includes: obtaining the latitude and longitude coordinates of the center point of each grid, calculating the distance between each grid, and constructing the grid distance adjacency matrix M. dist .
[0045] The dynamic graph construction layer consists of the following: the trajectory spatiotemporal sequence data is first input in parallel to two feature extraction blocks, block1 and block2. Each block contains a convolutional layer, a batch normalization layer, and a ReLU activation function, and the output is two feature vectors. Then, batch matrix multiplication, activation functions, and normalization are used to obtain an N×N matrix M. flow This enables the adaptive generation of a dynamic graph G depicting the trajectory flow relationship between different grids based on historical trajectory data. flow (V, E, M) flow ).
[0046]
[0047] The temporal feature extraction module consists of multiple temporal convolutional network (TCN) layers, each followed by a batch normalization layer and a Dropout layer.
[0048] The spatial feature extraction module consists of multiple Diffusion Graph Convolutional Network (D-GCN) layers, with each D-GCN layer followed by a Dropout layer.
[0049] This embodiment also proposes an adaptive grid partitioning model, KDTree_weighted, to achieve a balanced distribution of alarm counts across grid cells. The model is characterized by: rasterizing the study area, calculating the number of alarms in each grid cell, where each node in the KDTree_weighted model corresponds to each grid cell, and its weight represents the number of alarms within that grid cell. After sorting the nodes according to their spatial location, a binary search is used to find a hyperplane that makes the sum of the weights of the left and right subtrees equal or closest to equal, thus partitioning the left and right subtrees. This process is recursively repeated until the sum of the node weights in each leaf node is relatively balanced, achieving a balanced, non-overlapping, and highly efficient spatial grid partitioning.
[0050] Example 2
[0051] This embodiment provides a method for predicting the uncertainty of road transport vehicle driving risks based on deep learning, such as... Figure 1 As shown, the method includes the following steps:
[0052] Step 1: Obtain trajectory data and alarm data of road transport vehicles, as well as geographical environment data, social environment data, and road network structure data, perform data preprocessing, and establish a multi-source dataset.
[0053] Step 2: Analyze the spatiotemporal distribution characteristics of the trajectory and alarm data of road transport vehicles. Regarding spatial distribution characteristics, analyze the clustering and dispersion areas of alarm data. Alarm events exhibit significant spatial unevenness, with some areas showing high clustering. Regarding temporal distribution characteristics, analyze the changes in trajectory and alarm data over time at a 2-hour time granularity, and the correlation between the trends of trajectory and alarm data. Both show significant periodic changes on a daily basis, and their trends are closely positively correlated.
[0054] Step 3: Considering spatial distribution characteristics, an adaptive grid partitioning model, KDTree_weighted, is proposed to achieve a balanced distribution of alarm numbers across grids. Based on KDTree, alarm number weights are added. The study area is rasterized into 1km*1km grids, and the number of alarms in each grid is calculated. Each node in the KDTree_weighted model corresponds to each grid, and its weight represents the number of alarms within that grid. After sorting the nodes according to their spatial location, a binary search is used to find a hyperplane where the sum of the weights of the left and right subtrees is equal or closest to equal. This recursive logic ultimately achieves a relatively balanced sum of node weights in each leaf node, resulting in a balanced, non-overlapping, and highly efficient spatial grid partitioning.
[0055] Step 4: Considering the time distribution characteristics, an input time slice structure consisting of three parts was constructed: the nearest time slice, the previous day's time slice, and the previous week's time slice. The nearest time slice records X... t-n To X t n time slices (at the current moment) are used to capture short-term traffic dynamics. The previous day's time slice recorded X. t-d To X t-d+n The n time slices, i.e., data from the same time of the previous day to n future times, help the model learn and capture regular features in the daily cycle. The time slice of the previous week recorded X t-7d To X t-7d+n The n time slices further enhance the model's ability to perceive periodic trends. This effectively assists the model in fully integrating short-term dynamic changes with long-term periodic patterns, thereby improving the accuracy of predicting future driving risks and its spatiotemporal generalization ability.
[0056] Step 5: A system of influencing factor variables was constructed based on multi-source datasets. By analyzing the correlations between variables and using random forest to build a simple regression model, the global importance of variables in the entire model was obtained. Finally, social environmental variables (density of various POIs), road network structure variables (density of roads, bridges, and tunnels of various grades), and geographical environmental variables (topography and altitude) were selected as research variables.
[0057] Step 6: Based on the selected research variables, using the grid as nodes, construct three static maps using cosine similarity: a social environment similarity map, a road network structure similarity map, and a geographical environment similarity map. Construct a grid distance map based on the latitude and longitude coordinates of the grid center.
[0058] Step 7: Construct the STQuantileNet multiquantile regression model based on spatiotemporal graph convolution. Input trajectory and alarm data, as well as four static graphs. The model can predict the number of future road transport vehicle alarms and quantify the uncertainty.
[0059] Step 6 involves constructing the adjacency matrix of the social environment similarity graph. The correlation between the POI vectors of two grids can represent the social environment similarity between the two grids. The dimension of the POI vector represents the number of POI categories, and the numerical value represents the number of POIs of each category in the grid. The cosine similarity method is used to measure the similarity between two POI vectors; the smaller the angle between the two vectors and the larger the cosine value, the greater their similarity.
[0060] Step 6 involves constructing the adjacency matrix of the geographic environment similarity graph. Geographic environment is closely related to vehicle driving risk. By constructing a two-dimensional geographic environment vector (terrain, elevation) for each grid, the cosine similarity method is used to calculate the geographic environment similarity between two grids, thus constructing the geographic environment similarity graph.
[0061] Step 6 involves constructing the adjacency matrix of the road network structure similarity graph. Grids with similar road network structures often have similar traffic flow patterns and face similar probabilities of driving risks. Based on the road density information (including highways and arterial roads, urban arterial roads, urban secondary arterial roads, and urban branch roads), bridge density, and tunnel density within each grid, a six-dimensional road network structure vector is constructed, and a road network similarity graph is built using cosine similarity.
[0062] Step 6 involves constructing the adjacency matrix of the grid distance graph. The grid distance graph depicts the spatial distance relationships between grid cells and is an important way for GCN (Graph Convolutional Neural Network) to capture spatial information features. The grid distance graph is constructed by calculating the distance between the center points of the grid cells.
[0063] Step 7 uses the STQuantileNet multiquantile regression model based on spatiotemporal graph convolution. The model framework is as follows: Figure 2As shown, the model mainly comprises four key components: a dynamic graph construction layer (AdyGraphBlock), a multi-graph fusion module (Graph Fusion), a temporal and spatial feature extraction module (STBlock), and a multiquantile prediction module (Boosting Quantile). The model's input data consists of two parts: the number of trajectories of road transport vehicles and the number of alarms. Both are two-dimensional spatiotemporal sequences. The trajectory data is first input into the dynamic graph construction layer, resulting in three static graphs: a dynamic graph and a grid distance graph, a social environment similarity graph, and a road network structure similarity graph. Figure 1 The data is input to the multi-image fusion module and the DGCN spatial feature extraction module, while the alarm data sequence is input to the BTCN temporal feature extraction module. These two modules extract the spatiotemporal features of the data and fuse them. Finally, the data is input to the multiquantile regression module to achieve regression prediction.
[0064] This embodiment uses a deep neural network to predict the uncertainty of road transport vehicle driving risks. It employs various hyperparameters, including the learning rate and optimizer. By comparing model performance evaluation metrics, the optimal hyperparameter values are selected. The learning rate is set to 0.001 by default. The Adam optimizer and StepLR learning rate scheduler are used. Every 25 epochs, the current learning rate is multiplied by a decay factor of 0.85 to control the learning pace in the later stages of training and improve model stability. The training set, validation set, and test set are divided in an 8:1:1 ratio. The number of input samples per training session is set to 32, the number of training epochs to 500, and the output quantiles to be [0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95].
[0065] To describe the prediction performance of the proposed road transport vehicle driving risk uncertainty prediction model (STQuantileNet model), four deterministic indicators were selected: mean absolute error (MAE), root mean square error (RMSE), goodness of fit (R²), and mean square error (RMSE). 2 The model performance is evaluated using the F1 score, and four metrics for assessing uncertainty quantification performance: Mean Predictive Interval Width (MPIW), Interval Coverage Probability (PICP), Mean Quantile Error (MQE), and Comprehensive Evaluation Criterion (CWC). The calculation formula is as follows:
[0066]
[0067] CWC=MPIW×[1+λ·H(γ-PICP)·(γ-PICP) 2 ]
[0068]
[0069] In the formula: yi Represents the true value. This represents the predicted value, where N is the sample size and L is the number of samples. i U i These are the lower and upper bounds of the prediction interval, respectively. If the true value y of the i-th sample... i Falling within the prediction interval [L] i U i Within ], then c i =1, otherwise c i =0. γ is the confidence level, λ is the penalty coefficient controlling the severity of the penalty when coverage is insufficient, and H(·) is the Heaviside function. If γ-PICP>0, then H=1; otherwise, H=0. Q is the quantile set (e.g., {0.1, 0.5, 0.9}). The model's predicted value at quantile q, ρ q (·) is the quantile loss function.
[0070] Table 1 shows the performance of STQuantileNet in this embodiment compared with five contrasting models (STZINBNet, STZIGSNet, LSTM, RNN, and TCN) on various metrics. STZINBNet, STZIGSNet, and STQuantileNet share the same architecture in the spatiotemporal graph convolution part. The difference lies in that STZINBNet replaces the multiquantile regression module with a zero-inflated negative binomial distribution, while STZIGSNet replaces the multiquantile regression module with a zero-inflated Gaussian distribution. The optimal and suboptimal models are highlighted in bold and underlined in the table, respectively. Furthermore, since LSTM, RNN, and TCN are deterministic prediction models, the three uncertainty metrics PICP, MPIW, and CWC are not applicable.
[0071] Table 1 Comparison of Predictive Performance of Six Models
[0072]
[0073] It can be seen that the STQuantileNet model performs excellently in terms of deterministic metrics, while the STZIGSNet and STZINBNet models perform worse, and the other models (LSTM, RNN, TCN) perform relatively poorly. Regarding uncertainty metrics, STQuantileNet has the narrowest prediction interval (MPIW). Although its coverage ratio (PICP) is lower than the other two models, its CWC is the lowest, indicating that it can maintain high coverage even within a narrow prediction interval, reflecting the model's superior performance in balancing uncertainty and accuracy.
[0074] The STQuantileNet model, proposed for predicting the uncertainty of road transport vehicle driving risks, includes various static and dynamic graphs. Static graphs include social environment similarity graphs, geographical environment similarity graphs, road network structure similarity graphs, and grid distance graphs; dynamic graphs include trajectory dynamic graph structures. Through ablation experiments, the contribution of these five types of spatial relationship graphs to the model's predictive performance is analyzed. The meanings of the ablation experiment model codes and their prediction results and evaluation indicators are shown in Tables 2 and 3.
[0075] Table 2. Codes and meanings of various ablation experiments.
[0076]
[0077] Table 3 Ablation Experiment
[0078]
[0079] As shown in Table 3, the STQuantileNet model proposed in this embodiment, which integrates multiple dynamic and static graphs, outperforms other variant models. This means that the five graphs—social environment similarity graph, geographical environment similarity graph, road network structure similarity graph, grid distance graph, and trajectory dynamic graph structure—all contribute to the final prediction results of the model, indicating that the various grid spatial graphs modeled in this invention are effective in extracting spatial dependencies.
[0080] The deep learning-based method for predicting the uncertainty of road transport vehicle driving risks provided in this embodiment has high reliability. It takes into account the impact of factors such as urban spatial distribution, social environment, geographical environment, road environment, and the complex time-varying dependency between the trajectory of road transport vehicles and alarms on vehicle driving risks, resulting in higher calculation accuracy. This embodiment provides scientific support and practical guidance for the safe management of road transport vehicle driving.
[0081] Example 3
[0082] This embodiment 3 provides a non-transitory computer-readable storage medium for storing computer instructions. When executed by a processor, the computer instructions implement the deep learning-based method for predicting the uncertainty of road transport vehicle driving risks as described above. The method includes:
[0083] Obtain the spatiotemporal sequence of alarm counts, the spatiotemporal sequence of traffic flow, and the static adjacency matrix of multiple graphs at the current time step;
[0084] A pre-trained road transport vehicle driving risk uncertainty prediction model is used to process the acquired spatiotemporal sequences of alarm numbers, traffic flow, and multi-graph static adjacency matrices to obtain the number of road transport vehicle alarms at future time steps. The road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a temporal and spatial feature extraction module, and a multi-quantile prediction output module. The dynamic graph construction layer extracts the dependency between alarm numbers and traffic flow, constructing a dynamic graph adjacency matrix for road transport vehicle traffic flow. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm numbers to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm numbers to extract their spatial dependencies. The multi-quantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0085] Example 4
[0086] This embodiment 4 provides a computer device, including a memory and a processor, wherein the processor and the memory communicate with each other, and the memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute the road transport vehicle driving risk uncertainty prediction method based on deep learning as described above, the method including:
[0087] Obtain the spatiotemporal sequence of alarm counts, the spatiotemporal sequence of traffic flow, and the static adjacency matrix of multiple graphs at the current time step;
[0088] A pre-trained road transport vehicle driving risk uncertainty prediction model is used to process the acquired spatiotemporal sequences of alarm numbers, traffic flow, and multi-graph static adjacency matrices to obtain the number of road transport vehicle alarms at future time steps. The road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a temporal and spatial feature extraction module, and a multi-quantile prediction output module. The dynamic graph construction layer extracts the dependency between alarm numbers and traffic flow, constructing a dynamic graph adjacency matrix for road transport vehicle traffic flow. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm numbers to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm numbers to extract their spatial dependencies. The multi-quantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0089] Example 5
[0090] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the deep learning-based method for predicting the uncertainty of road transport vehicle driving risks as described above. The method includes:
[0091] Obtain the spatiotemporal sequence of alarm counts, the spatiotemporal sequence of traffic flow, and the static adjacency matrix of multiple graphs at the current time step;
[0092] A pre-trained road transport vehicle driving risk uncertainty prediction model is used to process the acquired spatiotemporal sequences of alarm numbers, traffic flow, and multi-graph static adjacency matrices to obtain the number of road transport vehicle alarms at future time steps. The road transport vehicle driving risk uncertainty prediction model includes a dynamic graph construction layer, a multi-graph fusion module, a temporal and spatial feature extraction module, and a multi-quantile prediction output module. The dynamic graph construction layer extracts the dependency between alarm numbers and traffic flow, constructing a dynamic graph adjacency matrix for road transport vehicle traffic flow. The multi-graph fusion module calculates the feature information weight coefficients of each spatial graph structure and performs multi-graph fusion. The temporal feature extraction module processes the spatiotemporal sequence of alarm numbers to extract their temporal dependencies. The spatial feature extraction module processes the fused graph and the spatiotemporal sequence of alarm numbers to extract their spatial dependencies. The multi-quantile prediction output module fuses the feature information from all time steps and spatial graph structures, uses a multilayer perceptron to estimate the median as a central reference, and obtains quantiles by accumulating non-negative increments or decrements, resulting in prediction outputs at multiple quantiles.
[0093] In summary, the deep learning-based method for predicting the uncertainty of road transport vehicle driving risks provided by this invention includes: using real-time vehicle trajectory and alarm data exported from the on-board monitoring system of road transport vehicles, and employing the KDTree_weighted algorithm for adaptive grid partitioning to balance the number of alarms. By analyzing the spatiotemporal and numerical distribution characteristics, four static graphs are constructed: a grid distance graph, a social environment similarity graph, a road network structure similarity graph, and a geographical environment similarity graph. A dynamic graph construction layer is introduced to construct a dynamic trajectory graph to capture spatial correlation features. A prediction model integrating spatiotemporal graph convolutional networks and multiquantile regression techniques—STQuantileNet—is proposed. By introducing the dynamic graph convolutional network DGCN and the temporal convolutional network BTCN, it effectively extracts multi-spatial features of traffic flow and alarm data. The multiquantile regression model effectively captures the uncertainty of driving risks, balancing the accuracy of prediction results with the reasonableness of confidence intervals, providing scientific support and practical guidance for the safe management of road transport vehicles.
[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 1 One 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, whereby a series of operational steps are performed 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] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solutions disclosed in the present invention, various modifications or variations that can be made by those skilled in the art without creative effort should be included within the scope of protection of the present invention.
Claims
1. A method of predicting driving risk uncertainty for a road transport vehicle, characterized in that, The method comprises the following steps: Obtain the alarm quantity spatio-temporal sequence, the traffic flow spatio-temporal sequence and the multi-graph static adjacency matrix of the current time step; wherein the multi-graph static adjacency matrix comprises four static graph adjacency matrices of geographical environment similarity graph, social environment similarity graph, road network structure similarity graph and grid distance graph; the construction of the geographical environment similarity graph comprises the following steps: obtaining the terrain and elevation data of the grid, constructing a geographical environment vector, and using the cosine similarity method to measure the similarity of two vectors, thereby constructing the geographical environment similarity adjacency matrix with the grid as the node; the construction of the social environment similarity graph comprises the following steps: obtaining the number of various POIs of the grid, constructing a POI vector, wherein the dimension of the POI vector is the number of POI categories, and the numerical value is the density of various categories of POIs in the grid; using the cosine similarity method to measure the similarity of two POI vectors, thereby constructing the social environment similarity adjacency matrix; the construction of the road network structure similarity graph comprises the following steps: obtaining the data of various levels of roads and bridges and tunnels of the grid, constructing a six-dimensional road network structure vector, including road density information, bridge density and tunnel density, and using the cosine similarity to construct the road network structure similarity adjacency matrix; the construction of the grid distance graph comprises the following steps: obtaining the central point longitude and latitude coordinates of each grid, calculating the distance between each grid, and constructing the grid distance adjacency matrix; The pre-trained road transport vehicle driving risk uncertainty prediction model is used to process the obtained alarm quantity spatiotemporal sequence, vehicle flow spatiotemporal sequence and multi-graph static adjacency matrix, to obtain the road transport vehicle alarm quantity at the future time step; wherein the road transport vehicle driving risk uncertainty prediction model comprises a dynamic graph construction layer, a multi-graph fusion module, a time and space feature extraction module and a multi-quantile prediction output module; the dynamic graph construction layer is used to extract the dependency relationship between the alarm quantity and the vehicle flow, and construct a road transport vehicle flow dynamic graph adjacency matrix, comprising: the trajectory spatiotemporal sequence data is first input in parallel to two feature extraction blocks, each feature extraction block contains a convolution layer, a batch normalization layer and a ReLU activation function, and the output is two feature vectors, then a matrix is obtained by using batch matrix multiplication, an activation function and normalization processing, to realize adaptive generation of the trajectory flow relationship dynamic graph between different grids according to the historical trajectory data; the multi-graph fusion module is used to calculate the feature information weight coefficients of the trajectory flow relationship dynamic graph, the grid distance graph, the social environment similarity graph and the road network structure similarity graph, and perform multi-graph fusion; the time feature extraction module is used to process the alarm quantity spatiotemporal sequence and extract its time dependency relationship; the space feature extraction module is used to process the fused graph and the alarm quantity spatiotemporal sequence and extract its spatial dependency relationship; the multi-quantile prediction output module is used to fuse the feature information of all time steps and spatial graph structures, use the multilayer perceptron to estimate the median as the central reference, and obtain the quantile by accumulating non-negative increments or decrements, to obtain the prediction output on multiple quantiles.
2. The road transport vehicle driving risk uncertainty prediction model training method according to claim 1, characterized in that, The time feature extraction module is composed of multiple time convolution network layers, and each TCN layer is followed by a batch normalization layer and a Dropout layer; The space feature extraction module is composed of multiple diffusion graph convolution network layers, and each D-GCN layer is followed by a Dropout layer.
3. A road transport vehicle driving risk uncertainty prediction system based on the method according to claim 1 or 2, characterized in that, The method comprises the following steps: The acquisition module is configured to acquire the alarm quantity spatio-temporal sequence, the traffic flow spatio-temporal sequence and the multi-graph static adjacency matrix of the current time step; The processing module is configured to process the acquired alarm quantity spatio-temporal sequence, traffic flow spatio-temporal sequence and multi-graph static adjacency matrix by using a pre-trained road transport vehicle driving risk uncertainty prediction model to obtain the number of road transport vehicle alarms at a future time step; wherein the road transport vehicle driving risk uncertainty prediction model comprises a dynamic graph construction layer, a multi-graph fusion module, a time and space feature extraction module and a multi-quantile prediction output module; the dynamic graph construction layer is configured to extract the dependency relationship between the alarm quantity and the traffic flow, and construct a road transport vehicle flow dynamic graph adjacency matrix; The multi-graph fusion module is configured to calculate the feature information weight coefficients of each spatial graph structure and perform multi-graph fusion; the time feature extraction module is configured to process the alarm quantity spatio-temporal sequence and extract its time dependency relationship; the space feature extraction module is configured to process the fused graph and the alarm quantity spatio-temporal sequence and extract its spatial dependency relationship; and the multi-quantile prediction output module is configured to fuse the feature information of all time steps and spatial graph structures, use a multi-layer perceptron to estimate the median as the central reference, and obtain the prediction output on multiple quantiles by accumulating non-negative increments or decrements.
4. A non-transitory computer-readable storage medium, comprising, The non-transitory computer readable storage medium is configured to store computer instructions, which, when executed by a processor, implement the road transport vehicle driving risk uncertainty prediction method according to claim 1 or 2.
5. A computer device, comprising: A device comprising a memory and a processor, the processor and the memory being in communication with each other, the memory storing program instructions executable by the processor, the processor invoking the program instructions to execute the road transport vehicle driving risk uncertainty prediction method according to claim 1 or 2.
6. An electronic device, comprising: The device comprises: a processor, a memory and a computer program; wherein the processor is connected with the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to execute instructions for implementing the road transport vehicle driving risk uncertainty prediction method according to claim 1 or 2.
Citation Information
Patent Citations
Regional traffic safety evaluation method based on connectivity-based spatial weight matrix
CN106530706A
Intelligent traffic space-time synchronization graph convolutional neural network and traffic prediction method
CN115862324A