Moldy core is a common internal disease in apples, with current visible/near-infrared (Vis/NIR) spectroscopy-based detection methods often suffering from inaccuracies due to variations in fruit diameter and soluble solids content (SSC). To address this issue, an online detection system was developed that integrates spectral corrections for both diameter and SSC information. The spectra were first corrected using a hyperbolic sine function based on fruit diameter, followed by a second correction utilizing the spectral features of SSC through the Variational Mode Decomposition (VMD) algorithm. This two-step correction process effectively mitigated the influence of diameter and SSC variations on the spectral data. A Partial Least Squares Discriminant Analysis (PLS-DA) model was subsequently constructed using the corrected spectra and moldy core labels. Compared to the uncorrected model, the improved model exhibited substantial enhancements in accuracy, recall, and precision, achieving 94.44%, 92.59%, and 96.15%, respectively. Additionally, online validation with independent samples demonstrated an accuracy of 88.33%, highlighting the system's stability and robustness for efficient online detection of apple moldy core.