A method and device for identifying congestion conditions based on self-driving data, a terminal device, and a storage medium
By identifying vehicle congestion conditions using autonomous vehicle driving data, and utilizing principal component analysis and soft-interval support vector machine models, the high cost and low safety issues of existing technologies are resolved, achieving high-precision congestion condition identification and dynamic parameter adjustment.
Patent Information
- Application Number
- CN202211095587.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-09-06
AI Technical Summary
In existing technologies, identifying vehicle congestion requires the use of roadside equipment and external cameras, which is costly and data transmission is insecure, and cannot be directly used for adjusting vehicle dynamic parameters.
By acquiring vehicle driving data, a vehicle congestion condition identification model is constructed using principal component analysis and a soft-margin support vector machine model with radial basis kernel function, achieving high-precision identification within the vehicle.
It enables the identification of vehicle congestion conditions at a lower cost and with higher reliability, supports the adjustment of vehicle dynamic parameters, and reduces reliance on external equipment and cybersecurity risks.
Smart Images

Figure CN115659161B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automobile driving condition recognition, in particular to a congestion condition recognition method based on self-vehicle driving data. BACKGROUND
[0002] The current fuel automobile will appear frequent gear shifting in congestion condition, if the congestion condition can be recognized to control the adjustment of vehicle dynamics parameters, the frequent gear shifting phenomenon can be obviously reduced and the various performances of the vehicle in the condition can be optimized.
[0003] The existing congestion condition recognition is mainly based on traffic flow big data analysis and video detection, wherein the vehicle congestion condition recognition method for obtaining traffic flow data in the congestion condition recognition based on traffic flow includes vehicle geomagnetic detection, loop coil detection and the like, these detection methods need to increase the roadside equipment, the cost is high, the cooperation between multiple devices involves complex operation, and the operation amount is large; the congestion condition recognition based on video detection mainly carries out image analysis and processing through the video shot by the sky eye and the like electronic camera, this method needs to use the auxiliary equipment such as camera outside the vehicle, increases the cost, and the image detection processing algorithm operation amount is large. The above two methods are currently commonly used in navigation systems, considering that the current congestion condition recognition is mainly completed by the roadside equipment, due to the reasons of communication and information safety and reliability, the result of recognition cannot be directly used for the adjustment of vehicle dynamics parameters, therefore most vehicles cannot realize vehicle-road cooperation. In summary, the above two methods for recognizing the congestion condition of vehicle need to use more external equipment, the cost is high, and when the network problem occurs, the safety and reliability and timeliness of data transmission are relatively low.
[0004] Therefore, how to safely and reliably recognize and judge whether the current vehicle is in congestion condition at low cost is a problem to be solved. SUMMARY
[0005] The main purpose of the present application is to provide a congestion condition recognition method based on self-vehicle driving data, which aims to solve the problem of how to safely and reliably recognize and judge whether the current vehicle is in congestion condition at low cost.
[0006] To achieve the above purpose, the present application provides a congestion condition recognition method based on self-vehicle driving data, which is applied to the field of automobile driving condition recognition, and includes the following steps:
[0007] Obtaining current vehicle driving data;
[0008] Processing the current vehicle driving data to obtain processed state characteristic parameters;
[0009] The state characteristic parameters are analyzed by a principal component analysis method, and principal component data are constructed according to an analysis result;
[0010] The principal component data are input into a vehicle congestion working condition recognition model obtained in advance, and an identification result of a current vehicle congestion working condition is output.
[0011] Optionally, the step of processing the current vehicle driving data to obtain processed state characteristic parameters comprises:
[0012] According to the current vehicle driving data, initial state characteristic parameters are calculated according to a preset rule;
[0013] The initial state characteristic parameters are standardized to obtain the processed state characteristic parameters.
[0014] Optionally, the step of analyzing the state characteristic parameters by the principal component analysis method and constructing the principal component data according to an analysis result comprises:
[0015] A covariance matrix is constructed according to the state characteristic parameters, and principal component data arranged in order of eigenvalue size are calculated;
[0016] The principal component data are extracted in the order to construct the principal component data, and if a cumulative value in the principal component data reaches a preset total variance ratio for the first time, subsequent extraction is stopped.
[0017] Optionally, before the step of inputting the principal component data into a vehicle congestion working condition recognition model obtained in advance and outputting an identification result of a current vehicle congestion working condition, the step of obtaining the vehicle congestion working condition recognition model comprises:
[0018] A labeled training set is obtained;
[0019] The labeled training set is input into a soft interval support vector machine model with a radial basis kernel function for model training, and an initial vehicle congestion working condition recognition model is obtained;
[0020] The initial vehicle congestion working condition recognition model is optimized by a genetic algorithm, and the principal component data are input for model training, and a final vehicle congestion working condition recognition model is obtained, which is used for identification of a vehicle congestion working condition.
[0021] Optionally, the step of optimizing the initial vehicle congestion working condition recognition model by the genetic algorithm, inputting the principal component data for model training, and obtaining the final vehicle congestion working condition recognition model, which is used for identification of a vehicle congestion working condition, comprises:
[0022] The penalty function and kernel width in the soft-margin support vector machine with radial basis kernel function are optimized by genetic algorithm to obtain the penalty function and kernel width at the optimal accuracy.
[0023] After optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel function width at the optimal accuracy, the model is input into the principal component data for model training to obtain the final vehicle congestion condition recognition model for use in recognizing vehicle congestion conditions.
[0024] Optionally, after optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel width at the optimal accuracy, and then inputting the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition, the method further includes:
[0025] The labeled training set is input into the final vehicle congestion condition recognition model in the external environment of the vehicle for offline testing to ensure the reliability of the vehicle congestion condition recognition model.
[0026] Optionally, after optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel width at the optimal accuracy, and then inputting the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition, the method further includes:
[0027] The principal component data is input into the final vehicle congestion condition recognition model for real vehicle testing to ensure the reliability of the vehicle congestion condition recognition model.
[0028] This application also proposes a device for identifying congestion conditions based on vehicle driving data, the device comprising:
[0029] The acquisition module is used to acquire current vehicle driving data;
[0030] The processing module is used to process the current vehicle driving data to obtain processed state feature parameters;
[0031] The analysis module is used to analyze the state characteristic parameters using principal component analysis and construct principal component data based on the analysis results.
[0032] The identification module is used to input the principal component data into a pre-obtained vehicle congestion condition identification model and output the identification result of the current vehicle congestion condition.
[0033] This application also proposes a terminal device, which includes a memory, a processor, and a congestion condition identification program based on vehicle driving data stored in the memory and executable on the processor. When the congestion condition identification program based on vehicle driving data is executed by the processor, it implements the steps of the congestion condition identification method based on vehicle driving data.
[0034] This application also proposes a storage medium storing a congestion condition identification program based on vehicle driving data. When the congestion condition identification program based on vehicle driving data is executed by a processor, it implements the steps of the congestion condition identification method based on vehicle driving data.
[0035] This application proposes a method for identifying congestion conditions based on vehicle driving data. The method involves acquiring current vehicle driving data; processing the current vehicle driving data to obtain processed state feature parameters; analyzing the state feature parameters using principal component analysis (PCA) to construct principal component data based on the analysis results; inputting the principal component data into a pre-prepared vehicle congestion condition identification model to output the identification result of the current vehicle congestion condition. Based on this application, a highly accurate vehicle congestion condition identification model is achieved by acquiring vehicle data and training it using PCA and a soft-margin support vector machine with radial basis function kernels. This achieves the effect of safely and reliably identifying and determining whether a vehicle is in a congested condition at a relatively low cost. Attached Figure Description
[0036] Fig. 1 This is a schematic diagram of the functional modules of the terminal equipment to which the traffic congestion condition identification device based on vehicle driving data belongs in this application;
[0037] Fig. 2 This is a flowchart illustrating a first exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data according to this application.
[0038] Fig. 3 This is a flowchart illustrating a second exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data according to this application.
[0039] Fig. 4 This is a flowchart illustrating a third exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data in this application.
[0040] Fig. 5 This is a flowchart illustrating the fourth exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data in this application;
[0041] Fig. 6 This is a flowchart illustrating the fifth exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data in this application;
[0042] Fig. 7 This is a flowchart illustrating the sixth exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data in this application;
[0043] Fig. 8 This is a flowchart illustrating the seventh exemplary embodiment of the method for identifying congestion conditions based on vehicle driving data in this application;
[0044] Fig. 9 This is a flowchart illustrating the vehicle congestion condition identification model of this application;
[0045] Fig. 10 This is a diagram showing the parameter optimization results of the vehicle congestion condition identification model in this application.
[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific implementation examples described herein are merely for illustrative purposes and are not intended to limit the scope of this application.
[0048] The main solution of this application embodiment is to acquire current vehicle driving data; process the current vehicle driving data to obtain processed state feature parameters; analyze the state feature parameters using principal component analysis (PCA) and construct principal component data based on the analysis results; input the principal component data into a pre-prepared vehicle congestion condition recognition model, and output the recognition result of the current congestion condition based on the vehicle's driving data. Based on this solution, a vehicle congestion condition recognition model with high accuracy is achieved by acquiring vehicle data and training it using PCA and a soft-margin support vector machine with radial basis function kernel. This achieves the effect of safely and reliably identifying and determining whether a vehicle is currently in a congested condition at a relatively low cost.
[0049] Technical terms used in the embodiments of this application:
[0050] Support Vector Machine (SVM)
[0051] Kernel function.
[0052] Support Vector Machine (SVM) is a classifier that performs binary classification of data using supervised learning. Its decision boundary is the hyperplane with the maximum margin calculated from the learning samples. In order to divide nonlinear data, SVM with kernel function is used to map low-dimensional data to high-dimensional data, making the data separable.
[0053] Specifically, refer to Fig. 1 ,Fig. 1 This is a schematic diagram of the functional modules of the terminal device to which the traffic congestion identification device based on vehicle driving data belongs in this application. This traffic congestion identification device based on vehicle driving data is a terminal device capable of identifying vehicle congestion conditions, thereby achieving a low-cost, safe, and reliable identification and judgment of whether a vehicle is currently in a congested condition. It can be implemented on the terminal device in hardware or software form.
[0054] In this embodiment, the terminal device to which the traffic congestion condition identification device based on vehicle driving data belongs includes at least an output module 110, a processor 120, a memory 130, and a communication module 140.
[0055] The memory 130 stores the operating system and a congestion condition recognition program based on vehicle driving data. The congestion condition recognition device based on vehicle driving data can acquire current vehicle driving data; process the current vehicle driving data to obtain processed state feature parameters; analyze the state feature parameters using principal component analysis (PCA) and construct principal component data based on the analysis results; input the principal component data into a pre-prepared vehicle congestion condition recognition model; and output the current vehicle congestion condition recognition result, etc., stored in the memory 130. The output module 110 can be a display screen, etc. The communication module 140 can include a WIFI module, a mobile communication module, and a Bluetooth module, etc., and communicates with external devices or servers through the communication module 140.
[0056] The congestion condition identification program based on vehicle driving data stored in memory 130, when executed by the processor, performs the following steps:
[0057] Obtain current vehicle driving data;
[0058] The current vehicle driving data is processed to obtain processed state feature parameters;
[0059] The state characteristic parameters are analyzed using principal component analysis, and principal component data are constructed based on the analysis results.
[0060] The principal component data is input into a pre-obtained vehicle congestion condition identification model, and the identification result of the current vehicle congestion condition is output.
[0061] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0062] Based on the current vehicle driving data, the initial state characteristic parameters are calculated according to preset rules;
[0063] The initial state feature parameters are standardized to obtain the processed state feature parameters.
[0064] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0065] Based on the state feature parameters, a covariance matrix is constructed, and principal component data arranged in order of eigenvalue size are calculated.
[0066] After extracting the principal component data in the order described, the principal component data is constructed. If the cumulative value in the extracted principal component data reaches the preset total variance ratio for the first time, no further extraction will be performed.
[0067] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0068] Obtain the labeled training set;
[0069] The labeled training set is input into a soft-margin support vector machine model with radial basis kernel function for model training to obtain an initial vehicle congestion condition recognition model.
[0070] After optimizing the initial vehicle congestion condition identification model using a genetic algorithm, the principal component data is input for model training to obtain the final vehicle congestion condition identification model, which can be used for vehicle congestion condition identification.
[0071] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0072] The penalty function and kernel width in the soft-margin support vector machine with radial basis kernel function are optimized by genetic algorithm to obtain the penalty function and kernel width at the optimal accuracy.
[0073] After optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel function width at the optimal accuracy, the model is input into the principal component data for model training to obtain the final vehicle congestion condition recognition model for use in recognizing vehicle congestion conditions.
[0074] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0075] The labeled training set is input into the final vehicle congestion condition recognition model in the external environment of the vehicle for offline testing to ensure the reliability of the vehicle congestion condition recognition model.
[0076] Furthermore, when the congestion condition identification program based on vehicle driving data in memory 130 is executed by the processor, it also performs the following steps:
[0077] The principal component data is input into the final vehicle congestion condition recognition model for real vehicle testing to ensure the reliability of the vehicle congestion condition recognition model.
[0078] A device for identifying traffic congestion conditions based on vehicle driving data, characterized in that the device comprises:
[0079] The acquisition module is used to acquire current vehicle driving data;
[0080] The processing module is used to process the current vehicle driving data to obtain processed state feature parameters.
[0081] The analysis module is used to analyze the state characteristic parameters using principal component analysis and construct principal component data based on the analysis results.
[0082] The identification module is used to input the principal component data into a pre-obtained vehicle congestion condition identification model and output the identification result of the current vehicle congestion condition.
[0083] Based on, but not limited to, the terminal device architecture described above, this application proposes an embodiment of a method for identifying congestion conditions based on vehicle driving data.
[0084] Reference Fig. 2 , Fig. 2 This is a flowchart illustrating a first exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. The method for identifying congestion conditions based on vehicle driving data includes:
[0085] Step S110: Obtain current vehicle driving data;
[0086] Specifically, the current vehicle driving data includes information such as vehicle speed, accelerator pedal opening, and brake pedal opening, which is obtained through the current vehicle's CAN bus, resulting in lower acquisition costs and more timely access.
[0087] Step S130: Process the current vehicle driving data to obtain processed state feature parameters;
[0088] Specifically, based on the current vehicle driving data, initial state characteristic parameters are calculated according to preset rules. Braking time within a certain time period is defined as the time during which the pedal opening exceeds 3% within a preset time period. Other current vehicle driving data times are defined as preset time periods. The obtained current vehicle driving data is calculated using the formula for average, standard deviation, and maximum value to obtain state characteristic parameters. The initial state characteristic parameters are then standardized to obtain processed state characteristic parameters. The average value of the standardized data is 0, and the variance is 1. Standardization includes normalizing the initial state characteristic parameters. After standardization, the data is also decentered to avoid the influence of dimensions during subsequent principal component analysis. This processing method also facilitates subsequent classification. The normalization formula is as follows: For the i-th feature and the j-th parameter, For standardized data, For feature x i The average value is var(x) i Standard deviation:
[0089]
[0090] Step S150: Analyze the state characteristic parameters using principal component analysis and construct principal component data based on the analysis results;
[0091] Specifically, the parameters selected in the pairwise table 1 are subjected to dimensionality reduction using principal component analysis to reduce the amount of data and improve computation speed. A covariance matrix is constructed based on the state characteristic parameters, and principal component data arranged in order of eigenvalue size are calculated. The covariance matrix is as follows:
[0092]
[0093] The formula for calculating x1 of the oblique variance matrix is:
[0094]
[0095] The remaining terms are obtained by substituting the independent variables in turn. The eigenvalues corresponding to the eigenvectors of the covariance matrix are the variances in that direction. The formulas for calculating the eigenvectors and eigenvalues of the covariance matrix C are shown below:
[0096] Cu=λu
[0097] Where u is the feature vector and λ is the feature value. Then, the principal component data is constructed by extracting the principal component data in the order described. If the cumulative value in the extracted principal component data reaches the preset total variance proportion for the first time, no further extraction is performed. The extracted principal component data includes the feature values that reach the total variance proportion, thus obtaining the final constructed principal component data.
[0098] Step S170: Input the principal component data into the pre-obtained vehicle congestion condition recognition model and output the recognition result of the current vehicle congestion condition.
[0099] Specifically, the vehicle congestion condition identification model is obtained in the following way:
[0100] For binary problems like identifying traffic congestion conditions, a support vector machine (SVM) model can be established for solving the problem. The model is based on a given set of l elements, all labeled as positive (y). i =+1) or negative (y) i =-1) training set with labels {(x i ,y i The labeled training set, i = 1, 2, 3, ..., is obtained by acquiring vehicle driving data and corresponding congestion conditions, performing data processing and principal component analysis. An objective function is established to find a hyperplane to partition the training set data. The specific formula for the hyperplane is as follows:
[0101] ω T +b=0
[0102] Make
[0103]
[0104] That is, find the objective function:
[0105]
[0106] sty i (w T x i +b)
[0107] Since the data is not perfectly linearly separable, a slack variable ξ is introduced. i For i = 1, 2, ..., l, the optimal separating hyperplane can be optimized by dual optimality optimization. The objective function is:
[0108]
[0109] sty i (w T x i +b)≥1-ξ i
[0110] ξ i ≥0, i=1,2,...,l
[0111] In the formula, C is the penalty coefficient, and the magnitude of C represents the penalty for classification errors. The original problem can be transformed into a dual problem using the Lagrange operator. Since the principal component data is a nonlinear dataset, the hyperplane cannot be accurately obtained using a support vector machine. Therefore, a radial basis function (RBF) kernel is used to map the constructed principal component data to a high-dimensional linear feature space. An optimal classification hyperplane is constructed in this potentially infinitely large linear feature space. When using a support vector machine, the RBF kernel is prioritized. Finally, the objective function can be optimized using the dual optimality problem as follows:
[0112]
[0113]
[0114] The kernel function used in this application is the radial basis kernel function:
[0115]
[0116] In the formula, σ is the width of the kernel function, and its magnitude affects the concentration of the Gaussian distribution and the fitting effect. After using the kernel function to map the data to a high-dimensional feature space, it is not necessary to explicitly calculate the nonlinear function; only the kernel function needs to be calculated, thus avoiding the curse of dimensionality in the feature space.
[0117] By continuously training using the above method, adjusting the size of the penalty function during training, an initial vehicle congestion condition recognition model is obtained. The calculation can be performed using existing tools or referenced libraries. Finally, the optimal Lagrange operator α is obtained through multiple training iterations using the above method. i The vector ω can then be obtained, and the initial vehicle congestion condition recognition model training is complete.
[0118] Furthermore, a genetic algorithm is used to optimize the key parameters in the support vector machine model, such as optimizing the penalty function C and kernel width σ in the above scheme. Five-fold cross-validation is used to test the average fitness and the best fitness. The optimal penalty function C and kernel width σ after the best fitness is stabilized are found. After optimizing the initial vehicle congestion condition recognition model, the principal component data is input into the model for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition.
[0119] This embodiment, through the above-described scheme, specifically involves acquiring current vehicle driving data; processing the current vehicle driving data to obtain processed state feature parameters; analyzing the state feature parameters using principal component analysis (PCA) to construct principal component data based on the analysis results; inputting the constructed principal component data into a pre-prepared vehicle congestion condition recognition model, and outputting the recognition result of the current vehicle congestion condition. Based on this scheme, a vehicle congestion condition recognition model with high accuracy is achieved by acquiring vehicle data and training it using PCA and a soft-margin support vector machine with radial basis function kernels. This achieves the effect of safely and reliably identifying and determining whether a vehicle is in a congested condition at a relatively low cost.
[0120] Furthermore, referring to Fig. 3 , Fig. 3 This is a flowchart illustrating a second exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. The step of processing the current vehicle driving data to obtain processed state feature parameters includes:
[0121] Step S1301: Calculate the initial state characteristic parameters according to the current vehicle driving data and a preset rule;
[0122] Specifically, the braking time within a certain time period is the time when the pedal opening exceeds 3% within a preset time period. The other parameter times are preset time periods, which are generally set to 20 seconds. The current vehicle driving data obtained above are calculated according to the formula of average value, standard deviation, and maximum value, as shown in Table 1:
[0123] No. Characteristic parameter No. Characteristic parameter 1 Average value of vehicle speed 11 Maximum value of accelerator pedal opening 2 Maximum value of vehicle speed 12 Standard deviation of accelerator pedal opening 3 Standard deviation of vehicle speed 13 Average value of accelerator pedal change rate 4 Average value of vehicle acceleration 14 Average value of brake pedal opening 5 Maximum value of vehicle acceleration 15 Maximum value of brake pedal opening 6 Standard deviation of vehicle acceleration 16 Standard deviation of brake pedal opening 7 Average value of jerk 17 Average value of brake pedal change rate 8 Maximum value of jerk 18 Standard deviation of brake pedal change rate 9 Standard deviation of jerk 19 Average value of engine speed 10 Average value of accelerator pedal opening 20 Braking time in a certain time
[0124] Table 1: Feature Parameter Table
[0125] Step S1302: Standardize the initial state feature parameters to obtain the processed state feature parameters.
[0126] Specifically, the standardized data has a mean of 0 and a variance of 1. Standardization involves normalizing the initial state characteristic parameters. This normalization also decenters the data, preventing the influence of dimensions during subsequent principal component analysis and facilitating subsequent classification. The normalization formula is as follows: For the i-th feature and the j-th parameter, For standardized data, Let xi be the mean of the characteristic xi, and var(xi) be the standard deviation:
[0127]
[0128] This embodiment, through the above-described scheme, specifically calculates initial state feature parameters according to preset rules based on the current vehicle driving data; then, it standardizes these initial state feature parameters to obtain processed state feature parameters. Based on this scheme, by performing formula calculations and standardization on the acquired data, the influence of data dimensions is avoided, while simultaneously providing data support for subsequent model training.
[0129] Furthermore, referring to Fig. 4 , Fig. 4 This is a flowchart illustrating a third exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. The step of analyzing the state feature parameters using principal component analysis and constructing principal component data based on the analysis results includes:
[0130] Step S1501: Construct a covariance matrix based on the state feature parameters, and calculate the principal component data arranged in order of eigenvalue size;
[0131] Specifically, the parameters selected in Table 1 are subjected to dimensionality reduction using principal component analysis to reduce the amount of data and improve computation speed. A covariance matrix is constructed based on the state characteristic parameters, and the principal component data, arranged in order of eigenvalue magnitude, is calculated. The covariance matrix is as follows:
[0132]
[0133] The formula for calculating x1 of the oblique variance matrix is:
[0134]
[0135] The remaining terms are obtained by substituting the oblique variance variable one by one. The eigenvectors and corresponding eigenvalues are then calculated from the covariance matrix using the following formula:
[0136] =λu
[0137] Where u is the eigenvector and λ is the eigenvalue. Then, the principal component data is extracted according to the aforementioned order to construct the principal component data. If the cumulative value in the extracted principal component data reaches the preset total variance percentage for the first time, no further extraction is performed. The principal component data includes the principal component number, eigenvalue, variance percentage, and cumulative variance value. Taking Table 2 as an example, vehicle driving data within 20 seconds is randomly obtained, processed, and the covariance matrix between the data is calculated. The eigenvalues and variance percentages are obtained. The variance percentage is the ratio of the variance of each principal component to the total variance of the sum of all components.
[0138]
[0139] Table 2: Explanation of Principal Component Eigenvalues and Total Variance
[0140] Step S1502: After extracting the principal component data in the order described, construct the principal component data. If the cumulative value in the extracted principal component data reaches the preset total variance ratio for the first time, no further extraction will be performed.
[0141] Specifically, taking the data in Table 2 above as an example, if the cumulative value of the preset variance ratio is set to 90%, then from the result of step S1501, the cumulative value of the data obtained from the first principal component data to the eighth principal component data reaches the preset variance ratio. Therefore, it is not necessary to extract the principal component data after the eighth one. The eight principal component data are constructed to prepare for inputting into the support vector machine model to find the hyperplane and identify vehicle congestion conditions.
[0142] This embodiment, through the above-described scheme, specifically constructs a covariance matrix based on the state feature parameters, calculates principal component data arranged in order of eigenvalue size, and extracts the principal component data according to the stated order. If the cumulative value in the extracted principal component data reaches a preset total variance proportion for the first time, no further extraction is performed. Based on this scheme, principal component analysis ensures that the maximum variance of the dataset falls on the first principal component, the second variance on the second principal component, and so on. This maintains the features that contribute the most to the variance of the dataset while reducing the dimensionality of the dataset, thus achieving the goal of selecting effective features.
[0143] Furthermore, referring to Fig. 5 , Fig. 5 This is a flowchart illustrating a fourth exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. The step of inputting the principal component data into a pre-obtained vehicle congestion condition identification model and outputting the identification result of the current vehicle congestion condition includes:
[0144] Step S1700: Obtain the labeled training set;
[0145] Specifically, the training set is a training set obtained by acquiring vehicle driving data and corresponding congestion conditions, and performing data processing and principal component analysis. The data processing steps include processing the current vehicle driving data to obtain processed state feature parameters, analyzing the state feature parameters using principal component analysis, and creating labels corresponding to the data based on the actual working conditions when the data was acquired, thus obtaining a labeled training set.
[0146] Step S1701: Input the labeled training set into a soft-margin support vector machine model with radial basis kernel function for model training to obtain an initial vehicle congestion condition recognition model.
[0147] Specifically, since the current principal component data is nonlinear, a radial basis function (RBF) kernel is used to achieve nonlinear mapping, mapping the principal component data to a high-dimensional linear feature space. An optimal classification hyperplane is constructed in this potentially infinitely large linear feature space. When using a support vector machine, the RBF kernel is prioritized. Finally, the objective function can be optimized using the dual optimality problem as follows:
[0148]
[0149]
[0150] The kernel function used in this application is the radial basis kernel function:
[0151]
[0152] In the formula, σ represents the band size of the kernel function, and its magnitude affects the concentration of the Gaussian distribution and the fitting effect. After using the kernel function to map the data to a high-dimensional feature space, it is not necessary to explicitly calculate the nonlinear function; only the kernel function needs to be calculated, thus avoiding the curse of dimensionality in the feature space.
[0153] By continuously training using the above method, adjusting the size of the penalty function during training, an initial vehicle congestion condition recognition model is obtained. The calculation can be performed using existing tools or referenced libraries. Finally, the optimal Lagrange operator α is obtained through multiple training iterations using the above method. i The vector ω can then be obtained, and the initial vehicle congestion condition recognition model training is complete.
[0154] Step S1702: After optimizing the initial vehicle congestion condition identification model using a genetic algorithm, the principal component data is input for model training to obtain the final vehicle congestion condition identification model for use in identifying vehicle congestion conditions.
[0155] Specifically, a genetic algorithm is used to optimize the key parameters in the support vector machine model, such as optimizing the penalty function C and kernel width σ in the above scheme. Five-fold cross-validation is used to test the average fitness and the best fitness. The optimal penalty function C and kernel width σ after the best fitness is stable are found. After optimizing the initial vehicle congestion condition recognition model, the principal component data is input into the model for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition.
[0156] This embodiment, through the above-described scheme, specifically involves obtaining a labeled training set; inputting the labeled training set into a soft-margin support vector machine model with radial basis function kernel function for model training to obtain an initial vehicle congestion condition recognition model; optimizing the initial vehicle congestion condition recognition model using a genetic algorithm, and then inputting the optimized model into the principal component data for model training to obtain the final vehicle congestion condition recognition model, which is then used for vehicle congestion condition recognition. Based on this scheme, the accuracy of the vehicle congestion condition recognition model is improved by training it and optimizing it using a genetic algorithm.
[0157] Furthermore, referring to Fig. 6 , Fig. 6 This is a flowchart illustrating a fifth exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. The step of optimizing the initial vehicle congestion condition identification model using a genetic algorithm and then inputting the principal component data for model training to obtain the final vehicle congestion condition identification model for use in identifying vehicle congestion conditions includes:
[0158] Step S17021: Optimize the penalty function and kernel width in the soft-margin support vector machine with radial basis kernel function using a genetic algorithm to obtain the penalty function and kernel width at the optimal accuracy.
[0159] Specifically, the penalty function C is a factor that adjusts the margin and accuracy. A larger C indicates a greater reluctance to discard outliers; a smaller C indicates a less emphasis on outliers. When C approaches infinity, this problem means that samples with classification errors are not allowed to exist, making it a hard-margin problem. When C approaches 0, we no longer focus on correct classification, only requiring the margin to be as large as possible. In this case, we cannot obtain a meaningful solution, and the algorithm will not converge. This scheme mainly uses a soft-margin support vector machine; therefore, optimizing the penalty function C is equivalent to adjusting the classification samples to ensure classification accuracy. The kernel width σ affects the concentration of the Gaussian distribution and the fitting effect.
[0160] Step S17022: After optimizing the initial vehicle congestion condition recognition model according to the penalty function and kernel function width at the optimal accuracy, the model is input into the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition.
[0161] This embodiment, through the above-described scheme, specifically optimizes the penalty function and kernel width in the soft-margin support vector machine with radial basis function kernel function using a genetic algorithm to obtain the penalty function and kernel width at the optimal accuracy. Based on the penalty function and kernel width at the optimal accuracy, the initial vehicle congestion condition recognition model is optimized and then input into the principal component data for model training, resulting in the final vehicle congestion condition recognition model for identifying vehicle congestion conditions. Based on this scheme, the principal component data is input into the pre-obtained vehicle congestion condition recognition model, and the current vehicle congestion condition recognition result is output, achieving the effect of safely and reliably identifying and determining whether a vehicle is in a congestion condition at a relatively low cost.
[0162] Furthermore, referring to Fig. 7 , Fig. 7 This is a flowchart illustrating a sixth exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. Following the step of optimizing the initial vehicle congestion condition identification model according to the penalty function and kernel width at the optimal accuracy, and then inputting the principal component data for model training to obtain the final vehicle congestion condition identification model for vehicle congestion condition identification, the method further includes:
[0163] Step S17023: Input the labeled training set into the vehicle's external environment and perform offline testing on the final vehicle congestion condition recognition model to ensure the reliability of the vehicle congestion condition recognition model.
[0164] This embodiment, through the above-described scheme, specifically inputs the labeled training set into the final vehicle congestion condition recognition model in the external environment of the vehicle for offline testing. This ensures the reliability of the vehicle congestion condition recognition model and realizes whether the recognition of vehicle congestion conditions is affected in the offline environment, making the final vehicle congestion condition recognition model more reliable.
[0165] Furthermore, referring to Fig. 8 , Fig. 8 This is a flowchart illustrating a seventh exemplary embodiment of a method for identifying congestion conditions based on vehicle driving data. Following the step of optimizing the initial vehicle congestion condition identification model according to the penalty function and kernel width at the optimal accuracy, and then inputting the principal component data for model training to obtain the final vehicle congestion condition identification model for vehicle congestion condition identification, the method further includes:
[0166] Step S17024: Input the principal component data into the final vehicle congestion condition recognition model for real vehicle testing to ensure the reliability of the vehicle congestion condition recognition model.
[0167] This embodiment, through the above-described scheme, specifically by inputting the principal component data into the final vehicle congestion condition recognition model for real-vehicle testing, ensures the reliability of the vehicle congestion condition recognition model. It achieves the acquisition of the vehicle congestion condition recognition results of the vehicle in a real-world environment, ensuring the reliability of the recognition results in the real-world environment.
[0168] Furthermore, refer to Fig. 9 , Fig. 9 This is a flowchart illustrating the overall process of obtaining the vehicle congestion condition identification model. The steps of the vehicle congestion condition identification method are as follows:
[0169] First, acquire vehicle driving data. Vehicle data can be obtained through real vehicle data collection or through bench data collection.
[0170] Then, the acquired vehicle driving data is processed according to the formula of mean, standard deviation and maximum value to obtain state characteristic parameters;
[0171] Next, the characteristic parameter data shown in Table 1 are selected for principal component data analysis. During the analysis, the variance matrix is constructed to obtain the principal component factors, and the principal component data is extracted according to the preset variance proportion to construct the principal component data.
[0172] Next, a soft-margin support vector machine model with radial basis function kernel was chosen as the initial model. The principal component data was then trained using this soft-margin support vector machine model and optimized using a genetic algorithm. Fig. 10 As shown, a genetic algorithm is used to perform 5-fold crossover testing. After multiple iterations, as illustrated in the example, the kernel function width and penalty function value with the optimal accuracy are obtained after 20 iterations. This yields the final vehicle congestion condition recognition model for use in identifying vehicle congestion conditions.
[0173] Finally, real-vehicle testing and offline data testing were conducted to ensure the reliability of vehicle congestion condition identification.
[0174] This application acquires vehicle driving data; processes the current vehicle driving data to obtain processed state feature parameters; analyzes the state feature parameters using principal component analysis (PCA) and constructs principal component data based on the analysis results; inputs the principal component data into a soft-margin support vector machine (SVM) model with radial basis function kernel function for model training to obtain an initial vehicle congestion condition recognition model; optimizes the initial vehicle congestion condition recognition model using a genetic algorithm and then inputs it back into the principal component data for model training to obtain a final vehicle congestion condition recognition model for use in identifying vehicle congestion conditions. Through real-vehicle testing and offline data testing, the reliability of the vehicle congestion condition model is ensured, achieving the effect of safely and reliably identifying and determining whether a vehicle is in a congested condition at a relatively low cost.
[0175] Furthermore, this application also proposes a device for identifying congestion conditions based on vehicle driving data, the device comprising:
[0176] The acquisition module is used to acquire current vehicle driving data;
[0177] The processing module is used to process the current vehicle driving data to obtain processed state feature parameters.
[0178] The analysis module is used to analyze the state characteristic parameters using principal component analysis and construct principal component data based on the analysis results.
[0179] The identification module is used to input the principal component data into a pre-obtained vehicle congestion condition identification model and output the identification result of the current vehicle congestion condition.
[0180] Furthermore, this application also proposes a terminal device, which includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the steps of the method for identifying congestion conditions based on vehicle driving data.
[0181] Since this program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be elaborated here.
[0182] Furthermore, this application also proposes a storage medium storing a program, which, when executed by a processor, implements the steps of the method for identifying congestion conditions based on vehicle driving data as described above.
[0183] Since this program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be elaborated here.
[0184] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method for identifying congestion conditions based on vehicle driving data, article, or system that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0185] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0186] Through the above description of the embodiments, those skilled in the art can clearly understand that the congestion condition identification method based on vehicle driving data in the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the congestion condition identification method based on vehicle driving data of each embodiment of this application.
[0187] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for identifying congestion conditions based on vehicle driving data, characterized in that, The method for identifying congestion conditions based on vehicle driving data includes the following steps: Acquire current vehicle driving data, including vehicle speed, accelerator pedal opening, and brake pedal opening; The current vehicle driving data is processed to obtain processed state feature parameters; The step of processing the current vehicle driving data to obtain processed state feature parameters includes: Based on the current vehicle driving data, the initial state characteristic parameters are calculated according to preset rules; The initial state feature parameters are standardized to obtain the processed state feature parameters; The state characteristic parameters are analyzed using principal component analysis, and principal component data are constructed based on the analysis results. The principal component data is input into the pre-obtained vehicle congestion condition recognition model, and the recognition result of the current vehicle congestion condition is output. The step of obtaining the vehicle congestion condition identification model before the step of inputting the principal component data into the pre-obtained vehicle congestion condition identification model and outputting the identification result of the current vehicle congestion condition includes: Obtain the labeled training set; The labeled training set is input into a soft-margin support vector machine model with radial basis kernel function for model training to obtain an initial vehicle congestion condition recognition model. After optimizing the initial vehicle congestion condition identification model using a genetic algorithm, the principal component data is input for model training to obtain the final vehicle congestion condition identification model for use in identifying vehicle congestion conditions. The step of optimizing the initial vehicle congestion condition identification model using a genetic algorithm and then inputting the principal component data for model training to obtain the final vehicle congestion condition identification model for use in identifying vehicle congestion conditions includes: The penalty function and kernel width in the soft-margin support vector machine with radial basis kernel function are optimized by genetic algorithm to obtain the penalty function and kernel width at the optimal accuracy. After optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel function width at the optimal accuracy, the model is input into the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition. The step of optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel function width at the optimal accuracy, then inputting the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition, further includes: The labeled training set is input into the final vehicle congestion condition recognition model in the external environment of the vehicle for offline testing to ensure the reliability of the vehicle congestion condition recognition model. The step of optimizing the initial vehicle congestion condition recognition model based on the penalty function and kernel function width at the optimal accuracy, then inputting the principal component data for model training to obtain the final vehicle congestion condition recognition model for vehicle congestion condition recognition, further includes: The principal component data is input into the final vehicle congestion condition recognition model for real vehicle testing to ensure the reliability of the vehicle congestion condition recognition model.
2. The method for identifying congestion conditions based on vehicle driving data according to claim 1, characterized in that, The step of analyzing the state characteristic parameters using principal component analysis and constructing principal component data based on the analysis results includes: Based on the state feature parameters, a covariance matrix is constructed, and principal component data arranged in order of eigenvalue size are calculated. After extracting the principal component data in the order described, the principal component data is constructed. If the cumulative value in the extracted principal component data reaches the preset total variance ratio for the first time, no further extraction will be performed.
3. A device for identifying congestion conditions based on vehicle driving data, characterized in that, The congestion condition identification device based on vehicle driving data is used to implement the steps of the congestion condition identification method based on vehicle driving data as described in any one of claims 1-2, wherein the congestion condition identification device based on vehicle driving data includes: The acquisition module is used to acquire current vehicle driving data, which includes vehicle speed, accelerator pedal opening, and brake pedal opening. The processing module is used to process the current vehicle driving data to obtain processed state feature parameters; The processing module is also used to calculate the initial state characteristic parameters according to the current vehicle driving data and a preset rule. The initial state feature parameters are standardized to obtain the processed state feature parameters; The analysis module is used to analyze the state characteristic parameters using principal component analysis and construct principal component data based on the analysis results. The training module is used to input the principal component data into a pre-obtained vehicle congestion condition recognition model and output the recognition result of the current vehicle congestion condition.
4. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a congestion condition identification program based on vehicle driving data stored in the memory and executable on the processor. When the congestion condition identification program based on vehicle driving data is executed by the processor, it implements the steps of the congestion condition identification method based on vehicle driving data as described in any one of claims 1-2.
5. A storage medium, characterized in that, The storage medium stores a congestion condition identification program based on vehicle driving data. When the congestion condition identification program based on vehicle driving data is executed by the processor, it implements the steps of the congestion condition identification method based on vehicle driving data as described in any one of claims 1-2.
Citation Information
Patent Citations
Road congestion degree prediction method, apparatus, computer device, and readable storage medium
WO2021169174A1