A Vehicle Abnormality Recognition Method Based on Kernel Density Estimation and Isolation Forest Algorithm
Through ETC data, a vehicle travel time model is established using kernel density estimation and isolated forest algorithms, which solves the problems of sensor dependence and deep learning calculation consumption, and realizes efficient and real-time detection of abnormal identification of highway vehicles.
Patent Information
- Application Number
- CN202310065564.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-01-13
AI Technical Summary
The prior art relies on sensor equipment in vehicle abnormality recognition, resulting in low deployment rate and high data acquisition difficulty. The calculation based on deep learning method takes a long time and poor real-time performance, making it impossible to fully cover the recognition of highway vehicle abnormality.
Using ETC data, a time-varying model of vehicle travel time is established through kernel density estimation and isolated forest algorithm, anomaly points are detected, and anomaly determination criteria are generated.
Vehicle abnormality identification based on ETC data is realized, high-cost data acquisition and complex calculation are avoided, and the safety control level of highways is improved.
Smart Images

Figure CN116070160B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent transportation information technology, and particularly relates to a vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm, which is applicable to the recognition of abnormal vehicles in ETC gantry devices deployed on expressways. Background Technique
[0002] In recent years, with the sharp increase in the number of motor vehicles, the number of traffic accidents on expressways in China has also been rising continuously. And relevant institutions' investigation and research found that abnormal driving behavior is the main factor causing traffic accidents. If abnormal vehicles cannot be detected and controlled in time, it will, at the least, increase traffic congestion and reduce road traffic capacity, and at the most, trigger traffic accidents, causing casualties and huge economic losses. Therefore, identifying abnormal vehicles on the road and intervening in abnormal vehicles in a timely manner will help avoid some traffic safety risks and reduce traffic accidents caused by abnormal driving, which is of great significance to improving the traffic road safety level.
[0003] By consulting patents and papers related to vehicle anomaly recognition, most of the existing methods use microscopic data of vehicle driving states collected by various sensing devices such as built-in accelerometers, gyroscopes, and magnetometers in vehicles, and often can obtain a relatively high anomaly recognition accuracy and driving behavior classification through training neural networks with a large amount of data. However, due to the data source relying on sensor devices, the vehicle deployment rate is low, not comprehensively covered yet, and the data collection is difficult; and although the deep learning-based method can avoid establishing an accurate analytical model, it requires a large amount of data to extract features, consumes a long time in calculation, and has poor real-time performance.
[0004] Since ETC data contains rich specific information of individual vehicles, and is widely distributed and of good quality, establishing a model through ETC gantry data to recognize vehicle anomalies can be applicable to basically all expressways. Therefore, using ETC data for vehicle anomaly recognition has very important economic value and significance. Summary of the Invention
[0005] In view of this, in order to solve the problems mentioned in the above background, the present invention provides a vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm.
[0006] The purpose of the present invention is achieved through the following technical solutions:
[0007] A vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm includes the following steps:
[0008] Step 1: According to the ETC data of the expressway, perform spatio-temporal matching on the driving data passing through two adjacent ETC gantries to determine the ETC spatio-temporal matching data of each vehicle;
[0009] Step 2: Calculate the travel times of all vehicles passing through two adjacent ETC gantries based on the ETC spatio-temporal matching data;
[0010] Step 3: Set a travel time threshold to screen out valid travel time records from the travel times of all vehicles;
[0011] Step 4: Based on the historical vehicle travel time data, use a distribution-free kernel density function estimator to obtain the estimated conditional probability density function of travel time for each sampling time period within a day;
[0012] Step 5: Based on the estimated conditional probability density function of travel time, establish a travel time distribution model using functional principal component analysis;
[0013] Step 6: Train and construct an isolation forest model based on the historical travel time data, and the isolation forest model is used to detect outliers in the historical data;
[0014] Step 7: According to the travel time distribution functions in different time periods, use the isolation forest algorithm to detect outliers in the historical travel time data and generate vehicle travel time anomaly determination criteria based on different time periods.
[0015] Furthermore, the specific content of Step 2 is as follows:
[0016] Determine the time window, and calculate the travel time T of each vehicle between adjacent ETC gantries in different time periods within a day at a certain time interval ijk :
[0017]
[0018] In the formula,
[0019] T ijk represents the travel time of a certain vehicle between ETC gantries i and j on the selected road section within time period k;
[0020] T ik and T jk respectively represent the times when passing through ETC gantries i and j within time period k, and the vehicle driving direction is from ETC gantry station i to j, T ik <T jk , that is, ETC gantry i represents the collection point at the upstream of the road, and ETC gantry j represents the collection point at the downstream of the road.
[0021] Furthermore, the specific content of Step 4 is as follows:
[0022] Step 4.1: Set the unit time length as one day, and set the sampling time interval as 10 minutes within one day;
[0023] Step 4.2: According to the sampling time interval, obtain the vehicle travel time data set at different departure times within a day at the sampling time points, and the number of sampling time points is the number of data set samples;
[0024] Step 4.3: According to the travel time data set, perform fitting using non-parametric kernel density estimation. Then, the formula for the kernel density estimation of the k-th period is:
[0025]
[0026] In the formula,
[0027] K(·) is the kernel function;
[0028] h is the bandwidth;
[0029] n is the total number of travel time sample sets;
[0030] x is the currently sought sample;
[0031] x k,l is the l-th sample in the sample set of the k-th period;
[0032] is the density function of the data set corresponding to the k-th period.
[0033] Furthermore, the specific content of Step 5 is as follows:
[0034] Step 5.1: According to the non-stationarity of the travel time at different times of the day, expand the travel time probability density function of each time period into a random function using Karhunen–Loève expansion:
[0035]
[0036] In the formula,
[0037] m is the label of the random component;
[0038] μ(x) is the mean function;
[0039] is the eigenfunction of the m-th random component;
[0040] ξ m is the projection score of the centered function f(x) - μ(x) on the eigenfunction ;
[0041] Step 5.2: Regard the random part in the Karhunen–Loève expression in Step 5.1 as the influence of different time periods on the travel time, and combine the density function Perform functional principal component analysis on it to obtain the estimated functions of each component within the model in step 5.1 and the functional travel time density estimation model:
[0042]
[0043] In the formula,
[0044] is the estimated mean function, α0(x) is obtained when the local linear minimization of the kernel density function is performed, that is, the value of α0 when the following formula is minimized:
[0045]
[0046] Among them, L1 represents the first objective function, k represents the label of the time period, K represents the total number of time periods within a day, m represents the label of the random component, M represents the total number of random components, α0 represents the undetermined coefficient, α1 represents the undetermined coefficient, x m represents the travel time sample value of the m-th random component;
[0047] is the estimated eigenfunction, is the eigenvalue, which can be obtained from the eigen-equation:
[0048]
[0049] Among them, G k represents the sample covariance of time period k, and G is obtained through the following local linear minimization k (x m ,x m' ) = β0(x m ,x m' ), that is, the value of β0 when the following formula is minimized:
[0050]
[0051] Among them, L2 represents the second objective function, G k represents the sample covariance of time period k, m′ represents the subscript of the random component different from m (that is, m′ and m cannot be the same), x m′ represents the travel time sample value of the m′-th random component, x′ represents the travel time parameter corresponding to x m′ , β0 represents the undetermined coefficient, β 11 represents the undetermined coefficient, β 12 represents the undetermined coefficient;
[0052] M is obtained from the cumulative contribution rate δ not less than 90%:
[0053]
[0054] To estimate the conditional average function It is obtained by locally linearly minimizing the kernel density function, that is, the value of γ0 when the following formula is minimized:
[0055]
[0056]
[0057] where L3 represents the third objective function, K μ , K c , K ξ are kernel functions, h μ , h c , h ξ are bandwidths, all of which can be selected by the Leave-P-Out cross-validation method, t k represents the time of period k, t represents the time parameter, γ0 represents the undetermined coefficient, and γ1 represents the undetermined coefficient.
[0058] Step 5.3: According to the travel time density function obtained in Step 5.2, use discrete approximation to obtain the travel time distribution model for different periods:
[0059]
[0060] Furthermore, the specific steps of Step 6 are as follows:
[0061] Step 6.1: Use the historical travel time data as the training set samples, and respectively extract sub-samples of a fixed length within different periods from them. Randomly divide the features to construct an isolation tree. After each sub-sample is built into an isolation tree, they jointly form an isolation forest:
[0062] iForest(X,p,ψ)
[0063] In the formula,
[0064] X is the input data set;
[0065] p is the number of isolation trees;
[0066] ψ is the number of sampling samples for each tree.
[0067] Step 6.2: For each node sample x, comprehensively calculate the results of each tree for it, and use the outlier function to determine the outlier points in the travel time data and calculate the outlier factor score s:
[0068]
[0069] In the formula,
[0070] h(x) is the path length of x in each tree;
[0071] E(h(x)) is the expected value of the path length of x in multiple trees;
[0072] c(ψ) is the average value of the path length when the given number of samples is ψ, and is used to standardize the path length h(x) of the sample x;
[0073] Step 6.3: According to the outlier factor score of the sample x, determine whether it is an outlier:
[0074] If the outlier score is close to 1, then it is determined to be an outlier;
[0075] If the outlier score is much less than 0.5, then it is determined not to be an outlier;
[0076] If the scores of all points are around 0.5, then it is determined that there are no outliers in the sample.
[0077] Further, the specific steps of step 7 are as follows:
[0078] Step 7.1: According to the outliers obtained by the isolation forest algorithm in step 6 and the travel time distribution model in step 5.3, calculate the probability density value of the abnormal data in the corresponding time period to obtain the determination criteria for the abnormal travel time of vehicles in different time periods. Outside this interval is the abnormal travel time. represents the minimum threshold of the normal travel time of the vehicle in time period k, F k up represents the maximum threshold of the normal travel time of the vehicle in time period k;
[0079] Step 7.2: According to the ETC gantry record information, the actual travel time T of the target vehicle in a certain time period k can be obtained. k ;
[0080] Step 7.3: Judge whether the actual travel time T of the vehicle in time period k k is within
[0081] If so, determine that the vehicle is a normally traveling vehicle and end;
[0082] If not, determine that the current vehicle is a suspected abnormal vehicle and end.
[0083] Due to the adoption of the above technical solutions, the present invention has the following beneficial effects:
[0084] The present invention utilizes highway ETC data and proposes a vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm. This method establishes a stochastic function model according to the time-varying nature of travel time and determines the anomaly time-varying threshold based on actual data, avoiding the defects of high data acquisition cost, complex model, and long calculation time in existing methods, and can provide a reference for improving the safety control level of highways.
[0085] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] The drawings of the present invention are described as follows.
[0087] Figure 1 is a schematic diagram of the overall process of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS
[0088] The embodiments of the present application are described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the drawings below are exemplary and are only used to explain the present application and should not be construed as a limitation of the present application. On the contrary, the embodiments of the present application include all changes, modifications, and equivalents that fall within the spirit and scope of the appended claims.
[0089] As Figure 1 shown, a vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm provided in this embodiment includes the following steps:
[0090] Step 1: According to the highway ETC data, perform spatio-temporal matching on the driving data of two adjacent ETC gantries and generate the ETC spatio-temporal matching data of each vehicle. Specifically:
[0091] Select the driving data record tables of any two adjacent ETC gantries i and j in the database and perform matching according to the conditions. The matching conditions include: (1) the license plates are the same; (2) the directions are the same; (3) the time when the vehicle passes through gantry j - the time when the vehicle passes through gantry i < 24h, where ETC gantry i represents the collection point at the upstream of the road, and ETC gantry j represents the collection point at the downstream of the road.
[0092] Step 2: According to the ETC spatio-temporal matching data, calculate the travel time of all vehicles passing through two adjacent ETC gantries. Specifically:
[0093] Determine the time window, and calculate the travel time T of each vehicle between any two adjacent ETC gantries at different time periods within a day at a certain time interval. ijk :
[0094]
[0095] In the formula,
[0096] T ijk represents the travel time of a certain vehicle between ETC gantries i and j on the selected section within time period k;
[0097] T ik and T jk respectively represent the times when the vehicle passes through ETC gantries i and j within time period k. The vehicle travels from ETC gantry station i to j. T ik <T jk , that is, ETC gantry i represents the collection point at the upstream of the road, and ETC gantry j represents the collection point at the downstream of the road.
[0098] Step 3: Set the travel time threshold, and screen out the effective travel time records from the travel times of all vehicles. Specifically, the travel time data obtained in Step 2 can be processed. Among the duplicate data with the same license plate, according to the vehicle passing time recorded by gantry i, only keep the travel time data with the smallest time difference from the time of gantry j at this time.
[0099] Step 4: According to the historical data of vehicle travel time, use a distribution-free kernel density function estimator to obtain the estimated conditional probability density function of travel time for each time period within a day. Specifically:
[0100] Step 4.1: Set the unit time length as one day, that is, 24h, and set the sampling time interval as 10 minutes within a day, that is, the interval between two adjacent sampling time points is 10 minutes;
[0101] Step 4.2: According to the sampling time interval, obtain the vehicle travel time data sets at different departure times within a day at the sampling time points. The number of sampling time points is the number of samples in the data set;
[0102] Step 4.3: According to the samples in the travel time data set, use the non-parametric kernel density function estimation formula to obtain the probability density function. The formula for the kernel density estimation in the k-th time period is:
[0103]
[0104] In the formula,
[0105] K(·) is the kernel function;
[0106] h is the bandwidth;
[0107] n is the total number of travel time sample sets;
[0108] x is the currently sought sample;
[0109] x k,l is the l-th sample in the sample set of time period k;
[0110] is the probability density function of the data set corresponding to time period k.
[0111] Step 5: According to the estimated conditional probability density function of travel time, use functional principal component analysis to establish a travel time distribution model. Specifically:
[0112] Step 5.1: According to the non-stationarity of travel time in different time periods of a day, expand the probability density function of travel time in each time period into a random function by Karhunen–Loève expansion, expressed as:
[0113]
[0114] In the formula,
[0115] m is the label of the random component;
[0116] μ(x) is the mean function;
[0117] is the eigenfunction of the m-th random component;
[0118] ξ m is the projection score of the centralized function f(x) - μ(x) on the eigenfunction above.
[0119] Step 5.2: Regard the random part in the Karhunen–Loève expression in Step 5.1 as the influence of different time periods on travel time, and combine the density function fitted according to the ETC travel time historical data in Step 4.3 to perform functional principal component analysis on it, and obtain the estimated function of each component in the model in Step 5.1 and the functional travel time density estimation model, which is expressed by the formula as:
[0120]
[0121] is the estimated mean function, α0(x) is obtained when the kernel density function is locally linearly minimized, that is, the value of α0 when the following formula is minimized:
[0122]
[0123] Among them, L1 represents the first objective function, k represents the label of the time period, K represents the total number of time periods in a day, m represents the label of the random component, M represents the total number of random components, α0 represents the undetermined coefficient, α1 represents the undetermined coefficient, and x m represents the travel time sample value of the m-th random component;
[0124] is the estimated characteristic function, is the eigenvalue, which can be obtained from the characteristic equation:
[0125]
[0126] Among them, G k represents the sample covariance of the time period k, and G is obtained by local linear minimization through the following formula k (x m , x m' ) = β0(x m , x m' ), that is, the value of β0 when minimizing the following formula:
[0127]
[0128] Among them, L2 represents the second objective function, G k represents the sample covariance of the time period k, m′ represents the subscript of the random component different from m (that is, m′ and m cannot be the same), x m′ represents the travel time sample value of the m′-th random component, x′ represents the travel time parameter corresponding to x m′ , β0 represents the undetermined coefficient, β 11 represents the undetermined coefficient, β 12 represents the undetermined coefficient;
[0129] M is obtained from the cumulative contribution rate δ not less than 90%:
[0130]
[0131] is the estimated conditional average function, is obtained by local linear minimization of the kernel density function, that is, the value of γ0 when minimizing the following formula:
[0132]
[0133]
[0134] Among them, L3 represents the third objective function, K μ , K c , K ξ are kernel functions, h μ , h c , hξ For the bandwidth, all can be selected by the Leave - P - Out cross - validation method, t k represents the time of period k, t represents the time parameter, γ0 represents the coefficient to be determined, and γ1 represents the coefficient to be determined;
[0135] Step 5.3: According to the travel - time density function obtained in Step 5.2, use discrete approximation to obtain the travel - time distribution model for different periods:
[0136]
[0137] Step 6: Train and construct an isolation forest model based on historical travel - time data to detect outliers in the historical data. Specifically:
[0138] Step 6.1: Use the historical travel - time data as the training - set samples, and separately extract sub - samples of a fixed length within different periods from it. Randomly split the features to construct an isolation tree. After each sub - sample is built into an isolation tree, they jointly form an isolation forest:
[0139] iForest(X,p,ψ)
[0140] In the formula,
[0141] X is the input data set;
[0142] p is the number of isolation trees;
[0143] ψ is the number of sampling samples for each tree.
[0144] Step 6.2: For each node sample x, comprehensively calculate the results of each tree for it, and use the outlier function to determine the outlier points in the travel - time data and calculate the outlier factor score s:
[0145]
[0146] In the formula,
[0147] h(x) is the path length of x in each tree;
[0148] E(h(x)) is the expected value of the path length of x in multiple trees;
[0149] c(ψ) is the average value of the path length when the given number of samples is ψ, used to standardize the path length h(x) of the sample x.
[0150] Step 6.3: According to the outlier factor score of the sample x, judge whether it is an outlier:
[0151] If the outlier score is close to 1, then it is determined as an outlier;
[0152] If the anomaly score is much less than 0.5, then it is determined as a non - outlier value;
[0153] If the scores of all points are around 0.5, then there are no outlier values in the sample.
[0154] Step 7: According to the travel - time distribution function in different time periods, use the Isolation Forest algorithm to detect the outlier values in the historical travel - time data, and generate the vehicle travel - time anomaly determination criteria based on different time periods. Specifically:
[0155] Step 7.1: According to the outlier values obtained by the Isolation Forest algorithm in Step 6 and the travel - time distribution model in Step 5.3, calculate the probability density value of the abnormal data in the corresponding time period, and obtain the vehicle abnormal travel - time determination criteria for different time periods. The outside of the interval is the abnormal travel time. represents the minimum threshold of the normal travel time of the vehicle in time period k. represents the maximum threshold of the normal travel time of the vehicle in time period k;
[0156] Step 7.2: According to the ETC gantry record information, the true travel time T of the target vehicle in time period k can be obtained. k ;
[0157] Step 7.3: Judge whether the true travel time T of the vehicle in time period k k is within the interval
[0158] If so, determine that the vehicle is a normally - traveling vehicle and end;
[0159] If not, determine that the current vehicle is a suspected abnormal vehicle and end.
Claims
1. A vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm, characterized in that, It includes the following steps: Step 1: Obtain the highway ETC data, perform spatio-temporal matching on the driving data passing through two adjacent ETC gantries, and determine the ETC spatio-temporal matching data of each vehicle. Step 2: Calculate the travel times of all vehicles passing through two adjacent ETC gantries based on the ETC spatio-temporal matching data of each vehicle. Step 3: Screen out the valid travel time records from the travel times of all vehicles according to the set travel time threshold. Step 4: Based on the historical data of vehicle travel times, use a distribution-free kernel density function estimator to obtain the estimated conditional probability density function of travel times for each sampling period within a day. Step 4.1: Set the unit time length as one day and set the sampling time interval as 10 minutes within one day. Step 4.2: According to the sampling time interval, obtain the vehicle travel time datasets with different departure times at the sampling time points within one day. The number of sampling time points is the number of samples in the dataset. Step 4.3: According to the travel time dataset, perform fitting using non-parametric kernel density estimation. Then, the kernel density estimation formula for the k-th period is: In the formula, K(·) is the kernel function; h is the bandwidth; n is the total number of the travel time sample set; x is the currently sought sample; x k,l is the l-th sample in the sample set during period k; is the probability density function of the data set corresponding to time period k; Step 5: Based on the estimated conditional probability density function of travel times, establish a travel time distribution model using functional principal component analysis. Step 5.1: According to the non-stationarity of travel times at different periods within a day, expand the probability density function of travel times for each period into a random function using Karhunen-Loève expansion: In the formula, m is the label of the random component; μ(x) is the mean function; is the characteristic function of the m-th random component; ξ m is the projection score of the centralized function f(x) - μ(x) on the characteristic function ; Step 5.2: Regard the random part in the Karhunen-Loève expression in Step 5.1 as the influence on travel time at different times, and combine the kernel density estimation density function fitted according to the ETC travel time historical data in Step 4.3 Perform functional principal component analysis on it to obtain the estimated functions of each component in the model in Step 5.1 and the functional travel time density estimation model: To estimate the mean function, α0(x) is obtained when the local linear minimization of the kernel density function is performed, that is, the value of α0 when the following formula is minimized: Among them, L1 represents the first objective function, k represents the label of the time period, K represents the total number of time periods in a day, m represents the label of the random component, M represents the total number of random components, α0 represents the undetermined coefficient, α1 represents the undetermined coefficient, and x m represents the travel time sample value of the m-th random component; To estimate the characteristic function, is the eigenvalue, which can be obtained from the characteristic equation: Among them, G k represents the sample covariance at time period k, and G is obtained by local linear minimization through the following formula k (x m , x m' ) = β0(x m , x m' ), that is, the value of β0 when minimizing the following formula: Among them, L2 represents the second objective function, G k represents the sample covariance at time period k, m′ represents the subscript of the random component different from m, that is, m′ cannot be the same as m, x m′ represents the travel time sample value of the m′-th random component, x′ represents x m′ corresponding travel time parameter, β0 represents the undetermined coefficient, β 11 represents the undetermined coefficient, β 12 represents the undetermined coefficient; M is obtained from the cumulative contribution rate δ not less than 90%; To estimate the conditional average function, which is obtained by locally linearly minimizing the kernel density function, that is, the value of γ0 when the following formula is minimized: Among them, L3 represents the third objective function, K μ , K c , K ξ is the kernel function, h μ , h c , h ξ is the bandwidth, and all of them can be selected by the Leave-P-Out cross-validation method. t k represents the time of period k, t represents the time parameter, γ0 represents the undetermined coefficient, and γ1 represents the undetermined coefficient; Step 5.3: According to the travel time density function obtained in Step 5.2, obtain the travel time distribution model for different periods using discrete approximation. Step 6: Train and construct an isolation forest model based on the historical travel time data. The isolation forest model is used to detect outliers in the historical data. Step 7: According to the travel time distribution functions for different periods, use the isolation forest algorithm to detect the outliers in the historical travel time data and generate the vehicle travel time anomaly determination criteria based on different periods.
2. The vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm according to claim 1, wherein The specific process of Step 2 is as follows: Determine the time window and calculate the travel time of each vehicle between two adjacent ETC gantries at different times of the day at regular time intervals. In the formula, Represents the travel time of a certain vehicle between ETC gantries i and j on the selected section during time period k; and respectively represent the times passing through ETC gantries i and j during the k time period, and the vehicle driving direction is from ETC gantry i to j, that is, ETC gantry i represents the collection point at the upstream of the road, and ETC gantry j represents the collection point at the downstream of the road.
3. The vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm according to claim 1, characterized in that, The specific process of Step 6 is as follows: Step 6.1: Use the historical travel time data as the training set samples, respectively extract sub-samples with a fixed length within different periods from them, and randomly divide the features to construct an isolation tree. After each sub-sample is built into an isolation tree, they jointly form an isolation forest: iForest(X,p,ψ) In the formula, X is the input dataset; p is the number of isolation trees; ψ is the number of sampling samples for each tree; Step 6.2: For each node sample x, comprehensively calculate the results of each tree for it, and use the outlier function to determine the outlier points in the travel time data and calculate the outlier factor score s: In the formula, h(x) is the path length of x in each tree; E(h(x)) is the expected value of the path length of x in multiple trees; $c(\psi)$ is the average path length for a given number of samples $\psi$, which is used to standardize the path length $h(x)$ of the sample $x$. Step 6.3: Determine whether it is an outlier based on the outlier factor score of the sample $x$.
4. The vehicle anomaly recognition method based on kernel density estimation and isolation forest algorithm according to claim 1, characterized in that The specific process of step 7 is as follows: Step 7.1: According to the outliers obtained by the Isolation Forest algorithm in Step 6 and the travel time distribution model in Step 5.3, calculate the probability density values of the abnormal data within the corresponding time periods, and obtain the determination criteria for abnormal vehicle travel times in different time periods. The outside of the interval is the abnormal travel time. represents the minimum threshold of the normal travel time of the vehicle within time period k. represents the maximum threshold of the normal travel time of the vehicle within time period k. Step 7.2: According to the ETC gantry record information, the true travel time T of the target vehicle within period k can be obtained k ; Step 7.3: Determine whether the actual travel time T of the vehicle within period k k is within the interval or not. If so, determine that the vehicle is a normally traveling vehicle and end. If not, determine that the current vehicle is a suspected abnormal vehicle and end.