Rapid rice seed vigor detection method based on near infrared spectrum
Through a fast detection method based on near-infrared spectroscopy, combined with a deep learning framework and optimization algorithm, the vitality detection of rice seeds is solved, and the problem of time-consuming and destructive in traditional methods is achieved, achieving a fast, accurate and non-destructive detection effect.
Patent Information
- Application Number
- CN202411366629.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-02-25
AI Technical Summary
Existing rice seed vigor detection methods are long and most tests are destructive and cannot meet the needs of fast, non-destructive detection.
A fast detection method based on near-infrared spectroscopy is adopted to collect the original spectral data of the entire band for rice seeds of different aging degrees, pre-process and data enhancement, and combine the Conv1D-GRU deep learning framework and a hybrid optimization population search algorithm to achieve rapid and accurate detection of rice seed vitality.
The rapid, accurate and non-destructive detection of rice seed vigor is achieved, and it has better performance compared to traditional methods, and can quickly evaluate its vigor without damaging the seeds.
Smart Images

Figure CN119498063A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of spectral analysis, and in particular to a method for rapid detection of rice seed vitality based on near infrared spectroscopy. Background Art
[0002] Rice is the main food source for nearly half of the world's population, especially in Asia, where it is the main staple crop. Maintaining the growth of rice production is key to ensuring global food supply and human food security. The vigor of rice seeds is crucial to rice yield and quality. Seed vigor directly affects germination rate, seedling growth and plant health, which in turn affects the final yield. By studying the vigor of rice seeds, it was found that the germination rate of seeds and the growth rate of seedlings can be maximized, thereby increasing yield. In addition, research on rice seed vigor can also help discover new resistant varieties to cope with pests and diseases and environmental stress, thereby improving the adaptability and survival ability of rice.
[0003] The main methods for studying rice seed vitality include germination test, vitality index determination, conductivity test and tetrazolium tetrachloride (TTC) reduction method. These methods judge the vitality of seeds by evaluating indicators such as seed germination ability, growth rate, cell membrane integrity and physiological activity. However, these traditional methods are often time-consuming, requiring multiple days or even weeks to complete, and most tests are destructive, and the testing process will damage or consume the seeds. In order to solve this problem, advanced spectral technologies, such as near-infrared spectroscopy technology, have been gradually introduced in recent years to achieve accurate identification of rice seed vitality.
[0004] Near-infrared spectroscopy is a non-destructive analytical method that obtains chemical information about a sample by measuring the absorption, reflection or transmission of a substance in the near-infrared band. This technology is widely used in the agricultural field and can be used to quickly and accurately detect and identify the quality and composition of agricultural products. The non-destructive nature and high efficiency of near-infrared spectroscopy make it an ideal tool to accurately obtain key information without damaging the seeds. In rice seed analysis, spectral data containing key chemical information can be obtained by collecting near-infrared spectra of rice seeds. The main components of rice seeds, such as protein, starch, fat, etc., show unique absorption characteristics in the near-infrared spectral range. Therefore, the use of near-infrared spectroscopy can achieve high-throughput, non-destructive evaluation of seed vitality while ensuring test speed and accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is to propose a rapid detection method for rice seed vitality based on near-infrared spectroscopy in response to the above-mentioned deficiencies in the prior art, which lays a foundation for accurately evaluating the vitality of rice seeds and improving rice yield, and also provides agricultural producers with a means of quickly and accurately evaluating the vitality of rice seeds.
[0006] In order to achieve the purpose of the present invention, the present invention adopts the following technical solution:
[0007] The method for rapid detection of rice seed vitality based on near infrared spectroscopy comprises the following steps:
[0008] Step S1, seed aging treatment: the three varieties of rice seeds were aged for 1 day, 2 days, 3 days, 4 days, and 5 days, and rice seeds that were not aged were set as a control group;
[0009] Step S2, collecting original spectra: using a near-infrared spectrometer to collect original spectra of rice seed samples at full wavelengths without aging treatment, aging treatment for 1 day, aging treatment for 2 days, aging treatment for 3 days, aging treatment for 4 days, and aging treatment for 5 days;
[0010] Step S3, determining germination rate: after the aging treatment is completed, the seeds of each treatment group are taken out to determine physiological indicators, including germination rate and germination potential;
[0011] Step S4, preprocessing the original spectral data: using Mahalanobis distance to remove abnormal points, using Savitzky-Golay smoothing digital filtering technology to reduce random noise in the data, using first-order derivative calculation to enhance the characteristics of the spectral data, and using extended multivariate scattering correction (EMSC) to comprehensively model and correct the scattering effect, chemical composition change and baseline drift in the spectral signal to obtain the preprocessed results:
[0012] Step S5, establishing a new spectral data sample: using a data enhancement method to fully reflect the internal characteristics and category differences of the preprocessed sample data;
[0013] Step S6, establishing a Cony1D-GRU deep learning framework, in this way, the model can simultaneously capture the spatial features and temporal information in the enhanced spectral dataset, further improving the accuracy and robustness of rice seed vitality prediction;
[0014] Step S7: using a hybrid optimization population search algorithm to further optimize the performance of the model, so as to achieve rapid detection of the vitality of rice seeds according to different degrees of aging of the rice seeds.
[0015] Preferably, in step S1, the aging treatment is specifically to create a high humidity environment using a saturated salt solution. The saturated salt solution at 48 degrees Celsius can provide a stable high humidity environment. Under this high temperature and high humidity condition, the three varieties of rice seeds are aged for 1 day, 2 days, 3 days, 4 days, and 5 days, and rice seeds that are not aged are set as a control group.
[0016] Preferably, in step S2, 150 rice seeds of different aging degrees are selected, randomly divided into 3 groups, and placed in a greenhouse with a temperature of 23° C. and a humidity of 60% for a germination test for 14 days. The germination of each group of seeds is regularly observed, and the average germination rate is recorded. According to ISTA regulations, if there is obvious "whitening" of the radicle and the radicle length is 1 / 2 of the seed, it is considered to have germinated. The germination rate calculation formula is:
[0017]
[0018] G_1, G_2, and G_3 are the actual germination numbers of each group, and N represents the total number of seeds in each culture dish.
[0019] Preferably, in step S3, the near-infrared spectrometer automatically collects multiple times and calculates the average spectrum.
[0020] Preferably, in step S4, the Mahalanobis distance is used to eliminate outliers, the Mahalanobis distance of each sample point is calculated using the covariance matrix, a 99% confidence level is selected, and sample points with a distance greater than a set threshold are regarded as outliers. The calculation formula of the Mahalanobis distance is:
[0021] D_M(\mathbf{x})=\sqrt{(\mathbf{x}-\mathbf{\mu})^T / mathbf{S}^{-1}(\mathbf{x}-\mathbf{\mu})}
[0022] in,
[0023] \mathbf{x} is the feature vector of the sample point;
[0024] \mathbf{\mu} is the mean vector of the data set;
[0025] \mathbf{S} is the covariance matrix of the data set;
[0026] \mathbf{S}^{-1} is the inverse of the covariance matrix.
[0027] After removing the outliers, this study further preprocessed the data, including Savitzky-Golay (SG) smoothing, extended multivariate scattering correction (EMSC), and first-order derivative calculation:
[0028] SG smoothing can effectively reduce the noise in spectral data, making the spectral curve smoother and clearer. Savitzky-Golay smoothing is a commonly used digital filtering technique that aims to reduce random noise in data by fitting a polynomial to the data within a sliding window while maintaining the overall shape and characteristics of the data;
[0029] First-order derivative processing can further enhance the characteristics of spectral data. By calculating the first-order derivative of the smoothed spectral data, the rapid changes and detailed features in the spectrum can be highlighted. This process helps to eliminate slow changes caused by baseline drift and background interference, making peaks and valleys more obvious, which facilitates feature extraction and pattern recognition.
[0030] EMSC (Extended Multiplicative Scatter Correction) is mainly based on the comprehensive modeling and correction of scattering effects, chemical composition changes and baseline drift in spectral signals. The basic idea of EMSC is to correct each sample spectrum by fitting the reference spectrum and its polynomial extension, thereby eliminating the systematic error between samples.
[0031] Preferably, the EMSC specifically adopts the following steps:
[0032] Step S4.1, construct a design matrix X, which consists of the reference spectrum r, the polynomial terms of wavelength or wave number, and the constant terms. The wavelength or wave number is usually expressed as a vector λ, and the order of the polynomial is determined by d. The form of the design matrix is as follows:
[0033] X = [r, λ, λ 2 , ..., λ d , l]
[0034] Step S4.2: For each spectrum to be corrected, the least square method is used to solve the correction coefficient, and the fitting spectrum is calculated using the correction coefficient. Finally, the spectrum is corrected by the following formula to obtain the corrected spectrum:
[0035] β=(X T X) -1 X T y
[0036] fited=Xβ
[0037]
[0038] Where y is the spectrum to be corrected, β is the correction coefficient, 1 is the coefficient of the correction coefficient β corresponding to the reference spectrum r, and y corrected is the corrected spectrum.
[0039] The above steps enable EMSC to effectively eliminate nonspecific changes in the spectrum, thereby improving the quality and comparability of the data.
[0040] Preferably, in step S5, a method based on sparse representation and dictionary learning is used to generate new spectral data samples.
[0041] Preferably, the steps of generating a new spectral data sample are as follows:
[0042] Step S5.1, initialize a random dictionary (D), and then use singular value decomposition (SVD) to effectively extract spectral features of samples of each category. By randomly initializing the dictionary and using coordinate descent to continuously update the atoms in the dictionary, it can better adapt to the distribution of training data;
[0043] Step S5.2, in the data enhancement stage, sparse representation is performed on each category to obtain sparse coefficients; the sparse representation process is achieved by minimizing the reconstruction error, that is, finding the sparsest representation method while retaining the main features of the sample; and a new spectral sample is generated by multiplying the sparse coefficient with the dictionary;
[0044] Step S5.3: Combine the generated new samples with the original samples to form an expanded data set; dictionary learning and sparse representation methods are adaptive and can be dynamically adjusted according to the distribution and characteristics of the data. This ability makes the generated new samples more representative and can better reflect the characteristics of the actual data, thereby improving the performance of the model.
[0045] Preferably, in step 6, the Conv1D-GRU deep learning framework combines the local feature extraction capability of the one-dimensional convolutional neural network (1D-CNN) with the sequence modeling capability of the gated recurrent unit network (GRU). In this way, the established model can simultaneously capture the spatial features and temporal information in the preprocessed spectral data, further improving the accuracy and robustness of the prediction of rice seed vitality.
[0046] Preferably, in step 7, an Integrated Population Search Algorithm (IPSA) is used to adjust the hyperparameters of the model, combining the leader wolf strategy of the Grey Wolf Optimizer (GWO) with the speed and position update mechanism of the PSO algorithm to expand the search visibility of the algorithm and improve the global optimization capability.
[0047] Further preferably, the hybrid optimization population search algorithm uses a dynamically adjusted inertia weight (inertiaWeight) and a parameter (a) for adjusting the convergence speed. These adjustments help to balance the ability of global exploration and local convergence during the algorithm iteration process, and improve the adaptability and performance of the algorithm for different problems. Use an elite strategy to retain the elite individuals in the population to ensure that excellent solutions are not lost, and use elite individuals to guide the search to improve the global search performance of the algorithm. After each iteration, random perturbations are introduced to increase population diversity and prevent premature convergence. This algorithm can not only overcome the problems of GWO's weak local search ability, insufficient global search ability and lack of diversity, but also make better use of PSO's global search ability and diversity, thereby improving the overall optimization performance.
[0048] Compared with the prior art, the present invention produces the following technical effects:
[0049] 1. The present invention applies the Conv1D-GRU deep learning framework. The combination of 1D-CNN and GRU can comprehensively utilize the spatial and temporal information of the input data. 1D-CNN extracts local features of the input data through convolution operations, and then uses these feature sequences as inputs to GRU, which then performs deeper sequence modeling on these features.
[0050] 2. Combine the hybrid optimization population search algorithm (Integrated Popμlation Search Algorithm, IPSA) to optimize the model. This combination can improve the model's representation and generalization capabilities for complex sequence data.
[0051] 3. By combining near-infrared spectroscopy, data preprocessing and data enhancement, it is possible to detect and evaluate rice seed vitality more accurately and quickly, with better performance than traditional methods.
[0052] 4. The present invention provides a reference for a method for rapid detection of rice seed vitality, which has positive significance and application prospects for agricultural production and planting management. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] For ease of explanation, the present invention is described in detail with reference to the following specific embodiments and the accompanying drawings.
[0054] Figure 1 The present invention is a schematic diagram of a method for rapid detection of rice seed vitality based on near infrared spectroscopy according to an embodiment of the present invention.
[0055] Figure 2 This is the original spectrum of rice seeds with different aging degrees scanned by near infrared.
[0056] Figure 3 It is the average spectrum of rice seeds with different aging degrees scanned by near infrared.
[0057] Figure 4 This is a diagram of the germination results of rice seeds with different degrees of aging.
[0058] Figure 5 It is a spectrum after SG smoothing, first-order derivative calculation and EMSC combined processing.
[0059] Figure 6 It is the architecture diagram of the Conv1D-GRU deep learning framework. DETAILED DESCRIPTION
[0060] The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solutions of the present invention, but the present invention is not limited to these embodiments; in the following description, specific details such as specific configurations are provided only to help fully understand the embodiments of the present invention. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention.
[0061] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0062] Unless otherwise specified, the materials, practices and experimental equipment involved in the implementation cases of the present invention are all in line with commercially available products in the relevant chemical and biotechnology fields.
[0063] Example 1
[0064] like Figure 1 As shown, this embodiment provides a method for rapid detection of rice seed vitality based on near infrared spectroscopy, which specifically includes the following steps:
[0065] Step S1: Under natural conditions, seed aging is a very slow process, and it may take months, years or even longer to show the phenomenon of decreased seed vitality. Saturated Salt Accelerated Aging (SSAA) is a test method for evaluating seed vitality, especially for seed vitality of small seed crop species. This method uses saturated salt solution to create a high humidity environment, thereby accelerating the aging process of seeds. Compared with traditional accelerated aging tests (such as using pure water to create a high humidity environment), the SSAA test can more accurately control the relative humidity through saturated salt solution, thereby providing a more stable and repeatable aging environment. This feature makes the SSAA test particularly suitable for the vitality assessment of small seed crop species, including rice seeds. This embodiment uses rice seeds of a certain variety, the purpose of which is to evaluate the effect of aging on seed quality under high temperature and high humidity conditions. The rice seeds to be tested are placed in nylon mesh bags with good air permeability, with the same number of seeds in each bag, and plastic bottles are prepared, and holes are opened on the side to facilitate the addition of saturated sodium chloride solution to control the relative humidity of the environment. The saturated salt solution was prepared by dissolving sodium chloride in water in proportion until solid precipitation appeared and stopping stirring to ensure that the solution was in a saturated state. The prepared solution was poured into a plastic bottle, and a nylon mesh bag containing rice seeds was hung on the mouth of the plastic bottle, and the bottle cap was screwed on. The amount of water vapor released was controlled by opening a small hole in the bottle cap to ensure that the seeds were in a high humidity environment but not in contact with the solution. The entire system was placed in an oven set at 48 degrees Celsius for aging. The aging time was set to 1 day, 2 days, 3 days, 4 days and 5 days respectively, and the seeds of the corresponding treatment group were taken out after each time period. During the experiment, the amount of saturated salt solution in the plastic bottle was checked regularly, and the solution was replenished through the small holes on the side when necessary to maintain a constant relative humidity in the environment. The saturated salt solution at 48 degrees Celsius can provide a stable high humidity environment to simulate the high temperature and high humidity aging conditions of seeds.
[0066] Step S2: Select rice seed samples with different aging degrees to be tested, and use a near-infrared spectrometer to collect 200 original spectra of rice seed samples with different aging degrees under the full-band wavelength (900-1700 nanometers). Open the ISCNIRScan GUI software, and after the near-infrared spectrometer is calibrated using a whiteboard, place the sample in a culture dish for spectrum collection, set the near-infrared spectrometer parameters to automatically collect 12 times, and finally save the result as the average spectrum of 12 times. The collected original data spectrum and average spectrum are shown as follows: Figure 2 and Figure 3 shown.
[0067] Step S3: After the aging treatment is completed, the seeds of each treatment group are taken out for the determination of physiological indicators, including germination rate and germination potential. The rice seed germination experiment was carried out in accordance with the regulations of the International Seed Testing Association (ISTA). 150 rice seeds of different aging degrees were selected and randomly divided into 3 groups. The seeds were evenly placed in a culture dish, a layer of moistened filter paper was placed inside, and sterile water was used for watering. The seeds were placed in a greenhouse with a temperature of 23°C and a humidity of 60% for a 14-day germination test. According to ISTA regulations, germination is identified when there is obvious "whitening" of the radicle and the length of the radicle is 1 / 2 of the seed. The germination of each group of seeds is observed regularly, and the average germination rate is recorded. The average germination rate calculation formula is as follows:
[0068] G_1, G_2, and G_3 are the actual germination numbers of each group, and N represents the total number of seeds in each culture dish. Figure 4 shown.
[0069] Step S4: The original spectral data is preprocessed by different methods. For the final model effect, the best one is the combined preprocessing method of SG smoothing + first-order derivative calculation + Emsc. Specifically, the Mahalanobis distance of each sample point is calculated using the covariance matrix, and a confidence level of 99% is selected, and sample points with a distance greater than the set threshold are regarded as outliers.
[0070] The calculation formula of Mahalanobis distance is:
[0071] [D_M(\mathbf{x})=\sqrt{(\mathbf{x}-\mathbf{\mu})^T\mathbf{S}^{-1}(\mathbf{x}-\mathbf{\mu})}
[0072] in,
[0073] \mathbf{x} is the feature vector of the sample point;
[0074] \mathbf{\mu} is the mean vector of the data set;
[0075] \mathbf{S} is the covariance matrix of the data set;
[0076] \mathbf{S}^{-1} is the inverse of the covariance matrix.
[0077] After removing the outliers, the present embodiment further preprocesses the data, including Savitzky-Go1ay (SG) smoothing, extended multivariate scatter correction (EMSC) and first-order derivative calculation. SG smoothing can effectively reduce the noise in the spectral data, making the spectral curve smoother and clearer. Savitzky-Golay smoothing is a commonly used digital filtering technique that aims to reduce the random noise in the data by fitting a polynomial to the data in a sliding window while maintaining the overall shape and characteristics of the data. In the present embodiment, we selected a third-order polynomial and a window length of 15 points for smoothing. First-order derivative processing can further enhance the characteristics of the spectral data. By calculating the first-order derivative of the smoothed spectral data, the rapid changes and detailed features in the spectrum can be highlighted. This process helps to eliminate the slow changes caused by baseline drift and background interference, so that the peaks and valleys are more obvious, which is convenient for feature extraction and pattern recognition. In the present embodiment, we performed differential calculations on the smoothed data to obtain its first-order derivative data. The processed spectral data is more representative and stable, reducing the impact of noise and background interference on model training and prediction. EMSC (Extended Multiplicative Scatter Correction) is mainly based on the comprehensive modeling and correction of scattering effects, chemical composition changes and baseline drift in spectral signals. The basic idea of EMSC is to correct each sample spectrum by fitting the reference spectrum and its polynomial extension, thereby eliminating the systematic error based on samples. Specifically, EMSC first needs to construct a design matrix X, which consists of the reference spectrum r, the polynomial terms of wavelength or wavenumber, and the constant terms. The wavelength or wavenumber is usually expressed as a vector λ, and the order of the polynomial is determined by d. The form of the design matrix is as follows: X = [r, λ, λ 2 , ..., λ d , 1]
[0078] Next, for each spectrum to be corrected, the least square method is used to solve the correction coefficient, and the fitting spectrum is calculated using the correction coefficient. Finally, the spectrum is corrected by the following formula to obtain the corrected spectrum:
[0079] β=(X T X) -1 X T y
[0080] fitted=Xβ
[0081]
[0082] Where y is the spectrum to be corrected, β is the correction coefficient, β1 is the coefficient of the correction coefficient β corresponding to the reference spectrum r, and y corrected is the corrected spectrum.
[0083] These steps enable EMSC to effectively eliminate nonspecific changes in the spectrum, thereby improving the quality and comparability of the data. Figure 5 shown.
[0084] Step S5: Based on the preprocessing, a dictionary learning data enhancement technology based on sparse coding is adopted. Specifically, a method based on sparse representation and dictionary learning is used to generate new spectral data samples. First, a random dictionary (D) is initialized, and then the spectral features of each category of samples are effectively extracted by singular value decomposition (SVD). By randomly initializing the dictionary and continuously updating the atoms in the dictionary using coordinate descent, it can better adapt to the distribution of training data. In the data enhancement stage, each category is sparsely represented to obtain sparse coefficients. The sparse representation process is achieved by minimizing the reconstruction error, that is, finding the sparsest representation method while retaining the main features of the sample. New spectral samples are generated by multiplying the sparse coefficients with the dictionary. Finally, the generated new samples are combined with the original samples to form an expanded data set. Dictionary learning and sparse representation methods are adaptive and can be dynamically adjusted according to the distribution and characteristics of the data. This ability makes the generated new samples more representative and can better reflect the characteristics of the actual data, thereby improving the performance of the model.
[0085] Step S6: Based on data enhancement, in order to further improve the accuracy and robustness of rice seed vigor prediction, the Conv1D-GRU deep learning framework of this embodiment combines the local feature extraction capability of the one-dimensional convolutional neural network (1D-CNN) with the sequence modeling capability of the gated recurrent unit network (GRU). In this way, the model can simultaneously capture the spatial features and temporal information in the spectral data, further improving the accuracy and robustness of rice seed vigor prediction. The architecture of the model is as follows Figure 6As shown in the figure. In this study, the input is sequence data, and several convolutional layers are first used to extract features from the input spectral data. A batch normalization layer is usually added after the convolutional layer to accelerate the network training process and reduce internal covariate shift. Then the Leaky ReLU activation function layer is connected, which is similar to the traditional ReLU but has a non-zero output when there is a small negative input. In addition, the maximum pooling layer (maxPoolingldLayer) is used to prevent overfitting. The extracted feature sequence is then input into the GRU layer for time series modeling. Finally, the fully connected layer (fullyConnectedLayer) uses the extracted comprehensive features for vitality prediction and outputs the classification results through the softmax layer (softmaxLayer). One-dimensional convolutional neural network (1D-CNN) has a good performance in spectral data processing. 1D-CNN can effectively capture local features in the data, such as spectral patterns and peak information in spectral signals. Through multi-layer convolution and pooling operations, 1D-CNN can gradually extract and combine abstract features in spectral data, thereby providing a more accurate input feature representation for seed vitality prediction. The Gated Recurrent Unit (GRU) is a classic recurrent neural network structure that is suitable for processing time series data and spectral data with temporal relationships. Through its internal gating mechanism, the GRU can effectively learn and memorize long-term dependencies in spectral data, which is particularly important for the analysis of spectral data with time series properties in rice seed vitality prediction.
[0086] Step S7: In order to further optimize the performance of the model, the Integrated Population Search Algorithm (IPSA) is used to adjust the model's hyperparameters, such as learning rate, number of convolution layers, convolution kernel size, number of GRU units, etc. The Grey Wolf Optimizer (GWO) simulates the social class structure of grey wolves (including α wolves, β wolves, δ wolves, and ω wolves) and their behaviors of hunting, tracking, and attacking prey, and approaches the optimal solution by adjusting the step size and direction through the position update formula and coefficient vector. GWO has a strong exploration ability in the early stage of the search, but as the number of iterations increases, its development ability is weaker and it is easy to fall into the local optimum. In addition, the population diversity of GWO is low in the later stage, and it is easy to fall into premature convergence. The PSO algorithm simulates the group behavior of bird flocks or fish schools, and searches for the optimal solution through particle cooperation and information sharing. The global search ability of the PSO algorithm depends on the sharing and updating of group information, which may lead to premature convergence to the local optimal solution. Parameters involved in the PSO algorithm, such as learning factors and inertia weights, have a significant impact on the performance of the algorithm, and improper selection may affect the effect of the algorithm. Therefore, this embodiment combines the leader wolf strategy of GWO with the speed and position update mechanism of PSO, expands the search visibility of the algorithm, and improves the global optimization capability. The algorithm uses a dynamically adjusted inertia weight and a parameter (a) for adjusting the convergence speed. These adjustments help to balance the ability of global exploration and local convergence during the algorithm iteration process, and improve the adaptability and performance of the algorithm for different problems. Use an elite strategy to retain elite individuals in the population to ensure that excellent solutions are not lost, and use elite individuals to guide the search to improve the global search performance of the algorithm. After each iteration, random perturbations are introduced to increase population diversity and prevent premature convergence. This algorithm can not only overcome the problems of GWO's weak local search capability, insufficient global search capability, and lack of diversity, but also better utilize the global search capability and diversity of PSO, thereby improving the overall optimization performance.
[0087] The present embodiment provides a method for rapid detection of rice seed vitality based on near-infrared spectroscopy. First, rice seeds are aged to different degrees in an aging environment of high temperature and high humidity. At the same time, non-aged rice seeds are set up as a control group. After the aging treatment, the seeds of each treatment group are taken out to measure physiological indicators, including germination rate and germination potential. Spectral data of rice seeds aged to different degrees are collected, and the collected spectral data are preprocessed. Based on the preprocessed spectral data, a data enhancement method is used to fully reflect the internal characteristics and category differences of the sample data. The Conv1D-GRU deep learning framework is applied to combine the local feature extraction capability of a one-dimensional convolutional neural network (1D-CNN) with the sequence modeling capability of a gated recurrent unit network (GRU). In this way, the model can simultaneously capture the spatial features and temporal information in the spectral data. Finally, the fully connected layer uses the extracted comprehensive features to predict vitality and outputs the classification results through the softmax layer. The hybrid optimized population search algorithm (Integrated Population Search Algorithm, IPSA) is used to further optimize the performance of the model to achieve rapid detection of the vitality of rice seeds according to the different degrees of rice seed aging.
[0088] Those skilled in the art to which the present application belongs may make various modifications or additions to the specific embodiments described or replace them in a similar manner, but they will not deviate from the inventive concept of the present application or exceed the scope defined by the attached claims.
Claims
1. A method for rapid detection of rice seed vitality based on near infrared spectroscopy, characterized in that: The following steps are involved: Step S1, seed aging treatment: aging the three varieties of rice seeds for 1 day, 2 days, 3 days, 4 days, and 5 days, and setting rice seeds that have not been aged as a control group; Step S2, collecting original spectra: using a near-infrared spectrometer to collect original spectra of rice seed samples at full wavelengths without aging treatment, aging treatment for 1 day, aging treatment for 2 days, aging treatment for 3 days, aging treatment for 4 days, and aging treatment for 5 days; Step S3, determining germination rate: after the aging treatment is completed, the seeds of each treatment group are taken out to determine physiological indicators, including germination rate and germination potential; Step S4, preprocessing the original spectral data: using Mahalanobis distance to remove abnormal points, using Savitzky-Golay smoothing digital filtering technology to reduce random noise in the data, using first-order derivative calculation to enhance the characteristics of the spectral data, and using extended multivariate scattering correction to comprehensively model and correct the scattering effect, chemical composition change and baseline drift in the spectral signal to obtain the preprocessed results; Step S5, establishing a new spectral data sample: using a data enhancement method to fully reflect the internal characteristics and category differences of the preprocessed sample data; Step S6, using the Conv1D-GRU deep learning framework, a model is established that can simultaneously capture the spatial features and temporal information in the enhanced spectral dataset, further improving the accuracy and robustness of rice seed vitality prediction; Step S7: using a hybrid optimization population search algorithm to further optimize the performance of the model, so as to achieve rapid detection of the vitality of rice seeds according to different degrees of aging of the rice seeds.
2. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S1, the aging treatment specifically involves establishing a high temperature and high humidity environment using a saturated salt solution at 48 degrees Celsius, and performing aging treatment on the three varieties of rice seeds for 1 day, 2 days, 3 days, 4 days, and 5 days, while setting rice seeds that are not aged as a control group.
3. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S2, the near-infrared spectrometer automatically collects multiple times and calculates the average spectrum.
4. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S2, 150 rice seeds of different aging degrees were selected and randomly divided into 3 groups. The seeds were placed in a greenhouse at a temperature of 23° C. and a humidity of 60% for a germination test for 14 days. The germination of each group of seeds was observed regularly and the average germination rate was recorded. According to ISTA regulations, the seeds were deemed to have germinated if the radicle was obviously "white" and the radicle length was 1 / 2 of the seed. The germination rate calculation formula was: G_1, G_2, and G_3 are the actual germination numbers of each group, and N represents the total number of seeds in each culture dish.
5. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S4, the Mahalanobis distance of each sample point is calculated using the covariance matrix, a 99% confidence level is selected, and sample points with a distance greater than a set threshold are considered as outliers. The calculation formula of the Mahalanobis distance is: D_M(\mathbf{x})=\sqrt{(\mathbf{x}-\mathbf{\mu})^T\mathbf{S}^{-1}(\mathbf{x}-\mathbf{\mu})} in, \mathbf{x} is the feature vector of the sample point; \mathbf{\mu} is the mean vector of the data set; \mathbf{S} is the covariance matrix of the data set; \mathbf{S}^{-1} is the inverse matrix of the covariance matrix; After removing outliers, the data were further preprocessed, including Savitzky-Golay smoothing, extended multivariate scattering correction, and first-order derivative calculation.
6. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 5, characterized in that: The extended multivariate scatter correction specifically adopts the following steps: Step S4.1, construct a design matrix X, which consists of the reference spectrum r, the polynomial terms of wavelength or wave number and the constant terms. The wavelength or wave number is usually expressed as a vector λ, and the order of the polynomial is determined by d. The form of the design matrix is as follows: X=[r,λ,λ 2 ,...,l d ,1] Step S4.2: For each spectrum to be corrected, the least square method is used to solve the correction coefficient, and the fitting spectrum is calculated using the correction coefficient. Finally, the spectrum is corrected by the following formula to obtain the corrected spectrum: β=(X T X) -1 X T y fitted=Xβ Where y is the spectrum to be corrected, β is the correction coefficient, β1 is the coefficient of the correction coefficient β corresponding to the reference spectrum r, and y corrected is the corrected spectrum.
7. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S5, a new spectral data sample is generated using a method based on sparse representation and dictionary learning.
8. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 7, characterized in that: The specific method to generate new spectrum samples is: Step S5.1, initialize a random dictionary, and then effectively extract the spectral features of each category of samples through singular value decomposition, randomly initialize the dictionary, and use the coordinate descent method to continuously update the atoms in the dictionary so that it can better adapt to the distribution of training data; Step S5.2, in the data enhancement stage, sparse representation is performed on each category to obtain sparse coefficients; The sparse representation process is achieved by minimizing the reconstruction error, that is, finding the sparsest representation while retaining the main features of the sample; by multiplying the sparse coefficient with the dictionary, a new spectral sample is generated; Step S5.3: Combine the generated new samples with the original samples to form an expanded data set.
9. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S6, the Conv1D-GRU deep learning framework combines the local feature extraction capability of the one-dimensional convolutional neural network with the sequence modeling capability of the gated recurrent unit network. The established model can simultaneously capture the spatial features and temporal information in the preprocessed spectral data, thereby improving the accuracy and robustness of the prediction of rice seed vitality.
10. The method for rapid detection of rice seed vitality based on near infrared spectroscopy according to claim 1, characterized in that: In step S7, the hybrid optimization population search algorithm adjusts the hyperparameters of the model, combining the leader wolf strategy of the gray wolf optimization algorithm with the speed and position update mechanism of the PSO algorithm.
Citation Information
Cited By
Rice seed vigor detection method and system based on hyperspectral image
CN119915771A
Method and System for Detecting Rice Seed Vigor Based on Hyperspectral Images
CN119915771B
Online monitoring method and device for dissolved gas in oil of electrical equipment
CN120385651A
Soybean germplasm resource viability small sample classification prediction method, system and equipment
CN120632573A
Soybean germplasm resource viability small sample classification prediction method, system and device
CN120632573B