Soybean producing area traceability detection method based on near infrared spectrum technology
By collecting and preprocessing near-infrared spectral data across different devices, a soybean origin traceability model was constructed using a deep learning network. This solved the performance degradation problem in the migration application between devices, achieving rapid and non-destructive soybean origin traceability detection and improving the model's generalization ability and adaptability.
Patent Information
- Application Number
- CN202610354356.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, soybean origin tracing models based on near-infrared spectroscopy suffer from performance degradation when applied across different devices. This is mainly due to differences in optical configuration and photoelectric signal conversion between devices, leading to deviations in spectral signal intensity and sensitivity, making it difficult to achieve model generalization and adaptability.
By collecting soybean samples from different regions, acquiring near-infrared spectra using host and slave devices, merging the datasets after preprocessing, and using deep learning networks to identify shared features, a soybean origin traceability discrimination model is constructed, enabling cross-device spectral information sharing and feature extraction.
It enables rapid, non-destructive, and easy-to-operate testing for soybean origin traceability, reduces sample collection and model retraining costs, improves the model's generalization ability in multi-platform equipment applications, and is suitable for field testing scenarios with limited resources or variable environments.
Smart Images

Figure CN122016714A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food traceability and testing technology, and more specifically, to a method for tracing the origin of soybeans based on near-infrared spectroscopy. Background Technology
[0002] Soybean traceability is a key attribute for ensuring the quality and safety of agricultural products. Due to differences in growing environment and cultivation conditions across different production areas, soybeans exhibit significant variations in nutritional composition, quality characteristics, and market prices, thus affecting their suitable processing uses. As China's soybean imports continue to expand, the quality and safety control standards for agricultural products are also increasingly stringent. Therefore, developing efficient and reliable agricultural product origin traceability technologies has become an urgent need in agricultural trade.
[0003] In recent years, the combination of near-infrared spectroscopy and chemometrics has gradually become a powerful tool for tracing soybean origins. Studies have shown that soybeans, influenced by specific natural conditions and farming practices during growth, exhibit differences in their chemical composition and metabolites, thus becoming unique regional characteristics. This characteristic also provides an intrinsic basis for origin identification based on spectral information. Near-infrared spectroscopy, as a mature and easily miniaturized analytical technique, has a wavelength range of 780–2526 nm. It primarily reflects the vibrational overtones and combination frequencies of hydrogen-containing groups in the sample, thereby revealing the overall composition and structural information of organic compounds in soybeans. In experiments, samples require only simple pretreatment to rapidly obtain structural information on water, protein, lipids, and other molecules in soybeans based on spectral information. Research on constructing chemometric models based on spectral signals has been widely conducted. Methods such as support vector machines (SVM) and neural networks (NN) have been proven applicable to regression analysis of key nutrients in soybeans and to the classification and prediction of origins. Neural networks have the advantages of multi-level and modular structure, which can be used to design learning architectures with specific functions. They can integrate other functions such as feature extraction and data augmentation on the basis of tasks such as classification and regression, thereby improving the robustness and generalization ability of the model.
[0004] Currently, classification model tasks based on NIR spectroscopy typically use only fixed equipment or equipment of the same model to collect spectral samples and train the model. However, in actual model deployment, the sources and conditions of spectral equipment are complex. Applying a model trained on one type of equipment (host) to other types of equipment often results in performance degradation. This is because in spectral classification models relying on a single instrument / batch, the feature signals that contribute significantly to the judgment may be highly correlated with interference signals caused by the equipment or batch, rather than with spectral signals related to the place of origin, thus weakening the robust correlation between model features and real place of origin information. This problem is usually due to the influence of noise, baseline drift, and other factors in the spectrum caused by different instruments / batches.
[0005] Transfer learning can improve the adaptability and generalization performance of models in complex real-world scenarios such as multi-source, multi-task, and multi-batch experiments by identifying features across different domains. However, in transfer learning with different spectral sources, signal differences between devices are a key bottleneck restricting the large-scale application of the technology. This is because differences in optical configuration and photoelectric signal conversion between different devices lead to systematic deviations in spectral intensity and sensitivity. Although transfer methods such as direct normalization and segmented direct normalization achieve signal intensity consistency across different spectral sources through mathematical transformations, these methods require a one-to-one correspondence between the signals before and after transfer and the target samples in the spectral dimension. Furthermore, the sensitivity of the transferred data is low, differing significantly from the target spectrum obtained from actual testing, making it unsuitable for model retraining and adjustment. Therefore, while most transfer learning methods can effectively align spectral data signals from different sources, they are limited by various factors such as near-infrared spectral signal fluctuations, device systemic biases, and scanning scenarios, making it difficult to collect standard samples for calibration. This results in problems such as data distribution shifts from different spectral devices and insufficient generalization ability of the constructed models in practical applications. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, this invention provides a soybean origin traceability detection method based on near-infrared spectroscopy. Addressing the failure issue faced by traceability models during field deployment, this invention aims to improve the generalization ability of the traceability model across multiple platform devices by extracting and sharing feature information from the spectra of multiple devices through model transfer methods.
[0007] This invention is achieved through the following technical solution: a soybean origin traceability detection method based on near-infrared spectroscopy, characterized by the following specific steps: S1: Collect soybean samples from different regions and screen out impurities and defective soybeans; S2: Use the host computer to collect the near-infrared spectrum of the soybean sample in S1; S3: Near-infrared spectra of soybean samples from S1 are acquired using a slave device; S4: Preprocess the near-infrared spectra collected by the host and slave in S2 and S3; the set of near-infrared spectra collected by the host is called the source domain, and the set of near-infrared spectra collected by the slave is called the target domain. S5: Divide the preprocessed source and target domain datasets from S4 proportionally; S6: Merge the source domain and target domain in S5 to construct a soybean origin tracing discrimination model.
[0008] As a preferred option, in step S1, the number of soybean samples collected from different producing areas should be no less than 30 groups for each region.
[0009] As a preferred embodiment, the spectral acquisition range of the host and slave devices in steps S2 and S3 should cover the short-wave near-infrared spectral region (700 nm–1100 nm) and the long-wave near-infrared spectral region (1100–2500 nm). The number of spectral acquisitions for each sample should be no less than 10. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S2 should be less than 7%. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S3 should be less than 25%.
[0010] As a preferred embodiment, the spectral preprocessing in step S4 includes spectral linear interpolation and spectral signal correction.
[0011] Furthermore, the spectral signal correction employs a standard normal transformation and multivariate scattering correction method to preprocess the original spectrum, and then performs cascade processing with a derivative method including the first-order gap derivative.
[0012] As a preferred option, in step S5, the target domain is randomly divided into a training set and a test set according to a certain ratio, and the NIR spectrum ratio of soybeans from different origins in the training set and the test set is consistent.
[0013] Furthermore, in step S6, different numbers of spectral samples are extracted from the target domain training set and merged with the source domain spectra to train the model together, and a deep learning network is used to identify the "shared" features between different domains.
[0014] Furthermore, in step S6, the metrics for evaluating model performance include accuracy and weighted F1 score, calculated as follows:
[0015]
[0016]
[0017] .
[0018] By employing the above technical solutions, this invention has the following beneficial effects compared to existing technologies: 1. This invention scans the NIR spectrum of unknown soybean samples without any sample preprocessing to achieve soybean origin traceability. This method has the advantages of being fast, non-destructive, pollution-free, and easy to operate, providing a good foundation for the rapid evaluation of soybean origin traceability.
[0019] 2. This invention utilizes the multi-level structure of neural networks to automatically extract deep features from spectral data. Through nonlinear transformation, spectral information from different sources is mapped to a unified feature space, reducing the impact of signal differences on model performance and effectively overcoming performance degradation of the model in cross-data source scenarios.
[0020] 3. This invention uses the fusion of target domain and source domain datasets for joint training. Compared with existing spectral transfer methods, this method does not require a precise calibration process, which greatly reduces the cost of sample collection and model retraining, making it suitable for field detection scenarios with limited resources or variable environments.
[0021] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0022] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 The confusion matrices of the ANN algorithm built on the target domain training set under different preprocessing conditions are shown in (a) original spectrum, (b) SNV, (c) MSC, and (d) SNV + Der. 1st and (e)MSC+Der 1st ; Figure 2 (a) Soybean NIR spectral signal distribution acquired by the master and slave devices, (b) raw spectrum after averaging of the signals by the master and slave devices, (c) spectrum preprocessed by SNV, (d) spectrum preprocessed by MSC, (e) SNV + Der 1st Preprocessed spectra and (f)MSC+Der 1st Preprocessed spectra; Figure 3 (a) Performance trends of ANN models constructed after merging different numbers of target domain training sets and source domain data; (b) Confusion matrix of ANN algorithm on target domain test set when the number of target domain training sets is 300 during model transfer. Figure 4 This is a flowchart of the present invention. Detailed Implementation
[0023] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0024] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0025] The following is combined with Figures 1 to 4 The present invention provides a detailed description of the soybean origin traceability detection method based on near-infrared spectroscopy technology according to embodiments of the present invention.
[0026] This invention proposes a soybean origin traceability detection method based on near-infrared spectroscopy technology, which specifically includes the following steps: S1: Collect soybean samples from different regions and screen out impurities and defective soybeans; the number of soybean samples collected from different producing areas should not be less than 30 groups for each region.
[0027] S2: Use the host computer to collect the near-infrared spectrum of the soybean sample in S1; S3: Near-infrared spectra of soybean samples in S12 are acquired using a slave device; The spectral acquisition range of both the host and slave devices should cover the short-wave near-infrared spectral region (700 nm–1100 nm) and the long-wave near-infrared spectral region (1100–2500 nm). Each sample should be acquired at least 10 times. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S2 should be less than 7%. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S3 should be less than 25%.
[0028] S4: Preprocess the near-infrared spectra acquired by the host (source domain) and slave (target domain) in S2 and S3. Spectral preprocessing includes linear interpolation and spectral signal correction. Linear interpolation involves linearly fitting the spectral intensities between adjacent step sizes. The signal intensity at the unknown target wavelength point can be obtained through an equation, and the spectra with different step sizes are aligned at the specified wavelength points. The scheme captures NIR signals from the same wavelength range from both devices, uses linear interpolation, selects an appropriate step size, and aligns the dimensions of the spectral signals from the two devices. Spectral signal correction uses the Standard Normal Transform (SNV) and Multivariate Scattering Correction (MSC) methods to preprocess the original spectrum, and includes corrections such as the first-order gap derivative (Der). 1stThe derivative method is used to perform concatenated processing to improve the difference and discriminative power of spectral information. The set of near-infrared spectra collected by the host is called the source domain, and the set of near-infrared spectra collected by the slave is called the target domain.
[0029] S5: Divide the preprocessed source and target domain datasets from S4 proportionally; randomly divide the target domain into training and test sets according to a certain proportion, ensuring that the NIR spectral proportions of soybeans from different origins are consistent in the training and test sets. The target domain test set is only used to evaluate transfer performance and does not participate in building the discriminant model.
[0030] S6: Merge the source domain and target domain in S5 to construct a soybean origin tracing discrimination model.
[0031] Different numbers of spectral samples are extracted from the target domain training set and merged with the source domain spectra to train the model together. A deep learning network is used to identify the "shared" features between different domains, thereby achieving model transfer from data from different sources.
[0032] Metrics for evaluating model performance include accuracy and weighted F1 score, which are calculated as follows:
[0033]
[0034]
[0035]
[0036] In a mathematical model, correctly predicted spectral samples of soybeans from a specific origin are called true positives (TP), while correctly predicted spectral samples from other origins are called true negatives (TN). Correspondingly, there are false positives (FP) and true positives (TN). Precision is a comprehensive measure of the proportion of soybeans from the three origins correctly predicted by the model; the closer this metric is to 1, the better the overall model performance. The weighted F1-Score is a weighted average of the precision and recall of soybean predictions from a specific origin, further weighted by the sample size. It can be used to comprehensively reflect the model's overall accuracy across different categories. Example
[0037] This embodiment provides a soybean origin traceability detection method based on near-infrared spectroscopy technology, including the following steps: (1) Sample collection: A total of 137 soybean samples were collected from Brazil, the United States, and Canada, including 52 Brazilian samples, 49 US samples, and 36 Canadian samples. Impurities and defective soybeans were removed from the samples before testing; Spectral acquisition and definition: The host NIR spectrometer was used for scanning, with an acquisition range of 900 nm–1676 nm and a step size of 6 nm. Each soybean sample was scanned 10 times. The relative standard deviation of the spectral signal intensity at different wavelengths ranged from 3.95% to 6.92%. The near-infrared spectrum collected and preprocessed by the host is referred to as the source region. (2) Spectral preprocessing: Spectral preprocessing includes spectral linear interpolation and spectral signal correction. First, linear interpolation is used to linearly fit the spectral intensities of adjacent step sizes. The signal intensity at the unknown target wavelength point can be obtained through the equation. Spectra with different step sizes are then filled in at the specified wavelength points. In this embodiment, NIR signals with a spectral range of 910 nm to 1670 nm are extracted. Linear interpolation is used with a step size of 4 nm to reconstruct the NIR spectral signal dimension. Second, the original spectrum is preprocessed using standard normal transformation (SNV) and multivariate scattering correction (MSC), respectively. The above two methods are further cascaded with the first-order gap derivative method to improve the difference and discriminability of spectral information. There are a total of 5 different preprocessed spectral datasets, as shown in Table 1. (3) Data set partitioning: The source domain data is divided into training set and test set according to a ratio of 4:1 for model construction and evaluation, as shown in Table 1.
[0038]
[0039] (4) Classification Model Construction: An ANN classification model was constructed to predict the origin of soybean samples. The superiority of the ANN model was illustrated by comparing three classification models: PCA-LDA, SVM, and RF.
[0040] For Artificial Neural Networks (ANNs), the model learns the relationship between spectral features and soybean origin information by simulating the interconnections of neurons. The model uses the "softmax" activation function to output the probability of each category, and outputs the result with the highest probability. The model has fully connected hidden layers and uses "ReLU" as the activation function. This function is computationally simple, alleviates gradient vanishing, and accelerates the convergence process.
[0041] The combined Principal Component Analysis and Linear Discriminant Analysis (PCA-LDA) approach integrates these two analytical methods. First, PCA extracts principal components (PCs) from high-dimensional NIR spectral data through orthogonal transformation. By preserving a subset of principal components, noise and multicollinearity in the data are reduced. Linear Discriminant Analysis (LDA), a supervised classification method, maximizes the ratio of between-class scatter to within-class scatter by finding the optimal projection direction. PCA-LDA first reduces the dimensionality of soybean NIR spectra using PCA, decreasing the number of principal components to seven to reduce overfitting risk. Then, LDA classifies the data based on the dimensionality-reduced PCA scores.
[0042] For Support Vector Machines (SVM), the goal is to find the optimal hyperplane in the feature space that maximizes the geometric margin between classes. SVM uses a Radial Basis Function (RBF) kernel function, which implicitly maps data to a higher-dimensional space, thus achieving linear separation. The optimized model parameters are: regularization parameter C (controlling the tradeoff between maximizing the boundary and classification error) is set to 10, and the RBF kernel function parameter γ (γ) (defining the radius of influence of a single sample) is set to 0.01.
[0043] For Random Forest (RF), the prediction results of multiple decision trees are integrated to improve performance. By generating diverse subsets and randomly selecting features, overfitting is effectively mitigated, while improving the model's stability and accuracy. The hyperparameters used in the model include 200 forest decision trees, a splitting criterion of "gini", and a minimum number of sample splits of 2.
[0044] (5) Model performance evaluation: The evaluation metrics include accuracy and weighted F1 score, which are used to evaluate model performance. The calculation methods are as follows:
[0045]
[0046]
[0047]
[0048] Furthermore, spectral samples of soybeans from a specific origin that are correctly predicted are called true positives (TP), while spectral samples of soybeans from other origins that are correctly predicted are called true negatives (TN). Correspondingly, there are false positives (FP) and true positives (TN). Precision is a comprehensive assessment of the proportion of soybeans from the three origins correctly predicted by the model; the closer this metric is to 1, the better the overall model performance. The weighted F1-Score is obtained by weighting the precision and recall of the prediction results for soybeans from one origin, further weighted according to the sample size, and can be used to comprehensively reflect the model's overall accuracy in judging different categories.
[0049] The case study calculated the model's accuracy and weighted F1 score for soybean NIR spectra from different regions. The results are detailed in Table 2.
[0050] Table 2. Classification models (source domain) constructed based on multiple preprocessing methods.
[0051] Compared to the original NIR spectra, models trained on preprocessed spectral data exhibit significant performance improvements. Both SVM and ANN perform exceptionally well in soybean NIR spectral classification, outperforming PCA-LDA and RF algorithms. Compared to the original spectra, models trained on preprocessed spectral data show a significant performance improvement. 1st After correction, the performance of SVM and ANN models was significantly improved, increasing the accuracy by 23.1% and 16.7%, respectively. The ANN model, which utilizes deep learning networks to extract domain-invariant features, achieved an accuracy of 0.9905 in determining soybean origin and a weighted F1 score of 0.9905. These results demonstrate that by using SVM and Der... 1st Preprocessed and corrected data can effectively improve model performance. Meanwhile, the SVM and ANN models built based on the source domain in this method can accurately determine the origin of soybeans, realizing rapid and non-destructive detection of soybean origin based on NIR spectroscopy.
[0052] Example 2:
[0053] This embodiment provides a soybean origin traceability detection method based on near-infrared spectroscopy. The sample collection, spectral preprocessing, classification model construction, and model performance evaluation are the same as in Embodiment 1. The difference lies in replacing the near-infrared testing equipment in the spectral acquisition step with a slave device. The acquisition range is 900 nm–1700 nm, with a step size of 3 nm. Each soybean sample is scanned 10 times, and the relative standard deviation of the spectral signal intensity at different wavelengths ranges from 16.83% to 22.37%. The set of spectral samples is called the target domain. The NIR spectra in the target domain are divided into a training set and a test set for transfer learning at a ratio of 2:1. This embodiment only discusses the target domain training set. The division of the target domain training set and the model training method are the same as in Embodiment 1, as detailed in Table 3.
[0054] Table 3. Classification models constructed based on multiple preprocessing methods (target domain training set)
[0055] Table 3 shows that ANN performs exceptionally well in the soybean NIR spectral classification task based on the target domain training set, outperforming SVM, PCA-LDA, and RF algorithms. Regarding preprocessing, SNV+Der... 1st The preprocessed ANN model achieved a 38.3% improvement in accuracy compared to the original spectrum. This is likely due to the ANN's ability to learn and adjust focus across different network layers through deep network processing, enabling automatic extraction and learning of deep features from the data. However, compared to the source domain, the ANN classification model built based on the target domain showed insufficient accuracy in some regions. Figure 1 This may be because the spectral signal scanned by the slave device fluctuates significantly compared to that of the master device. (See...) Figure 2 Even with some preprocessing correction, compared to the host data, there will still be issues such as baseline drift, which cannot further improve the model's ability to trace the origin of soybeans.
[0056] This embodiment provides a soybean origin tracing detection method based on near-infrared spectra from different sources. The sample collection, spectral preprocessing, spectral acquisition, and model performance evaluation are the same as in Embodiments 1 and 2. The difference is that in this embodiment, different numbers of spectral samples are extracted from the target domain training set and merged with the source domain spectra to jointly train the SVM model. The model performance is verified using the target domain test set. The specific results are shown in Table 4.
[0057] Table 4 SVM Model Transfer Classification Results
[0058] Soybean NIR spectral samples from different regions were extracted from the target domain training set at the same proportion. These samples were then merged with the source domain spectral data, and the SVM model was repeatedly trained. The performance trend of the model was observed by adjusting the scale of the merged data. When the number of samples in the target domain training set was zero, the model trained on the source domain data was directly used to verify the accuracy of the target domain test set, representing direct transfer and serving as a baseline for subsequent transfer training results. The prediction accuracy of SVM in direct transfer was 0.38, close to the random probability of 0.33. Subsequently, the number of source training samples in the target domain was increased, and the model was trained sequentially. As the number of target domain training samples gradually increased, the model's accuracy in judging the target domain test set gradually improved. When all target domain training sets were merged with the source domain data, the judgment accuracy of the SVM algorithm improved by 110.3% compared to direct transfer. However, compared to the performance of the model built solely based on the target domain training set, the judgment accuracy did not significantly improve. This may be because the performance improvement of the SVM model depends more on the quality and quantity of the target domain data itself. Therefore, it is necessary to adjust the transfer learning strategy to improve the model's ability to identify and share data from different sources in order to optimize model performance.
[0059] This embodiment provides a soybean origin tracing detection method based on near-infrared spectra from different sources. The sample collection, spectral preprocessing, spectral acquisition, model construction, and performance evaluation are the same as in Embodiment 3. The difference is that this embodiment extracts different numbers of spectral samples from the target domain training set and merges them with the source domain spectra to jointly train the ANN model. The model performance is verified using the target domain test set. The specific results are shown in Table 5.
[0060] Table 5. Transfer classification results of ANN model
[0061] In direct transfer experiments based on the ANN model, the ANN's accuracy on the target domain test set is similar to that of SVM, both approaching random probability. In merging datasets, as the number of samples in the target domain training set increased from 0 to 920, the ANN model's accuracy increased by 132.9%, and compared to the ANN model built using samples from a single target domain training set, the accuracy improved by 12.9%, demonstrating positive model transfer. The model utilizes a fully connected neural network structure, receiving features from the merged dataset at the input layer, performing complex nonlinear transformations in the hidden layers to extract common features from data from different sources, and providing the final discrimination conclusion at the output layer. The backpropagation algorithm is used to continuously adjust the weight parameters in the network to minimize the loss function, gradually improving the model's discrimination accuracy.
[0062] The accuracy trends of models built from different numbers of target domain training sets in the merged dataset are shown in the following figures. Figure 3As shown in (a). In the ANN algorithm, only 300 independent spectral samples (32.6% of the total sample size) are needed to achieve accurate classification of NIR spectra of soybeans from different origins, reaching 90% of the optimal migration performance. The process of correctly judging soybeans from different origins is relatively balanced. See Figure 3 (b) This demonstrates that the proposed method can not only improve the discriminative performance of samples from different sources in the transfer learning model, but also reduce the standard sample requirements for transfer learning, effectively saving computation, sample collection and labeling costs, and enhancing the deployment flexibility of the model in practical applications.
[0063] Based on the results of Examples 1, 2, 3, and 4, it can be seen that the present invention, after spectral preprocessing, dataset merging, and the construction of a transfer neural network based on multiple NIR spectral devices, can achieve cross-device non-destructive and rapid detection of soybean production areas based on NIR spectroscopy. The accuracy of the prediction results is significantly improved compared to before the transfer, indicating that the method of the present invention has good beneficial effects and significant inventiveness, and has good deployment capability and application prospects in actual soybean production area traceability detection.
[0064] In the description of this invention, the term "a plurality of" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0065] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0066] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for tracing the origin of soybeans based on near-infrared spectroscopy, characterized in that... Specifically, it includes the following steps: S1: Collect soybean samples from different regions and screen out impurities and defective soybeans; S2: Use the host computer to collect the near-infrared spectrum of the soybean sample in S1; S3: Near-infrared spectra of soybean samples from S1 are acquired using a slave device; S4: Preprocess the near-infrared spectra collected by the host and slave in S2 and S3; the set of near-infrared spectra collected by the host is called the source domain, and the set of near-infrared spectra collected by the slave is called the target domain. S5: Divide the preprocessed source and target domain datasets from S4 proportionally; S6: Merge the source domain and target domain in S5 to construct a soybean origin tracing discrimination model.
2. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 1, characterized in that... In step S1, the collection of soybean samples from different producing areas should involve at least 30 samples from each region.
3. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 1, characterized in that... In steps S2 and S3, the spectral acquisition range of the host and slave devices should cover the short-wave near-infrared spectral region (700 nm–1100 nm) and the long-wave near-infrared spectral region (1100–2500 nm). The number of spectral acquisitions for each sample should be no less than 10. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S2 should be less than 7%. The relative standard deviation of the signal intensity at different wavelengths in the spectrum acquired in step S3 should be less than 25%.
4. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 1, characterized in that... The spectral preprocessing in step S4 includes spectral linear interpolation and spectral signal correction.
5. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 4, characterized in that, The spectral signal correction employs a standard normal transformation and multivariate scattering correction method to preprocess the original spectrum, and then performs cascade processing with a derivative method including the first-order gap derivative.
6. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 1, characterized in that... In step S5, the target domain is randomly divided into a training set and a test set according to a certain ratio, and the NIR spectrum ratio of soybeans from different origins in the training set and the test set is kept consistent.
7. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 6, characterized in that... In step S6, different numbers of spectral samples are extracted from the target domain training set and merged with the source domain spectra to train the model together. A deep learning network is then used to identify the "shared" features between different domains.
8. The soybean origin traceability detection method based on near-infrared spectroscopy technology according to claim 7, characterized in that... In step S6, the metrics for evaluating model performance include accuracy and weighted F1 score, calculated as follows: , , , 。