In order to improve reliability and fatigue life of cylinder gaskets in heavy duty diesel engine, several methods and algorithms are applied to optimize operating factors of gaskets. Finite element method is utilized to figure out and analyze the temperature fields, thermal-mechanical coupling stress fields, and deformations of gasket. After determining the maximum values of three state parameters, the orthogonal experimental design method is adopted to analyze the influence rules of five operating factors on three state parameters of the gaskets and four factors which most significantly affect these state parameters are determined. Then, the method which uses operating factors to predict state parameters is established on the application of hybrid neuron network based on partial least squares regression and deep neural network. The comparison results between the predicted values and real values verified the accuracy of the hybrid neuron network method. Based on artificial bee colony algorithm, improvement is attached to the way three kinds of grey wolves locate preys in grey wolf algorithm and the way how using different hierarchy wolfs in grey wolf algorithm to determine three weight coefficients and the location of prey is put forward with. The method using artificial bee colony algorithm to optimize the grey wolf algorithm is called ABC and GWO. The proposed HNN and the ABC and GWO method are applied to work out operating factors values which correspond to optimal state parameters of gasket, and the gaskets are optimized according to the optimal values. It has been demonstrated by finite element analysis results that maximum temperature, maximum coupling stress, and the maximum deformation decrease to 6 K, 12.57 MPa, and 0.0925 mm compared to the original values, respectively, which proves the accuracy of the algorithm and the validity of the improvement.