Traffic flow estimation method fusing curvature gradient

By integrating graph neural network models that incorporate road curvature and slope features, the accuracy and robustness issues of traffic flow prediction in complex terrain areas are addressed, enabling accurate prediction of traffic conditions in blind spots.

CN121838472BActive Publication Date: 2026-06-23GUIZHOU UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU UNIV
Filing Date
2026-01-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing traffic flow prediction models struggle to accurately capture traffic flow evolution patterns in blind spots of complex terrain areas, lacking terrain-constrained adaptive modeling capabilities, resulting in decreased prediction accuracy and insufficient generalization ability.

Method used

By acquiring high-precision geographic information system data, road curvature and slope features are extracted to construct a geographically enhanced road network map structure. A graph neural network model is used for traffic flow modeling, and edge weights are adaptively adjusted to capture the traffic flow propagation patterns under complex linear conditions. The loss function is optimized by combining graph convolution operators and traffic flow physical constraints.

Benefits of technology

It improves the model's prediction accuracy and robustness in complex terrain areas, ensures the accurate capture and physical rationality of traffic flow propagation patterns, and enhances the ability to predict traffic conditions in blind spots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121838472B_ABST
    Figure CN121838472B_ABST
Patent Text Reader

Abstract

The application provides a traffic flow prediction method fusing curvature gradient, and relates to the technical field of traffic flow prediction. The method first acquires traffic data and geographic information system data of visible area detectors in a road network; extracts curvature and gradient characteristics of each road section, and constructs a geographic enhanced road network graph structure, wherein the edge weight between nodes is dynamically generated according to the curvature difference and the gradient difference; the traffic data is input into a graph neural network model as node features and graph structure, the model performs spatio-temporal modeling through a graph convolution operator dedicated to curvature and gradient, and explicitly fuses road alignment constraints to capture traffic flow propagation rules; finally, the prediction value of the traffic state of the monitored blind area road section is output, and dynamic prediction is realized. The application effectively solves the problem of inaccurate traffic state perception caused by monitoring blind area under complex terrain, and improves the prediction accuracy and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic flow prediction technology, specifically a traffic flow prediction method that integrates curvature and slope. Background Technology

[0002] In the field of traffic flow prediction, existing technologies mainly rely on real-time and historical traffic data collected by fixed detectors deployed in road networks, combined with various data-driven models for traffic state prediction and analysis. These methods have achieved good results in conventional urban road networks. However, in areas with significant topographic relief and complex road alignments, such as mountainous and hilly areas, the deployment of fixed detectors is often limited by field of view and cost, making it difficult to fully cover key road sections such as sharp bends and steep slopes, thus creating numerous perception blind spots.

[0003] Because the direct impact of the road's geometric features on vehicle behavior and traffic flow propagation is not fully considered, the model struggles to accurately capture the evolution of traffic flow under terrain constraints when inferring traffic conditions in blind spots, resulting in a significant decrease in prediction accuracy. Existing models generally lack the ability to adaptively model the coupling relationship between geographical features and traffic dynamics, and cannot dynamically adjust the weights of traffic flow propagation based on the linear differences of different road segments. Therefore, when faced with varied, unstructured, and complex terrain, the model's generalization ability and robustness are insufficient, making it difficult to achieve reliable and continuous traffic condition perception in blind spots with sparse or missing data. Summary of the Invention

[0004] To achieve the above objectives, this invention proposes a traffic flow prediction method that integrates curvature and slope, comprising:

[0005] S1. Acquire historical and real-time traffic data from traffic detectors in the visible area of ​​the target road network, as well as high-precision geographic information system data of the target road network. The geographic information system data includes at least the curvature and slope of the roads, and the traffic data includes at least the traffic flow and average vehicle speed.

[0006] S2. Preprocess and extract features from the traffic data and geographic information system data, wherein, for the geographic information system data, the curvature features and slope features of each road segment unit are extracted;

[0007] S3. Construct a geographically enhanced road network graph structure, taking road segment units as nodes, and dynamically generating edge weights between nodes based on the curvature and slope features extracted in S2. The edge weights are functions of the spatial adjacency relationship between road segments and the differences in curvature and slope, thereby forming a graph representation that integrates road alignment constraints.

[0008] S4. The traffic data obtained in S1 is used as node features and input together with the constructed road network map structure into the graph neural network model. The graph neural network model models the spatiotemporal evolution of traffic flow on the geographically enhanced graph structure through graph convolution operators for road curvature and slope. Its graph convolution process explicitly depends on and adaptively adjusts to the curvature and slope features to capture the traffic flow propagation pattern under complex linear conditions and output traffic state prediction values ​​for road sections in monitoring blind spots.

[0009] S5. Based on the output traffic state prediction values, perform dynamic inference of traffic flow in blind spots.

[0010] As a further technical solution, the specific process of preprocessing and feature extraction of traffic data and geographic information system data includes: first, aligning the original traffic data sequence with timestamps and removing outliers, and imputing missing values ​​based on the physical conservation relationship of traffic flow parameters within a sliding time window to generate regular traffic state time-series data; second, based on geographic information system data, calculating the average curvature and average slope of each road segment unit, and using the average curvature and average slope as the static geographic feature vector of that road segment unit; finally, mapping the regular traffic state time-series data to the corresponding road segment unit nodes according to their spatial location, and concatenating it with the static geographic feature vector of that road segment unit to form a comprehensive node feature that integrates dynamic traffic information and static road alignment attributes, providing input for subsequent graph neural network modeling.

[0011] As a further technical solution, the process of constructing the geo-enhanced road network map structure specifically includes: First, defining an initial adjacency graph based on the spatial adjacency relationship between road segment units, and assigning an initial weight to each edge. This initial weight is set as the reciprocal of the Euclidean distance between connected road segment units to reflect basic spatial proximity. Next, based on the extracted curvature and slope features, calculating the absolute values ​​of the average curvature difference and average slope difference between connected road segment units, and using half of the sum of the two as the geo-feature difference degree to quantify the discontinuity of the two road segments in terms of alignment. Then, applying this geo-feature difference degree to the initial weight through an exponential decay function, and introducing a learnable parameter λ for dynamic adjustment, generating the final edge weight that integrates road alignment constraints. Specifically, the weight w of the edge between road segment i and road segment j... ij Defined as: Where d ij K represents the Euclidean distance between road segment i and road segment j; i ,K j σ represents the average curvature of road segment i and road segment j, respectively; i ,σ jLet represent the average slopes of road segment i and road segment j, respectively. The learnable parameter λ in the formula is used to adaptively balance the influence of spatial distance and geographical feature differences on connectivity strength, thereby constructing a geographically enhanced road network map structure that can explicitly represent terrain constraints. This makes the map structure itself contain the potential hindering or promoting effects of road alignment on traffic flow.

[0012] As a further technical solution, the graph convolutional layers of the graph neural network model adopt an improved graph convolutional network structure, and its inter-layer update rule is as follows: ,in, To incorporate geographically enhanced edge weights into the adjacency matrix, Let W be the corresponding degree matrix. (l) Let be the learnable weight matrix of the l-th layer, and σ be the activation function. To explicitly fuse road alignment features during convolution to enhance the modeling ability of traffic flow propagation patterns, an adaptive weight adjustment mechanism based on curvature and slope is introduced to dynamically correct the edge weights. The correction formula is as follows: , where w ij To enhance the initial geographical edge weights, These are learnable coefficients used to dynamically adjust the degree of influence of geographical feature differences on edge weights in the current network layer; in this way, the model can adaptively focus on changes in traffic flow propagation characteristics caused by linear differences in feature aggregation at different depths.

[0013] As a further technical solution, the training of the graph neural network model employs a gradient descent-based optimization algorithm, and its loss function consists of three parts: a data fitting term, a physical constraint term, and a regularization term; the loss function is specifically defined as follows: Where L_MSE is the mean squared error loss term, which calculates the difference between the predicted value and the true value, and the formula is: y i To reflect real traffic conditions such as traffic volume and speed. The value is the model prediction, and N is the number of samples. These are physical constraint terms based on the traffic flow conservation equation, used to ensure that the model predictions conform to the basic physical laws of traffic flow. Their form is based on a measure of the deviation from the continuity equation, i.e., for... The norm constraint is given by ρ(x,t), where ρ(x,t) is the traffic density at location x and time t, q(ρ) is the flow function q(ρ) = ρ·v(ρ), and v(ρ) is the speed-density relationship; L reg For regularization, the Frobenius norm of the weight matrix is ​​used, i.e. , These are learnable parameters for the model, used to prevent overfitting. In each training iteration, backpropagation of gradients simultaneously optimizes the data fitting error and physical consistency deviation, using the learnable parameters. and By dynamically adjusting the contribution weights of each loss term, the generalization ability of the graph neural network model and the physical rationality of the output results are significantly improved in data-scarce or extreme scenarios.

[0014] As a further technical solution, the process of outputting the traffic state prediction value of the blind spot road segment specifically includes: using a fully trained graph neural network model, the nodes corresponding to the blind spot road segment are subjected to multiple rounds of message passing and state updates in a geo-enhanced road network graph structure; in each round of updates, firstly, according to the aforementioned edge weight calculation formula, combined with the curvature and slope features of the adjacent nodes in the current iteration step, the edge weights are dynamically corrected through an adaptive weight adjustment mechanism; subsequently, based on the corrected edge weights, the traffic state features of the adjacent nodes are aggregated through the graph convolution operator to update the hidden state representation of the current blind spot road segment node; this process is iterated multiple times, so that the influence of geographical feature differences on traffic flow propagation is explicitly encoded and transmitted layer by layer in the node features; finally, the feature vector of the blind spot road segment node output by the last layer of graph convolution is input to the fully connected layer at the end of the graph neural network model, and the traffic state prediction value of the road segment at the target time, such as traffic volume and average speed, is directly generated by regression.

[0015] As a further technical solution, the graph neural network model consists of multiple graph convolutional layers. The specific number of layers is a fixed positive integer obtained during the model training phase based on loss function optimization and validation set performance evaluation. The specific determination method is as follows: during training, cross-validation is used to evaluate the overall performance of the model on the independent validation set under different candidate layer numbers. The overall performance is determined by both prediction accuracy and computational complexity. Finally, the layer number that minimizes the overall loss function and does not exhibit obvious overfitting is selected as the number of graph convolutional layers in the graph neural network model. During the inference phase, for the input geographic augmented road network map structure, the hidden state of each node is strictly processed by all graph convolution operators in sequence. When all nodes have completed the state update of all layers, the iteration process terminates to ensure that the depth of information transmission matches the model capacity.

[0016] As a further technical solution, the final step of dynamically predicting traffic flow in blind spots includes: First, acquiring the latest real-time traffic data from traffic detectors in the visible area within the current target time slice; concatenating this latest real-time traffic data with the static geographic feature vector of the corresponding road segment unit to generate the feature vector of the visible area road segment node at the current moment, and updating it in the road network diagram structure, replacing the corresponding historical or previous moment features; next, inputting the updated road network diagram structure into a trained graph neural network model; performing a complete forward calculation on the graph neural network model, outputting the traffic state prediction values ​​for all blind spot road segments at the current moment; then, to improve the robustness of the prediction results, the blind spot road segment output by the model is... The traffic state prediction value of a road segment is weighted and fused with the verification value derived from the traffic flow conservation equation. The weighting is dynamically determined by the difference between the traffic state prediction value and the verification value. The greater the difference, the higher the weight is assigned to the verification value, thereby introducing soft constraints of physical rules to correct the result. Finally, the traffic state of the blind spot road segment after fusion and verification is output as the final dynamic prediction result of the current target time slice. This final dynamic prediction result is directly used to update the road network state view of the traffic management system, and the current road segment state can be used as the initial state or historical context for the prediction of the next time slice. The above process is repeated to achieve continuous dynamic prediction of traffic flow in the time dimension.

[0017] This invention provides a traffic flow prediction method that integrates curvature and slope, which has the following advantages:

[0018] This invention solves the fundamental problem that existing graph structures cannot characterize the resistance of terrain to traffic flow propagation by dynamically incorporating the geographical features of road curvature and slope into the edge weight definition of the road network graph structure. This improves the model's accuracy in representing real physical constraints and lays a data foundation for accurate prediction.

[0019] This invention improves the model's ability to autonomously extract traffic flow propagation patterns under complex terrain from visible area data by designing an adaptive graph convolution operator that depends on curvature and slope in the graph neural network.

[0020] This invention addresses the reliability problem of pure data-driven models potentially outputting results that violate physical laws in extreme scenarios by introducing traffic flow physical conservation equations as regularization constraints into the training loss. This improves the physical rationality and generalization robustness of the inference results in real and complex environments. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the process of the present invention;

[0022] Figure 2 This is a flowchart of the data processing of the present invention. Detailed Implementation

[0023] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] like Figures 1 to 2 As shown, this embodiment is set on a mountainous highway section with a typical complex alignment. The total length of this section is 20 kilometers. Fixed traffic detectors, such as geomagnetic sensors, are deployed in the road network. They collect data once per minute, continuously recording traffic flow data at their location in vehicles per minute and average vehicle speed data in kilometers per hour. However, due to terrain limitations and construction costs, detectors could not be installed in the center areas of curves with large curvatures, such as greater than 0.03 meters per meter, and in the crest areas of slopes with large gradients, such as greater than 5%. These areas constitute blind spots for traffic condition monitoring that require special attention. The total length of the blind spot road section accounts for approximately 30% of the entire target road network length. The goal of this invention is to comprehensively utilize the historical and real-time data from these visible area detectors, combined with high-precision geographic information system data describing the geometry of the road itself, to achieve real-time and accurate dynamic prediction of the traffic conditions, mainly traffic flow and average vehicle speed, in the aforementioned blind spot road sections.

[0025] Two types of data sources are acquired simultaneously. The first type of data consists of historical and real-time data streams from traffic detectors in all visible areas of the target road network. Historical data typically needs to be continuous for more than 30 days for model training, while real-time data is used for online inference. Each data record must contain at least a timestamp accurate to the second, a unique detector number, traffic flow value, and average vehicle speed value. The second type of data consists of high-precision geographic information system data from the target road network. This data originates from road design drawings or subsequent surveys and has a spatial resolution of no less than 0.5 meters. The data format is GeoJSON or Shapefile, and its attributes must include the curvature attribute of each sampling point on the road centerline, in units of meters, and the slope attribute, in units of percentages.

[0026] The acquired raw data needs to be preprocessed and feature extracted. For traffic data sequences, timestamp alignment is first performed to unify any potential second-level time deviations from each detector to whole minutes. For example, all data collected between 8:30:00 and 8:30:59 AM is grouped into a data slice representing the 8:30 AM time. Next, outlier removal is performed using a 5-minute sliding time window. For a given detector, the average and standard deviation of vehicle speeds at the same time of day and minute in historical data are calculated. If the current time slice's vehicle speed exceeds the historical average by ±3 times the standard deviation, the data is considered outlier and removed. For example, suppose detector number one historically... The average vehicle speed at 8:30 is 72 km / h with a standard deviation of 8 km / h. Therefore, if the speed reported by the detector in the current time slot is lower than 48 km / h or higher than 96 km / h, the record will be removed. For data loss due to abnormal removal or equipment failure, an interpolation method based on the physical conservation relationship of traffic flow is used. Assuming road segment units A, B, and C are spatially connected sequentially, with data missing at B, and normal detectors at A and C; at a certain time t, detector A records a flow rate of 105 vehicles per minute, and detector C records a flow rate of 95 vehicles per minute. Then, the interpolated flow rate value for road segment B at that time is the arithmetic mean of the flows at A and C, which is 100 vehicles per minute. The average vehicle speed is interpolated using a similar method, taking the average of the upstream and downstream speeds.

[0027] For Geographic Information System (GIS) data, the core of preprocessing is to extract the static linear features of each road segment unit. First, the centerline of the entire target road network is divided into a series of road segment units of roughly equal length. In this embodiment, the length of each unit is set to 100 meters. For a 20-kilometer road network, a total of 200 road segment units are obtained. For each road segment unit i, the curvature values ​​of all GIS sampling points within it are extracted. The arithmetic mean of the absolute values ​​of these curvature values ​​is calculated as the average curvature feature of that road segment unit, denoted as k. i Using the exact same procedure, the arithmetic mean of the slope values ​​at all sampling points within the road segment unit is calculated and used as the average slope characteristic, denoted as σ. i At this point, each road segment unit has obtained a two-dimensional static geographic feature vector, containing k i and σ i Two elements.

[0028] After completing the above processing, the traffic dynamic data needs to be fused with the road static features. Based on the actual geographic coordinates of the traffic detectors, the collected traffic flow data and average speed data are mapped to the nearest neighbor road segment units. In this way, each road segment unit has a dynamic traffic feature vector at each time slice t, containing both flow and speed. Finally, the dynamic traffic feature vector of each road segment unit is concatenated with its static geographic feature vector to form the complete node feature vector of that unit at time t. Before inputting the data into the model for computation, all numerical features need to be normalized, scaling them to the range of 0 to 1 to eliminate the influence of dimensions and accelerate model training convergence. For example, for traffic flow features, the global maximum flow value q is found in the training dataset. max and minimum flow rate q min Then, for any flow value q, its normalized value q norm =(qq min ) / (q max -q min ).

[0029] The 200 road segment units obtained from the aforementioned division are used as nodes in the graph structure; the edges of the graph are defined based on the actual topological connections of the road network, that is, if the endpoint of one road segment unit is directly connected to the starting point of another road segment unit in space, then a directed edge is established between these two corresponding nodes; the process of calculating the weight of each edge is a key aspect of this invention; firstly, the Euclidean distance d between the center points of the two nodes connected by the edge, namely road segment units i and j, is calculated. ij The unit is meters; then, the average curvature k of node i is obtained from the preprocessing results. i and average slope σ i and the average curvature k of node j j and average slope σ j Next, the geographical feature difference Δ is calculated. geo It is defined as half the sum of the absolute value of the average curvature difference and the absolute value of the average slope difference; specifically, Δ geo =(|k i -k j |+|σ i -σ j |) / 2.

[0030] Finally, the final weight of the edge is calculated according to the formula given in claim 3. In the subsequent model training phase, the gradient descent algorithm will be used for optimization. During model initialization, this parameter is assigned an initial value, which is set to 1.0 in this embodiment. The edge weight is not only inversely proportional to the spatial distance, but also subject to exponential decay adjustment due to the difference in geographical features between the two locations. When the curvature or slope of two connected road segments differs greatly, even if they are spatially close, their connection weight will be significantly weakened, thus explicitly encoding the potential obstruction effect of abrupt changes in road alignment on the smooth propagation of traffic flow in the graph's topology. After calculating the weights for all adjacent edges in the graph using this method, a geographically enhanced road network graph structure that can represent complex terrain constraints is obtained, and its mathematical representation is a weighted adjacency matrix. and its corresponding degree matrix The graph neural network model generates the node feature matrix X and the geographic augmented graph structure using the aforementioned steps. , As input; a multi-layer graph convolutional network architecture is adopted; its basic inter-layer propagation follows the improved graph convolution operator formula, namely

[0031] Building upon this, the model introduces an adaptive weight adjustment mechanism. Specifically, before each graph convolution operation begins, the system dynamically adjusts the edge weights of the input graph based on the feature representation of the current node. The adjustment formula is as follows: ;here, As the initial weights, The learnable coefficient is used to adjust the influence of geographical features on the weights and is initialized to 0.5 before training. This mechanism enables the graph neural network to adaptively adjust the degree of influence of terrain constraints on the interaction of traffic states between adjacent road segments based on the learned context during the information transmission process.

[0032] The model is trained based on historical data; the design of the loss function L is another core element, consisting of three parts: The first item L MSE The mean squared error loss measures the difference between the model's predicted values ​​and the actual observed values ​​on the visible road segment; the second term L physics This is a physical constraint loss term based on the traffic flow conservation equation, crucial for improving the model's generalization ability and the physical rationality of its output results in extreme or unseen scenarios. In practical implementation, the predicted flow and speed for each road segment output by the model need to be converted into traffic density through basic traffic flow relationships. Then, on a discrete spatiotemporal grid, the partial derivative of density with respect to time in the conservation equation is approximately calculated, along with the partial derivative of flow with respect to space, and their sum of squares is minimized. This loss term forces the model to learn traffic flow dynamics that conform to basic physical principles. The third term, L... regIt is a regularization term that uses the square of the Frobenius norm of all weight matrices in the model to prevent the model from overfitting on the training data.

[0033] The training process requires the use of optimization algorithms, such as the Adam optimizer based on gradient descent; hyperparameters need to be set, for example, the weight coefficient λ of the physical constraint term is set to a small value, such as 0.1, in the early stage of training, and a warm-up strategy is adopted, gradually increasing it to 0.5 after a certain training period; the weight coefficient α of the regularization term is set to a fixed small value, such as 0.001; these three loss objectives are optimized simultaneously through the backpropagation algorithm, so that the model can not only fit historical data, but also its prediction results conform to physical laws, thus having stronger robustness.

[0034] For the prediction process of blind spot road segments, the latest real-time traffic data from the visible area detector at the current moment is concatenated with the static geographic feature vector of the corresponding road segment unit to update the feature values ​​of these visible nodes in the graph node feature matrix. For blind spot nodes, their traffic features are initialized to 0 or the predicted value from the previous moment is used. Then, the updated graph structure and node features are input into the trained graph neural network model to perform a complete forward computation. In this process, the nodes corresponding to the blind spot road segments continuously aggregate the information of their neighboring nodes to update their hidden state representation through multiple rounds of message passing based on geographic augmentation weights. In each convolutional layer, the edge weights are fine-tuned according to the above adaptive mechanism. Finally, the blind spot node feature vector output by the last graph convolutional network is fed into the fully connected layer at the end of the model to directly regress and obtain the predicted values ​​of traffic flow and average speed of the blind spot road segment at the current target moment.

[0035] First, obtain the latest real-time traffic data reported by traffic detectors in all visible areas within the current target time slice; then, concatenate these latest data with the static geographic feature vectors of the corresponding road segment units to generate the node feature vectors of these visible road segments at the current time, and update the node feature matrix in the road network map structure accordingly.

[0036] Next, the updated road network structure is input into the trained graph neural network model; the model performs a complete forward computation and outputs the traffic state prediction values ​​for all road segments, including blind spot road segments, at the current time.

[0037] Then, to improve the reliability of the inference method, the output blind spot segment prediction values ​​are verified and fused. Based on the traffic flow conservation equation, measured traffic data from the nearest visible nodes upstream and downstream of the blind spot segment are used to extrapolate and obtain an independent verification value. For example, for a blind spot segment, the measured traffic flow of its upstream visible segment A and downstream visible segment B at the same time is taken, and the average of the two is used as the verification value of the blind spot traffic flow. Next, the model's output prediction value is compared with this verification value, and the relative difference between the two is calculated. The weights for weighted fusion are dynamically determined based on this difference. In this embodiment, two difference thresholds are set. For example, 15% and 30%; if the difference rate between the predicted value and the validation value is less than 15%, the model prediction is considered very reliable, and the final result fully adopts the model prediction value; if the difference rate is between 15% and 30%, it is considered that there is some uncertainty, and the final result is that the model prediction value is assigned a weight of 0.7 and the validation value is assigned a weight of 0.3, and the weighted sum is obtained; if the difference rate is greater than or equal to 30%, it is considered that the model prediction may have a large deviation. At this time, the validation value is assigned a higher weight, for example, 0.6, and the model prediction value is assigned a weight of 0.4, and then weighted fusion is performed. At the same time, this event is recorded in the log for subsequent analysis and inspection.

[0038] Finally, the traffic status of the blind spot road segment after the above verification and fusion processing is output as the final dynamic prediction result of the current target time slice. This result is sent to the road network status monitoring system of the traffic management center to update the panoramic road network status view. At the same time, the status of all road segments at the current moment, including measured values ​​and predicted values, will be saved by the system as the historical context or initial state when making predictions for the next time slice. The system then waits for the arrival of new data in the next minute and repeats the entire process from data acquisition to result output, thereby realizing continuous and dynamic prediction of the traffic flow status of the entire road network.

[0039] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A traffic flow prediction method integrating curvature and slope, characterized in that, Includes the following steps: S1. Acquire historical and real-time traffic data from traffic detectors in the visible area of ​​the target road network, as well as high-precision geographic information system data of the target road network. The geographic information system data includes at least the curvature and slope of the roads, and the traffic data includes at least the traffic flow and average vehicle speed. S2. Preprocess and extract features from the traffic data and geographic information system data, wherein, for the geographic information system data, the curvature features and slope features of each road segment unit are extracted; S3. Construct a geographically enhanced road network graph structure, using road segment units as nodes, and dynamically generating edge weights between nodes based on the curvature and slope features extracted in S2. The edge weights are functions of the spatial adjacency relationships between road segments and the differences in curvature and slope, thereby forming a graph representation that incorporates road alignment constraints. Step S3 includes: S31. Define an initial adjacency graph based on the spatial adjacency relationship between road segment units, and assign an initial weight to each edge, which is the reciprocal of the Euclidean distance between connected road segment units; S32. Based on the curvature and slope characteristics extracted in S2, calculate the absolute value of the average curvature difference |k| between connected road segment units. i -k j |Absolute value of the difference from the average slope|σ i -σ j |, take half of the sum of the two as the degree of geographical feature difference; S33. The geographical feature difference is applied to the initial weights through an exponential decay function, and a learnable parameter λ is introduced for dynamic adjustment to generate the final edge weights that incorporate road alignment constraints, defined as: , where w ij d represents the weight of the edge between road segment i and road segment j; ij K represents the Euclidean distance between road segment i and road segment j; i and K j σ represents the average curvature of road segment i and road segment j, respectively; i and σ j Let i and j represent the average slopes of road segments i and j, respectively. λ is used to adaptively balance the influence of spatial distance and geographical feature differences on connectivity strength, thereby constructing a geographically enhanced road network structure that can explicitly characterize terrain constraints. S4. The traffic data acquired in S1 is used as node features and input into the graph neural network model along with the constructed road network map structure. The graph neural network model models the spatiotemporal evolution of traffic flow on a geographically enhanced graph structure using graph convolution operators targeting road curvature and slope. Its graph convolution process explicitly depends on and adaptively adjusts to the curvature and slope features to capture the traffic flow propagation patterns under complex linear conditions and outputs predicted traffic conditions for blind spots. Step S4 includes: inputting traffic data as node features and the road network map structure into the graph neural network model. The graph convolution layers of the graph neural network model adopt an improved GCN structure, and its inter-layer update rule is as follows: ,in, It is an adjacency matrix. W is the degree matrix. (l) Let be the learnable weight matrix of the l-th layer. The activation function is used; and based on this, an adaptive weight adjustment mechanism based on curvature and slope is introduced to dynamically correct the edge weights. The correction formula is as follows: This allows for the explicit fusion of road alignment features during convolution to enhance the modeling ability of traffic flow propagation patterns; among which, As the initial weights, These are learnable coefficients used to adjust the influence of geographic features on the weights; S5. Based on the output traffic state prediction values, perform dynamic inference of traffic flow in blind spots.

2. The traffic flow prediction method based on curvature and slope according to claim 1, characterized in that: Step S2 includes: S21. The traffic data is timestamped and outliers are removed. Missing values ​​are imputed based on the physical conservation relationship of traffic flow parameters within the sliding time window to generate regular traffic state time series data. S22. Based on the data from the geographic information system, calculate the average curvature and average slope of each road segment unit, and use the average curvature and average slope as the static geographic feature vector of the road segment unit; S23. The regularized traffic status time series data is mapped to the corresponding road segment unit according to its spatial location, and then concatenated with the static geographic feature vector of the road segment unit to form a node feature that integrates traffic dynamics and road alignment static attributes.

3. The traffic flow prediction method based on curvature and slope according to claim 2, characterized in that: The graph neural network model is trained using a gradient descent-based optimization algorithm, and its loss function is defined as follows: ,in The mean squared error term is y, where LMSE is the mean squared error loss, used to calculate the difference between the predicted and actual values. i This reflects the actual traffic conditions, including vehicle flow and speed. The value is the model prediction, and N is the number of samples. Here, ρ(x,t) represents the physical constraint term based on the traffic flow conservation equation, ρ(x,t) represents the traffic density at location x and time t, q(ρ) represents the flow function q(ρ)=ρ⋅v(ρ), and v(ρ) represents the velocity-density relationship. For regularization terms, For the model's learnable parameters, The Frobenius norm is used to prevent overfitting. In each iteration, the data fitting error and physical consistency deviation are optimized simultaneously through gradient backpropagation, and the contribution weights of each loss term are dynamically adjusted using learnable parameters to improve the generalization ability of the graph neural network model in extreme scenarios and the physical rationality of the output results.

4. The traffic flow prediction method based on curvature and slope according to claim 1, characterized in that: The process of outputting the traffic state prediction value for the blind spot road segment in S4 includes: using a trained graph neural network model, performing multiple rounds of message passing and state updates on the nodes corresponding to the blind spot road segment in a geo-enhanced road network graph structure; in each round of updates, calculating edge weights by combining the curvature and slope features of adjacent nodes in the current iteration step, and dynamically correcting the edge weights through an adaptive weight adjustment mechanism; subsequently, based on the corrected edge weights, aggregating the traffic state features of adjacent nodes through the graph convolution operator, and updating the hidden state representation of the current blind spot road segment node; this process is iterated, so that the influence of geographical feature differences on traffic flow propagation is explicitly encoded layer by layer in the node features; finally, the feature vector of the blind spot road segment node output by the last layer of graph convolution is input into the fully connected layer at the end of the graph neural network model, and the traffic state prediction value of the road segment at the target time is directly generated by regression.

5. The traffic flow prediction method based on curvature and slope according to claim 4, characterized in that: The graph neural network model consists of multiple graph convolutional layers, the number of which is a fixed positive integer obtained during the model training phase based on loss function optimization. Specifically, during training, cross-validation is used to evaluate the model's overall performance on the validation set under different candidate layer numbers. The overall performance is determined by both prediction accuracy and computational complexity. The layer number that minimizes the loss function and does not exhibit significant overfitting is selected as the number of graph convolutional layers in the graph neural network model. During the inference phase, for the input geographic augmented road network map structure, the hidden state of each node is strictly processed by all graph convolution operators in sequence. The iteration process terminates once all nodes have completed state updates for all layers.

6. The traffic flow prediction method based on curvature and slope according to claim 1, characterized in that, S5 includes: S51. Obtain the latest real-time traffic data of the traffic detectors in the visible area within the current target time slice; concatenate the latest real-time traffic data with the static geographic feature vector of the corresponding road segment unit to generate the feature vector of the visible area road segment node at the current time, and update it to the road network map structure; S52. Input the updated road network map structure into the graph neural network model; the graph neural network model performs a complete forward calculation and outputs the traffic state prediction values ​​of all blind spot road segments at the current time; S53. The output traffic state prediction value of the blind spot road segment is weighted and fused with the verification value derived from the traffic flow conservation equation; wherein, the weighting weight is dynamically determined by the difference between the traffic state prediction value and the verification value, and the greater the difference, the higher the weight is assigned to the verification value. S54. Output the traffic status of the blind spot road segment after fusion verification in S53, as the final dynamic prediction result of the current target time slice; this final dynamic prediction result is used to update the road network status view of the traffic management system, and the status of all road segments at the current moment can be used as the initial state or historical context for the prediction of the next time slice. Repeat S51 to S54 to achieve continuous dynamic prediction of traffic flow.