A method and apparatus for traffic prediction
By processing sparsely distributed traffic state data through the encoder, redundant attention layer, and decoder in the traffic prediction model, and by employing attention mechanism and residual connection, combined with greedy algorithm to select key spatiotemporal points, the problem of sparsely distributed traffic state prediction is solved, thereby improving the accuracy of traffic state prediction and the efficiency of refined control.
Patent Information
- Application Number
- CN202210367628.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-04-08
AI Technical Summary
Existing intelligent transportation systems cannot deploy road sensors on a large scale, resulting in sparsely distributed, fine-grained traffic condition data that leads to large prediction errors, thus limiting the development and promotion of the system.
The traffic prediction model processes the index information of the observed spatiotemporal region, traffic state information, and the index information of the spatiotemporal region to be predicted through the encoder, redundant attention layer, and decoder. It adopts attention mechanism and residual connection, combined with greedy algorithm to select key spatiotemporal points, thereby improving the accuracy of traffic state prediction.
It improves the accuracy of traffic condition prediction results, meets the needs of intelligent transportation systems, enhances the efficiency of refined traffic control, and promotes the development and widespread adoption of the system.
Smart Images

Figure CN114936670B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a traffic prediction method and device. BACKGROUND
[0002] With the development of information technology, intelligent transportation system becomes an effective technical means to solve traffic congestion and improve traffic efficiency. Intelligent transportation system formulates corresponding control optimization strategies through prediction of future fine-grained traffic state to realize fine traffic control. At present, traffic state prediction technology is mainly based on the prediction scene of fixed sensors, and the related traffic state data information is collected by large-scale deployment of sensors on the road to realize the prediction of traffic state.
[0003] In the process of implementing the present application, the inventors have found that the prior art has the following problems:
[0004] In real scenarios, due to economic, environmental and other factors, it is usually impossible to deploy road sensors on a large scale, so that the intelligent transportation system can only obtain sparse distribution of fine-grained traffic state data. Only according to these sparse distribution of fine-grained traffic state data, the predicted traffic state has a large error, which cannot be well applied to the actual intelligent transportation system, and thus limits the development and popularization of intelligent transportation system. SUMMARY
[0005] Therefore, the embodiments of the present application provide a traffic prediction method and device, which processes the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region through the encoder, the redundant attention layer and the decoder in the traffic prediction model, obtains the prediction result of the traffic state of the to-be-predicted spatio-temporal region, solves the prediction problem of the sparse distribution of fine-grained traffic state, improves the accuracy of the traffic state prediction result, meets the needs of the intelligent transportation system, improves the efficiency of fine-grained traffic control, promotes the development and popularization of the intelligent transportation system.
[0006] To achieve the object, according to one aspect of the embodiments of the present application, a traffic prediction method is provided, comprising:
[0007] In response to a traffic prediction request, inputting the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region into a traffic prediction model, the traffic prediction model comprising: an encoder, a redundant attention layer and a decoder;
[0008] Encoding the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region through the encoder to obtain a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region;
[0009] The traffic state vector of the to-be-predicted spatiotemporal region is obtained by processing the traffic state vector of the observed spatiotemporal region and the traffic state first vector of the to-be-predicted spatiotemporal region through the redundant attention layer adopting an attention mechanism.
[0010] The traffic state first vector of the to-be-predicted spatiotemporal region and the traffic state second vector of the to-be-predicted spatiotemporal region are fused to obtain the traffic state vector of the to-be-predicted spatiotemporal region.
[0011] The traffic state vector of the to-be-predicted spatiotemporal region is decoded through the decoder to obtain the traffic state prediction result of the to-be-predicted spatiotemporal region.
[0012] Optionally, before the index information and the traffic state information of the observed spatiotemporal region and the index information of the to-be-predicted spatiotemporal region are input into the traffic prediction model, the index information and the traffic state information of the observed spatiotemporal region are further subjected to normalization processing to obtain an observed data set; the observed data set is split into an observation set and a prediction set; the observation set is taken as a model input, and the traffic prediction model is trained by minimizing a loss function of the prediction set.
[0013] Optionally, the loss function includes a prediction accuracy loss function and a prediction reality loss function; wherein the prediction reality loss function is constructed by introducing a correlation relationship among traffic flow, traffic flow density and speed.
[0014] Optionally, the traffic flow, the traffic flow density and the speed are obtained by converting vehicle trajectory data into state data, including: dividing a traffic state space of the vehicle trajectory data into spatiotemporal regions; determining total driving distance and driving time of a vehicle according to coordinates of the vehicle entering and leaving the spatiotemporal region, the coordinates including position information and time information; obtaining the traffic flow, the traffic flow density and the speed according to the total driving distance and the driving time.
[0015] Optionally, the traffic state second vector of the to-be-predicted spatiotemporal region is obtained by processing the traffic state vector of the observed spatiotemporal region and the traffic state first vector of the to-be-predicted spatiotemporal region through the redundant attention layer adopting an attention mechanism, including: obtaining a similarity of traffic states of two spatiotemporal regions according to the traffic state vector of the observed spatiotemporal region and the traffic state first vector of the to-be-predicted spatiotemporal region through the redundant attention layer adopting an attention mechanism; performing weighted summation on the traffic state vector of the observed spatiotemporal region based on the similarity to obtain the traffic state second vector of the to-be-predicted spatiotemporal region.
[0016] Optionally, the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region are fused by adopting a residual connection manner.
[0017] Optionally, before the index information and the traffic state information of the observed spatio-temporal region and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the method further includes: selecting key spatio-temporal points from the spatio-temporal points of the observed spatio-temporal region by a greedy algorithm, and taking the index information and the traffic state information of the key spatio-temporal points as the index information and the traffic state information of the observed spatio-temporal region.
[0018] Optionally, the selecting the key spatio-temporal points from the spatio-temporal points of the observed spatio-temporal region by the greedy algorithm includes: obtaining a candidate set for storing the key spatio-temporal points; in a case where the number of the spatio-temporal points in the candidate set does not reach a set threshold, repeatedly performing the following operations until the number of the spatio-temporal points in the candidate set reaches the threshold: calculating the importance of each spatio-temporal point of the spatio-temporal region by using the candidate set, and adding the spatio-temporal point with the maximum importance to the candidate set as a key spatio-temporal point, and then updating the candidate set; and taking the key spatio-temporal points in the candidate set as the selected key spatio-temporal points.
[0019] According to a second aspect of the embodiment of the present application, a traffic prediction device is provided, including:
[0020] an information input module configured to input, in response to a traffic prediction request, index information and traffic state information of an observed spatio-temporal region and index information of a to-be-predicted spatio-temporal region into a traffic prediction model, the traffic prediction model including an encoder, a redundant attention layer, and a decoder;
[0021] an encoding module configured to encode, by using the encoder, the index information and the traffic state information of the observed spatio-temporal region and the index information of the to-be-predicted spatio-temporal region to obtain a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region;
[0022] a redundant attention module configured to process, by using the redundant attention layer, the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region by using an attention mechanism to obtain a traffic state second vector of the to-be-predicted spatio-temporal region;
[0023] a fusion module configured to fuse the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region to obtain a traffic state vector of the to-be-predicted spatio-temporal region;
[0024] decode the traffic state vector of the to-be-predicted spatio-temporal region to obtain a traffic state prediction result of the to-be-predicted spatio-temporal region.
[0025] According to a third aspect of the embodiments of the present application, an electronic device for traffic prediction is provided, and the electronic device comprises:
[0026] one or more processors;
[0027] a storage device configured to store one or more programs,
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiments of the present application.
[0029] According to a fourth aspect of the embodiments of the present application, a computer readable medium having a computer program stored thereon is provided, and the program, when executed by a processor, implements the method provided by the first aspect of the embodiments of the present application.
[0030] An embodiment of the present application has the following advantages or beneficial effects: by inputting the index information of the observed spatio-temporal region, the traffic state information, and the index information of the to-be-predicted spatio-temporal region into the traffic prediction model in response to a traffic prediction request, the traffic prediction model comprises an encoder, a redundant attention layer, and a decoder; the encoder encodes the index information of the observed spatio-temporal region, the traffic state information, and the index information of the to-be-predicted spatio-temporal region to obtain a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region; the redundant attention layer processes the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region by using an attention mechanism to obtain a traffic state second vector of the to-be-predicted spatio-temporal region; the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region are fused to obtain a traffic state vector of the to-be-predicted spatio-temporal region; and the decoder decodes the traffic state vector of the to-be-predicted spatio-temporal region to obtain a traffic state prediction result of the to-be-predicted spatio-temporal region. The technical solution realizes the processing of the index information of the observed spatio-temporal region, the traffic state information, and the index information of the to-be-predicted spatio-temporal region by using the encoder, the redundant attention layer, and the decoder in the traffic prediction model, and obtains an accurate and reasonable prediction result of the traffic state of the to-be-predicted spatio-temporal region. The technical solution solves the problem of predicting the sparsely distributed fine-grained traffic state, improves the accuracy of the traffic state prediction result, meets the needs of the intelligent transportation system, improves the efficiency of the fine-grained traffic control, promotes the development and popularization of the intelligent transportation system, and the like. BRIEF DESCRIPTION OF DRAWINGS
[0031] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application. Among them:
[0032] Figure 1 is a schematic diagram of the main flow of the traffic prediction method according to an embodiment of the present application;
[0033] Figure 2 is a schematic diagram of the spatio-temporal region division according to an embodiment of the present application;
[0034] Figure 3 is a schematic diagram of the traffic state information of each spatio-temporal region according to an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of the structure of the redundant attention layer according to an embodiment of the present application;
[0036] Figure 5 is a schematic diagram of the structure of the traffic prediction model according to an embodiment of the present application;
[0037] Figure 6 is a schematic diagram of the specific flow of selecting the candidate set K according to an embodiment of the present application;
[0038] Figure 7 is a schematic diagram of the application scenario according to an embodiment of the present application;
[0039] Figure 8 is a schematic diagram of the main modules of the traffic prediction device according to an embodiment of the present application;
[0040] Figure 9 is an exemplary system architecture diagram to which embodiments of the present application can be applied;
[0041] Figure 10 is a schematic diagram of the structure of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings, which are meant to be exemplary and not limiting. Therefore, it should be recognized that many modifications and variations of the embodiments described herein can be made by those of ordinary skill in the art without departing from the scope and spirit of the application. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.
[0043] At present, in actual intelligent transportation systems, due to economic, environmental and other factors, road sensors cannot be deployed on a large scale, so that the intelligent transportation system can only obtain sparse distribution of fine-grained traffic state data. Only according to these sparse distribution of fine-grained traffic state data, the predicted traffic state has a large error, which cannot be well applied to the actual intelligent transportation system, and further limits the development and popularization of intelligent transportation systems.
[0044] In order to solve the above problems existing in the prior art, the present application provides a traffic prediction method, which processes the index information of the observed space-time region, the traffic state information and the index information of the to-be-predicted space-time region through the encoder, the redundant attention layer and the decoder in the traffic prediction model, so as to obtain an accurate and reasonable prediction result of the traffic state of the to-be-predicted space-time region, solve the prediction problem of the sparse distribution of the fine-grained traffic state, improve the accuracy of the traffic state prediction result, meet the needs of the intelligent traffic system, improve the efficiency of the fine traffic control, promote the development and popularization of the intelligent traffic system.
[0045] In the embodiment introduction of the present application, the nouns involved and their meanings are as follows:
[0046] MLP: Mutil La10er Perceptron, a kind of feedforward artificial neural network model, which maps a plurality of input data sets to a single output data set;
[0047] Residual connection: the output is expressed as the linear superposition of the input and a nonlinear transformation of the input, which improves the representation ability of the network and solves the degradation problem of the deep neural network;
[0048] Attention mechanism: derived from the study of human vision, it is a data processing method in machine learning, which is widely used in various types of machine learning tasks such as natural language processing, image recognition and speech recognition;
[0049] KL divergence: Kullback-Leibler divergence, also known as relative entropy, is a method to describe the difference between two probability distributions P and Q;
[0050] Adam optimizer: a first-order optimization algorithm that can replace the traditional stochastic gradient descent process, which can iteratively update the weights of the neural network based on the training data;
[0051] Greedy algorithm: a hierarchical processing method that can obtain an optimal solution in a certain metric sense.
[0052] Figure 1 is the main flowchart of the traffic prediction method according to the embodiment of the present application, as Figure 1 shown, the traffic prediction method of the present application comprises the following steps S101 to S105.
[0053] Step S101, in response to a traffic prediction request, input the index information of the observed space-time region, the traffic state information and the index information of the to-be-predicted space-time region into the traffic prediction model, wherein the traffic prediction model comprises an encoder, a redundant attention layer and a decoder.
[0054] Specifically, in the actual intelligent transportation system, the complex features of the current traffic state cannot be effectively extracted in the sparse distribution of fine-grained traffic state scenarios, which affects the accuracy of the prediction result. The traffic prediction model including an encoder, a redundant attention layer and a decoder can effectively depict the time-varying traffic state features in the traffic scene, extract the time-varying spatio-temporal correlation between the traffic states, and further ensure the accuracy of the prediction. In addition, the index information of the spatio-temporal region data is established, and the index information of the spatio-temporal region is used to replace the data of the spatio-temporal region, which not only ensures the correctness of the calculation but also reduces the computational complexity.
[0055] According to one embodiment of the present application, before the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the index information of the observed spatio-temporal region and the traffic state information are further normalized to obtain an observed data set; the observed data set is split into an observation set and a prediction set; the observation set is used as the model input, and the traffic prediction model is trained by minimizing the loss function of the prediction set.
[0056] Specifically, although the above traffic prediction model can effectively represent the time-varying traffic state in the traffic scene, the parameters in the model need to be determined by training and learning based on the data information and state information of the observed spatio-temporal region. Before the relevant observed information and to-be-observed information are input into the traffic prediction model for traffic prediction, the traffic model needs to be trained, including: normalizing the index information and traffic state information of the observed spatio-temporal region for preprocessing, so that the observed data information is mapped to the interval [0, 1], thereby speeding up the convergence speed of the training; the observed data set is randomly split into an observation set O and a prediction set T; the observation set O is used as the input of the above prediction model, and the related parameters of the prediction model are determined by minimizing the loss function of the prediction result of the prediction set T, so as to obtain the traffic prediction model which can be used for traffic prediction after training and learning.
[0057] According to another embodiment of the present application, the loss function includes a prediction accuracy loss function and a prediction reality loss function; wherein the prediction reality loss function is constructed by introducing the correlation between the traffic flow, the traffic flow density and the speed.
[0058] Specifically, based on the accuracy and reality requirements of the to-be-predicted traffic state, combined with the physical constraints between the traffic flow, the traffic flow density and the speed in the traffic flow theory, the observation set loss function including the prediction accuracy loss function and the prediction reality loss function is established.
[0059] Exemplarily, the overall loss function of the prediction set T is set as L total , then:
[0060] L total = L prob + λL real .
[0061] wherein L prob represents the accuracy of the prediction result, L real represents the authenticity of the prediction result, and λ is a weighting parameter of the two loss functions. Let the traffic state to be predicted of the above prediction model be satisfying a normal distribution with a mean μ i and a standard deviation σ i , then L prob is calculated as the sum of log probabilities of the probability distribution .
[0062]
[0063] For L real , the relationship between traffic flow q, density k and speed v in traffic flow theory, q = kv, is introduced for constraint, and correspondingly, the traffic state can be represented by traffic flow q, density k and speed v, i.e. μ i = (μ q,i , μ k,i , μ v,i ) and σ i = (σ q,i , σ k,i , σ v,i ) represent the mean and standard deviation corresponding to different traffic states, and in order to ensure the authenticity of the predicted traffic state, the predicted traffic state needs to satisfy the constraint q = kv as much as possible. Specifically, the KL divergence can be used to measure the degree to which the training result satisfies this constraint, i.e. the probability distribution of the predicted traffic flow q i is as similar as possible to the probability distribution of the traffic flow q calculated by the constraint, since q is calculated by the predicted density k i and speed v i , and k i and v i are both normal distributions, the approximation of q can be represented by the normal distribution , so the following KL divergence expression is minimized:
[0064]
[0065] wherein D KL (·||·) calculates the KL divergence between the probability distributions and , and in view of the structure of the model to be trained, and The following methods are needed to fit the calculation, see the following formula:
[0066]
[0067]
[0068] According to another embodiment of the present application, the traffic flow, traffic flow density and speed are obtained by converting vehicle trajectory data into state data, including: dividing the traffic state space of the vehicle trajectory data into space-time regions; determining the total travel distance and travel time of the vehicle according to the coordinates of the vehicle entering and leaving the space-time region, the coordinates including position information and time information; obtaining the traffic flow, traffic flow density and speed according to the total travel distance and travel time.
[0069] Specifically, since the actual traffic state, such as traffic flow, density and speed, cannot be directly obtained, it is necessary to convert the vehicle trajectory data into state data in detail, and the above-mentioned traffic state can be converted into state data by vehicle trajectory data, the traffic state space of the vehicle trajectory data is divided into space-time regions, each space-time region corresponds to an element in the traffic state matrix, Figure 2 is a space-time region division schematic diagram of the embodiment of the present application, in which the traffic state space is divided into several rectangular space-time regions of 50m×5s, wherein A i and B i respectively represent the space-time coordinates of the ith vehicle entering and leaving the region; the total travel distance d(C) and travel time t(C) of the vehicle are determined according to the coordinates of the vehicle entering and leaving the region, see the following formula:
[0070] d(C)=∑ i x(B i )-x(A i );
[0071] t(C)=∑ i t(B i )-t(A i );
[0072] wherein x(·) and t(·) represent the position and time information corresponding to the space-time coordinates respectively; the traffic flow q(C), traffic flow density k(C) and speed v(C) are obtained according to the total travel distance d(C) and travel time t(C) combined with the area occupied by the space-time region, see the following formula:
[0073] k(C)=t(C) / |C|;
[0074] q(C)=d(C) / |C|;
[0075] v(C) = d(C) / t(C)
[0076] where |C| represents the area occupied by the space-time region. Figure 3 is a schematic diagram of traffic state information of each space-time region of an embodiment of the application, and different shades of blocks represent traffic flow speeds of different road segments at different times.
[0077] Based on the traffic state value obtained from the vehicle trajectory, the loss function L total The minimum value can be used to train the prediction model using the adam optimizer to obtain the required prediction model.
[0078] Step S102, encoding the index information, traffic state information of the observed space-time region, and the index information of the space-time region to be predicted by the encoder to obtain the traffic state vector of the observed space-time region and the traffic state first vector of the space-time region to be predicted.
[0079] Specifically, the encoder adopts an attention mechanism to extract the correlation between space-time regions through the index information, traffic state information of the observed space-time region, and the index information of the space-time region to be predicted, and to mine the space-time similarity to obtain the traffic state vector of the observed space-time region and the traffic state parameterized first vector of the space-time region to be predicted for subsequent processing by the redundant attention layer.
[0080] Step S103, processing the traffic state vector of the observed space-time region and the traffic state first vector of the space-time region to be predicted by the redundant attention layer using an attention mechanism to obtain the traffic state second vector of the space-time region to be predicted.
[0081] Specifically, the traffic state vector of the observed space-time region and the traffic state first vector of the space-time region to be predicted are taken as inputs of the redundant attention layer, and an attention mechanism is used to further extract the correlation between the traffic states of the space-time regions and to mine the similarity of the traffic states to obtain the traffic state second vector of the space-time region to be predicted.
[0082] According to an embodiment of the application, processing the traffic state vector of the observed space-time region and the traffic state first vector of the space-time region to be predicted by the redundant attention layer using an attention mechanism to obtain the traffic state second vector of the space-time region to be predicted includes: using the attention mechanism of the redundant attention layer to obtain the similarity of the traffic states of the two space-time regions according to the traffic state vector of the observed space-time region and the traffic state first vector of the space-time region to be predicted; and performing weighted summation on the traffic state vector of the observed space-time region based on the similarity to obtain the traffic state second vector of the space-time region to be predicted.
[0083] Specifically, the traffic state second vector of the to-be-predicted spatio-temporal region can be obtained through an attention function, wherein the attention function includes information of the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region, and similarity of traffic states is obtained according to the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region; the traffic state second vector of the to-be-predicted spatio-temporal region is obtained by weighted summation of the traffic state vector of the observed spatio-temporal region based on the similarity.
[0084] Exemplarily, the traffic state second vector of the to-be-predicted spatio-temporal region may be represented as:
[0085]
[0086] wherein Attn(·) is an attention function, the function w r (·) is realized by using the same MLP as the above-mentioned encoder, Q represents traffic state information of the to-be-predicted spatio-temporal region, the high-dimensional vector of the traffic state first vector r of the to-be-predicted spatio-temporal region is obtained by w (·) calculation; K represents traffic state information of the observed spatio-temporal region, the high-dimensional vector of the traffic state vector r r of the observed spatio-temporal region is obtained by w ii∈O (·) calculation; V adopts the same value as K, representing traffic state information of the observed spatio-temporal region, and the high-dimensional vector V of the traffic state vector r ii∈O of the observed spatio-temporal region is weighted and summed according to the similarity of traffic states between Q and K, to obtain the traffic state second vector
[0087] Figure 4 is a structural schematic diagram of the redundant attention layer of the embodiment of the present application, wherein r ii∈O represents a traffic state parameterized vector of the observed spatio-temporal region, r jj∈T represents a traffic state first vector of the to-be-predicted spatio-temporal region, the function w r (·) realized by MLP, obtains V, K and Q, wherein V and K are the same, both representing traffic state information of the predicted spatio-temporal region, and Q represents traffic state information of the to-be-predicted spatio-temporal region; V, K and Q are input into the attention function, and V is weighted and summed according to the similarity of Q and K, to obtain the traffic state second vector r j * j∈T .
[0088] Step S104, fusing the traffic state first vector of the to-be-predicted space-time region and the traffic state second vector of the to-be-predicted space-time region to obtain a traffic state vector of the to-be-predicted space-time region.
[0089] According to one embodiment of the present application, the fusing the traffic state first vector of the to-be-predicted space-time region and the traffic state second vector of the to-be-predicted space-time region comprises: fusing the traffic state first vector of the to-be-predicted space-time region and the traffic state second vector of the to-be-predicted space-time region in a residual connection manner.
[0090] Specifically, according to the above, the encoder and the redundant attention layer both adopt the attention mechanism, and the same implementation manner can be adopted, and the difference lies in that the encoder mainly mines the similarity of the space-time region through the index information of the space-time region to obtain the traffic state first vector of the to-be-predicted space-time region, and the redundant attention layer mainly mines the similarity of the space-time region traffic state through the space-time region traffic state to obtain the traffic state second vector of the to-be-predicted space-time region. The traffic state first vector of the to-be-predicted space-time region and the traffic state second vector of the to-be-predicted space-time region are fused in a residual connection manner to obtain the traffic state vector of the to-be-predicted space-time region which retains the characteristics of the first vector and the second vector.
[0091] The above prediction model considers the space-time region similarity and the traffic state similarity while predicting the traffic state in a residual connection manner, which not only ensures the rationality of the prediction result, but also avoids deepening the depth of the traffic prediction model, thereby ensuring the stability of training the traffic prediction model.
[0092] Figure 5 is a traffic prediction model structure schematic diagram of an embodiment of the present application, in which the observed space-time region index information x O , the traffic state information y o and the index information x T of the to-be-predicted space-time region are input into an encoder to obtain a traffic state first vector r T of the to-be-predicted space-time region and a traffic state vector r O of the observed space-time region; r T and r O are input into a redundant attention layer to obtain a traffic state second vector r T output by the redundant attention layer; * r T and r T * are input into a decoder after residual connection to obtain a traffic state prediction result with a mean and a standard deviation of μ T and σ T respectively.
[0093] According to another embodiment of the present application, before the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the method further comprises: selecting key spatio-temporal points from the spatio-temporal points of the observed spatio-temporal region by a greedy algorithm, and taking the index information and the traffic state information of the key spatio-temporal points as the index information and the traffic state information of the observed spatio-temporal region.
[0094] Specifically, the index information of the m to-be-predicted spatio-temporal regions and the n observed spatio-temporal regions is set in the traffic prediction model, and the encoder needs to calculate the state attention weight of the n observed spatio-temporal regions on the total m+n spatio-temporal regions, and output the traffic state first vector r of the m+n to-be-predicted spatio-temporal regions. T Therefore, the calculation complexity of the encoder is O((m+n)n), and similarly, the calculation complexity of the redundant attention layer is also O((m+n)n), and the calculation complexity of the decoder is O(m), that is, the calculation complexity is O((m+n)n) when the prediction model is used. Compared with the calculation complexity O((m+n) 3 ) of the existing Gaussian process regression model, the calculation complexity of the present application is greatly reduced, and can be used for real-time fine-grained traffic state prediction, especially in the scene where the number of connected cars is relatively sparse (at this time, the number of observed spatio-temporal regions is small, n << m).
[0095] Although the calculation complexity of the model is significantly reduced compared with the Gaussian process regression model, in the foreseeable future, with the increase in the number of connected cars, the model still faces the challenge of real-time requirement. For example: when the number of observed spatio-temporal regions n increases, the calculation complexity of the model will also increase accordingly. In order to reduce the calculation complexity of the model, the optimization goal of the present application becomes: from all the n observation data, select the top k (k << n) key data points for traffic state prediction, and reduce the calculation amount of the model as much as possible under the condition of sacrificing less prediction accuracy. For the problem of selecting the top k key data from the n known observation data, there are possible combinations, and it is not feasible to traverse all cases and calculate the prediction variance respectively.
[0096] In order to further improve the calculation efficiency of the present application, before the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the method further comprises: selecting k key spatio-temporal points from the spatio-temporal points of the observed spatio-temporal region by a greedy algorithm, and taking the index information and the traffic state information of the k key spatio-temporal points as the index information and the traffic state information of the observed spatio-temporal region.
[0097] According to one embodiment of the present application, the key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by a greedy algorithm, including: obtaining a candidate set for storing the key spatiotemporal points; in the case that the number of spatiotemporal points in the candidate set does not reach a set threshold, repeatedly performing the following operations until the number of spatiotemporal points in the candidate set reaches the threshold: calculating the importance of each spatiotemporal point of the spatiotemporal region by using the candidate set, and adding the spatiotemporal point with the largest importance to the candidate set as a key spatiotemporal point, and then updating the candidate set; and taking the key spatiotemporal points in the candidate set as the selected key spatiotemporal points.
[0098] Specifically, a candidate set K for storing the key spatiotemporal points is initialized; it is judged whether the number of spatiotemporal points in the candidate set K reaches a set threshold; in the case that the set number of spatiotemporal points is not reached, the importance of each spatiotemporal point of the spatiotemporal region is calculated according to the candidate set by using an importance function, and the spatiotemporal point with the largest importance is added to the candidate set as a key spatiotemporal point, and then the candidate set is updated until the number of spatiotemporal points in the candidate set reaches the set threshold.
[0099] Exemplarily, the importance function is defined as:
[0100]
[0101] wherein var(i) represents the variance of the observed data i obtained by using the traffic prediction model with the candidate set K as the input, which describes the uncertainty of the prediction result of the model, and for the spatiotemporal region with large uncertainty, if the corresponding traffic state is obtained, a larger information gain can be obtained; var i var(i) represents the variance of the vehicle speed of the spatiotemporal region corresponding to the observed data i, and when the candidate data set is empty, since no data can be used for the prediction of the model, the uncertainty of the fine-grained traffic state often occurs in the scene of traffic flow disturbance, especially in the scene of dramatic change of speed, and thus obtaining the traffic state of the region can greatly reduce the uncertainty of the prediction result.
[0102] The importance of each spatiotemporal point of the spatiotemporal region is calculated according to the candidate set by using the above importance function, and the spatiotemporal point with the largest importance is added to the candidate set as a key spatiotemporal point, so as to update the candidate set, and the first k key data points can be quickly selected, finally the key spatiotemporal points in the candidate set are taken as the selected key spatiotemporal points, and the index information and the traffic state information of the key spatiotemporal points are taken as the index information and the traffic state information of the observed spatiotemporal region.
[0103] Figure 6is a specific flowchart of selecting a candidate set K of the embodiment of the application, in which the candidate set K is first initialized, it is judged whether the number of spatiotemporal points in the candidate set reaches a set threshold value, if yes, the spatiotemporal points in the candidate set are directly output as the selected key spatiotemporal points; if not, in each iteration, the importance of the spatiotemporal points of each spatiotemporal region is calculated according to the candidate set by using an importance function, and the spatiotemporal point with the maximum importance is added to the candidate set, and finally the complete candidate set K for traffic model prediction is obtained.
[0104] Correspondingly, the specific selection process of the candidate set is as follows: based on the observed spatiotemporal region, the number threshold value of the key spatiotemporal points of the candidate set is set as k, the candidate set K is initialized, when the number of spatiotemporal points in the candidate set K is less than the threshold value k, the maximum value of the importance function is calculated as the key spatiotemporal point in the candidate set, which is added to the candidate set K, until the number of key spatiotemporal points in the candidate set K is equal to the threshold value, and the candidate set K is obtained.
[0105] Through the above analysis, it can be known that through the greedy algorithm, the final calculation complexity of the model is O((m+k)k). Compared with the calculation complexity of the initial model, when k<<n, the calculation complexity of the optimized model is further reduced, which meets the real-time requirement of the model in actual application.
[0106] Step S105: decoding the traffic state vector of the to-be-predicted spatiotemporal region by using the decoder to obtain the traffic state prediction result of the to-be-predicted spatiotemporal region.
[0107] Through the above prediction of the fine-grained traffic state, the upcoming traffic congestion can be responded in advance, the further propagation of the traffic congestion to the upstream is avoided, and the road traffic capacity is improved. Figure 7 is an application scenario diagram of the embodiment of the application, in the car-road cooperation automatic driving, ramp control and signal lamp control, the intelligent traffic system can improve the local traffic state through the fine traffic control, and then optimize the operation efficiency of the entire traffic system.
[0108] Figure 8 is a main module diagram of the traffic prediction device according to the embodiment of the application. As shown in Figure 8 the traffic prediction device 800 mainly includes an information input module 801, an encoding module 802, a redundant attention module 803, a fusion module 804 and a decoding module 805.
[0109] The information input module 801 is used for inputting the index information and traffic state information of the observed spatiotemporal region and the index information of the to-be-predicted spatiotemporal region into the traffic prediction model in response to a traffic prediction request, wherein the traffic prediction model includes an encoder, a redundant attention layer and a decoder.
[0110] The encoding module 802 is configured to encode the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region by the encoder to obtain a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region.
[0111] The redundant attention module 803 is configured to process the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the predicted spatio-temporal region by the redundant attention layer by using an attention mechanism to obtain a traffic state second vector of the to-be-predicted spatio-temporal region.
[0112] The fusion module 804 is configured to fuse the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region to obtain a traffic state vector of the to-be-predicted spatio-temporal region.
[0113] The decoding module 805 is configured to decode the traffic state vector of the to-be-predicted spatio-temporal region by the decoder to obtain a traffic state prediction result of the to-be-predicted spatio-temporal region.
[0114] Specifically, the traffic prediction apparatus 800 can further include a training module (not shown in the figure), configured to: before inputting the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region into the traffic prediction model, performing normalization processing on the index information of the observed spatio-temporal region and the traffic state information to obtain an observed data set; splitting the observed data set into an observation set and a prediction set; taking the observation set as a model input, and training the traffic prediction model by minimizing a loss function of the prediction set.
[0115] Specifically, the loss function includes a prediction accuracy loss function and a prediction reality loss function; wherein the prediction reality loss function is constructed by introducing the correlation between the traffic flow, the traffic flow density and the speed.
[0116] Specifically, the traffic flow, the traffic flow density and the speed are obtained by converting vehicle trajectory data into state data, including: dividing the traffic state space of the vehicle trajectory data into spatio-temporal regions; determining the total driving distance and driving time of a vehicle according to the coordinates of the vehicle entering and leaving the spatio-temporal region, the coordinates including position information and time information; obtaining the traffic flow, the traffic flow density and the speed according to the total driving distance and driving time.
[0117] Specifically, the redundancy attention module 803 is configured to: adopt an attention mechanism to obtain a similarity between traffic states of two spatio-temporal regions according to the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region through the redundancy attention layer; and perform weighted summation on the traffic state vector of the observed spatio-temporal region based on the similarity to obtain a traffic state second vector of the to-be-predicted spatio-temporal region.
[0118] Specifically, the fusion module 804 is configured to: adopt a residual connection manner to fuse the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region.
[0119] Specifically, the traffic prediction apparatus 800 can further include an optimization module (not shown in the figure) configured to: before inputting the index information and the traffic state information of the observed spatio-temporal region and the index information of the to-be-predicted spatio-temporal region into the traffic prediction model, select key spatio-temporal points from the spatio-temporal points of the observed spatio-temporal region through a greedy algorithm, and take the index information and the traffic state information of the key spatio-temporal points as the index information and the traffic state information of the observed spatio-temporal region.
[0120] Specifically, the optimization module (not shown in the figure) is configured to: obtain a candidate set for storing key spatio-temporal points; in a case where the number of spatio-temporal points in the candidate set does not reach a set threshold, repeatedly perform the following operations until the number of spatio-temporal points in the candidate set reaches the threshold: calculate the importance of each spatio-temporal point of the spatio-temporal region by using the candidate set, and add the spatio-temporal point with the maximum importance to the candidate set as a key spatio-temporal point, and then update the candidate set; and take the key spatio-temporal points in the candidate set as the selected key spatio-temporal points.
[0121] Figure 9 is an exemplary system architecture diagram to which embodiments of the present application can be applied.
[0122] As shown in Figure 9 The system architecture 900 can include terminal devices 901, 902, 903, a network 904 and a server 905. The network 904 is a medium for providing a communication link between the terminal devices 901, 902, 903 and the server 905. The network 904 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0123] A user can use the terminal devices 901, 902, 903 to interact with the server 905 through the network 904 to receive or send messages, etc. Various communication client applications, such as a traffic prediction application, etc. (only as an example), can be installed on the terminal devices 901, 902, 903.
[0124] The terminal devices 901, 902, and 903 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0125] The server 905 can be a server providing various services, such as a background management server (only an example) providing support for traffic prediction performed by a user using the terminal devices 901, 902, and 903. The background management server can input index information of an observed spatiotemporal region, traffic state information, and index information of a to-be-predicted spatiotemporal region into a traffic prediction model including an encoder, a redundant attention layer, and a decoder, in response to a traffic prediction request, encode the index information of the observed spatiotemporal region, the traffic state information, and the index information of the to-be-predicted spatiotemporal region by using the encoder to obtain a traffic state vector of the observed spatiotemporal region and a traffic state first vector of the to-be-predicted spatiotemporal region, process the traffic state vector of the observed spatiotemporal region and the traffic state first vector of the to-be-predicted spatiotemporal region by using an attention mechanism through the redundant attention layer to obtain a traffic state second vector of the to-be-predicted spatiotemporal region, fuse the traffic state first vector of the to-be-predicted spatiotemporal region and the traffic state second vector of the to-be-predicted spatiotemporal region to obtain a traffic state vector of the to-be-predicted spatiotemporal region, and decode the traffic state vector of the to-be-predicted spatiotemporal region by using the decoder to obtain a traffic state prediction result of the to-be-predicted spatiotemporal region, and the like, and feed back the processing result (such as traffic state data, only an example) to the terminal device.
[0126] It should be noted that the traffic prediction method provided in the embodiments of the present application is generally executed by the server 905, and accordingly, the traffic prediction apparatus is generally arranged in the server 905.
[0127] It should be understood that Figure 9 The number of terminal devices, networks, and servers in the embodiments of the present application is only illustrative. Any number of terminal devices, networks, and servers can be provided according to implementation needs.
[0128] Reference will be made to Figure 10 FIG. 10 is a structural schematic diagram of a computer system 1000 suitable for implementing the terminal device or server in the embodiments of the present application. Figure 10 The terminal device or server shown in FIG. 10 is only an example, and should not bring any limitation to the functions and use ranges of the embodiments of the present application.
[0129] As Figure 10As shown, the computer system 1000 includes a central processing unit (CPU) 1001 which can perform various suitable actions and processes in accordance with programs stored in a read only memory (ROM) 1002 or loaded from a storage section 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the system 1000 are also stored in the RAM 1003. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0130] Connected to the I / O interface 1005 are an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as necessary. A removable recording medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1010 as necessary, so that a computer program read therefrom is installed into the storage section 1008 as necessary.
[0131] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with the embodiments of the present disclosure. For example, the embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flow charts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1009, and / or installed from the removable recording medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-described functions defined in the system of the present disclosure are performed.
[0132] It should be noted that the computer-readable medium shown in the present 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 may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a carrier wave part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0133] The flow diagrams and block diagrams in the drawings are schematic illustrations of possible architectures, functions and operations of systems, methods and computer program products in accordance with various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may, in fact, be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flow diagrams, and combinations of blocks in the block diagrams or flow diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0134] The units described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. The described units can also be arranged in a processor, for example, a processor can be described as including an information input module, an encoding module, a redundant attention module, a fusion module and a decoding module.
[0135] In some cases, the names of the modules do not constitute a limitation of the modules themselves, for example, the fusion module can also be described as a module for fusing the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region to obtain the traffic state vector of the to-be-predicted spatio-temporal region.
[0136] In another aspect, the present application also provides a computer readable medium, which can be included in the device described in the embodiments or can exist independently without being assembled into the device. The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the device includes: in response to a traffic prediction request, inputting index information of an observed spatio-temporal region, traffic state information and index information of a to-be-predicted spatio-temporal region into a traffic prediction model, the traffic prediction model including an encoder, a redundant attention layer and a decoder; encoding the index information of the observed spatio-temporal region, the traffic state information and the index information of the to-be-predicted spatio-temporal region by the encoder to obtain a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region; processing the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region by the redundant attention layer using an attention mechanism to obtain a traffic state second vector of the to-be-predicted spatio-temporal region; fusing the traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region to obtain a traffic state vector of the to-be-predicted spatio-temporal region; and decoding the traffic state vector of the to-be-predicted spatio-temporal region by the decoder to obtain a traffic state prediction result of the to-be-predicted spatio-temporal region.
[0137] According to the technical scheme of the embodiment of the present application, the following advantages or beneficial effects are achieved: by inputting the index information of the observed space-time region, the traffic state information and the index information of the to-be-predicted space-time region into the traffic prediction model in response to the traffic prediction request, the traffic prediction model comprises an encoder, a redundant attention layer and a decoder; the index information of the observed space-time region, the traffic state information and the index information of the to-be-predicted space-time region are encoded by the encoder to obtain a traffic state vector of the observed space-time region and a traffic state first vector of the to-be-predicted space-time region; the traffic state vector of the observed space-time region and the traffic state first vector of the to-be-predicted space-time region are processed by the redundant attention layer using an attention mechanism to obtain a traffic state second vector of the to-be-predicted space-time region; the traffic state first vector of the to-be-predicted space-time region and the traffic state second vector of the to-be-predicted space-time region are fused to obtain a traffic state vector of the to-be-predicted space-time region; and the traffic state vector of the to-be-predicted space-time region is decoded by the decoder to obtain a traffic state prediction result of the to-be-predicted space-time region, which realizes the processing of the index information of the observed space-time region, the traffic state information and the index information of the to-be-predicted space-time region by the encoder, the redundant attention layer and the decoder in the traffic prediction model, obtains an accurate and reasonable prediction result of the traffic state of the to-be-predicted space-time region, solves the prediction problem of the sparse distribution of the fine-grained traffic state, improves the accuracy of the traffic state prediction result, meets the needs of the intelligent traffic system, improves the efficiency of the fine traffic control, promotes the development and popularization of the intelligent traffic system.
[0138] The specific implementation does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modification, equivalent replacement and improvement within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method of traffic prediction, characterized in that, The method comprises the following steps: In response to a traffic prediction request, index information of an observed spatio-temporal region, traffic state information of the observed spatio-temporal region, and index information of a to-be-predicted spatio-temporal region are input into a traffic prediction model, the traffic prediction model comprising an encoder, a redundant attention layer, and a decoder; the index information of the observed spatio-temporal region and the index information of the to-be-predicted spatio-temporal region correspond to data of the observed spatio-temporal region and data of the to-be-predicted spatio-temporal region, respectively; The index information of the observed spatio-temporal region, the traffic state information of the observed spatio-temporal region, and the index information of the to-be-predicted spatio-temporal region are input into the encoder, the correlation between the observed spatio-temporal region and the to-be-predicted spatio-temporal region is extracted, the spatio-temporal similarity is mined, and a traffic state vector of the observed spatio-temporal region and a traffic state first vector of the to-be-predicted spatio-temporal region output by the encoder are obtained; The redundant attention layer adopts an attention mechanism to obtain the similarity of the traffic states of the two spatio-temporal regions according to the traffic state vector of the observed spatio-temporal region and the traffic state first vector of the to-be-predicted spatio-temporal region; and the traffic state vector of the observed spatio-temporal region is weighted and summed based on the similarity of the traffic states of the two spatio-temporal regions to obtain a traffic state second vector of the to-be-predicted spatio-temporal region; The traffic state first vector of the to-be-predicted spatio-temporal region and the traffic state second vector of the to-be-predicted spatio-temporal region are fused in a residual connection manner to obtain a traffic state vector of the to-be-predicted spatio-temporal region; The traffic state vector of the to-be-predicted spatio-temporal region is decoded by the decoder to obtain a traffic state prediction result of the to-be-predicted spatio-temporal region.
2. The method of claim 1, wherein, Before the index information of the observed spatio-temporal region, the traffic state information of the observed spatio-temporal region, and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the method further comprises the following steps: The index information of the observed spatio-temporal region and the traffic state information of the observed spatio-temporal region are normalized to obtain an observed data set; The observed data set is split into an observation set and a prediction set; The observation set is used as model input, and the traffic prediction model is trained by minimizing the loss function of the prediction set.
3. The method of claim 2, wherein, The loss function comprises a prediction accuracy loss function and a prediction reality loss function; The prediction reality loss function is constructed by introducing the correlation among traffic flow, traffic flow density, and speed.
4. The method of claim 3, wherein, The traffic flow, traffic flow density, and speed are obtained by converting vehicle trajectory data into state data, comprising: The traffic state space of the vehicle trajectory data is divided into spatio-temporal regions; The total driving distance and driving time of a vehicle are determined according to the coordinates of the vehicle entering and leaving the spatio-temporal region, the coordinates comprising position information and time information; The traffic flow, traffic flow density, and speed are obtained according to the total driving distance and driving time.
5. The method of claim 1, wherein, Before the index information of the observed spatio-temporal region, the traffic state information of the observed spatio-temporal region, and the index information of the to-be-predicted spatio-temporal region are input into the traffic prediction model, the method further comprises the following steps: The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region.
6. The method of claim 5, wherein, The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region.
7. A traffic prediction device characterized by comprising: The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region.
8. A mobile electronic device terminal, characterized by The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region.
9. A computer readable medium having stored thereon a computer program, characterized in that, The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemporal region and traffic state information of the observed spatiotemporal region. The key spatiotemporal points are selected from the spatiotemporal points of the observed spatiotemporal region by using a greedy algorithm, and index information of the key spatiotemporal points and traffic state information of the key spatiotemporal points are taken as index information of the observed spatiotemp
Citation Information
Patent Citations
Action recognition method based on double-flow convolution attention
CN112926396A
Traffic prediction method and system based on multi-attention causal relationship
CN113627676A