An Automatic Repair Method for Missing Traffic Loop Data Based on Latent Feature Learning
By constructing time and coil matrices using latent feature learning and optimizing the model using stochastic gradient descent, the problem of missing traffic flow data was solved, and data quality and statistical accuracy were improved.
Patent Information
- Application Number
- CN202310924001.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-07-26
AI Technical Summary
Existing technologies suffer from traffic flow data loss, especially large amounts of missing data, due to malfunctions in traffic sensing and detection equipment, which affects data quality and the accuracy of statistical results.
The implicit feature learning method is adopted. By constructing the implicit feature matrices of time and coils, the traffic flow parameter calculation model is optimized by using stochastic gradient descent. The introduction of correction terms automatically fills in missing data.
It effectively filled a large number of missing traffic flow data, improving data quality and the accuracy of traffic statistics results.
Smart Images

Figure SMS_4 
Figure SMS_5 
Figure SMS_6
Abstract
Description
Technical Field
[0001] This invention relates to an automatic repair method for missing traffic loop data based on latent feature learning, belonging to the field of intelligent transportation application technology. Background Technology
[0002] Traffic sensing and detection equipment collects dynamic traffic flow data in real time. This data is the foundation for intelligent transportation construction and the basis for decision-making in the quantitative management of traffic science. However, after the detection equipment has been in use for a period of time, traffic flow data loss may occur due to malfunctions in the detection or transmission equipment. Especially when damage to the traffic sensing and detection equipment is not detected in time, a large amount of data will be missing, which will seriously affect data quality. Data quality determines the accuracy of various traffic statistics and the precision of models. How to repair missing data, especially large amounts of missing data, to improve data quality has become a very important issue in the digital construction of intelligent transportation. Therefore, automatically repairing missing traffic detection data using artificial intelligence latent feature learning algorithms is of significant value and importance. Summary of the Invention
[0003] The purpose of this invention is to provide a method for automatically repairing missing traffic detection data, thereby increasing the accuracy of subsequent statistical indicators and models, and thus improving the quality of intelligent transportation digital construction.
[0004] To achieve the above objectives, the technical solution of the present invention provides an automatic repair method for missing traffic loop data based on latent feature learning, characterized by comprising the following steps:
[0005] Step 1: Perform matrix encoding on the traffic flow data collected by the loops. Define the traffic flow data in three dimensions: time features, loop number, and traffic flow parameter value. Based on the time features and loop number of the traffic flow data, construct a two-dimensional traffic flow parameter matrix R as row and column indicators. The value of each element in the traffic flow parameter matrix R is the traffic flow parameter value.
[0006] Step 2: Let there be a latent feature matrix K, a time latent feature matrix P, and a loop latent feature matrix Q, and let P = T·K and Q = L·K. Then the traffic flow parameter matrix R = P·Q T For the element value r in the i-th row and j-th column of the traffic flow parameter matrix R ij =p ik ·q kj , where p ik q is the time latent feature vector value corresponding to the i-th time. kj It is the hidden feature vector value of the j-th coil, and the inner product of the two is equal to the traffic flow parameter value of the j-th coil at the i-th time.
[0007] Step 3: Based on the relationship between the traffic flow parameter values obtained in Step 2 and the time latent feature vector values and the loop latent feature vector values, establish a traffic flow parameter value calculation model: r = f(t, 1) = pt · ql T Where t represents time, l represents coil, pt is the time latent feature vector value of time t, and ql is the coil latent feature vector value of coil l;
[0008] Step 4: Based on the traffic flow parameter calculation model obtained in Step 3, introduce the time correction term bt for time t and the coil correction term bl for coil l to obtain the final traffic flow parameter calculation model. for:
[0009] Step 5: Solve the traffic flow parameter values obtained in Step 4 using the stochastic gradient descent method to calculate the model. Obtain the optimal solution pt for pt and ql * and ql * Then, the missing traffic flow parameter value at time t and the first loop is pt. * ×ql * .
[0010] Preferably, in step 1, the time characteristic of the i-th traffic flow data is represented as T. i =[M i +W i +H i +P i +HL i ], where: M i W represents the monthly value for the i-th traffic flow data point. i H represents the weekday value for the i-th traffic flow data; i P represents the hourly value of the i-th traffic flow data point; i HL represents the peak period value for the i-th traffic flow data, ranging from [0, 1], where 0 represents not belonging to the commuting peak period and 1 represents belonging to the commuting peak period; i Let be the holiday value for the i-th traffic flow data, with a value range of [0, 1], where 0 represents no holiday and 1 represents a holiday.
[0011] Preferably, in step 1, the row index of the traffic flow parameter matrix R is the time feature, and the column index is the coil number.
[0012] Preferably, step 5 includes the following steps:
[0013] Step 5.1: Initialize pt, ql, bt, and bl;
[0014] Step 5.2: Set a total number of epochs for the iterations. For each epoch, perform parameter updates by taking the derivative:
[0015]
[0016]
[0017]
[0018]
[0019] In the formula, pt′, ql′, bt′ and bl′ are the time latent feature vector value, coil latent feature vector value, time correction term value and coil correction term value after each epoch, respectively.
[0020] Step 5.3: After several epochs, the parameters pt, ql, bt, and bl converge, and the optimal solution pt for pt and ql is obtained. * and ql * ;
[0021] Step 5.4: Obtain the missing traffic flow parameter value at time t and under the l-th coil = pt * ×ql * .
[0022] This invention can repair missing traffic flow data, especially large amounts of missing traffic flow data, thereby improving data quality and effectively enhancing the accuracy of various traffic statistics and model precision. This invention is the first to propose a traffic flow matrix encoding method, the first to propose traffic time latent feature learning and coil latent feature learning methods, and the first to apply them to repair missing traffic flow parameter data. Detailed Implementation
[0023] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0024] This embodiment discloses a method for repairing missing traffic loop data based on latent feature learning, which is particularly suitable for repairing a large amount of missing data. The method specifically includes the following steps:
[0025] Step 1: Perform matrix encoding on the traffic flow data collected by the loop detectors, including the following steps:
[0026] Step 1.1: Define traffic flow data with missing values into three dimensions: time characteristics, loop number, and traffic flow parameter values. It is necessary to perform digital repeatable feature extraction on the time dimension. The timestamp is concatenated and encoded according to five indicators: month, weekday, hour, peak period, and holiday, resulting in a time feature code value T. In this feature code value T: the month M ranges from [01, 02, 03, 04, ..., 12], corresponding to January, February, and December respectively; the weekday W ranges from [1, 2, ..., 7], corresponding to Monday, Tuesday, and Sunday respectively; the hour H ranges from [1, 2, ..., 24], corresponding to 1 AM, 2 AM, and midnight respectively; the peak period P ranges from [0, 1], where 0 represents not being in the commuting peak period and 1 represents being in the commuting peak period. In this embodiment, the commuting peak period is defined as 7:30-9:30 AM and 5:00-7:00 PM; the holiday HL ranges from [0, 1], where 0 represents not being a holiday and 1 represents being a holiday. Based on the above definitions, the time feature code value T of the i-th record... i =[M i +W i +H i +P i +HL i ].
[0027] Step 1.2: Construct a two-dimensional matrix, using time features as row indicators and coil numbers as column indicators, to build a single traffic flow parameter value matrix R containing missing values. The matrix encoding is now complete.
[0028] Step 2: For the traffic flow parameter matrix R, there are T different time features and L different numbered traffic loops, so R = T × L. There are some hidden factors that affect the traffic flow parameter values at different loop locations at different times. Let's define a hidden feature matrix K, where the hidden features are related to both the time and loop features. Then, define a time hidden feature matrix P, P = T·K, and a loop hidden feature matrix Q, Q = L·K. We can then derive the traffic flow parameter value matrix R = T × L = (T·K) × (L·K). T =P·Q T That is, the traffic flow parameter matrix R can be calculated by multiplying the time latent feature matrix and the loop latent feature matrix. For each data record value r in the traffic flow parameter value matrix R... ij (where i is the row number, i.e., the current time, and j is the column number, i.e., the current coil) We have: r ij =p ik ·q kj , where p ik q is the time latent feature vector value corresponding to the i-th time. kjIt is the hidden feature vector value of the j-th coil, and the inner product of the two is equal to the traffic flow parameter value of the j-th coil at the i-th time.
[0029] Step 3: Set the traffic flow parameter value calculation model f(t, 1). Based on steps 1 and 2, we can obtain r = f(t, 1) = pt·ql T Where t represents time, l represents the coil, pt is the time latent feature vector value of time t, and ql is the coil latent feature vector value of coil l. Next, the optimal time latent feature matrix pt suitable for this traffic flow data is solved using the stochastic gradient descent (SGD) method. * and the optimal coil hidden characteristic matrix ql * .
[0030] Step 4: Considering that some time characteristics occur relatively infrequently, and some coils may be subject to long-term damage, a time correction term bt and a coil correction term bl are introduced. The final calculation model... for: The formula for calculating the error between the model-calculated values and the measured traffic flow parameter values is as follows: Where n represents the coil number, and N represents the total number of coils. These are the traffic flow parameter values calculated by the nth coil model. This refers to the measured traffic flow parameter value of the nth coil, which further includes the following steps:
[0031] Step 4.1: Initialize the time latent feature matrix pt and the coil latent feature matrix ql, setting all values to 0; initialize the time correction term bt = 0.01 and the coil correction term bl = 0.01.
[0032] Step 4.2: Set a total of 50 epochs for iteration. For each epoch, perform parameter updates by taking the derivative:
[0033]
[0034]
[0035]
[0036]
[0037] In the formula, pt ′ ql ′ bt ′ And BL ′ These are the temporal latent feature matrix, coil latent feature matrix, temporal correction term, and coil correction term updated for each epoch.
[0038] Step 4.3: After the 50th iteration, the parameters pt, ql, bt, and bl have converged, and the optimal time latent feature matrix pt and coil latent feature matrix ql are obtained.
[0039] Step 4.4: By multiplying the time latent feature matrix and the coil latent feature matrix obtained from the solution, the missing traffic flow parameter values at time t and the l-th coil can be obtained.
Claims
1. A method for automatically repairing missing traffic loop data based on latent feature learning, characterized in that, Includes the following steps: Step 1: Perform matrix encoding on the traffic flow data collected by the loops. Define the traffic flow data in three dimensions: time features, loop number, and traffic flow parameter value. Based on the time features and loop number of the traffic flow data, construct a two-dimensional traffic flow parameter matrix R as row and column indicators. The value of each element in the traffic flow parameter matrix R is the traffic flow parameter value. Step 2: For the traffic flow parameter matrix R, there are T different time features and L different numbered traffic loops. Let there be a latent feature matrix K, a time latent feature matrix P, and a loop latent feature matrix Q, and let P = T·K and Q = L·K. Then the traffic flow parameter matrix R = P·Q T For the element value r in the i-th row and j-th column of the traffic flow parameter matrix R ij =p ik ·q kj , where p ik q is the time latent feature vector value corresponding to the i-th time. kj It is the hidden feature vector value of the j-th coil, and the inner product of the two is equal to the traffic flow parameter value of the j-th coil at the i-th time. Step 3: Based on the relationship between the traffic flow parameter values obtained in Step 2 and the time latent feature vector values and the loop latent feature vector values, establish a traffic flow parameter value calculation model: r = f(t,l) = pt·ql T Where t represents time, l represents coil, pt is the time latent feature vector value of time t, and ql is the coil latent feature vector value of coil l; Step 4: Based on the traffic flow parameter calculation model obtained in Step 3, introduce the time correction term bt for time t and the coil correction term bl for coil l to obtain the final traffic flow parameter calculation model. for: Step 5: Solve the traffic flow parameter values obtained in Step 4 using the stochastic gradient descent method to calculate the model. Obtain the optimal solution pt for pt and ql * and ql * Then, the missing traffic flow parameter value at time t and the l-th coil is pt. * ×ql * .
2. The automatic repair method for missing traffic loop data based on latent feature learning as described in claim 1, characterized in that, In step 1, the time characteristic of the i-th traffic flow data is represented as T. i =[M i +W i +H i +P i +HL i ], where: M i W represents the monthly value for the i-th traffic flow data point. i H represents the weekday value for the i-th traffic flow data; i P represents the hourly value of the i-th traffic flow data point; i HL represents the peak period value for the i-th traffic flow data, ranging from [0,1], where 0 represents not belonging to the commuting peak period and 1 represents belonging to the commuting peak period; i Let be the holiday value for the i-th traffic flow data, with a value range of [0,1], where 0 represents no holiday and 1 represents a holiday.
3. The automatic repair method for missing traffic loop data based on latent feature learning as described in claim 1, characterized in that, In step 1, the row indicators in the traffic flow parameter matrix R are time features, and the column indicators are coil numbers.
4. The automatic repair method for missing traffic loop data based on latent feature learning as described in claim 1, characterized in that, Step 5 includes the following steps: Step 5.1: Initialize pt, ql, bt, and bl; Step 5.2: Set a total number of epochs for the iterations. For each epoch, perform parameter updates by taking the derivative: In the formula, pt ′ ,ql ′ bt ′ And BL ′ These are the updated time latent feature vector value, coil latent feature vector value, time correction term value, and coil correction term value for each epoch. Step 5.3: After several epochs, the parameters pt, ql, bt, and bl converge, and the optimal solution pt for pt and ql is obtained. * and ql * ; Step 5.4: Obtain the missing traffic flow parameter value at time t and under the l-th coil = pt * ×ql * .
Citation Information
Patent Citations
Method for restoring data of highway meteorological station based on data integration
CN106372765A
Urban road traffic missing data interpolation method and related equipment
CN115599779A