Now that intelligent manufacturing is developing rapidly and intelligent production is becoming more and more popular, welding is an indispensable link in production, and the inspection of intelligent welding quality is very important. Therefore, this paper proposes welding based on a genetic algorithm to optimize BP neural network. Quality inspection method. The model takes welding fault undercuts, pores, cracks, pits, uneven welding width, and non-fusion as the input parameters of the model. The simulation results show that using BP neural network as a diagnostic method will occasionally fall into the local optimum. The genetic algorithm is introduced to optimize the initial value and threshold of the BP neural network to avoid falling into the local optimum after optimization, and the calculation accuracy is higher. Compared with the 72% diagnosis rate of the BP neural network, the diagnosis rate of improved BP neural network can reach 89%.