Traffic flow prediction method
By constructing a directed weighted traffic network graph and combining it with graph convolutional networks and multilayer perceptron regression models, the temporal and spatial information of traffic flow is integrated, solving the problem that traditional methods fail to consider the spatial correlation characteristics between regions. This achieves more accurate traffic flow prediction and improves the operational efficiency and planning optimization capabilities of the traffic system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU INST OF GEOGRAPHY GUANGDONG ACAD OF SCI
- Filing Date
- 2026-03-09
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional traffic flow forecasting methods fail to fully consider the spatial correlation characteristics between regions, resulting in limited forecast accuracy in complex road networks and failing to meet the needs of intelligent traffic scheduling and road network planning optimization.
A directed weighted traffic network graph is constructed. By using graph convolutional networks and multilayer perceptron regression models, temporal and spatial information of traffic flow is integrated. By acquiring traffic flow data and spatial correlation data, future traffic flow can be predicted.
It significantly improves the accuracy of traffic flow prediction, provides more reliable data support for intelligent traffic scheduling and road network planning optimization, and enhances traffic operation efficiency and travel convenience.
Smart Images

Figure CN122050145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of urban traffic management technology, and in particular to a traffic flow prediction method. Background Technology
[0002] Traffic flow forecasting, as a core technological support for intelligent traffic scheduling and road network planning optimization, is of vital practical significance for improving traffic efficiency, alleviating road network congestion, and ensuring travel convenience. Traditional traffic flow forecasting methods mainly rely on time series analysis, linear regression, and other traditional algorithms. These methods focus only on modeling the historical flow time-series characteristics of a single road segment, completely ignoring the spatial correlation characteristics of traffic corridors between regions. However, actual road network structures are complex, with traffic flows in different regions influencing and interconnecting each other. This modeling approach, which does not consider spatial correlation, cannot adapt to the complex topology of road networks, making it difficult to accurately depict the transmission patterns of traffic flows between regions. This results in limited forecast accuracy, failing to meet the growing demands of traffic management and providing an accurate and reliable basis for intelligent traffic scheduling and road network planning optimization. Summary of the Invention
[0003] Based on this, the purpose of this application is to provide a traffic flow prediction method that fully considers the spatial correlation characteristics of traffic corridors between regions and improves the accuracy of traffic flow prediction.
[0004] The traffic flow prediction method of this application includes the following steps:
[0005] Traffic flow data and spatial correlation data of the area to be monitored are acquired; the traffic flow data includes several sub-areas of the area to be monitored and historical flow data from the start to the end of traffic channels between the sub-areas; the spatial correlation data is used to characterize the spatial topology and traffic correlation attributes between the several sub-areas. Based on the traffic flow data, a directed weighted traffic network graph of the area to be monitored is constructed; wherein, the nodes of the directed weighted traffic network graph are determined based on several sub-regions of the traffic flow data, the directed edges are determined based on the direction from the start point to the end point of the traffic channel between the sub-regions, and the weight of the directed edges is determined based on the historical flow data of the traffic channel in the corresponding direction. Obtain the node feature matrix and the directed weighted adjacency matrix of the directed weighted traffic network graph; input the node feature matrix and the directed weighted adjacency matrix into a preset graph convolutional network to obtain the node embedding matrix; based on the node embedding matrix, the historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph, construct the feature vector of each directed edge of the directed weighted traffic network graph; wherein, the spatial features of the directed edges are determined based on the spatial association data of the traffic channels in the corresponding directions; The feature vectors of each directed edge in the directed weighted traffic network graph are input into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph; based on the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph, the traffic flow prediction result of the area to be monitored is obtained.
[0006] This application embodiment constructs a directed weighted traffic network graph by acquiring traffic flow data of the area to be monitored and spatial association data that characterizes the spatial topology and traffic association attributes between sub-regions. This graph uses sub-regions as nodes, traffic channel directions as directed edges, and historical traffic flow data as edge weights, intuitively and accurately presenting the relationship between traffic flow and spatial structure in the road network. Based on this, the node feature matrix and directed weighted adjacency matrix of the graph are obtained and input into a preset graph convolutional network to obtain a node embedding matrix that integrates node information. Then, combined with the historical traffic flow data of the directed edges and the spatial features determined based on the spatial association data, a directed edge feature vector containing rich temporal and spatial information is constructed. Finally, the feature vector is input into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value for each directed edge, and further, the traffic flow prediction result for the area to be monitored is derived. The entire technical solution deeply integrates the temporal evolution and spatial transmission patterns of traffic flow, making full use of the correlation information between different areas in a complex road network. It can more accurately adapt to the topological structure of complex road networks, effectively characterize the transmission patterns of traffic flow between areas, and thus significantly improve the accuracy of traffic flow prediction. This provides more reliable and accurate data support for intelligent traffic scheduling and road network planning optimization, which helps to improve traffic operation efficiency, alleviate road network congestion, and ensure the convenience of travel.
[0007] To better understand and implement this application, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating the traffic flow prediction method according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating a scenario of the traffic flow prediction method according to an embodiment of this application. Figure 3 This is a schematic diagram of the structure of a graph convolutional network according to an embodiment of this application. Detailed Implementation
[0009] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Wherein, when the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.
[0010] It should be understood that the embodiments described below do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0011] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application are also intended to include the plural forms unless the context clearly indicates otherwise. Furthermore, in the description of this application, unless otherwise stated, “a plurality” means two or more. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items, for example, A and / or B, which can represent: A alone, A and B together, and B alone; the character “ / ” generally indicates that the preceding and following objects are in an “or” relationship.
[0012] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms, and these terms are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. Depending on the context, the word "if" as used in this application can be interpreted as "when," "when," or "in response to determination."
[0013] This application provides a traffic flow prediction method that fully considers the spatial correlation characteristics of traffic corridors between regions, thereby improving the accuracy of traffic flow prediction.
[0014] Please refer to Figure 1 as well as Figure 2 The traffic flow prediction method of this application includes the following steps: S101: Acquire traffic flow data and spatial correlation data of the area to be monitored; the traffic flow data includes several sub-areas of the area to be monitored and historical flow data from the start to the end of traffic channels between the sub-areas; the spatial correlation data is used to characterize the spatial topology and traffic correlation attributes between the several sub-areas. S102: Based on the traffic flow data, construct a directed weighted traffic network graph of the area to be monitored; wherein, the nodes of the directed weighted traffic network graph are determined based on several sub-regions of the traffic flow data, the directed edges are determined based on the direction from the start point to the end point of the traffic channel between the sub-regions, and the weight of the directed edges is determined based on the historical flow data of the traffic channel in the corresponding direction. S103: Obtain the node feature matrix and the directed weighted adjacency matrix of the directed weighted traffic network graph; input the node feature matrix and the directed weighted adjacency matrix into a preset graph convolutional network to obtain a node embedding matrix; based on the node embedding matrix, the historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph, construct the feature vector of each directed edge of the directed weighted traffic network graph; wherein, the spatial features of the directed edges are determined based on the spatial association data of the corresponding traffic channels; S104: Input the feature vectors of each directed edge in the directed weighted traffic network graph into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph; based on the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph, obtain the traffic flow prediction result of the area to be monitored.
[0015] This application embodiment constructs a directed weighted traffic network graph by acquiring traffic flow data of the area to be monitored and spatial association data that characterizes the spatial topology and traffic association attributes between sub-regions. This graph uses sub-regions as nodes, traffic channel directions as directed edges, and historical traffic flow data as edge weights, intuitively and accurately presenting the relationship between traffic flow and spatial structure in the road network. Based on this, the node feature matrix and directed weighted adjacency matrix of the graph are obtained and input into a preset graph convolutional network to obtain a node embedding matrix that integrates node information. Then, combined with the historical traffic flow data of the directed edges and the spatial features determined based on the spatial association data, a directed edge feature vector containing rich temporal and spatial information is constructed. Finally, the feature vector is input into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value for each directed edge, and further, the traffic flow prediction result for the area to be monitored is derived. The entire technical solution deeply integrates the temporal evolution and spatial transmission patterns of traffic flow, making full use of the correlation information between different areas in a complex road network. It can more accurately adapt to the topological structure of complex road networks, effectively characterize the transmission patterns of traffic flow between areas, and thus significantly improve the accuracy of traffic flow prediction. This provides more reliable and accurate data support for intelligent traffic scheduling and road network planning optimization, which helps to improve traffic operation efficiency, alleviate road network congestion, and ensure the convenience of travel.
[0016] The traffic flow prediction method of this application uses a computer as the execution subject, and the following describes each step in detail.
[0017] For step S101, traffic flow data and spatial correlation data of the area to be monitored are obtained; the traffic flow data includes several sub-areas of the area to be monitored and historical flow data from the start point to the end point of traffic channels between the sub-areas; the spatial correlation data is used to characterize the spatial topology and traffic correlation attributes between the several sub-areas.
[0018] The area to be monitored refers to the specific geographical area where traffic flow forecasting needs to be performed. This area includes multiple sub-areas and traffic corridors between the sub-areas.
[0019] A sub-region is a relatively independent small area divided from the area to be monitored, and different sub-regions are connected by transportation channels.
[0020] Traffic corridors are roads, paths, etc., that connect sub-regions and are used for the passage of traffic flows such as vehicles and pedestrians.
[0021] Historical traffic data records traffic flow information from the start to the end of a traffic corridor over a period of time, such as the number of vehicles passing through the corridor during a certain time period.
[0022] Spatial association data is used to describe the spatial topological relationships (such as the geographical distribution and adjacency relationships of the sub-regions) and traffic association attributes (such as the traffic capacity and traffic restrictions of the traffic channels between different sub-regions).
[0023] This step aims to collect foundational data for traffic flow forecasting. Traffic flow data includes historical flow information for each sub-region within the monitored area, as well as the origin-to-end points of traffic corridors between sub-regions. This data reflects the past distribution of traffic flow across different sub-regions and traffic corridors. Spatial correlation data describes the spatial topology and traffic association attributes between sub-regions, providing a basis for subsequently building models that reflect spatial relationships. For example, historical flow data can be obtained through traffic monitoring equipment, and spatial correlation data can be obtained through a Geographic Information System (GIS).
[0024] For step S102, based on the traffic flow data, a directed weighted traffic network graph of the area to be monitored is constructed; wherein, the nodes of the directed weighted traffic network graph are determined based on several sub-regions of the traffic flow data, the directed edges are determined based on the direction from the start point to the end point of the traffic channel between sub-regions, and the weight of the directed edges is determined based on the historical flow data of the traffic channel in the corresponding direction.
[0025] A directed weighted traffic network graph is a graph structure in which nodes represent sub-regions, directed edges represent the directions of traffic channels between sub-regions, and the weight of an edge represents the historical traffic flow data of the corresponding direction of the traffic channel.
[0026] This step, based on the acquired traffic flow data, identifies each sub-region as a node in a directed weighted traffic network graph. The direction from the start to the end of traffic corridors between sub-regions is defined as a directed edge, with the direction of the directed edge representing the direction of traffic flow. Historical traffic flow data for the corresponding direction of the traffic corridor serves as the weight of the directed edge; a larger weight indicates a larger historical traffic flow in that direction. The directed weighted traffic network graph constructed in this way can intuitively display the spatial distribution and flow of traffic within the monitored area.
[0027] In one embodiment, step S102, which involves constructing a directed weighted traffic network map of the area to be monitored based on the traffic flow data, includes: Step S1021: Based on several sub-regions in the traffic flow data, construct several nodes of a directed weighted traffic network graph, with each node uniquely corresponding to a sub-region.
[0028] This step is the fundamental starting point for constructing a directed weighted traffic network graph. From the acquired traffic flow data, the various sub-regions within the area to be monitored are identified, and then each sub-region is abstracted as a node in the directed weighted traffic network graph. The advantage of this approach is that it simplifies complex geographical areas into basic units within the graph, facilitating subsequent analysis and processing of spatial relationships in traffic flow. For example, if the area to be monitored contains sub-region 1, sub-region 2, and sub-region 3, then nodes 1, 2, and 3 will be constructed accordingly in the directed weighted traffic network graph, with node 1 uniquely corresponding to sub-region 1, node 2 uniquely corresponding to sub-region 2, and node 3 uniquely corresponding to sub-region 3.
[0029] Step S1022: Based on the starting point to ending point directions of the traffic channels between each of the sub-regions, construct the directed edges of the directed weighted traffic network graph.
[0030] In a directed weighted traffic network graph, a directed edge represents a line segment that indicates the direction of traffic flow between sub-regions. Its direction clearly indicates the direction of traffic flow. For example, a traffic channel from sub-region A to sub-region B corresponds to a directed edge pointing from node A to node B.
[0031] After determining the nodes of the directed weighted traffic network graph, directed edges are constructed based on the actual directions of traffic channels between sub-regions. The start and end points of traffic channels clearly define the direction of traffic flow, which is represented in the graph by directed edges pointing from the node corresponding to the start point to the node corresponding to the end point. This step accurately reflects the spatial flow path of traffic, enabling the directed weighted traffic network graph to realistically simulate the traffic flow in an actual road network. For example, if there is a traffic channel between sub-region 1 and sub-region 2 pointing from sub-region 1 to sub-region 2, then a directed edge pointing from node 1 to node 2 will be constructed in the directed weighted traffic network graph.
[0032] Step S1023: Based on the historical traffic data corresponding to each directed edge in the directed weighted traffic network graph, construct the weights corresponding to each directed edge in the directed weighted traffic network graph.
[0033] In a directed weighted traffic network graph, the weight of a directed edge is a numerical value used to quantify a certain attribute of the traffic channel in the corresponding direction. In this embodiment, the weight is determined based on the historical traffic flow data of the traffic channel in the corresponding direction. The larger the weight value, the greater the historical traffic flow in that direction.
[0034] After constructing the directed edges, they need to be weighted to quantify the intensity of traffic flow. Here, the weight values are determined based on the historical traffic data corresponding to each directed edge. Historical traffic data records the amount of traffic flowing through that traffic channel over a past period; using this data as weights can intuitively reflect the busyness of traffic flow in that direction. A larger weight value indicates a larger historical traffic flow in that direction, and vice versa. For example, if the historical traffic flow data corresponding to a directed edge is 1000 vehicles / hour, then the weight of that directed edge can be set to 1000 (the specific weight setting method can be adjusted according to actual needs and data scale). Weights constructed in this way can provide important quantitative basis for subsequent traffic flow prediction.
[0035] This embodiment abstracts sub-regions into nodes, clearly defining the basic units of traffic flow analysis; it constructs directed edges based on traffic corridor directions, accurately simulating the actual traffic flow direction; and it determines the weights of directed edges using historical traffic flow data, quantifying the intensity of traffic flow in each direction. This construction method enables the directed weighted traffic network graph to comprehensively and accurately present the spatial distribution and flow characteristics of traffic flow within the monitored area, laying a solid foundation for subsequent use of tools such as graph convolutional networks to extract node association features and fuse spatiotemporal information for traffic flow prediction.
[0036] In one embodiment, step S1023, which involves constructing the weights corresponding to each directed edge in the directed weighted traffic network graph based on the historical traffic data corresponding to each directed edge, includes: Step S10231: For the historical traffic data corresponding to each directed edge, preprocess the historical traffic data to obtain the first historical traffic data.
[0037] Preprocessing includes outlier removal and missing value imputation. Outlier removal identifies and removes extreme values that significantly deviate from the normal range in historical traffic data. For example, if traffic data suddenly surges to several times the normal value during a certain period, it may be due to equipment failure or a temporary event and needs to be excluded to avoid interfering with the prediction model. Missing value imputation is the operation of reasonably supplementing missing parts of historical traffic data. For example, if data is missing during a certain period due to sensor failure, it can be improved by interpolating data from adjacent periods or using the mean to fill in the missing data.
[0038] Step S10232: Perform log1p logarithmic transformation on the first historical traffic data to obtain second historical traffic data that eliminates data distribution skewness; use the second historical traffic data as the weight of the corresponding directed edge.
[0039] The log1p logarithmic transformation is a mathematical operation that performs a logarithmic transformation on the data. The formula is log1p(x)=ln(1+x). It can effectively compress the data scale and alleviate skewed distribution, making the data more in line with the characteristics of normal distribution, thereby improving the numerical stability and prediction effect of the subsequent model.
[0040] This embodiment constructs a more robust and stable directed edge weighting system through a combination of preprocessing and log1p logarithmic transformation. Outlier removal and missing value imputation ensure the integrity and reliability of historical traffic data, avoiding interference from noisy data on model training; the log1p logarithmic transformation optimizes the data distribution characteristics through mathematical means, making the weight values more consistent with the model input requirements. Combining the node-edge structure of the directed weighted traffic network graph, the correlation feature extraction capability of graph convolutional networks, and the nonlinear fitting characteristics of the multilayer perceptron regression model, these weight construction steps are deeply coordinated with the overall scheme, achieving efficient fusion of traffic flow temporal features and spatial correlation characteristics.
[0041] In one embodiment, step S101, which involves acquiring traffic flow data for the area to be monitored, further includes: Step S1011: Obtain socioeconomic data for each sub-region of the area to be monitored.
[0042] Socioeconomic data encompasses various metrics reflecting a region's socioeconomic development, including but not limited to population size, per capita income, industrial structure, employment status, and frequency of business activities. These data provide a macro-level picture of the region's economic vitality, population density, and potential transportation demand.
[0043] This step supplements the acquisition of traffic flow data. In addition to data directly related to traffic, socioeconomic data for each sub-region within the monitored area is collected. This data can be obtained from government statistical departments, economic research institutions, and other sources. For example, population census data and industrial output data for each sub-region can be obtained from the statistics bureau. Socioeconomic data can indirectly reflect the potential scale of traffic demand in each sub-region, as densely populated and economically active areas typically generate more traffic flow. Acquiring this data provides a foundation for subsequently constructing a more comprehensive traffic network map that reflects the characteristics of the region.
[0044] After step S102, which involves constructing a directed weighted traffic network map of the area to be monitored based on the traffic flow data, the following steps are included: Step S1024: Based on the socioeconomic data of each sub-region, construct the feature vector of the corresponding node in the directed weighted traffic network graph.
[0045] Eigenvectors are multidimensional numerical combinations used to describe various attributes of nodes (corresponding sub-regions) in a directed weighted traffic network graph. By converting the socioeconomic data of a sub-region into eigenvectors, the socioeconomic characteristics of that sub-region can be quantitatively represented, facilitating subsequent calculations and analyses in tasks such as traffic flow prediction.
[0046] This step, building upon the existing directed weighted traffic network graph (based on traffic flow data), transforms the socioeconomic data of each sub-region into feature vectors for corresponding nodes. The aim of this step is to integrate the socioeconomic characteristics of sub-regions into the traffic network graph, ensuring that nodes represent not only geographical location and traffic flow but also the socioeconomic attributes of the region. For example, for a sub-region, its socioeconomic data might include population size, number of shops, and number of factories. This data can be arranged in a specific order and normalized to form a multi-dimensional feature vector. This feature vector can serve as a crucial attribute for nodes in subsequent tasks such as traffic flow prediction, helping the model to more comprehensively understand the characteristics of each sub-region and their interrelationships, thereby improving prediction accuracy.
[0047] This embodiment achieves a more comprehensive and detailed modeling of the transportation network by acquiring socioeconomic data of sub-regions and integrating it into a directed weighted traffic network graph to construct node feature vectors. On one hand, socioeconomic data provides potential background information on traffic flow generation; for example, densely populated areas may generate more commuter traffic, while commercially active areas may generate more freight and passenger traffic. Incorporating this information into the node feature vectors allows the model to better understand the formation mechanism and influencing factors of traffic flow. On the other hand, when using tools such as graph convolutional networks for traffic flow prediction, the node feature vectors can participate in the calculation along with traffic flow-related features (such as traffic information reflected through directed edge weights), enabling the model to comprehensively consider the spatial transmission patterns, temporal evolution characteristics, and the impact of socioeconomic factors on traffic flow. This comprehensive modeling approach helps improve the accuracy of traffic flow prediction, providing more accurate and reliable data for intelligent traffic scheduling and road network planning optimization, thereby improving the operational efficiency and service quality of the transportation system.
[0048] In one embodiment, the socioeconomic data includes development indicator data across several dimensions; Step S1024, which involves constructing the feature vector of the corresponding node in the directed weighted traffic network graph based on the socioeconomic data of each sub-region, includes: Step S10241: Obtain the original data of several dimensions of development indicators corresponding to each node.
[0049] Development indicator data are specific data used to measure the level and status of development in different aspects of the socio-economic system, such as population size, GDP per capita, industrial structure proportion, employment rate, etc. These indicators reflect the socio-economic development characteristics of a sub-region from different dimensions.
[0050] Step S10242: Preprocess the original data of the development indicators of the several dimensions to obtain the corresponding first processing result data; perform Z-score standardization on the first processing result data to obtain the corresponding development indicator data.
[0051] Z-score standardization is a data standardization method that transforms raw data into a distribution with a mean of 0 and a standard deviation of 1 by subtracting the mean and then dividing by the standard deviation. This standardization can eliminate the influence of different units and orders of magnitude of indicators, making the data comparable.
[0052] Since development indicator data from different dimensions may have different dimensions and orders of magnitude, directly using the raw data may affect subsequent analysis and modeling. Therefore, the first-processed data for each dimension is standardized using Z-scores, transforming the data into a distribution with a mean of 0 and a standard deviation of 1, yielding several corresponding development indicator data. This ensures the comparability of data from different dimensions and avoids situations where certain dimensions have excessively large or small weights in subsequent calculations due to differences in dimensions.
[0053] Step S10243: Arrange the several development indicator data corresponding to each node in a preset order to obtain the node feature vector corresponding to each node.
[0054] After data standardization, the development indicator data for each node are arranged in a pre-defined order. This pre-defined order can be determined based on factors such as the impact of each development indicator on traffic flow and business logic. For example, population size might be considered to have a greater impact on traffic flow and thus be ranked first, followed by indicators such as GDP and industrial structure. The arranged data are then combined into a vector, which is the node feature vector corresponding to that node. This feature vector comprehensively reflects the socio-economic characteristics of the sub-region, providing crucial node attribute information for subsequent tasks such as traffic flow prediction.
[0055] This embodiment constructs node feature vectors through a systematic data processing workflow, endowing the directed weighted traffic network graph with rich socio-economic semantic information. From a macro perspective, it considers the socio-economic attributes between node regions to reflect their social development capabilities and reveal potential future traffic flow growth points. First, by collecting multi-dimensional development indicator data, the socio-economic characteristics of sub-regions are comprehensively characterized. Second, preprocessing ensures data integrity and reliability, avoiding the impact of data noise on subsequent analysis. Z-score standardization eliminates dimensional differences between different indicators, making the data comparable. Finally, feature vectors are constructed by arranging development indicator data in a preset order, providing structured node feature inputs for subsequent traffic flow prediction. This feature vector construction method is deeply integrated with the node-edge structure of the directed weighted traffic network graph, enabling the model to simultaneously consider the spatial transmission patterns, temporal evolution characteristics, and the impact of socio-economic factors on traffic flow.
[0056] In one embodiment, the development indicator data of the several dimensions include economic aggregate and industrial structure indicators, population and income indicators, number of various infrastructure sites, spatial and road network attribute indicators, nighttime light characteristics indicators, and additional characteristic indicators. The economic aggregate and industrial structure indicators include sub-regional GDP, per capita GDP, primary industry GDP, secondary industry GDP, tertiary industry GDP, and fiscal expenditure; the population and income indicators include resident population and per capita disposable income; the indicators for the number of various infrastructure sites include the number of hotels, tourist attractions, highway service areas, highway toll stations, industrial parks, logistics and express delivery facilities, parking lots, energy stations, railway stations, and airports; the spatial and road network attribute indicators include the proportion of built-up area, road density, and expressway density; the nighttime light characteristic indicators include the average nighttime light intensity and the median nighttime light intensity; and the additional characteristic indicators include land use type.
[0057] This embodiment comprehensively and meticulously depicts the socio-economic characteristics and spatial attributes of a sub-region by utilizing rich development indicator data covering multiple dimensions, including economy, population, infrastructure, spatial road network, nighttime lighting, and land use type. These multi-dimensional data complement and corroborate each other, providing a solid and comprehensive data foundation for constructing the node feature vectors of a directed weighted traffic network diagram. In tasks such as traffic flow prediction, the model can more accurately capture the intrinsic mechanisms and influencing factors of traffic demand in different sub-regions based on these rich node features. For example, by combining economic aggregate and industrial structure indicators, the model can understand the impact of industrial activities on freight transport and commuter traffic; population and income indicators help predict the frequency and mode of daily travel for residents; the quantity of various infrastructure sites reflects the region's ability to attract external traffic; spatial and road network attribute indicators can assess the capacity of transportation infrastructure to carry and manage traffic flow; nighttime lighting characteristics reflect the intensity of regional economic activity and potential traffic demand; and land use type indicators clarify the type and scale of traffic generated by different functional areas. By comprehensively considering these multi-dimensional socio-economic and spatial attribute information, the model can more comprehensively and accurately predict the spatiotemporal dynamic changes of traffic flow, significantly improve the accuracy and reliability of traffic flow prediction, provide more scientific and targeted decision support for intelligent traffic scheduling, road network planning optimization, etc., and effectively promote the efficient operation and sustainable development of the transportation system.
[0058] For step S103, obtain the node feature matrix and the directed weighted adjacency matrix of the directed weighted traffic network graph; input the node feature matrix and the directed weighted adjacency matrix into a preset graph convolutional network to obtain the node embedding matrix; based on the node embedding matrix, the historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph, construct the feature vector of each directed edge of the directed weighted traffic network graph; wherein, the spatial features of the directed edges are determined based on the spatial association data of the traffic channels in the corresponding directions.
[0059] A node feature matrix is a matrix used to describe the characteristics of each node in a directed weighted traffic network graph. In one embodiment, the node feature matrix has each node in the directed weighted traffic network graph as a row, and each row contains the feature vector of the corresponding node. The feature vector of a node can be constructed based on at least one of the following: node's own attribute information, sub-region related information, graph structure information, or external association information, including but not limited to sub-region identifiers, node degree, spatial attribute information, socioeconomic data, etc. The feature vectors of all nodes are integrated and arranged in node order to form a node feature matrix. In one embodiment, node features may include information that may be related to traffic flow, such as the area of the sub-region, population, and surrounding facilities.
[0060] A directed weighted adjacency matrix is used to represent the connection relationships between nodes in a directed weighted traffic network graph. The element values in the matrix represent the weights of the corresponding directed edges. In this embodiment, after constructing the directed weighted traffic network graph of the area to be monitored, a matrix structure is constructed using the nodes in the directed weighted traffic network graph as the row and column dimensions. The values of the elements at corresponding positions in the matrix are determined based on whether there are directed edges between the nodes and the weights of those directed edges: if there are directed edges in the corresponding direction between two nodes, the weight of the directed edge is used as the element at the corresponding position in the matrix; if there are no directed edges in the corresponding direction between two nodes, they are filled with 0, thus obtaining a directed weighted adjacency matrix that can characterize the connection relationships and traffic intensity between nodes.
[0061] Preset graph convolutional networks are neural network models specifically designed for processing graph-structured data. They can perform operations on node feature matrices and directed weighted adjacency matrices to extract the correlation features between nodes and output a node embedding matrix.
[0062] The node embedding matrix is a matrix obtained by operating on the node feature matrix and the directed weighted adjacency matrix through a pre-defined graph convolutional network. It contains the implicit feature representation of each node in the traffic network graph and can reflect the correlation characteristics between nodes and the node's own attributes.
[0063] Spatial features are characteristics determined based on spatial correlation data of traffic corridors in the corresponding direction. They are used to describe the spatial attributes of traffic corridors, such as the length, width, and slope of the corridor, which may affect traffic flow.
[0064] The feature vector of a directed edge is a comprehensive vector that integrates node embedding matrix information, historical traffic data of the directed edge, and spatial features, and is used to represent the characteristics of the directed edge in traffic flow prediction.
[0065] This step first obtains the node feature matrix and the directed weighted adjacency matrix of the directed weighted traffic network graph. The node feature matrix describes the feature information of each node, and the directed weighted adjacency matrix represents the connection relationships and weights between nodes. These two matrices are input into a pre-defined graph convolutional network. The graph convolutional network aggregates and transforms the node features, extracts the correlation features between nodes, and outputs a node embedding matrix. The vectors in the node embedding matrix can better represent the features and location information of nodes in the graph. Then, combining the node embedding matrix, historical traffic flow data of directed edges, and spatial features determined based on spatial correlation data, a feature vector of directed edges is constructed. This feature vector integrates the temporal information of traffic flow (historical traffic flow data) and spatial relationship information (node embedding matrix and spatial features), and can more comprehensively describe the characteristics of directed edges in traffic flow prediction.
[0066] In one embodiment, the spatial association data includes the travel distance and travel time of traffic channels between sub-regions, as well as the adjacency information between sub-regions.
[0067] Spatial correlation data is a set of data used to describe the spatial relationships between sub-regions. It reflects the connectivity of sub-regions in geospatial space and the related attributes of the connections, including travel distance and travel time, providing basic information for constructing the spatial characteristics of edges in a directed weighted traffic network diagram.
[0068] The spatial features of each directed edge in step S103 are obtained through the following steps: Step S1031: Normalize the travel distance in the spatial association data to obtain standardized spatial distance features; normalize the travel time in the spatial association data to obtain standardized spatial time features; binarize the adjacency relationship information between sub-regions in the spatial association data to obtain binarized adjacency features; wherein, if two sub-regions are adjacent, they are assigned a value of 1, and if they are not adjacent, they are assigned a value of 0.
[0069] Normalization is the process of transforming data to a specific range (usually [0,1]) according to certain rules. Normalization eliminates differences in units and orders of magnitude between different data, making the data comparable and facilitating subsequent calculations and analysis. For example, data on travel distance and travel time, which have different units, can be compared and processed on the same scale after normalization.
[0070] Binarization is the process of converting data into values with only two possible values (0 or 1). In this embodiment, it is used to process adjacency information between sub-regions, simplifying adjacency relationships into explicit binary states, making it easier for the model to identify and process whether sub-regions are adjacent or not.
[0071] The adjacency relationship between sub-regions is binary information, namely, adjacent or non-adjacent. Through binarization, adjacent sub-region pairs are assigned a value of 1, and non-adjacent sub-region pairs are assigned a value of 0. This approach is concise and clear, enabling the model to quickly identify which sub-regions are spatially directly connected, providing crucial information for subsequently constructing the spatial features of edges.
[0072] Step S1032: Based on the standardized spatial distance feature, the standardized spatial duration feature, and the binarized adjacency feature corresponding to each directed edge, obtain the spatial features corresponding to each directed edge.
[0073] After processing the three features described above, the standardized spatial distance feature, standardized spatial duration feature, and binarized adjacency feature corresponding to each directed edge are combined. In one embodiment, these three features can be arranged into a vector in a preset order, which represents the spatial feature corresponding to the directed edge. This spatial feature comprehensively reflects information such as spatial distance, travel time, and adjacency relationships between sub-regions, providing important edge attribute information for subsequent tasks such as traffic flow prediction in the directed weighted traffic network graph.
[0074] This embodiment comprehensively considers the spatial correlation data between sub-regions and employs a scientifically sound processing method to construct the spatial features of directed edges, thus endowing the directed weighted traffic network graph with rich spatial semantic information. Normalization of travel distance and travel time eliminates differences between data of different dimensions and orders of magnitude, enabling these spatial attributes to participate in subsequent calculations and analyses at the same scale, and more accurately reflecting the potential impact of the spatial characteristics of traffic channels between sub-regions on traffic flow. Binarization of the adjacency relationship information between sub-regions concisely and clearly expresses the spatial connectivity status of sub-regions, helping the model quickly identify traffic transmission relationships between adjacent sub-regions. The directed edge spatial features obtained by combining these three features, along with the previously constructed node feature vectors, enable the directed weighted traffic network graph to more comprehensively and accurately characterize the spatiotemporal dynamics of the traffic system.
[0075] In one embodiment, step S103, which involves constructing the feature vectors of each directed edge of the directed weighted traffic network graph based on the node embedding matrix, historical traffic data, and spatial features of each directed edge, includes: Step S1033: Extract the source node embedding vector and target node embedding vector of each directed edge from the node embedding matrix.
[0076] In a directed weighted traffic network graph, the starting point of a directed edge is the source node, and the ending point is the target node. Together, they define the direction of traffic flow and the associated node pairs.
[0077] This step extracts the source node embedding vector and target node embedding vector for each directed edge from the node embedding matrix. The embedding vectors of the source node and target node respectively contain the implicit feature information of the starting region and the ending region. By extracting these two vectors, the transmission characteristics of traffic flow between nodes and the node association patterns can be captured.
[0078] Step S1034: Based on the historical traffic data and spatial features of each directed edge, preprocessed historical traffic data and standardized spatial features are obtained respectively.
[0079] Historical traffic data for directed edges is preprocessed, including outlier removal, missing value imputation, and log1p logarithmic transformation, resulting in preprocessed historical traffic data. This processing ensures the stability and reliability of the traffic data. Standardized spatial distance and standardized spatial duration features are Z-score standardized and then concatenated with binarized adjacent features to obtain standardized spatial features. This process eliminates dimensional differences in spatial features and strengthens the explicit expression of adjacent relationships.
[0080] Step S1035: Concatenate the source node embedding vector, target node embedding vector, preprocessed historical traffic data, and standardized spatial features corresponding to each directed edge to obtain the feature vector of each directed edge.
[0081] The source node embedding vector, target node embedding vector, preprocessed historical traffic data, and standardized spatial features are fused and concatenated according to preset rules (such as concatenation in feature dimension order) to form a comprehensive feature vector for each directed edge. This vector integrates node association features, historical traffic evolution patterns, and spatial transmission characteristics, providing multidimensional and comprehensive input information for the subsequent multilayer perceptron regression model.
[0082] This embodiment constructs a highly integrated and semantically rich directed edge feature vector by extracting node embedding vectors, refining the preprocessing of historical traffic data, and standardizing and fusing spatial features. The introduction of the node embedding matrix enables the model to capture the implicit association patterns and network structure characteristics between sub-regions; outlier removal, missing value imputation, and log1p logarithmic transformation of historical traffic data ensure the authenticity and numerical stability of traffic information; Z-score standardization of spatial features and binarized adjacent feature concatenation enhance the comprehensive impact of spatial distance, travel time, and adjacency relationships on traffic flow. These processed feature vectors are concatenated according to preset rules to form a comprehensive feature representation that combines node correlation, temporal evolution, and spatial transmission.
[0083] In one embodiment, the graph convolutional network includes a first-layer graph convolutional network and a second-layer graph convolutional network; The first layer graph convolutional network is used to perform neighborhood feature aggregation on the node feature matrix of the directed weighted traffic network graph based on the topological relationship of the directed weighted adjacency matrix to obtain a local node feature matrix. The second layer of the graph convolutional network is used to integrate the local node feature matrices into global features to obtain a node embedding matrix.
[0084] Neighborhood feature aggregation refers to the process in a graph convolutional network where nodes update their own features by aggregating the feature information of their directly connected neighbors. In a directed weighted traffic network graph, the neighborhood range is determined by the topological relationship defined by the directed weighted adjacency matrix, and the weight values affect the aggregation strength.
[0085] Global feature integration builds upon local neighborhood aggregation by further integrating indirect influence information from non-directly connected nodes through a higher-level network structure, forming a node feature representation that incorporates the global topology.
[0086] In this embodiment, the first-layer graph convolutional network performs neighborhood feature aggregation on the node feature matrix based on the topological relationship of the directed weighted adjacency matrix. Specifically, each node integrates the feature information of all its direct neighbor nodes (nodes connected by directed edges from the source node to the node or from the node to the target node), and performs a weighted summation based on the weight values in the adjacency matrix. The local node feature matrix generated by this process retains the original node attributes while incorporating the transmission characteristics of traffic flow within the local neighborhood, such as the flow transmission patterns between adjacent sub-regions.
[0087] The second-layer graph convolutional network performs global feature integration based on the local node feature matrix. By further aggregating the indirect influence information of indirect neighbor nodes, it breaks through the limitations of local neighborhoods and forms a node embedding matrix that contains the global topology. This hierarchical design enables the node feature representation to include both the fine features of the local neighborhood and the structural characteristics of the global network, such as the global distribution pattern of traffic flow in the entire area to be monitored.
[0088] In summary, this embodiment achieves deep optimization of traffic network feature extraction through a layered graph convolutional network structure. The neighborhood feature aggregation of the first-layer graph convolutional network accurately captures the local correlation characteristics between nodes in the directed weighted traffic network graph. Combined with the weight information of the adjacency matrix, it effectively reflects the flow transmission patterns of direct traffic channels between sub-regions. The global feature integration of the second-layer graph convolutional network further integrates the indirect influence between indirectly connected nodes, enabling the node embedding matrix to comprehensively characterize the global distribution characteristics of traffic flow and network structure of the entire monitored area. This layered processing mechanism, deeply synergistic with the node-edge structure of the directed weighted traffic network graph, allows the model to simultaneously capture both the local transmission patterns and the global distribution patterns of traffic flow.
[0089] Please refer to Figure 3 In one specific embodiment, the graph convolutional network includes a first-layer graph convolutional network and a second-layer graph convolutional network.
[0090] The first layer graph convolutional network is used to construct a direction-normalized propagation matrix based on the directed weighted adjacency matrix. By normalizing the in-degree and out-degree of nodes, it realizes the directional perception aggregation of neighborhood features, thereby simultaneously characterizing traffic inflow and outflow characteristics and preserving node self-loop information to obtain a local node feature matrix.
[0091] The second layer graph convolutional network is used to perform high-order neighborhood information propagation and feature integration based on the local node feature matrix, so that the node representation simultaneously contains local interaction features and global topological structure information, resulting in a node embedding matrix.
[0092] To predict future traffic flow, it is first necessary to obtain the nodal socioeconomic attribute data for future years. Since this type of data is not available at the time of prediction, this study introduces an independent XGBoost regression model to perform time series modeling of historical socioeconomic indicators, thereby predicting the socioeconomic attribute values for future years.
[0093] Subsequently, the predicted future node attributes are used to construct a node feature matrix for future years, which is then input into the trained graph convolutional network model. Based on the future node attributes and the existing traffic network structure, the graph convolutional network constructs directed edge feature vectors containing rich temporal and spatial information. Finally, the feature vectors are input into a multilayer perceptron regression model, which outputs the predicted traffic flow values for each directed edge in the future, thereby achieving the evolution prediction of the directed weighted traffic network structure.
[0094] For step S104, the feature vectors of each directed edge in the directed weighted traffic network graph are input into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph; based on the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph, the traffic flow prediction result of the area to be monitored is obtained.
[0095] The multilayer perceptron regression model is a multilayer neural network model that establishes a mapping mechanism from node embedding representations to directed edge traffic flow prediction. It is used to perform regression analysis on the input feature vector and output the predicted value of future traffic flow.
[0096] This step inputs the constructed directed edge feature vectors into a pre-defined multilayer perceptron regression model. The multilayer perceptron regression model performs nonlinear transformations and regression analysis on the input feature vectors, outputting the predicted future traffic flow value for each directed edge. Finally, based on the predicted future traffic flow values for each directed edge, the traffic flow prediction results for the monitored area are summarized.
[0097] In one embodiment, the preset multilayer perceptron regression model includes an input layer, multiple hidden layers, and an output layer; The input layer is used to receive the feature vector of each directed edge; The multi-layer hidden layer is used to perform nonlinear transformations on the feature vectors of each directed edge in sequence to obtain the high-dimensional features of each directed edge. The output layer is used to perform linear regression on the high-dimensional features of each directed edge to obtain the predicted future traffic flow value for each directed edge.
[0098] Among them, the multilayer perceptron regression model is a feedforward neural network model based on artificial neural networks. It extracts and transforms features from input data through multilayer nonlinear transformations and finally uses linear regression to output prediction results. It is suitable for handling complex nonlinear regression problems.
[0099] The input layer serves as the interface for the model to interact with external data, and is responsible for receiving the feature vectors of each directed edge. These feature vectors integrate multi-dimensional information such as node association features, historical flow evolution patterns, and spatial transmission characteristics, providing a comprehensive input foundation for feature extraction in subsequent hidden layers.
[0100] Multiple hidden layers sequentially perform nonlinear transformations on the input feature vectors. Each hidden layer uses an activation function to nonlinearly map the input data, progressively extracting higher-order features from the data. In one embodiment, the multiple hidden layers include three layers. The first hidden layer primarily captures local patterns and simple correlations in the feature vectors; the second hidden layer further integrates this local information to discover more complex feature combinations; the third hidden layer deeply fuses the features from the first two layers to form high-dimensional features capable of characterizing the complex dynamics of traffic flow. This hierarchical nonlinear transformation mechanism enables the model to learn multi-level, nonlinear relationships in the data, enhancing its adaptability to traffic flow prediction tasks.
[0101] The output layer performs linear regression on the high-dimensional features processed by multiple hidden layers. Through a linear combination of the weight matrix and bias vector, the high-dimensional features are mapped to the prediction value space, yielding the predicted future traffic flow value for each directed edge. Linear regression is concise and efficient, directly outputting continuous traffic flow prediction results, meeting the practical needs of traffic flow forecasting.
[0102] In this embodiment, the multilayer perceptron regression model's input layer comprehensively receives and integrates feature vectors containing multidimensional information, providing a rich data foundation for the model. Multiple hidden layers, through hierarchical nonlinear transformations, progressively extract high-order features from the data, effectively capturing the complex nonlinear relationships in the spatiotemporal dynamics of traffic flow, enhancing the model's expressive and generalization capabilities. The output layer, through linear regression operations, converts high-dimensional features into specific traffic flow prediction values, ensuring the continuity and accuracy of the prediction results. Combined with the deep feature extraction of nodes using graph convolutional networks and the scientific construction of directed edge feature vectors described earlier, the entire scheme forms a complete closed loop from data preprocessing and feature extraction to traffic flow prediction, achieving deep fusion and precise characterization of spatiotemporal features in traffic flow prediction.
[0103] In one embodiment, the graph convolutional network and the multilayer perceptron regression model are trained through the following steps: Step S201: Obtain a joint training dataset. The input data of the joint training dataset consists of the node feature matrix, the directed weighted adjacency matrix, and the historical traffic flow data and spatial features of each directed edge of the directed weighted traffic network graph of the sample region. The supervision label of the joint training dataset is the actual traffic flow value of the corresponding edge. Step S202: Input the node feature matrix and the directed weighted adjacency matrix into the graph convolutional network to obtain the output node embedding matrix; Based on the node embedding matrix, the historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph, construct the feature vector of each directed edge of the directed weighted traffic network graph. Step S203: Input the feature vectors of each directed edge into the multilayer perceptron regression model to obtain the predicted traffic flow value corresponding to each directed edge. Step S204: Calculate the predicted traffic flow value and the global loss value of the corresponding supervision label for each directed edge, and determine whether the global loss value is less than a preset threshold; if not, backpropagate based on the global loss value, synchronously adjust the parameters of the graph convolutional network and the multilayer perceptron regression model, and re-execute the step of inputting the node feature matrix and the directed weighted adjacency matrix into the graph convolutional network and calculating the global loss value until the global loss value is less than the preset threshold, and determine that the training of the graph convolutional network and the multilayer perceptron regression model is complete.
[0104] This embodiment achieves deep collaborative optimization of graph convolutional networks and multilayer perceptron regression models through the construction of a joint training dataset and an end-to-end model training process. The multi-dimensional feature input of the joint training dataset enables the model to comprehensively capture the spatiotemporal dynamics of the traffic network, including node association patterns, historical traffic flow evolution patterns, and spatial transmission characteristics. The graph convolutional network generates a high-quality node embedding matrix through neighborhood aggregation and global integration, providing rich node association information for directed edge feature vectors; the multilayer perceptron regression model maps the comprehensive feature vectors to accurate traffic flow prediction values through hierarchical nonlinear transformation and linear regression. Synchronous parameter adjustment under the backpropagation mechanism ensures consistent optimization of model parameters, enabling the graph convolutional network and regression model to jointly adapt to the needs of traffic flow prediction tasks. This joint training scheme, through deep fusion of spatiotemporal features and accurate modeling of nonlinear relationships, significantly improves the accuracy and robustness of traffic flow prediction, providing scientific and reliable decision support for applications such as intelligent traffic scheduling and road network planning optimization, effectively promoting the improvement of traffic system operating efficiency and alleviating congestion problems.
[0105] In one embodiment, step S104, which involves obtaining the traffic flow prediction result for the area to be monitored based on the future traffic flow prediction value of each directed edge in the directed weighted traffic network graph, includes: Step S1041: Assign the predicted future traffic flow value corresponding to each directed edge in the directed weighted traffic network graph to the corresponding directed edge in the directed weighted traffic network graph of the area to be monitored.
[0106] The predicted future traffic flow value for each directed edge in the already calculated directed weighted traffic network graph is precisely assigned to the corresponding directed edge in the directed weighted traffic network graph of the area to be monitored. For example, if the predicted traffic flow value for a directed edge from point A to point B at a certain future time is 100 vehicles / hour, then this predicted value of 100 vehicles / hour is assigned to this directed edge in the area to be monitored. Through this operation, each directed edge in the directed weighted traffic network graph of the area to be monitored possesses future traffic flow prediction information, providing a data foundation for the subsequent generation of traffic flow prediction results.
[0107] Step S1042: Based on the assigned directed weighted traffic network diagram of the area to be monitored, obtain the traffic flow prediction result of the area to be monitored.
[0108] Traffic flow prediction results for the monitored area are obtained based on a directed weighted traffic network map that has been assigned future traffic flow forecasts.
[0109] This embodiment accurately assigns the predicted future traffic flow value corresponding to each directed edge in the directed weighted traffic network graph to the corresponding directed edge in the monitored area, thus providing the monitored area's traffic network graph with detailed and holistic analysis-based future traffic flow information. Based on this, the traffic flow prediction result for the monitored area is obtained from the assigned graph. This scheme fully utilizes the directional and flow weight information of traffic segments reflected in the directed weighted traffic network graph, combined with the predicted future traffic flow value, to more comprehensively and accurately consider the mutual influence and correlation between each segment. Compared to simply predicting the flow of a single segment and then simply summarizing it, this scheme can better capture the overall dynamic changes of the traffic network, effectively improve the accuracy and reliability of traffic flow prediction in the monitored area, and provide more valuable reference for traffic management, planning, and travel guidance. It helps to identify potential traffic congestion points in advance, optimize traffic resource allocation, and improve the overall traffic operation efficiency of the monitored area.
[0110] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A traffic flow prediction method, characterized in that, Includes the following steps: Traffic flow data and spatial correlation data of the area to be monitored are acquired; the traffic flow data includes several sub-areas of the area to be monitored and historical flow data from the start to the end of traffic channels between the sub-areas; the spatial correlation data is used to characterize the spatial topology and traffic correlation attributes between the several sub-areas. Based on the traffic flow data, a directed weighted traffic network graph of the area to be monitored is constructed; wherein, the nodes of the directed weighted traffic network graph are determined based on several sub-regions of the traffic flow data, the directed edges are determined based on the direction from the start point to the end point of the traffic channel between the sub-regions, and the weight of the directed edges is determined based on the historical flow data of the traffic channel in the corresponding direction. Obtain the node feature matrix and the directed weighted adjacency matrix of the directed weighted traffic network graph; input the node feature matrix and the directed weighted adjacency matrix into a preset graph convolutional network to obtain the node embedding matrix; based on the node embedding matrix, the historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph, construct the feature vector of each directed edge of the directed weighted traffic network graph; wherein, the spatial features of the directed edges are determined based on the spatial association data of the traffic channels in the corresponding directions; The feature vectors of each directed edge in the directed weighted traffic network graph are input into a preset multilayer perceptron regression model to obtain the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph; based on the predicted future traffic flow value of each directed edge in the directed weighted traffic network graph, the traffic flow prediction result of the area to be monitored is obtained.
2. The traffic flow prediction method according to claim 1, characterized in that, The step of constructing a directed weighted traffic network map of the area to be monitored based on the traffic flow data includes: Based on several sub-regions in the traffic flow data, a directed weighted traffic network graph is constructed with several nodes, each node uniquely corresponding to a sub-region. Based on the starting-to-ending directions of the traffic channels between each of the sub-regions, the directed edges of the directed weighted traffic network graph are constructed. Based on the historical traffic data corresponding to each directed edge in the directed weighted traffic network graph, the weights corresponding to each directed edge in the directed weighted traffic network graph are constructed.
3. The traffic flow prediction method according to claim 2, characterized in that, The step of constructing the weights corresponding to each directed edge in the directed weighted traffic network graph based on the historical traffic data corresponding to each directed edge includes: For each directed edge, the historical traffic data is preprocessed to obtain the first historical traffic data; The first historical traffic data is subjected to a log1p logarithmic transformation to obtain the second historical traffic data that eliminates the data distribution skewness; the second historical traffic data is used as the weight of the corresponding directed edge.
4. The traffic flow prediction method according to claim 1, characterized in that, The spatial association data includes the travel distance and travel time of traffic channels between sub-regions, as well as the adjacency information between sub-regions; The spatial characteristics of each of the directed edges are obtained through the following steps: The travel distances in the spatial association data are normalized to obtain standardized spatial distance features; The travel duration in the spatial association data is normalized to obtain standardized spatial duration features; The adjacency relationship information between sub-regions in the spatial association data is binarized to obtain binarized adjacency features; wherein, if two sub-regions are adjacent, they are assigned a value of 1, and if they are not adjacent, they are assigned a value of 0. Based on the standardized spatial distance feature, the standardized spatial duration feature, and the binarized adjacency feature corresponding to each directed edge, the spatial features corresponding to each directed edge are obtained.
5. The traffic flow prediction method according to claim 4, characterized in that, The step of constructing the feature vector of each directed edge of the directed weighted traffic network graph based on the node embedding matrix, historical traffic data and spatial features of each directed edge of the directed weighted traffic network graph includes: Extract the source node embedding vector and target node embedding vector for each directed edge from the node embedding matrix; Based on the historical traffic data and spatial features of each directed edge, preprocessed historical traffic data and standardized spatial features are obtained respectively. The source node embedding vector, target node embedding vector, preprocessed historical traffic data, and standardized spatial features corresponding to each directed edge are concatenated to obtain the feature vector of each directed edge.
6. The traffic flow prediction method according to claim 1, characterized in that, The step of acquiring traffic flow data for the area to be monitored further includes: Acquire socioeconomic data for each sub-region of the area to be monitored; After the step of constructing a directed weighted traffic network map of the area to be monitored based on the traffic flow data, the following steps are included: Based on the socioeconomic data of each sub-region, feature vectors of corresponding nodes in the directed weighted traffic network graph are constructed.
7. The traffic flow prediction method according to claim 6, characterized in that, The socioeconomic data includes development indicator data in several dimensions; The step of constructing the feature vector of the corresponding node in the directed weighted traffic network graph based on the socioeconomic data of each sub-region includes: Obtain the raw data of several dimensions of development indicators corresponding to each node; The raw data of the development indicators of the aforementioned dimensions are preprocessed to obtain several corresponding first processing result data; the several first processing result data are then subjected to Z-score standardization to obtain several corresponding development indicator data. For each node, several development indicator data are arranged in a preset order to obtain the node feature vector corresponding to each node.
8. The traffic flow prediction method according to claim 1, characterized in that, The graph convolutional network includes a first-layer graph convolutional network and a second-layer graph convolutional network; The first layer graph convolutional network is used to perform neighborhood feature aggregation on the node feature matrix of the directed weighted traffic network graph based on the topological relationship of the directed weighted adjacency matrix to obtain a local node feature matrix. The second layer of the graph convolutional network is used to integrate the local node feature matrices into global features to obtain a node embedding matrix.
9. The traffic flow prediction method according to claim 1, characterized in that, The preset multilayer perceptron regression model includes an input layer, multiple hidden layers, and an output layer; The input layer is used to receive the feature vector of each directed edge; The multi-layer hidden layer is used to perform nonlinear transformations on the feature vectors of each directed edge in sequence to obtain the high-dimensional features of each directed edge. The output layer is used to perform linear regression on the high-dimensional features of each directed edge to obtain the predicted future traffic flow value for each directed edge.
10. The traffic flow prediction method according to claim 1, characterized in that, The graph convolutional network and multilayer perceptron regression model are trained through the following steps: Obtain a joint training dataset. The input data of the joint training dataset consists of the node feature matrix, the directed weighted adjacency matrix, and the historical traffic flow data and spatial features of each directed edge of the directed weighted traffic network graph of the sample region. The supervision label of the joint training dataset is the actual traffic flow value of the corresponding edge. The node feature matrix and the directed weighted adjacency matrix are input into the graph convolutional network to obtain the output node embedding matrix; Based on the node embedding matrix, the historical traffic data and spatial characteristics of each directed edge of the directed weighted traffic network graph, the feature vector of each directed edge of the directed weighted traffic network graph is constructed. The feature vectors of each directed edge are input into the multilayer perceptron regression model to obtain the predicted traffic flow values corresponding to each directed edge. Calculate the predicted traffic flow value and the global loss value of the corresponding supervision label for each directed edge, and determine whether the global loss value is less than a preset threshold. If not, backpropagate based on the global loss value, synchronously adjust the parameters of the graph convolutional network and the multilayer perceptron regression model, and re-execute the steps of inputting the node feature matrix and the directed weighted adjacency matrix into the graph convolutional network and calculating the global loss value until the global loss value is less than the preset threshold, and determine that the training of the graph convolutional network and the multilayer perceptron regression model is complete.