Method for calculating regional vehicle refitting probability

By combining noise detection, kernel density analysis, and SARIMA model with the Naive Bayes method, the problem of predicting and locating modified vehicles was solved, enabling the prediction and management of illegal modified vehicle activities.

CN118917984APending Publication Date: 2024-11-08ZHEJIANG POLICE COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410951581.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively predict and locate modified vehicles, leading to prominent issues related to modified vehicles in the region. Furthermore, existing checkpoint and video methods are insufficient for batch retrieval, requiring a significant amount of professional effort for targeted analysis.

Method used

Vehicles with excessive exhaust noise are located using noise detection equipment. The temporal trend of vehicle alarm frequency is analyzed using kernel density analysis and SARIMA model. The probability of vehicle modification in the region is calculated using Naive Bayes.

Benefits of technology

It enables the prediction of illegal activities involving modified vehicles, allowing for the forecasting of their timing and location, and providing management departments with effective methods for investigation and punishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917984A_ABST
    Figure CN118917984A_ABST
Patent Text Reader

Abstract

The invention provides a method for calculating regional vehicle refitting probability. The method comprises the following steps: firstly, positioning a vehicle position with excessive exhaust noise through noise detection equipment; secondly, acquiring vehicle illegal position information based on a kernel density analysis method; then, based on an SARIMA model, the time change trend of the signal alarm frequency of the vehicle is analyzed; and finally, calculating a regional vehicle modification probability based on naive Bayes. According to the invention, by calculating the probability of the refitted vehicle in the region, the illegal occurrence time and place of the refitted vehicle are pre-judged and sensed, and the illegal behavior of the refitted vehicle can be effectively investigated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of intelligent transportation and illegal behavior risk warning, and specifically relates to a method for calculating the probability of vehicle modification in a region. Background Art

[0002] The nuisance caused by modified vehicles mostly occurs at night, and the vehicles are driving at high speeds. It is difficult to achieve batch retrieval with the existing checkpoints and video means, and it is often only after the fact that we vaguely know the situation at the relevant locations. If we want to conduct a targeted analysis of a certain vehicle, it often requires professional analysts to invest a lot of energy.

[0003] In view of the fact that the prior art lacks effective prediction and positioning of modified vehicles, which leads to prominent problems of modified vehicles in a region, the present invention provides a method for calculating the probability of vehicle modification in a region. Summary of the invention

[0004] In view of the fact that the prior art lacks effective prediction and positioning of modified vehicles, which leads to prominent problems of modified vehicles in a region, the present invention provides a method for calculating the probability of vehicle modification in a region.

[0005] To achieve the above object, the present invention specifically includes:

[0006] C1. Use noise detection equipment to locate vehicles with excessive exhaust noise;

[0007] C2, vehicle illegal location information based on kernel density analysis;

[0008] C3. Analyze the time variation trend of vehicle signal alarm times based on the SARIMA model;

[0009] C4. Calculate the probability of vehicle modification in a region based on Naive Bayes.

[0010] The beneficial effects of the present invention include: calculating the probability of modified vehicles in a region, being able to predict the time and location of illegal occurrence of modified vehicles, and providing a method for management departments to investigate and punish modified vehicle behaviors. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flow chart of a method for calculating the probability of vehicle modification in a region provided by an embodiment of the present application.

[0012] Figure 2 This is a heat map made from the demo data. DETAILED DESCRIPTION

[0013] The design is further described below in conjunction with the accompanying drawings and embodiments. In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.

[0014] The present invention provides a method for calculating the probability of vehicle modification in a region by fusing multi-dimensional spatiotemporal data. The method comprises the following steps: locating and calculating vehicle modification violation information based on kernel density analysis, performing time series analysis based on a SARIMA model, and calculating the probability of vehicle modification in a region based on naive Bayes.

[0015] like Figure 1 As shown, the basic steps of a method for calculating the probability of vehicle modification in a region provided by an embodiment of the present application are as follows:

[0016] C1. Use noise detection equipment to locate vehicles with excessive exhaust noise;

[0017] C2, vehicle illegal location information based on kernel density analysis;

[0018] C3. Analyze the time variation trend of vehicle signal alarm times based on the SARIMA model;

[0019] C4. Calculate the probability of vehicle modification in a region based on Naive Bayes.

[0020] In particular, the specific process of step C1 includes:

[0021] C11. Once a vehicle with excessive roaring noise enters the detection area, the high-definition camera will be triggered to take photos and perform voiceprint inspection at the same time, analyze the sound signal, determine the modified vehicle and identify the rear license plate number of the vehicle, and locate the signal source. The noise decibel value is recorded in dB i , and the voiceprint detection compliance rate S is obtained at the same time.

[0022] C12. Record the signal from each signal source by hour to form a two-dimensional time series. Specifically, it can be expressed as:

[0023] Assume there are n signal sources in total, record the number of times each signal source sends a signal, and form an n×24 matrix X, where the i-th row represents the number of times the i-th signal source sends a signal every hour in a day. In units of hours, with a 24-hour day as a cycle, record the number of signal alarms to form a time series X k , k represents the kth day.

[0024]

[0025] x ij It indicates the number of signals sent by the i-th signal source in the j-th hour.

[0026] C13. According to the specific conditions of each place, the region is divided into m blocks. Each block has n signal sources. The total number of signals collected by each signal source in each block in one day is recorded, which is represented as an m×n matrix Y, where the element in the mth row and nth column represents the total number of signals collected by the nth signal source in the mth region, forming the matrix Y.

[0027]

[0028] Among them, y mn Indicates the total number of signals collected by the nth signal source in the mth region in one day. Record the signal collection volume for multiple consecutive days and record the daily average volume matrix

[0029] In particular, the specific steps of analyzing the vehicle illegal location information based on the kernel density analysis method in step C2 include:

[0030] C21. Use the AutoNavi Map API to obtain the map road information data of the area block, import it into the software ArcMap, and compare the imported map road information data with the average record matrix obtained in step C1. Merge the location information dataset. Use the spatial analysis function in ArcMap to spatially connect the road information data and the location information data to match the road blocks where each location information point is located. Assign the weight of the recorded point to 1 and the weight of the unrecorded point to -1;

[0031] C22. Divide the region into m blocks according to step C13, where the specific size of m is determined by the actual road conditions and the actual number of violations, and calculate the average value of the kernel density of violations caused by modified vehicles in the m blocks.

[0032]

[0033] In the formula is the kernel density value of the point (x, y) in the unit, and l is the number of points contained in the unit.

[0034] Density value normalization: In order to eliminate the gap between data dimensions, the data is processed by Min-Max normalization to ensure the comparability between data.

[0035]

[0036] f imRepresents the kernel density value of data point i after normalization, represents the maximum kernel density value in the region. Represents the minimum kernel density in the region.

[0037] Furthermore, the step C21 is specifically as follows:

[0038] C211. Use ArcMap software to perform kernel density analysis on all data points i; the kernel density represents the frequency of violations caused by modified vehicles at that point.

[0039] The formula for the kernel density f(x,y) at any (x,y) coordinate is as follows:

[0040]

[0041] In the formula, Sd is the standard distance, which is calculated from all points to the average center. The standard distance of m For all input points to the mean center Rad is the default search radius, also called bandwidth; Dist is the median of the distance between the data point (x i ,y i ) to any (x,y) position. ; Den is the distance between point (x i ,y i ) kernel density; Popu is an attribute of Arcmap for kernel density calculation, representing the data point (x i ,y i ), the larger the Popu value, the greater the weight of the point.

[0042] C212. Based on the kernel density calculation results of C211, a heat map is drawn in Arcmap software to intuitively understand the density distribution of violations caused by modified vehicles.

[0043] In particular, the step C3 specifically includes:

[0044] C31, the matrix X k Converted into univariate time series data Z. Take the sum of all illegal data of n signal sources in a block, and each time series represents the total number of changes of signals of n signal sources in a block in different hours. t Represents the time series, and t represents the time point. Import the SARIMA package into Python.

[0045] C32. Perform an ADF test, use time as the independent variable x, and the violation amount of each data point i as the dependent variable y, establish a regression model, and use SPSS software to determine whether to reject the basis for the time series to have a unit root. That is, whether the time series is stable. Δyt Represents the difference term of the time series (first-order difference, )y t-1 is the lag term at time t, e t is the error term.

[0046] Δy t =a+βt+gy t-1 +d1Δy t-1 +d2Δy t-2 +...+d p Δy t-p +e t

[0047] C33. Perform preliminary SARIMA model selection, determine model parameters, and use data to generate and test the model.

[0048] C34. The first 7 / 10 of the data points i in the above univariate time series data Z are used to test the generated model, and the last 3 / 10 are used to detect the accuracy of the model, so as to analyze the time variation trend of the number of signal alarms of the vehicle.

[0049] Furthermore, the step C31 specifically includes:

[0050] C311. Process the None value in the data. If there is a None value, an error will be reported or the result will be abnormal during processing. Delete the missing values ​​in the data.

[0051] C312. Check the outliers in the data and use Z-score to test the outliers.

[0052] The formula for the Z-score is x is the specific value, μ is the mean, s is the standard deviation, and if the z-score value of a specific data point is less than -3 or greater than +3, it is considered an outlier.

[0053] Use the weighted moving average method to replace outliers. When calculating the average, each data point is multiplied by a different weight, giving more recent data a higher weight to replace outliers.

[0054]

[0055] Furthermore, the step C32 specifically includes:

[0056] C321. The ADF statistic is negative. The smaller it is, the more likely it is to reject the existence of a unit root.

[0057] C322. Get the p-value. If the p-value is lower than the given significance level (usually 0.05), it means that the series is stationary.

[0058] C323: If the conditions of C321 and C322 are met, enter C33; otherwise, perform differential operation on the data to obtain stable data.

[0059] Difference operation diff = x[1:]-x[:-1]

[0060] Determine whether the first-order difference sequence diff is stationary. If the first-order difference sequence diff is stationary, output the diffA sequence.

[0061] If the first-order difference sequence diff is not stationary, continue to perform the difference operation until a stationary data sequence is obtained. Repeat the above steps until a stationary data sequence is obtained.

[0062] Furthermore, the specific steps of the SARIMA model in C33 include:

[0063] C331. Data inspection and preliminary analysis, draw time series graphs to observe the trend, seasonality and periodicity of the data. At the same time, draw the autocorrelation function (ACF) and partial autocorrelation function (PACK) to identify the autocorrelation and autoregressive components of the data.

[0064]

[0065] PACF(k)=Partial Correlation(y t ,y t+k ∣y t+1 ,...,y t+k-1 )

[0066] C332, SARIMA preliminary model selection, select possible model orders based on ACF and PACF plots. For the non-seasonal part, the autoregressive order p is determined based on PACF, and the moving average order q is determined based on ACF. For the seasonal part, the seasonal autoregressive order P and seasonal moving average order Q are determined based on the seasonal period m.

[0067] p=determine_ar_order(pacf_plot)

[0068] q=determine_ma_order(acf_plot)

[0069] P=determine_seasonal_ar_order(seasonal_pacf_plot)

[0070] Q=determine_seasonal_ma_order(seasonal_acf_plot)

[0071] C333, parameter estimation, determine the number of differences d and seasonal differences D to make the data stable. Perform difference operation on the data:

[0072]

[0073] C334, use the training data to select parameters, try different (p, d, q, P, D, Q, m) combinations, and select the optimal parameters by minimizing the information criterion AIC or BIC. Perform fixed-order SARIMA (x, y, z) (X, Y, Z) n .

[0074] AIC = -2log(L)+2(p+q+P+Q+k)

[0075] BIC=-2log(L)+log(n)(p+q+P+Q+k)

[0076] In particular, the step C4 specifically includes:

[0077] C41. Create a Naive Bayesian data set. Naive Bayesian is a series of simple probabilistic machines based on Bayesian theorem.

[0078] And the amount of data required for calculation is small. Given the current situation where there are few illegal detections of modified vehicles, naive Bayes can be applied for calculation and evaluation. The probability of an event is described based on prior knowledge of conditions that may be related to the event.

[0079] C42. Create a naive Bayes model table based on the above steps C1, C2, and C3.

[0080] C43. Create a heat map based on the above data to reveal the interdependence of the independent variables on the dependent variable, such as Figure 2 shown.

[0081] C44, assign dependent variable y and feature variable x. The target (result) is in the y variable and the rest of the data frame is in the x variable.

[0082] C45. Model establishment, the specific process is as follows:

[0083] 1. Divide the dataset df into 70% parts, the first 70% of the data is used for training, and the last 30% of the data is used for validation.

[0084] 2. Denote the feature data and target variable in the dataset df as x and y respectively.

[0085] 3. Convert the feature data x (1.illegal risk, 2.regional risk 3.Voiceprint detection, 4.time) and the target variable y (result) into the following array form.

[0086] [z1,z2,z3,z4],[y1]

[0087] 4. Using the slicing operation, the training data set is divided into x_training and y_training according to the first 70% ratio, where x_training contains the first 70% of the feature data and y_training contains the first 70% of the target variables. This data is used to train the model.

[0088] 5. Using the slicing operation, the validation data set is divided into x_value and y_value according to the proportion of the last 30%, where x_value contains the last 30% of the feature data and y_value contains the last 30% of the target variables. This data is used to calibrate and test the model after training.

[0089] C46: Naive Bayes model building.

[0090] C47. Combining the steps C1, C2, and C3 mentioned above, predictions are made through indicators such as previous illegality, regional risk, voiceprint detection, and time. Finally, the naive Bayes method is used to calculate the probability of vehicle modification in the region.

[0091] C48. Import the modified vehicle data monitored subsequently into the database of this method to improve the data information and enhance the credibility.

[0092] Furthermore, the step C42 specifically includes:

[0093] C421. Create the following table based on the above steps C1, C2, and C3:

[0094]

[0095] C422, Illegal risk in the table can be obtained by kernel density calculation in step C2 m , is the normalized data, mapped according to the value size. m In (0,0.3], it is set to 1; f m In [0.3,0.6), it is set to 2; f m In [0.6,1], it is set to 3.

[0096] C423. For the Regional risk column, make a judgment based on the road type. If it is a major urban road, record it as 2; if it is a marginal urban road, record it as 3; and if it is any other road, record it as 1.

[0097] C424, for voiceprint detection, the data is obtained from step C1, the voiceprint detection compliance rate and decibel detection, the voiceprint and decibel value that meet the street car standard are recorded as 2, and the normal driving voiceprint and decibel value are recorded as 1.

[0098] C425, Time is divided into two time periods. According to the time detected in C1 and C3, the SARIMA model is used to predict the time series and determine the high-risk time, medium-risk time and low-risk time. In this process, 23:00 to 05:00 is recorded as high-risk time and marked as 1, and the rest of the time points are recorded as 0.

[0099] C426, the result column is the actual value, which is 1 for street-ready modified cars and 0 for non-street-ready modified cars. This column is the target value.

[0100] The following table shows 12 sets of case data

[0101]

[0102] Furthermore, the C46 specifically includes:

[0103] C461. Import the Scikit-learn machine learning third-party module package into Python, and import the GaussianNB Gaussian Naive Bayes model.

[0104] C462, input data training set x_training and y_training, with D = {(x1, y1), (x2, y2), …, (x n ,y n )}, where x i =(z i1 ,z i2 ,z i3 ,z i4 ) is a 4-dimensional feature vector, y i is the target dependent variable, y i With x i For the same group of data, y i ∈{c1,c2,...,c k}, as in example C452 above.

[0105] C463, use the training data to train the model and calculate the accuracy. For each target category c j (0 or 1, i.e. modified car or not)

[0106] 1. Calculate the prior probability P(y=c j )(c jTake 0 or 1), and count the number of training sets that belong to category c j The number of samples and divided by the total number of samples n, where I is the indicator function

[0107]

[0108] 2. For each feature dimension j and each category c j The mean and variance of . Statistics belong to category c j The sample values ​​on the feature dimension j are taken and the mean μ is calculated j and variance The formula is as follows

[0109]

[0110] Calculate the mean μ j : will belong to category c j The sum of the values ​​of the samples on the feature dimension j is divided by the value of the sample belonging to category c. j The number of samples.

[0111] Calculating variance will belong to category c j The value of the sample on the feature dimension j and the mean μ j Sum the squares of the differences and divide by the squares of the values ​​belonging to category c j The number of samples.

[0112] 3. Return to the model and set the prior probability P(y=c j ) and the Gaussian distribution parameters for each feature dimension Composition classification model.

[0113] C464, take the test set x_value and y_value

[0114] For new samples For each category c j Calculate the posterior probability

[0115]

[0116] in is the value of the new sample on feature dimension i, μ ji It is category c j The mean value on feature dimension i, It is category c j Variance on feature dimension i. Multiply the Gaussian probability density function on each feature dimension and then multiply it by the prior probability P(y=c j ), and obtain the posterior probability

[0117] 5. Return the category with the maximum posterior probability as the prediction result to determine whether there is a risk of modified vehicles.

[0118] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for calculating the probability of vehicle modification in a region, Its characteristics are: C1. Use noise detection equipment to locate vehicles with excessive exhaust noise; C2, vehicle illegal location information based on kernel density analysis; C3. Analyze the time variation trend of vehicle signal alarm times based on the SARIMA model; C4. Calculate the probability of vehicle modification in a region based on Naive Bayes.

2. A method for calculating the probability of vehicle modification in a region according to claim 1, Its characteristics are: The step C1 specifically comprises: C11. Once a vehicle with excessive roaring noise enters the detection area, the high-definition camera will be triggered to take photos immediately. At the same time, voiceprint inspection will be carried out to analyze the sound signal, determine whether it is a modified vehicle and identify the rear license plate number of the vehicle; Locate and identify the signal source, record the noise decibel value, and obtain the voiceprint detection compliance rate; C12. Record the signal transmission of each signal source by hour to form an n×24 matrix X, where the i-th row represents the number of signals transmitted by the i-th signal source every hour in a day, forming a two-dimensional time series; C13. According to the specific conditions of each place, the region is divided into m blocks. Each block has n signal sources. The total number of signals collected by each signal source in each block in one day is recorded and represented as a matrix Y, where the element in the mth row and nth column represents the total number of signals collected by the nth signal source in the mth region, forming an average record matrix Y.

3. A method for calculating the probability of vehicle modification in a region according to claim 2, Its characteristics are: The step C2 specifically comprises: C21. Use map software to obtain map road information data of the area block, import it into the software ArcMap, and merge the imported map road information data with the location information data set of the average record matrix Y; C22. Divide the region into m blocks according to step C13, and calculate the average value of the kernel density of violations caused by modified vehicles in the m blocks.

4. A method for calculating the probability of vehicle modification in a region according to claim 3, Its characteristics are: The step C21 specifically includes: C211. Use ArcMap software to perform kernel density analysis on all data points; kernel density represents the frequency of illegal phenomena caused by modified vehicles at that point; C212. Based on the kernel density calculation results of C211, a heat map is drawn in Arcmap software to intuitively understand the density distribution of violations caused by modified vehicles.

5. A method for calculating the probability of vehicle modification in a region according to claim 2, Its characteristics are: The step C3 specifically comprises: C31. Convert the matrix X obtained in C12 into univariate time series data Z. Take the sum of all illegal data of n signal sources in a block. Each time series represents the total number of changes of signals of n signal sources in a block in different hours. Import the SARIMA macro package into Python. C32. Conduct an ADF test, use time as the independent variable, and the violation amount of each data point i as the dependent variable, establish a regression model, and use SPSS software to determine whether to reject the basis for the time series having a unit root; C33, perform preliminary SARIMA model selection, determine model parameters, and use data to generate and test the model; C34. The first 7 / 10 data points in the univariate time series data Z are used to test the generated model, and the last 3 / 10 are used to detect the accuracy of the model.

6. A method for calculating the probability of vehicle modification in a region according to claim 5, Its characteristics are: The step C32 specifically includes: C321, get the ADF statistic, which is a negative number. The smaller it is, the more likely it is to reject the existence of a unit root. C322, get the p value. If the p value is lower than the given significance level, it means that the series is stable. C323: If the conditions of C321 and C322 are met, enter C33; otherwise, perform differential operation on the data to obtain stable data.

7. A method for calculating the probability of vehicle modification in a region according to claim 5, Its characteristics are: The step C33 specifically comprises: C331, data inspection and preliminary analysis, draw time series graphs to observe the trend, seasonality and periodicity of the data, and draw autocorrelation functions and partial autocorrelation functions to identify the autocorrelation and autoregressive components of the data; C332, SARIMA preliminary model selection, select possible model orders based on plotting autocorrelation function and partial autocorrelation function; C333, parameter estimation, determine the number of differences and seasonal differences to make the data stable; C334. Use training data to select parameters, try different combinations, select the optimal parameters by minimizing the information criterion AIC or BIC, and determine the order.

8. A method for calculating the probability of vehicle modification in a region according to claim 5, Its characteristics are: The step C4 specifically comprises: C41. Establish a naive Bayes dataset; C42. Establish a Naive Bayes model table; C43. Create heat maps to reveal the interdependence of independent variables on dependent variables; C44, assign dependent variable y and feature variable x, the target is in the y variable, and the rest of the data frame is in the x variable; C45. Establish and train the prediction model; C46. Predictions are made based on past illegality, regional risk, voiceprint detection, and time, and finally the naive Bayes method is used to calculate the probability of vehicle modification in the region.

9. A method for calculating the probability of vehicle modification in a region according to claim 8, Its characteristics are: The step C42 is specifically: the established table includes the following information: illegal risk, regional risk, voiceprint detection, time period and result.

10. A method for calculating the probability of vehicle modification in a region according to claim 9, Its characteristics are: The step C42 specifically includes: the illegal risk is obtained by kernel density calculation in step C2, which is normalized data and is mapped according to the value size; The regional risk is determined based on the road type; if it is a major urban road, it is recorded as 2; if it is a marginal urban road, it is recorded as 3; and if it is any other road, it is recorded as 1; The voiceprint detection, the data obtained by step C1, the voiceprint detection compliance rate and decibel detection, the voiceprint and decibel value that meet the street-blasting car standard are recorded as 2, and the normal driving voiceprint and decibel value are recorded as 1; The time period Time is divided into two time periods; the SARIMA model is used to predict the time series according to the time detected in C1 and C3, and it is judged as a high-risk time or a medium-low-risk time; The result result is the actual result value, which is 1 for a street-ready modified car and 0 for a non-street-ready modified car.