Traffic information prediction method, device, equipment and medium

By constructing and integrating the traffic information matrix and combining the prediction network, the existing traffic information prediction methods are solved in the traffic instability and insufficient accuracy during peak periods, and more efficient traffic information prediction is achieved.

CN118522157BActive Publication Date: 2024-11-19NORTHWEST ENGINEERING CORPORATION LIMITED
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410990891.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-19
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

The existing traffic information prediction methods have poor prediction results during unstable traffic flow and peak periods, and are insufficient in accuracy, making it difficult to meet the real-time needs of traffic management and drivers.

Method used

By constructing distance relationship matrix, correlation coefficient matrix and dynamic time regular matrix, learning parameters and activation functions are used to fusion, fusion matrix is ​​generated, and feature extraction is performed in a pre-established prediction network to capture the time and spatial variation laws of traffic information. .

Benefits of technology

It improves the accuracy of traffic information prediction, fully reflects the complexity of the traffic network, reduces prediction errors, provides a richer information foundation, and enhances the real-time and accuracy of traffic information prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118522157B_ABST
    Figure CN118522157B_ABST
Patent Text Reader

Abstract

The present disclosure provides a traffic information prediction method, device, equipment and medium, which relates to the field of data processing technology. The method includes: constructing a distance relationship matrix based on the distance relationship between traffic nodes; constructing a traffic information vector using the traffic information corresponding to the traffic nodes, and constructing a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; fusing the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix using learnable parameters and activation functions to obtain a fusion matrix; extracting features from the fusion matrix based on a pre-established prediction network to obtain predicted traffic information of the traffic node in the prediction time period. The technical solution in the present disclosure can improve the accuracy of traffic information prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of urbanization and transportation networks, the demand for traffic information forecasting is increasing. Accurate traffic information forecasting not only provides real-time traffic status information for traffic management departments, helping them to adjust traffic strategies and optimize traffic signals more finely, but also provides real-time road condition information for drivers and users, helping them choose more convenient travel routes and improve overall traffic efficiency.

[0003] However, the existing traffic information prediction methods have poor prediction effects on sections with unstable traffic flow and during peak traffic periods, and there is still room for improvement in the accuracy of traffic information prediction.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a traffic information prediction method, a traffic information prediction device, an electronic device and a computer-readable storage medium, thereby improving the accuracy of traffic information prediction at least to a certain extent.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to the first aspect of an embodiment of the present disclosure, a traffic information prediction method is provided, comprising: constructing a distance relationship matrix based on the distance relationship between traffic nodes; constructing a traffic information vector using the traffic information corresponding to the traffic nodes, and constructing a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; fusing the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix using learnable parameters and activation functions to obtain a fused matrix; and extracting features from the fused matrix based on a pre-established prediction network to obtain predicted traffic information of the traffic node in the prediction time period.

[0008] In some example embodiments of the present disclosure, based on the aforementioned scheme, constructing a distance relationship matrix based on the distance relationship between traffic nodes includes: determining a plurality of the traffic nodes from a target traffic grid; calculating the distance relationship based on the Euclidean distance and the distance standard deviation between the traffic nodes to obtain the distance relationship values ​​between different traffic nodes; and constructing the distance relationship matrix based on the distance relationship values.

[0009] In some example embodiments of the present disclosure, based on the aforementioned scheme, a correlation coefficient matrix and a dynamic time warping matrix are constructed respectively based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes, including: determining the Pearson correlation coefficient between the traffic information vectors corresponding to different traffic nodes, and constructing the correlation coefficient matrix based on the Pearson correlation coefficient; determining the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes using the cumulative distance matrix, and constructing the dynamic time warping matrix based on the cumulative minimum distance.

[0010] In some example embodiments of the present disclosure, based on the aforementioned scheme, the cumulative distance matrix is ​​used to determine the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes, and the dynamic time warping matrix is ​​constructed based on the cumulative minimum distance, including: determining the cumulative minimum distance between different elements in different traffic information vectors, and constructing the cumulative distance matrix according to the cumulative distance; determining the minimum distance path corresponding to the cumulative distance matrix according to a dynamic programming algorithm; performing similarity calculation on the traffic information vectors based on the minimum distance path to obtain the similarity value between different traffic information vectors; and constructing the dynamic time warping matrix based on the similarity value between the different traffic information vectors.

[0011] In some example embodiments of the present disclosure, based on the aforementioned solution, the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix are fused using the learnable parameters and the activation function to obtain a fused matrix, including:

[0012] ;

[0013] Constructing a learnable parameter matrix ;in, represents the activation function, , N Indicates the number of traffic nodes, F represents the dimension of the traffic information vector, and represents the first learnable parameter, Indicates that Convert to a diagonal matrix; according to:

[0014] ;

[0015] ;

[0016] The learnable parameter matrix, the correlation coefficient matrix and the dynamic time warping matrix are combined to obtain a first dynamic learning matrix ;in, represents the activation function value, represents a nonlinear activation function, represents the convolutional layer, represents the connection function, represents the second learnable parameter and , represents element-wise multiplication, represents the correlation coefficient matrix, represents the dynamic time warping matrix; according to:

[0017] ;

[0018] ;

[0019] Enhance the sparsity of the first dynamic learning matrix to obtain a second dynamic learning matrix ;in, is a diagonal matrix, and , , represents a preset threshold, which is used to filter out weak relationships in the first dynamic learning matrix; the second dynamic learning matrix and the distance relationship matrix are fused to obtain the fused matrix.

[0020] In some example embodiments of the present disclosure, based on the above solution, fusing the second dynamic learning matrix and the distance relationship matrix to obtain the fusion matrix includes: according to:

[0021] ;

[0022] The second dynamic learning matrix and the distance relationship matrix are fused to obtain the fusion matrix ;in, represents the distance relationship matrix, represents the trainable hidden relations of the traffic nodes, and , , K Represents the number of hidden dimensions used to reduce the number of parameters.

[0023] In some example embodiments of the present disclosure, based on the aforementioned solution, the construction process of the prediction network includes: constructing a historical traffic information vector using the historical traffic information corresponding to the traffic node, and constructing a historical fusion matrix based on the historical traffic information vector and the distance relationship matrix; training a spatiotemporal neural network based on graph convolution based on the historical fusion matrix and the historical traffic information to obtain the prediction network; the spatiotemporal neural network is based on:

[0024] ;

[0025] Get the spatial dependency between traffic nodes; among them, Indicates l Hidden features of the layer, represents the standardized relationship matrix, represents the corresponding learnable parameters, represents the activation function, represents the Chebyshev polynomial.

[0026] According to the second aspect of an embodiment of the present disclosure, a traffic information prediction device is provided, comprising: a static matrix construction module, for constructing a distance relationship matrix based on the distance relationship between traffic nodes; a dynamic matrix construction module, for constructing a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; a fusion matrix construction module, for fusing the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix using learnable parameters and activation functions to obtain a fusion matrix; a traffic information prediction module, for extracting features from the fusion matrix based on a pre-established prediction network to obtain the predicted traffic information of the traffic node in the prediction time period.

[0027] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the above-mentioned traffic information prediction method is implemented.

[0028] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the traffic information prediction method described above is implemented.

[0029] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0030] The traffic information prediction method in the example embodiment of the present disclosure uses a fusion matrix obtained by fusing a distance relationship matrix, a correlation coefficient matrix and a dynamic time warping matrix to obtain the predicted traffic information of the traffic nodes in the predicted time period. On the one hand, by constructing a distance relationship matrix, the geographical distance between the traffic nodes is taken into account, while the correlation coefficient matrix and the dynamic time warping matrix respectively obtain the correlation and dynamic change law between the traffic information vectors from the perspective of linear correlation and nonlinear time series matching, thereby more comprehensively reflecting the complexity of the traffic network; on the other hand; by fusing the three matrices using learnable parameters and activation functions, the obtained fusion matrix can comprehensively reflect the static structure, dynamic interaction and time series characteristics of the traffic network, providing a richer information basis for subsequent predictions; on the other hand, the fusion matrix is ​​input into a pre-trained prediction network, and feature extraction is performed using machine learning or deep learning technology, which can more accurately capture the temporal and spatial change laws of traffic information and reduce prediction errors. Thereby, the accuracy of traffic information prediction is further improved.

[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0033] Figure 1 A schematic diagram showing an exemplary system architecture to which a traffic information prediction method according to an embodiment of the present disclosure can be applied.

[0034] Figure 2 A flow chart of a traffic information prediction method according to some embodiments of the present disclosure is schematically shown.

[0035] Figure 3 A schematic diagram of the structure of a traffic information prediction model according to some embodiments of the present disclosure is schematically shown.

[0036] Figure 4 A block diagram of a traffic information prediction device according to some embodiments of the present disclosure is schematically shown.

[0037] Figure 5 A schematic diagram of the structure of a computer system of an electronic device according to some embodiments of the present disclosure is schematically shown.

[0038] Figure 6 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is schematically shown.

[0039] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0041] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0042] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0044] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0045] Furthermore, the drawings are only schematic illustrations and are not necessarily drawn to scale. The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0046] With the continuous development of urbanization and transportation networks, the demand for traffic information forecasting is increasing. Accurate traffic information forecasting not only provides real-time traffic status information for traffic management departments, helping them to adjust traffic strategies and optimize traffic signals more finely, but also provides real-time road condition information for drivers and users, helping them choose more convenient travel routes and improve overall traffic efficiency.

[0047] In some related technologies, traffic information is predicted using models based on mathematical statistics, such as the autoregressive integral moving average model, the Kalman filter prediction model, and the parameter regression model. This type of model is based on the assumption that traffic flow is stable over time and predicts future states through historical data. In some other related technologies, traffic information is predicted using models based on artificial intelligence, such as neural networks, random forests, and support vector machine regression models. However, existing traffic information prediction methods generally have the problem of insufficient accuracy, especially when traffic flow fluctuates greatly or during peak hours, the prediction effect is poor, which limits its practical application effect.

[0048] In order to solve all or part of the technical problems in the above-mentioned related technologies, in an exemplary embodiment of the present disclosure, a traffic information prediction method is firstly provided. Figure 1 A schematic diagram showing an exemplary system architecture to which a traffic information prediction method according to an embodiment of the present disclosure can be applied.

[0049] like Figure 1 As shown, the system architecture 100 may include a detection device 101, one or more of the detection devices 102, a traffic node 103, one or more of the traffic nodes 104, a network 105, and a server 106. The network 105 is used as a medium for providing a communication link between the detection device and the server. The network 105 may include various connection types, such as wired, wireless communication links or fiber optic cables, etc. The detection device may be a variety of devices for collecting traffic information, including but not limited to radar detectors, infrared detectors, video detectors, and coil detectors, etc. Among them, the detection device can be set in the vicinity of the traffic node. It should be understood that Figure 1The number of detection devices, traffic nodes, networks, and servers in the embodiment is only for illustration purposes. Any number of detection devices, networks, traffic nodes, and servers may be provided as required.

[0050] The traffic information prediction method provided by the embodiment of the present disclosure can be executed based on the above-mentioned detection device and server. For example, the traffic information of the traffic node 103 and the traffic node 104 can be obtained by the preset detection device 101 and the detection device 102 respectively, and the traffic information is sent to the server 106 through the network 105. After receiving the traffic information, the server 106 constructs a distance relationship matrix based on the distance relationship between the traffic nodes; then, the traffic information corresponding to the traffic node is used to construct the traffic information vector, and the correlation coefficient matrix and the dynamic time warping matrix are constructed respectively based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; and the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix are fused using learnable parameters and activation functions to obtain a fusion matrix; then, the fusion matrix is ​​feature extracted based on the pre-established prediction network to obtain the predicted traffic information of the traffic node in the predicted time period; finally, the predicted traffic information is visualized. However, it is easy for those skilled in the art to understand that the above-mentioned application scenario is only used for example, and this is not limited to this in the present exemplary embodiment.

[0051] Figure 2 The following schematically shows a flow chart of a traffic information prediction method according to some embodiments of the present disclosure. Figure 2 As shown, the traffic information prediction method may include the following steps:

[0052] Step S210, constructing a distance relationship matrix based on the distance relationship between traffic nodes;

[0053] Step S220, constructing a traffic information vector using the traffic information corresponding to the traffic node, and constructing a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes;

[0054] Step S230, using learnable parameters and activation functions to fuse the distance relationship matrix, the correlation coefficient matrix, and the dynamic time warping matrix to obtain a fusion matrix;

[0055] Step S240 , extracting features from the fusion matrix based on the pre-established prediction network to obtain predicted traffic information of the traffic node in the prediction time period.

[0056] According to the traffic information prediction method in the above example embodiment, on the one hand, by constructing the distance relationship matrix, the geographical distance between traffic nodes is taken into account, while the correlation coefficient matrix and the dynamic time warping matrix respectively obtain the correlation and dynamic change law between traffic information vectors from the perspective of linear correlation and nonlinear time series matching, thereby more comprehensively reflecting the complexity of the traffic network; on the other hand; by fusing the three matrices using learnable parameters and activation functions, the obtained fusion matrix can comprehensively reflect the static structure, dynamic interaction and time series characteristics of the traffic network, providing a richer information basis for subsequent predictions; on the other hand, by inputting the fusion matrix into the pre-trained prediction network and extracting features using machine learning or deep learning technology, the temporal and spatial change law of traffic information can be more accurately captured, reducing prediction errors. Thus, the accuracy of traffic information prediction is further improved.

[0057] The traffic information prediction method in the above exemplary embodiment will be further described below.

[0058] In step S210, a distance relationship matrix is ​​constructed based on the distance relationships between the transportation nodes.

[0059] Among them, a traffic node can represent a location point in a road network for detecting traffic information, such as a specific road section or intersection where a sensor is installed. The distance relationship matrix can represent a mathematical representation used to describe the spatial distance between traffic nodes in a traffic network. It can be a two-dimensional matrix, in which each row and each column corresponds to a traffic node. Each element in the matrix represents the distance relationship between two nodes. The distance relationship can be obtained based on the actual measured distance or other appropriate distance representation methods such as Euclidean distance. The distance relationship matrix can reflect the static structural characteristics of the traffic network, that is, the spatial proximity between nodes.

[0060] In some embodiments, a distance relationship matrix is ​​constructed based on the distance relationship between traffic nodes, specifically including the following steps: determining multiple traffic nodes from a target traffic grid; calculating the distance relationship based on the Euclidean distance and the distance standard deviation between the traffic nodes to obtain the distance relationship values ​​between different traffic nodes; and constructing a distance relationship matrix based on the distance relationship values.

[0061] Among them, Euclidean distance can represent a method of calculating the straight-line distance between two points in a multidimensional space. The distance standard deviation can be expressed as a distance calculated based on all pairs of traffic nodes, and can reflect the average discrete degree of distance between nodes. The distance relationship value can represent the value obtained after standardizing or weighting the distance between nodes, which can reflect the relative proximity between traffic nodes. The calculation of the distance relationship value can take into account the actual distance between nodes and the characteristics of the distance distribution in the entire network. For example, the Gaussian kernel function is used to convert the actual distance into a weight value, which can better reflect the propagation characteristics of traffic flow in the network. The distance relationship matrix can be used to capture the spatial dependency between nodes by expressing the distance relationship values ​​of all pairs of traffic nodes in matrix form.

[0062] Specifically, the distance relationship matrix can be obtained by the Gaussian kernel weighted function of formula (1):

[0063] (1)

[0064] in, Indicates i Row and j The distance relationship value of the column, that is, the node i and nodes j The distance relationship value between them. Representation Node i and nodes j The Euclidean distance between θ represents the standard deviation of the distance, TD Indicates the preset threshold. If the node i and nodes j The distance between TD , then the distance relationship value is 0, otherwise it is calculated according to the Gaussian kernel weighted function.

[0065] In step S220, traffic information corresponding to traffic nodes is used to construct traffic information vectors, and based on the linear correlation and cumulative minimum distance between traffic information vectors corresponding to different traffic nodes, a correlation coefficient matrix and a dynamic time warping matrix are respectively constructed.

[0066] Among them, the traffic information vector can refer to the traffic information collected from the traffic nodes, such as traffic flow, speed, congestion level, etc., expressed in the form of a vector. The traffic information vector is the basis for building a traffic prediction model, which contains the traffic conditions of each node at a specific time point. Linear correlation can be used to represent the strength of the linear relationship between two traffic nodes, and is used to analyze the relationship between traffic information vectors of different traffic nodes. The cumulative minimum distance can represent the similarity between two traffic information vectors, which is one of the core concepts of the dynamic time warping (DTW) algorithm. The correlation coefficient matrix is ​​a matrix composed of the linear correlation of the traffic information vectors of all traffic nodes in the traffic network. Each element in the matrix represents the linear correlation between a pair of traffic nodes, reflecting the synchronization or correlation of the traffic information between nodes over time. The dynamic time warping matrix can represent the similarity matrix of the traffic information vectors between traffic nodes calculated by the dynamic time warping algorithm, which can be used to quantify the similarity of the traffic information of different nodes over time.

[0067] Furthermore, by constructing the correlation coefficient matrix and the dynamic time warping matrix, the prediction model can capture the potential dependencies of traffic information between different traffic nodes, helping the model to identify the dynamic spatiotemporal characteristics of traffic information, thereby improving the accuracy of the prediction.

[0068] In some embodiments, based on the linear correlation and cumulative minimum distance between traffic information vectors corresponding to different traffic nodes, a correlation coefficient matrix and a dynamic time warping matrix are constructed respectively, specifically including the following steps: determining the Pearson correlation coefficient between traffic information vectors corresponding to different traffic nodes, and constructing a correlation coefficient matrix based on the Pearson correlation coefficient; determining the cumulative minimum distance between traffic information vectors corresponding to different traffic nodes using the cumulative distance matrix, and constructing a dynamic time warping matrix based on the cumulative minimum distance.

[0069] Among them, the Pearson correlation coefficient can be used to quantify the linear correlation between traffic information vectors of different traffic nodes to construct a correlation coefficient matrix. Furthermore, the Pearson correlation coefficient is a statistic that measures the linear correlation between two variables, and its value is between -1 and +1. When the Pearson correlation coefficient is +1, it means that the two variables are completely positively correlated; when the Pearson correlation coefficient is -1, it means that the two variables are completely negatively correlated; and when the Pearson correlation coefficient is 0, it means that there is no linear correlation between the variables.

[0070] Specifically, since traffic nodes with similar patterns tend to show causal relationships in traffic information prediction, the correlation coefficients between the time series of different nodes can reflect the similarity of traffic dynamics, that is, the dynamic similarity between different traffic nodes can be expressed by the Pearson correlation coefficient. The Pearson correlation coefficient can be calculated by the following formula (2):

[0071] (2)

[0072] in, , Can represent traffic nodes respectively i and j Traffic information vector.

[0073] Then, the following correlation coefficient matrix can be constructed based on the above Pearson correlation coefficient :

[0074] ;

[0075] in, TC Can represent a preset threshold, Represents the first i Line j Elements of the column represent traffic nodes i and traffic nodes j If the traffic node i and j The Pearson correlation coefficient between the traffic information vectors is greater than the threshold TC , then the correlation coefficient between the two can be considered meaningful. is equal to the absolute value of the Pearson correlation coefficient. If the Pearson correlation coefficient is less than or equal to the threshold TC , then the correlation between the two traffic nodes is considered to be weak, so is set to 0. The correlation coefficient matrix can help the model understand which nodes in the traffic network are closely related, so as to better capture the dynamic characteristics of traffic flow. In this way, the model can focus more on those node pairs that have a greater impact on traffic flow prediction, ignore those insignificant relationships, and improve the accuracy and efficiency of prediction.

[0076] Furthermore, the dynamic time warping matrix can be used to construct the dynamic time warping relationship between traffic nodes, capturing the dynamic correlation of traffic information vectors over time. Dynamic time warping is a method for comparing the similarity between two time series. It can effectively deal with the mismatch problem caused by the offset on the time axis or the different lengths of the time series. The core idea of ​​DTW is to calculate the similarity between two time series by finding the best alignment between them. This alignment is determined by a dynamic programming algorithm, and its goal is to minimize the total distance between the two sequences. The DTW algorithm determines the best matching path by calculating the cumulative sum of local distance metrics (such as Euclidean distance, Manhattan distance, etc.), one of the key steps of which is the calculation of the cumulative distance matrix, which represents the distance between each point in the two sequences. Then, the dynamic programming algorithm is used to search for the best path to minimize the total distance.

[0077] In some embodiments, a cumulative distance matrix is ​​used to determine the cumulative minimum distance between traffic information vectors corresponding to different traffic nodes, and a dynamic time warping matrix is ​​constructed based on the cumulative minimum distance, specifically including the following steps: determining the cumulative minimum distance between different elements in different traffic information vectors, and constructing a cumulative distance matrix based on the cumulative distance; determining the minimum distance path corresponding to the cumulative distance matrix based on a dynamic programming algorithm; performing similarity calculation on the traffic information vectors based on the minimum distance path to obtain the similarity values ​​between different traffic information vectors; and constructing a dynamic time warping matrix based on the similarity values ​​between different traffic information vectors.

[0078] The cumulative distance matrix is ​​the core data structure used in the dynamic time warping algorithm to compare the similarity of two time series (such as traffic information vectors). It is a two-dimensional matrix in which each element D ( i , j ) represents the point from the starting point of the first sequence to the point of the second sequence j , and the point from the start of the second sequence to the first sequence i The cumulative minimum distance. The construction of the cumulative distance matrix is ​​completed by a dynamic programming algorithm. Each element in the matrix is ​​recursively calculated based on the value of the previous one or several previous elements. The purpose is to find the shortest alignment path between two sequences.

[0079] The cumulative minimum distance can be expressed in the cumulative distance matrix as the minimum value of the cumulative distance in the path from the starting point of one sequence to the end point of another sequence. The dynamic programming algorithm can be used to determine the best matching path between two time series in traffic information prediction, thereby calculating the similarity between the two.

[0080] The elements of the cumulative distance matrix represent the distance from the starting point to each possible alignment point. The calculation formula of the cumulative distance can be expressed as:

[0081] (3)

[0082] in, represents the previous i elements and the previous j The cumulative distance between elements; It is the local distance measure between two sequences at corresponding positions; represents the cumulative minimum distance from the starting point to the current position. Finally, dynamic time warping returns a similarity measure between the two sequences, which is used as the basis for further analysis.

[0083] Furthermore, after obtaining the cumulative distance matrix, the dynamic programming algorithm is first used to calculate the cumulative distance. Specifically, starting from the second row and the second column of the cumulative distance matrix, the following operations are performed on each matrix element: the cumulative distance from the current position to the nearest position in the three directions of its left, above, and upper left is calculated; the smallest cumulative distance in these three directions is selected, plus the local distance of the current position, as the cumulative distance of the current position; the entire matrix is ​​recursively filled until the lower right corner element, the value of which is the cumulative minimum distance between the two traffic information vectors.

[0084] Then, determine the minimum distance path. Start from the lower right corner of the cumulative distance matrix and trace back in reverse, each time moving in the direction with the smallest cumulative distance in the previous row, left column or upper left corner until returning to the upper left corner of the matrix. This path is the best alignment path for the two sequences, that is, the cumulative minimum distance path. Next, calculate the similarity value, and based on the minimum distance path, calculate the similarity between the traffic information vectors through their cumulative distance.

[0085] Finally, the similarity values ​​between all traffic information vectors calculated in the above process are put into a new matrix to form a dynamic time warping matrix. Each element in this matrix represents the similarity between two traffic information vectors, which can be used in subsequent traffic prediction models to capture the dynamic spatiotemporal characteristics of traffic flow. Based on the above steps, the dynamic time warping matrix can not only handle the problem of inconsistent sequence lengths, but also capture the potential dynamic correlation between sequences, which can help the model better understand and predict the fluctuation pattern of traffic flow and improve the accuracy of traffic information prediction.

[0086] In step S230, the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix are fused using learnable parameters and activation functions to obtain a fusion matrix.

[0087] Among them, the learnable parameters can represent the weights in the neural network that can be updated by the back-propagation algorithm. These parameters are usually initialized to random values ​​and are continuously optimized during the training process to minimize the loss function. The activation function can introduce nonlinear characteristics into the neural network, so that the network can fit complex functional relationships. The fusion matrix can represent a matrix containing feature information from the distance relationship matrix, the correlation coefficient matrix, and the dynamic time warping matrix. Furthermore, by fusing the distance relationship matrix, the correlation coefficient matrix, and the dynamic time warping matrix, the model can understand the problem from different angles, reduce the model's excessive dependence on a single data source, and increase the model's robustness and generalization ability.

[0088] In some embodiments, the distance relationship matrix, the correlation coefficient matrix, and the dynamic time warping matrix are fused using learnable parameters and activation functions to obtain a fusion matrix. The specific steps are as follows: Construct a learnable parameter matrix according to the following formula (4): :

[0089] (4)

[0090] in, represents the activation function, which can enhance The sparsity of , N Indicates the number of traffic nodes, F represents the dimension of the traffic information vector, and represents the first learnable parameter, Indicates that Convert to a diagonal matrix.

[0091] According to the following equations (5) and (6), the learnable parameter matrix, the correlation coefficient matrix, and the dynamic time warping matrix are combined to obtain the first dynamic learning matrix :

[0092] (5)

[0093] (6)

[0094] in, represents the activation function value, represents a nonlinear activation function, represents the convolutional layer, represents the connection function, represents the second learnable parameter and , represents element-wise multiplication, represents the correlation coefficient matrix, represents the dynamic time warping matrix.

[0095] According to the following equations (7) and (8), the sparsity of the first dynamic learning matrix is ​​enhanced to obtain the second dynamic learning matrix :

[0096] (7)

[0097] (8)

[0098] in, is a diagonal matrix, and , , Represents a preset threshold, which is used to filter out weak relationships in the first dynamic learning matrix.

[0099] The second dynamic learning matrix and the distance relationship matrix are fused to obtain a fusion matrix.

[0100] Through the above fusion process, the dynamic spatial features between traffic information can be adaptively captured, and the static features and dynamic features can be fused to capture the hidden spatial correlation.

[0101] In some embodiments, the second dynamic learning matrix and the distance relationship matrix are fused to obtain a fusion matrix, which specifically includes the following steps: According to the following formula (9), the second dynamic learning matrix and the distance relationship matrix are fused to obtain a fusion matrix :

[0102] (9)

[0103] in, represents the distance relationship matrix, represents the trainable hidden relations of the traffic nodes, and , , K Represents the number of hidden dimensions used to reduce the number of parameters.

[0104] In step S240, feature extraction is performed on the fusion matrix based on the pre-established prediction network to obtain predicted traffic information of the traffic node in the prediction time period.

[0105] Specifically, the fusion matrix is ​​used as the input of the prediction network. This matrix contains information about distance relationships, correlation coefficients, and dynamic time warping. The prediction network can be composed of multiple layers, each of which extracts features from the input. These layers can include fully connected layers, convolutional layers, pooling layers, etc. Each layer transforms the input to extract higher-level data features. In the last layer of the prediction network, an output layer is set to output the predicted traffic information of the traffic node in the predicted time period. The predicted traffic information can be other appropriate traffic information such as the flow information, speed information, or congestion level of the traffic node.

[0106] In some embodiments, the process of constructing the prediction network includes the following steps: constructing a historical traffic information vector using the historical traffic information corresponding to the traffic node, and constructing a historical fusion matrix based on the historical traffic information vector and the distance relationship matrix; training a spatiotemporal neural network based on graph convolution based on the historical fusion matrix and the historical traffic information to obtain a prediction network; the spatiotemporal neural network obtains the spatial dependency relationship between traffic nodes according to the following formula (10):

[0107] (10)

[0108] in, Indicates l Hidden features of the layer, represents the standardized relationship matrix, represents the corresponding learnable parameters, represents the activation function, represents the Chebyshev polynomial.

[0109] Furthermore, the Chebyshev polynomials The recursive definition of can be , , ; Relationship Matrix ,in, , represents the fusion matrix, Represents the identity matrix.

[0110] Specifically, when performing traffic forecasting, the spatiotemporal neural network based on graph convolution usually takes historical time series and one or more adjacency matrices as input, with the aim of extracting spatiotemporal features hidden in historical data. The network is usually composed of multiple spatiotemporal blocks stacked together. The 𝐾-order spectral graph convolution based on Chebyshev polynomial approximation can be used to capture the spatial dependencies between nodes. t Taking the traffic flow of as an example, the traffic information of all traffic nodes is , based on this formula, the information X in the fusion matrix can be obtained by the convolution kernel Filtering is performed, where , this formula is equivalent to the approximate expansion of the Chebyshev polynomial, which is equivalent to extracting the information of the 0 to K-1 order neighborhood around each node in the graph through the convolution kernel. The prediction network uses ReLU as the final activation function, that is, .

[0111] In some embodiments, it is possible to construct Figure 3 The traffic information prediction model shown. The traffic information prediction model may include a dynamic graph learning module, a hybrid graph learning module, and a multi-layer spatiotemporal convolution module composed of multiple spatiotemporal blocks (ST Blocks). Among them, multiple spatiotemporal blocks are stacked to further extract a wider range of spatiotemporal correlations. In order to avoid model degradation and speed up the convergence of the model, a residual connection can be added to each ST Block layer to ensure that the output of the model has the same size and shape as the predicted target. The last fully connected layer of the multi-layer spatiotemporal convolution module outputs the prediction result of the model. The predicted traffic information can be expressed as ,…, , .

[0112] The traffic information prediction problem can be regarded as predicting the traffic information of the target traffic node at a future time based on the historical traffic information corresponding to multiple given traffic nodes. Given the historical traffic records of N nodes in the traffic network, the task of traffic prediction is to predict the future traffic conditions of each node. The N nodes and their pairwise connections can be defined as an undirected graph , where V represents a node, is a distance relationship matrix representing any nodes. A The elements in represent the distance relationship between two nodes. When , it means that there is no connection between node i and node j. When the elements in the matrix are not 0, the smaller the value of the element, the farther the distance between the nodes. The traffic information on the road network can be used as the attribute characteristics of the nodes in the network, and then t time The historical traffic flow information on , where F is the dimension of each node attribute feature, and the node attribute feature can be any traffic information, such as traffic speed, traffic flow, traffic density, etc. The purpose of the traffic prediction problem is to learn a function f , the function f Given S historical traffic information Under the condition of , the mapping relationship can be expressed as follows (11):

[0113] (11)

[0114] Specifically, the traffic information corresponding to different traffic nodes is used to construct a traffic information vector, and the traffic information vector is input into the dynamic graph learning module. The dynamic graph learning module constructs a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes, respectively, to adaptively capture the dynamic spatial characteristics of the traffic flow. The distance relationship matrix is ​​constructed using the distance relationship between different traffic nodes in the traffic network, and then the distance relationship matrix and the extracted dynamic spatial features are input into the adaptive hybrid graph learning module to obtain a fusion matrix, which fuses the static features and dynamic features to capture the hidden spatial correlation. Finally, the output of the adaptive hybrid graph learning module is used to predict the traffic flow through a multi-layer spatiotemporal convolution module to reduce the prediction error and improve the prediction effect.

[0115] In addition, in some embodiments, after obtaining the historical traffic information data, the data can be preprocessed. Specifically, the missing values ​​can be filled by linear interpolation method; and before the data is input into the traffic information prediction model, the data can be normalized to the maximum and minimum values, and the data can be limited to between 0 and 1. The normalization formula is:

[0116] (12)

[0117] in, Indicates i The original data, and Represent the minimum and maximum values ​​of the original data respectively.

[0118] In addition, in order to evaluate the performance of the traffic information prediction model, the performance of the model on the test set can be comprehensively evaluated based on multiple indicators. n Indicates the number of samples, Represents the true value, using Represents the model prediction value. Specifically, the mean absolute error (MAE) can be used to evaluate the mean absolute error between the model prediction value and the true value. The calculation formula of MAE is: ; Based on the root mean square error (RMSE), we can take the square root of the mean of the squared errors and focus on the impact of larger errors. The calculation formula for RMSE is: The average percentage error of the predicted value relative to the true value can be expressed by the Mean Absolute Percentage Error (MAPE). The calculation formula of MAPE is: ; We can also use the weighted mean absolute percentage error (WMAPE) to use the normalized inverse of the actual observed value as the weight to further highlight the model's focus on peak flow prediction. The calculation formula for WMAPE is: ,in, Represents weight.

[0119] In the above example embodiment, the traffic information prediction method, on the one hand, considers the geographical distance between traffic nodes by constructing a distance relationship matrix, while the correlation coefficient matrix and the dynamic time warping matrix obtain the correlation and dynamic change law between traffic information vectors from the perspective of linear correlation and nonlinear time series matching, respectively, thereby more comprehensively reflecting the complexity of the traffic network; on the other hand; by fusing the three matrices using learnable parameters and activation functions, the obtained fusion matrix can comprehensively reflect the static structure, dynamic interaction and time series characteristics of the traffic network, providing a richer information basis for subsequent predictions; on the other hand, the fusion matrix is ​​input into the pre-trained prediction network, and feature extraction is performed using machine learning or deep learning technology, which can more accurately capture the temporal and spatial change laws of traffic information and reduce prediction errors. Thus, the accuracy of traffic information prediction is further improved.

[0120] In addition, the traffic information prediction model in the embodiment of the present disclosure, combined with the dynamic graph learning module composed of the correlation coefficient matrix and the dynamic time warping matrix, the hybrid graph learning module and the graph convolution network containing multiple spatiotemporal layers, can not only explore the potential correlation between the data more comprehensively, but also improve the prediction accuracy by mining the spatiotemporal characteristics of the traffic flow; in addition, the dynamic graph learning module captures the potential dependencies of the traffic flow by fusing the correlation coefficient matrix and the dynamic time warping matrix, and further mines the spatiotemporal characteristics of the traffic flow by dynamically adjusting the learnable parameters during the training process; and, the adaptive hybrid graph learning module is composed of a static distance relationship matrix and a dynamic graph learned by the dynamic graph learning module, which can adaptively capture the static and dynamic spatial characteristics of the traffic; further, traffic flow prediction is performed through a multi-layer spatiotemporal convolution module to reduce the prediction error and improve the prediction effect.

[0121] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0122] Next, in the embodiment of the present disclosure, a traffic information prediction device is also provided. Figure 4 As shown in , the traffic information prediction device 400 can be composed of a static matrix construction module 401, a dynamic matrix construction module 402, a fusion matrix construction module 403 and a traffic information prediction module 404, wherein: the static matrix construction module can be used to construct a distance relationship matrix based on the distance relationship between traffic nodes; the dynamic matrix construction module can be used to construct a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; the fusion matrix construction module can be used to fuse the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix using learnable parameters and activation functions to obtain a fusion matrix; the traffic information prediction module can be used to extract features from the fusion matrix based on a pre-established prediction network to obtain predicted traffic information of the traffic node in the prediction time period.

[0123] It should be noted that the specific details of each part of the above-mentioned traffic information prediction device have been described in detail in the implementation of the traffic information prediction method part. The undisclosed details can be found in the implementation of the method part, so they will not be repeated here.

[0124] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned traffic information prediction method is also provided.

[0125] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0126] Refer to the following Figure 5 hereinafter describes an electronic device 500 according to such an embodiment of the present disclosure. Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0127] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.

[0128] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 2 In step S210 shown in the figure, a distance relationship matrix is ​​constructed based on the distance relationship between traffic nodes; in step S220, a traffic information vector is constructed using the traffic information corresponding to the traffic nodes, and a correlation coefficient matrix and a dynamic time warping matrix are constructed based on the linear correlation and the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes; in step S230, the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix are fused using learnable parameters and activation functions to obtain a fused matrix; in step S240, features are extracted from the fused matrix based on a pre-established prediction network to obtain predicted traffic information of the traffic nodes in the predicted time period.

[0129] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 521 and / or a cache memory unit 522 , and may further include a read-only memory unit (ROM) 523 .

[0130] The storage unit 520 may also include a program / utility 524 having a set (at least one) of program modules 525, such program modules 525 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0131] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0132] The electronic device 500 may also communicate with one or more external devices 570 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 550. In addition, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 through a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0133] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0134] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0135] refer to Figure 6 As shown, a program product 600 for implementing the above-mentioned traffic information prediction method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0136] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.

[0137] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0138] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, electromagnetic waves, etc., or any suitable combination of the foregoing.

[0139] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0140] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0141] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0142] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0143] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A traffic information prediction method, characterized in that: include: Construct a distance relationship matrix based on the distance relationship between transportation nodes; Using the traffic information corresponding to the traffic nodes to construct a traffic information vector, and based on the linear correlation and cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes, respectively construct a correlation coefficient matrix and a dynamic time warping matrix; Using learnable parameters and activation functions to fuse the distance relationship matrix, the correlation coefficient matrix, and the dynamic time warping matrix to obtain a fusion matrix; Extracting features from the fusion matrix based on a pre-established prediction network to obtain predicted traffic information of the traffic node in a predicted time period; The method of fusing the distance relationship matrix, the correlation coefficient matrix and the dynamic time warping matrix using the learnable parameters and the activation function to obtain a fusion matrix includes: according to: Constructing a learnable parameter matrix ;in, represents the activation function, , N represents the number of traffic nodes, F represents the dimension of the traffic information vector, and represents the first learnable parameter, Indicates that Convert to a diagonal matrix; according to: The learnable parameter matrix, the correlation coefficient matrix and the dynamic time warping matrix are combined to obtain a first dynamic learning matrix ;in, represents the activation function value, represents a nonlinear activation function, represents the convolutional layer, represents the connection function, represents the second learnable parameter and , represents element-wise multiplication, represents the correlation coefficient matrix, represents the dynamic time warping matrix; according to: Enhance the sparsity of the first dynamic learning matrix to obtain a second dynamic learning matrix ;in, is a diagonal matrix, and , , Indicates the preset threshold value, Used to filter out weak relationships in the first dynamic learning matrix; The second dynamic learning matrix and the distance relationship matrix are fused to obtain the fused matrix.

2. The traffic information prediction method according to claim 1, characterized in that: The distance relationship matrix is ​​constructed based on the distance relationship between the traffic nodes, including: Determining a plurality of said traffic nodes from a target traffic grid; Calculate the distance relationship based on the Euclidean distance and the distance standard deviation between the traffic nodes to obtain the distance relationship values ​​between different traffic nodes; The distance relationship matrix is ​​constructed based on the distance relationship values.

3. The traffic information prediction method according to claim 1, characterized in that: The linear correlation and cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes are used to construct a correlation coefficient matrix and a dynamic time warping matrix, respectively, including: Determine the Pearson correlation coefficient between the traffic information vectors corresponding to different traffic nodes, and construct the correlation coefficient matrix based on the Pearson correlation coefficient; The cumulative distance matrix is ​​used to determine the cumulative minimum distance between the traffic information vectors corresponding to different traffic nodes, and the dynamic time warping matrix is ​​constructed based on the cumulative minimum distance.

4. The traffic information prediction method according to claim 3, characterized in that: The method of determining the cumulative minimum distance between traffic information vectors corresponding to different traffic nodes by using the cumulative distance matrix, and constructing the dynamic time warping matrix based on the cumulative minimum distance, includes: Determining the cumulative minimum distances between different elements in different traffic information vectors, and constructing the cumulative distance matrix according to the cumulative distances; Determine the minimum distance path corresponding to the cumulative distance matrix according to a dynamic programming algorithm; Performing similarity calculation on the traffic information vectors based on the minimum distance path to obtain similarity values ​​between different traffic information vectors; The dynamic time warping matrix is ​​constructed based on the similarity values ​​between the different traffic information vectors.

5. The traffic information prediction method according to claim 1, characterized in that: The step of fusing the second dynamic learning matrix and the distance relationship matrix to obtain the fused matrix includes: according to: The second dynamic learning matrix and the distance relationship matrix are fused to obtain the fusion matrix ;in, represents the distance relationship matrix, represents the trainable hidden relations of the traffic nodes, and , , K Represents the number of hidden dimensions used to reduce the number of parameters.

6. The traffic information prediction method according to claim 1, characterized in that: The construction process of the prediction network includes: Constructing a historical traffic information vector using the historical traffic information corresponding to the traffic node, and constructing a historical fusion matrix based on the historical traffic information vector and the distance relationship matrix; Training a spatiotemporal neural network based on graph convolution based on the historical fusion matrix and the historical traffic information to obtain the prediction network; The spatiotemporal neural network is based on: Get the spatial dependency between traffic nodes; among them, Indicates l Hidden features of the layer, represents the standardized relationship matrix, represents the corresponding learnable parameters, represents the activation function, represents the Chebyshev polynomial.

7. A traffic information prediction device, characterized in that: include: Static matrix construction module, used to construct a distance relationship matrix based on the distance relationship between traffic nodes; A dynamic matrix construction module, used to construct a correlation coefficient matrix and a dynamic time warping matrix based on the linear correlation and cumulative minimum distance between the traffic information vectors corresponding to the different traffic nodes; Fusion Matrix building blocks for: Constructing a learnable parameter matrix ;in, represents the activation function, , N represents the number of traffic nodes, F represents the dimension of the traffic information vector, and represents the first learnable parameter, Indicates that Convert to a diagonal matrix; according to: The learnable parameter matrix, the correlation coefficient matrix and the dynamic time warping matrix are combined to obtain a first dynamic learning matrix ;in, represents the activation function value, represents a nonlinear activation function, represents the convolutional layer, represents the connection function, represents the second learnable parameter and , represents element-wise multiplication, represents the correlation coefficient matrix, represents the dynamic time warping matrix; according to: Enhance the sparsity of the first dynamic learning matrix to obtain a second dynamic learning matrix ;in, is a diagonal matrix, and , , Indicates the preset threshold value, Used to filter out weak relationships in the first dynamic learning matrix; Fusing the second dynamic learning matrix and the distance relationship matrix to obtain the fused matrix; The traffic information prediction module is used to extract features from the fusion matrix based on a pre-established prediction network to obtain the predicted traffic information of the traffic node in the prediction time period.

8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the traffic information prediction method according to any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the traffic information prediction method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Intelligent network connection automobile track planning method based on space-time dynamic coupling graph

    CN122505302A