Method and system for detecting fatty acid content of brown rice based on near infrared spectrum

CN122259501APending Publication Date: 2026-06-23WULIANGYE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WULIANGYE
Filing Date
2026-03-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies for detecting fatty acid content in brown rice are prone to overfitting and have poor generalization ability under small sample conditions. They are also weak in resisting environmental interference, making it difficult to achieve stable, accurate, and rapid non-destructive detection.

Method used

A virtual reference spectral library is constructed using a generative model. Combining a dual-channel parallel architecture of a master prediction model and a differential correction model, the generative model generates a set of virtual spectra covering a preset fatty acid content range. The master prediction model extracts global spectral features, and the differential correction model removes interference. Finally, the detection results are output through weighted fusion.

Benefits of technology

This improved the model's generalization ability and resistance to environmental interference in small sample scenarios, enabling non-destructive, rapid, stable, and accurate detection of fatty acid content in brown rice. It also reduced the cost of sample collection and data labeling, and improved the robustness and reliability of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122259501A_ABST
    Figure CN122259501A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of food quality detection, and discloses a kind of brown rice fatty acid content detection method and system based on near infrared spectrum, solve existing brown rice fatty acid near infrared detection technology exists under small sample model is easy to overfit, generalization ability is poor, and weak anti-spectrum baseline drift and environmental interference ability Problem.The present application first constructs virtual reference spectrum library, generates virtual spectrum set covering preset fatty acid content interval using generative model;Then, the spectrum data to be measured of the brown rice sample to be measured is collected and input into the pre-jointly trained main prediction model and differential correction model for double-channel parallel prediction: the main prediction model directly extracts spectral global features to output initial prediction value;Differential correction model matches anchor spectrum in virtual reference spectrum library, calculates the difference features of the spectrum to be measured and anchor spectrum, and outputs correction prediction value based on the difference features.Finally, the two prediction values and anchor reference values are weighted and fused to obtain the final result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of food quality testing technology, specifically relating to a method and system for detecting the fatty acid content of brown rice based on near-infrared spectroscopy. Background Technology

[0002] Brown rice, as a nutritious grain product, is prone to oxidation during storage, which produces fatty acids and leads to deterioration in its flavor, taste, and nutritional quality. Therefore, rapid and accurate detection of the fatty acid content of brown rice is a key step in ensuring the storage quality and food safety of brown rice.

[0003] Traditional methods for detecting fatty acid content in brown rice mainly employ chemical analysis. These methods require complex operations such as sample digestion, extraction, and titration. Not only are the detection processes cumbersome and time-consuming, but they can also cause irreversible damage to the brown rice samples, failing to meet the practical needs of large-scale, non-destructive, and rapid detection.

[0004] In recent years, near-infrared spectroscopy has been gradually applied to the field of food quality testing due to its advantages such as being non-destructive, efficient, and capable of online detection. However, existing methods for detecting fatty acid content in brown rice based on near-infrared spectroscopy mostly employ partial least squares (PLS) or conventional neural networks for modeling, which presents certain technical bottlenecks in practical applications.

[0005] First, high-value labeled data is scarce: the high cost of fatty acid chemical characterization leads to a shortage of real labeled samples available for model training. Under small sample conditions, deep learning models are prone to overfitting, making it difficult to guarantee the model's generalization ability and prediction accuracy.

[0006] Secondly, it has weak resistance to environmental interference: near-infrared spectroscopy is easily affected by factors such as instrument aging, changes in ambient temperature and humidity, and sample surface condition, causing spectral baseline drift. Existing models rely on absolute spectral absorbance for regression analysis, and baseline shift directly leads to a significant decrease in prediction accuracy, resulting in poor long-term stability and universality of the models.

[0007] In summary, existing technologies cannot simultaneously solve the technical challenges of insufficient model generalization ability and weak resistance to environmental interference under small sample conditions, making it difficult to achieve stable, accurate, and rapid detection of brown rice fatty acid content. Therefore, there is an urgent need for a method and system for detecting brown rice fatty acid content that is suitable for small sample scenarios and has strong anti-interference capabilities. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a method and system for detecting the fatty acid content of brown rice based on near-infrared spectroscopy, which solves the problems of easy overfitting of the model under small sample conditions, poor generalization ability, and weak resistance to spectral baseline drift and environmental interference in existing near-infrared detection technology for brown rice fatty acids.

[0009] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0010] On the one hand, the present invention provides a method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy, comprising the following steps:

[0011] S1. Based on the collected real spectral data of brown rice, a virtual spectral set covering the preset fatty acid content range is generated using a generative model to construct a virtual reference spectral library;

[0012] S2. Collect the spectral data of the brown rice sample to be tested;

[0013] S3. Input the spectral data to be measured into the pre-trained master prediction model and differential correction model for dual-channel parallel prediction: The master prediction model directly extracts features from the spectral data to be measured to obtain the initial prediction value; The differential correction model first matches the anchor spectrum most similar to the spectrum to be measured in the virtual reference spectrum library, then calculates the difference features between the spectrum to be measured and the anchor spectrum, and outputs the corrected prediction value based on the difference features.

[0014] S4. The initial predicted value, the corrected predicted value, and the benchmark value corresponding to the anchor point spectrum are weighted and fused to obtain the fatty acid content detection result.

[0015] In this scheme, a virtual spectral library is constructed using a generative model to supplement the training data and address the problem of insufficient real samples. When performing spectral prediction, a dual-channel parallel prediction method using a master prediction model and a differential correction model is employed. This method can extract global features while eliminating spectral baseline drift and environmental interference by leveraging differential features. Finally, the predicted values ​​of each channel are weighted and fused to obtain the final detection result, improving the robustness and accuracy of the final output. Therefore, this scheme can achieve non-destructive, rapid, stable, and accurate detection of brown rice fatty acid content.

[0016] Furthermore, in step S1, the step of using a generative model to generate a set of virtual spectra covering a preset fatty acid content range and constructing a virtual reference spectral library includes: using a conditional generative adversarial network (cGAN) to learn the data distribution of the real spectrum of brown rice; inputting a preset fatty acid content label and a random noise vector into the generator of the conditional generative adversarial network to generate a high-density virtual spectrum that continuously covers the preset content range, thus forming a virtual reference spectral library.

[0017] In this scheme, conditional generative adversarial networks are used to accurately learn the distribution of real samples and generate a virtual reference spectrum that is fully covered, high-density, and continuously distributed. This ensures that the test samples can always match highly similar anchor points, thus solving the problem of overfitting with small samples from the source and improving the model's generalization ability.

[0018] Furthermore, in step S3, the main prediction model includes one or more combinations of one-dimensional convolutional neural networks (1D-CNN), long short-term memory networks (LSTM), multilayer perceptrons (MLP), or Transformer networks.

[0019] In this solution, all of these networks are adapted to the high-dimensional sequence features of near-infrared spectroscopy. The specific network to be used can be selected according to the actual scenario, thereby flexibly adapting to different hardware computing power and detection accuracy requirements. The model has strong versatility and is easy to deploy in engineering.

[0020] Furthermore, in step S3, the difference correction model includes:

[0021] Anchor matching unit is used to find the virtual spectrum with the highest similarity to the spectrum to be measured in the virtual reference spectrum library, use it as the anchor spectrum, and record the preset fatty acid content corresponding to the anchor spectrum as the reference value.

[0022] The differential calculation unit is used to calculate the spectral residual vector between the spectrum to be measured and the anchor point spectrum;

[0023] The residual regression unit is used to output corrected predicted values ​​based on the spectral residual vector using a residual regression network.

[0024] In this scheme, the reference spectrum is determined by anchor point matching, common mode interference is canceled by spectral difference, and the correction amount is output by residual regression. This can stably eliminate baseline drift caused by instrument aging, temperature and humidity changes and sample surface differences, thereby improving the stability of prediction results in complex environments.

[0025] Furthermore, the joint training methods for the main prediction model and the difference correction model include:

[0026] Construct a training set containing the actual brown rice spectrum and its fatty acid content labels;

[0027] Establish a joint loss function that includes the prediction error term of the main prediction model, the correction error term of the difference correction model, and the overall error term of the final fusion result.

[0028] The network parameters of the master prediction model and the differential correction model are updated synchronously by using the backpropagation algorithm, so that the two models can work together to minimize the joint loss function.

[0029] In this scheme, because the joint loss function simultaneously constrains the prediction errors of the two paths and the overall fusion error, and updates the parameters synchronously through backpropagation, the two models can be optimized in a collaborative manner, with the errors complementing each other, effectively improving the model convergence speed and overall prediction accuracy.

[0030] Furthermore, in step S4, the weighted fusion adopts an adaptive gating mechanism, which dynamically adjusts the weight ratio of the initial prediction value and the corrected prediction value through learnable gating coefficients.

[0031] In this scheme, the two output weights are dynamically allocated based on the confidence level of the spectral features to be measured by the learnable gating coefficients. This allows the model to focus on correcting the predicted value when the spectral interference is strong and on the initial predicted value when the interference is weak, so that the model can always maintain the optimal output state in a variable detection environment.

[0032] Furthermore, in step S4, the initial predicted value, the corrected predicted value, and the reference value corresponding to the anchor point spectrum are weighted and fused, specifically as follows:

[0033] ;

[0034] in, For fused output values; The gating factor; These are the initial predicted values; This is the reference value corresponding to the anchor point spectrum; To correct the predicted values.

[0035] This solution provides a specific fusion logic for integrating initial predictions, anchor benchmarks, and correction predictions, thereby improving the feasibility of weighted fusion.

[0036] On the other hand, the present invention also provides a brown rice fatty acid content detection system based on near-infrared spectroscopy for implementing the above detection method. The system includes:

[0037] The spectral acquisition module is used to acquire near-infrared spectral data of brown rice;

[0038] The data storage module is used to store the virtual reference spectrum library and the parameters of the pre-trained master prediction model and the difference correction model;

[0039] The computational processing module is configured to perform the above steps of performing dual-channel parallel prediction based on the spectral data to be measured using a pre-trained master prediction model and a differential correction model, and weighted fusion of the initial prediction value, the corrected prediction value, and the reference value corresponding to the anchor point spectrum.

[0040] The results output module is used to output and display the final fatty acid content detection results.

[0041] In this solution, the detection method is transformed into a practically operable hardware system through a modular architecture of spectral acquisition, data storage, computation and processing and result output. Each module has a clear division of labor and works together to complete the entire detection task, which has good practicality and industrial application capability.

[0042] Furthermore, the computational processing module runs a two-stream neural network architecture, which includes a main prediction branch and a differential correction branch set in parallel.

[0043] The main prediction branch is configured to run the main prediction model to extract features from the spectral data to be measured and obtain initial prediction values.

[0044] The differential correction branch is configured to run the differential correction model to match the anchor spectrum that is most similar to the spectrum to be measured in the virtual reference spectrum library, calculate the difference features between the spectrum to be measured and the anchor spectrum, and output the corrected prediction value based on the difference features.

[0045] The outputs of the main prediction branch and the differential correction branch are connected to the fusion layer. The fusion layer weights and fuses the initial prediction value, the corrected prediction value, and the reference value corresponding to the anchor point spectrum to obtain the final detection result.

[0046] In this scheme, the computational processing module adopts a parallel dual-stream neural network architecture, which corresponds to the main prediction and differential correction branches respectively and outputs the results through the fusion layer. The dual-path parallel processing can improve the detection efficiency, and at the same time, it strictly corresponds to the dual-channel prediction of the method, ensuring that the extraction of global features and local anti-interference features is comprehensive and efficient.

[0047] Furthermore, the system also includes an anomaly monitoring module, which calculates the distance between the spectrum to be measured and the matched anchor point spectrum. When the distance exceeds a preset threshold, an anomaly is detected and a warning is triggered.

[0048] In this solution, by calculating the distance between the spectrum to be measured and the matched anchor point spectrum and comparing it with a preset threshold, abnormal samples, sudden environmental changes, or instrument malfunctions can be identified in real time, and warnings can be triggered in a timely manner, effectively avoiding the output of erroneous detection results and improving the safety and reliability of the system detection.

[0049] The beneficial effects of this invention are:

[0050] (1) Solving the problem of small sample training:

[0051] This invention utilizes a generative model to learn the distribution of a small amount of real brown rice spectral data, generating a high-density, continuously covering virtual reference spectral library that spans a preset fatty acid content range. This eliminates the need for extensive, costly chemically labeled samples to train the model. It fundamentally solves the problem of overfitting and poor generalization ability in deep learning models caused by the scarcity of real labeled samples. While maintaining high-accuracy prediction, it significantly reduces the costs of sample collection, chemical testing, and data labeling, improving the model's usability in small-sample scenarios.

[0052] (2) Enhance resistance to environmental interference:

[0053] This invention employs a differential correction mechanism, extracting residual features by subtracting the spectrum to be measured from the spectrum of the matched anchor point. This directly eliminates spectral common-mode baseline drift and background interference caused by instrument aging, temperature and humidity changes, and sample surface differences, thereby improving the prediction stability and environmental robustness of the model in complex field environments.

[0054] (3) Improve detection accuracy and reliability:

[0055] This invention employs a dual-channel parallel prediction approach. The main prediction model focuses on extracting global chemical features of the spectrum to ensure basic prediction accuracy, while the differential correction model focuses on correcting biases and suppressing interference. Both models are simultaneously optimized through a joint loss function, achieving feature complementarity and error cancellation. Furthermore, by combining an adaptive gated weighted fusion strategy, the output weights of the two paths can be dynamically allocated according to the confidence level of the spectrum under test, ensuring optimal results under different interference intensities.

[0056] (4) Achieve non-destructive and efficient testing:

[0057] This invention enables non-destructive detection of fatty acid content in brown rice based on near-infrared spectroscopy technology. It offers fast detection speed and is equipped with an anomaly monitoring mechanism that can automatically identify abnormal samples and abnormal detection states, thereby improving the reliability of detection results and system security. Attached Figure Description

[0058] Figure 1 This is a flowchart of the method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy in an embodiment of the present invention.

[0059] Figure 2 This is a structural diagram of the brown rice fatty acid content detection system based on near-infrared spectroscopy in an embodiment of the present invention. Detailed Implementation

[0060] This invention aims to provide a method and system for detecting the fatty acid content of brown rice based on near-infrared spectroscopy, addressing the problems of overfitting, poor generalization ability, and weak resistance to spectral baseline drift and environmental interference in existing near-infrared detection technologies for brown rice fatty acids. The core idea is to solve the small-sample modeling challenge by constructing a virtual reference spectral library using a generative model, employing a dual-channel parallel architecture of a master prediction model and a differential correction model to extract global spectral chemical features and interference-free local differential features, respectively, and finally obtaining accurate detection results through adaptive weighted fusion.

[0061] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0062] Example:

[0063] This embodiment first provides a method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy, see [link to relevant documentation]. Figure 1It includes the following implementation process:

[0064] S1. Construct a virtual reference spectral library:

[0065] In this step, to address the overfitting problem caused by the scarcity of real labeled samples, a continuously distributed reference spectrum is generated for subsequent anchor point matching.

[0066] The process of constructing the virtual reference spectral library in this embodiment is as follows:

[0067] 178 real brown rice samples were selected, and their fatty acid content was determined using standard chemical methods to serve as the authentic label.

[0068] The corresponding spectral data of each of the above samples were collected using a near-infrared spectrometer, covering a wavelength range of 1079.76 nm to 663.93 nm, and containing a total of 250 wavelength points.

[0069] All collected spectral data were Z-score normalized to eliminate the influence of dimensions and unify the data distribution.

[0070] Construct a conditional generative adversarial network (cGAN) containing a generator and a discriminator.

[0071] Using 178 real "spectral-fatty acid" sample pairs as the training set, cGAN was trained to learn the distribution pattern of brown rice spectra.

[0072] During the generation phase, preset fatty acid content labels and random noise vectors are input into the generator. The fatty acid content labels are set to continuously vary from 10.00% to 30.00% in steps of 0.01%, generating approximately 2000 high-density virtual spectra. These virtual spectra form a continuously distributed set of virtual reference spectra in the feature space, ensuring high accuracy in subsequent anchor point matching.

[0073] S2. Obtain the spectrum to be measured:

[0074] In this step, standardized spectral data of the sample to be tested are obtained to ensure the consistency of the input data.

[0075] Specifically, a near-infrared spectrometer is used to collect the spectrum of the brown rice sample to be tested, and Z-score normalization preprocessing consistent with step S1 is performed to eliminate differences in dimensions and data distribution, thereby obtaining the spectral data to be tested.

[0076] S3. Perform dual-channel parallel prediction on the spectrum to be measured to obtain initial and corrected prediction values:

[0077] In this step, global features and anti-interference differential features are extracted through dual-channel parallel prediction to achieve basic prediction and interference correction, laying the foundation for subsequent fusion output.

[0078] The dual-channel parallel prediction uses a master prediction model and a difference correction model. These two models were trained synchronously offline using a joint loss function. The training process is as follows:

[0079] Construct a training set containing the actual brown rice spectrum and its fatty acid content labels;

[0080] Establish a joint loss function that includes the prediction error term of the main prediction model, the correction error term of the difference correction model, and the overall error term of the final fusion result.

[0081] The network parameters of the master prediction model and the differential correction model are updated synchronously by using the backpropagation algorithm, so that the two models can work together to minimize the joint loss function.

[0082] In this embodiment, the main prediction model architecture is a one-dimensional convolutional neural network (1D-CNN). It takes a 250-dimensional original spectral vector as input, extracts global chemical features such as peaks and troughs of the spectrum, and directly regresses to output the initial predicted value. .

[0083] The differential correction model first calculates the cosine similarity between the spectrum to be measured and all virtual spectra in the virtual reference spectral library, and selects the virtual spectrum with the highest similarity as the anchor spectrum. The corresponding preset fatty acid content is the benchmark value. Then, the difference between the measured spectrum and the anchor point spectrum is calculated. , spectral residual vector The input is fed into a multilayer perceptron (MLP), and the output is a correction for the bias of the main prediction model. .

[0084] S4. Weighted fusion of the initial and revised predicted values ​​to obtain the fatty acid content detection results:

[0085] In this step, the outputs of the two models are organically integrated to obtain accurate and stable final detection results.

[0086] In this embodiment, an adaptive gating mechanism is adopted. The weight ratio of the initial predicted value and the corrected predicted value is dynamically adjusted through learnable gating coefficients. Then, the initial predicted value, the corrected predicted value, and the reference value corresponding to the anchor point spectrum are weighted and fused. The formula is as follows:

[0087] ;

[0088] in, For fused output values; The gating factor; These are the initial predicted values; This is the reference value corresponding to the anchor point spectrum; To correct the predicted values.

[0089] The test set verification showed that the prediction determination coefficient R² of the above scheme in this embodiment was approximately 0.85, indicating that it still has high prediction accuracy and stability in practical application scenarios with small samples and susceptible to environmental interference, and can meet the actual needs of rapid and accurate on-site detection of brown rice fatty acid content.

[0090] To achieve the above detection method, this embodiment also provides a brown rice fatty acid content detection system based on near-infrared spectroscopy, see [link to documentation]. Figure 2 The system includes:

[0091] Spectral acquisition module: The hardware uses a portable near-infrared spectrometer with a wavelength range of 1079.76nm~663.93nm; it is used to acquire spectral data in real time and transmit it to the computing and processing module.

[0092] Data storage module: The hardware is a large-capacity storage device or a cloud database; among them, two key databases need to be stored: a virtual reference spectrum library (containing thousands of high-density virtual spectra generated by cGAN and their labels) and a model parameter library (storing pre-trained 1D-CNN main model parameters and MLP differential model parameters).

[0093] The computational processing module is housed in a high-performance server. Internally, it runs a two-stream neural network architecture with two parallel branches: First, the main prediction branch runs the main prediction model (1D-CNN) to extract global chemical features of the spectrum; second, the differential correction branch runs the differential correction model, responsible for anchor point search, spectral subtraction, and residual regression to extract local fine features relative to the virtual baseline. Subsequently, the initial predicted values, corrected predicted values, and baseline values ​​corresponding to the anchor point spectra are weighted and fused using an adaptive gating mechanism.

[0094] Anomaly Monitoring Module: This module contains anomaly monitoring logic, which calculates the Euclidean distance between the spectrum to be measured and the anchor point spectrum in real time. If the distance exceeds a preset safety threshold, it is determined to be an "abnormal sample" and an alarm signal is triggered.

[0095] Results output module: Used to output and display the final fatty acid content detection results.

[0096] Although embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present invention, and all such changes and alterations shall not depart from the protection scope of the present invention.

Claims

1. A method for detecting fatty acid content in brown rice based on near-infrared spectroscopy, characterized in that, Includes the following steps: S1. Based on the collected real spectral data of brown rice, a virtual spectral set covering the preset fatty acid content range is generated using a generative model to construct a virtual reference spectral library; S2. Collect the spectral data of the brown rice sample to be tested; S3. Input the spectral data to be measured into the pre-trained master prediction model and differential correction model for dual-channel parallel prediction: the master prediction model directly extracts features from the spectral data to be measured to obtain the initial prediction value; The differential correction model first matches the anchor spectrum that is most similar to the spectrum to be measured in the virtual reference spectrum library, then calculates the difference features between the spectrum to be measured and the anchor spectrum, and outputs the corrected prediction value based on the difference features. S4. The initial predicted value, the corrected predicted value, and the benchmark value corresponding to the anchor point spectrum are weighted and fused to obtain the fatty acid content detection result.

2. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in claim 1, characterized in that, In step S1, the step of using a generative model to generate a set of virtual spectra covering a preset fatty acid content range and constructing a virtual reference spectral library includes: using a conditional generative adversarial network to learn the data distribution of the real spectrum of brown rice; inputting a preset fatty acid content label and a random noise vector into the generator of the conditional generative adversarial network to generate a high-density virtual spectrum that continuously covers the preset content range, thus forming a virtual reference spectral library.

3. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in claim 1, characterized in that, In step S3, the main prediction model includes one or more combinations of one-dimensional convolutional neural networks, long short-term memory networks, multilayer perceptrons, or Transformer networks.

4. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in claim 1, characterized in that, In step S3, the differential correction model includes: Anchor matching unit is used to find the virtual spectrum with the highest similarity to the spectrum to be measured in the virtual reference spectrum library, use it as the anchor spectrum, and record the preset fatty acid content corresponding to the anchor spectrum as the reference value. The differential calculation unit is used to calculate the spectral residual vector between the spectrum to be measured and the anchor point spectrum; The residual regression unit is used to output corrected predicted values ​​based on the spectral residual vector using a residual regression network.

5. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in claim 1, characterized in that, The joint training methods for the master prediction model and the difference correction model include: Construct a training set containing the actual brown rice spectrum and its fatty acid content labels; Establish a joint loss function that includes the prediction error term of the main prediction model, the correction error term of the difference correction model, and the overall error term of the final fusion result. The network parameters of the master prediction model and the differential correction model are updated synchronously by using the backpropagation algorithm, so that the two models can work together to minimize the joint loss function.

6. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in any one of claims 1 to 5, characterized in that, In step S4, the weighted fusion adopts an adaptive gating mechanism, which dynamically adjusts the weight ratio of the initial prediction value and the corrected prediction value through learnable gating coefficients.

7. The method for detecting the fatty acid content of brown rice based on near-infrared spectroscopy as described in claim 6, characterized in that, In step S4, the initial predicted value, the corrected predicted value, and the reference value corresponding to the anchor point spectrum are weighted and fused, specifically as follows: ; in, For fused output values; The gating factor; These are the initial predicted values; This is the reference value corresponding to the anchor point spectrum; To correct the predicted values.

8. A brown rice fatty acid content detection system based on near-infrared spectroscopy, used to implement the brown rice fatty acid content detection method based on near-infrared spectroscopy as described in any one of claims 1 to 7, characterized in that, The system includes: The spectral acquisition module is used to acquire near-infrared spectral data of brown rice; The data storage module is used to store the virtual reference spectrum library and the parameters of the pre-trained master prediction model and the difference correction model; The computational processing module is configured to perform the steps of claim 1, namely, performing dual-channel parallel prediction based on the spectral data to be measured using a pre-jointly trained master prediction model and a differential correction model, and weighted fusion of the initial prediction value, the corrected prediction value, and the reference value corresponding to the anchor point spectrum; The results output module is used to output and display the final fatty acid content detection results.

9. The brown rice fatty acid content detection system based on near-infrared spectroscopy as described in claim 8, characterized in that, The computational processing module runs a two-stream neural network architecture, which includes a main prediction branch and a differential correction branch set in parallel. The main prediction branch is configured to run the main prediction model to extract features from the spectral data to be measured and obtain initial prediction values. The differential correction branch is configured to run the differential correction model to match the anchor spectrum that is most similar to the spectrum to be measured in the virtual reference spectrum library, calculate the difference features between the spectrum to be measured and the anchor spectrum, and output the corrected prediction value based on the difference features. The outputs of the main prediction branch and the differential correction branch are connected to the fusion layer. The fusion layer weights and fuses the initial prediction value, the corrected prediction value, and the reference value corresponding to the anchor point spectrum to obtain the final detection result.

10. The brown rice fatty acid content detection system based on near-infrared spectroscopy as described in claim 8 or 9, characterized in that, The system also includes an anomaly monitoring module, which calculates the distance between the spectrum to be measured and the matched anchor point spectrum. When the distance exceeds a preset threshold, an anomaly is detected and a warning is triggered.