During the online welding of railway aluminum alloy trucks using fixed shoulder stirring friction welding technology, defects such as flying edges, cracks, and tunnels may occasionally occur due to poor coordination of the welding process parameters. This inconsistency can compromise the success rate of the welding. To enhance the quality and efficiency of the welding repairs, an optimization of the welding process parameters of the developed equipment was undertaken. An intelligent prediction model for welding parameters was established based on the BSO-BP neural network. The model was trained with 17 sets of authentic welding data, and its accuracy was validated through a comparison of predictive outputs with actual welding outcomes. The BSO-BP neural network demonstrated a maximum error of 1.85% and a relative error of 1.27%, showing a marked improvement over traditional BP neural network predictions. Utilize the optimized welding process parameters obtained from a trained predictive model to conduct welding experiments under actual working conditions. During the experiment, the deformation of the test plates was minimal. The resulting welds were smooth, free of defects such as flash and grooves, and the overall welding quality was good. The tensile strength of the welds, at 262.95 MPa, was close to the predicted results and reached 78.49% of the base material’s tensile strength. In the microstructure of the weld, sporadically distributed dimples of varying sizes can be observed, indicating the presence of second phase particles which contribute to enhancing the tensile strength of the weld, thereby meeting the strength requirements of the aluminum alloy car body. The parameter optimization method used has certain reference value and can provide guidance for similar research.