Intelligent network connection traffic data repairing method
By combining the generator with multi-head spatiotemporal attention and graph convolutional gated recurrent units, and by optimizing the generator using generative adversarial networks, the shortcomings of existing traffic data repair methods in terms of real-time performance and accuracy are addressed, and efficient repair of intelligent connected traffic data is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-03-27
AI Technical Summary
Existing traffic data repair methods are insufficient in terms of real-time performance and accuracy, making it difficult to meet the needs of intelligent connected traffic data. In particular, they consume too much computation time and memory when applied to large-scale road networks, and they fail to capture long-term temporal correlation features.
A generator is used to extract hidden features from historical traffic flow data and fuse them with the fragments to be repaired. Generative adversarial networks are used to adjust the generator hyperparameters. Multi-head spatiotemporal attention and graph convolutional gated recurrent units are combined to mine the spatiotemporal correlation of traffic flow. The generator is optimized by adversarial training using WGAN to generate repair values that are closer to real data.
It improves the real-time performance and accuracy of data repair, captures the long-term temporal correlation characteristics of traffic flow, and reduces the increase in model parameters and computation time, thereby improving the accuracy of repaired data.
Smart Images

Figure CN116453329B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of data processing, and in particular to an intelligent networked traffic data repairing method. BACKGROUND
[0002] Traffic flow has spatiotemporal characteristics and can reflect real-time traffic congestion, which is of great significance to active control, emergency handling and other researches. With the continuous increase of highway mileage in China and the popularity of ETC equipment, people can continuously obtain a large amount of highway flow data. At the same time, with the rapid growth of intelligent networked vehicles, intelligent networked data, due to its flexibility, diversity and timeliness, provides data supplement for places where highway equipment is sparse. Therefore, intelligent networked data has become an important part of intelligent highway traffic flow data. However, due to equipment failure, missed detection, network failure and other phenomena, there are often missing values and outliers in the data. Missing data often limits the performance of the prediction model and affects the decision-making of highway active control.
[0003] Overall, the existing traffic data repairing methods at home and abroad can be divided into three types: statistical-based methods, deep learning-based methods and tensor decomposition-based methods. Among them, the statistical-based repairing method mainly estimates the size of the missing point by mining the internal relationship in the time dimension through the time series change relationship. The deep learning-based repairing method mostly uses models such as graph neural network and recurrent neural network that can find the spatiotemporal correlation in traffic flow data to estimate the size of the missing point by using the historical data of the missing point and its neighboring nodes. The tensor decomposition-based repairing method uses the high dimensionality and low rank of traffic flow, and minimizes the rank of the tensor through tensor decomposition to obtain the repaired data.
[0004] For the statistical-based repairing method, because only the time correlation of the road section is considered and the spatiotemporal correlation at the road network level is ignored, the repairing accuracy is not high. In addition, with the increase in the number of road sections to be repaired, the model calculation time and memory consumption also increase significantly, so it is difficult to effectively apply to large-scale road networks. For the deep learning-based repairing method, although the spatiotemporal correlation of traffic flow is considered, it is difficult to capture long-term time correlation features due to the limitation of model size, and the model accuracy needs to be improved. For the tensor decomposition-based repairing method, because the current data and historical data need to be combined into a tensor every time, and then the repairing result is calculated through training, it is not suitable for real-time application scenarios.
[0005] Therefore, there is an urgent need for an intelligent networked traffic data repairing method with high real-time performance and accuracy. SUMMARY
[0006] Therefore, the embodiment of the present disclosure provides an intelligent networked traffic data repairing method, which at least partially solves the problem of poor real-time performance and accuracy in the prior art.
[0007] The embodiment of the present disclosure provides an intelligent networked traffic data repairing method, which comprises:
[0008] Step 1, hidden features of traffic flow historical data are extracted by a generator and fused with a to-be-repaired segment to obtain fused features;
[0009] Step 2, the fused features are input into a spatio-temporal module of the generator to mine spatio-temporal correlation of the traffic flow, so as to obtain a repairing value corresponding to the to-be-repaired segment.
[0010] According to a specific implementation manner of the embodiment of the present disclosure, before the step 1, the method further comprises:
[0011] The WGAN is used for adversarial training of the generator and the discriminator, and the hyperparameters of the generator are adjusted to the state that the discriminator cannot distinguish between the observation value and the repairing value.
[0012] According to a specific implementation manner of the embodiment of the present disclosure, the step 1 specifically comprises:
[0013] Step 1.1, assuming that the to-be-repaired segment is X t ∈R N×T , the first p segments corresponding to the to-be-repaired segment are X r ∈R N×p*T , the segments of the previous p days are X d ∈R N×p*T , the segments of the previous p weeks are X w ∈R N×p*T , X r , X d , and X w are converted into H q ∈R N×p*T×D through a shared fully connected layer, and q ∈ {r, d, w}.
[0014] Step 1.2, hidden features of the historical segments are extracted using diffusion convolution and a gating mechanism
[0015] Step 1.3, the hidden features H are weighted and summed to obtain H f , and the H f is fused with the to-be-repaired segment to obtain fused features.
[0016] According to a specific implementation manner of the embodiment of the present disclosure, a calculation formula of the hidden features is
[0017]
[0018] wherein, W q1W q2 represents a diffusion convolution kernel, b q1 represents a bias term; q2 represents a bias term;
[0019] The calculation formula of the fusion feature is
[0020]
[0021] wherein z v = Z[v, :, :] ∈ R T×D , x v ∈ R T , f v ∈ R T×D are the vth node features of Z, X t , f respectively, σ is a nonlinear function, W f1 , W f2 , b f1 are parameters adjusted through training.
[0022] According to a specific implementation manner of the embodiment of the present disclosure, the space-time module comprises a multi-head space attention layer, a multi-head time attention layer and a graph convolution gated recurrent unit.
[0023] According to a specific implementation manner of the embodiment of the present disclosure, the step 2 specifically comprises:
[0024] Step 2.1, using the multi-head space attention layer to extract the spatial correlation of K-order neighbors around the fusion feature;
[0025] Step 2.2, taking the output of the multi-head space attention layer as the input of the multi-head time attention layer to extract the time correlation of the feature tensor;
[0026] Step 2.3, taking the output of the multi-head time attention layer as the input of the graph convolution gated recurrent unit to perform graph convolution and recurrent unit transformation, and obtaining the repair value corresponding to the to-be-repaired segment.
[0027] According to a specific implementation manner of the embodiment of the present disclosure, the calculation formula of the spatial correlation of the K-order neighbors is
[0028]
[0029] wherein || represents an average operation, Z (k-1) is the output of the previous layer and Z (0) = ZW p , H is the number of heads of the multi-head attention, is the attention weight from node u to node v, W S is a parameter adjusted through training;
[0030] The output of the multi-head time attention layer is
[0031]
[0032] wherein || represents an average operation, h is the number of heads of the multi-head time attention, W0is a trainable weight parameter,
[0033] The calculation formula of the repair value is
[0034]
[0035] wherein, z t = Z tem [:, t, :], and sigma is an activation function, is a degree matrix of , A is an adjacency matrix, I N is a unit matrix, W is an adjustable weight, and represents a Hadamard product.
[0036] The intelligent connected vehicle data repair scheme in the embodiment of the present disclosure includes: step 1, extracting hidden features of traffic flow historical data through a generator and fusing the hidden features with a to-be-repaired segment to obtain fused features; and step 2, inputting the fused features into a space-time module of the generator to mine the space-time correlation of the traffic flow, so as to obtain a repair value corresponding to the to-be-repaired segment.
[0037] The beneficial effects of the embodiment of the present disclosure are as follows: through the scheme of the present disclosure, the historical segment of the to-be-repaired segment is fused, and then the historical segment is weighted and summed with the to-be-repaired segment, so as to mine the hidden advanced semantic information in the historical segment, capture the long-term time correlation characteristics of the traffic flow without greatly increasing the model parameters and the calculation time, then, the multi-head space-time attention is fused with the graph convolution gate recurrent unit, the inherent space-time correlation of the traffic flow is deeply mined, finally, the generative adversarial network is used to make the repaired data closer to the real data distribution, and the real-time performance and the accuracy of the data repair are improved. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0039] Figure 1 A flowchart of an intelligent connected vehicle data repair method provided by the embodiment of the present disclosure is shown in the figure;
[0040] Figure 2A structural schematic diagram of a generator provided by an embodiment of the present disclosure is shown in FIG. 1.
[0041] Figure 3 A structural schematic diagram of a generative adversarial network provided by an embodiment of the present disclosure is shown in FIG. 2. DETAILED DESCRIPTION
[0042] The embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0043] The above and other aspects of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
[0044] It should be apparent that the foregoing description is meant to be illustrative only and that changes and modifications can be made by those skilled in the art without departing from the scope of the present disclosure. It is also to be understood that not all of the benefits described herein need to be utilized in any particular implementation and that one can design a system and / or method using only one or a subset of the benefits described herein. Those skilled in the art will readily recognize from the disclosure herein, that other applications of the disclosed concepts can be developed and used. Moreover, many embodiments have been described using a particular series of transactions and steps. Of course, it is clear that not all of these steps are required and that some can be combined or changed in order to achieve the benefits discussed herein.
[0045] It should be apparent that the foregoing description is meant to be illustrative only and that changes and modifications can be made by those skilled in the art without departing from the scope of the present disclosure. It is also to be understood that not all of the benefits described herein need to be utilized in any particular implementation and that one can design a system and / or method using only one or a subset of the benefits described herein. Those skilled in the art will readily recognize from the disclosure herein, that other applications of the disclosed concepts can be developed and used. Moreover, many embodiments have been described using a particular series of transactions and steps. Of course, it is clear that not all of these steps are required and that some can be combined or changed in order to achieve the benefits discussed herein.
[0046] In addition, in the following description, specific details are set forth in order to provide a thorough understanding of the examples. However, one skilled in the relevant art will recognize that the aspects can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth.
[0047] The embodiment of the disclosure provides a smart connected vehicle data repairing method, which can be applied to traffic data analysis process in urban road, highway and the like.
[0048] Referring to Figure 1 , a flowchart of a smart connected vehicle data repairing method provided by the embodiment of the disclosure is shown. As shown in the figure, the method mainly includes the following steps: Figure 1
[0049] Step 1, hidden features of traffic flow historical data are extracted by a generator and fused with a to-be-repaired segment to obtain fused features;
[0050] Further, the step 1 specifically includes:
[0051] Step 1.1, assuming that the to-be-repaired segment is X t ∈R N×T , the first p segments corresponding to the to-be-repaired segment are X r ∈R N×p*T , the p-day segments are X d ∈R N×p*T , the p-week segments are X w ∈R N×p*T , X r , X d , and X w are converted into H q ∈R N×p*T×D , q ∈ {r, d, w} through a shared fully connected layer.
[0052] Step 1.2, hidden features of historical segments are extracted using diffusion convolution and a gating mechanism
[0053] Step 1.3, the hidden features H are weighted and summed to obtain H f , and then fused with the to-be-repaired segment to obtain fused features.
[0054] Further, the calculation formula of the hidden features is
[0055]
[0056] Wherein, W q1 , W q2 represent diffusion convolution kernels, and b q1 , b q2 represent bias terms.
[0057] The calculation formula of the fused features is
[0058]
[0059] Wherein, zv = Z[v,:,:] e R T×D , x v e R T , f v e R T×D are the v-th node feature of Z, X t , f respectively, σ is a nonlinear function, W f1 , W f2 , b f1 are parameters adjusted by training.
[0060] In implementation, the specific structure of the generator is as shown in Figure 2 , assuming that the to-be-repaired segment is X t e R N×T , the first p segments corresponding to the to-be-repaired segment are X r e R N×p*T , the segments of the previous p days are X d e R N×p*T , the segments of the previous p weeks are X w e R N×p*T . The historical data fusion needs to go through 3 steps.
[0061] Step 1: convert X r , X d , X w all through a shared fully connected layer of a generator into H q e R N×p*T×D , q e {r, d, w}.
[0062] Step 2: use diffusion convolution and gating mechanism to extract hidden features of historical segments, and the calculation formula is as follows:
[0063]
[0064] wherein, W q1 , W q2 represent diffusion convolution kernels, and b q1 , b q2 represent bias terms.
[0065] Step 3: weighted sum of H to obtain H f , and the weight is a parameter that can be adjusted by training. Finally, H f and X t are fused into a fusion feature Z e R N×T×D containing historical information and current information, and the calculation method is as follows:
[0066]
[0067] wherein, z v= Z[v, :, :] ∈ R T×D , x v ∈ R T , f v ∈ R T×D are the v-th node features of Z, X t , f respectively, σ is a nonlinear function, W f1 , W f2 , b f1 are parameters that can be adjusted by training.
[0068] Step 2, input the fusion features into the spatio-temporal module of the generator to mine the spatio-temporal correlation of the traffic flow, and obtain the repair value corresponding to the to-be-repaired segment.
[0069] Further, the spatio-temporal module comprises a multi-head spatial attention layer, a multi-head temporal attention layer and a graph convolution gated recurrent unit.
[0070] Further, the step 2 specifically comprises:
[0071] Step 2.1, using the multi-head spatial attention layer to extract the spatial correlation of the K-order neighbors around the fusion features;
[0072] Step 2.2, taking the output of the multi-head spatial attention layer as the input of the multi-head temporal attention layer to extract the temporal correlation of the feature tensor;
[0073] Step 2.3, taking the output of the multi-head temporal attention layer as the input of the graph convolution gated recurrent unit to perform graph convolution and recurrent unit transformation, and obtaining the repair value corresponding to the to-be-repaired segment.
[0074] Further, the calculation formula of the spatial correlation of the K-order neighbors is
[0075]
[0076] wherein || represents an average operation, is the attention weight from node u to node v, Z (k-1) is the output of the previous layer and Z (0) = ZW p , H is the number of heads of the multi-head attention, W S is a parameter adjusted by training;
[0077] The output of the multi-head temporal attention layer is
[0078]
[0079] wherein || represents an average operation, h is the number of heads of the multi-head temporal attention, W0 is a trainable weight parameter,
[0080] The calculation formula of the repair value is
[0081]
[0082] wherein, z t = Z tem [:, t, :], and sigma is an activation function, is a degree matrix, A is an adjacency matrix, I N is a unit matrix, W is an adjustable weight, and represents a Hadamard product.
[0083] In specific implementation, considering that the spatiotemporal correlation strength of traffic flow data is often inconsistent, from the spatial dimension, even if all the nodes are directly connected to the center node, the correlation degree between them will also have strong and weak differences. From the time dimension, the correlation degree with the target segment at a closer time point is stronger. Therefore, the application adopts multi-head spatial attention and multi-head temporal attention to respectively excavate the spatial and temporal correlation of traffic flow. In addition, the correlation degree of space and time is excavated respectively just now, and the spatiotemporal characteristics of traffic flow are still mutually influenced and difficult to separate, so the GCGRU is used to capture the spatiotemporal characteristics of traffic flow at the same time.
[0084] This part takes the fusion features Z generated in the last stage as the model input, and obtains the traffic data repair value by using L stacked spatiotemporal modules and 1 output layer. Each spatiotemporal module includes 3 main parts: multi-head spatial attention, multi-head temporal attention and GCGRU. This part can be specifically divided into 3 steps:
[0085] Step 1: Multi-head spatial attention calculation
[0086] The multi-head spatial attention is used to extract the spatial correlation of K-order neighbors around the feature. The attention weight calculation method of the spatial attention is as shown in formula (3):
[0087]
[0088] wherein, w v,u is the attention weight of node u to node v, [·||·] represents a connection operation, is the encoded node feature representation, and alpha is a function of node correlation degree, which is represented by a fully connected layer.
[0089] The k-order multi-head attention operation of node u to node v is
[0090]
[0091] wherein, | | represents an average operation, Z(k-1) is the output of the previous layer and Z (0) p is the number of heads of multi-head attention, W S is trainable parameter.
[0092] Finally, the output of node v in the multi-head spatial attention layer is
[0093] Step 2: Multi-head temporal attention calculation
[0094] The output of step 1 is taken as the input of step 2 to extract the temporal correlation of the feature tensor. Because the temporal attention will ignore the order of the time sequence when calculating the weight between every two time stamps in the time sequence, the time position encoding needs to be added before that. The encoding formula is:
[0095]
[0096] where, t'∈[1,T] is the time stamp position in the time sequence. The time position encoding is connected with the output of step 1 to obtain the multi-head temporal attention input feature
[0097] The attention weight calculation process of the temporal attention is: where
[0098] Finally, the output of node v in the multi-head temporal attention layer is
[0099]
[0100] where, || represents the average operation, h is the number of heads of multi-head temporal attention, W0is trainable weight parameter,
[0101] Step 3: GCGRU calculation
[0102] The Graph Convolution Gate Recurrent Unit (GCGRU) is a model that jointly models the spatio-temporal relationship on the graph based on the GRU model and the GCN model. Specifically, it modifies the linear transformation of the input state and the hidden state in the original GRU to a graph convolution transformation. The calculation formula of the graph convolution is as follows:
[0103]
[0104] wherein, sigma is an activation function, is a degree matrix, A is an adjacency matrix, I N is a unit matrix, and W is an adjustable weight. The formula for obtaining the repair value corresponding to the to-be-repaired segment is:
[0105]
[0106] wherein, z t = Z tem [:, t, :], sigma is an activation function, f(·) is a GCN operation, and is a Hadamard product.
[0107] The intelligent networked traffic data repair method provided by the embodiment fuses the historical segment of the to-be-repaired segment, and then performs weighted summation on the to-be-repaired segment and the historical segment, so as to mine the hidden advanced semantic information in the historical segment, capture the long-term time correlation characteristics of the traffic flow without greatly increasing the model parameters and the calculation time, then fuse the multi-head spatio-temporal attention and the graph convolution gate recurrent unit, deeply mine the spatio-temporal correlation of the traffic flow, and finally use the generative adversarial network to make the repaired data closer to the real data distribution, thereby improving the real-time performance and the accuracy of data repair.
[0108] On the basis of the above embodiment, before step 1, the method further comprises:
[0109] The WGAN is used to perform adversarial training of the generator and the discriminator, and the hyperparameters of the generator are adjusted to make the discriminator unable to distinguish between the observed values and the repaired values.
[0110] In specific implementation, the generative adversarial network (GAN) is a model that uses the adversarial mechanism of the generator and the discriminator to make the result of the generator infinitely close to the real data. In the present application, the Wasserstein GAN (WGAN) is used for adversarial training. In the present application, the objective of the WGAN is to replace the missing values with the repaired values calculated by the generator, so that the discriminator cannot distinguish between the observed values and the repaired values.
[0111] In order to enable the discriminator to use the information of the time series before and after to judge which are the repaired values, the bidirectional GRU is used as the discriminator in the present application. In addition, in order to enable the discriminator to better guide the generator, a prompt matrix is also added to the input of the discriminator to accelerate the convergence of the discriminator.
[0112] The model training method used in the present application contains three loss functions:
[0113]
[0114]
[0115]
[0116] wherein, Loss G ,Loss D ,Loss I are generator loss, discriminator loss and inpainting loss respectively. X is the original matrix, M is the mask matrix, is the inpainting data, y is the real data. ⊙ denotes Hadamard product. G(·) denotes the generator, and D(·) denotes the discriminator.
[0117] The units described in the embodiments of the present disclosure can be implemented in a software manner or in a hardware manner.
[0118] It should be understood that various parts of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof.
[0119] The above is merely specific implementations of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any changes or replacements easily thought of by those skilled in the art within the technical scope disclosed by the present disclosure should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A method for intelligent connected vehicle data repair, characterized in that, The method comprises the following steps: Step 1, extracting hidden features of traffic flow historical data by a generator and fusing the hidden features with a to-be-repaired segment to obtain fused features; The step 1 specifically comprises: Step 1.1, let the fragment to be repaired be , the previous p fragments corresponding to the fragment to be repaired be , the previous p days of fragments be , the previous p weeks of fragments be , and be converted into through a shared fully connected layer; Step 1.
2. Extracting hidden features of historical segments using diffusion convolution and gating mechanism where the formula for calculating the hidden features is wherein, denotes a diffusion convolution kernel, denotes a bias term; Step 1.3, the hidden feature The weighted sum is obtained And fused with the to-be-repaired segment to obtain a fused feature, wherein a calculation formula of the fused feature is wherein, , , are respectively the v-th node feature of is a non-linear activation function, is a parameter adjusted by training; Step 2, inputting the fused features into a space-time module of the generator to mine space-time correlation of the traffic flow and obtain a repair value corresponding to the to-be-repaired segment; The step 2 specifically comprises: Step 2.1, using a multi-head space attention layer to extract space correlation of K-order neighbors around the fused features, wherein a calculation formula of the space correlation of the K-order neighbors is wherein, denotes the average operation, is the output of the previous layer and H is the number of heads of the multi-head temporal attention, is the attention weight from node u to node v, is a parameter adjusted by training; Step 2.2, taking an output of the multi-head space attention layer as an input of a multi-head time attention layer to extract time correlation of a feature tensor, wherein an output of the multi-head time attention layer is where || denotes an average operation, are trainable weight parameters, , ; Step 2.3, taking the output of the multi-head time attention layer as an input of a graph convolution gated recurrent unit to perform graph convolution and recurrent unit transformation, and obtaining the repair value corresponding to the to-be-repaired segment, wherein a calculation formula of the repair value is wherein , , is a non-linear activation function, , is the degree matrix of is the adjacency matrix, is the identity matrix, is an adjustable weight, denotes the Hadamard product.
2. The method of claim 1, wherein Before the step 1, the method further comprises: Using a WGAN to perform adversarial training of the generator and the discriminator, and adjusting hyperparameters of the generator to a state in which the discriminator cannot distinguish between observed values and repair values.
3. The method of claim 2, wherein The space-time module comprises a multi-head space attention layer, a multi-head time attention layer and a graph convolution gated recurrent unit.
Citation Information
Patent Citations
Real-time recommendation method for traffic signal control scheme based on deep learning
CN110491146A
Road network traffic time sequence characteristic data quality diagnosis and restoration method
CN111179591A