A rice protein spectrum detection model calibration compensation system
Patent Information
- Application Number
- CN202611014930.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]现有技术存在根本性缺陷:温度和水分并非独立的干扰源,它们通过破坏或重塑维持蛋白质高级结构的氢键网络,诱发蛋白质分子构象的微观变化
[0041]该稻米蛋白质光谱检测模型校准补偿系统中,将温度与水分视为驱动蛋白质分子构象变化的动态扰动变量,从分子物理层面实时解算出酰胺带因氢键重构和振子耦合而产生的非线性偏移量序列,进而对原始光谱执行基于物理机制的动态位置校正与峰形补偿,生成消除环境耦合干扰的校准重构光谱。突破了传统统计校正仅能处理线性、可分离干扰的局限,使后端预测模型无需应对复杂环境变异,即使温湿度大幅波动,蛋白质含量预测仍能保持高精度与强稳健性,显著提升了近红外检测的现场适应能力。
Smart Images

Figure CN122814528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of protein spectral detection technology, and more specifically, to a calibration and compensation system for a rice protein spectral detection model. Background Technology
[0002] Near-infrared spectroscopy is widely used for the rapid detection of protein content in rice. Its core principle lies in the chemical bonds within protein molecules, particularly the characteristic absorption of amide bands I, II, and III. However, fluctuations in ambient temperature and the moisture content of the rice itself can significantly affect the accuracy of the spectra. Traditional processing methods treat these environmental factors as simple multiplicative or additive noise, performing filtering or baseline correction, or employing statistical methods such as principal component analysis and orthogonal signal correction for compensation.
[0003] Existing technologies suffer from a fundamental flaw: temperature and moisture are not independent sources of interference; they induce microscopic changes in protein molecular conformation by disrupting or remodeling the hydrogen bond network that maintains the higher-order structure of proteins. These conformational changes directly alter the force constants of amide bonds and the oscillator coupling state, leading to nonlinear, coupled shifts in the position, intensity, and shape of characteristic absorption peaks. Purely statistical compensation methods that ignore this physical reality suffer from poor model robustness, are prone to failure under different combinations of temperature and humidity, and have limited calibration capabilities.
[0004] Therefore, there is an urgent need for a novel approach that starts from the molecular physical mechanism level to accurately model and dynamically compensate for this nonlinear coupling effect of "environment-structure-spectrum" in order to fundamentally improve the accuracy and robustness of rice protein spectral detection. Summary of the Invention
[0005] The purpose of this invention is to provide a calibration and compensation system for a rice protein spectral detection model, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the rice protein spectral detection model calibration and compensation system includes a spectral acquisition module, an environmental sensing module, a conformation-hydrogen bond dynamic solution module, a calibration and compensation spectral reconstruction module, and a protein content prediction module.
[0007] The spectral acquisition module is used to acquire the original diffuse reflectance spectrum of the rice sample to be tested in a preset near-infrared band.
[0008] The environmental sensing module is used to synchronously collect the real-time temperature and real-time moisture content of the rice sample under test at the moment of spectral acquisition.
[0009] The conformation-hydrogen bond dynamic solution module is equipped with a protein molecular conformation-hydrogen bond dynamic model. The protein molecular conformation-hydrogen bond dynamic model uses the real-time temperature and real-time water content as dynamic perturbation inputs to drive the protein molecular conformation-hydrogen bond dynamic model to perform solution and output a nonlinear offset sequence characterizing the characteristic spectral absorption peaks of rice protein as the molecular conformation changes.
[0010] The calibration compensation spectral reconstruction module performs dynamic position correction and peak shape compensation on the spectral range corresponding to at least one protein characteristic absorption peak in the original diffuse reflectance spectrum according to the nonlinear offset sequence, and generates a calibration reconstruction spectrum.
[0011] The protein content prediction module has a built-in protein prediction model based on calibration and reconstructed spectra. The protein prediction model is used to process the calibration and reconstructed spectra and output the predicted protein content value.
[0012] In the above technical solution, the conformation-hydrogen bond dynamic solution module specifically includes a protein molecular conformation-hydrogen bond dynamic model, a molecular vibrational basic physical model, a nonlinear residual correction network, and a protein multi-peak coupling mapping relationship.
[0013] The fundamental physical model of molecular vibration is used to calculate the reference frequency shift of the protein skeleton amide I band vibration under environmental disturbances. ;
[0014] The nonlinear residual correction network is a small fully connected neural network, with inputs including temperature, water content, and the reference frequency offset calculated by the physical model. The output is the frequency offset residual. ;
[0015] The protein multi-peak coupling mapping relationship is used to expand a single core frequency offset into a complete nonlinear offset sequence covering three feature bands.
[0016] Furthermore, the method for dynamically correcting the spectral position of the protein characteristic absorption peak in the calibration compensation spectral reconstruction module includes the following steps:
[0017] S40, The standard reference peak positions of the three amide bands under the reference standard state are pre-cured;
[0018] S41. Define a correction window for each feature band;
[0019] S42. After receiving the original diffuse reflectance spectrum each time, the calibration compensation spectral reconstruction module performs fine local peak positioning on the original spectrum using data within the window. The cubic spline interpolation peak-finding method is used to obtain the measured peak position of the amide I band. amide II band peak position and the peak position of amide III ;
[0020] S43. For each characteristic absorption peak, according to the corresponding offset in the nonlinear offset sequence, the actual position of the absorption peak is finely shifted in the frequency domain to restore it to the vicinity of the standard reference peak position.
[0021] S44. Complete the correction of the main peak positions of the three characteristic absorption peaks, transforming the original spectral curve into an intermediate spectrum with compensated peak positions. .
[0022] Furthermore, the method for peak shape compensation of the spectral range corresponding to the characteristic absorption peak of the protein in the calibration compensation spectral reconstruction module includes the following steps:
[0023] S401. First, construct the peak broadening function and define its half-width dynamic model.
[0024] S402. The peak shape adjustment algorithm is used to adjust the intermediate spectrum after position correction. Adjust the peak shape within the window;
[0025] S403, from the intermediate spectrum Extract the amide I band window segment and calculate its current measured full width at half maximum (FWHM). ;
[0026] S404, According to real-time and Call the stretch function to calculate the target half-height width. ;
[0027] S405. Define a preset threshold for the current measured half-width. With target half-width Perform a comparison;
[0028] When the actual half-height width With target half-width If the peak shape is exceeded, peak shape adjustment will be initiated.
[0029] Conversely, when the actual half-height and width are measured... With target half-width If the preset threshold is not exceeded, peak shape adjustment will not be initiated;
[0030] S406, Calculate the width difference Adjustments should be made according to the following different situations;
[0031] For the broadening case, construct a curve centered at 0 with a standard deviation of . A Gaussian kernel of 2.355 is multiplied with the window segment to increase the half-width and height to the target value.
[0032] For sharpening, frequency-domain Wiener deconvolution is used, with a Gaussian kernel function, and quantitative regularization is applied to prevent noise amplification.
[0033] It is worth noting that the method for outputting the predicted protein content value in the protein content prediction module includes the following steps:
[0034] S50. Collect samples from the protein prediction model built into the protein content prediction module to generate a dataset.
[0035] S51. Partial least squares regression is used to train the dataset;
[0036] S52, Read the calibration reconstructed spectrum The array is subjected to the same standard normality correction and mean centering transformation as during the training phase.
[0037] S53. Take the inner product of the preprocessed spectral vector x and the regression coefficient vector b, and add the intercept term. Output predicted protein content values ;
[0038] S54. Conduct a reasonableness test on the predicted values;
[0039] S55. Send the final predicted value to the upper-layer system in a structured data packet.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] In this rice protein spectral detection model calibration and compensation system, temperature and moisture are considered as dynamic perturbation variables driving conformational changes in protein molecules. The system calculates in real-time the nonlinear shift sequence of the amide band caused by hydrogen bond reconstruction and oscillator coupling at the molecular physics level. This results in dynamic position correction and peak shape compensation of the original spectrum based on physical mechanisms, generating a calibrated and reconstructed spectrum that eliminates environmental coupling interference. This system overcomes the limitations of traditional statistical correction, which can only handle linear and separable interference. It eliminates the need for the backend prediction model to cope with complex environmental variations. Even with significant fluctuations in temperature and humidity, protein content prediction maintains high accuracy and strong robustness, significantly improving the field adaptability of near-infrared detection. Attached Figure Description
[0042] Figure 1 This is a block diagram of the overall system structure of the present invention. Detailed Implementation
[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this 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. Therefore, they should not be construed as limitations on this invention.
[0045] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0046] Please see Figure 1 As shown, a calibration and compensation system for a rice protein spectral detection model is provided, including a spectral acquisition module, an environmental sensing module, a conformation-hydrogen bond dynamic solution module, a calibration and compensation spectral reconstruction module, and a protein content prediction module.
[0047] The spectral acquisition module is used to acquire the original diffuse reflectance spectrum of the rice sample to be tested in the preset near-infrared band;
[0048] The environmental sensing module is used to synchronously collect the real-time temperature and real-time moisture content of the rice sample being tested at the moment of spectral acquisition.
[0049] The conformation-hydrogen bond dynamic solution module is equipped with a protein molecular conformation-hydrogen bond dynamic model. The protein molecular conformation-hydrogen bond dynamic model uses real-time temperature and real-time water content as dynamic perturbation inputs to drive the protein molecular conformation-hydrogen bond dynamic model to perform solution and output a nonlinear offset sequence characterizing the characteristic spectral absorption peaks of rice protein as the molecular conformation changes.
[0050] The calibration compensation spectral reconstruction module performs dynamic position correction and peak shape compensation on the spectral range corresponding to at least one protein characteristic absorption peak in the original diffuse reflectance spectrum based on the nonlinear offset sequence, and generates a calibration reconstruction spectrum.
[0051] The protein content prediction module has a built-in protein prediction model based on calibration reconstructed spectra. The protein prediction model is used to process the calibration reconstructed spectra and output the predicted protein content values.
[0052] The specific plan is as follows:
[0053] First, to ensure the success of subsequent corrections, it is necessary to collect data on environmental factors affecting rice protein content beforehand. In this scheme, a spectral acquisition module is used to obtain the original diffuse reflectance spectrum of the rice sample to be tested within a preset near-infrared band. The preset near-infrared band of the spectral acquisition module covers the main characteristic absorption regions of proteins, including the combination frequency region of 4000 to 4500 cm⁻¹ and the first-order overtone region of 5000 to 5200 cm⁻¹, as well as the band ranges of approximately 4860 cm⁻¹ for amide I, approximately 4600 cm⁻¹ for amide II, and approximately 4380 cm⁻¹ for amide III.
[0054] The spectral acquisition module consists of a near-infrared spectrometer, a light source, and a fiber optic probe;
[0055] The near-infrared spectrometer is equipped with a spectrometer and a detector. The spectrometer uses a fixed grating with high light flux to disperse the incident composite light in space. The detector is a linear array of indium gallium arsenide detectors, which have high sensitivity response in the wavelength range of 900 to 2500 nm.
[0056] The light source uses a broadband, highly stable halogen tungsten lamp, with a typical power of 20 to 50 watts and a color temperature of approximately 2800 to 3200K.
[0057] Fiber optic probes are the core optomechanical components for realizing optical path transmission and diffuse reflection signal collection. Their internal structure consists of a bundle of multiple low-hydroxyl silica fibers, ensuring high transmittance and low attenuation in the near-infrared band.
[0058] In the specific data acquisition process, before testing the sample, the diffuse reflectance spectrum of an optical standard reference material (such as a polytetrafluoroethylene white board) is first acquired as a reference for calculating reflectance. Light emitted from the light source illuminates the sample via an illumination fiber, penetrating the seed surface and entering the interior. Photons carrying absorption information from components such as proteins are scattered multiple times, captured by a collecting fiber, and sent to a spectrometer. The spectrometer directly generates and outputs a single-beam spectrum based on the signal intensity and corresponding wavenumber of each pixel in the detector. The embedded software or host computer software within the system performs the following calculations to generate the final raw diffuse reflectance spectrum:
[0059] Calculate the reflectance spectrum ,in Represents the single-beam spectrum of the sample. Indicates the reference single-beam spectrum. Represents the dark current spectrum. Indicates wave number;
[0060] Reflectance spectrum Converted to absorption spectrum ,in .
[0061] The spectral acquisition module generates the raw diffuse reflectance spectrum, including the reflectance spectrum. Or absorption spectrum The signal is represented in the form of a digital signal array and transmitted to the conformation-hydrogen bond dynamic solution module and the calibration compensation spectral reconstruction module via a high-speed data bus.
[0062] In addition, the real-time temperature and moisture content of the rice sample under test are collected simultaneously at the moment the spectrum is acquired through the environmental sensing module.
[0063] The environmental sensing module has a built-in temperature sensor (miniature thin-film platinum resistance temperature sensor) and a moisture sensor (microwave moisture sensor).
[0064] Specifically, the stainless steel sheath of the temperature sensor is fixed close to the acquisition window of the fiber optic probe, with its tip slightly protruding, flush with or extending forward by about 0.5 mm from the front end of the fiber optic window. When the fiber optic probe approaches or contacts the rice sample flow to be measured, the tip of the temperature sensor will simultaneously and with similar pressure contact the surface of the rice grains or immerse itself in the gaps between the rice grains, thereby achieving the measurement of the actual surface temperature of the rice grains directly below the spectral sampling point.
[0065] The moisture sensor is installed upstream of the optical fiber probe for spectral acquisition (in the case of a flowing rice sample), or integrated into the same sensor head fixture, so that the microwave antenna or infrared detection window is in pre-contact with the same rice sample within a very short distance (e.g., 1-2 cm) before spectral acquisition. This ensures that the moisture state of the corresponding rice grains during spectral acquisition is almost at the same position on the same continuous fluid as the value just recorded by the sensor, achieving quasi-synchronous spatial coupling.
[0066] During data acquisition, the resistance change of the temperature sensor is converted into a voltage signal via a Wheatstone bridge circuit and an instrumentation amplifier, and then digitized by a high-resolution analog-to-digital converter. The main controller of the spectral acquisition module sends a falling or rising edge of a "spectral acquisition trigger" TTL pulse signal to directly trigger the ADC (Anti-Sampling-Holding-Conversion) operation of both the temperature and moisture sensors, reading the real-time digital temperature value. The analog output or digitized data stream of the moisture sensor is externally hardware-triggered and latched by the same "spectral acquisition trigger" signal. That is, when the spectrometer begins integration, this trigger signal forces the moisture sensor to output its calculated value at that instant and latches it in a register until it is read by the main controller, thus ensuring microsecond-level synchronization accuracy.
[0067] The environmental perception module is also equipped with a microcontroller unit, which performs the following operations upon receiving each external trigger signal:
[0068] First, read the latest digital temperature value collected from the temperature sensor and label it as T.
[0069] Second, read the latest digital value of water content collected from the moisture sensor and label it as W.
[0070] Third, combine T and W into an environment state data packet.
[0071] Fourth, the data packet is immediately pushed to the conformation-hydrogen bond dynamic solution module via SPI, I2C or serial communication interface.
[0072] Through the above-mentioned hardware-level synchronization design of tightly coupled sensor installation and shared trigger signal, the environmental perception module provides temperature and moisture boundary conditions that are strictly one-to-one with each frame of the original spectrum and have a physical causal relationship. This is the physical basis for the conformation-hydrogen bond dynamic model to perform accurate and reliable nonlinear solutions.
[0073] Furthermore, to obtain the impact of environmental factors on rice protein content, the spectral acquisition module uploads the raw diffuse reflectance spectrum to the protein molecular conformation-hydrogen bond dynamic solution module. Simultaneously, the environmental sensing module responds to the data upload status of the spectral acquisition module, synchronously pushing the acquired data packets (the latest temperature digital value T and the latest moisture content digital value W) to the protein molecular conformation-hydrogen bond dynamic model. The protein molecular conformation-hydrogen bond dynamic model receives real-time temperature and moisture content from the environmental sensing module, using them as dynamic boundary conditions to drive microscopic perturbations in the protein molecular conformation. After model solution, it outputs a nonlinear offset sequence composed of multiple characteristic absorption peak frequency offsets, providing accurate physical corrections for subsequent spectral reconstruction. The specific implementation method is as follows:
[0074] First, the presence of water molecules and increased temperature compete with or weaken the intramolecular and intermolecular hydrogen bonds that maintain the stability of protein secondary structures such as α-helices and β-sheets. Changes in the hydrogen bond state of C=O and NH groups in the amide group directly lead to a regular shift in the amide I band, primarily due to the C=O stretching vibration frequency. Fundamental molecular vibrational physics models quantitatively describe this main effect, and these models are used to calculate the reference frequency shift of the protein backbone amide I band vibration under environmental perturbations. As the basis for subsequent offset supplementation, the specific expression is as follows:
[0075] ;
[0076] Where T represents the latest numerical temperature value. This is the latest moisture content figure. Represents Boltzmann's constant. For reference moisture content, For reference temperature, , as well as The parameters for fixing the model were obtained through a combination of quantum chemical simulation and standard protein spectroscopy experiments. The specific method for obtaining these parameters is as follows:
[0077] The activation energy is defined as the effective activation energy corresponding to the hydrogen bond exchange process between water molecules and amides. It is obtained by measuring the rate of change of the frequency of the amide I band of rice glutenin with moisture at different temperatures and fitting the data with the Arrhenius equation.
[0078] Prefix factor: Characterizes the overall sensitivity of frequency shift to moisture disturbance, determined by the slope of the average frequency of the statistical amide I band oscillator system as a function of hydration degree in molecular dynamics simulations;
[0079] The pure temperature coefficient reflects the linear frequency shift caused purely by thermal expansion and weak anharmonic effects under a fixed hydration state, calibrated through constant humidity and variable temperature infrared experiments.
[0080] Furthermore, while fundamental molecular vibrational physics models capture the main effects, they cannot fully describe nonlinear and nonhomogeneous behaviors such as protein side-chain specific hydration, aharmonic coupling, and local conformational fluctuations that may occur in frozen / high-temperature regions. Therefore, to compensate for the complex solvent effects and aharmonic coupling that the physical models cannot capture, this invention introduces a nonlinear residual correction network trained on experimental data as the "data-driven" part of the model. This network is a small, fully connected neural network. The inputs are temperature, water content, and the baseline frequency shift calculated by the physical model; the output is the frequency shift residual. The sum of these two results yields the core frequency shift, which specifically refers to the change in the vibrational frequency of the amide I band of the protein backbone. The construction of the nonlinear residual correction network specifically includes the following:
[0081] Network Structure: The nonlinear residual correction network in this scheme adopts a lightweight fully connected deep neural network with three nodes in its input layer (receiving T, W, ...). The hidden layer has two layers (each with 16 nodes, and the activation function is...). The output layer has one node (output frequency offset residual). ).
[0082] Training method: Using a large number of purified rice protein (such as gluten) samples under known temperature and moisture conditions, the actual peak frequency of its amide I band was accurately determined using a high-resolution infrared spectrometer. At the same time, the fundamental physical model was used to calculate ,in Reference frequency. Corresponding residual label. Then, with (T, W, ... Characterized by ) With the goal of training, we use mean squared error loss and Adam optimizer for supervised learning until the residuals no longer systematically deviate from zero on the validation set.
[0083] Solidification method: After training, the network weights and biases are exported as binary format or header file arrays, and directly compiled and burned into the module's program storage area.
[0084] Furthermore, since the infrared spectrum of a protein is a multi-oscillator coupled system, the amide I, II, and III bands are not independent; they form a complex mechanical coupling through the force constant matrix of the molecular skeleton and the hydrogen bond network. When the amide I band undergoes a frequency shift due to conformational changes, the other two bands will also experience corresponding, often nonlinear, shifts. Therefore, the conformation-hydrogen bond dynamic solution module pre-defines a protein multi-peak coupling mapping relationship to expand a single core frequency shift into a complete nonlinear shift sequence covering all three characteristic bands. The specific expression is as follows:
[0085] ;
[0086] ;
[0087] in , , as well as To determine the calibration constants, temperature and humidity gradient experiments were conducted on purified proteins from multiple rice varieties, and typical values were obtained statistically. =0.55, =-0.01, =-0.30, =0.005, This represents the core frequency shift of the characteristic absorption peak of amide I, indicating the result calculated using the fundamental molecular vibrational physical model and the nonlinear residual correction network. This represents the frequency shift of the characteristic absorption peak of amide II. This indicates the frequency shift of the characteristic absorption peak of the amide III band.
[0088] Using the above mapping relationship, the core frequency shift is obtained through the fundamental physical model of molecular vibration and the nonlinear residual correction network. Then, the above mapping relationship is used to calculate and obtain... as well as Output nonlinear offset sequence .
[0089] In summary, the complete workflow of the conformation-hydrogen bond dynamic solution module is as follows:
[0090] The first step is to substitute the latest digital values of temperature (T) and water content (W) into the formula of the fundamental physical model of molecular vibrations to calculate the reference frequency offset. .
[0091] Step 2: Constructing Feature Vectors The input is fed into a nonlinear residual correction network, and the frequency shift residual is output after forward propagation. .
[0092] The third step is to algebraically sum the baseline offset and the residual to obtain the final amide I band core frequency offset. This value combines physical mechanisms and data fine-tuning, and forms the basis for all subsequent compensations.
[0093] Step 4: Invoke the preset protein multi-peak coupling mapping relationship to shift the core frequency. The amide II band offset was calculated as the independent variable. and amide III band offset This ultimately generates a non-linear offset sequence. .
[0094] For example, suppose that at the instant of online detection, the environmental sensing module captures the latest temperature digital value T=30.5℃ (i.e., ... K), the latest digital moisture content W=16.0%. The corresponding reference frequency offset was calculated using a molecular vibrational fundamental physical model. Solving for .
[0095] Subsequently, residual labels are output through a nonlinear residual correction network. ,therefore After coupling mapping, we obtain , The final output sequence is .
[0096] By using the conformation-hydrogen bond dynamic solution module, temperature and moisture, which are originally regarded as disturbances in the spectral field, are transformed into active variables that drive a fine molecular physics model. This allows the nonlinear shift in the spectrum caused by environmental disturbances to be resolved at the source, so that subsequent calibration and compensation are no longer blind mathematical processing, but precise reconstruction with physical basis.
[0097] Furthermore, the calibration compensation spectral reconstruction module is connected to the conformation-hydrogen bond dynamic solution module and the spectral acquisition module. After receiving the nonlinear offset sequence calculated by the conformation-hydrogen bond dynamic solution module, the calibration compensation spectral reconstruction module performs dynamic position correction and peak shape compensation on the spectral range corresponding to at least one protein characteristic absorption peak in the original diffuse reflectance spectrum to generate the calibration reconstruction spectrum. The specific method is as follows:
[0098] The calibration compensation spectral reconstruction module has two external input interfaces and one output interface:
[0099] Input Interface 1: Connects to the conformation-hydrogen bond dynamic solution module, receiving a nonlinear offset sequence consisting of three wavenumber offsets, i.e. .
[0100] Input interface 2: Connects to the spectral acquisition module to receive the raw diffuse reflectance spectrum at the same time.
[0101] Output interface: Connects to the protein content prediction module data. After reconstruction is completed, the generated calibration and reconstruction spectrum is output in the same one-dimensional array format.
[0102] Meanwhile, during the specific reconstruction process, the local spectral ranges where the three protein characteristic absorption bands are located are first corrected to avoid introducing unnecessary global noise.
[0103] The calibration compensation spectral reconstruction module pre-fixed the reference standard state (e.g.) , The standard reference peak positions for the three amide bands are:
[0104] Amide I standard peak position: 4860 ;
[0105] Amide II standard peak position: 4600 ;
[0106] Amide III standard peak position: 4380 .
[0107] For each feature band, a correction window is defined, and the window width is typically set to... For example, amide I has a correction window of 1. .
[0108] After each reception of the original diffuse reflectance spectrum, the calibration compensation spectrum reconstruction module uses the data within the window to perform fine local peak position positioning on the original spectrum. This scheme uses the cubic spline interpolation peak finding method to perform fine local peak position positioning.
[0109] First, roughly locate the wavenumber index corresponding to the maximum absorbance. Then index to the wavenumber point. Take N points from each side (e.g., N=6, for a total of 13 points) to form the interpolation interval. Based on these discrete points, a cubic spline curve passing through all data points is constructed using natural boundary conditions or the method of given first derivatives at endpoints. , making = ,and It is twice continuously differentiable within the interval, and finally, for the spline function... Find the first derivative S′(ω), where the peak position corresponds to the absorbance maximum point, satisfying S′(ω)=0, within the interval... Within the range, a binary search is used to find the root of S′(ω)=0. Since the interpolation interval is locked near the peak, the root is unique, and the calculated root is the measured peak position.
[0110] Following the steps described above, obtain the measured peak positions of amide I. amide II band peak position and the peak position of amide III These measured peak positions will be used as the starting reference for position correction.
[0111] Subsequently, dynamic position correction is performed based on the measured peak positions. Dynamic position correction involves precisely shifting the actual position of each characteristic absorption peak in the frequency domain according to the corresponding offset in the nonlinear offset sequence, restoring it to the vicinity of the standard reference peak position, and eliminating the first-order peak position drift caused by hydrogen bond reconstruction and molecular conformational changes. The specific correction method is as follows:
[0112] Correction for amide I band: Extract the original spectrum into the amide I band window. Spectral fragments within Construct a displacement vector with the same resolution as the original wavenumber axis, and translate the segment along the wavenumber axis. That is, for each wavenumber point within the segment Its absorbance value is reassigned to The translated spectral segment is denoted as . Since this offset is the amount that needs to be compensated calculated by the model based on environmental parameters, the peak position will be moved back to the vicinity of the standard reference peak position after translation.
[0113] For simultaneous correction of amide II and amide III bands: the same method as for amide I band correction was used to extract the amide II band window. and amide III with window spectral fragments as well as Using offset and Translate these two segments respectively. and- The translated fragment is obtained. and .
[0114] To avoid absorbance steps at the window boundaries caused by direct replacement, the calibration compensation spectral reconstruction module uses a length of 10 The Hanning window function performs a weighted gradual fusion of the corrected spectral fragment and the original spectrum at the boundary. Specifically, within the transition interval on both sides of the window, the reconstructed spectral value is taken as a weighted average of the original spectral value and the translated spectral value, with the weights determined by the Hanning window, thus ensuring the continuity and smoothness of the final spectrum.
[0115] After the above steps, the main peak positions of the three characteristic absorption peaks are corrected, and the original spectral curve is transformed into an intermediate spectrum with compensated peak positions. .
[0116] It is worth noting that changes in molecular conformation not only cause a shift in absorption peak frequency but also alter the uniformity of the hydrogen bond network, thereby affecting the distribution of oscillator intensity. This manifests as broadening or sharpening of the absorption peak's full width at half maximum (FWHM) and slight intensity changes. Therefore, simple position correction is insufficient to completely restore the spectrum to its standard conformation; peak shape compensation is necessary. Specific compensation methods are as follows:
[0117] First, construct the peak broadening function: that is, for each feature band... Define its half-width dynamic model:
[0118] ;
[0119] in, This represents the full width at half maximum (FWHM) under standard reference conditions (e.g., 28 for amide I band). ), and For standard reference temperature and moisture content, as well as The broadened temperature coefficient and the broadened moisture coefficient.
[0120] Subsequently, a peak shape adjustment algorithm was used to adjust the position-corrected intermediate spectrum. Adjust the peak shape within the window, taking the amide I band as an example:
[0121] Step 1: From the intermediate spectrum Extract the amide I band window segment and calculate its current measured full width at half maximum (FWHM). This is obtained by interpolating the half-height positions on both sides of the peak on this segment.
[0122] Step 2, based on real-time and Call the stretch function to calculate the target half-height width. .
[0123] Step 3: Define a preset threshold (e.g., 0.5). ), for the currently measured half-width With target half-width Comparison was performed when the actual measured half-width was... With target half-width If the peak shape is exceeded, peak shape adjustment is initiated. This solution employs a variable width... Adjust the spectral convolution kernel:
[0124] First, calculate the width difference. Adjustments should be made according to the following different situations;
[0125] For the broadening case, construct a curve centered at 0 with a standard deviation of . A Gaussian kernel of 2.355 is multiplied with the window segment to increase the half-width and height to the target value.
[0126] For the sharpening case, frequency-domain Wiener deconvolution is used, with a Gaussian kernel function whose parameters are determined by... The decision is made to apply quantitative regularization to prevent noise amplification.
[0127] The same peak shape adjustment was performed on the amide II and amide III bands.
[0128] For example, in a single detection, the environmental perception module provides =30℃, =15.5%, the measured peak position of amide I in the original spectrum is 4856.5. The conformation-hydrogen bond dynamic solution module outputs... The calibration compensation spectral reconstruction module performs position correction: 4856.5 Peak shift at the location Up to 4860.3 Meanwhile, based on the broadening function, calculate =28.0×[1+0.0012×(30−25)+0.008×(15.5−14)]=28.0×1.018=28.5 The currently measured half-width at half-height is 28.1. At this time, the difference is small, and the module performs a slightly widened convolution to make the full width at half maximum (FWHM) exactly 28.5. Peak shape compensation is completed.
[0129] After completing the main peak position correction and peak shape compensation, the calibration compensation spectral reconstruction module stitches the corrected amide I, II, and III band window segments, along with the remaining wavenumber regions not covered in the original spectrum, into a complete spectral curve in ascending wavenumber order, and marks it as the calibration reconstructed spectrum. Calibrate the reconstructed spectrum. The data is sent to the protein content prediction module via the data bus in the same data format and length as the input spectrum.
[0130] The protein content prediction module has a built-in protein prediction model. Since the calibration and reconstructed spectrum has eliminated the nonlinear interference of environmental factors on the protein molecular conformation through the physical model, the spectrum input to the protein content prediction module has a "normalized" representation in terms of characteristic peak position, peak shape, and intensity distribution that is consistent with the standard conformation state. Therefore, it is necessary to train the dataset in advance during the construction of the protein prediction model.
[0131] The first step is sample collection, which involves gathering at least 500 rice samples covering multiple rice varieties, origins, and harvest years. The protein content of the samples should cover the typical range of approximately 5% to 12% and be evenly distributed.
[0132] Each sample was then placed in a sample chamber under controlled temperature and humidity conditions. The raw diffuse reflectance spectra were then acquired using a spectral acquisition module and an environmental sensing module under at least five temperature gradients and five moisture content gradients. and corresponding environmental parameters , where i represents the sample number and k represents the environmental condition number.
[0133] and each group The corresponding calibration reconstructed spectra are generated using the already trained conformation-hydrogen bond dynamic solution module and calibration compensation spectral reconstruction module. .
[0134] The protein content of each sample was then determined using the Kjeldahl method. To form a training set Each training sample contains a calibration reconstructed spectral vector and its corresponding protein content scalar.
[0135] After physical reconstruction, the spectra of each sample under different environmental states should all be restored to stable spectra related to the essential properties of the sample. Thus, the reconstructed spectra of all the same sample under different environmental states should point to the same true value of protein content. This forces the prediction model to learn only the quantitative relationship between protein content and "conformation-normalized" spectra.
[0136] Furthermore, the protein prediction model was trained using partial least squares regression, and the specific training process is as follows:
[0137] First, for each calibration reconstructed spectrum Standard normality correction and mean centering are performed to eliminate minor global baseline shifts. Then, 10-fold cross-validation and the predicted residual sum of squares index are used to determine the optimal number of PLS latent variable factors, typically 6 to 12. Finally, the entire training sample is used to train the PLS regression model with the optimal number of factors, yielding the regression coefficient vector b and the intercept term. After training, the model parameters are serialized and stored in the configuration file of the protein content prediction module.
[0138] After completing the protein prediction model construction, the calibration reconstructed spectrum was then used. Perform the following operations:
[0139] Step 1: Read the calibration reconstructed spectrum The array is subjected to the same standard normality correction and mean centering transformation as during the training phase.
[0140] The second step is to take the inner product of the preprocessed spectral vector x and the regression coefficient vector b, and add the intercept term: , This indicates the predicted protein content.
[0141] The third step is to perform a reasonableness check on the predicted values, cropping them to a physically possible range of 5% to 12%. If the values exceed this range, they are marked as outliers and an alarm is triggered. Simultaneously, to prevent transient interference, median filtering or exponential moving averages can be applied to multiple consecutive predicted values to output a smoothed protein content prediction.
[0142] The fourth step is to send the final predicted value to the upper-level system in a structured data packet (containing fields such as timestamp, sample batch number, and predicted value) to complete the protein content prediction.
[0143] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A calibration and compensation system for a rice protein spectral detection model, characterized in that, It includes a spectral acquisition module, an environmental sensing module, a conformation-hydrogen bond dynamic calculation module, a calibration compensation spectral reconstruction module, and a protein content prediction module; The spectral acquisition module is used to acquire the original diffuse reflectance spectrum of the rice sample to be tested in a preset near-infrared band. The environmental sensing module is used to synchronously collect the real-time temperature and real-time moisture content of the rice sample under test at the moment of spectral acquisition. The conformation-hydrogen bond dynamic solution module is equipped with a protein molecular conformation-hydrogen bond dynamic model. The protein molecular conformation-hydrogen bond dynamic model uses the real-time temperature and real-time water content as dynamic perturbation inputs to drive the protein molecular conformation-hydrogen bond dynamic model to perform solution and output a nonlinear offset sequence characterizing the characteristic spectral absorption peaks of rice protein as the molecular conformation changes. The calibration compensation spectral reconstruction module performs dynamic position correction and peak shape compensation on the spectral range corresponding to at least one protein characteristic absorption peak in the original diffuse reflectance spectrum according to the nonlinear offset sequence, and generates a calibration reconstruction spectrum. The protein content prediction module has a built-in protein prediction model based on calibration and reconstructed spectra. The protein prediction model is used to process the calibration and reconstructed spectra and output the predicted protein content value.
2. The rice protein spectral detection model calibration and compensation system according to claim 1, characterized in that, The method for acquiring the original diffuse reflectance spectrum of the rice sample to be tested in the preset near-infrared band in the spectral acquisition module includes the following steps: S10. Collect the diffuse reflectance spectrum of an optical standard reference material as a reference; S101. The light emitted by the light source illuminates the sample through the illumination optical fiber, penetrates the surface of the grain and enters the interior. The photons carrying the absorption information of components such as proteins are scattered multiple times, captured by the collection optical fiber and sent to the spectrometer. S102. The spectrometer internally generates and outputs a single-beam spectrum based on the signal intensity and corresponding wavenumber of each pixel in the detector, and simultaneously calculates the reflectance spectrum. and reflectance spectrum Converted to absorption spectrum This generates the final original diffuse reflectance spectrum.
3. The rice protein spectral detection model calibration and compensation system according to claim 1, characterized in that, The method for synchronously acquiring the real-time temperature and real-time moisture content of the rice sample under test at the moment of spectral acquisition in the environmental sensing module includes the following steps: S20. Position control is performed on the temperature sensor and moisture sensor built into the environmental sensing module. S21. The main controller of the spectral acquisition module sends an acquisition signal to trigger the temperature sensor and moisture sensor to perform a sampling operation. S22. The temperature data collected by the temperature sensor is converted into a voltage signal by the Wheatstone bridge circuit and instrumentation amplifier, and then digitized by a high-resolution analog-to-digital converter to obtain the latest digital temperature value T. S23. The moisture sensor converts the collected water volume data into an instantaneous calculated value to obtain the latest digital value of water content W. S24. Use the microcontroller unit built into the environmental sensing module to read the latest temperature digital value T and the latest water content digital value W, and combine T and W into an environmental status data packet. Then, push the data packet to the conformation-hydrogen bond dynamic calculation module immediately through SPI, I2C or serial communication interface.
4. The rice protein spectral detection model calibration and compensation system according to claim 1, characterized in that, The conformation-hydrogen bond dynamic solution module specifically includes a molecular vibrational physical model, a nonlinear residual correction network, and a protein multi-peak coupling mapping relationship. The fundamental physical model of molecular vibration is used to calculate the reference frequency shift of the protein skeleton amide I band vibration under environmental disturbances. ; The nonlinear residual correction network is a small fully connected neural network, with inputs including temperature, water content, and the reference frequency offset calculated by the physical model. The output is the frequency offset residual. ; The protein multi-peak coupling mapping relationship is used to expand a single core frequency offset into a complete nonlinear offset sequence covering three feature bands.
5. The rice protein spectral detection model calibration and compensation system according to claim 4, characterized in that, The specific expression of the fundamental physical model of molecular vibration is as follows: ; Where T represents the latest numerical temperature value. This is the latest moisture content figure. Represents the Boltzmann constant. For reference moisture content, For reference temperature, , as well as Fix the parameters for the model.
6. The rice protein spectral detection model calibration and compensation system according to claim 4, characterized in that, The method for constructing the nonlinear residual correction network includes the following steps: S30. A lightweight fully connected deep neural network is used, with 3 nodes in the input layer, 2 hidden layers, and 1 node in the output layer. S31. Using a large number of purified rice protein samples under known temperature and moisture content conditions, the actual peak frequency of its amide I band was accurately determined using a high-resolution infrared spectrometer. Calculated using the fundamental physical model ,in Calculate the residual label using the reference frequency. ; S32, with (T, W, Characterized by ) With the goal of training, supervised learning is performed using mean squared error loss and Adam optimizer until the residuals no longer systematically deviate from zero on the validation set. S33. Export the trained network weights and biases as binary format or header array, compile them directly, and burn them into the module's program storage area.
7. The rice protein spectral detection model calibration and compensation system according to claim 4, characterized in that, The specific expression for the protein multi-peak coupling mapping relationship is as follows: ; ; in , , as well as For calibration constants, This represents the core frequency shift of the characteristic absorption peak of amide I, indicating the result calculated using the fundamental molecular vibrational physical model and the nonlinear residual correction network. This represents the frequency shift of the characteristic absorption peak of amide II. This indicates the frequency shift of the characteristic absorption peak of the amide III band.
8. The rice protein spectral detection model calibration and compensation system according to claim 1, characterized in that, The method for dynamically correcting the spectral position of the protein characteristic absorption peak in the calibration compensation spectral reconstruction module includes the following steps: S40, The standard reference peak positions of the three amide bands under the reference standard state are pre-cured; S41. Define a correction window for each feature band; S42. After receiving the original diffuse reflectance spectrum each time, the calibration compensation spectral reconstruction module performs fine local peak positioning on the original spectrum using data within the window. The cubic spline interpolation peak-finding method is used to obtain the measured peak position of the amide I band. amide II band peak position and the peak position of amide III ; S43. For each characteristic absorption peak, according to the corresponding offset in the nonlinear offset sequence, the actual position of the absorption peak is finely shifted in the frequency domain to restore it to the vicinity of the standard reference peak position. S44. Complete the correction of the main peak positions of the three characteristic absorption peaks, transforming the original spectral curve into an intermediate spectrum with compensated peak positions. .
9. The rice protein spectral detection model calibration and compensation system according to claim 8, characterized in that, The method for peak shape compensation of the spectral range corresponding to the characteristic absorption peak of the protein in the calibration compensation spectral reconstruction module includes the following steps: S401. First, construct the peak broadening function and define its half-width dynamic model. S402. The peak shape adjustment algorithm is used to adjust the intermediate spectrum after position correction. Adjust the peak shape within the window; S403, from the intermediate spectrum Extract the amide I band window segment and calculate its current measured full width at half maximum (FWHM). ; S404, According to real-time and Call the stretch function to calculate the target half-height and width. ; S405. Define a preset threshold for the current measured half-width. With target half-width Perform a comparison; When the actual half-height width With target half-width If the peak shape is exceeded, peak shape adjustment will be initiated. Conversely, when the actual half-height and width are measured... With target half-width If the preset threshold is not exceeded, peak shape adjustment will not be initiated; S406, Calculate the width difference Adjustments should be made according to the following different situations; For the broadening case, construct a curve centered at 0 with a standard deviation of . A Gaussian kernel of 2.355 is multiplied with the window segment to increase the half-width and height to the target value. For sharpening, frequency-domain Wiener deconvolution is used, with a Gaussian kernel function, and quantitative regularization is applied to prevent noise amplification.
10. The rice protein spectral detection model calibration and compensation system according to claim 1, characterized in that, The method for outputting predicted protein content values in the protein content prediction module includes the following steps: S50. Collect samples from the protein prediction model built into the protein content prediction module to generate a dataset; S51. Partial least squares regression is used to train the dataset; S52, Read the calibration reconstructed spectrum The array is subjected to the same standard normality correction and mean centering transformation as during the training phase. S53. Take the inner product of the preprocessed spectral vector x and the regression coefficient vector b, and add the intercept term. Output predicted protein content values ; S54. Conduct a reasonableness test on the predicted values; S55. Send the final predicted value to the upper-layer system in a structured data packet.