A rice storage year nondestructive identification method and device

CN122990243APending Publication Date: 2026-10-27WUHAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611195125.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]有鉴于此,有必要提供一种大米贮藏年份无损识别方法及装置,用以解决现有技术中大米贮藏年份多以光谱响应作为主要判别依据,对VIS-NIR图像立方中平均光谱和空间纹理两类信息的联合利用不够充分,导致检测精度较低的技术问题

Benefits of technology

[0016]本发明的有益效果是:获取待检测大米的高光谱图像集;高光谱图像集包括近红外光谱图像集和短波红外光谱图像集;分别对近红外光谱图像集和短波红外光谱图像集进行分割提取,得到所有单粒米区域,并对每个单粒米区域的光谱向量和局部图像进行处理,得到近红外平均光谱数据、短波红外平均光谱数据和三维光谱图像;对近红外平均光谱数据和短波红外平均光谱数据进行信息融合,得到双谱段光谱特征向量;基于三维光谱图像进行局部二值模式纹理特征的提取,得到多光谱纹理特征向量;对双谱段光谱特征向量和多光谱纹理特征向量进行信息融合之后输入至SVM分类模型,输出待检测大米的贮藏年份识别结果;本发明不仅以近红外平均光谱数据和短波红外平均光谱数据的双谱段光谱特征向量作为了判断依据,还以三维光谱图像的局部二值模式纹理特征组合的多光谱纹理特征向量作为判断依据,从而将三维光谱图像中的平均光谱和空间纹理进行了联合,从而通过平均光谱对内部化学演化进行检测,通过空间纹理对外部变化进行检测,通过内外联合检测提高了检测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990243A_ABST
    Figure CN122990243A_ABST
Patent Text Reader

Abstract

The application relates to a rice storage year lossless identification method and device, which comprises the following steps: processing spectral vectors and local images of a hyperspectral image set to obtain near-infrared average spectral data, short-wave infrared average spectral data and a three-dimensional spectral image; performing information fusion on the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-spectrum spectral feature vector; performing CARS screening on the three-dimensional spectral image to obtain a characteristic spectral image set; extracting local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector; inputting the dual-spectrum spectral feature vector and the multispectral texture feature vector into an SVM classification model after information fusion to output a rice storage year identification result; and the average spectrum and the spatial texture are combined, and the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural product testing technology, and in particular to a non-destructive method and apparatus for identifying the storage year of rice. Background Technology

[0002] Rice is an important staple crop, playing a fundamental role in people's diets, grain reserves, and market supply systems. Determining the storage life of rice primarily relies on offline detection of fatty acid value, peroxide value, volatile components, and other physicochemical indicators. While these methods generally offer high reliability, they often require destructive sampling, sample pretreatment, chemical reagents, and lengthy testing cycles, making it difficult to meet the practical needs of grain storage, market circulation, and on-site supervision for rapid, continuous, and low-cost screening.

[0003] Rice storage and aging involve internal chemical evolution and external characterization changes, thus requiring the extraction and integration of hyperspectral information at different scales. Although near-infrared spectroscopy and hyperspectral techniques can capture information related to the storage year of rice, existing methods still have room for improvement in information organization and utilization. Current technologies mainly focus on average spectra and machine learning models, and the storage year is often determined primarily by spectral response. Some studies have introduced auxiliary information such as moisture, fatty acids, or colorimetric sensor arrays, but the combined utilization of average spectral and spatial texture information in the VIS-NIR image cube is insufficient, resulting in low detection accuracy. Therefore, distinguishing samples from adjacent storage years still faces challenges in terms of recognition accuracy.

[0004] Therefore, there is an urgent need to propose a non-destructive identification method and device for rice storage year, which can solve the technical problem that the existing technology mainly uses spectral response as the main criterion for determining the storage year of rice, and does not make full use of the combined information of average spectrum and spatial texture in VIS-NIR image cubic, resulting in low detection accuracy. Summary of the Invention

[0005] In view of this, it is necessary to provide a non-destructive identification method and device for rice storage year, in order to solve the technical problem that the storage year of rice is mainly determined by spectral response, which does not make full use of the combined information of average spectrum and spatial texture in VIS-NIR image cubic, resulting in low detection accuracy.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for non-destructive identification of the storage year of rice, comprising: Acquire a set of hyperspectral images of the rice to be tested; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The near-infrared spectral image set and the short-wave infrared spectral image set are segmented and extracted to obtain all single-grain rice regions. The spectral vector and local image of each single-grain rice region are then processed to obtain near-infrared average spectral data, short-wave infrared average spectral data, and three-dimensional spectral images. Information fusion is performed on the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector; Based on the three-dimensional spectral image, local binary pattern texture features are extracted to obtain a multispectral texture feature vector; After fusing the information from the dual-band spectral feature vector and the multispectral texture feature vector, the data is input into the SVM classification model, which outputs the storage year identification result of the rice to be detected.

[0007] In one possible implementation, the step of segmenting and extracting the near-infrared spectral image set and the short-wave infrared spectral image set to obtain all single-grain rice regions includes: The images in the hyperspectral image set are converted using a standard black-and-white correction method to obtain a reflectance image set; Based on the segmentation algorithm, the near-infrared spectral image set and the short-wave infrared spectral image set in the reflectance image set are segmented and extracted to obtain all single-grain rice regions.

[0008] In one possible implementation, the processing of the spectral vector and local image of each single grain region to obtain near-infrared average spectral data, short-wave infrared average spectral data, and a three-dimensional spectral image includes: The spectral vectors of each single-grain rice region in the near-infrared spectral image set and the short-wave infrared spectral image set are calculated respectively to obtain the near-infrared average spectral data and the short-wave infrared average spectral data of each single-grain rice region. Based on the near-infrared spectral image set, the local image of each single grain of rice region is reconstructed to obtain a three-dimensional spectral image.

[0009] In one possible implementation, the information fusion of the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector includes: Based on the near-infrared average spectral data and the short-wave infrared average spectral data of all single-grain rice regions, the near-infrared spectrum and the short-wave infrared spectrum are obtained. The near-infrared spectrum and the short-wave infrared spectrum are preprocessed by normalization through multivariate scattering correction to obtain the effective near-infrared spectrum and the effective short-wave infrared spectrum. The near-infrared effective spectrum and the short-wave infrared effective spectrum are reduced in dimension by principal component analysis to obtain near-infrared data vector and short-wave infrared data vector. The near-infrared data vector and the short-wave infrared data vector are standardized respectively to obtain the near-infrared principal component score vector and the short-wave infrared principal component score vector. Based on the samples in the near-infrared principal component score vector and the short-wave infrared principal component score vector, the near-infrared features and short-wave infrared features of the same single-grain rice region are spliced ​​together to obtain a dual-band spectral feature vector.

[0010] In one possible implementation, the extraction of local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector includes: The three-dimensional spectral images are subjected to CARS filtering to obtain a set of feature spectral images; Local binary pattern texture features are extracted from the images in the feature spectral image set to obtain local binary pattern texture vectors; The set of feature spectral images is concatenated with the local binary pattern texture vector to obtain a multispectral texture feature vector.

[0011] In one possible implementation, the CARS filtering of the three-dimensional spectral image to obtain a set of feature spectral images includes: The three-dimensional spectral image is subjected to CARS screening based on the optimal wavelength subset determined by the CARS algorithm to obtain the CARS selected channels. The selected CARS channels are combined in pairs to obtain multiple sets of features; Based on the multiple sets of features and the three-dimensional spectral image, a normalized difference index map is constructed to obtain multiple index maps; Fisher's criterion was used to score the multiple index graphs, and the three pairs of index graphs with the highest scores were obtained; Based on the CARS selected channels, a set of characteristic spectral images is constructed from all single-channel images in the three-dimensional spectral image and the three index maps.

[0012] In one possible implementation, the process of fusing the dual-band spectral feature vector and the multispectral texture feature vector and then inputting the result into an SVM classification model to output the storage year identification result of the rice to be detected includes: The final input vector is obtained based on the dual-band spectral feature vector and the multispectral texture feature vector; The final input vector is input into the SVM classification model, and the storage year identification result of the rice to be detected is output.

[0013] In one possible implementation, the optimal wavelength subset determined based on the CARS algorithm includes: Acquire historical hyperspectral image sets of rice from multiple known storage years; the historical hyperspectral image sets include category labels for rice from each known storage year; The historical near-infrared average spectral data is used as the input for competitive adaptive reweighted sampling. During each weighted sampling process, the wavelength importance weight is calculated through partial least squares regression coefficients. Low-weight variables are gradually eliminated according to the exponential decay function. Three-fold cross-validation is performed on all wavelength subsets to obtain the root mean square error of each wavelength subset. The wavelength subset corresponding to the minimum value of the root mean square error is determined as the final recommended subset of the current iteration output. Perform 3-fold cross-validation on all wavelength subsets to obtain the root mean square error of the current wavelength subset and the corresponding survivor band combination; The survivor band combination with the minimum root mean square error is determined as the optimal wavelength subset.

[0014] In one possible implementation, the process of determining the CARS algorithm includes: After obtaining historical near-infrared average spectral data through the historical hyperspectral image set, the historical near-infrared average spectral data and the category label are used as inputs to the LASSO model. By adjusting the penalty coefficient, the bands with non-zero penalty coefficients in the historical near-infrared average spectral data are selected as features, and the bands corresponding to all selected features are combined to obtain the optimal band combination. By analyzing and comparing the optimal wavelength subset and the optimal band combination, it is determined that the optimal wavelength subset of the CARS algorithm is superior to the optimal band combination of the LASSO algorithm.

[0015] Secondly, the present invention also provides a non-destructive identification device for the storage year of rice, comprising: The image acquisition module is used to acquire a set of hyperspectral images of the rice to be detected; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The average spectrum determination module is used to segment and extract the near-infrared spectral image set and the short-wave infrared spectral image set respectively to obtain all single-grain rice regions, and to process the spectral vector and local image of each single-grain rice region to obtain near-infrared average spectral data, short-wave infrared average spectral data and three-dimensional spectral image. The spectral fusion module is used to fuse the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector. The texture recognition module is used to extract local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector; The year determination module is used to fuse the information of the dual-band spectral feature vector and the multispectral texture feature vector and then input them into the SVM classification model to output the storage year identification result of the rice to be detected.

[0016] The beneficial effects of this invention are as follows: It acquires a hyperspectral image set of rice to be tested; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set; it segments and extracts the near-infrared spectral image set and the short-wave infrared spectral image set respectively to obtain all single-grain rice regions, and processes the spectral vector and local image of each single-grain rice region to obtain near-infrared average spectral data, short-wave infrared average spectral data, and a three-dimensional spectral image; it fuses the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector; and it extracts local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector. The method involves fusing the dual-band spectral feature vector and the multispectral texture feature vector, then inputting them into an SVM classification model to output the storage year identification result of the rice to be detected. This invention not only uses the dual-band spectral feature vector of near-infrared average spectral data and short-wave infrared average spectral data as the judgment basis, but also uses the multispectral texture feature vector of the combination of local binary pattern texture features of three-dimensional spectral images as the judgment basis. This combines the average spectrum and spatial texture in the three-dimensional spectral image, thereby detecting internal chemical evolution through the average spectrum and external changes through the spatial texture. The combined detection of internal and external factors improves the detection accuracy. Attached Figure Description

[0017] Figure 1 A schematic flowchart of an embodiment of the non-destructive identification method for rice storage year provided by the present invention; Figure 2 For the present invention Figure 1 A schematic flowchart of an embodiment of step S103; Figure 3 A schematic diagram of an embodiment of the process for determining the feature spectral image set provided by the present invention; Figure 4 A schematic diagram of the structure of a VIS-NIR pseudo-color image of rice samples from three storage years provided by the present invention; Figure 5 A schematic diagram of a structural embodiment of SWIR pseudo-color images of rice samples from three storage years provided by the present invention; Figure 6 A schematic diagram of coordinates showing an embodiment of the dual-band spectral characteristics of rice samples from different storage years provided by the present invention; Figure 7 A schematic diagram of an embodiment of the PCA visualization results of dual-band SNV spectral data provided by the present invention; Figure 8 A schematic diagram of a typical key channel reconstruction image of VIS-NIR provided by the present invention; Figure 9 A schematic diagram of coordinates for an embodiment of the VIS-NIR band screening results provided by the present invention; Figure 10 This is a schematic diagram of an embodiment of the non-destructive identification device for rice storage years provided by the present invention. Detailed Implementation

[0018] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0019] like Figure 1 As shown, a specific embodiment of the present invention discloses a method for non-destructive identification of the storage year of rice, comprising: S101. Obtain a hyperspectral image set of the rice to be detected; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set.

[0020] In this embodiment of the invention, the rice to be tested is processed into polished rice through a unified hulling and milling process. Then, a hyperspectral image set of the rice to be tested is acquired. The hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The near-infrared spectral image set (i.e., VIS-NIR spectral images) is acquired using an FX10e visible-near-infrared hyperspectral camera, manufactured by Specim Spectral Imaging Ltd. in Finland. The system uses Scanner 2019 software for parameter configuration and data acquisition. Before formal acquisition, the system is warmed up for at least 30 minutes to ensure that all components of the equipment reach a stable state. Simultaneously, the working distance, focal length, illumination conditions, and scanning conditions are fixed to ensure image quality and system response stability during the acquisition process. The VIS-NIR imaging parameters are set as follows: frame rate 50.00 Hz, exposure time 11.00 ms, spectral binning of 2, spatial binning of 1, and internal trigger mode is used. The average reflectance of the foreground pixels in this spectral band is used to construct the VIS-NIR spectral features, while the ROI image cube is used to preserve spatial appearance information such as color, grayscale organization, and local texture.

[0021] The short-wave infrared (SWIR) spectral image set was acquired using a SWIR short-wave infrared hyperspectral camera, also from Specim Spectral Imaging Ltd. in Finland. The system was configured and data acquired using Scanner 2023 software. Before the actual acquisition, the system warmed up for at least 30 minutes according to the same procedure, and the working distance, focal length, illumination conditions, and scanning conditions were fixed. The SWIR imaging parameters were set as follows: frame rate 50.00 Hz, exposure time 2.98 ms, spectral merging factor of 1, spatial merging factor of 1, external trigger mode, and bad pixel replacement (BPR) function enabled. During acquisition, the samples were placed on a light-absorbing black background to reduce the interference of background reflection on grain segmentation and spectral extraction. This spectral band is mainly used to supplement internal chemical information that is difficult to characterize directly using VIS-NIR.

[0022] S102. The near-infrared spectral image set and the short-wave infrared spectral image set are segmented and extracted to obtain all single-grain rice regions. The spectral vector and local image of each single-grain rice region are processed to obtain near-infrared average spectral data, short-wave infrared average spectral data and three-dimensional spectral image.

[0023] In this embodiment of the invention, a segmentation algorithm can be used to segment and extract near-infrared spectral image sets and short-wave infrared spectral image sets respectively, obtaining each single-grain-meter region in the spectral image, and then obtaining all single-grain-meter regions. The spectral vector of each single-grain-meter region is then processed to obtain near-infrared average spectral data and short-wave infrared average spectral data. Then, the local image of each single-grain-meter region in the near-infrared spectral image set is processed to obtain a three-dimensional spectral image. This three-dimensional spectral image can be a VIS-NIR image cube, which can be understood as a "three-dimensional magic book" composed of hundreds of continuous band grayscale images. It is a three-dimensional data block. It can be imagined as a cuboid composed of the X-axis (width), Y-axis (height), and λ-axis (wavelength); it can simultaneously contain two-dimensional spatial information (image) and one-dimensional spectral information. Therefore, it is both an image and a set of spectral data, achieving "image-spectrum integration".

[0024] S103. Information fusion is performed on near-infrared average spectral data and short-wave infrared average spectral data to obtain dual-band spectral feature vectors.

[0025] In this embodiment of the invention, to achieve collaborative modeling of cross-spectral spectral information and external appearance information, the cross-spectral spectral features and multispectral texture features of rice are extracted respectively. The cross-spectral spectral features integrate complementary spectral information from the VIS-NIR and SWIR bands, which can characterize the comprehensive spectral response of rice during storage, including internal chemical evolution such as moisture migration, lipid oxidation, and starch aging. The multispectral texture features are extracted from VIS-NIR images to capture external characterization information such as surface color changes, grayscale distribution differences, and local texture structure changes that occur in rice during storage, thereby providing supplementary basis for judging the age of rice. Since SWIR and VIS-NIR have different band ranges, spectral resolutions, and noise sources, they cannot be directly mixed on the original variables. Preprocessing, dimensionality reduction, and normalization processes need to be established separately, and finally, feature layer concatenation is performed to obtain the cross-spectral spectral feature information, i.e., the dual-band spectral feature vector.

[0026] S104. Extract local binary pattern texture features based on three-dimensional spectral images to obtain multispectral texture feature vectors.

[0027] In this embodiment of the invention, the three-dimensional spectral image (i.e., VIS-NIR image cube) is also used to construct spatial texture features. The VIS-NIR image cube contains 224 spectral channels in the range of 400–1000 nm. To reduce the dimensionality and redundancy of texture extraction, key channels are selected by the average reflectance vector of the foreground pixels of the ROI, using a method including competitive adaptive reweighted sampling (CARS). Local binary mode texture features (i.e., LBP texture features) are extracted based on the three-dimensional spectral image, and the texture features are concatenated to obtain a multispectral texture feature vector (i.e., MTS feature vector).

[0028] S105. After fusing the information from the dual-band spectral feature vector and the multispectral texture feature vector, the data is input into the SVM classification model, and the result of identifying the storage year of the rice to be detected is output.

[0029] In this embodiment of the invention, each information source independently completes preprocessing such as dimensionality reduction, texture extraction, and standardization to obtain dual-band spectral feature vectors and multispectral texture feature vectors. Then, after information fusion and splicing, these vectors are input into a pre-trained SVM classification model. The SVM classification model can input the storage year identification result of the rice to be detected.

[0030] The non-destructive identification method for rice storage year provided in this invention can be applied to a non-destructive identification system for rice storage year. This system can be a software system running on a terminal device, which can be a server, tablet computer, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), mobile phone, or other terminal devices. This application does not impose any restrictions on the specific type of terminal device.

[0031] Compared with existing technologies, this embodiment provides a hyperspectral image set for acquiring rice to be detected. The hyperspectral image set includes near-infrared and short-wave infrared images. The near-infrared and short-wave infrared images are segmented and extracted to obtain all single-grain rice regions. The spectral vector and local image of each single-grain rice region are processed to obtain near-infrared average spectral data, short-wave infrared average spectral data, and a three-dimensional spectral image. Information fusion is performed on the near-infrared and short-wave infrared average spectral data to obtain a dual-band spectral feature vector. Based on the three-dimensional spectral image, local binary pattern texture features are extracted to obtain a multispectral texture. Feature vectors; after fusing the dual-band spectral feature vectors and multispectral texture feature vectors, the information is input into the SVM classification model, and the result of identifying the storage year of the rice to be detected is output. This invention not only uses the dual-band spectral feature vectors of near-infrared average spectral data and short-wave infrared average spectral data as the judgment basis, but also uses the multispectral texture feature vectors of the combination of local binary pattern texture features of three-dimensional spectral images as the judgment basis. Thus, the average spectrum and spatial texture in the three-dimensional spectral image are combined, thereby detecting internal chemical evolution through the average spectrum and external changes through the spatial texture. The detection accuracy is improved by combining internal and external detection.

[0032] In some embodiments of the present invention, step S102 includes: The images in the hyperspectral image set were converted using a standard black-and-white correction method to obtain a reflectance image set.

[0033] In this embodiment of the invention, after obtaining the hyperspectral image set, the near-infrared spectral image set and the short-wave infrared spectral image set can be converted using the standard black-and-white correction method to obtain the corresponding reflectance images, thereby obtaining the reflectance image set. The conversion formula is shown in formula (1): (1) In the formula,I The original images are from near-infrared or short-wave infrared image sets. D As a dark reference image, W White reference image, R This is the corrected reflectance image. This step reduces systematic biases caused by dark current, uneven illumination, and sensor response drift, improving the comparability of data between different batches of samples.

[0034] Based on the segmentation algorithm, the near-infrared spectral image set and the short-wave infrared spectral image set in the reflectance image set are segmented and extracted to obtain all single-grain rice regions.

[0035] In this embodiment of the invention, after reflectance correction of the VIS-NIR and SWIR hyperspectral images, the ROI of a single rice grain is extracted using a segmentation algorithm. The segmentation algorithm can be a threshold segmentation method. Specifically, it can involve selecting the band image with the most significant contrast between the target and the background from the hundreds of bands of hyperspectral data contained in the reflectance image set, generating a "binary image" (only black and white) using the threshold segmentation method, where the white area represents the rice grain and the black area represents the background. Then, the ROI is extracted for each single rice grain, resulting in the ROI of each single rice grain. After all processing is complete, all single rice grain ROIs can be obtained.

[0036] In some embodiments of the present invention, step S102 further includes: The spectral vectors of each single-grain rice region in the near-infrared spectral image set and the short-wave infrared spectral image set were calculated to obtain the near-infrared average spectral data and the short-wave infrared average spectral data of each single-grain rice region.

[0037] In this embodiment of the invention, considering that the two imaging systems have different spatial resolutions and pixel coordinate systems, the average spectral data of VIS-NIR and SWIR for the corresponding ROI are calculated respectively. For the first... r The average spectrum of each ROI is defined as shown in formula (2): (2) In the formula, Indicates the spectral band type, including VIS-NIR and SWIR; Indicates the first ROI in the spectral band The average spectrum below; Indicates the first Pixels in each ROI (i.e., each single grain of rice region) The complete spectral vector at that location; This indicates that the ROI is in the spectral range. The set of foreground pixels below; This indicates the number of foreground pixels. The ROI average spectrum preserves the main spectral response at the grain scale while reducing the impact of local noise, shadows, and random pixel fluctuations on individual bands. Specifically, processing the spectral data from the near-infrared image set in the above process yields the near-infrared average spectral data, while processing the spectral data from the short-wave infrared image set yields the SWIR average spectral data.

[0038] A three-dimensional spectral image is obtained by reconstructing the local image of each single grain of rice based on the near-infrared spectral image set.

[0039] In this embodiment of the invention, based on VIS-NIR data from the near-infrared spectral image set, the local image cube of each ROI is reconstructed to obtain a three-dimensional spectral image, which removes background noise while preserving its spatial pixel distribution and texture details.

[0040] In some embodiments of the present invention, such as Figure 2 As shown, step S103 includes: S201. Based on the average near-infrared spectral data and the average short-wave infrared spectral data of all single-grain rice regions, obtain the near-infrared spectrum and the short-wave infrared spectrum.

[0041] In this embodiment of the invention, because SWIR and VIS-NIR have different band ranges, spectral resolutions, and noise sources, they cannot be directly mixed on the original variables. Separate preprocessing, dimensionality reduction, and normalization processes need to be established, and finally, feature layer splicing is performed to obtain cross-band spectral feature information. Specifically, the near-infrared spectrum is first determined using the average spectral data and short-wave infrared average spectral data of all single-grain rice regions. For example, the near-infrared spectrum is a 100-row × 200-column vector (100 grains, 200 band values ​​per grain). The short-wave infrared spectrum is then determined using the average short-wave infrared spectral data of all single-grain rice regions. For example, the short-wave infrared spectrum is a 100-row × 150-column vector (100 grains, 150 band values ​​per grain).

[0042] S202. The near-infrared spectrum and short-wave infrared spectrum are normalized and preprocessed by multivariate scattering correction to obtain the effective near-infrared spectrum and the effective short-wave infrared spectrum.

[0043] In this embodiment of the invention, the diffuse reflectance spectrum of particulate samples is often affected by particle size differences, multiple scattering, baseline drift, and random noise, resulting in the masking of effective spectral information. To improve the model's response to real chemical differences, preprocessing of the original spectrum is usually required. During experimental training, the preprocessing process can include Standard Normal Transform (SNV), Multivariate Scatter Correction (MSC), and Savitzky-Golay smoothed first-derivative transformation (Deriv1). These can be combined to create multiple preprocessing steps, including MSC, Deriv1, SNV, MSC+Deriv1, and SNV+Deriv1. Experimental results show that the MSC processing is optimal, therefore, the preprocessing in step S202 is MSC.

[0044] Standard Normal Variable Transform (SNV): This method reduces the multiplicative and additive changes caused by scattering effects by normalizing individual spectra according to their own mean and standard deviation. Its basic form is shown in formula (3): (3) In the formula, Indicates the first i Original spectrum, This is the mean of the spectrum. Standard deviation, ε To prevent extremely small constants with a denominator of zero, near-infrared spectral data is input into formula (3). If the effective near-infrared spectrum is used, and the input is short-wave infrared spectrum data, then... This is the effective short-wave infrared spectrum. SNV can achieve scale uniformity of a single spectrum without relying on an external reference spectrum, making it particularly suitable for reflectance spectral analysis of granular agricultural products and solid samples.

[0045] Multiplicative scatter correction (MSC) explicitly corrects additive shift and multiplicative scaling by regressing each spectrum to be corrected to a reference spectrum. Assume that the original spectrum and the reference spectrum satisfy a linear relationship as shown in Equation (4): (4) The corrected spectrum can then be written as shown in formula (5): (5) In the formula, For reference spectrum, and These represent the multiplicative coefficients and the additive offset term, respectively. This represents the residual term. MSCs can effectively reduce the scattering effects caused by sample particle size, surface roughness, and optical path differences, and are widely used in near-infrared and short-wave infrared analysis.

[0046] The Savitzky–Golay method achieves smoothing and differentiation by fitting low-order polynomials within a local window, preserving spectral peak shape while enhancing local variation features. The first derivative is primarily used to weaken slowly changing baseline components and highlight subtle differences near absorption peaks, thereby improving the model's sensitivity to weak discriminative information. MSC performs scattering correction within each training fold using the mean of the training spectrum as a reference spectrum; the first derivative is calculated using a Savitzky–Golay filter with a window length of 11 and a polynomial order of 2; SNV performs centering and scaling correction within a single sample to reduce baseline variations caused by particle morphology and scattering differences. All preprocessors are fitted only on the training set and applied with the same parameters to the validation or independent test sets to avoid test information entering the feature construction process.

[0047] S203. Dimensionality reduction of the effective near-infrared spectrum and the effective short-wave infrared spectrum is performed using principal component analysis to obtain near-infrared data vectors and short-wave infrared data vectors.

[0048] In this invention, hyperspectral data typically exhibits high dimensionality and strong collinearity, with strong correlations often existing between adjacent bands. Directly using full-band data for modeling not only increases computational burden but may also introduce redundant information and reduce model robustness. Principal component analysis (PCA) is a classic unsupervised dimensionality reduction method. Its core idea is to project the original variables into a set of mutually orthogonal new variable spaces through linear transformation, ensuring that the first few principal components retain as much of the main variance information as possible from the original data. After preprocessing, SWIR and near-infrared spectra undergo PCA dimensionality reduction, compressing collinear bands within their respective spectral bands while preserving the main spectral variations. The number of candidate principal components for each spectral band and the subsequent classifier hyperparameters are jointly determined in the training set's inner-layer cross-validation during the training process, enabling feature compression of the two spectra without sharing the original variable space, resulting in two dimensionality-reduced score vectors: a near-infrared data vector and a short-wave infrared data vector. For the centered data vector... X PCA can be expressed as shown in formula (6): (6) In the formula, T Principal component score vector, P For the load matrix, EThis is the residual matrix. PCA can compress a large number of highly correlated original bands into a few composite variables, reducing feature dimensionality and model complexity while preserving key information.

[0049] S204. Standardize the near-infrared data vector and the short-wave infrared data vector respectively to obtain the near-infrared principal component score vector and the short-wave infrared principal component score vector.

[0050] In this embodiment of the invention, Z-score standardization is performed on the near-infrared data vector and the short-wave infrared data vector respectively to obtain the near-infrared principal component score vector and the short-wave infrared principal component score vector, so as to reduce the influence of differences in dimensions and variance range on the stitching features. The Z-score standardization process is a conventional process and is not limited in this embodiment of the invention.

[0051] S205. Based on the samples in the near-infrared principal component score vector and the short-wave infrared principal component score vector, the near-infrared features and short-wave infrared features of the same single-grain rice region are spliced ​​together to obtain a dual-band spectral feature vector.

[0052] In this embodiment of the invention, the behavioral samples in the near-infrared principal component score vector represent a numbered rice grain (single-grain rice ROI), and are listed as near-infrared principal component scores, i.e., near-infrared features. Similarly, the behavioral samples in the short-wave infrared principal component score vector represent a numbered rice grain (single-grain rice ROI), and are listed as short-wave infrared principal component scores, i.e., short-wave infrared features. The near-infrared features and short-wave infrared features of the same single-grain rice region are concatenated to obtain a dual-band spectral feature vector. For example, the near-infrared features of single-grain rice region A1 in the near-infrared principal component score vector and the short-wave infrared features in the short-wave infrared principal component score vector are concatenated, essentially merging these two sets of values ​​into the same row in an Excel file.

[0053] In some embodiments of the present invention, step S104 includes: CARS filtering is performed on the three-dimensional spectral images to obtain a set of feature spectral images; In this embodiment of the invention, a feature spectral image set is formed by combining single-channel images of the wavelength subsets corresponding to the selected features selected by CARS screening of three-dimensional spectral images.

[0054] In some embodiments of the present invention, such as Figure 3 As shown, CARS filtering is performed on the three-dimensional spectral images to obtain a set of feature spectral images, including: S301. Based on the optimal wavelength subset determined by the CARS algorithm, CARS screening is performed on the three-dimensional spectral image to obtain the CARS selected channels.

[0055] In this embodiment of the invention, competitive adaptive reweighted sampling (CARS) is an iterative sampling method for screening spectral variables. This method typically establishes a set of partial least squares models through Monte Carlo sampling, evaluates the importance of variables based on the absolute value of the regression coefficients of each band, and gradually removes low-contribution bands by combining an exponential decay function with adaptive reweighted sampling. For the candidate band subset obtained in the k-th sampling, its predictive ability can be evaluated using cross-validation error as shown in formula (7): (7) In the formula, and The first i The true response of the sample and the first k Cross-validation predictions from candidate subsets. Final selection. The smallest subset of bands is selected as the screening result. Unlike simply sorting by univariate scores, CARS considers both variable competition and combination effects during the iteration process, making it suitable for retaining key bands with complementary information from continuous spectra.

[0056] During training, the optimal wavelength subset can be determined using the CARS algorithm. The process of determining this optimal wavelength subset will be further explained later. This allows us to extract the corresponding bands from the optimal wavelength subset after identifying all bands in the VIS-NIR image cube using the band numbers within that interval. For example, if the optimal wavelength subset is a band number interval of 1-50, then the bands with the corresponding interval band numbers are extracted from the VIS-NIR image cube and identified as the CARS selected channels, eliminating the need for further filtering using the CARS algorithm.

[0057] S302. Combine the selected channels of CARS in pairs to obtain multiple sets of features.

[0058] In this embodiment of the invention, after determining the CARS selection channel, the features in the CARS selection channel are combined in pairs to obtain a set of features, thereby obtaining multiple sets of features.

[0059] S303. Construct a normalized difference index map based on multiple sets of features and three-dimensional spectral images to obtain multiple index maps.

[0060] In this embodiment of the invention, for any two selected channels a and b The normalized difference index of the reflectance image of the channel in the three-dimensional spectral image is defined as shown in formula (8): (8) In the formula, and ROI in the channel a and b The reflectance image at that location.

[0061] S304. Fisher's criterion is used to score multiple index graphs, and the three pairs of index graphs with the highest scores are obtained.

[0062] In this embodiment of the invention, Fisher's Criterion Score is a classic statistical indicator used in pattern recognition and feature selection to measure the ability of a feature (or feature map) to distinguish between two classes of samples. Fisher's Criterion Score is applied to all candidate channel pairs, and the three pairs of index maps with the highest scores are ultimately retained.

[0063] S305. Based on all single-channel images and three index maps of the CARS selected channels in the three-dimensional spectral image, construct a set of characteristic spectral images.

[0064] In this embodiment of the invention, all single-channel images and three index maps of the CARS selected channels in the three-dimensional spectral image can be integrated to construct a set of characteristic spectral images.

[0065] Local binary pattern texture features are extracted from images in the feature spectral image set to obtain local binary pattern texture vectors.

[0066] In this embodiment of the invention, the image texture description method is used to transform the gray-level distribution, local structure, and directional information in an image into numerical features that can be used for modeling. This embodiment employs three types of descriptors in the multispectral texture stream: gray-level co-occurrence matrix (GLCM), local binary pattern (LBP), and Tamura texture features (TAMURA), to describe image texture information from three perspectives: second-order gray-level statistics, local neighborhood encoding, and visual perception statistics. GLCM describes the spatial correlation between image gray levels by statistically analyzing the joint occurrence frequency of pixel gray-level pairs at a given distance and direction. Commonly used statistics include contrast, energy, correlation, and entropy. Contrast reflects the intensity of gray-level differences, energy reflects the uniformity of gray-level distribution, correlation describes the linear dependence between adjacent gray levels, and entropy measures the complexity of the texture distribution. LBP converts the local neighborhood into binary encoding by comparing the gray-level values ​​of the center pixel and its neighboring pixels, and further statistically analyzes the encoded histogram as a texture feature. This method is mainly used to describe local gray-level patterns and their distribution characteristics, and is highly sensitive to changes in the local microstructure of the image. TAMURA texture features describe image texture from the perspective of human visual perception. Commonly used features include roughness, contrast, and directionality. Roughness describes the texture scale, contrast reflects the amplitude of grayscale changes, and directionality characterizes the concentration of texture structure in spatial directions. Compared to GLCM and LBP, TAMURA focuses more on texture statistics at the overall perceptual level. The above three types of texture descriptors correspond to different levels of texture representation: GLCM focuses on second-order grayscale spatial relationships, LBP focuses on local neighborhood structure, and TAMURA focuses on overall perceptual statistics. In this embodiment of the invention, the three types of texture features are constructed respectively in the subsequent multispectral texture stream.

[0067] On the same image set used during training, three types of texture features—GLCM, LBP, and TAMURA—were extracted respectively. GLCM calculated four second-order statistics: contrast, energy, correlation, and entropy, with distances set to 1 and 2, and directions set to 0°, 45°, 90°, and 135°, and summarized the results from multiple directions. LBP described the neighborhood gray-level coding distribution using a local binary pattern histogram. TAMURA used roughness, contrast, and directionality to represent the overall perceptual texture, obtaining gray-level co-occurrence matrix texture vectors, local binary pattern texture vectors, and TAMURA texture vectors. The classification performance of these three texture vectors was compared under a unified data partitioning and modeling process. Ultimately, LBP was determined to be superior. Therefore, in practical applications, local binary pattern texture features were extracted from images in the feature spectral image set to obtain local binary pattern texture vectors.

[0068] The feature spectral image set is concatenated with the local binary pattern texture vector to obtain the multispectral texture feature vector.

[0069] In this embodiment of the invention, for each descriptor, all selected single-channel images in the feature spectral image set and features (i.e., local binary pattern texture vectors) on the three exponential images are concatenated into a multispectral texture feature vector, and participate in modeling under the same data partitioning, standardization, model selection and evaluation process.

[0070] In some embodiments of the present invention, step S105 includes: The final input vector is obtained based on the bi-band spectral feature vector and the multi-spectral texture feature vector.

[0071] In the feature layer fusion stage of this invention, each information source independently completes preprocessing such as dimensionality reduction, texture extraction, and standardization within the training set. After the above process, the dual-band spectral feature vector and the multispectral texture feature vector are fused and spliced ​​to form the final input vector. The final input vector is used to characterize the internal chemical quality information and external texture quality information of rice to improve detection accuracy.

[0072] The final input vector is fed into the SVM classification model, which outputs the result of identifying the storage year of the rice to be detected.

[0073] In this embodiment of the invention, the SVM classification model is determined to be the optimal model during the experiment. Therefore, after training the SVM classification model, the final input vector can be input into the SVM classification model, and the SVM classification model can output the storage year identification result of the rice to be detected.

[0074] Furthermore, the process in this embodiment of the invention is an optimal process selected through experimentation. The experimental process involves constructing a cross-spectral hyperspectral multi-source information fusion framework (CHIF) to identify polished rice samples stored in 2023, 2024, and 2025. Two imaging systems acquire 400–1000 nm VIS-NIR and 1000–2500 nm SWIR hyperspectral images, respectively, which are then converted to reflectance data after black-and-white correction. Subsequently, single-grain rice ROIs are extracted from the two types of images, and a corresponding relationship is established. The SWIR branch uses the average spectrum of the ROI to characterize changes in internal chemical composition. The VIS-NIR spectrum is used to characterize the composition, structural features, and storage state of the rice tissue. Finally, after extracting feature information from the VIS-NIR+SWIR spectral information and VIS-NIR texture information, a feature-weighted fusion operation is used to obtain the cross-spectral spectral and spatial texture fusion information of the rice, which is then input into a classification model for predicting the rice storage year. The acquisition process for 400–1000 nm VIS-NIR and 1000–2500 nm SWIR hyperspectral images is consistent with the acquisition process for near-infrared and short-wave infrared spectral image sets, and will not be repeated in this embodiment of the invention. Figure 4 and Figure 5 As shown, Figure 4 VIS-NIR pseudo-color images of rice samples from three storage years. Figure 5 SWIR pseudo-color images of rice samples from three storage years.

[0075] Reflectance correction and dual-band hyperspectral rice age data construction were performed on the hyperspectral images of rice samples from three storage years. This yielded historical VIS-NIR average spectral data, historical SWIR average spectral data, and historical VIS-NIR image cubes for each rice sample. Rice features were then extracted using the historical VIS-NIR average spectral data and historical SWIR average spectral data to obtain historical dual-band spectral feature vectors. The above processing steps are identical to steps S102 and S103, requiring only the replacement of the spectral data; therefore, this embodiment of the invention will not repeat the description.

[0076] In some embodiments of the present invention, the optimal wavelength subset determined based on the CARS algorithm includes: Acquire historical hyperspectral image sets of rice from multiple known storage years; the historical hyperspectral image sets include category labels for rice from each known storage year.

[0077] In this embodiment of the invention, the category label can be new rice, old rice, etc., and the label will be different depending on the storage year. The hyperspectral images of rice samples from three storage years constitute a historical hyperspectral image set of rice from multiple known storage years.

[0078] Historical near-infrared average spectral data is used as input for competitive adaptive reweighted sampling. During each weighted sampling process, the wavelength importance weight is calculated using partial least squares regression coefficients. Low-weight variables are gradually eliminated using an exponential decay function. Three-fold cross-validation is performed on all wavelength subsets to obtain the root mean square error of each wavelength subset. The wavelength subset corresponding to the minimum root mean square error is determined as the final recommended subset of the current iteration output.

[0079] In this embodiment of the invention, starting from 224 bands of historical near-infrared average spectral data, a sample subset is randomly selected to construct a partial least squares (PLS) regression model (using all 224 bands at this time). The historical near-infrared average spectral data is used as the input for competitive adaptive reweighted sampling. Each time, the wavelength importance weight is calculated based on the partial least squares regression coefficient. The larger the weight, the more important the wavelength is for predicting new / old rice. The algorithm calculates the proportion of variables to be retained in this round according to the preset exponential decay function. For example, an internal first round of elimination is performed (through PLS modeling → exponential decay → ARS reweighting). The number of survivors decreases, and an internal second round of elimination is performed. The number of survivors continues to decrease until the internal Nth round, until the variable is reduced to a preset minimum value (e.g., 1). This gradually eliminates low-weight variables and outputs the wavelength subset of each weighted sampling, obtaining all wavelength subsets. Three-fold cross-validation is performed on each wavelength subset to obtain the root mean square error of each wavelength subset. The wavelength subset with the smallest root mean square error among all wavelength subsets is determined as the final recommended subset output by the current iteration.

[0080] When the current iteration count reaches the preset number, output all final recommended subsets of all iteration processes, and determine the final recommended subset corresponding to the minimum root mean square error of all final recommended subsets as the optimal wavelength subset.

[0081] In this embodiment of the invention, the iteration count can be updated during each iteration to determine whether the iteration count has reached a preset number, such as 30. If it has not reached the preset number, the complete process of "sampling → modeling → elimination → reweighting → cross-validation" is repeated to obtain the final recommended subset for the next iteration. If the preset number has been reached, all final recommended subsets of all iterations are output, along with the corresponding RMSECV value for each group. The final recommended subset corresponding to the minimum root mean square error among all final recommended subsets is output as the "optimal wavelength subset" selected by the CARS algorithm.

[0082] In some embodiments of the present invention, the process of determining the CARS algorithm includes: After obtaining historical near-infrared average spectral data from historical hyperspectral image sets, the historical near-infrared average spectral data and category labels are used as inputs to the LASSO model. By adjusting the penalty coefficient, bands with non-zero penalty coefficients in the historical near-infrared average spectral data are selected as features, and the bands corresponding to all selected features are combined to obtain the optimal band combination.

[0083] In this invention, hyperspectral data typically consists of continuous narrow bands with strong correlations between adjacent bands. Directly using all variables can easily increase model complexity and introduce redundant noise. The purpose of band selection is to choose fewer representative variables from the original band set while preserving as much discriminative information as possible. For classification tasks, the selection results can reduce the dimensionality of subsequent models and provide a basis for key channel image reconstruction and texture feature extraction. This invention involves two methods: LASSO and CARS, representing variable selection approaches based on sparse regularization and adaptive sampling, respectively.

[0084] The least absolute shrinkage and selection operator (LASSO) is a variable selection method based on L1 regularization. Let X represent the feature matrix consisting of n samples and p bands, and y be the class response or the encoded response variable. LASSO adds an L1 regularization term to the empirical loss function, and its general form is shown in formula (9): (9) In the formula, Indicates the first j The model coefficients corresponding to each band. For regularization strength, L (·) represents the classification or regression loss function. The L1 regularization term can compress some coefficients to 0, so that the corresponding bands are no longer involved in the modeling; The larger the value, the sparser the model, and the fewer bands are retained. Because LASSO combines variable selection and model constraint functions, it is suitable for selecting discriminant bands from high-dimensional collinear spectra that contribute to the spectrum.

[0085] During training, the optimal band combination can be determined using the LASSO algorithm. The process of determining the optimal band combination will be further explained later. After determining all bands in the VIS-NIR image cube (i.e., the three-dimensional spectral image), the corresponding bands can be extracted using fixed band numbers from the optimal band combination to obtain the LASSO selected channels. For example, if the optimal band combination includes fixed band numbers 10, 15, 30, 59, 100, 133, 150, 180, and 201, then the bands with the corresponding fixed band numbers are extracted from the VIS-NIR image cube and determined as the LASSO selected channels.

[0086] The LASSO model here is a "binary logistic regression model with L1 regularization penalty". After obtaining the historical VIS-NIR average spectral data, historical SWIR average spectral data, historical VIS-NIR image cubes, and historical bi-band spectral feature vectors for each sample of rice in the historical hyperspectral image set, LASSO uses the historical VIS-NIR average spectral data as input and models the class labels using L1 regularized logistic regression. That is, the historical VIS-NIR average spectral data and class labels are used as input to the LASSO model, and the penalty coefficient is adjusted to retain bands with non-zero coefficients as selected features. The bands corresponding to all selected features are combined to obtain the optimal band combination. For example, if the selected features include 10, 15, 30, 59, 100, 133, 150, 180, and 201, these numbers are combined into a set to obtain the optimal band combination.

[0087] By analyzing and comparing the optimal wavelength subset and the optimal band combination, it is determined that the optimal wavelength subset of the CARS algorithm is superior to the optimal band combination of the LASSO algorithm.

[0088] In this embodiment of the invention, after obtaining the optimal band combination and the optimal wavelength subset, the same steps as in step S104 can be performed: CARS filtering is applied to the cube of historical VIS-NIR images to obtain a set of historical feature spectral images. Then, GLCM texture features, LBP texture features, and TAMURA texture features are extracted from the historical feature spectral image set to obtain historical MTS feature vectors. These are then fused and concatenated with the historical dual-band spectral feature vectors to obtain the final historical input vector. In this embodiment of the invention, three classification models—PLS-DA, SVM, and XGBoost—were set up during the experiment. The final historical input vector can be input into the three classification models, respectively. PLS-DA uses the class with the largest predicted response value as the discrimination result, and the number of latent variables is determined by cross-validation. SVM uses a radial basis function kernel, and the penalty coefficient and kernel parameters are optimized through grid search. XGBoost uses a multi-class softmax objective function, and the maximum tree depth, learning rate, and number of iterations are jointly optimized during inner-layer validation. Through the above experimental process and analysis of the final experimental results, it can be determined that LBP texture features are the optimal features. Unlike simply ranking by univariate scores, CARS considers both variable competition and combination effects during the iteration process, making it suitable for retaining key bands with complementary information from continuous spectra. Therefore, the CARS algorithm and the SVM classification model are the optimal algorithms. In practical applications after training, only the LBP texture features, CARS algorithm, and SVM classification model need to be used.

[0089] Partial least squares discriminant analysis (PLS-DA) is a supervised classification method developed based on partial least squares regression. This method decomposes the feature matrix simultaneously. X With category matrix Y Extraction can explain to the greatest extent X and Y The latent variables of the covariance structure are used to achieve discriminative modeling of high-dimensional data. Its basic decomposition form is shown in formula (10): (10) Furthermore, a linear relationship between X and Y can be established as shown in formula (11): (11) In the formula, T and U They are respectively X and Y The score vector, P and Q These are the load matrices,B This is the regression coefficient matrix. For multi-class classification tasks, the class labels are usually one-hot encoded first, and then the class with the largest predicted response value is used as the final discrimination result. PLS-DA is well adapted to high-dimensional spectral data with collinearity and has good interpretability, so it is often used as a linear baseline model in chemometric classification tasks.

[0090] Support Vector Machine (SVM) is a supervised classification method based on statistical learning theory. Its basic idea is to find the optimal separating hyperplane with the maximum margin in the feature space to achieve class discrimination. For linearly separable cases, SVM improves the model's generalization ability by maximizing the classification margin; for nonlinear problems, a kernel function can be used to map the samples to a high-dimensional space for linear separation.

[0091] Under the soft-margin framework, the optimization objective of SVM can be expressed as shown in equation (12): (12) The constraints are shown in formula (13): (13) In the formula, It is the normal vector. For bias terms, As slack variables, For penalty parameters, φ(·) The feature mapping function is used. When a radial basis kernel is used, the kernel function takes the form shown in formula (14): (14) In the formula, γ The kernel parameters are used. SVM can construct linear classifiers and also handle complex nonlinear decision boundaries through kernel methods, thus exhibiting strong adaptability and generalization ability in hyperspectral classification problems.

[0092] Extreme gradient boosting (XGBoost) is an ensemble learning method based on the idea of ​​gradient boosting trees. It approximates complex nonlinear mapping relationships by progressively stacking multiple decision tree-based learners. For the th i The prediction results for each sample can be expressed as shown in formula (15): (15) In the formula, Indicates the first k A tree of return, For the tree model space, XGBoost minimizes the following regularization objective function in each iteration, as shown in equation (16): (16) in, For loss function, As a model complexity penalty term, it is often written as shown in formula (17): (17) In the formula, T The number of leaf nodes, γ and λ are the leaf node weights, and regularization parameters. XGBoost combines second-order gradient optimization, tree complexity constraints, column sampling, and subsampling mechanisms, exhibiting strong nonlinear fitting and generalization capabilities, making it suitable for classification modeling of high-dimensional heterogeneous features.

[0093] In this embodiment of the invention, overall accuracy (OA) and weighted F1-score are used to evaluate classification performance. OA reflects the proportion of correctly predicted samples in all test samples and is suitable for measuring the overall discriminative ability of the model; the weighted F1-score is based on the F1 score of each class and is weighted according to the proportion of samples in each class, which can simultaneously consider the impact of precision, recall and class sample distribution on model evaluation.

[0094] Suppose there are N samples in the test set. and Let the true label and the predicted label be the i-th sample, respectively. Then, OA can be expressed as shown in formula (18): (18) For category c First, calculate its precision, recall, and... within the one-vs-rest framework. .set up C The total number of categories, For the first c The proportion of class samples in the test set, then the weighted F1-score can be expressed as shown in formula (19): (19) Compared to reporting OA alone, the weighted F1-score can reduce the interference of differences in class sample size on the overall evaluation, making it more suitable for examining the comprehensive predictive stability of multi-class models on samples from different storage years. Subsequent model comparisons in this embodiment use OA and weighted F1-score as core indicators, and are based on the mean and sample standard deviation of corresponding repeated experimental reports.

[0095] This invention uses single-grain rice as the modeling sample. To avoid potential information leakage caused by particle samples from the same hyperspectral image simultaneously entering both the training and test sets, data partitioning is based on hyperspectral image numbers as the grouping unit; all single-grain rice samples from the same image are only included in one class of either the training or test set. The dataset is partitioned into training and test sets and the model is evaluated under 10 random repetitions. Each repetition is constrained by image grouping, dividing the training set and independent test set at approximately an 8:2 ratio; nested cross-validation is used within the training set, with an outer 5-fold GroupKFold and an inner 3-fold GroupKFold, used to jointly optimize spectral preprocessing parameters, PCA principal component count, band selection strategy, texture descriptor, and classifier hyperparameters.

[0096] To verify the changing trends of chemical composition in rice samples during storage and to explain the differences in storage years from a chemical and quality attribute perspective, this invention measured the protein, fatty acid values, and gel consistency of three types of rice samples. The results are shown in Table 1. Protein determination was performed using the first method of GB5009.5-2025, fatty acid value determination using GB / T20569-2006, and gel consistency determination using GB / T22294-2008. These three indicators correspond to the main nutritional components, changes related to lipid hydrolysis and oxidation, and the rheological properties of rice flour after gelatinization, respectively.

[0097] Table 1. Results of physicochemical index determination of rice samples from different storage years (mean±SD)

[0098] The physicochemical properties of the three types of samples showed different trends with storage time. The fatty acid values ​​of the samples from 2025, 2024, and 2023 were 14.8±0.3, 15.5±0.4, and 18.1±0.9 mg / 100g, respectively, showing a continuous upward trend, indicating that the longer the storage year, the higher the degree of lipid hydrolysis and related deterioration. The gel consistency decreased from 56±2 mm in the 2025 sample to 51±2 mm in the 2024 sample and 40±2 mm in the 2023 sample, reflecting the gradual deterioration of the rice flour's gelatinization and gel properties. In contrast, the protein content showed relatively small changes among the three types of samples, with values ​​of 7.55±0.01, 7.12±0.01, and 7.36±0.01 g / 100g in the 2025, 2024, and 2023 samples, respectively, and did not show a monotonous trend with storage time. Therefore, the total amount of protein itself is not the main physicochemical difference that distinguishes the storage year, but its structural changes and its interaction with starch and water may still participate in the spectral response.

[0099] An increase in fatty acid values ​​reflects an intensified degree of lipid hydrolysis, a change that can be accompanied by alterations in the C–H vibrational response of lipid molecules. Decreased gel consistency indicates a deterioration in starch gelatinization and gel properties. These chemical and physical changes can cause variations in reflection intensity and local peaks and valleys at the overtones or combined absorptions of O–H, C–H, and N–H across the transspectral spectrum. Simultaneously, changes in color, brightness, and surface scattering during storage also affect the overall reflection and local texture characteristics in the VIS-NIR region. These regular changes in physicochemical indicators provide experimental evidence for simultaneously examining the SWIR average spectrum, VIS-NIR average spectrum, and VIS-NIR texture characteristics in this paper.

[0100] like Figure 6 As shown, Figure 6 The dual-band spectral characteristics of rice samples from different storage years are shown. (a) VIS-NIR SNV preprocessed spectrum and category fluctuation range, x-axis is wavelength, y-axis is SNV value; (b) VIS-NIR SNV + first derivative spectrum, x-axis is wavelength, y-axis is first derivative value; (c) SWIR SNV preprocessed spectrum and category fluctuation range, x-axis is wavelength, y-axis is SNV value; (d) SWIR SNV + first derivative spectrum, x-axis is wavelength, y-axis is first derivative value. Figure 6 The SNV preprocessed spectra and SNV+ first derivative spectra of three types of samples in the ranges of 400–1000 nm and 1000–2500 nm were compared.

[0101] The VIS-NIR spectrum generally increases with increasing wavelength, exhibiting a significant transition near 700 nm. The curves of the three sample types highly overlap in most bands, with only slight relative intensity differences around 400–500 nm, 700–750 nm, and 850–950 nm. These differences likely reflect variations in spectral response caused by changes in rice grain color, brightness, weak near-infrared absorption, and local tissue state. The SWIR spectrum retains a clearer absorption peak-valley structure. The main spectral shapes of samples from different years are generally consistent, but local differences can still be observed in the 1000–1350 nm, 1600–1750 nm, 1850–2000 nm, and 2200–2400 nm ranges. These positions are related to the overtone or combined absorption of hydrogen-containing groups such as O–H, C–H, and N–H. Moisture migration, lipid oxidation, and changes in protein and starch structure during storage may collectively alter the relative responses in these bands; therefore, SWIR is more suitable for characterizing changes in internal chemical composition and moisture state.

[0102] First-order derivative spectroscopy further amplifies local slope and peak-valley variations. VIS-NIR derivative spectra exhibit class fluctuations around 430–500 nm, 700–750 nm, and 800–900 nm, while SWIR derivative spectra enhance peak position and slope differences in the 1100–1400 nm, 1600–1900 nm, and 2200–2400 nm ranges. Nevertheless, significant class overlap remains between the two spectra in most bands, indicating that differences in storage age are not strong discriminative signals that can be completely separated by a single band or spectral segment. Subsequent PCA, feature selection, and multi-source fusion classification require testing whether these weak differences can be stably translated into classification performance.

[0103] To observe the class structure of the two types of spectra in unsupervised low-dimensional space, PCA was performed on the averaged spectra of SWIR (and VIS-NIR) after SNV preprocessing, respectively. The results are shown in [Figure number missing]. Figure 7 As shown, Figure 7 The PCA visualization results for dual-band SNV spectral data are shown. The left figure shows the score distribution of the first three principal components of VIS-NIR; the right figure shows the score distribution of the first three principal components of SWIR. The PC1, PC2, and PC3 variance explanations for SWIR are 58.2%, 27.6%, and 5.6%, respectively, with the first three principal components cumulatively explaining approximately 91.3% of the spectral variation. The PC1, PC2, and PC3 variance explanations for VIS-NIR are 66.3%, 19.1%, and 4.6%, respectively, with the first three principal components cumulatively explaining 90.0% of the spectral variation. The main variances of both types of spectra are concentrated in a few principal components, making them suitable for subsequent low-dimensional visualization and model input compression.

[0104] The score distribution shows that in the SWIR space, the 2023 samples are mainly separated from the 2024 and 2025 samples along the PC1 direction, with some overlap between the 2024 and 2025 samples in local regions. This distribution is consistent with the SWIR response to changes in chemical composition and moisture state, but the class boundaries are not completely linearly separated. The VIS-NIR space is closer to apparent reflectance differences, with the 2023 samples showing a shift within the space comprised of the first three principal components, while the 2024 and 2025 samples remain adjacent. The different separation directions of the two spectral bands support the view of VIS-NIR and SWIR as complementary information sources.

[0105] Figure 8 Reconstructed images of typical key channels in VIS-NIR. (a) 479.18 nm; (b) 604.47 nm; (c) 671.94 nm. Figure 9 The results are for the VIS-NIR band selection. Figure 8 and Figure 9The following table presents hyperspectral images of rice at different bands from VIS-NIR data, along with the band selection results. It can be seen that there are differences in the hyperspectral images of rice across different bands. High-weighted bands are mainly located in the 400–700 nm visible light range, with channels such as 478.0 nm, 604.5 nm, and 671.7 nm having relatively high weights. These bands are not strong internal chemical absorption peaks, but are more likely to correspond to differences in rice grain color, brightness, scattering, and local reflection; therefore, they can serve as the basic channels for subsequent overall reflectance analysis and texture image construction.

[0106] The channel sets obtained by LASSO and CARS are not entirely consistent. LASSO tends to retain a few bands in the discrimination weight set, while CARS retains multi-point combinations covering 400–750 nm. Since texture image construction depends on the gray-level structure and complementary reflection differences between different channels, the continuous band combinations retained by CARS may provide a more stable channel basis for texture input.

[0107] Table 2 shows the VIS-NIR-only texture results, indicating that LBP-CARS-SVM achieved the highest test accuracy (93.92%±3.63%) and weighted F1-score (93.89%±3.64%); the best accuracies for GLCM and TAMURA were 87.92%±5.99% and 85.30%±9.01%, respectively. Compared to second-order statistical or global perceptual textures, LBP is more sensitive to local neighborhood grayscale changes and is better at capturing subtle differences in the light and dark structures on the surface of rice grains.

[0108] Table 2. Optimal classification results for different texture descriptors under the VIS-NIR-only condition (mean ± SD, n = 10)

[0109] To systematically evaluate the contribution of different information sources to the identification of storage years, four progressive configurations were set up for the classification experiments: SWIR-only was used to evaluate the independent discrimination capability of short-wave infrared average spectra; VIS-NIR spectral-only was used to evaluate the independent discrimination capability of visible-near infrared average reflectance information; SWIR+VIS-NIR spectral was used to evaluate the complementarity between the average spectra of the two spectral bands; and SWIR+VIS-NIR spectral+Texture (CHIF) further added VIS-NIR texture to the dual-band spectrum to evaluate the gain brought by spatial appearance information. All classification and ablation experimental results are reported as mean ± SD of 10 replicate experiments.

[0110] Table 3. Classification results of SWIR-only pure spectral model (mean±SD, n=10)

[0111] In Table 3, MSC+SVM achieved the highest test accuracy and F1 score, at 91.396%±2.562% and 91.482%±2.469%, respectively; MSC+XGBoost also achieved an accuracy of 89.928%±3.867%. In contrast, Deriv1, MSC+Deriv1, and SNV+Deriv1 achieved accuracies of 80.787%, 80.255%, and 79.857% under SVM, respectively, all lower than MSC alone. This difference suggests that the storage year information in the SWIR average spectrum mainly comes from changes in the overall spectral shape and absorption intensity, rather than local fluctuations amplified after derivative transformation. MSC's correction for particle scattering and baseline shift preserves these overall differences; first-order derivatives and their combinations may simultaneously amplify local noise, leading to decreased model stability. Regarding classifiers, SVM outperformed PLS-DA and XGBoost under most preprocessing conditions.

[0112] Table 4. Classification results of VIS-NIR spectral-only pure spectral model (mean±SD, n=10)

[0113] The overall performance of VIS-NIR spectral-only is lower than that of SWIR-only. In Table 4, MSC+SVM is the optimal combination for this spectral band, with a test accuracy of 86.130%±3.373% and an F1-score of 85.813%±3.596%, which is 5.266 percentage points lower than the best result of SWIR-only. With MSC preprocessing, the accuracies of PLS-DA, SVM, and XGBoost are 85.263%, 86.130%, and 84.997%, respectively. The results of the three classifiers are similar, reflecting that the average VIS-NIR spectrum after scattering correction contains relatively stable overall reflectance differences. The results of Deriv1, SNV, and their derivative combinations fluctuate significantly, with SNV+Deriv1+XGBoost only achieving 71.926%±6.783%. This result is consistent with the information source of VIS-NIR: the average spectrum of 400–1000 nm reflects more the combined changes in brightness, color, and weak near-infrared absorption, and excessive local differentiation or normalization can easily weaken the original apparent reflectance differences. Therefore, the role of VIS-NIR data in this study needs to be further evaluated in conjunction with its spatial texture representation.

[0114] Table 5. Results of the Top 10 Repeated Experiments of SWIR+VIS-NIR Spectral (mean ± SD, n=10)

[0115] Table 5 summarizes the top ten configurations of the SWIR+VIS-NIR spectral model on the independent test set. Since this experiment involves various preprocessing, dimensionality reduction parameters, and classifier combinations, listing all results would diminish the focus of the presentation; therefore, only the top ten high-performance configurations are shown. The top ten models achieved test accuracies of 94.531%–95.998%; the accuracy trend is consistent with the F1-score, indicating that the improvement from dual-band fusion is relatively stable across both evaluation metrics. The optimal configuration is SWIR-MSC+VIS-NIR-SNV+SVM, with an accuracy of 95.998%±2.155%, which is 4.602 and 9.868 percentage points higher than the best single-source models in Tables 3 and 4, respectively. The top configurations show that the effective preprocessing for the two spectral bands is not entirely consistent. The SWIR average spectrum is more sensitive to changes in moisture state and internal composition, while the VIS-NIR average spectrum includes more differences in brightness, color, and near-infrared near-end reflectance; the noise sources and effective information distribution of the two types of spectra differ. Regarding classifiers, 9 out of the top 10 groups used SVM, with only SWIR-MSC+VIS-NIR-MSC+PLS-DA ranking highly.

[0116] Table 6 summarizes the 15 best-performing cross-band spectral and texture information fusion model candidate configurations on the independent test set after model selection was completed within the training set.

[0117] Table 6. Results of repeated experiments in CHIFTop15 (mean ± SD, n = 10)

[0118] The top 15 CHIF configurations all fall within a narrow high-performance range. The test accuracy ranged from 96.934% to 97.401%, and the F1-score from 96.922% to 97.380%, with the difference between the highest and lowest scores less than 0.5 percentage points. The 15th-ranked configuration was still 0.936 percentage points higher than the best dual-band spectral configuration in Table 5; the best CHIF configuration improved by 1.403 percentage points compared to the best result in Table 5. For rice samples from similar storage years, the average spectral differences were weak and overlapped, making it easy to confuse adjacent years by relying solely on spectral features. Local textures extracted from the same 3D spectral image supplemented the differences in grayscale organization, edge details, and local reflectance of the rice grain surface, thus further improving model performance based on dual-band spectroscopy.

[0119] The common thread among the top 15 configurations is the use of LBP and CARS. SWIR and VIS-NIR spectral preprocessing are distributed among MSC, SNV, Deriv1, and their combinations, indicating that the top configurations of the complete fusion model do not depend on a single fixed spectral preprocessing method. Regarding classifiers, 11 of the top 15 groups used PLS-DA, SVM appeared 4 times, and XGBoost did not rank highly. After incorporating texture features, the feature space has undergone key channel filtering, PCA dimensionality reduction, and standardization; therefore, class differences may be better represented by a latent variable model.

[0120] Table 7 summarizes the best model results under the four information source settings. The best accuracy for SWIR-only was 91.396%±2.562%, while that for VIS-NIR spectral-only was 86.130%±3.373%. The difference between the two reflects that the SWIR average spectrum has stronger internal chemical discrimination information under single-source spectral conditions. The accuracy of SWIR+VIS-NIR spectral reached 95.998%±2.155%, which is 4.602 and 9.868 percentage points higher than SWIR-only and VIS-NIR spectral-only, respectively, and the F1-score also improved to 95.960%±2.196%. After adding VIS-NIR texture features, the accuracy of CHIF reached 97.401%±1.897%, and the F1-score reached 97.380%±1.934%.

[0121] Table 7. Optimal classification results for different information source settings (mean ± SD, n = 10)

[0122] To separate the influence of information source contribution and parameter selection, the controlled ablation experiments fixed SWIR-MSC, VIS-NIR-MSC, CARS-LBP, and PLS-DA in the complete fusion model, changing only the input information source. Four settings were used: SWIR average spectrum only, VIS-NIR average spectrum only, dual-band average spectrum simultaneously, and VIS-NIR texture features added to the dual-band average spectrum. The results are shown in Table 8.

[0123] Table 8. Controlled ablation results of CHIF information source (mean±SD, n=10)

[0124] Table 8 compares the independent contributions of different information sources after fixing the model link. Using only SWIR average spectrum and only VIS-NIR average spectrum, the accuracies are 86.059%±4.950% and 85.263%±4.736%, respectively. Using dual-spectral average spectrum simultaneously improves the accuracy to 95.797%±2.687%, an improvement of 9.738 and 10.534 percentage points compared to the two single-source settings, respectively. This result indicates that SWIR and VIS-NIR average spectra are complementary. Adding VIS-NIR texture improves the accuracy of CHIF to 97.401%±1.897%, a further improvement of 1.604 percentage points compared to dual spectral, and the F1-score also increases from 95.795% to 97.380%. Therefore, spectral features constitute the main information for identifying the storage year, while texture features provide supplementary discriminative information for samples with overlapping spectral boundaries.

[0125] In conclusion, this invention addresses the problem of identifying the storage year of rice samples from different harvest years of the same variety under the same storage conditions. A CHIF cross-band hyperspectral multi-source information fusion framework was constructed. This framework extracts the average spectrum from spectral images of 400–2500 nm and texture features from VIS-NIR images of 400–1000 nm, and performs preprocessing, dimensionality reduction, band selection, feature fusion, and model parameter selection. Experimental analysis verifies the feasibility and advancement of using cross-band spectral and spatial texture collaborative identification of rice from similar storage years.

[0126] Experimental results show that the optimal test accuracy of SWIR-only in the single-source spectral model is 91.396%±2.562%, which is higher than that of VIS-NIR spectral-only (86.130%±3.373%), indicating that the SWIR average spectrum provides stronger internal chemical discrimination information for the current sample. After dual-band spectral fusion, the optimal accuracy of SWIR+VIS-NIR spectral improved to 95.998%±2.155%; after further adding VIS-NIR texture features, CHIF achieved a test accuracy of 97.401%±1.897% and a weighted F1-score of 97.380%±1.934%. Ablation results indicate that the dual-band average spectrum constitutes the main discrimination basis, and VIS-NIR texture features can provide supplementary gains on this basis.

[0127] The samples were from the same origin, the same storage location, and the same storage conditions. The experimental results mainly verified the ability to identify the storage year under these controlled sample conditions. Further research is needed to validate the model in more origins and storage environments, and to further evaluate the stability of model transfer and field application under different equipment conditions.

[0128] To better implement the non-destructive identification method for rice storage years in the embodiments of the present invention, correspondingly, the embodiments of the present invention also provide a non-destructive identification device for rice storage years, such as... Figure 10 As shown, the non-destructive identification device 1000 for rice storage years includes: The image acquisition module 1001 is used to acquire a set of hyperspectral images of the rice to be detected; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The average spectrum determination module 1002 is used to segment and extract the near-infrared spectral image set and the short-wave infrared spectral image set respectively to obtain all single-grain rice regions, and to process the spectral vector and local image of each single-grain rice region to obtain near-infrared average spectral data, short-wave infrared average spectral data and three-dimensional spectral image. The spectral fusion module 1003 is used to fuse near-infrared average spectral data and short-wave infrared average spectral data to obtain a dual-band spectral feature vector. The texture recognition module 1004 is used to extract local binary pattern texture features based on three-dimensional spectral images to obtain multispectral texture feature vectors. The year determination module 1005 is used to fuse information from the dual-band spectral feature vector and the multispectral texture feature vector and then input it into the SVM classification model to output the storage year identification result of the rice to be detected.

[0129] The non-destructive identification device 1000 for rice storage year provided in the above embodiments can realize the technical solution described in the embodiments of the non-destructive identification method for rice storage year. The specific implementation principle of each module or unit can be found in the corresponding content in the embodiments of the non-destructive identification method for rice storage year, which will not be repeated here.

[0130] The above provides a detailed description of the non-destructive identification method and device for rice storage years provided by the present invention. Specific examples are used in the embodiments of the present invention to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for non-destructive identification of the storage year of rice, characterized in that, include: Acquire a set of hyperspectral images of the rice to be tested; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The near-infrared spectral image set and the short-wave infrared spectral image set are segmented and extracted to obtain all single-grain rice regions. The spectral vector and local image of each single-grain rice region are then processed to obtain near-infrared average spectral data, short-wave infrared average spectral data, and three-dimensional spectral images. Information fusion is performed on the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector; Based on the three-dimensional spectral image, local binary pattern texture features are extracted to obtain a multispectral texture feature vector; After fusing the information from the dual-band spectral feature vector and the multispectral texture feature vector, the data is input into the SVM classification model, which outputs the storage year identification result of the rice to be detected.

2. The method for non-destructive identification of rice storage years according to claim 1, characterized in that, The near-infrared spectral image set and the short-wave infrared spectral image set are segmented and extracted respectively to obtain all single-grain rice regions, including: The images in the hyperspectral image set are converted using a standard black-and-white correction method to obtain a reflectance image set; Based on the segmentation algorithm, the near-infrared spectral image set and the short-wave infrared spectral image set in the reflectance image set are segmented and extracted to obtain all single-grain rice regions.

3. The method for non-destructive identification of rice storage years according to claim 1, characterized in that, The process of processing the spectral vector and local image of each single grain region to obtain near-infrared average spectral data, short-wave infrared average spectral data, and three-dimensional spectral image includes: The spectral vectors of each single-grain rice region in the near-infrared spectral image set and the short-wave infrared spectral image set are calculated respectively to obtain the near-infrared average spectral data and the short-wave infrared average spectral data of each single-grain rice region. Based on the near-infrared spectral image set, the local image of each single grain of rice region is reconstructed to obtain a three-dimensional spectral image.

4. The method for non-destructive identification of rice storage years according to claim 1, characterized in that, The process of fusing the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector includes: Based on the near-infrared average spectral data and the short-wave infrared average spectral data of all single-grain rice regions, the near-infrared spectrum and the short-wave infrared spectrum are obtained. The near-infrared spectrum and the short-wave infrared spectrum are preprocessed by normalization through multivariate scattering correction to obtain the effective near-infrared spectrum and the effective short-wave infrared spectrum. The near-infrared effective spectrum and the short-wave infrared effective spectrum are reduced in dimension by principal component analysis to obtain near-infrared data vector and short-wave infrared data vector. The near-infrared data vector and the short-wave infrared data vector are standardized respectively to obtain the near-infrared principal component score vector and the short-wave infrared principal component score vector. Based on the samples in the near-infrared principal component score vector and the short-wave infrared principal component score vector, the near-infrared features and short-wave infrared features of the same single-grain rice region are spliced ​​together to obtain a dual-band spectral feature vector.

5. The method for non-destructive identification of rice storage years according to claim 1, characterized in that, The extraction of local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector includes: The three-dimensional spectral images are subjected to CARS filtering to obtain a set of feature spectral images; Local binary pattern texture features are extracted from the images in the feature spectral image set to obtain local binary pattern texture vectors; The set of feature spectral images is concatenated with the local binary pattern texture vector to obtain a multispectral texture feature vector.

6. The method for non-destructive identification of rice storage years according to claim 5, characterized in that, The CARS filtering of the three-dimensional spectral image yields a set of feature spectral images, including: The three-dimensional spectral image is subjected to CARS screening based on the optimal wavelength subset determined by the CARS algorithm to obtain the CARS selected channels. The selected CARS channels are combined in pairs to obtain multiple sets of features; Based on the multiple sets of features and the three-dimensional spectral image, a normalized difference index map is constructed to obtain multiple index maps; Fisher's criterion was used to score the multiple index graphs, and the three pairs of index graphs with the highest scores were obtained; Based on the CARS selected channels, a set of characteristic spectral images is constructed from all single-channel images in the three-dimensional spectral image and the three index maps.

7. The method for non-destructive identification of rice storage years according to claim 1, characterized in that, The information fusion of the dual-band spectral feature vector and the multispectral texture feature vector is then input into the SVM classification model, outputting the storage year identification result of the rice to be detected, including: The final input vector is obtained based on the dual-band spectral feature vector and the multispectral texture feature vector; The final input vector is input into the SVM classification model, and the storage year identification result of the rice to be detected is output.

8. The method for non-destructive identification of rice storage years according to claim 6, characterized in that, The optimal wavelength subset determined based on the CARS algorithm includes: Acquire historical hyperspectral image sets of rice from multiple known storage years; the historical hyperspectral image sets include category labels for rice from each known storage year; The historical near-infrared average spectral data is used as the input for competitive adaptive reweighted sampling. During each weighted sampling process, the wavelength importance weight is calculated through partial least squares regression coefficients. Low-weight variables are gradually eliminated according to the exponential decay function. Three-fold cross-validation is performed on all wavelength subsets to obtain the root mean square error of each wavelength subset. The wavelength subset corresponding to the minimum value of the root mean square error is determined as the final recommended subset of the current iteration output. Perform 3-fold cross-validation on all wavelength subsets to obtain the root mean square error of the current wavelength subset and the corresponding survivor band combination; The survivor band combination with the minimum root mean square error is determined as the optimal wavelength subset.

9. The method for non-destructive identification of rice storage years according to claim 8, characterized in that, The process of determining the CARS algorithm includes: After obtaining historical near-infrared average spectral data through the historical hyperspectral image set, the historical near-infrared average spectral data and the category label are used as inputs to the LASSO model. By adjusting the penalty coefficient, the bands with non-zero penalty coefficients in the historical near-infrared average spectral data are selected as features, and the bands corresponding to all selected features are combined to obtain the optimal band combination. By analyzing and comparing the optimal wavelength subset and the optimal band combination, it is determined that the optimal wavelength subset of the CARS algorithm is superior to the optimal band combination of the LASSO algorithm.

10. A non-destructive identification device for the storage year of rice, characterized in that, include: The image acquisition module is used to acquire a set of hyperspectral images of the rice to be detected; the hyperspectral image set includes a near-infrared spectral image set and a short-wave infrared spectral image set. The average spectrum determination module is used to segment and extract the near-infrared spectral image set and the short-wave infrared spectral image set respectively to obtain all single-grain rice regions, and to process the spectral vector and local image of each single-grain rice region to obtain near-infrared average spectral data, short-wave infrared average spectral data and three-dimensional spectral image. The spectral fusion module is used to fuse the near-infrared average spectral data and the short-wave infrared average spectral data to obtain a dual-band spectral feature vector. The texture recognition module is used to extract local binary pattern texture features based on the three-dimensional spectral image to obtain a multispectral texture feature vector; The year determination module is used to fuse the information of the dual-band spectral feature vector and the multispectral texture feature vector and then input them into the SVM classification model to output the storage year identification result of the rice to be detected.