An efficient vibration control can reduce negative effects induced by environmental vibrations and thereby improve the performance of precision instruments and the qualities of manufacture. The performance of the widely used linear quadratic regulator control algorithm, a classical active control methodology, depends on the parameters of the control algorithm. Consequently, a set of fixed parameters cannot satisfy the demand for controlling various types of environmental vibrations. Therefore, this study proposes a vibration identification method based on a convolutional neural network. This method helps to optimize the linear quadratic regulator algorithm by selecting corresponding optimal parameters according to the identification results, thereby achieving the objective of optimal control subjected to various types of vibration inputs. Specifically, environmental vibration signals are collected, and the preliminary features of the vibrations (i.e. wavelet coefficient matrices or images) are adopted as input samples for the convolutional neural network. A genetic algorithm is used to optimize the parameters of the linear quadratic regulator algorithm for each type of vibration; subsequently, the trained convolutional neural network model with the best performance is used to identify the vibration and select the corresponding optimal parameters of the linear quadratic regulator algorithm under different types of vibration inputs. Case studies show that the performance of the improved linear quadratic regulator control method is significantly better than that of the conventional linear quadratic regulator algorithm with fixed parameters.