## 1 Introduction  
As a popular snack food, dried soybeans are preferred by consumers because they are easy to carry and eat. Moisture content is an important parameter used in evaluating the drying quality of dried soybeans [1]. Traditional methods for moisture content measurement, such as the gravimetric oven method and the Karl Fisher titration, destroy dried samples in the testing process. The mentioned conventional measurement methods require considerable time to measure a large number of samples, which is time-consuming and laborious [2]. Considering the limitations of traditional methods, several studies have focused on the development of nondestructive technologies in evaluating the moisture content of dried samples. Machine vision and near-infrared spectroscopy are the two main methods for rapid nondestructive measurement [1; 3; 4]. These two methods have several limitations, even if they can rapidly detect the sample dryness without destroying samples. The traditional machine vision method can only obtain a limited detection range in detecting samples. The complete average image information cannot be obtained due to visual range limitation, which leads to inaccurate measurement. Near-infrared radiation (NIR) covers the range of the electromagnetic spectrum between 780 and 2500 nm. Since water has several strong absorption wavelengths at this wavelength range, NIR spectroscopy is widely used in moisture measurement of various agriculture products. However, it cannot obtain the spatial information of samples. Thus, the results obtained by these two methods may lead to the loss of valuable information. Hyperspectral imaging possesses the advantages of the two methods and overcomes their shortcomings via rapid nondestructive measurement. Hyperspectral imaging can provide detailed or complete information, such as chemical composition, internal structure characteristics, and morphological information [5]. Thus, this technology may be used as an alternative method for predicting the moisture content of vegetable soybeans during drying. In the process of predicting moisture content of vegetable soybeans by using a hyperspectral system, not all spectral wavelengths are beneficial for wavelength modeling, because many spectral data exist in the entire spectrum. Adjacent wavelengths may have high correlation and redundancy that increase the storage space of data. The actual calculation amount is remarkably increased, and the accuracy and real-time of the result are directly affected. Therefore, the selection of optimal wavelengths is important for rapid and accurate non-destructive analysis of agricultural products using hyperspectral images. Meanwhile, a reduction of the dimensions of hyperspectral image data reduces the impact on the overall recognition accuracy. Various algorithms have been applied to select optimal wavelength, such as the successive projections algorithm (SPA), which has been used to eliminate redundant information in near-infrared spectroscopy in order to analyze the moisture content of wheat [6]. An uninformative viable elimination algorithm (UVE) has also been applied in wavelength selection to establish an apple firmness prediction model [7; 8], and a genetic algorithm (GA) was used for wavelength selection in remote sensing hyperspectral systems to improve the observation of surface objects [9; 10]. Although these algorithms have been applied for optimal wavelength selection, the accuracy of the results cannot be guaranteed by using these methods in trying to detect the moisture content of vegetable soybeans. A firework algorithm (FWA) [11] imitates the actual process of a firework explosion. A firework explosion in this context is defined as the process of individual firework that automatically searches for the optimal solution in the solution area. The FWA method has been applied to many practical problems in recent years.