The invention relates to a 
bat algorithm support vector machine-based highway traffic 
state recognition method. The method includes the following steps that: S1, traffic 
state parameter data and running state data are obtained, and data sets are divided into a 
training set and a 
test set; S2, the parameters of a 
support vector machine are set, a bat 
population is constructed and initialized, an optimal bat position and a fitness value are calculated; S3, 
bat algorithm parameters are updated, a random number is generated for each bat individual, if rand1 is larger than R<t>i, random disturbanceis generated near an optimal solution, thus, the method shifts to local search; S4, a 
genetic algorithm is adopted to optimize the bat individuals; S5, a random number is generated for each bat individual, if rand2 is smaller than A<t>i, and fi is larger than f<*>, a 
pulse rate and 
loudness are updated; S6, the bats are rearranged, so that an xbest is obtained, whether a maximum number of iterations is reached is judged, and the optimal penalty parameters c and g of the 
support vector machine are determined; and S7, the 
training set is inputted into the support vector 
machine model so as to perform training, and an outputted predicted state is compared with the state of the 
test set, so that recognition accuracy can be calculated.