This study explores an advanced method for improving line loss in station areas, a vital issue in the energy sector. By analyzing line loss data from the X-area station using data mining and a novel convolutional neural network (CNN) model optimized with particle swarm optimization, we aimed to pinpoint and diagnose line loss issues effectively. Our model, which integrates specific line loss predictive parameters, underwent rigorous training and testing with collected data. The results were promising: the model's predictions closely matched actual data, with most errors under 0.1. It outperformed existing models in iteration speed, convergence time, and accuracy, evidenced by lower mean square error (0.0112), root mean square error (0.1023), and average absolute error (3.2514%). This research presents a potent tool for distribution network analysis, offering practical insights for line loss localization and diagnosis.