A near-infrared spectrum multi-index state decoupling modeling method
Patent Information
- Application Number
- CN202611011014.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-13
AI Technical Summary
[0008]针对现有近红外光谱建模在面对颗粒状、粉状样品时,难以稳定分离化学吸收信息与散射状态信息,普遍把装样与压实扰动当作需要压制的噪声、或仅以人工离散标签粗略描述样品物理状态,导致同一外部标签内部处于不同恢复阶段的样品被合并建模、跨物理状态预测不稳定、且预测异常时无法区分应当重新采样还是重新标定的问题,本发明提供一种近红外光谱多指标状态解耦建模方法及系统,在不改变样品化学组成的前提下主动显化并对象化样品物理状态,由测量过程内部生成状态分组并据此统领多指标建模与异常处置
通过对待测样品施加动作顺序固定且能量上限固定、仅改变颗粒接触网络与散射界面而不改变样品化学组成的相位编码微扰包,并在基准、启动、停留、释放与恢复终点五个固定相位分别采集近红外光谱,将散射界面的可逆重排对应到可重复的测量时序上。现有近红外多指标建模对颗粒/粉状样品的装样扰动通常采用预处理方法事后压制,这一做法把散射变化作为干扰整体丢弃,导致其中携带的物理状态信息同时遗失;能量上限固定防止了颗粒接触网络的不可逆破坏,动作次序固定则保证每次微扰在同一力学路径上展开,使同一化学组成样品在不同物理状态下的光谱差异能够被明确归因于可恢复的散射行为而非化学成分改变。这一前提为后续化学吸收信息与散射状态信息的分离提供了可追溯的物理基础,使整体方法链在入口处即建立起化学组成冻结、散射状态受控激发的操作条件。
Smart Images

Figure CN122901124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of near-infrared spectroscopy analysis technology, specifically a method for decoupling and modeling multiple indices in near-infrared spectroscopy. Background Technology
[0002] Near-infrared spectroscopy, with its non-destructive, rapid, and simultaneous reflection of multiple chemical bond vibrations, is widely used for multi-index quantitative analysis of solid samples. However, for granular and powdery samples, particle size, bulk density, surface roughness, and sample compaction can alter the scattering path of photons within the sample, causing baseline drift and nonlinear responses in the spectrum. This results in samples with the same chemical composition exhibiting different spectra under different physical states, thus affecting the reproducibility of multi-index models. Several representative approaches have been developed to address this issue.
[0003] One representative approach focuses on powder scattering and particle size characterization. The 2001 paper, "Near-Infrared Reflectance Spectroscopy for Online Particle Size Analysis of Powders and Ground Materials," systematically discusses how particle size, sample loading method, compaction degree, and surface layer representativeness jointly determine the near-infrared diffuse reflectance spectrum of powders and its calibration relationship. It elevates scattering-related information from mere interference terms to usable observables for particle size and state characterization. This approach addresses scattering effects through more standardized sample loading, more robust preprocessing, or grouping by external categories for modeling. However, it still treats the sample's physical state as an external factor that needs to be suppressed or observed, failing to write state changes as modeling objects that can be generated internally and inherited during the measurement process. Therefore, it has certain limitations; for example, samples at different recovery stages within the same external category are still merged into a single model.
[0004] Another representative approach focuses on the analysis of perturbed spectral sequences. Two-dimensional correlation analysis is used on a set of perturbed near-infrared spectra. After preprocessing, hidden bands are enhanced and the response order of the bands is revealed, demonstrating that perturbed spectral sequences can be analyzed independently. This approach emphasizes interpreting the spectral changes themselves and their relationships, but it typically remains at the offline analysis level. It does not construct spectral changes into local state objects that can be directly used for subsequent multi-index modeling, nor does it preserve the continuously valid state evolution along the phase sequence. Therefore, it has certain limitations, such as the difficulty in directly constraining the selection and use of calibration assets.
[0005] Another representative approach focuses on the effects of sample loading and compaction on the spectrum. It demonstrates that tapping, sample thickness, and cup conditions alter the near-infrared spectrum of powders, and establishes a correlation between compaction behavior, humidity, and near-infrared spectra, proving that both sample loading and compaction paths can be observed via near-infrared spectroscopy. This approach confirms the observable link between physical actions and spectral changes, but its focus remains on observing spectral changes. It does not lead to the objectification of physical states or the use of state grouping to govern multi-indicator modeling and anomaly handling, thus having certain limitations. For example, it cannot distinguish whether anomalies originate from deviations in sample loading conditions or from chemical property transgressions.
[0006] In summary, the aforementioned approaches, whether focusing on suppressing scattering effects, interpreting spectral variations offline, or considering the impact of sample loading actions, generally rely on fixed wavelength ranges, artificial physical state labels, and standardized preprocessing schemes in their modeling organization. This makes it difficult to stably separate chemical absorption and scattering state information in samples with multiple physical states. Differences in scattering behavior within artificial state labels cannot be precisely characterized, and standardized preprocessing schemes struggle to simultaneously adapt to the needs of different states and indicators. Furthermore, when anomalies occur in predictions, it is difficult to distinguish whether resampling or recalibration is necessary.
[0007] Therefore, there is an urgent need for a near-infrared spectroscopy multi-index state decoupling modeling method and system that can actively reveal and objectify the physical state of the sample without changing its chemical composition, generate state groups from within the measurement process, and use these groups to govern multi-index modeling and anomaly handling. Summary of the Invention
[0008] To address the challenges of existing near-infrared spectroscopy modeling methods when dealing with granular or powdery samples, which struggle to stably separate chemical absorption and scattering state information, and which often treat sample loading and compaction disturbances as noise to be suppressed, or rely solely on manually discrete labels to roughly describe the sample's physical state, this invention provides a near-infrared spectroscopy multi-index state decoupling modeling method and system. This method actively reveals and objectifies the sample's physical state without altering its chemical composition, generating state groups internally during the measurement process and using these groups to govern multi-index modeling and anomaly handling.
[0009] The overall concept of this invention is to transform the physical state of a sample within a single detection cycle from a passively subjected disturbance into a modeling object that can be actively excited, quantified sample-by-sample, and inherited. To this end, a set of phase-encoded perturbation packets with a fixed action sequence, fixed energy upper limit, and which only alter the particle contact network and scattering interface without changing the chemical composition are applied to the same sample. Near-infrared spectra are collected at multiple phases—reference, initiation, dwell, release, and recovery endpoints—allowing the reversible changes of the scattering interface to unfold sequentially along the direction from excitation to recovery, thereby obtaining a multi-phase spectral sequence under different phase conditions for the same chemical composition. Based on this, the spectral sequence is divided into local band windows along the wavelength direction. For each window, a set of state variables characterizing its excited response and recovery behavior are extracted and bound as native spectral states. This allows the physical state information to be explicitly carried in the form of local state objects, rather than being re-aliased by whole-spectrum differential analysis. Each spectral state is updated in phase order and categorized into chemically stable, structurally resilient, or unstable states, retaining only the continuously valid states that converge to form a state memory band. Using the memory band as a feature vector, closed-loop families generated internally during the measurement process are clustered, freeing state representation from coarse-grained classification by manual labels. Finally, the chemically stable and structurally resilient bands are fed into the quantitative and state-constraint channels, respectively. The state-constraint channel calls calibration assets according to the closed-loop families and constrains the quantitative channel, ensuring that each multi-index quantitative result carries the physical state premises for its validity. Each step sequentially uses the product of the previous step as input: the perturbation packet provides the phase source for the spectral state, the spectral state provides the state primitives for the memory band, the memory band provides the clustering basis for the closed-loop families, and the closed-loop families provide the affiliation for dual-channel modeling and calibration asset calls. This constitutes an indivisible state-decoupled modeling chain, which is the fundamental difference between this invention and the conventional combination of "multiple sampling plus feature engineering plus unified modeling."
[0010] To achieve the above objectives, the present invention adopts the following technical solution.
[0011] A phase-encoded perturbation packet with a fixed sequence of actions and a fixed energy upper limit is applied to the sample under test. This packet only alters the particle contact network and scattering interface without changing the chemical composition. Near-infrared spectra are acquired at the reference phase, initiation phase, dwell phase, release phase, and recovery endpoint phase to obtain multi-phase spectral sequences of the same sample under different phase conditions while maintaining the same chemical composition. The spectral sequence is divided into at least two local band windows along the wavelength direction. For each window, six state variables are extracted during the entire perturbation process: maximum response amplitude, response direction, dwell offset, release response, recovery rate, and closed-loop deviation. These are then bound to the native spectral state elements of that window. The recovery rate characterizes the degree to which the window returns to the reference after release, and the closed-loop deviation characterizes the irreversible changes remaining after a complete excitation-to-fallback cycle. Each spectral state element is dynamically updated according to the phase sequence. Those that remain stable across all phases are classified as chemically stable, those that fall back after release and gradually return to the baseline are classified as structurally resilient, and those that remain stagnant or exhibit secondary amplification when they should return to the baseline are classified as unstable. Only the state of the continuously effective spectral states is retained to obtain the state memory band. Using the state memory band as the state feature vector, samples are clustered according to minimizing the variance of intra-group scattering behavior. Samples with consistent memory bands are classified into closed-loop families generated internally by the measurement process rather than given by external artificial state labels. The bands belonging to the chemically stable spectral states are sent to the quantitative channel, and the bands belonging to the structurally resilient spectral states are sent to the state constraint channel. The state constraint channel determines the calibration assets to be called for the sample based on the closed-loop family, and performs multi-index regression on the bands belonging to the chemically stable spectral states in the quantitative channel to obtain multi-index quantitative results and the physical state premises for the validity of these results.
[0012] This invention provides a modeling system corresponding to the above method, including a perturbation execution unit that applies phase-encoded perturbation packets, a near-infrared acquisition unit that acquires near-infrared spectra at multiple phases, a spectral state generation unit that extracts six types of state variables according to local band windows and binds them as native spectral states, a dynamic evolution unit that updates spectral states in phase order and completes three-class classification and memory band convergence, a closed-loop family determination unit that determines closed-loop families using memory bands as feature vectors, and a dual-channel modeling unit that sends two types of spectral state bands into the quantitative channel and the state constraint channel respectively, calls calibration assets according to closed-loop families, and outputs multi-index quantitative results; each unit operates collaboratively on the same sample within the same detection cycle, and the output of the previous unit constitutes the input of the next unit, enabling the main chain of the method to obtain the corresponding device support.
[0013] Furthermore, the perturbation packet sequentially includes a light vibration initiation stage, which applies low-energy short-duration excitation to the sample to induce primary rearrangement of the surface particle contact network; a short dwelling stage, which keeps the sample stationary after removing the excitation to attenuate the instantaneous perturbation; and a quantitative compaction release stage, which applies controlled compaction to the sample to allow it to enter a restricted and recoverable contact network and then releases the compaction at a predetermined time. The light vibration amplitude, dwell time, compaction strength, and release time of the perturbation packet are uniformly set as a family of mutually coupled parameters. Regarding the acquisition methods of the six types of state variables, the response of each subsequent phase relative to the reference is calculated based on the reference phase spectrum. The maximum response amplitude, response direction, dwelling offset, release response, recovery rate, and closed-loop bias are determined by the response extrema and their signs, the dwell phase response, the release phase response, and the residual amount of the recovery endpoint phase relative to the reference. After standardizing the memory band, hierarchical clustering with minimal intra-cluster variance is used to divide the samples into at least two closed-loop families. Samples within the same family are consistent in the initiation response sequence, release flipping rhythm, and recovery endpoint residual interval.
[0014] Furthermore, the state constraint channel does not output physicochemical concentration, but is used to determine the closed-loop family to which the sample belongs, determine the bands to be activated and deweighted in the quantitative channel, give the physical credibility boundary of the multi-index quantitative results and trigger abnormal resampling. The quantitative channel uses partial least squares regression to establish a multi-index regression model for the bands to which the chemically stable spectral state elements belong. Furthermore, for each combination of closed-loop family and each target physicochemical index, the optimal approach is selected within the range of preprocessing transformation set and latent variable dimension, so that the same target physicochemical index adopts its own matching preprocessing transformation and latent variable dimension under different closed-loop families, rather than sharing a single global configuration.
[0015] Furthermore, in cases where the prediction results are abnormal, when chemically stable spectral states remain stable while structurally restored spectral states exhibit phase misalignment, slow fallback, or secondary amplification relative to their family benchmark, the physical sample mismatch is determined by considering three layers of information: the deviation of the memory band from the family benchmark, the distance of the sample from the family center in the spectral feature space, and the gradient coverage of the target index. Based on this, new perturbation amplitudes, dwell times, and compaction release conditions are written back, and the perturbation package is re-executed. Resampling is stopped when the deviation no longer decreases after continuous resampling. Simultaneously, the calibration samples, chemically stable band sets, structurally restored state boundaries, and modeling parameters are saved as inheritable calibration asset clusters according to the closed-loop family. When a new sample enters, the memory band first determines its family and then calls the corresponding asset cluster to complete multi-index regression. If it cannot be classified into an existing family, a new calibration asset cluster is generated.
[0016] The beneficial effects of this invention are: By applying a phase-encoded perturbation packet to the sample with a fixed sequence of actions and a fixed energy upper limit, which alters only the particle contact network and scattering interface without changing the sample's chemical composition, and acquiring near-infrared spectra at five fixed phases—reference, initiation, dwell, release, and recovery endpoint—the reversible rearrangement of the scattering interface is mapped to a repeatable measurement sequence. Existing near-infrared multi-index modeling typically uses preprocessing methods to suppress sample perturbations in particulate / powder samples post-processing. This approach discards scattering changes as a whole perturbation, resulting in the loss of the physical state information they carry. A fixed energy upper limit prevents irreversible damage to the particle contact network, and a fixed sequence of actions ensures that each perturbation unfolds along the same mechanical path. This allows spectral differences in samples with the same chemical composition under different physical states to be clearly attributed to recoverable scattering behavior rather than changes in chemical composition. This premise provides a traceable physical basis for the subsequent separation of chemical absorption information and scattering state information, establishing operational conditions of frozen chemical composition and controlled excitation of scattering state at the entry point of the entire method chain.
[0017] By dividing the multi-phase spectral sequence into local band windows along the wavelength direction, six state variables—maximum response amplitude, response direction, dwell offset, release response, restitution rate, and closed-loop bias—are extracted from each window and bound to native spectral state elements. This transforms the complete stimulated-to-fallback process of scattering behavior in each local band into independently semantically identifiable state objects. Existing perturbed spectral analysis typically uses overall spectral difference or two-dimensional correlation coefficients as characteristics, failing to distinguish between two physical mechanisms that appear similar in static spectral appearance: rapid elastic rebound and long-term viscoelastic retention. The key to these six state variables lies in the introduction of restitution rate and closed-loop bias: restitution rate quantifies the degree of regression to the baseline after release, characterizing the structural recovery inertia; closed-loop bias quantifies the residual quantity after a complete stimulated-to-fallback cycle, characterizing the degree of closed-loop regression. The combination of these two allows each spectral state element to simultaneously carry local physical state information in five dimensions: scattering sensitivity, stimulated direction, viscoelastic retention, elastic rebound, and irreversible residue. This improves the subsequent decision chain's ability to distinguish between different scattering behavior types.
[0018] By performing bounded dynamic updates on each native spectral state in phase order, and classifying them as chemically stable, structurally resilient, or unstable based on the monotonicity of phase progression and the directionality of phase fallback, only spectral states that remain valid throughout the entire phase progression are retained as the state memory band. This achieves the condensation from multi-phase temporal information to dimensionally controlled state features. When expanding all phase spectra into the model, there is a large amount of redundancy between adjacent phases, and the differences in the responses of samples of different physical states to each phase are easily diluted under high-dimensional stitching. The three-classification criterion uses the condition of continuous validity as the retention condition. Each spectral state only carries the state conclusion that is stable and valid throughout the entire excitation-fallback cycle, thus retaining the key information required for distinguishing physical states while compressing the phase dimension. The dimension of the state memory band is determined by the number of continuously valid spectral states rather than the number of sampled phases, preventing unnecessary expansion during dense phase acquisition. It is passed downstream as a stable state feature object, allowing subsequent clustering and dual-channel modeling to be performed on a dimensionally controllable input.
[0019] By using state memory bands as feature vectors and employing a hierarchical clustering criterion that minimizes the variance of intra-group scattering behavior, samples are grouped into closed-loop families generated internally during the measurement process rather than defined by external artificial labels. This captures the differences in scattering recovery rhythms that cannot be covered by artificial state labels. Artificial particle size labels or sample loading method classifications can only describe externally visible loading conditions. The same external label often contains samples at different scattering recovery stages, resulting in high intra-group scattering dispersion. However, by using the similarity of scattering recovery trajectories as the clustering basis, samples with the same initiation response sequence, release flip rhythm, and recovery endpoint residual interval are naturally grouped into the same family, exhibiting higher consistency in intra-group scattering behavior than artificial label grouping. This characteristic allows weak-response physicochemical indices that could not converge stably under globally mixed samples due to excessive intra-group scattering fluctuations to re-emerge with a modelable structure after family grouping. This is beneficial for expanding the range of stably modelable indices and reducing scattering interference in the quantitative channel.
[0020] By decoupling the two channels, the quantitative task and the state determination task are separated on the same sample. The quantitative channel specifically sends the bands belonging to chemically stable spectral states to the quantitative channel for multi-index partial least squares regression, while the bands belonging to structurally reconstructive spectral states are specifically sent to the state constraint channel, which does not output physicochemical concentrations. The state constraint channel determines the calibration assets to be used based on the closed-loop family, performs weight reduction on scattering-sensitive bands, and provides the physical confidence boundary of the quantitative results. Single-channel unified modeling simultaneously deals with bands that are chemically stable and those with active scattering changes within the same regression relationship, requiring both quantitative accuracy and the inability to independently determine the physical premises upon which the quantitative results are valid. With dual-channel decoupling, the quantitative channel only deals with bands with stable chemical absorption behavior, reducing the interference of scattering fluctuations on the regression model. The state constraint channel specifically determines the family to which the current sample belongs and the conditions for the validity of the quantitative results. The two channels collaboratively output multi-index quantitative values and their physical state premises, thus providing traceable evidence for the validity of the quantitative results across different physical state conditions.
[0021] By independently searching for the configuration that maximizes the cross-validation determination coefficient within the preprocessing transformation set and latent variable dimension for each closed-loop family and each target physicochemical index combination, this approach allows the same target index to employ its own matched preprocessing transformation and latent variable dimension under families with different scattering states. Existing techniques uniformly select a preprocessing scheme for all samples, but families with different scattering states objectively differ in their adaptation requirements for baseline drift, multiplicative scattering, and high-frequency noise in three preprocessing directions. A uniform configuration can only provide compromises, and it often cannot simultaneously adapt to family combinations with significantly different scattering characteristics. The family × index joint optimization explicitly absorbs this difference at the modeling configuration level. Each family's quantitative channel operates independently according to its optimal configuration under its family's scattering characteristics, rather than relying on the same compromise configuration to accommodate the global situation under cross-family conditions. This improves the preprocessing adaptation of each family's quantitative channel and the stability of multi-index quantitative results on samples with different physical states.
[0022] Physical sample mismatch is determined by integrating three layers of information: deviation of the integrated state memory band from the family benchmark, distance of the sample from the family center in the spectral feature space, and gradient coverage of the target index. Upon confirmation, new perturbation amplitudes, dwell times, and compaction release conditions are written back, and the perturbation package is re-executed. Convergence stops when the mismatch no longer decreases. Furthermore, calibration samples and modeling parameters are saved as inheritable calibration asset clusters according to closed-loop families. When a new sample is assigned to an existing family, the corresponding asset is directly called; only when it cannot be assigned is a new asset cluster generated. This explicitly separates the attribution path and handling actions of predicted anomalies into two branches. Existing technologies often tend to indiscriminately expand the calibration set or perform global recalibration when encountering predicted anomalies, which increases the overhead of physicochemical detection and fails to distinguish whether the anomaly originates from deviation of the sample's physical state or from chemical properties exceeding the existing modeling boundaries. The three-layer criterion clearly points to a deviation in the physical state of the sample when chemically stable spectral states remain stable while structurally reconstructive spectral states are mismatched relative to the family benchmark, triggering controlled resampling rather than calibration set expansion. If the sample simultaneously triggers boundary determination at the chemical level, a new asset cluster is generated instead of covering the old cluster, which helps reduce unnecessary physicochemical detection and global remodeling overhead, and improves the targeting and reliability of anomaly handling. Attached Figure Description
[0023] Figure 1 The process of this invention Figure 1 ; Figure 2 The process of this invention Figure 2 ; Figure 3 The process of this invention Figure 3 . Detailed Implementation
[0024] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. 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.
[0025] Example 1 like Figure 1As shown, this embodiment discloses a complete implementation of a near-infrared spectroscopy multi-index state decoupling modeling method and its modeling system. The system includes a perturbation execution unit, a near-infrared acquisition unit, a spectral state generation unit, a dynamic evolution unit, a closed-loop family determination unit, a dual-channel modeling unit, a calibration asset management unit, and an anomaly resampling decision unit. Each unit operates collaboratively on the same sample within the same detection cycle. The sample to be tested is a granular or powdered solid sample, which is placed in a sample cup and stably positioned in the bearing position of the perturbation execution unit. Metadata records the sample number, batch number, and laboratory true values of each target physicochemical index. In this embodiment, the target physicochemical indexes include modelable indices such as moisture, caffeine, chlorogenic acid, protein, and sucrose.
[0026] The perturbation execution unit applies a set of phase-coded perturbation packets with a fixed sequence of actions and a fixed energy upper limit to the sample. These perturbation packets only alter the particle contact network and scattering interface without changing the sample's chemical composition. The perturbation packet sequentially goes through five phases: a reference phase, an initiation phase, a dwell phase, a release phase, and a recovery endpoint phase. The reference phase acquires the initial reference spectrum; the initiation phase uses a light vibration mechanism to apply a low-energy excitation with small amplitude and short duration to induce primary rearrangement of the surface particle contact network; the dwell phase keeps the sample stationary after the excitation is removed, allowing the instantaneous perturbation to decay; the release phase uses a compaction mechanism to apply controlled compaction and then releases the compaction at a predetermined time, allowing the sample to enter a short-term relaxation state; the recovery endpoint phase acquires the spectrum again at a predetermined recovery time point. The near-infrared acquisition unit acquires diffuse reflectance spectra in the above five phases with a consistent acquisition geometry, obtaining a multi-phase spectral sequence of the same sample under different phase conditions while maintaining its chemical composition. When the site only has the capability for a limited number of repeated measurements or a limited time series acquisition of the same sample, the existing repeated measurements and limited time series data are used to approximate the multi-phase sequence, while the complete five-phase acquisition is used as an enhanced acquisition method to improve the subsequent state resolution. Both adopt the same state quantity caliber in subsequent processing.
[0027] The spectral state generation unit divides the multiphase spectral sequence into at least two local band windows along the wavelength direction. In this embodiment, ten equal-width windows are used as a representative configuration. For the... Local band window The response of each subsequent phase relative to the reference is calculated using the reference phase spectrum as a reference, and the maximum response amplitude is extracted. With response direction The calculation is shown in formula (1): The meanings of the symbolic variables in formula (1) are as follows: For the first A local band window, This represents the number of wavelength points in the window. For the first Phase at wavelength absorbance at that point As the reference phase absorbance, The number of phases following the reference phase. To obtain the symbol, Characterizes the scattering sensitivity of this window to perturbations. A positive value indicates enhanced scattering, and a negative value indicates reduced scattering. (Stationary offset) Take the window mean response of the dwell phase relative to the reference, and release the response. The mean response of the release phase relative to the reference is taken, and both characterize the viscoelastic retention and elastic rebound of the sample. Recovery rate The degree to which the window returns to the baseline after release is represented by formula (2): In formula (2) To restore the absorbance of the endpoint phase, To prevent small positive numbers divided by zero from being multiplied by 10 to the power of -10, Limit the result to the range of zero to one. A value approaching 1 indicates that the window has essentially returned to the baseline, while a value approaching zero indicates that it has barely recovered. Closed-loop bias. The irreversible changes remaining after a complete excitation-to-fallback cycle are represented by formula (3): In formula (3) It is a 2-norm. Approaching zero indicates that the window forms a closed-loop regression. The spectral state generation unit binds the above six types of state variables as the native spectral state elements of the window, so that each spectral state element simultaneously carries the meaning of scattering sensitivity, perturbation orientation, viscoelastic retention, elastic rebound, restoring inertia, and closed-loop regression.
[0028] The dynamic evolution unit dynamically updates each primary spectral state in phase order, and classifies it into one of three types based on the closed-loop bias and recovery rate, as shown in formula (4): In formula (4) This represents the standard deviation of the fluctuation across the phase response of the window. The closed-loop bias threshold is set, and the zero-seventh percentile of the closed-loop bias distribution of the baseline samples is taken. The recovery rate threshold is set to 0.6. The fluctuation threshold is set to twice the standard deviation of the baseline noise, and this threshold is derived from the baseline sample statistics. The dynamic evolution unit retains only the spectral state states that are continuously valid during phase advancement. The six types of state variables and type labels of each window are arranged in window order, and convergence is used to obtain the state memory band of the sample. The state memory band is a feature vector, the dimension of which is the product of the number of windows and the number of state variables. In this embodiment, it is sixty-dimensional. It is initialized with the reference phase position set to zero, and its update method is to update the values of each component phase by phase according to the above state variables as the phase advances.
[0029] The closed-loop family determination unit uses the state memory band of each sample as the feature vector and adopts hierarchical clustering to minimize the intra-cluster variance. The merging cost of adjacent clusters is shown in formula (5): In formula (5) and The number of samples to be merged into two clusters. and The mean of the eigenvectors of the state memory bands of the two clusters is the cluster center. To mitigate the increased intra-cluster variance, clustering is performed sequentially with the lowest possible cost until the number of clusters reaches a set value. In this embodiment, three closed-loop families are selected. These closed-loop families are generated internally during the measurement process rather than being provided by external artificial status labels. Samples within the same family share similar start-up response sequences, release-flip rhythms, and recovery endpoint residual intervals.
[0030] The dual-channel modeling unit divides the bands according to the spectral state type: the bands belonging to chemically stable spectral states are sent to the quantitative channel for establishing partial least squares regression models for the target physicochemical indicators, with latent variable dimensions ranging from one to twenty, selected by five-fold cross-validation; the bands belonging to structurally reconstructive spectral states are sent to the state constraint channel to determine the closed-loop family to which the sample belongs and to call the corresponding calibration assets in the calibration asset management unit accordingly. The calibration asset management unit saves calibration samples and modeling parameters according to closed-loop families. The quantitative channel completes multi-indicator regression within the calibration assets corresponding to the sample's family. Finally, the dual-channel modeling unit outputs the multi-indicator quantitative results, the closed-loop family number, and the physical state premises under which the quantitative results are valid. The abnormal resampling decision unit triggers resampling according to the mismatch criterion when the chemically stable channel is stable and the structurally restorative channel is mismatched relative to the family baseline. The threshold is derived from the mismatch statistics within the baseline family. Physical sample mismatch has a higher priority than chemical boundary mismatch in terms of anomaly priority. Resampling stops and the perturbation parameters are written back under the condition that the mismatch converges. The specific calculation of the mismatch criterion, threshold source, priority and restoration conditions is carried out in Example 3.
[0031] The working process of this embodiment is as follows: After the sample is loaded, the perturbation execution unit applies a phase-encoded perturbation packet, and the near-infrared acquisition unit acquires a multi-phase spectral sequence in five phases; the spectral state generation unit extracts six types of state variables according to ten local band windows and binds them as native spectral states; the dynamic evolution unit updates the spectral states in phase order, completes three classifications and converges into a state memory band; the closed-loop family determination unit clusters the memory bands to obtain the closed-loop family to which the sample belongs; the dual-channel modeling unit sends the chemically stable bands into the quantitative channel and the structural restoration bands into the state constraint channel, completes multi-index regression within the calibration asset of the family, and outputs multi-index quantitative results and physical state premises. Each step of the entire link takes the product of the previous step as input, and there are no replaceable parallel function stacks.
[0032] Traditional methods average multiple scans of the same sample, treating reversible rearrangements of the particle contact network as noise to be suppressed, thus failing to distinguish between differences in chemical absorption and differences in scattering states. The key to separating the physical state from the spectrum in this embodiment lies in the phase-encoded perturbation packet, which excites and releases particle rearrangements in a fixed order without altering the chemical composition. This causes the reversible changes at the scattering interface to unfold orderly along the excited-to-fallback direction. The recovery rate and closed-loop deviation quantify the recovering inertia and residual closed loop of this unfolding process, respectively. Therefore, it is possible to distinguish between reversible changes caused solely by scattering and stable differences caused by chemical absorption. This is the physical basis for distinguishing between chemically stable and structurally resilient types. The reason for generating spectral states using local band windows rather than the entire spectrum is that different bands carry chemical absorption stability and particle structure recovery information respectively, and the overall difference of the entire spectrum would re-overlap these two. The reason for clustering by state memory bands rather than grouping by artificial labels is that the contact network and pore structure of samples within the same external morphology label are still in different recovery stages. The memory band describes the real relaxation behavior inside the measurement process. The closed-loop families formed by this cluster have lower intra-group dispersion in scattering behavior than artificial label grouping, making the subsequent regression relationship established within the family less affected by scattering state interference.
[0033] Example 2 like Figure 1 and Figure 2 As shown, this embodiment further discloses the implementation method of refining the responsibilities of the state constraint channel and the joint adaptive optimization of family × index based on embodiment 1, inheriting the aforementioned splitting results of chemically stable and structurally reconstructive spectral states. It also includes the phase division of the phase-encoded perturbation packet, ten local band windows, the calculation methods for six types of state variables, and the closed-loop deviation threshold. With recovery rate threshold The values of are all referred to in Example 1. This example will not repeat the calculation formula, but will only focus on the new and improved parts.
[0034] To ensure comparability of state variables with different dimensions during clustering and optimization, this embodiment standardizes each component of the state memory band before generating the closed-loop family, as shown in formula (6): The meanings of the symbolic variables in formula (6) are as follows: For the state memory band Each component (the state memory feature vector is the same as in Example 1, and the dimension is the product of the number of windows and the number of state quantities, i.e., sixty dimensions. The update method is the same as in Example 1, updating each component sequentially according to the phase). and This represents the mean and standard deviation of this component in the current sample set, and its variable source is the sample statistic of the memory band component in this batch of samples. The standardized component values are then fed into the hierarchical clustering described in Example 1 to obtain closed-loop families.
[0035] The state constraint channel does not output physicochemical concentrations, but undertakes four responsibilities: First, it determines the closed-loop family to which the sample belongs based on the memory band morphology of the structure-restored spectral states; second, it determines the bands to be activated and the bands to be deweighted in the quantitative channel; third, it provides the physical confidence boundary of the current multi-index quantitative results; fourth, it triggers abnormal resampling according to the mismatch criterion when the structure-restored channel mismatches relative to the family benchmark. The threshold is derived from the mismatch statistics within the baseline family. The processing priority of physical sample mismatch is higher than that of chemical boundary anomalies. Resampling stops under the condition of mismatch convergence. The criterion and threshold calculation for this anomaly processing are described in Example 3. Among them, the band activation and deweighting are determined by the band weights, as shown in formula (7): In formula (7) For the first The stability confidence of chemically stable spectral states within a specific spectral window is determined by the phase fluctuations across that window. The smaller the fluctuation, the higher the confidence level, obtained through negative normalization. The temperature coefficient is set to two and determined by the validation set. This represents the weight of the band in the quantitative channel. Traverse all band windows. Bands dominated by structural restoration are weighted with reduced weights due to their low confidence in chemical stability, while bands dominated by chemical stability are weighted with increased weights, thus explicitly reducing the weighting of interference from scattering-sensitive bands on quantitative regression.
[0036] The family × index joint adaptive optimization determines a specific modeling configuration for each closed-loop family and each target physicochemical index combination, and the target is shown in formula (8): In formula (8) It is a closed-loop family. Target physicochemical indicators, This is a preprocessing transformation set that includes the original spectrum, polynomial baseline correction, area normalization, multivariate scattering correction, and their derivative transformations. For the dimension of partial least squares latent variables, The upper limit for latent variables is set to twenty. The coefficient of determination for five-fold cross-validation. and The preprocessing transformation and latent variable dimensions are used to maximize the cross-validation determination coefficient under this family of indicators. Thus, the same target physicochemical indicator adopts its own matched preprocessing transformation and latent variable dimensions under different closed-loop families, rather than sharing a single configuration globally; the quantitative channel performs partial least squares regression within each family using the chemically stable band weighted by formula (7) and the preprocessing and latent variables selected according to formula (8), and outputs the multi-indicator quantitative results of this family of indicators.
[0037] The working process of this embodiment is as follows: Based on the original spectral state and three-class classification obtained in Example 1, the memory band components are first standardized and clustered according to formula (6) to obtain closed-loop families; the state constraint channel determines the family affiliation by the structure recovery type spectral state and calculates the weight of each band in the quantitative channel according to formula (7); then the optimal preprocessing and latent variables are jointly searched for the combination of each family and each target index according to formula (8); the quantitative channel performs regression with the weighted chemically stable type band and the selected configuration, and outputs the quantitative results and physical confidence boundaries of each family index combination.
[0038] The reason why uniform preprocessing sacrifices accuracy is that samples with different scattering states have varying sensitivities to baseline drift and multiplicative scattering, and a single preprocessing method cannot simultaneously and optimally serve different scattering states. In this embodiment, optimization is performed separately for closed-loop families and indices, so that the preprocessing transformation and latent variable dimensions match the scattering behavior of the family, thereby explicitly absorbing the differences in preprocessing requirements of scattering states within the channel. The band weights adopt the normalized exponential form of chemically stable confidence because this form retains residual information of scattering-sensitive bands while suppressing them, rather than hard-removing them, avoiding the information abrupt changes caused by hard threshold removal. After the bands dominated by structure-restored spectral states are deweighted, the regression relationship of the quantitative channel is mainly supported by chemically stable bands. Therefore, the regression of the same index under different families maintains its optimal configuration while the inter-group prediction dispersion is narrower than that of the uniform configuration. This is the source of the gain of dual-channel decoupling compared to single-channel unified modeling.
[0039] Example 3 like Figures 1 to 3As shown, this embodiment, based on Embodiments 1 and 2, discloses implementation methods for phase mismatch-driven anomaly resampling, calibration asset inheritance, and applicable boundary rollback, used to maintain model effectiveness under complex operating conditions and cross-batch scenarios. The generation methods for phase-encoded perturbation packets, six types of state variables, spectral state three-classification, and closed-loop families are described in Embodiment 1. The state constraint channel responsibility and family × index joint optimization are described in Embodiment 2. This embodiment only focuses on boundary and anomaly handling.
[0040] The abnormal resampling decision unit performs a physical sample mismatch determination on the sample after each quantification. When a chemically stable spectral state remains stable relative to its closed-loop family benchmark, while a structurally restored spectral state exhibits one of the following relative to the family benchmark: phase misalignment, slow fallback, or secondary amplification, it is determined to be a physical sample mismatch rather than an unknown chemical anomaly. This determination does not rely on a single threshold but is based on a synthesis of three layers of information, and its mismatch criterion is shown in formula (9): The meanings of the symbolic variables in formula (9) are as follows: The deviation of the sample's state memory band from the reference memory band of its closed-loop family is normalized using the L2 norm. The distance of the sample relative to the family center in the spectral feature space, normalized to the family radius. This represents the coverage of the target index gradient by the sample, and its value ranges from zero to one; the more comprehensive the coverage, the closer it is to one. , , The weights are three-layered and their sum is 1. The initial values are 0.5, 0.3, and 0.2. The mismatch threshold is derived from the 0.9th percentile of the mismatch distribution within the baseline family. Among the three layers of information, memory band deviation reflects state relaxation anomalies, feature space distance reflects sample deviation from the family center, and gradient coverage reflects whether the index range is supported by existing samples. The combination of these three factors can distinguish between physical sample mismatch and chemical property overshoot.
[0041] Anomaly handling priority settings: Physical sample mismatch takes precedence over chemical boundary anomaly handling. That is, when formula (9) determines that there is a physical sample mismatch, the system prioritizes rewriting the new perturbation amplitude, dwell time, and compaction release conditions and controls the perturbation execution unit to re-execute the phase-encoded perturbation packet, without immediately expanding the calibration set. Resampling is iterated in rounds, and its convergence criterion is shown in formula (10): In formula (10) For the first Mismatch after re-mining The convergence increment threshold is set to 0.005. When the recovery condition of formula (10) is met, it is determined that the resampling has converged. At this time, the minimum action chain is executed: stop resampling, freeze the current perturbation parameters, write back the converged family affiliation and mismatch degree to the sample record, and switch the sample into the quantitative channel for normal output. When two consecutive rounds of resampling still do not meet formula (10) and the mismatch degree no longer decreases, the anomaly is upgraded to a chemical boundary anomaly and handed over to the extended calibration process for processing.
[0042] The calibration asset management unit saves calibration samples, chemically stable band sets, structurally restorative state boundaries, and modeling parameters as inheritable calibration asset clusters according to closed-loop families. When a new sample enters, its state memory band first determines its closed-loop family and calculates the inheritance confidence, as shown in formula (11): In formula (11) For this sample to the family Inheritance confidence, The family tolerance is defined by taking the maximum deviation of the sample memory band within that family; the variable source is the family statistic. When Time call family The calibrated asset clusters completed multi-indicator regression. The inheritance threshold is set to 0.6; when the confidence level for inheritance of all existing families is lower than 0.6... When this occurs, a new calibration asset cluster is generated. Therefore, the status of a newly added sample does not automatically trigger global recalibration; instead, it is prioritized to determine whether it can fall into an existing family and inherit the corresponding asset.
[0043] The applicable boundary backoff is used to determine whether state separation is valid. The system calculates the applicable boundary criterion for the sample, as shown in formula (12): In formula (12) For indicator functions, The stability of the chemically stable channel before and after the perturbation is obtained by negative normalization of the closed-loop bias of the chemically stable spectral state. This is a chemical drift indicator, obtained from the displacement amplitude of the chemically stable band absorption center before and after the perturbation. The stability threshold is set to 0.7. The zero-ninth percentile of the baseline sample drift distribution is used as the drift threshold. Taking one case indicates that the perturbation did not affect the chemical composition and state separation was valid, and state modeling was performed according to the closed-loop family; when Taking zero indicates that the sample difference comes from the change in chemical composition itself, state separation no longer brings benefits, and the system reverts to unified modeling without state separation.
[0044] The working process of this embodiment is as follows: After quantification, the abnormal resampling decision unit determines whether there is a physical sample mismatch by combining the three layers of information according to formula (9). If there is a mismatch, resampling is triggered first according to priority and the perturbation parameters are written back. The convergence is determined according to formula (10) and the action chain of stopping and writing back is executed. The new sample first judges the family and calculates the inheritance confidence according to formula (11). If the threshold is reached, the asset cluster is inherited; otherwise, a new cluster is created. At the same time, the applicable boundary is determined according to formula (12). If it is valid, the state model is established; if it is not valid, the unified model is rolled back.
[0045] This embodiment can distinguish between physical resampling and global recalibration because after the chemically stable and structurally reconstructive spectral states are dynamically separated, the source of the anomaly can be pointed to separately: the chemically stable channel is stable while the structurally reconstructive channel is mismatched. The only reasonable explanation is that the sample loading state deviates while the chemical properties remain unchanged. Therefore, the correct action is resampling rather than sample expansion. The three-layer criteria are combined rather than a single layer because looking only at the memory band deviation will misjudge normal samples at the family edge; looking only at the feature space distance will ignore the relaxation behavior anomaly; and looking only at the gradient coverage only reflects the sufficiency of calibration. Only by weighting the three can a stable decision be made under different mismatch modes. The application boundary criteria are necessary because the state separation benefit of this method strictly depends on the physical premise that the chemical composition remains unchanged before and after the perturbation. When the chemical composition itself changes, the difference before and after the perturbation can no longer be attributed to the recoverable physical state, and the closed-loop families lose chemical comparability. At this time, unified modeling is more advantageous due to the increased chemical diversity. The fallback mechanism ensures that the method does not produce negative gains outside its applicable window.
[0046] Example 4 This embodiment is a comparative experiment used to illustrate the impact of differences in sample physical state on the accuracy of near-infrared multi-index modeling, and the improvement direction of closed-loop family grouping compared to artificial state label grouping. The evaluation criteria follow the outputs disclosed in Embodiments 1 and 2, that is, the modeling accuracy is measured by the five-fold cross-validation determination coefficient and cross-validation standard error, and the external prediction capability is measured by the residual prediction bias of the independent test set.
[0047] The first comparison group consisted of mixed modeling and state-specific modeling. In the control group, all samples were merged without distinguishing their physical states to train a single partial least squares model. In the experimental group, samples were grouped according to their physical states, trained independently, and latent variables were selected independently. The common conditions for both groups were the same batch of samples, identical chemical composition, the same cross-validation fold, and the same proportion of independent test sets. The only variable was whether physical states were distinguished. The confirmatory run records, using chlorogenic acid as a representative indicator, are shown in Table 1.
[0048] Table 1. Chlorogenic acid prediction records for hybrid modeling and partial state modeling. Table 1 shows that the coefficient of determination (COD) of the hybrid modeling falls between the results of the two separate states. After independent modeling of the unlabeled state, the COD is higher than that of the hybrid modeling, and the cross-validation standard error is relatively lower. However, the COD of the granular independent modeling is lower, indicating that the characteristic absorption of chlorogenic acid in this state is covered by the scattered signal. Therefore, the accuracy of the hybrid modeling is not a simple average of the two states, but rather a trade-off resulting from forcibly fitting two different spectral and index mappings to the same linear space. Compared to the unlabeled control group, the separate-state processing prevents the predictive ability of highly predictable states from being dragged down by less predictable states.
[0049] The second comparison group consisted of manually labeled groups and closed-loop family groups. The control group was grouped according to the manually labeled fields in the metadata, while the experimental group was grouped according to the closed-loop family groups obtained by clustering with state memory bands as described in Example 1. The common conditions of the two groups were the same as those of the first group, with the only difference being that the grouping basis was changed from manually labeled to closed-loop families. The confirmatory operation records for multiple indicators are shown in Table 2.
[0050] Table 2 Prediction Records of Artificial Status Label Grouping and Closed-Loop Family Grouping Table 2 shows that, for weak response indicators that were originally overwhelmed by scattering noise and almost unmodelable under artificial labeling, closed-loop family grouping relatively increased the coefficient of determination. Water extract and coarse fibers, which were previously nearly unpredictable, exhibited modelable structures after being reorganized by family. Regarding overall grouping consistency, the standard deviation of the coefficient of determination for each group in the closed-loop family group was 0.38, lower than the 0.40 of the artificially labeled group. The standard deviation of the cross-validation standard error for each group was 1.49, lower than the 1.60 of the artificially labeled group, indicating that the closed-loop family, as a modeling unit, has smaller intra-group scattering behavior dispersion.
[0051] Example 5 This embodiment is an ablation experiment used to illustrate the role of the family × index joint adaptive optimization process in the overall scheme. The evaluation criteria follow the output disclosed in Embodiment 2, that is, the modeling accuracy is measured by the five-fold cross-validation coefficient of determination and the assignment of the optimal preprocessing is used as the configuration record.
[0052] The ablation target is the family × index joint optimization described in formula (8) of Example 2. The complete version is referred to as the baseline version. For each combination of closed-loop family and each target physicochemical index, the preprocessing transformation and latent variable dimension that maximize the cross-validation determination coefficient are selected respectively. The ablation version cancels this joint optimization and uniformly adopts the single preprocessing transformation with the highest global frequency for all combinations. The common conditions of the two versions are the same batch of samples, the same closed-loop family division, the same cross-validation fold number, and the same latent variable search range. The only variable factor is whether the preprocessing configuration is selected separately according to the family index combination or uniformly globally. In terms of recalculation, both versions use the cross-validation determination coefficient of each combination as the comparison quantity, and the optimal preprocessing is directly taken from the reference implementation search results. The optimal preprocessing assignment records for each state index combination are shown in Table 3.
[0053] Table 3. Optimal preprocessing assignment records for each combination of state indicators. Table 3 shows that among the 18 valid state index combinations, no preprocessing transformation was required in more than half. Although the original spectrum was the most frequently occurring preprocessing, it only appeared in half of the combinations. This means that if the ablation version uniformly uses the original spectrum for all combinations, the remaining half of the combinations will run with preprocessing inconsistent with their optimal values. A direct example is chlorogenic acid: in its unlabeled state, its optimal preprocessing is multivariate scattering correction with a cross-validation coefficient of determination of 0.63, while in particulate form, its optimal preprocessing changes to the original spectrum with a cross-validation coefficient of determination of 0.12. For the same target index, the optimal preprocessing changes from requiring scattering correction to retaining the original signal simply because of the different physical states. Therefore, the ablation version that cancels joint optimization, compared to the complete version, will cause the combinations whose preprocessing requirements are inconsistent with their optimal values to run with suboptimal configurations, thus losing the ability of the preprocessing to adapt to scattering states.
[0054] As a supplementary ablation, the closed-loop family link is replaced with artificial state label grouping, while the other links remain unchanged. The direction of index change is consistent with the record in Table 2 of Example 4, that is, the modelability of the weak response index decreases and the dispersion within the group increases. The bounded dynamic state evolution memory link is removed and degenerated into the static difference before and after stimulation. Then the spectral state element loses the recovery inertia and closed-loop regression information, the three-class classification cannot be established, and the closed-loop family and dual channel cannot be constructed.
[0055] Example 6 This embodiment is an application case illustrating how the proposed method, based on state trajectory and prediction uncertainty, reduces the amount of physicochemical testing while maintaining model accuracy in industrial coffee sample testing scenarios. The application environment involves the inspection of green coffee beans upon warehousing and the control of the roasting process. Samples are received in batches, physicochemical testing is costly, and not every sample needs to be sent to a laboratory for testing. The evaluation criteria use the cross-validation determination coefficient and residual prediction bias disclosed in Example 1.
[0056] The operation path is as follows: First, perform physicochemical tests on a small number of initial samples and establish an initial model. Then, in each round, select the most informative sample from the untested samples according to the active selection criteria and send it for testing and add it to the training set to remodel until the accuracy no longer improves significantly. The active selection integrates three-layer criteria, which are consistent with the three-layer information caliber of formula (9) in Example 3: the first is the spectral boundary criterion, which prioritizes the selection of samples that are far from the center of the existing training set in the spectral feature space; the second is the state trajectory criterion, which uses the recovery rate and closed-loop deviation in the spectral state memory band to identify samples with abnormal disturbance response modes; the third is the index gradient coverage criterion, which ensures that the submitted samples cover both ends of the target index value range. When the increment of the model determination coefficient is lower than the set threshold for two consecutive rounds, the retesting is stopped according to the convergence condition, realizing the closed loop of prediction, uncertainty assessment, selective retesting and model update. The verification operation records of full detection control and active selection retesting are shown in Table 4.
[0057] Table 4 Records of full-volume testing and active-selective retesting Table 4 shows that crude fat achieved the same residual prediction bias as the full dataset with about half the sample size, ash achieved similar accuracy with about two-thirds of the sample size, and moisture achieved a higher coefficient of determination than the full dataset in the second round of active selection with a smaller sample size. The improved accuracy of moisture stemmed from the natural avoidance of spectrally anomalous samples in the full training set under active selection. The active selection strategy tends to select samples with stable spectral quality, indirectly achieving data cleaning. The output status includes the multi-index quantitative values of each sample, its closed-loop family number, a suggestion on whether resampling is needed, and a suggestion on whether expanded calibration is needed. Safe convergence is guaranteed by the convergence condition, i.e., retesting stops when the increment is below the threshold, preventing unnecessary increases in detection, thereby reducing the amount of physicochemical detection while maintaining accuracy. Based on an estimated cost of 100 yuan per sample per index for five representative indicators, the active selection strategy cumulatively reduces detection costs by approximately 34,000 yuan compared to full dataset detection.
[0058] Example 7 This embodiment serves as an application boundary control, defining the physical premise upon which the state separation benefit of this method depends: that the phase-encoded perturbation packet only changes the scattering state without altering the chemical composition. Two types of data are used for the control: the first type is coffee bean master data, where the chemical composition of the same sample remains unchanged before and after perturbation, with only a reversible change in physical state; the second type is a publicly available dataset of Colombian specialty coffee, where the chemical composition of the same sample changes due to roasting in both green and roasted bean states. The evaluation criteria for both types of data are consistent, using the cross-validation determination coefficient disclosed in Example 1. The listed values are from the verification run records of the reference implementation; this embodiment does not introduce new statistical or summarizing formulas. The only variable in the control is whether the state change is accompanied by a change in chemical composition. The verification run records are shown in Table 5.
[0059] Table 5. Modeling records for two types of data: unchanged chemical composition and changed chemical composition. Table 5 shows that, for master data with unchanged chemical composition, state-specific and family-specific modeling shows an upward trend compared to mixed modeling, consistent with Example 4; however, for external data where roasting changes the chemical composition, the determination coefficient of mixed modeling is higher than that of independent modeling for any single state. This is because roasting changes the chemical composition of coffee, and merging green and roasted beans increases chemical diversity, which is beneficial for regression. In this case, state-specific separation would lose this chemical diversity. Thus, it can be seen that the benefits of state separation and closed-loop familyization in this method are strictly based on the condition that state changes mainly affect the scattering path rather than the chemical composition. This corresponds to the situation where the applicable boundary criterion described in formula (12) of Example 3 holds.
[0060] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be modified within the scope of the concept described herein by means of the above teachings or the technology or knowledge in related fields.
Claims
1. A near-infrared spectroscopy multi-index state decoupling modeling method, characterized in that, include: A set of phase-encoded perturbation packets with a fixed action sequence and a fixed energy upper limit is applied to the sample under test. The phase-encoded perturbation packets only change the sample particle contact network and scattering interface without changing the sample chemical composition. Near-infrared spectra are collected at the reference phase, initiation phase, dwell phase, release phase, and recovery endpoint phase to obtain a multi-phase spectral sequence of the same sample under different phase conditions with unchanged chemical composition. The multi-phase spectral sequence is divided into at least two local band windows along the wavelength direction. For each local band window, six state variables are extracted: maximum response amplitude, response direction, dwell offset, release response, recovery rate, and closed-loop deviation. The recovery rate characterizes the degree to which the window returns to the reference after release, and the closed-loop deviation characterizes the irreversible changes remaining after a complete excitation-to-fallback cycle. The six state variables are bound to the native spectral state elements of the window. Each native spectral state element is dynamically updated according to the phase sequence. When the spectral state element remains stable in all phases... The sample is classified as chemically stable when the spectral state falls back to the reference after release and gradually returns to the reference, and as structurally restored when the spectral state remains stagnant when it should return to the reference or exhibits secondary amplification. Only the spectral state that remains valid during phase advancement is retained, and the state memory band of the sample is obtained by convergence. Using the state memory band as the state feature vector, the samples are clustered according to minimizing the variance of the intra-group scattering behavior. Samples with the same state memory band are grouped into the same closed-loop family. The closed-loop family is generated internally by the measurement process rather than given by external artificial state labels. The band to which the chemically stable spectral state belongs is sent to the quantitative channel, and the band to which the structurally restored spectral state belongs is sent to the state constraint channel. The state constraint channel determines the calibration asset to be called for the sample based on the closed-loop family, and performs multi-index regression on the band to which the chemically stable spectral state belongs in the quantitative channel to obtain the multi-index quantitative results of the sample and the physical state premises under which the quantitative results are valid.
2. The near-infrared spectral multi-index state decoupling modeling method according to claim 1, characterized in that, The phase-encoded perturbation package sequentially includes: a light vibration initiation stage, in which a low-energy, short-duration excitation is applied to the sample to induce primary rearrangement of the surface particle contact network; a short dwell stage, in which the sample is kept stationary after the excitation is removed to allow the transient perturbation to decay; and a quantitative compaction release stage, in which controlled compaction is applied to the sample to allow it to enter a restricted and recoverable contact network, and then the compaction is released at a predetermined time; the light vibration amplitude, dwell time, compaction strength, and release time of the phase-encoded perturbation package are uniformly set as a family of mutually coupled parameters.
3. The near-infrared spectral multi-index state decoupling modeling method according to claim 1, characterized in that, For each local band window, using the reference phase spectrum as a reference, the response of each subsequent phase relative to the reference is calculated. The maximum response amplitude is obtained by taking the largest absolute value of the response, and the response direction is obtained by its sign. The dwell offset is obtained by taking the response of the dwell phase relative to the reference, and the release response is obtained by taking the response of the release phase relative to the reference. The recovery rate is obtained by the ratio of the residual amount of the recovery endpoint phase relative to the reference to the maximum response amplitude. The closed-loop bias is obtained by the normalized difference between the recovery endpoint phase spectrum and the reference phase spectrum.
4. The near-infrared spectral multi-index state decoupling modeling method according to claim 1, characterized in that, After standardizing the state memory band, it is used as a feature vector. Hierarchical clustering with minimum intra-cluster variance is used to divide the samples into at least two closed-loop families. Samples in the same closed-loop family are consistent in the start-up response order, release flip rhythm, and recovery endpoint residual interval.
5. The near-infrared spectral multi-index state decoupling modeling method according to claim 1, characterized in that, The state constraint channel does not output physicochemical concentration, but is used to determine the closed-loop family to which the sample belongs, determine the bands to be activated and the bands to be deweighted in the quantitative channel, give the physical confidence boundary of the multi-index quantitative results, and trigger abnormal resampling; the quantitative channel uses partial least squares regression to establish a multi-index regression model for the bands to which the chemically stable spectral state unit belongs.
6. The near-infrared spectral multi-index state decoupling modeling method according to claim 5, characterized in that, For each combination of closed-loop family and each target physicochemical index, we search within the range of preprocessing transformation set and latent variable dimension to find the preprocessing transformation and latent variable dimension that result in the highest cross-validation determination coefficient, so that the same target physicochemical index adopts its own matching preprocessing transformation and latent variable dimension under different closed-loop families.
7. The near-infrared spectral multi-index state decoupling modeling method according to claim 5, characterized in that, When the chemically stable spectral state remains stable and the structurally restored spectral state exhibits one of the following relative to its closed-loop family benchmark: phase misalignment, slow fall-off, or secondary amplification, it is determined to be a physical sample mismatch. The determination is based on three layers of information: the deviation of the state memory band from the family benchmark, the distance of the sample from the family center in the spectral feature space, and the gradient coverage of the target index. After determining that there is a physical sample mismatch, a new perturbation amplitude, dwell time, and compaction release conditions are written back, and the phase-encoded perturbation packet is re-executed. Resampling is stopped when the deviation no longer decreases after continuous resampling.
8. The near-infrared spectral multi-index state decoupling modeling method according to claim 4, characterized in that, The calibration samples, chemically stable band sets, structurally resilient state boundaries, and modeling parameters are saved as inheritable calibration asset clusters according to closed-loop families. When a new sample enters, its state memory band first determines its closed-loop family, and then the corresponding calibration asset cluster of that closed-loop family is called to complete multi-index regression. When a new sample cannot be classified into an existing closed-loop family, a new calibration asset cluster is generated.
9. A near-infrared spectral multi-index state decoupling modeling system, characterized in that, include: The perturbation execution unit is used to apply phase-encoded perturbation packets to the sample under test with a fixed sequence of actions and a fixed energy upper limit, without changing the chemical composition of the sample. The near-infrared acquisition unit is used to acquire near-infrared spectra at the reference phase, start-up phase, dwell phase, release phase, and recovery endpoint phase to obtain a multi-phase spectral sequence. The spectral state generation unit is used to extract six types of state variables from the multi-phase spectral sequence according to local band windows: maximum response amplitude, response direction, dwell offset, release response, recovery rate, and closed-loop deviation, and bind them as native spectral states. The dynamic evolution unit is used to update the native spectral states in phase order, determine them as chemically stable, structurally recovering, or unstable, and converge to obtain a state memory band. The closed-loop family determination unit is used to classify the sample into a closed-loop family using the state memory band as a feature vector. The dual-channel modeling unit is used to send the bands belonging to the chemically stable spectral states to the quantitative channel to perform multi-index regression, send the bands belonging to the structurally restored spectral states to the state constraint channel, and call the calibration assets according to the closed-loop family to output multi-index quantitative results.
10. The near-infrared spectral multi-index state decoupling modeling system according to claim 9, characterized in that, It also includes an abnormal resampling decision unit, which is used to determine physical sample mismatch when the chemically stable spectral state remains stable and the structurally restored spectral state is mismatched relative to the reference of its closed-loop family, and write back new perturbation parameters to control the perturbation execution unit to re-execute the phase-encoded perturbation packet.