Freight flow prediction method and device based on spatiotemporal evolution of topological network
By constructing a three-dimensional traffic flow information matrix and correcting the traffic flow feature vector, combined with the LSTM model, the problem of low accuracy of the existing freight traffic prediction model is solved, and a more accurate freight flow prediction is achieved.
Patent Information
- Application Number
- CN202510085314.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-01-20
AI Technical Summary
Existing freight traffic forecasting models have low prediction accuracy due to data complexity and insufficient macro perspective. They lack a grasp of freight characteristics and make it difficult to achieve accurate regional freight channel flow forecasts.
Based on the spatiotemporal evolution of topological networks, a three-dimensional traffic flow information matrix is constructed. The time series model and the self-matching-shared matching mechanism are used to correct the traffic feature vector. The LSTM model is then used for prediction to improve the prediction accuracy.
By considering the time series and topological structure relationships, the accuracy and reliability of freight flow forecasting are improved, a more fine-grained flow forecast is achieved, and edge missing in the overall forecast is avoided.
Smart Images

Figure CN120013380B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of traffic forecasting, and in particular to a method and apparatus for freight flow forecasting based on spatiotemporal evolution of a topological network. Background Art
[0002] To achieve real-time monitoring and management of regional freight corridors, not only must the hardware of the entire region's monitoring and detection systems be integrated, but also unified dispatching of regional freight corridor traffic information is required. Implementing this freight corridor traffic information dispatching function requires the support of dynamic forecast data on regional freight corridor traffic flows, enabling freight corridor monitoring, emergency event detection, and prediction and analysis of road network operation status. Therefore, one of the key issues in implementing freight corridor traffic dispatching and command functions is accurate regional freight corridor traffic forecasting.
[0003] Currently, relatively little research has focused on traffic flows along regional transport corridors dominated by freight traffic. Traditional freight traffic forecasting models are limited by the complexity of research data and freight activities, resulting in low accuracy. Domestic freight forecasting models often take a more macro perspective, leveraging economic and social factors to infer regional freight demand. Furthermore, freight corridor planning often relies on traditional survey data, which is small in size, complex to obtain, and low in accuracy, lacking a grasp of freight characteristics. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a freight flow prediction method and device based on the spatiotemporal evolution of topological networks, which can simultaneously take into account the time series relationship and topological structure relationship of freight flow, effectively capture the changing trends of freight flow in time and space, and improve the accuracy and reliability of freight flow prediction.
[0005] In a first aspect, an embodiment of the present application provides a freight flow prediction method based on the spatiotemporal evolution of a topological network, comprising:
[0006] A topological network is constructed based on road information of a traffic segment to be predicted, and an original traffic flow feature vector corresponding to each segment in the topological network is determined based on historical traffic flow data corresponding to the traffic segment to be predicted; the original traffic flow feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; the three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which the segment belongs;
[0007] Based on the influence relationship between the road sections in the topological network, the original traffic characteristic vector is corrected by the influence intensity characteristic to obtain a corrected traffic characteristic vector;
[0008] Using a time series model to perform feature prediction on the corrected traffic flow feature vector to obtain a predicted traffic state representation vector;
[0009] Based on the predicted traffic state representation vector, predicted traffic flow information corresponding to the traffic section to be predicted is determined.
[0010] In some embodiments, determining the original traffic feature vector corresponding to each road section in the topological network based on the historical traffic data corresponding to the traffic road section to be predicted includes:
[0011] Constructing a traffic matrix based on the historical traffic data corresponding to the traffic section to be predicted;
[0012] Determining a periodic flow curve corresponding to the historical flow data according to the flow matrix;
[0013] constructing the three-dimensional traffic flow information matrix based on the periodic traffic flow curve and the historical traffic flow data;
[0014] Based on the three-dimensional traffic flow information matrix, an original traffic flow feature vector corresponding to each road section in the topological network is determined.
[0015] In some embodiments, further comprising:
[0016] A three-dimensional traffic flow information matrix is constructed based on the periodic traffic curve and the disturbance residual of the historical traffic data.
[0017] In some embodiments, the modifying the original traffic feature vector based on the influence relationship between the road sections in the topological network to obtain the modified traffic feature vector includes:
[0018] Based on the self-matching-shared matching mechanism, the influence intensity coefficient between the first-order adjacent road segments in the topological network is calculated;
[0019] Based on the impact intensity coefficient, the original flow characteristic vector is corrected for its impact intensity characteristics to obtain a corrected flow characteristic vector.
[0020] In some embodiments, performing impact intensity feature correction on the original flow characteristic vector based on the impact intensity coefficient to obtain a corrected flow characteristic vector includes:
[0021] Normalizing the impact intensity coefficient;
[0022] Using the normalized impact intensity coefficients of K dimensions, the impact intensity characteristics of the original traffic feature vector are corrected respectively;
[0023] The corrected average value of the K dimensions is used as the corrected traffic feature vector.
[0024] In some embodiments, the method of using a time series model to perform feature prediction on the corrected traffic feature vector to obtain a predicted traffic state representation vector includes:
[0025] The modified traffic flow feature vector is input into the time series model for feature prediction to obtain a predicted traffic state representation vector.
[0026] In some embodiments, determining the predicted traffic flow information corresponding to the traffic section to be predicted based on the predicted traffic state representation vector includes:
[0027] Decoding the predicted traffic state representation vector based on the regression relationship between the predicted characteristic parameters and the predicted traffic state to obtain a predicted output value corresponding to the traffic section to be predicted;
[0028] Based on the periodic traffic flow curve and the predicted output value, the predicted traffic flow information corresponding to the traffic section to be predicted is determined.
[0029] In a second aspect, an embodiment of the present application provides a freight flow prediction device based on the spatiotemporal evolution of a topological network, comprising:
[0030] A first determination module is configured to construct a topological network based on road information of a traffic section to be predicted, and determine an original traffic flow characteristic vector corresponding to each section in the topological network based on historical traffic flow data corresponding to the traffic section to be predicted; the original traffic flow characteristic vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; the three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which the section belongs;
[0031] a correction module, configured to correct the original traffic characteristic vector for an influence intensity characteristic based on the influence relationship between the road sections in the topological network, to obtain a corrected traffic characteristic vector;
[0032] A prediction module, configured to perform feature prediction on the corrected traffic flow feature vector using a time series model to obtain a predicted traffic state representation vector;
[0033] The second determining module is used to determine the predicted traffic flow corresponding to the traffic section to be predicted based on the predicted traffic state representation vector.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the embodiment of the present application when executing the program.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method described in the embodiment of the present application.
[0036] The freight flow prediction method based on the spatiotemporal evolution of the topological network proposed in the embodiment of the present application uses a three-dimensional traffic flow information matrix that expresses more traffic flow differences to construct the original flow feature vector, and converts the traffic flow into flow difference information with finer time granularity, thereby realizing the prediction of the intensity of flow difference changes, improving the attention to differential flow, and avoiding the edge loss caused by the overall flow prediction, thereby improving the accuracy of finer-grained flow prediction.
[0037] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0039] Figure 1 A flow chart of a method for predicting freight flow based on spatiotemporal evolution of a topological network provided by an embodiment of the present application is shown;
[0040] Figure 2 A flow chart of a method for predicting freight flow based on spatiotemporal evolution of a topological network provided by another embodiment of the present application is shown;
[0041] Figure 3 A flow chart of a freight flow prediction method based on spatiotemporal evolution of a topological network provided by another embodiment of the present application is shown;
[0042] Figure 4 A flow chart of a method for predicting freight flow based on spatiotemporal evolution of a topological network provided in yet another embodiment of the present application is shown;
[0043] Figure 5 A schematic diagram of the structure of a freight flow prediction device based on spatiotemporal evolution of a topological network provided by an embodiment of the present application is shown;
[0044] Figure 6 A schematic diagram of the structure of a computer system of an electronic device or server suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION
[0045] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.
[0046] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0047] In order to further illustrate the technical solutions provided by the embodiments of the present application, this is described in detail below with reference to the accompanying drawings and specific embodiments. Although the embodiments of the present application provide the method operation instruction steps shown in the following embodiments or drawings, more or fewer operation instruction steps may be included in the method based on conventional or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method may be executed in the order of the methods shown in the embodiments or drawings or in parallel during the actual processing process or when the device is executed.
[0048] Please refer to Figure 1 , Figure 1 FIG. 1 shows a flow chart of a freight flow prediction method based on spatiotemporal evolution of a topological network provided by an embodiment of the present application. Figure 1 As shown, the method includes:
[0049] Step 100: construct a topological network based on the road information of the traffic section to be predicted, and determine the original traffic feature vector corresponding to each section in the topological network according to the historical traffic data corresponding to the traffic section to be predicted.
[0050] That is to say, in the embodiment of the present application, the road network to which the traffic section to be predicted belongs is constructed as a topological network. Specifically, the road section is abstracted as a node in the topological network, and the topological network corresponding to the road network is obtained as G = (V, B), where V is a vertex set, V = {v1, v2, ..., v N}, v i represents the i-th road section, N represents the number of roads, and B represents the adjacency matrix in the road network, which represents the connection relationship between each road section. It can also be expressed as follows:
[0051]
[0052] In a feasible embodiment, determining the original traffic feature vector corresponding to each road section in the topological network based on the historical traffic data corresponding to the traffic section to be predicted includes:
[0053] Step 110: construct a traffic matrix based on the historical traffic data corresponding to the traffic section to be predicted.
[0054] It should be noted that the traffic matrix is the traffic matrix of each road section in the historical number of days. For example, for N road sections in the topological network, the traffic matrix S corresponding to the truck traffic data in the historical 7 days is n for:
[0055]
[0056] in, represents the freight flow of N sections on day n, represents the freight flow on road section N at time t on day n, where t is the length of the daily time series.
[0057] Step 120: Determine the periodic flow curve corresponding to the historical flow data according to the flow matrix.
[0058] It should be noted that the periodic flow curve is the flow curve of the traffic section to be predicted within the historical time period (7 days in the embodiment of this application). It should also be noted that in the subsequent flow prediction of this application, the freight flow is also predicted based on the periodic flow curve. That is to say, in the embodiment of this application, it is believed that freight traffic has a certain periodic change pattern. The embodiment of this application divides the historical flow data according to the periodicity to establish a corresponding flow matrix, and then determines the periodic flow curve, which can better reflect the flow change of freight traffic within a time period.
[0059] For example, according to the traffic matrix S n , for each time unit, construct the periodic flow curve corresponding to each road section. Specifically, the average flow rate of time points within a cycle (within 7 days) can be calculated as the periodic flow curve of the cycle:
[0060]
[0061] D i =[D i (1) D i (2) … D i (t)]
[0062] Among them, D i (t) is the average flow value of section i at time t, i = 1, 2, ..., N, is the freight flow of section i at time t on the nth day, D i is the periodic flow curve of section i.
[0063] Step 130: construct a three-dimensional traffic flow information matrix based on the periodic traffic curve and historical traffic data.
[0064] Preferably, a three-dimensional traffic flow information matrix is constructed based on the periodic traffic curve and the disturbance residual of the historical traffic data.
[0065] It should be noted that, in the embodiment of the present application, the disturbance residual is the disturbance magnitude of the actual historical flow data of each road section at each time compared with the periodic flow curve trend, which can be specifically expressed as:
[0066]
[0067] in, is a three-dimensional traffic flow information matrix, which represents the disturbance residual of the road section i at time t on the nth day in the cycle relative to the periodic flow curve.
[0068] Step 140 : determining the original traffic flow feature vector corresponding to each road section in the topological network based on the three-dimensional traffic flow information matrix.
[0069] It should be noted that in the embodiment of the present application, the original traffic feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix. The three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and the spatial dimension to which the road segment belongs.
[0070] The time intervals between the first and second time dimensions and the original traffic feature vector can be the same or different. It should be understood that constructing a three-dimensional traffic flow information matrix can leverage the independence of the two time dimensions to fully express the periodic characteristics of the first and second time dimensions, as well as the dependence of the second time dimension on the first time dimension. This improves the expressive power of the feature vector in the time domain when constructing the original traffic feature vector, providing richer and more reliable time domain information for subsequent use in time series models.
[0071] Specifically, based on the three-dimensional traffic flow information matrix Determine the time interval length T used for prediction and obtain the original traffic feature vector
[0072]
[0073] Where T is the time interval length, is the original traffic feature vector of section i, F is the number of features of each node.
[0074] It should be noted that the time interval length T is limited to one historical period. In other words, the time interval length is the time interval for segmenting the second time dimension. Therefore, the original traffic feature vector achieves time series segmentation while still retaining the periodic expression of the first time dimension. Furthermore, by segmenting the second time dimension according to demand, the time precision can be set according to the forecast requirements, such as hours. This effectively improves the accuracy of the forecast in the time dimension while ensuring the overall forecast reliability.
[0075] It should be understood that for each road segment in the topological network, there are:
[0076]
[0077] Among them, Y is the set of original traffic feature vectors corresponding to the topological network, N is the number of road sections in the topological network, is the original traffic feature vector of road section i, i=1,2,…,N.
[0078] Therefore, the embodiment of the present application uses the topological network and historical traffic data of the traffic section to be predicted to determine the three-dimensional traffic flow information matrix corresponding to each section, and then determines the original traffic flow feature vector used for traffic flow prediction, so that the original traffic flow feature vector used for traffic flow prediction fully includes the historical information of freight traffic flow information in the time dimension and space dimension, effectively avoiding the difference problem caused by separate time prediction and space prediction of freight traffic flow, thereby improving the accuracy and robustness of the prediction results of the post-prediction model.
[0079] Moreover, this application uses the traffic matrix, three-dimensional traffic flow information matrix and original traffic feature vector to effectively construct the hourly data level of the freight traffic network, further improving the spatiotemporal accuracy of freight traffic prediction.
[0080] Step 200 : Based on the influence relationship between the road sections in the topological network, the original traffic characteristic vector is corrected based on the influence intensity characteristic to obtain a corrected traffic characteristic vector.
[0081] It should be noted that due to the upstream and downstream influence relationship of freight traffic flow, such as converging sections, bifurcated sections, etc., this application uses the topological network node importance theory to correct and strengthen the original traffic feature vector in the spatial dimension, so as to better pay attention to the impact of adjacent sections on the traffic flow prediction of the predicted traffic section, and improve the accuracy and reliability of the final predicted traffic status.
[0082] In one possible embodiment, Figure 3As shown, step 200, based on the influence relationship between each road segment in the topological network, the original traffic feature vector is corrected by the influence intensity feature to obtain the corrected traffic feature vector, including:
[0083] Step 210 : Calculate the influence intensity coefficients between first-order adjacent road segments in the topological network based on the self-matching-shared matching mechanism.
[0084] It should be understood that due to the connection relationship between traffic segments, adjacent segments with a first-order adjacency relationship have a stronger flow impact, such as extending from an upstream segment to a downstream segment, or an upstream segment diverging to a downstream segment, or multiple upstream segments converging to a downstream segment, etc. Therefore, the embodiments of the present application focus on the influence intensity coefficient between first-order adjacent segments in a topological network.
[0085] Among them, the influence intensity coefficient can be expressed as:
[0086]
[0087] Among them, e ij is the influence intensity coefficient, representing the degree of influence of road section i on road section j, a:R F′ ×R F →R is a self-matching-shared matching mechanism used to implement a single-layer feedforward neural network, W∈R F′×F is the linear transformation parameter matrix of the science department.
[0088] Step 220 : Based on the impact intensity coefficient, the original flow characteristic vector is corrected based on the impact intensity characteristic to obtain a corrected flow characteristic vector.
[0089] In a specific embodiment, step 220, based on the impact intensity coefficient, performs impact intensity feature correction on the original flow characteristic vector to obtain a corrected flow characteristic vector, including:
[0090] Step 221 : normalize the impact intensity coefficient.
[0091] Optionally, in an embodiment of the present application, a softmax function is used to normalize all choices of j, and the weights are activated by a LeakyReLU function:
[0092]
[0093] Among them, α ij is the normalized influence intensity coefficient, . T represents transposition, || represents the connection operation, N is the number of road segments, N i is the neighbor node of road segment i, is a parameterized matrix,
[0094] In step 222, the normalized impact intensity coefficient is used to correct the impact intensity characteristics of the original flow characteristic vectors.
[0095] Specifically, the influence intensity coefficient is used to correct the influence intensity characteristics of the original traffic feature vector, so that the information of the first-order adjacent sections can be aggregated in the original traffic feature vector of each section. The importance of information of different first-order neighbor sections can also be dynamically determined according to the influence intensity coefficient, so that more attention can be paid to the adjacent sections that are helpful to the current task in the post-prediction.
[0096] For example, the original traffic feature vector can be modified using the following expression:
[0097]
[0098] Among them, α ij is the normalized impact intensity coefficient, is the modified traffic feature vector of section i after correction in this dimension, is the original traffic feature vector of the first-order adjacent road segment, and σ(·) is the sigmoid activation function.
[0099] In step 223, the corrected average value of the K dimensions is used as the corrected traffic feature vector.
[0100] It should be noted that the K dimensions are attention coefficients set when modifying the influence strength based on the topological network graph.
[0101] In related technologies, K attention layers are usually superimposed to enhance the attention of the traffic section to be predicted to the first-order adjacent sections, that is, the K correction results obtained by analyzing multiple attention layers are spliced to achieve full attention to the first-order adjacent sections. However, this processing method will cause feature redundancy in the corrected traffic feature vector, increasing the data processing pressure of the subsequent prediction model. Moreover, the three-dimensional traffic flow information used in this application to generate the original traffic feature vector itself has a better differential information expression and contains less common information. Based on this, this application further proposes to use the average value of the K dimensions after correction as the corrected traffic feature vector.
[0102] In other words, this application constructs a three-dimensional traffic flow information matrix using the perturbation residuals of periodic traffic curves and historical traffic data, and based on this, obtains the original traffic flow feature vector, so that the original traffic flow feature vector contains more information about the differences in traffic flow of the traffic section to be predicted. Based on this, when the original traffic flow feature vector is corrected for the impact intensity based on the first-order adjacent sections of the traffic section to be predicted, more attention can be paid to the impact intensity. That is, there is no need to splice all the attention analysis results; only the average value can meet the impact intensity correction requirements.
[0103] For example, the following formula can be used:
[0104]
[0105] Among them, K is the attention coefficient set when modifying the influence strength based on the topological network graph, α ij is the normalized impact intensity coefficient, is the modified traffic characteristic vector corresponding to section i, is the original traffic feature vector of the first-order adjacent road segment, σ(·) is the sigmoid activation function, W k is the linear transformation parameter matrix corresponding to the k-th dimension.
[0106] Therefore, the freight flow prediction method based on the spatiotemporal evolution of the topological network proposed in the embodiment of the present application adds the influence intensity correction between the road sections based on the topological network to the original flow characteristic vector before performing flow prediction. This allows the corrected flow characteristic vector to effectively reflect the correlation between the sections in the spatial domain, realize the expression of the flow influence between the upstream and downstream sections on the characteristic vector, and improve the mapping of the corrected flow characteristics to spatial information. At the same time, using the corrected average value as the final corrected flow characteristic vector achieves the purpose of effectively reducing redundant data while ensuring the correction of the influence intensity, thereby improving the overall prediction efficiency on the basis of ensuring the accuracy of the prediction.
[0107] Step 300: Use a time series model to perform feature prediction on the corrected traffic feature vector to obtain a predicted traffic state representation vector.
[0108] In a feasible embodiment, the corrected traffic feature vector is input into a time series model for feature prediction to obtain a predicted traffic state representation vector.
[0109] Optionally, the time series model is an LSTM model.
[0110] Specifically, the LSTM model's forgetting unit, updating unit, and feature integration unit are controlled, as well as the temporal impact representation vector is managed, to extract the long-term traffic flow evolution characteristics. The forgetting unit precisely controls the degree of forgetting of historical information, the updating unit accurately filters and integrates the input information at the current moment, and the feature integration unit carefully determines the output portion of the temporal impact representation vector. Through the above mechanism, the topological traffic evolution representation unit can better process the long-term traffic flow evolution characteristics in time series data, avoiding the problem of gradient vanishing or exploding. The expressions corresponding to the specific units are as follows:
[0111]
[0112] ht =o t tanh(C t )
[0113] Among them, f t is the forgetting unit at time t, controlling the last time sequence impact representation vector, c t-1 The degree to which information in the t is the update unit at time t, controlling the new input The degree to which the information in is added to the traffic state representation vector; is the candidate state at time t, used to calculate the new traffic state representation vector C t , C t is the traffic state representation vector at time t, which is represented by the forgetting unit f t and update unit i t Control update, including memory information at the current moment; o t is the feature integration unit at time t, controlling the temporal impact representation vector C t How to influence the traffic state representation vector h t ;h t is the traffic status representation vector at time t; W f 、W i 、W o are the weight matrices to be trained corresponding to the unit information; U f 、U i 、U o are the weight matrices to be trained for the corresponding unit traffic state representation vectors; b f 、b i 、b o are the bias items to be trained for the corresponding units; W C 、b C is the weight matrix and bias term of the candidate state, σ(·) is the Sigmoid activation function, and tanh(·) is the tanh activation function.
[0114] It should also be noted that in the embodiment of the present application, the time series model can predict the traffic state representation vector sequence corresponding to the next cycle based on the input of multiple historical cycle traffic curves. Specifically, it can be expressed as:
[0115] H out =[h t’-T h t’-T+1 …h t’ ]
[0116] Among them, h t‘ is the traffic status representation vector at time t', which is the time t in the next predicted cycle.
[0117] It should be understood that since the original traffic feature vector used for prediction is determined based on the disturbance residual of the periodic traffic curve and historical traffic data, the predicted traffic state representation vector is a prediction of the degree of change in traffic flow, that is, it is not a direct prediction of traffic flow. Therefore, further decoding and fitting are required to obtain the true predicted traffic flow information.
[0118] Step 400: Determine predicted traffic flow information corresponding to the traffic section to be predicted based on the predicted traffic state representation vector.
[0119] In one possible embodiment, Figure 4 As shown, step 400, based on the predicted traffic state representation sales volume, determines the predicted traffic flow information corresponding to the traffic section to be predicted, including:
[0120] Step 410 : decoding the predicted traffic state representation vector based on the regression relationship between the predicted feature parameters and the predicted traffic state to obtain a predicted output value corresponding to the traffic section to be predicted.
[0121] In other words, the embodiment of the present application constructs a regression relationship between the predicted feature parameters and the predicted traffic state. That is, by processing the feature parameters, applying neuron dropout and activation functions, etc. to alleviate the overfitting problem, a regression relationship between the predicted feature parameters and the predicted traffic state is constructed. Specifically, the following expression can be used:
[0122]
[0123] in, is the predicted output value, H out is the traffic state representation vector sequence of the predicted output, W F1 、W F2 , are the weight matrices to be trained for the corresponding feature decoding units, b F1 、b F2 are the weight matrices to be trained for the corresponding feature decoding units, dropout(·) is the neuron dropout function used to reduce overfitting, and tanh(·) is the tanh activation function.
[0124] Step 420 : Determine the predicted traffic flow information corresponding to the traffic section to be predicted based on the periodic traffic flow curve and the predicted output value.
[0125] Specifically, the following expression can be used:
[0126]
[0127] in, is the predicted traffic flow information of road section i, D i is the flow curve of the previous cycle of section i, is the predicted output value.
[0128] Preferably, when determining the predicted traffic flow information corresponding to the traffic section to be predicted, the average value of traffic flow curves of multiple historical periods can be used to achieve normalization of non-differential information.
[0129] In summary, the freight flow prediction method based on the spatiotemporal evolution of the topological network proposed in the embodiment of the present application uses a three-dimensional traffic flow information matrix that expresses more traffic flow differences to construct the original flow feature vector, and converts the traffic flow into flow difference information with finer time granularity, thereby realizing the prediction of the intensity of flow difference changes, improving the attention to differential flow, and avoiding the edge loss caused by the overall flow prediction, thereby improving the accuracy of finer-grained flow prediction.
[0130] It should be noted that although the operations of the present method are described in a particular order in the drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve desirable results.
[0131] Figure 5 A schematic diagram of the structure of a freight flow prediction device based on spatiotemporal evolution of a topological network provided by an embodiment of the present application is shown.
[0132] like Figure 5 As shown, the freight flow prediction device 10 based on the spatiotemporal evolution of the topological network includes:
[0133] A first determining module 11 is configured to construct a topological network based on road information of a traffic segment to be predicted, and determine an original traffic flow feature vector corresponding to each segment in the topological network based on historical traffic flow data corresponding to the traffic segment to be predicted; the original traffic flow feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; the three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which the segment belongs;
[0134] A correction module 12 is configured to correct the original traffic characteristic vector based on the influence relationship between the road sections in the topological network to obtain a corrected traffic characteristic vector;
[0135] A prediction module 13 is configured to perform feature prediction on the corrected traffic flow feature vector using a time series model to obtain a predicted traffic state representation vector;
[0136] The second determining module 14 is configured to determine the predicted traffic flow corresponding to the traffic section to be predicted based on the predicted traffic state representation vector.
[0137] In some embodiments, the first determining module 11 is further configured to:
[0138] Constructing a traffic matrix based on the historical traffic data corresponding to the traffic section to be predicted;
[0139] Determining a periodic flow curve corresponding to the historical flow data according to the flow matrix;
[0140] constructing the three-dimensional traffic flow information matrix based on the periodic traffic flow curve and the historical traffic flow data;
[0141] Based on the three-dimensional traffic flow information matrix, an original traffic flow feature vector corresponding to each road section in the topological network is determined.
[0142] In some embodiments, the first determining module 11 is further configured to:
[0143] A three-dimensional traffic flow information matrix is constructed based on the periodic traffic curve and the disturbance residual of the historical traffic data.
[0144] In some embodiments, the correction module 12 is further configured to:
[0145] Based on the self-matching-shared matching mechanism, the influence intensity coefficient between the first-order adjacent road segments in the topological network is calculated;
[0146] Based on the impact intensity coefficient, the original flow characteristic vector is corrected for its impact intensity characteristics to obtain a corrected flow characteristic vector.
[0147] In some embodiments, the correction module 12 is further configured to:
[0148] Normalizing the impact intensity coefficient;
[0149] Using the normalized impact intensity coefficient, the impact intensity characteristics of the original flow characteristic vectors are corrected respectively;
[0150] The corrected average value of the K dimensions is used as the corrected traffic feature vector.
[0151] In some embodiments, the prediction module 13 is further configured to:
[0152] The modified traffic flow feature vector is input into the time series model for feature prediction to obtain a predicted traffic state representation vector.
[0153] In some embodiments, the second determining module 14 is further configured to:
[0154] Decoding the predicted traffic state representation vector based on the regression relationship between the predicted characteristic parameters and the predicted traffic state to obtain a predicted output value corresponding to the traffic section to be predicted;
[0155] Based on the periodic traffic flow curve and the predicted output value, the predicted traffic flow information corresponding to the traffic section to be predicted is determined.
[0156] It should be understood that the modules or modules described in the freight flow prediction device 10 based on the spatiotemporal evolution of the topological network are the same as those in the reference Figure 1 The various steps in the described method correspond to each other. Therefore, the operations and features described above for the method are also applicable to the freight flow prediction device 10 based on the spatiotemporal evolution of the topological network and the modules contained therein, and will not be repeated here. The freight flow prediction device 10 based on the spatiotemporal evolution of the topological network can be pre-implemented in the browser or other security applications of the electronic device, or can be loaded into the browser or security application of the electronic device by downloading or other means. The corresponding modules in the freight flow prediction device 10 based on the spatiotemporal evolution of the topological network can cooperate with the modules in the electronic device to implement the solution of the embodiment of the present application.
[0157] The several modules or units mentioned in the detailed description above are not necessarily divided into one module or unit. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0158] Reference below Figure 6 , Figure 6 A schematic diagram of the structure of a computer system of an electronic device or server suitable for implementing the embodiments of the present application is shown.
[0159] like Figure 6 As shown, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 into the random access memory (RAM) 603. Various programs and data required for the operation instructions of the system are also stored in the RAM 603. The CPU 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0160] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that a computer program read therefrom can be installed into the storage section 608 as needed.
[0161] In particular, according to the embodiment of the present application, the above reference flow chart Figure 2 The described process can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.
[0162] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, or any suitable combination thereof.
[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operating instructions of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the aforementioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operating instruction, or can be implemented using a combination of dedicated hardware and computer instructions.
[0164] The units or modules involved in the embodiments described in the present application may be implemented in software or in hardware. The units or modules described may also be provided in a processor, for example, they may be described as: a processor including a first determination module, a correction module, a prediction module, and a second determination module. The names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves. For example, the first determination module may also be described as "constructing a topological network based on the road information of the traffic section to be predicted, and determining the original traffic feature vector corresponding to each section in the topological network based on the historical traffic data corresponding to the traffic section to be predicted; the original traffic feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; the three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which the section belongs."
[0165] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the freight flow prediction method based on the spatiotemporal evolution of a topological network described in the present application.
[0166] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the aforementioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A freight flow prediction method based on the spatiotemporal evolution of topological networks, characterized by: include: A topological network is constructed based on road information of a traffic segment to be predicted, and an original traffic flow feature vector corresponding to each segment in the topological network is determined based on historical traffic flow data corresponding to the traffic segment to be predicted; the original traffic flow feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; the three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which the segment belongs; Based on the influence relationship between the road sections in the topological network, the original traffic characteristic vector is corrected by the influence intensity characteristic to obtain a corrected traffic characteristic vector; Using a time series model to perform feature prediction on the corrected traffic flow feature vector to obtain a predicted traffic state representation vector; Determining predicted traffic flow information corresponding to the traffic section to be predicted based on the predicted traffic state representation vector; The step of determining the original traffic characteristic vector corresponding to each road section in the topological network based on the historical traffic data corresponding to the traffic road section to be predicted includes: Constructing a traffic matrix based on the historical traffic data corresponding to the traffic section to be predicted; According to the flow matrix, a periodic flow curve corresponding to the historical flow data is determined; wherein, , , For road sections The average flow rate at time t is , For road sections The periodic flow curve of represents the freight flow of road section i at time t on day n, where t is the length of the daily time series; Based on the periodic flow curve and the historical flow data, the three-dimensional traffic flow information matrix is constructed; wherein, based on the periodic flow curve and the disturbance residual of the historical flow data, the three-dimensional traffic flow information matrix is constructed; the three-dimensional traffic flow information matrix is recorded as , , represents the disturbance residual of the segment i at time t relative to the periodic flow curve on the nth day in the cycle; Based on the three-dimensional traffic flow information matrix, an original traffic flow feature vector corresponding to each road section in the topological network is determined.
2. The freight flow prediction method based on spatiotemporal evolution of topological networks according to claim 1 is characterized in that: The method of performing influence intensity feature correction on the original traffic feature vector based on the influence relationship between the road sections in the topological network to obtain a corrected traffic feature vector includes: Based on the self-matching-shared matching mechanism, the influence intensity coefficient between the first-order adjacent road segments in the topological network is calculated; Based on the impact intensity coefficient, the original flow characteristic vector is corrected for its impact intensity characteristics to obtain a corrected flow characteristic vector.
3. The freight flow prediction method based on spatiotemporal evolution of topological networks according to claim 2 is characterized in that: The step of performing influence intensity characteristic correction on the original flow characteristic vector based on the influence intensity coefficient to obtain a corrected flow characteristic vector includes: Normalizing the impact intensity coefficient; Using the normalized impact intensity coefficient, the impact intensity characteristics of the original flow characteristic vectors are corrected respectively; The corrected average value of the K dimensions is used as the corrected traffic feature vector.
4. The freight flow prediction method based on spatiotemporal evolution of topological networks according to claim 1 is characterized in that: The method of using a time series model to perform feature prediction on the corrected traffic flow feature vector to obtain a predicted traffic state representation vector includes: The modified traffic flow feature vector is input into the time series model for feature prediction to obtain a predicted traffic state representation vector.
5. The freight flow prediction method based on spatiotemporal evolution of topological networks according to claim 1 is characterized in that: The step of determining the predicted traffic flow information corresponding to the traffic section to be predicted based on the predicted traffic state representation vector includes: Decoding the predicted traffic state representation vector based on the regression relationship between the predicted characteristic parameters and the predicted traffic state to obtain a predicted output value corresponding to the traffic section to be predicted; Based on the periodic traffic flow curve and the predicted output value, the predicted traffic flow information corresponding to the traffic section to be predicted is determined.
6. A freight flow prediction device based on the spatiotemporal evolution of a topological network, characterized in that: include: A first determination module is configured to construct a topological network based on road information of a traffic section to be predicted, and determine an original traffic flow feature vector corresponding to each section in the topological network based on historical traffic flow data corresponding to the traffic section to be predicted; the original traffic flow feature vector is an information flow time series constructed based on a three-dimensional traffic flow information matrix; The three-dimensional traffic flow information matrix is related to a first time dimension, a second time dimension within the first time dimension, and a spatial dimension to which a road segment belongs; a correction module, configured to correct the original traffic characteristic vector for an influence intensity characteristic based on the influence relationship between the road sections in the topological network, to obtain a corrected traffic characteristic vector; A prediction module, configured to perform feature prediction on the corrected traffic flow feature vector using a time series model to obtain a predicted traffic state representation vector; A second determining module is configured to determine a predicted traffic flow corresponding to the traffic section to be predicted based on the predicted traffic state representation vector; The step of determining the original traffic characteristic vector corresponding to each road section in the topological network based on the historical traffic data corresponding to the traffic road section to be predicted includes: Constructing a traffic matrix based on the historical traffic data corresponding to the traffic section to be predicted; According to the flow matrix, a periodic flow curve corresponding to the historical flow data is determined; wherein, , , For road sections The average flow rate at time t is , For road sections The periodic flow curve of represents the freight flow of road section i at time t on day n, where t is the length of the daily time series; Based on the periodic flow curve and the historical flow data, the three-dimensional traffic flow information matrix is constructed; wherein, based on the periodic flow curve and the disturbance residual of the historical flow data, the three-dimensional traffic flow information matrix is constructed; the three-dimensional traffic flow information matrix is recorded as , , represents the disturbance residual of the segment i at time t relative to the periodic flow curve on the nth day in the cycle; Based on the three-dimensional traffic flow information matrix, an original traffic flow feature vector corresponding to each road section in the topological network is determined.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the freight flow prediction method based on the spatiotemporal evolution of the topological network as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for predicting freight flow based on the spatiotemporal evolution of a topological network as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Traffic prediction method based on multi-scale graph convolutional network model
CN113053115A
Efficient space-time traffic flow prediction method
CN118538029A