Traffic flow prediction method based on floating car data and mutual information topology reconstruction

By calculating the mutual information values ​​between floating car data to construct an adjacency matrix, generating a traffic network graph, and using a graph neural network model, the problem of traffic flow prediction accuracy under non-full sample floating car data is solved, achieving higher prediction accuracy and robustness.

CN121998163APending Publication Date: 2026-05-08BEIJING EASY TIMES DIGITAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING EASY TIMES DIGITAL TECH
Filing Date
2025-12-18
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods based on graph neural networks cannot accurately capture the dynamic and nonlinear characteristics of traffic flow propagation when faced with floating car data that is not complete. Furthermore, the results of calculations based on linear correlation methods are distorted under conditions of data sparsity and missing data.

Method used

By calculating the mutual information value between any two road nodes, an adjacency matrix is ​​constructed to generate a traffic network graph. A graph neural network model is then used to predict traffic flow and dynamically update the adjacency matrix to adapt to changes in traffic flow.

Benefits of technology

It improves the accuracy of traffic flow prediction under non-full-sample floating car data conditions, captures the implicit dependencies between nodes, and enhances the accuracy of traffic network graph construction and the robustness of prediction models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998163A_ABST
    Figure CN121998163A_ABST
Patent Text Reader

Abstract

The invention provides a traffic flow prediction method based on floating car data and mutual information topology reconstruction, and the method comprises the steps: obtaining non-full-sample floating car trajectory data, and generating a traffic flow time sequence of each road node; based on the traffic flow time sequence of each road node, a mutual information value between any two road nodes is calculated, an adjacent matrix is constructed according to the mutual information values, and elements of the adjacent matrix represent a dependency relationship between the corresponding nodes; a traffic network diagram is constructed according to the adjacency matrix, the traffic network diagram comprises a node set, an edge set and the adjacency matrix, the node set represents road nodes, and the edge set represents connectivity between the nodes; taking the traffic network graph and the traffic flow time sequence as input, and training a traffic flow prediction model by using a graph neural network model; and the trained traffic flow prediction model is utilized to predict the traffic flow in the future time period and output the prediction result, so that the accuracy of traffic flow prediction is effectively improved.
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, and in particular to a traffic flow prediction method based on floating car data and mutual information topology reconstruction. Background Technology

[0002] Traffic flow prediction methods based on graph neural networks (GNNs) are currently a hot research topic. The core of these methods lies in constructing an adjacency matrix that accurately reflects the spatial dependencies between roads, which serves as the input to the GNN. In existing technologies, this adjacency matrix is ​​typically constructed based on the physical connectivity of roads, the distance between nodes, or the linear correlation of time series of traffic parameters (such as the Pearson coefficient).

[0003] However, this method has significant shortcomings when dealing with floating car data that is not a complete sample: methods based on physical connectivity and distance cannot capture the dynamic and nonlinear characteristics of traffic flow propagation; while methods based on linear correlation rely heavily on complete and continuous time series data, and their calculation results will be severely distorted under conditions of sparse and missing data in non-complete samples.

[0004] Therefore, how to accurately predict traffic flow based on floating car data that is not a complete sample has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention provides a traffic flow prediction method based on floating car data and mutual information topology reconstruction, which solves the shortcomings of existing technologies in predicting traffic flow with non-full sample floating car data.

[0006] In a first aspect, the present invention provides a traffic flow prediction method based on floating car data and mutual information topology reconstruction, comprising: Obtain non-full sample floating car trajectory data, and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node; Based on the traffic flow time series of each road node, calculate the mutual information value between any two road nodes, and construct an adjacency matrix based on the mutual information value, wherein the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes; A traffic network graph is constructed based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and the adjacency matrix, wherein the node set represents road nodes, and the edge set represents the connectivity between nodes. Using the traffic network map and the traffic flow time series as input, a graph neural network model is used to train a traffic flow prediction model; Using a trained traffic flow prediction model, the traffic flow for a future time period is predicted and the prediction results are output.

[0007] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided, wherein calculating the mutual information value between any two road nodes includes: For any two road nodes, obtain the corresponding traffic flow time series; Based on the numerical distribution of the traffic flow time series, estimate the joint probability distribution and their respective marginal probability distributions; Input the joint probability distribution and the marginal probability distribution into the mutual information calculation formula, and output the mutual information value between the two road nodes.

[0008] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided, wherein the mutual information calculation formula is as follows: ; In the formula, and Represents any two road nodes. and They represent and The corresponding traffic flow time series, Describes the joint probability distribution. and These represent their respective marginal probability distributions.

[0009] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided, wherein constructing an adjacency matrix based on the mutual information value includes: The adjacency matrix is ​​constructed using the mutual information values ​​as matrix elements.

[0010] According to the traffic flow prediction method based on floating car data and mutual information topology reconstruction provided by the present invention, after constructing the adjacency matrix, the method further includes: The adjacency matrix is ​​row normalized, and the elements of each row are processed using the SoftMax function so that the sum of the connection weights between each node and all other nodes is 1. After the row normalization process, elements in the adjacency matrix that are less than a preset threshold are set to zero to remove weak connections, resulting in a sparse adjacency matrix.

[0011] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided, wherein the adjacency matrix is ​​dynamically updated, and the update process includes: Determine the sliding time window; Whenever new non-full sample floating car trajectory data is acquired, the time window is slid. Based on the latest data within the time window, new mutual information values ​​and a new adjacency matrix are recalculated, thus completing the update of the adjacency matrix.

[0012] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided, wherein obtaining non-full-sample floating car trajectory data includes: Receive raw floating car data streams from navigation software service providers, ride-hailing platforms, or in-vehicle Telematics systems. The raw floating car data streams include at least one of vehicle ID, latitude and longitude coordinates, instantaneous speed, and timestamp. The original floating car data stream is parsed and standardized and encapsulated according to a preset data format to form structured non-full sample floating car trajectory data.

[0013] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction includes preprocessing the non-full-sample floating car trajectory data, comprising: Based on geographic bounding boxes and speed thresholds, spatial drift points and speed anomalies in the non-full sample floating car trajectory data are identified and removed to complete data cleaning. Using map matching algorithms, the cleaned, non-full-sample floating car trajectory data is matched to target nodes or road segments in the road network; The trajectory points matched to each node are aggregated at fixed time intervals to generate a traffic flow time series for each node within the corresponding time slice.

[0014] According to the present invention, a traffic flow prediction method based on floating car data and mutual information topology reconstruction is provided. The graph neural network model is a spatiotemporal graph convolutional network, and the training process includes: The historical traffic flow time series and the adjacency matrix constructed from mutual information are input into the spatiotemporal graph convolutional network in a forward propagation manner to calculate the predicted value for the future time period. The average absolute error between the predicted and actual values ​​is used as the loss function. The network weights are updated through the backpropagation algorithm until the model converges, thus obtaining the traffic flow prediction model.

[0015] Secondly, the present invention provides a traffic flow prediction system based on floating car data and mutual information topology reconstruction, comprising: The acquisition module is used to acquire non-full sample floating car trajectory data and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node. The calculation module is used to calculate the mutual information value between any two road nodes based on the traffic flow time series of each road node, and construct an adjacency matrix based on the mutual information value, wherein the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes. The construction module is used to construct a traffic network graph based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and the adjacency matrix, wherein the node set represents road nodes, and the edge set represents the connectivity between nodes. The prediction module is used to train a traffic flow prediction model using a graph neural network model, taking the traffic network map and the traffic flow time series as input; and to predict the traffic flow for future time periods using the trained traffic flow prediction model and output the prediction results.

[0016] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the traffic flow prediction method based on floating car data and mutual information topology reconstruction as described above.

[0017] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the traffic flow prediction method based on floating car data and mutual information topology reconstruction as described above.

[0018] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the traffic flow prediction method based on floating car data and mutual information topology reconstruction as described above.

[0019] The present invention provides a traffic flow prediction method based on floating car data and mutual information topology reconstruction. The method includes: acquiring non-full-sample floating car trajectory data and preprocessing the data to generate traffic flow time series for each road node; calculating the mutual information value between any two road nodes based on the traffic flow time series, and constructing an adjacency matrix based on the mutual information value, where the elements of the adjacency matrix represent the dependencies between corresponding nodes; constructing a traffic network graph based on the adjacency matrix, the graph including a node set, an edge set, and the adjacency matrix, where the node set represents road nodes and the edge set represents the connectivity between nodes; training a traffic flow prediction model using a graph neural network model with the traffic network graph and the traffic flow time series as input; and using the trained traffic flow prediction model to predict traffic flow for future time periods and outputting the prediction results. By capturing the dependencies between different nodes through mutual information values, compared with the linear correlation in existing technologies, this method can better construct a more accurate traffic network graph based on non-full-sample floating car trajectory data, thereby improving the accuracy of traffic flow prediction. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the traffic flow prediction method based on floating car data and mutual information topology reconstruction provided in this embodiment. Figure 2 This is a visual representation of the prediction results during experimental verification; Figure 3 This is a comparison chart of MAE test results for different adjacency matrices during experimental verification; Figure 4 This is a comparison chart of the RMSE test results of different adjacency matrices during experimental verification; Figure 5 This is a schematic diagram of the traffic flow prediction system based on floating car data and mutual information topology reconstruction provided in this embodiment; Figure 6 This is a schematic diagram of the structure of the electronic device provided in this embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0023] Figure 1 This is a flowchart illustrating the traffic flow prediction method based on floating car data and mutual information topology reconstruction provided in this embodiment.

[0024] like Figure 1 As shown in the embodiments of the present invention, the traffic flow prediction method based on floating car data and mutual information topology reconstruction is applicable to traffic flow prediction in various traffic scenarios such as highways and urban arterial roads. The method mainly includes the following steps: 101. Obtain non-full sample floating car trajectory data, and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node.

[0025] Specifically, raw floating car data streams are obtained from navigation software service providers, ride-hailing platforms, or in-vehicle telematics systems. Stable data transmission channels are established using mainstream data transmission protocols (such as HTTP and MQTT) to ensure real-time and continuous data transmission.

[0026] The received raw floating car data stream is parsed to extract core fields, including the vehicle's unique identifier (ID), real-time latitude and longitude coordinates, instantaneous speed, and data collection timestamp. If the field names or formats of different data sources are inconsistent, a unified field mapping rule is used for standardized encapsulation, converting the data into a common structured format (such as JSON or CSV) to form standardized non-full-sample floating car trajectory data.

[0027] Based on preset geographical bounding boxes (corresponding to the boundary range of the target traffic network) and speed thresholds (determined within a reasonable range in conjunction with the designed speed limits of road sections), the structured non-full-sample floating car trajectory data is filtered. Spatial drift points exceeding the geographical bounding boxes (such as points deviating from the road due to vehicle positioning errors) and outliers exceeding the speed thresholds (such as unreasonable data with instantaneous speeds far exceeding the road section speed limit or close to zero) are identified and removed, retaining valid data that conforms to the actual traffic conditions, thus completing data cleaning.

[0028] A map matching algorithm is used to associate the cleaned, non-full-sample floating car trajectory data with the road network in the electronic map. Based on the latitude and longitude coordinates of the trajectory points, combined with the road topology, such as road segment direction and node location, each trajectory point is accurately matched to the corresponding road node (such as intersection, road segment cross-section) or road segment, thus clarifying the specific road location corresponding to the trajectory data.

[0029] Fixed time intervals are determined based on predicted demand and traffic flow characteristics. For example, shorter intervals can be selected for short-term forecasts, while longer intervals can be selected for long-term forecasts. Time-dimensional aggregation statistics are then performed on the trajectory points matched to each road node. The number of vehicles passing through each node within each time interval is counted, forming a traffic flow time series for each road node within a continuous time slice. In other words, each node corresponds to a set of traffic flow data arranged in chronological order.

[0030] By acquiring raw floating car data streams from navigation software providers, ride-hailing platforms, or in-vehicle telematics systems, the monitoring coverage can be significantly expanded, reducing reliance on fixed detectors and achieving cost-effective real-time data acquisition. Furthermore, the acquisition of incomplete floating car trajectory data is less affected by weather conditions, providing continuous and real-time traffic status information. Combined with data cleaning and normalization preprocessing, the smooth operation of subsequent processes can be ensured.

[0031] 102. Based on the traffic flow time series of each road node, calculate the mutual information value between any two road nodes, and construct an adjacency matrix based on the mutual information value, where the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes.

[0032] Specifically, to capture the global spatial correlation of traffic networks under incomplete sample data, the mutual information method is used to calculate the adjacency matrix. As an indicator of the dependency between two variables, mutual information determines the dependency relationship between nodes by considering the amount of information shared by freely flowing traffic between two nodes. In traffic flow prediction, mutual information provides richer information than simple correlation or distance metrics, which helps to identify asymmetric dependencies in traffic networks. In addition, for the randomness and non-systematic errors in traffic flow data caused by external interference and other factors, mutual information enhances the robustness to local noise through probability distribution, and can improve the prediction accuracy of global spatial dependencies even with incomplete data.

[0033] Traffic flow time series of all road nodes are selected, and each series is length aligned. Traffic data within the same time period is extracted to ensure that the time series of any two nodes correspond one-to-one in the time dimension, avoiding calculation errors caused by inconsistent time ranges.

[0034] For any two road nodes (denoted as node i and node j), obtain their corresponding traffic flow time series. and Nonparametric estimation methods, such as the histogram method, are used to estimate the joint probability distribution of the two time series based on their numerical distributions. (Right now Pick Value and Pick The probability of the value), and their respective marginal probability distributions. ( Pick (probability of value) and ( Pick (Probability of the value).

[0035] The estimated joint probability distribution and marginal probability distribution , Substitute into the mutual information calculation formula (1): (1) In the formula, and Represents any two road nodes. and They represent and The corresponding traffic flow time series, Describes the joint probability distribution. and These represent their respective marginal probability distributions.

[0036] By traversing all values ​​of the two time series, the nodes are calculated. and nodes The mutual information value between the nodes reflects the degree of dependence between the traffic flow changes of the two nodes. Repeat the above steps to calculate the mutual information value between all pairs of road nodes.

[0037] By aligning time series data and estimating probability distributions, the accuracy of mutual information calculation is ensured. Mutual information values ​​can effectively capture the nonlinear and implicit dependencies of traffic flow between nodes. Compared with traditional linear correlation indicators (such as the Pearson coefficient), they are more suitable for the characteristics of non-full-sample floating car data, providing a core basis for constructing accurate traffic network topology maps.

[0038] After obtaining the mutual information values, a square matrix is ​​constructed as the basic adjacency matrix, with the number of road nodes as the dimension. The mutual information values ​​are then directly assigned to the corresponding elements in the adjacency matrix. That is, formula (2): (2) This ensures that each element of the adjacency matrix reflects the traffic dependence strength between the corresponding two nodes.

[0039] The SoftMax function is used to perform row normalization on the constructed adjacency matrix. For each element in the adjacency matrix, the SoftMax value is calculated such that the sum of the connection weights (i.e., the values ​​of the elements in that row) of all other nodes corresponding to each node is 1. Specifically, for the nth row of the matrix... Each element of the row Calculate the ratio of the element value to the sum of all elements in the row to obtain the normalized element value.

[0040] Based on the complexity of the transportation network and the node dependency characteristics, a reasonable range and a preset threshold were determined through experiments to filter the normalized adjacency matrix. Elements in the matrix smaller than the preset threshold were set to zero, and elements greater than or equal to the preset threshold were retained, resulting in a sparse adjacency matrix. This process removes weak dependencies between nodes and highlights key dependencies.

[0041] It is important to emphasize that the adjacency matrix is ​​dynamically updated. The process is as follows: The length of the sliding time window is determined based on the time cycle of traffic flow, such as covering morning and evening peak hours. Whenever new non-full-sample floating car trajectory data is acquired, the sliding time window is moved forward, capturing the traffic flow time series within the latest time window. Based on the updated time series, the mutual information values ​​between all pairs of nodes are recalculated, and the adjacency matrix is ​​reconstructed according to the above process, achieving real-time dynamic updates to the adjacency matrix.

[0042] The basic adjacency matrix directly reflects the dependencies between nodes; normalization unifies the weight scale, facilitating computation and feature extraction in graph neural network models; sparsification reduces the computational cost of the matrix, improving model efficiency; dynamic updates ensure that the adjacency matrix can adapt to the dynamic changes in traffic flow in a timely manner, guaranteeing the real-time nature and accuracy of topological relationships.

[0043] 103. Construct a traffic network graph based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and an adjacency matrix, where the node set represents road nodes and the edge set represents the connectivity between nodes.

[0044] Specifically, a traffic network graph is constructed using a dynamically updated adjacency matrix as the core and combined with the actual structure of the road network. ,in: Node set Each road node (such as an intersection or road segment) in the target traffic network is treated as a node in the traffic network graph, forming a node set. It includes all road nodes involved in the prediction, and each node corresponds to a set of traffic flow time series as its attribute information.

[0045] Edge set Determine the edge set based on the non-zero elements in the adjacency matrix. If the elements in the adjacency matrix Non-zero indicates that the node and nodes There is a significant traffic dependency between the two nodes. An edge is created between them in the traffic network graph, and the weight of the edge is the corresponding mutual information value.

[0046] Adjacency matrix The resulting adjacency matrix is ​​used as the adjacency matrix of the traffic network graph to quantify the dependency strength and connection relationship between nodes.

[0047] By constructing a traffic network graph, the abstract traffic network and node dependencies are visualized as graph-structured data, clearly presenting the connectivity and dependency strength between road nodes. This perfectly matches the input requirements of graph neural network models and lays the foundation for the model to extract spatiotemporal features.

[0048] 104. Using a traffic network map and traffic flow time series as input, train a traffic flow prediction model using a graph neural network model.

[0049] Specifically, a spatiotemporal graph convolutional network was chosen as the traffic flow prediction model, as this model can simultaneously capture the temporal and spatial topological features of traffic flow. The model parameters were initialized using common weight initialization methods, assigning initial values ​​to the parameters of convolutional layers, fully connected layers, and other parameters to ensure the stability of model training.

[0050] The constructed traffic network map and the traffic flow time series of each node are used as input data for the model. Through the forward propagation process, the model's convolutional layer extracts spatial features between nodes based on the adjacency matrix, and the time series processing layer extracts the temporal features of traffic flow (periodicity, trend, etc.). The spatiotemporal features are then fused for calculation, and the final output is the traffic flow prediction value for the future time period.

[0051] The mean absolute error between the predicted and actual traffic flow values ​​is used as the loss function to calculate the deviation between the predicted and actual results. A gradient descent optimization algorithm is employed, and through backpropagation, the model parameters are progressively updated based on the gradient direction of the loss function, continuously reducing the value of the loss function.

[0052] Repeat the forward propagation, loss function calculation, and backpropagation process until the training termination condition is met. The training termination condition can be set as follows: the change in the loss function value within a preset number of consecutive iterations is less than a preset threshold (indicating model convergence), or the preset maximum number of iterations is reached. At this point, training stops, and the trained traffic flow prediction model is obtained.

[0053] Spatiotemporal graph convolutional networks can effectively integrate the spatiotemporal features of traffic flow, adapting to the needs of traffic flow prediction. Reasonable parameter initialization and optimization algorithms ensure the stability and efficiency of model training. Through iterative training, the model parameters are continuously optimized, enabling the model to fully learn the changing patterns of traffic flow and improve prediction accuracy.

[0054] 105. Using the trained traffic flow prediction model, predict the traffic flow for a future time period and output the prediction results.

[0055] Specifically, historical traffic flow data prior to the time period to be predicted is obtained and preprocessed to ensure that the format and dimensions of the input data are consistent with the input data used during model training. The processed historical traffic flow time series and the latest traffic network map are then input into the trained traffic flow prediction model to initiate the model inference process. Based on the learned spatiotemporal characteristics, the model calculates the traffic flow at each road node within the preset future time period (e.g., 15 minutes, 30 minutes, 60 minutes) to obtain the prediction results.

[0056] The traffic flow prediction results obtained from model inference are organized according to a preset format and transmitted to terminal systems such as traffic management platforms and navigation software through data interfaces. They can also be displayed directly in a visual form (such as line graphs and heat maps) to provide data support for traffic scheduling decisions and travel route planning.

[0057] This embodiment utilizes floating car data (i.e., real-time location and speed information of a subset of vehicles) instead of traditional full-sample data to achieve accurate prediction of traffic flow across the entire traffic network. This method maintains high prediction accuracy even with incomplete data, improving the system's robustness and practicality. By calculating the mutual information between nodes, an adjacency matrix reflecting the road spatial topology is generated. This method not only considers the direct connections between nodes but also captures their implicit dependencies, thereby enhancing the understanding of the global spatial correlation of the traffic network. Compared to other static topology and correlation-based dynamic topology calculation methods, the prediction accuracy is significantly improved.

[0058] To verify the effectiveness of the method of the present invention, it was verified through actual data collection: Dataset The data collection area is located on a 15-kilometer-long highway in a certain province. The data collection period is from September 1, 2025 to September 21, 2025. Actual traffic flow is collected by eight radar detectors on the road, with data collection intervals of 5 minutes.

[0059] Experimental setup To further verify the ability of mutual information adjacency matrices to capture spatial correlations, three common adjacency matrix definition methods were selected for comparison: traditional binary physical adjacency (0 represents non-adjacency, 1 represents adjacency), adjacency matrix calculated based on Euclidean distance, and adjacency matrix calculated based on dynamic time warping.

[0060] In the evaluation process, two widely used metrics, namely mean absolute error (MAE) and root mean square error (RMSE), were used to evaluate the performance of different methods, and are specifically defined as follows (3) and (4): (3) (4) Indicates at time step The predicted traffic flow value (i.e. the prediction result output by the model).

[0061] Indicates at time step The actual traffic flow value (i.e., the real observed value).

[0062] Experimental results Figure 2 The dataset displays the floating traffic flow, predicted traffic, and actual traffic for each node. A clear peak-and-trough phenomenon in traffic flow can be observed: traffic begins to rise at 6 PM, reaches its first peak around 8 PM, and then begins to decline around 7 PM. Figure 2 As shown, the floating traffic flow exhibits a similar fluctuation pattern to the actual traffic flow, but the peak and trough differences are significant. The method proposed in this invention can fully learn the traffic flow patterns in the floating traffic flow data and provide good prediction results. Figure 2 The horizontal axis represents time, in minutes. A day is 1440 minutes. The graph shows minutes 0, 200, 400, 600, 800, and 1000. 6 PM is 18:00, which is... Figure 2 The 1080th minute of the game; other examples will not be given.

[0063] Figure 3 and Figure 4The results of MAE and RMSE analyses for different adjacency matrices are presented. The results show that the adjacency matrix calculated based on mutual information exhibits the best predictive performance in both short-term and long-term predictions compared to the other three adjacency matrices. Mutual information not only measures the amount of information shared between two random variables but also considers the distance / similarity and dependency strength between nodes. Compared to dynamic time warping methods that capture similarity through time series alignment matching, the mutual information method does not require pre-setting the data distribution pattern and can flexibly capture the extensive interdependencies between nodes. This characteristic makes it more effective at resisting traffic noise in floating car data, thus significantly improving the model's predictive ability.

[0064] Figure 5 This is a schematic diagram of the traffic flow prediction system based on floating car data and mutual information topology reconstruction provided in this embodiment.

[0065] like Figure 5 As shown in the figure, this embodiment provides a traffic flow prediction system based on floating car data and mutual information topology reconstruction, including: The acquisition module 501 is used to acquire non-full sample floating car trajectory data and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node. The calculation module 502 is used to calculate the mutual information value between any two road nodes based on the traffic flow time series of each road node, and construct an adjacency matrix based on the mutual information value, wherein the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes. Module 503 is used to construct a traffic network graph based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and an adjacency matrix, where the node set represents road nodes and the edge set represents the connectivity between nodes. The prediction module 504 is used to train a traffic flow prediction model using a graph neural network model, taking a traffic network map and a traffic flow time series as input; and to predict the traffic flow for future time periods using the trained traffic flow prediction model and output the prediction results.

[0066] Figure 6 This is a schematic diagram of the structure of the electronic device provided in this embodiment.

[0067] like Figure 6As shown, the electronic device may include a processor 601, a communications interface 602, a memory 603, and a communication bus 604. The processor 601, communications interface 602, and memory 603 communicate with each other via the communication bus 604. The processor 601 can call logical instructions from the memory 603 to execute a traffic flow prediction method based on floating car data and mutual information topology reconstruction.

[0068] Furthermore, the logical instructions in the aforementioned memory 603 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0069] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the traffic flow prediction method based on floating car data and mutual information topology reconstruction provided by the above methods.

[0070] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the traffic flow prediction method based on floating car data and mutual information topology reconstruction provided by the above methods.

[0071] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traffic flow prediction method based on floating car data and mutual information topology reconstruction, characterized in that, include: Obtain non-full sample floating car trajectory data, and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node; Based on the traffic flow time series of each road node, calculate the mutual information value between any two road nodes, and construct an adjacency matrix based on the mutual information value, wherein the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes; A traffic network graph is constructed based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and the adjacency matrix, wherein the node set represents road nodes, and the edge set represents the connectivity between nodes. Using the traffic network map and the traffic flow time series as input, a graph neural network model is used to train a traffic flow prediction model; Using a trained traffic flow prediction model, the traffic flow for a future time period is predicted and the prediction results are output.

2. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 1, characterized in that, The calculation of the mutual information value between any two road nodes includes: For any two road nodes, obtain the corresponding traffic flow time series; Based on the numerical distribution of the traffic flow time series, estimate the joint probability distribution and their respective marginal probability distributions; Input the joint probability distribution and the marginal probability distribution into the mutual information calculation formula, and output the mutual information value between the two road nodes.

3. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 2, characterized in that, The formula for calculating mutual information is: ; In the formula, and Represents any two road nodes. and They represent and The corresponding traffic flow time series, Describes the joint probability distribution. and These represent their respective marginal probability distributions.

4. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 3, characterized in that, The step of constructing the adjacency matrix based on the mutual information values ​​includes: The adjacency matrix is ​​constructed using the mutual information values ​​as matrix elements.

5. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 4, characterized in that, After constructing the adjacency matrix, the following is also included: The adjacency matrix is ​​row normalized, and the elements of each row are processed using the SoftMax function so that the sum of the connection weights between each node and all other nodes is 1. After the row normalization process, elements in the adjacency matrix that are less than a preset threshold are set to zero to remove weak connections, resulting in a sparse adjacency matrix.

6. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 5, characterized in that, The adjacency matrix is ​​dynamically updated, and the update process includes: Determine the sliding time window; Whenever new non-full sample floating car trajectory data is acquired, the time window is slid. Based on the latest data within the time window, new mutual information values ​​and a new adjacency matrix are recalculated, thus completing the update of the adjacency matrix.

7. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to any one of claims 1-6, characterized in that, The acquisition of non-full sample floating car trajectory data includes: Receive raw floating car data streams from navigation software service providers, ride-hailing platforms, or in-vehicle Telematics systems. The raw floating car data streams include at least one of vehicle ID, latitude and longitude coordinates, instantaneous speed, and timestamp. The original floating car data stream is parsed and standardized and encapsulated according to a preset data format to form structured non-full sample floating car trajectory data.

8. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 7, characterized in that, The preprocessing of the non-full sample floating car trajectory data includes: Based on geographic bounding boxes and speed thresholds, spatial drift points and speed anomalies in the non-full sample floating car trajectory data are identified and removed to complete data cleaning. Using map matching algorithms, the cleaned, non-full-sample floating car trajectory data is matched to target nodes or road segments in the road network; The trajectory points matched to each node are aggregated at fixed time intervals to generate a traffic flow time series for each node within the corresponding time slice.

9. The traffic flow prediction method based on floating car data and mutual information topology reconstruction according to claim 1, characterized in that, The graph neural network model is a spatiotemporal graph convolutional network, and the training process includes: The historical traffic flow time series and the adjacency matrix constructed from mutual information are input into the spatiotemporal graph convolutional network in a forward propagation manner to calculate the predicted value for the future time period. The average absolute error between the predicted and actual values ​​is used as the loss function. The network weights are updated through the backpropagation algorithm until the model converges, thus obtaining the traffic flow prediction model.

10. A traffic flow prediction system based on floating car data and mutual information topology reconstruction, characterized in that, include: The acquisition module is used to acquire non-full sample floating car trajectory data and preprocess the non-full sample floating car trajectory data to generate traffic flow time series for each road node. The calculation module is used to calculate the mutual information value between any two road nodes based on the traffic flow time series of each road node, and construct an adjacency matrix based on the mutual information value, wherein the elements of the adjacency matrix represent the dependency relationship between the corresponding nodes. The construction module is used to construct a traffic network graph based on the adjacency matrix. The traffic network graph includes a node set, an edge set, and the adjacency matrix, wherein the node set represents road nodes, and the edge set represents the connectivity between nodes. The prediction module is used to train a traffic flow prediction model using a graph neural network model, taking the traffic network map and the traffic flow time series as input; and to predict the traffic flow for future time periods using the trained traffic flow prediction model and output the prediction results.