The existing risk intelligent identification methods in the field of gas drilling have poor generalization, and the low recognition rate in the early stages of risk leads to a delay in the correct risk identification. In this study, we perform data mining analysis of gas drilling while drilling monitoring data and propose an improved convolutional neural network model to identify the risk of drilling conditions. In this model, we extract the time-varying correlation features of multiple monitoring parameters while drilling using the convolution layer. We also replace the full connection layer for feature classification by using a radial basis function (RBF) network with nonlinear classification ability. The use of RBF improves classification accuracy and reduces the time of risk identification in the transitional stage of working conditions. Since the model cannot converge to the working condition sample training due to an unreasonable initial value, we introduce the K
-means algorithm to initialize the RBF clustering center and center width to resolve this issue. We introduce the loss function component based on the distance mean square error to train the whole network model. The loss function also allows the optimization of model parameters, ensuring the continuous adjustment of the optimal clustering center in the process of network training. We also formulate a criterion for selecting the number of hidden layer nodes so as to improve calculation efficiency and facilitate the generalization of the model. The network model is then compared with the traditional convolution neural network model for field application. Our experimental results show that the identification time points of three common risks, i.e., gas production, water production, and sticking drill, are advanced by 56 s, 16 s and 8 s when using our network model. This finding fully demonstrates the applicability of nonlinear classification neural network in the field of oil and gas field exploration and development.