In response to the inconsistency between the features obtained by deep learning models and the quality features reflected by the physical laws of the welding process, this study proposes a solution by integrating a physical prior information model with a CNN model. Initially, the physical laws of the welding process are utilized to annotate the arc, weld pool, and weld seam features relevant to quality, which are then acquired through image processing algorithms, thereby converting the physical laws into a prior information model. Subsequently, this prior information model guides the CNN model for quality recognition, and the CNN model's attention to features is explained through visualization methods to elucidate the relationship between features and quality recognition. Experimental results demonstrate that under the guidance of the prior information model, the CNN model not only automatically focuses on features relevant to quality but also achieves a differential feature attention strategy, thereby improving the recognition accuracy of different outcomes. This research provides a new perspective for deep learning in the field of welding quality recognition.