A traffic flow data repairing method based on traffic flow data collection equipment loss judgment

CN117633447BActive Publication Date: 2026-09-04NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311687460.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2026-09-04
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

该模型的结构符合过去的数据特征,如数据采集设备的普及程度等,但是因为城市路网的数据采集设备是不断更新和添加的,交通流数据的缺失组成已和过去不同,当模型运用在实际中效果往往不尽人意

Benefits of technology

[0058] 1. Use the method of identifying missing data acquisition equipment to pinpoint the location of specific equipment installations, guiding the installation of equipment in actual work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117633447B_ABST
    Figure CN117633447B_ABST
Patent Text Reader

Abstract

The application provides a traffic flow data repairing method based on traffic flow data collection equipment loss judgment, collects traffic flow data, pre-processes into flow data, adds artificial loss, and records the topological relationship between lanes by using an adjacency matrix; a generative adversarial network containing a graph transformation network (GTN) is constructed; a constructed generative adversarial network is trained by using a generative adversarial training mode, flow data is input into the trained generator, and repaired data is output; the repairing efficiency of each intersection is calculated according to the flow data and the repaired data; and a camera device is additionally arranged in the region where the intersection with low repairing efficiency is located. The application improves the algorithm accuracy by the method of data collection equipment loss judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to technologies such as deep learning and traffic data repair, specifically to a traffic flow data repair method based on the judgment of missing traffic flow data collection equipment. Background Technology

[0002] With the rapid development of urban and internet technologies, the number of cars is increasing year by year, and the topology of urban roads is becoming increasingly complex. Utilizing big data technology to solve the increasingly serious problem of urban traffic congestion has become an inevitable trend. Big data technology often relies on the support of digital data collection equipment. Due to factors such as inclement weather, obstructed visibility, equipment malfunctions, and missing data, the traffic flow data collected by these devices is generally incomplete. Making accurate judgments about traffic conditions when existing data is incomplete is very difficult. Therefore, it is necessary to design appropriate algorithms to fill in and repair the missing lane-level traffic flow data.

[0003] Currently, deep learning methods are widely used to build suitable deep learning models from previously collected traffic flow data for data incompleteness and repair. While the structure of these models conforms to past data characteristics, such as the availability of data collection equipment, the composition of missing traffic flow data differs from the past due to the continuous updating and addition of data collection equipment in urban road networks. Consequently, the effectiveness of these models in practice is often unsatisfactory. Therefore, the ability to couple deep learning methods with reality is crucial. Summary of the Invention

[0004] The purpose of this invention is to propose a traffic flow data repair method based on the judgment of missing traffic flow data collection equipment.

[0005] The technical solution to achieve the purpose of this invention is: a traffic flow data repair method based on the judgment of missing traffic flow data collection equipment, comprising the following steps:

[0006] Step 1: Collect traffic flow data, preprocess it into traffic volume data, add artificial missing values, and use an adjacency matrix to record the topological relationships between lanes;

[0007] Step 2: Construct a generative adversarial network containing a graph transform network (GTN);

[0008] Step 3: Train the constructed generative adversarial network using a generative adversarial training method, input traffic data into the trained generator, and output repair data;

[0009] Step 4: Calculate the repair efficiency of each intersection based on traffic data and repair data;

[0010] Step 5: Install additional camera equipment in areas where repair efficiency is low.

[0011] Further, in step one, traffic flow data is collected, preprocessed into flow rate data, artificially missing values ​​are added, and the topological relationships between lanes are recorded using an adjacency matrix. The specific method is as follows:

[0012] (1) Collect traffic flow data and preprocess it into flow data.

[0013] Using traffic flow data collection equipment, information on all vehicles passing through the intersection is collected and preprocessed into traffic flow data with the number of vehicles passing through every five minutes. The rows of the traffic flow data are time intervals of five minutes, and the columns are the numbers of each lane.

[0014] (2) Add human-caused omissions to obtain traffic data containing human-caused omissions.

[0015] Artificial missing data refers to the phenomenon of extracting and saving known data at random locations in traffic data and setting it as unknown, thus creating the illusion of missing data. There are three modes of artificial missing data: row missing, column missing, and block missing. Row missing refers to the absence of data for a lane within a continuous time period; column missing refers to the simultaneous absence of data for lanes within a certain range within a short time period; and block missing refers to the simultaneous occurrence of row and column missing data. Based on user needs, three types of missing data with different degrees of absence are added to the traffic data. The locations in the data where artificial missing data is set are represented by a 0-1 matrix p, where 1 represents that the data at that location has artificial missing data, and 0 represents that no artificial missing data is set. p is used as the training label for the discriminator during network training.

[0016] (3) Analyze the topological relationships between lanes to obtain the adjacency matrix.

[0017] The adjacency relationship between lanes at an intersection is encoded into a symmetric matrix consisting of 0s and 1s, where 1 represents two lanes being adjacent and 0 represents the opposite, thus obtaining the adjacency matrix.

[0018] Furthermore, a generative adversarial network containing a graph transform network (GTN) is constructed, wherein:

[0019] (1) Overall architecture of generative adversarial networks

[0020] A Generative Adversarial Network (GAN) consists of a generator and a discriminator. The generator in the GAN consists of a de-pooling layer, a pooling layer, and a 3x3 convolutional layer. The generator's input is passed through a Graph Transform Network (GTN) to obtain output x1. x1 is passed through two convolutional layers to obtain output x2. x2 is passed through a pooling layer and two convolutional layers to obtain output x3. x3 is passed through a pooling layer and two convolutional layers to obtain output x4. x4 is passed through a de-pooling layer to obtain output. The output x4 is then added to x3 to obtain x5. x5 is passed through a de-pooling layer and two convolutional layers to obtain output. The output x5 is then added to x2 to obtain x6. x6 is then passed through two convolutional layers to obtain the generator's output.

[0021] The discriminator of the generative adversarial network consists of a de-pooling layer, a pooling layer, and a 3x3 convolutional layer. The input of the discriminator is passed through a graph transform network (GTN) to obtain the output x`1. x`1 is passed through two convolutional layers to obtain the output x`2. x`2 is passed through a pooling layer and two convolutional layers to obtain the output x`3. x`3 is passed through a de-pooling layer to obtain the output. The output is then added to x`2 to obtain x`4. x`4 is passed through two convolutional layers to obtain the discriminator's output.

[0022] (2) Graph Transformation Network (GTN)

[0023] The Graph Transform Network (GTN) is a model that combines multiple multi-head graph attention layers and fully connected layers, referencing the Transformer structure. First, traffic data v' containing human-caused omissions is fed into a graph attention module for computation. The result is then integrated by a fully connected module to obtain the feature input α. Next, v' is fed into another graph attention module to obtain the preprocessed input β. Finally, the feature input α and the preprocessed input β are added together and fed into a new graph attention module and a fully connected module to obtain the output of the GTN network.

[0024] The fully connected module includes a multi-head graph attention layer and a normalization layer. The output and input of the fully connected layer are directly added to form a residual chain, and then a normalization layer is added to form the fully connected module. The graph attention module also includes a multi-head graph attention layer and a normalization layer. The output and input of the multi-head graph attention layer are directly added to form a normalization layer to form the fully connected module. The multi-head graph attention layer adopts the principle of multi-head attention mechanism and incorporates three types of encoding: degree encoding, distance encoding, and route encoding. Specifically: the result of degree encoding is added to v` as the new input of the multi-head graph attention layer; after calculating the product of Q vector and K vector, the results of distance encoding and route encoding are added to the product result.

[0025] Furthermore, the traffic data is encoded in three ways based on the adjacency matrix k, resulting in degree encoding, distance encoding, and route encoding. Degree encoding is the sum of the in-degree and out-degree vectors of each lane's intersection, obtained by passing them through a fully connected layer. Distance encoding is the result of passing the distance vector, composed of the shortest distances between each lane, through a fully connected layer. The route encoding results are as follows, for lane i and lane j:

[0026]

[0027] Among them, c ij These are elements of matrix C, where N is the total number of lanes, and e is the number of lanes. n is the length of the nth lane, in meters. The output of matrix C through a fully connected layer is used as the result of route encoding.

[0028] Further, in step three, the constructed generative adversarial network is trained using a generative adversarial training method. Traffic data is input into the trained generator, and repaired data is output, where:

[0029] The loss function L of generator G G (G,D) is:

[0030]

[0031] x represents missing data. This is the repair data where the generator fills in all missing positions in x. It involves calculating the L2 norm from the repaired and missing data. E[...] is the loss function of the discriminator, and E[...] is the expected value of the result in the box.

[0032] Discriminator D The formula is as follows:

[0033]

[0034] p is the 0-1 matrix recorded when artificial deletions are added. When the discriminator inputs Or, when x is the value, the discriminator determines whether each position in the input data is a 0-1 matrix representing the true value or the repaired value.

[0035] Further, in step four, the repair efficiency of each intersection is calculated based on the traffic data and repair data. The specific method is as follows:

[0036] (1) Missing degree

[0037] Define the traffic capacity TA of the intersection during time period t. t for:

[0038]

[0039] Given the traffic flow of lane i at time t, input all non-missing data for that intersection at time t into the TA. t The actual traffic capacity is calculated using the formula. Next, calculate the average of all missing data, replace all missing data, and substitute all data into TA. t The estimated traffic capacity is calculated using the formula. TA t and Substituting the values ​​into the missing value calculation formula, we obtain the missing value, which is defined as:

[0040]

[0041] (2) Repair efficiency

[0042] The ratio of missing values ​​before and after repair is used as an indicator to evaluate the model for each repair result. The steps are as follows:

[0043] C. First, calculate the missing value before repair.

[0044]

[0045] and These are the actual traffic capacity and the estimated traffic capacity calculated from the data before model repair;

[0046] D. Recalculate the missing value after repair.

[0047]

[0048] and These are the traffic capacity calculated from the repaired data and the estimated traffic capacity, respectively.

[0049] c. and Substitution repair efficiency γ t The formula for repair efficiency γ during time period t. t The formula is:

[0050]

[0051] β represents the tolerance level, characterizing the difficulty of model requirements. The larger the β, the lower the requirements for the model. The repair efficiency γ is calculated over the entire time period.

[0052]

[0053] γ represents the model's repair capability; the larger the γ, the better the repair effect. n is the total number of time periods in a day.

[0054] A traffic flow data repair system based on the judgment of missing traffic flow data collection equipment is provided. The system implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment to achieve traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

[0055] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment, thereby realizing traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

[0056] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment is implemented, thereby realizing traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

[0057] Compared with the prior art, the significant advantages of this invention are:

[0058] 1. Use the method of identifying missing data acquisition equipment to pinpoint the location of specific equipment installations, guiding the installation of equipment in actual work.

[0059] 2. The algorithm accuracy is improved by using a method to determine the absence of data acquisition equipment, while also achieving coupling between reality and the algorithm. Attached Figure Description

[0060] Figure 1 This is a flowchart of the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment according to the present invention.

[0061] Figure 2 This diagram illustrates the batch data format and three missing data modes.

[0062] Figure 3 This is a structural diagram of the attention module in a multi-headed graph.

[0063] Figure 4 The diagram shows the structure of the Graph Transform Network (GTN).

[0064] Figure 5 This is a diagram of the generator structure.

[0065] Figure 6 This is a diagram of the discriminator structure. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] A traffic flow data repair method based on the judgment of missing traffic flow data collection equipment uses deep learning, employing a Graph-Transformer mechanism and adversarial neural networks to repair missing traffic data. Furthermore, a missing data assessment model identifies the intersections most in need of additional collection equipment, further improving the model's repair accuracy. Figure 1 As shown, it includes the following steps:

[0068] Step 1: Collect traffic flow data, preprocess it into flow data, add artificial missing values, and use an adjacency matrix to record the topological relationships between lanes.

[0069] (1) Collect traffic flow data and preprocess it into flow data v

[0070] Using traffic flow data collection devices such as cameras and geomagnetic coils, information on all vehicles passing through the intersection is collected and preprocessed into traffic flow data showing the number of vehicles passing through every five minutes. The rows of the traffic flow data are time intervals of five minutes, and the columns are the numbers of each lane.

[0071] (2) Adding artificially missing data, resulting in traffic data v` containing artificially missing data.

[0072] Artificial missing data refers to the phenomenon where known data from random locations in traffic data is extracted, saved, and set as unknown, creating the illusion of missing data. There are three modes of artificial missing data: row missing, column missing, and block missing. Row missing refers to the loss of data for a specific lane within a continuous time period, usually caused by equipment failure; column missing refers to the simultaneous loss of data for a certain range of lanes within a short time period, usually caused by communication failure; when row and column missing occur simultaneously, it is called block missing. The three modes of artificial missing data are as follows: Figure 2 As shown.

[0073] Based on user needs, three types of missing data with different degrees of missing information are added to the traffic data. The positions in the data where artificial missing information is set are represented by a 0-1 matrix p, where 1 represents that the data at that position has artificial missing information and 0 represents that no artificial missing information is set. p is used as the training label for the discriminator during network training.

[0074] (3) Analyze the topological relationships between lanes to obtain the adjacency matrix k.

[0075] The adjacency relationship between lanes at an intersection is encoded into a symmetric matrix consisting of 0s and 1s, where 1 represents two lanes being adjacent and 0 represents the opposite, thus obtaining the adjacency matrix.

[0076] Step 2: Construct a generative adversarial network containing a graph transform network (GTN).

[0077] (1) Overall architecture of generative adversarial networks

[0078] A Generative Adversarial Network (GAN) consists of a generator and a discriminator. The generator comprises a de-pooling layer, a pooling layer, and a 3x3 convolutional layer. The generator's input is passed through a Graph Transformer Network (GTN) to obtain output x1. x1 is passed through two convolutional layers to obtain output x2. x2 is passed through a pooling layer and two convolutional layers to obtain output x3. x3 is passed through a pooling layer and two convolutional layers to obtain output x4. x4 is passed through a de-pooling layer to obtain the output. This output is then added to x3 to obtain x5. x5 is passed through a de-pooling layer and two convolutional layers to obtain the output. This output is then added to x2 to obtain x6. Finally, x6 is passed through two convolutional layers to obtain the generator's output. The generator's result is as follows: Figure 5 As shown.

[0079] The discriminator of the generative adversarial network (GAN) consists of a de-pooling layer, a pooling layer, and a 3x3 convolutional layer. The input to the discriminator is passed through a Graph Transformer Network (GTN) to obtain output x`1. x`1 is then passed through two convolutional layers to obtain output x`2. x`2 is passed through a pooling layer and two convolutional layers to obtain output x`3. x`3 is then passed through a de-pooling layer to obtain the output. This output is then added to x`2 to obtain x`4. Finally, x`4 is passed through two convolutional layers to obtain the discriminator's output. The result of the discriminator is as follows: Figure 6 As shown.

[0080] (2) Graph Transformation Network (GTN)

[0081] The Graph Transform Network (GTN) is a model that combines multiple multi-head graph attention layers and fully connected layers, referencing the Transformer structure. First, traffic data v' containing human-caused omissions is fed into a graph attention module for computation. The result is then integrated by a fully connected module to obtain the feature input α. Next, v' is fed into another graph attention module to obtain the preprocessed input β. Finally, the feature input α and the preprocessed input β are added together and fed into a new graph attention module and a fully connected module to obtain the output of the GTN network. The GTN network output is shown below. Figure 4 As shown in (c).

[0082] The fully connected module includes a multi-head graph attention layer and a normalization layer. The output and input of the fully connected layer are directly added to form a residual chain, and then another normalization layer is added to complete the fully connected module. Figure 4 As shown in (b), the graph attention module includes a multi-head graph attention layer and a normalization layer. The output and input of the multi-head graph attention layer are directly added together, and then a normalization layer is added to form a fully connected module, as shown in (b). Figure 4 As shown in (a).

[0083] The multi-head graph attention layer utilizes the principles of the multi-head attention mechanism. It incorporates three encoding methods—degree encoding, distance encoding, and route encoding—into the original computational logic. Specifically: the result of the degree encoding is added to v', serving as the new input to the multi-head graph attention layer; after calculating the product of the Q-vector and K-vector, the results of the distance encoding and route encoding are added to the product. The computational logic of the multi-head graph attention layer is as follows: Figure 3 As shown.

[0084] Based on the adjacency matrix k, the traffic data is encoded in three ways, resulting in degree encoding, distance encoding, and route encoding. Degree encoding is the sum of the in-degree and out-degree vectors of each lane's intersection, obtained by passing each vector through a fully connected layer. Distance encoding is the result of passing the distance vector, composed of the shortest distances between each lane, through a fully connected layer. The route encoding results are shown below, taking lane i and lane j as an example:

[0085]

[0086] Among them, c ij These are elements of matrix C, where N is the total number of lanes, and e is the number of lanes. n It is the length of the nth lane, in meters.

[0087] The output of matrix C through the fully connected layer is used as the result of route encoding.

[0088] Step 3: Train the constructed generative adversarial network using a generative adversarial training method, input traffic data into the trained generator, and output repair data.

[0089] The improved generative adversarial network is trained using a generative adversarial training method, where the loss function L of the generator G is... G (G,D) is:

[0090]

[0091] x represents missing data. This is the repair data where the generator fills in all missing positions in x. It involves calculating the L2 norm from the repaired and missing data. This is the loss function of the discriminator, and E[...] is the expected value calculated from the result in the box. The discriminator D's... The formula is as follows:

[0092]

[0093] p is the 0-1 matrix recorded when artificial deletions are added. When the discriminator inputs Alternatively, when x is selected, the discriminator determines whether each position in the input data is a 0-1 matrix representing the true value or the corrected value. The training network has a batch size of 64, a learning rate of 1e-4, and 30 training epochs.

[0094] After training is complete, all traffic data v are input into the trained generator to obtain repaired data that fills in all the missing data.

[0095] Step 4: Calculate the repair efficiency of each intersection based on traffic data and repair data.

[0096] (1) Calculate the missing value for the traffic data containing missing information before repair and the repaired data output by the model, respectively, according to the definition of missing value.

[0097] Define the traffic capacity TA of the intersection during time period t. t for:

[0098]

[0099] Let i be the traffic flow of lane i at time t. Input all the non-missing data for this intersection at time t into the TA. t The actual traffic capacity is calculated using the formula. Next, calculate the average of all missing data, replace all missing data, and substitute all data into TA. t The estimated traffic capacity is calculated using the formula. TA t and Substituting the values ​​into the missing value calculation formula yields the missing value. The missing value is defined as:

[0100]

[0101] (2) Calculate the repair efficiency for each intersection.

[0102] The ratio of missing values ​​before and after repair is used as an indicator to evaluate the model for each repair result. The steps are as follows:

[0103] E. First, calculate the missing value before repair.

[0104]

[0105] and These are the actual traffic capacity and the estimated traffic capacity calculated from the data before model repair, respectively.

[0106] F. Recalculate the missing value after repair.

[0107]

[0108] and These are the traffic capacity calculated from the repaired data and the estimated traffic capacity, respectively.

[0109] c. and Substitution repair efficiency γ t The formula for repair efficiency γ during time period t. t The formula is:

[0110]

[0111] β represents the tolerance level, characterizing the difficulty of model requirements; the larger the β, the lower the requirements for the model. The repair efficiency γ over the entire time period is calculated as follows:

[0112]

[0113] γ represents the model's repair capability; the larger the γ, the better the repair effect. n is the total number of time periods in a day.

[0114] Step 5: Based on the repair efficiency γ, add camera equipment to the areas where the repair efficiency is low to greatly help the model improve its repair performance.

[0115] A threshold is set for the repair efficiency γ. When the repair efficiency γ of a certain intersection is lower than the threshold, the model cannot learn the correct distribution from the data, which can be considered as a serious data gap at the intersection. In practice, the camera equipment in the area where the intersection is located is maintained and added so that the surrounding lanes of the intersection can collect enough data to help the model extract the data distribution of the lanes at the intersection and enhance the data repair performance of the model.

[0116] This invention also proposes a traffic flow data repair system based on the judgment of missing traffic flow data collection equipment, and implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment to achieve traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

[0117] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment, thereby realizing traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

[0118] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for repairing traffic flow data based on the judgment of missing traffic flow data collection equipment is implemented, thereby realizing the repair of traffic flow data based on the judgment of missing traffic flow data collection equipment.

[0119] Example

[0120] To verify the effectiveness of the present invention, the following experiments were conducted. The specific implementation includes the following steps:

[0121] Step 1: Identify all lanes requiring data repair, collect traffic flow data, preprocess the data into 288 time periods with a 5-minute time step, and add three modes of human error correction as needed to obtain traffic flow data with human error correction. Finally, encode the adjacency relationships between lanes at the intersection into a symmetric matrix composed of 0s and 1s, where 1 represents two adjacent lanes and 0 represents two non-adjacent lanes. This symmetric matrix is ​​called the adjacency matrix.

[0122] Step 2: Construct a generative adversarial network containing a graph transform network (GTN).

[0123] Step 3: Train the constructed generative adversarial network using a generative adversarial training method. Input the traffic data and adjacency matrix into the trained generator and output the repaired data.

[0124] Step 4: Calculate the repair efficiency of each intersection based on traffic data and repair data.

[0125] Step 5: From the results obtained in Step 4, select the three intersections with the lowest repair efficiency, add camera equipment, and repeat Steps 1 to 3 again to obtain the repair efficiency after the addition. Compare the repair efficiency before and after the addition, as shown in the following figure:

[0126] Intersection 1 0.41 0.69 Intersection 2 0.42 0.73 Intersection 3 0.40 0.59

[0127] It was found that the installation of camera equipment at the three intersections significantly improved the repair efficiency and enhanced the model's ability to fit the data distribution.

[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A traffic flow data repair method based on the judgment of missing traffic flow data collection equipment, characterized in that, Includes the following steps: Step 1: Collect traffic flow data, preprocess it into traffic volume data, add artificial missing values, and use an adjacency matrix to record the topological relationships between lanes; Step 2: Construct a generative adversarial network containing a graph transform network (GTN); in: (1) Overall architecture of generative adversarial networks A Generative Adversarial Network (GAN) consists of a generator and a discriminator. The generator in the GAN comprises a de-pooling layer, a pooling layer, and a 3x3 convolutional layer. The input to the generator is passed through a Graph Transform Network (GTN) to obtain the output. ,Will The output is obtained through two convolutional layers. ,Will The output is obtained through a pooling layer and two convolutional layers. ,Will The output is obtained through a pooling layer and two convolutional layers. ,Will The output is obtained through a de-pooling layer, and then the output is combined with... Adding them together gives ,Will The output is obtained through a de-pooling layer and two convolutional layers, and then the output is summed with... Adding them together gives ,Will The generator output is obtained through two convolutional layers; The discriminator of the generative adversarial network consists of a de-pooling layer, a pooling layer, and a 3x3 convolutional layer; the input of the discriminator is passed through a graph transform network (GTN) to obtain the output. ,Will The output is obtained through two convolutional layers. ,Will The output is obtained through a pooling layer and two convolutional layers. ,Will The output is obtained through a de-pooling layer, and then the output and... Adding them together gives ,Will The discriminator's output is obtained through two convolutional layers; (2) Graph Transform Network (GTN) Graph Transform Network (GTN) is a model that combines multi-layered multi-head graph attention layers and fully connected layers, referencing the Transformer structure. It first processes traffic data containing human-intentioned errors. The input is fed into a graph attention module for computation, and the result is then integrated by a fully connected module to obtain the feature input α; then... The input is fed into another graph attention module to obtain the preprocessed input β; finally, the feature input α and the preprocessed input β are added together and fed into a new graph attention module and a fully connected module to obtain the output of the GTN network. The fully connected module includes a multi-head graph attention layer and a normalization layer. The output and input of the fully connected layer are directly added to form a residual chain, and then a normalization layer is added to complete the fully connected module. The graph attention module also includes a multi-head graph attention layer and a normalization layer. The output and input of the multi-head graph attention layer are directly added to form a normalization layer to complete the fully connected module. The multi-head graph attention layer adopts the principle of multi-head attention mechanism, incorporating three encoding methods: degree encoding, distance encoding, and route encoding. Specifically, the result of the degree encoding is combined with... The results of the Q-vector and K-vector are added together and used as new input to the multi-head graph attention layer; after calculating the product of the Q-vector and K-vector, the results of the distance encoding and route encoding are added to the product. Step 3: Train the constructed generative adversarial network using a generative adversarial training method, input traffic data into the trained generator, and output repair data; Step 4: Calculate the repair efficiency of each intersection based on traffic data and repair data; Step 5: Install additional camera equipment in areas where repair efficiency is low.

2. The traffic flow data repair method based on the judgment of missing traffic flow data collection equipment according to claim 1, characterized in that, Step 1: Collect traffic flow data, preprocess it into flow rate data, add artificially missing values, and record the topological relationships between lanes using an adjacency matrix. The specific method is as follows: (1) Collect traffic flow data and preprocess it into flow data. Using traffic flow data collection equipment, information on all vehicles passing through the intersection is collected and preprocessed into traffic flow data with the number of vehicles passing through every five minutes. The rows of the traffic flow data are time intervals of five minutes, and the columns are the numbers of each lane. (2) Add human-caused missing data to obtain traffic data containing human-caused missing data. Artificial missing data refers to the phenomenon of extracting and saving known data from random locations in traffic data and setting it as unknown, thus creating the illusion of missing data. There are three modes of artificial missing data: row missing, column missing, and block missing. Row missing refers to the absence of data for a specific lane within a continuous time period; column missing refers to the simultaneous absence of data for a certain range of lanes within a short time period; and block missing refers to the simultaneous occurrence of row and column missing data. Based on user needs, different levels of missing data are added to the traffic data, and the locations where artificial missing data is set are represented by a 0-1 matrix. This indicates that 1 represents that the data at this position has been artificially omitted, and 0 represents that no artificial omissions have been set. p will be used as the training label for the discriminator during network training. (3) Analyze the topological relationships between lanes to obtain the adjacency matrix. The adjacency relationship between lanes at an intersection is encoded into a symmetric matrix consisting of 0s and 1s, where 1 represents two lanes being adjacent and 0 represents the opposite, thus obtaining the adjacency matrix.

3. The traffic flow data repair method based on the judgment of missing traffic flow data collection equipment according to claim 1, characterized in that, According to the adjacency matrix Traffic flow data is encoded in three ways, resulting in degree encoding, distance encoding, and route encoding. Degree encoding is achieved by passing the in-degree and out-degree vectors of each lane at the intersection through a fully connected layer and then summing the outputs. Distance encoding is obtained by passing the distance vector, composed of the shortest distances between each lane, through a fully connected layer. Route encoding results are as follows, for each lane... and lane : ; in, It is a matrix elements, It is the total number of lanes. It is the first The length of each lane, in meters; [The matrix is ​​missing from the original text.] The output of the fully connected layer is used as the result of route encoding.

4. The traffic flow data repair method based on the judgment of missing traffic flow data acquisition equipment according to claim 1, characterized in that, Step 3: Train the constructed generative adversarial network using a generative adversarial training method. Input the traffic data into the trained generator and output the repaired data, where: generator loss function for: ; It's missing data. It is a generator pair Repaired data that fills in all missing locations. It involves calculating the L2 norm from the repaired data and the missing data. It is the loss function of the discriminator. It calculates the expected value of the result in the box; Discriminator of The formula is as follows: ; This is a 0-1 matrix recorded when human error is added. When the discriminator inputs or At that time, the discriminator determines whether each position in the input data is a 01 matrix of the true value or the repaired value.

5. The traffic flow data repair method based on the judgment of missing traffic flow data collection equipment according to claim 1, step four, calculating the repair efficiency of each intersection based on the traffic flow data and the repair data, specifically as follows: (1) Missing degree Define the intersection at Traffic capacity during different time periods for: ; For lane At The traffic flow during the time period is used to input all the non-missing data for the intersection at time t. The actual traffic capacity is calculated using the formula. Then calculate the average of all missing data, replace all missing data, and substitute all data into the... The estimated traffic capacity is calculated using the formula. ,Will and Substituting the values ​​into the missing value calculation formula, we obtain the missing value, which is defined as: ; (2) Repair efficiency The ratio of missing values ​​before and after repair is used as an indicator to evaluate the model for each repair result. The steps are as follows: A. First, calculate the missing value before repair. : ; and These are the actual traffic capacity and the estimated traffic capacity calculated from the data before model repair; B. Recalculate the missing value after repair. : ; and These are the traffic capacity calculated from the repaired data and the estimated traffic capacity, respectively. c. and Substitute repair efficiency The formula for repair efficiency during time period t. The formula is: ; Tolerance, characterizing the level of difficulty in meeting the requirements of the model. The larger the value, the lower the requirements for the model, and the easier it is to calculate the repair efficiency over the entire time period. : ; Characterize the repair capability of the model. The larger the value, the better the repair effect. This represents the total number of time periods in a day.

6. A traffic flow data repair system based on the judgment of missing traffic flow data collection equipment, characterized in that, The traffic flow data repair method based on the judgment of missing traffic flow data collection equipment, as described in any one of claims 1-5, is implemented to achieve traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment as described in any one of claims 1-5, thereby realizing traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

8. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the traffic flow data repair method based on the judgment of missing traffic flow data collection equipment as described in any one of claims 1-5, thereby realizing traffic flow data repair based on the judgment of missing traffic flow data collection equipment.

Citation Information

Patent Citations

  • Image completion method based on uncertainty estimation

    CN112686817A

  • Traffic big data restoration method of graph auto-encoder based on self-attention mechanism

    CN112905379A