###### Abstract
Although national standards and industry standards have been established for chemical fertilizers, there are some chemical fertilizer products on the market that do not meet the standards due to substandard raw materials, backward production processes, storage and transportation losses, and other reasons. Traditionally, the content of nitrogen, phosphorus, and potassium in fertilizers is detected by chemical methods, such as the potassium tetraphenylborate gravimetric method [4], quinoline phosphomolybdate gravimetric method [5], temperature titration method [6], etc. Chemical methods can accurately measure the content of nutrient elements in fertilizers, but it usually has complex pretreatment processes and harsh detection conditions. Samples need to be sent to a special laboratory for measurement, resulting in high economic and time costs, and cause secondary pollution during the detection process. In the process of chemical fertilizer use, a method that can quickly detect the content of various nutrients in fertilizers is needed to determine whether the quality of fertilizers meets the standards and whether there are problems such as spoilage. The visible/near-infrared (Vis/NIR) spectroscopy technology measures the content of components in substances through the selective absorption of visible/near-infrared light by the functional groups of the substances. It has the characteristics of fast analysis speed, low cost, being non-destructive, requiring fewer samples, fast preparation, and that multiple characteristics can be analyzed from a single spectral scan. It is widely used in the quantitative detection and qualitative identification of inorganic, organic, and biological components in complex mixtures and matrices. In recent years, there has been more and more research on the use of Vis/NIR spectroscopy to detect the content of various nutrients in fertilizers. [PERSON] et al. used Vis/NIR spectroscopy to quickly analyze the organic matter content, total nitrogen content, pH value in the soil and the main nutrient element content in the fertilizers [7]. [PERSON] et al. quantitatively analyzed the total nitrogen content of ammonium phosphate fertilizer based on Vis/NIR spectroscopy and least square support vector machine. The R\({}^{2}\) and the root mean square error (RMSEP) of the validation set are 0.91 and 0.101 respectively [8]. [PERSON] et al. used NIR spectroscopy and partial least squares to quickly assess the quality of organic fertilizers. It was found that the predictions of total organic matter, water-soluble organic nitrogen, pH, and germination rate are more accurate, while the results of water content, total nitrogen, electrical conductivity, and water-soluble organic carbon are less accurate [9]. These researchers have well explored the value of Vis/NIR spectroscopy in fertilizer quality detection. However, they all used high-precision spectrometers, which are expensive in practical application and difficult to popularize. At the same time, the fertilizer samples collected in research are generally of a single variety, and the distribution gradient of nutrient element content in different samples is not sufficiently dispersed, and cannot well cover the nutrient content range of most chemical fertilizers on the market. In this research, some chemical fertilizer samples which have good gradient of N, P\({}_{2}\)O\({}_{5}\), and K\({}_{2}\)O nutrient content were gained, and the spectral signals of the fertilizer samples were collected using small visible/near-infrared spectrometers. Based on the spectral signal, different spectral detection models for the three nutrient contents of N, P\({}_{2}\)O\({}_{5}\), and K\({}_{2}\)O in common fertilizers were established so as to provide a reliable basis and method for the rapid detection of nutrient contents in actual chemical fertilizer applications.