**4. Conclusions**

In this study, the SSC detection of fresh jujubes cultivated in different modes (openfield cultivation and rain-shelter cultivation) was carried out based on VIS/NIR spectroscopy using variable selection and model updating. Based on the full-wavelength and the extracted characteristic wavelengths using IRIV and IRIV-SPA, the established LS-SVM models all achieved good predictions for the SSC of fresh jujubes cultivated in the open field, but the prediction results for samples cultivated in the rain shelter were all unsatisfactory. Compared with the IRIV algorithm, the IRIV-SPA algorithm achieved better performance. The extracted characteristic wavelengths of the two cultivation modes using IRIV-SPA were fused together. Combining the wavelength shift characteristics of the VIS/NIR spectrum, the repeated wavelengths were eliminated to form a new variable combination. Variable selection using wavelength fusion improved the SSC prediction results, but the degree of improvement in the SSC prediction of samples from rain-shelter cultivation needed to be increased. The method of adding samples under new conditions was applied for the model update. The updated LS-SVM model using the wavelength fusion-Euclidean distance achieved the best prediction results for SSC of fresh jujubes cultivated in the open field (Rp2 = 0.79, RMSEP = 1.17%, RPD = 2.20) and the rain shelter (Rp2 = 0.81, RMSEP = 1.35%, RPD = 2.10). The test results showed that the R2, RMSE, and RPD for the SSC of "Huping" jujubes from open-field cultivation were 0.82, 1.49%, and 2.18, respectively. The R2, RMSE, and RPD for the SSC of "Huping" jujubes from rain-shelter cultivation were 0.81, 1.44%, and 2.17, respectively. The method proposed in this study realizes the SSC detection of different cultivated fresh jujubes, provides a method for the establishment of a robust VIS/NIR detection model, and provides a basis for the online detection of fruit quality. In the future, a production line for the quality detection of fresh jujubes will be developed and optimized based on VIS/NIR spectroscopy.

**Author Contributions:** Conceptualization, H.S.; methodology, H.S. and R.R.; software, H.S., J.X., and H.Z.; writing—original draft, H.S. and R.R.; writing—review and editing, H.S. and S.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by Applied Basic Research Project of Shanxi Province (Project No. 201901D211359), Award-funded Scientific Research Projects for Outstanding Doctors to Work in Shanxi Province (Project No. SXYBKY2019049), Science and Technology Innovation Fund Project of Shanxi Agricultural University (Project No. 2020BQ02), The Key Research and Development Program of Shanxi Province (Project No. 201903D221027), and National Natural Science Foundation of China (31801632).

**Institutional Review Board Statement:** Not applicable.

**Data Availability Statement:** Data are contained within the article.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

