A method for detecting food essence ingredients based on gas chromatography mass spectrometry
Patent Information
- Application Number
- CN202611105010.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]有鉴于此,本发明提供一种基于气相色谱质谱技术的食品香精成分检测方法,能够解决现有技术中存在食品香精气相色谱质谱检测过程中多组分重叠峰在非线性基线漂移背景下的实时精准解耦分离的技术问题
[0025]本发明通过将高阶张量分解深度流动态网络模型与自适应指数衰减频域线性注意力网络模型协同应用于食品香精气相色谱质谱数据的在线处理,解决了多组分重叠峰在非线性基线漂移背景下的实时精准解耦分离的技术问题。前者利用非对称门控循环流将稳定组分因子与慢变漂移因子在高阶张量空间中动态分离,使弱信号不再被漂移背景湮灭;后者利用傅里叶频谱分析频域注意力稀疏化算法将高维时域重叠峰问题转化为低秩频域稀疏问题,在不构造大型对齐矩阵的前提下以线性阶内存完成正交子空间解耦,从而在流式在线环境下实现了对同分异构体及共流出组分的高并发精准分离。综上所述,本发明解决了背景技术中提到的食品香精气相色谱质谱检测过程中多组分重叠峰在非线性基线漂移背景下的实时精准解耦分离的技术问题。
Smart Images

Figure CN122983243A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of food flavor detection technology, and more specifically, relates to a method for detecting food flavor components based on gas chromatography-mass spectrometry. Background Technology
[0002] In the field of food flavor component detection, gas chromatography-mass spectrometry (GC-MS) is widely used. Volatile components are enriched through headspace solid-phase microextraction (SPE) or liquid-liquid extraction (LC-LI), followed by injection analysis. Retention time and mass spectrometry fragmentation patterns are then used for qualitative and quantitative analysis of the components. Currently, in the actual detection of complex flavor systems, the programmed temperature rise of the column oven can cause uneven thermal expansion and oxidative degradation of the stationary phase, simultaneously generating a slowly drifting nonlinear baseline background signal. This background signal highly overlaps with the chromatographic peaks of trace flavor components in the time domain. Under conditions of multi-component co-elution or parallel elution of isomers, existing baseline correction methods rely on static algorithms such as piecewise linear interpolation or moving average filtering, which cannot detect the dynamic modulation of the drift rate by real-time column temperature changes, leading to the annihilation of weak signal peaks by the nonlinear drift background. Simultaneously, traditional fully connected attention mechanisms, when processing high-dimensional mass spectrometry tensors, exhibit computational complexity that increases quadratically with sequence length, resulting in huge memory overhead and making it impossible to perform orthogonal decoupling of overlapping peaks in real-time in online streaming cytometry scenarios. In other words, existing technologies present a technical challenge in the real-time and accurate decoupling and separation of overlapping peaks of multiple components in the context of nonlinear baseline drift during the gas chromatography-mass spectrometry detection of food flavorings. Summary of the Invention
[0003] In view of this, the present invention provides a method for detecting food flavoring components based on gas chromatography-mass spectrometry, which can solve the technical problem of real-time and accurate decoupling and separation of overlapping peaks of multiple components in the context of nonlinear baseline drift during the gas chromatography-mass spectrometry detection of food flavorings in the prior art.
[0004] This invention is implemented as follows: This invention provides a method for detecting food flavoring components based on gas chromatography-mass spectrometry, comprising the following steps:
[0005] Food flavoring samples were collected, and volatile components were enriched by headspace solid-phase microextraction or liquid-liquid extraction. The samples were then injected into a gas chromatography-mass spectrometry instrument. The raw total ion current data of the entire flow cytometry process was obtained in high-frequency sampling mode, and the real-time column temperature of the instrument was recorded simultaneously.
[0006] The raw total ion current data from the entire flow cytometry process is input into a high-order tensor decomposition deep flow dynamic network model. The high-order heterogeneous feature tensor composed of the retention time axis, mass-to-charge ratio axis, response intensity axis and column temperature axis is extracted online in real time. The dynamic decoupling and separation of baseline drift factor and real flavor component factor are completed simultaneously.
[0007] Based on the dynamic constraint of increasing state entropy, an adaptive nonlinear dynamic drift correction is applied to the baseline drift factor in the high-order heterogeneous feature tensor to restore the true flavor baseline.
[0008] The baseline-corrected multidimensional feature tensor is input into the adaptive exponential decay frequency domain linear attention network model. After processing by the Fourier spectrum analysis frequency domain attention sparsification algorithm, the overlapping peaks are decoupled and mapped to the orthogonal subspace, thus completing the separation of isomers and co-efferentiation components.
[0009] A state memory trace decay mechanism and a small-sample cross-domain adaptive migration strategy are used to enhance the identification of mass spectrometry feature signals of each component in the orthogonal subspace;
[0010] The results of each component identification are compared with the standard flavor library to complete qualitative and quantitative analysis and output a food flavor component detection report.
[0011] The high-frequency sampling mode refers to the gas chromatography-mass spectrometry instrument collecting the total ion current at a sampling frequency higher than that of the conventional mode. The specific value of the sampling frequency is determined by comparing experimental data analysis of the detection rate of weak signal peaks and the baseline noise level at different frequencies.
[0012] The front end of the high-order tensor decomposition deep flow dynamic network model includes multiple cascaded low-rank tensor kernel factorization layers. Each layer decomposes the input high-order tensor into the product of multiple low-order factor matrices and the core tensor. A continuous state information transmission topology is adopted between layers, and the factor matrix output by the previous layer is directly used as the dynamic weight generation independent variable for the tensor shrinkage operation of the next layer.
[0013] The high-order tensor decomposition deep flow dynamic network model internally constructs a locally asymmetric gated cyclic flow. The forward fast flow channel transmits the stabilizing factor representing the deterministic flavor components, while the slow feedback flow channel incrementally evolves and updates the slow-varying factor representing the baseline drift. The gate weights of the two flow channels are dynamically adjusted by the gate function, which takes the current information entropy increment and column temperature change rate as input variables.
[0014] The state entropy increase dynamic constraint refers to monitoring the baseline state by calculating the rate of change of information entropy of the total ion flow data in real time. When the information entropy increment exceeds the dynamic threshold, an adaptive nonlinear dynamic drift correction operator is triggered. The correction amount of the adaptive nonlinear dynamic drift correction operator is jointly determined by the information entropy increment at the current moment, the historical baseline slope, and the column temperature change rate.
[0015] The high-dimensional feature tensor of the adaptive exponential decay frequency domain linear attention network model includes the modulation period axis, the one-dimensional retention time axis, the two-dimensional retention time axis, and the mass spectrum channel axis. The network front end performs discrete cosine transform on the one-dimensional retention time axis and the two-dimensional retention time axis, and performs fast Fourier transform on the two axes in the frequency domain feature attention layer.
[0016] The Fourier spectrum analysis frequency domain attention sparsification algorithm forcibly discards weak high-frequency spectral terms based on the energy sorting of spectral terms, retains core low-frequency energy terms, and completes low-rank decomposition matrix compression. The sparsified frequency domain features enter the linear attention approximation module, which replaces the traditional fully connected attention with an adaptive exponential decay sliding window, reducing the computational complexity from quadratic to linear.
[0017] The orthogonal subspace maps the mass spectrometry feature vectors of different components to mutually orthogonal low-dimensional subspaces through the axial separation attention mechanism. The orthogonality is guaranteed by the auxiliary orthogonal constraint loss function during the training process. The axial separation attention mechanism decouples the information flow into independent attention flows for the modulation period axis, the one-dimensional retention time axis, the two-dimensional retention time axis, and the mass spectrometry channel axis.
[0018] In the adaptive exponential decay frequency domain linear attention network model, the amount of weight transfer between neurons along each axis, the amount of inter-layer activation tensor storage, the amount of intermediate buffer for data loop iteration, and the amount of memory allocation for each layer of the multi-scale pyramid are all dynamically controlled by the output of the learning rate adjustment function. The learning rate adjustment function calculates the comprehensive adjustment coefficient using the proportion of low-frequency energy after frequency domain sparsification, the current validation set decoupling error, and the historical iteration stability index as inputs. .
[0019] The state memory trace decay mechanism uses an exponential decay function to decay and update the component feature memory weights of historical moments, so that when the model identifies weak signals at the current moment, it will give priority to referencing recent high-confidence feature memories. The decay coefficient is determined by experimental statistical analysis of the detection rate of weak signals under different signal-to-noise ratio conditions.
[0020] The small-sample cross-domain adaptive transfer strategy transfers the parameters of an adaptive exponential decay frequency-domain linear attention network model pre-trained on a large-scale classical standard fragrance library to the ultra-trace component identification task through dynamic weight decay. The dynamic weight decay coefficient is determined by comparing the recognition rates of the validation set before and after the transfer.
[0021] The training of the high-order tensor decomposition deep flow dynamic network model uses the mean squared error loss function to measure the factor decomposition reconstruction accuracy, and the orthogonality measure between the component factors and the baseline factors as an auxiliary constraint term, jointly optimizing all low-rank tensor kernel factor decomposition layers and gated cyclic flow parameters; the number of training iterations is determined by the convergence curve of the reconstruction error on the validation set.
[0022] The training of the adaptive exponential decay frequency domain linear attention network model uses the decoupling error of each component's orthogonal subspace as the main loss function and the energy coverage rate of the frequency domain sparsification-preserved spectral terms as an auxiliary constraint term to jointly optimize all axial attention layer parameters; the learning rate is dynamically adjusted by the learning rate adjustment function.
[0023] The extraction temperature, extraction time, and inlet temperature of the headspace solid-phase microextraction were determined by gradient variable orthogonal experiments combined with statistical analysis of peak area response values.
[0024] The sampling frequency range of the high-frequency sampling mode is 5–20 Hz; the preset maximum rank range of the low-rank tensor kernel factorization layer is 4–32; the attenuation coefficient range of the state memory trace decay mechanism is 0.8–0.99; and the dynamic weight attenuation coefficient range of the small-sample cross-domain adaptive migration strategy is [missing information]. ~ The comprehensive adjustment coefficient When the value is less than 0.3, a conservative resource allocation strategy is adopted. A balanced resource allocation strategy is adopted when the value is between 0.3 and 0.7. An aggressive resource allocation strategy is adopted when the ratio is not less than 0.7; the headspace solid-phase microextraction has an extraction temperature range of 40–80℃, an extraction time range of 20–60 minutes, and an injection port temperature range of 200–280℃.
[0025] This invention solves the technical problem of real-time and accurate decoupling and separation of multi-component overlapping peaks in the context of nonlinear baseline drift by synergistically applying a high-order tensor decomposition deep flow dynamic network model and an adaptive exponential decay frequency domain linear attention network model to the online processing of gas chromatography-mass spectrometry data of food flavorings. The former utilizes asymmetric gated circulating flow to dynamically separate stable component factors and slowly varying drift factors in a high-order tensor space, preventing weak signals from being annihilated by the drift background. The latter uses a Fourier spectrum analysis frequency domain attention sparsification algorithm to transform the high-dimensional time-domain overlapping peak problem into a low-rank frequency-domain sparsity problem, achieving orthogonal subspace decoupling with linear-order memory without constructing a large alignment matrix. This enables high-concurrency and accurate separation of isomers and co-eluting components in an online flow cytometry environment. In summary, this invention solves the technical problem mentioned in the background art of real-time and accurate decoupling and separation of multi-component overlapping peaks in the context of nonlinear baseline drift during the gas chromatography-mass spectrometry detection of food flavorings. Attached Figure Description
[0026] Figure 1 This is a flowchart of the method of the present invention.
[0027] Figure 2This is a comparison diagram of the component feature tensors output by the original total ion current and the high-order tensor decomposition deep flow dynamic network model.
[0028] Figure 3 This is a comparison chart of weak signal areas before and after baseline correction.
[0029] Figure 4 This is a graph showing the decay evolution of the characteristic memory weight of weak rose ether signals under the state memory trace decay mechanism.
[0030] Figure 5 The graph shows the correspondence between the quantitative results of each component and the prepared concentration. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0032] like Figure 1 The diagram shown is a flowchart of a method for detecting food flavor components based on gas chromatography-mass spectrometry provided by this invention. This method includes the following steps:
[0033] S01. Collect food flavor samples, enrich volatile components by headspace solid-phase microextraction or liquid-liquid extraction, and inject the samples into a gas chromatography-mass spectrometry instrument. Obtain the raw total ion current data of the entire flow cytometry process in high-frequency sampling mode, and record the real-time column temperature of the instrument simultaneously.
[0034] S02. Input the raw total ion current data of the entire flow cytometry process into the high-order tensor decomposition deep flow dynamic network model, and extract the high-order heterogeneous feature tensor composed of the retention time axis, mass-to-charge ratio axis, response intensity axis and column temperature axis in real time online, and simultaneously complete the dynamic decoupling and separation of the baseline drift factor and the real flavor component factor.
[0035] S03. Based on the dynamic constraint of increasing state entropy, an adaptive nonlinear dynamic drift correction is applied to the baseline drift factor in the higher-order heterogeneous feature tensor to restore the true flavor baseline and eliminate the weak signal annihilation effect.
[0036] S04. Input the baseline-corrected multidimensional feature tensor into the adaptive exponential decay frequency domain linear attention network model. After processing by the Fourier spectrum analysis frequency domain attention sparsification algorithm, the overlapping peaks are decoupled and mapped to the orthogonal subspace to complete the high-concurrency and accurate separation of isomers and co-efferentiation components.
[0037] S05. By employing a state memory trace decay mechanism and a small-sample cross-domain adaptive migration strategy, the mass spectrometry feature signals of each component in the orthogonal subspace are enhanced and identified, and the generalized knowledge topology of the classical standard flavor library is extracted to achieve sensitive detection of ultra-trace key aroma-producing flavor substances.
[0038] S06. Compare the identification results of each component with the standard flavor library to complete the qualitative and quantitative analysis and output a food flavor component detection report.
[0039] The extraction temperature range, extraction time range, and inlet temperature range of the headspace solid-phase microextraction were determined experimentally. It is recommended that the extraction temperature be 40–80℃, the extraction time be 20–60 minutes, and the inlet temperature be 200–280℃. The specific values were obtained through orthogonal experiments with gradient variables combined with statistical analysis of peak area response values.
[0040] The high-frequency sampling mode refers to the gas chromatography-mass spectrometry instrument collecting the total ion current at a higher sampling frequency than the conventional mode per unit time. It is recommended that the sampling frequency be 5 to 20 Hz. The specific value is determined by comparing the detection rate of weak signal peaks and the baseline noise level at different frequencies through experimental data analysis.
[0041] The specific structure of the high-order tensor decomposition deep flow dynamic network model (hereinafter referred to as the flow dynamic tensor model) is as follows: The flow dynamic tensor model constructs a high-order heterogeneous input tensor based on four dimensions: retention time, mass-to-charge ratio, response intensity, and real-time column temperature of the instrument. The front end of the model contains multiple sets of cascaded low-rank tensor kernel factorization layers. Each layer decomposes the input high-order tensor into the product of multiple low-order factor matrices and the core tensor, achieving lossless dimensionality reduction. A continuous-state information transmission topology is used between layers. The factor matrix output by the previous layer is directly used as the dynamic weight generation independent variable for the tensor shrinkage operation of the next layer, forming dynamic coupling between layers. The model internally constructs a locally asymmetric gated cyclic flow, in which the forward fast flow channel is dedicated to... The model is used to transmit stable factors representing deterministic flavor components, while the slow feedback channel is dedicated to incrementally evolving and updating the slowly varying factors representing baseline drift. The gating weights of the fast and slow feedback channels are dynamically adjusted by a gating function, which takes the current information entropy increment and column temperature change rate as input variables and outputs gating coefficients through an experimentally calibrated mapping function. It is recommended that the range of mapping function coefficients be obtained by fitting flow cytometry experimental data from no less than 50 different flavor samples. The model achieves real-time adaptive extraction of multidimensional features from high-concurrency flow cytometry data with extremely low memory usage through dynamic decoupling and alignment in a high-order tensor space. The model output consists of the separated flavor component feature tensor and the baseline drift factor tensor.
[0042] The steps for establishing the training dataset for the fluid dynamic tensor model specifically include: collecting standard gas chromatography-mass spectrometry data covering different categories of food flavorings, including mixed flavoring standard data containing known components, and artificially constructed baseline drift superimposed simulation data. The dataset size is recommended to be no less than 500 independent samples. The range of nonlinear parameters for the simulated baseline drift is obtained through gradient experimental analysis of the actual instrument aging degree. It is recommended that the nonlinear drift slope range be 0.01 to 0.5 (normalized with full-scale response). Each set of data is labeled, and the labeling content includes the actual retention time, mass-to-charge ratio, and response intensity of each component.
[0043] The training steps of the dynamic tensor model specifically include: measuring the factorization reconstruction accuracy using the mean squared error loss function, using the orthogonality measure between component factors and baseline factors as an auxiliary constraint, jointly optimizing all low-rank tensor kernel factorization layers and gated cyclic flow parameters; iteratively training using mini-batch gradient descent, with a recommended batch size of 16–64 and an initial learning rate range of [missing information]. ~ The specific learning rate decay strategy is dynamically adjusted by the learning rate adjustment function; the number of training iterations is recommended to be determined by the convergence curve of the validation set reconstruction error, and the convergence criterion is that the decrease in validation set error is less than 1 / 2 consecutive times for 10 epochs. .
[0044] The specific structure of the adaptive exponential decay frequency domain linear attention network model (hereinafter referred to as the frequency domain attention model) is as follows: The input of the frequency domain attention model is a high-dimensional feature tensor, covering the modulation period axis, the one-dimensional retention time axis, the two-dimensional retention time axis, and the mass spectrum channel axis; the network front-end deploys a frequency domain feature attention layer, which performs discrete cosine transform on the one-dimensional and two-dimensional retention time axes to map the high-dimensional time series to the frequency domain and extract low-frequency core spectral terms; the Fourier spectrum analysis frequency domain attention sparsification algorithm is deeply integrated into the frequency domain feature attention layer, which performs fast Fourier transform on the one-dimensional and two-dimensional retention time axes to map the time domain feature tensor to a two-dimensional dense spectrum space, and forcibly discards the weak high-frequency spectral terms with the lowest energy percentage according to the energy ranking of the spectral terms, retaining the core low-frequency energy terms, and completing the low-rank decomposition matrix compression; the sparsified frequency domain features enter the linear attention approximation module, which replaces the traditional full-frequency linear attention approximation module with an adaptive exponential decay sliding window. The network employs a connection attention mechanism where the attention weights of the current retention time term decay exponentially over the historical features across time and space, reducing computational complexity from quadratic to linear. It also includes multi-level self-recurrent feedback modules to maintain the topological manifold structure of the feature tensors during iterative updates. A multi-scale pyramid attention mechanism collaboratively constructs cross-scale correlations across sparse feature layers of different resolutions. The entire information flow is decoupled into multiple uniaxial one-dimensional attention streams via an axial separation attention mechanism, processing the modulation period axis, one-dimensional retention time axis, two-dimensional retention time axis, and mass spectrometry channel axis respectively, reducing memory usage. The weight transfer between neurons along each axis, the storage of inter-layer activation tensors, the intermediate cache size during data iteration, and the memory allocation for each layer of the multi-scale pyramid are all dynamically controlled by the output of a learning rate adjustment function. This function takes the proportion of low-frequency energy after frequency domain sparsification, the current validation set decoupling error, and the historical iteration stability index as inputs to calculate a comprehensive adjustment coefficient. ,when A conservative resource allocation strategy is adopted, reducing the batch size of weight transfers between neurons along each axis and increasing memory cache; when A balanced resource allocation strategy is adopted to maintain the memory allocation ratio of each layer unchanged; when At that time, an aggressive resource allocation strategy was adopted to increase the storage amount of inter-layer activation tensors and expand the proportion of video memory at the top layer of the multi-scale pyramid.
[0045] The steps for establishing the training dataset for the frequency domain attention model specifically include: collecting high-dimensional gas chromatography-mass spectrometry data of known food flavorings, covering isomer mixtures and co-eluting component mixtures, with a recommended dataset size of no less than 800 sets, of which isomer mixtures are recommended to account for no less than 30%; and labeling the orthogonal subspace coordinates and mass spectrometry fragmentation patterns of each component in each set of data.
[0046] The training steps of the frequency domain attention model specifically include: using the decoupling error of each component's orthogonal subspace as the main loss function and the energy coverage rate of the frequency domain sparsification-preserved spectral terms as the auxiliary constraint term, jointly optimizing all axial attention layer parameters; the learning rate is dynamically adjusted by the learning rate adjustment function; it is recommended that the number of training iterations be determined by the convergence curve of the decoupling error on the validation set, and the convergence criterion is that the error decrease is less than a certain value for five consecutive iterations. The range of this criterion was determined through preliminary experimental analysis of datasets of different sizes.
[0047] The technical effects of the frequency domain attention model and the flow dynamic tensor model are as follows: The flow dynamic tensor model uses asymmetric gated cyclic flow to separate the stable features of chemical components from the slowly varying features of baseline drift in a high-order tensor space in real time, avoiding the annihilation of weak signals in the context of nonlinear drift; The frequency domain attention model uses Fourier spectrum analysis frequency domain attention sparsification algorithm to transform the high-dimensional time domain interaction problem into a low-rank frequency domain sparsity problem, so that the decoupling calculation of overlapping peaks can be completed without explicitly constructing a large alignment matrix, thereby achieving high-concurrency multi-component synchronous separation with linear memory complexity in streaming big data scenarios. At the same time, the axial separation attention mechanism decouples the global attention of multi-dimensional high-dimensional tensors into multiple single-axial independent attention streams, further compressing the memory-level feature storage requirements, enabling the entire detection process to have real-time response capability in a resource-constrained online environment.
[0048] The aforementioned state entropy increase kinetic constraint refers to monitoring the baseline state by calculating the rate of change of information entropy of the total ion flow data in real time during the chromatographic elution process. When the increase in information entropy exceeds the dynamic threshold calibrated by the experiment, an adaptive nonlinear kinetic drift correction operator is triggered to correct the baseline at the current moment. It is recommended that the dynamic threshold range be obtained through statistical analysis of baseline drift experimental data from no less than 30 instruments with different aging levels.
[0049] The adaptive nonlinear dynamic drift correction operator refers to a nonlinear baseline correction function designed based on the dynamic constraint of increasing state entropy. Its correction amount is determined by the current information entropy increment, the historical baseline slope, and the column temperature change rate. It is recommended that the expression of the correction amount and the range of each coefficient be jointly calibrated through multiple sets of gradient drift simulation experiments and real sample control experiments.
[0050] The orthogonal subspace refers to the mapping of mass spectral feature vectors of different components to mutually orthogonal low-dimensional subspaces within the frequency domain attention model through an axial separation attention mechanism. This makes the features of different components linearly independent within the subspace, thereby achieving non-aliasing separation of overlapping peaks. The orthogonality is guaranteed by the auxiliary orthogonal constraint loss function during the training process.
[0051] The state memory trace decay mechanism refers to updating the weights of component feature memory at historical moments using an exponential decay function during the ultra-trace component identification stage. This allows the model to prioritize recent high-confidence feature memory when identifying weak signals at the current moment. The range of the decay coefficient is recommended to be determined through experimental statistical analysis of the detection rate of weak signals under different signal-to-noise ratio conditions, with a suggested range of 0.8 to 0.99.
[0052] The small-sample cross-domain adaptive transfer strategy refers to transferring the parameters of a frequency domain attention model pre-trained on a large-scale classical standard fragrance library dataset to the trace component identification task through dynamic weight decay. This preserves the generalized knowledge topology of the source domain under conditions of extremely limited target domain samples, thereby improving the sensitivity of trace component identification. The range of the dynamic weight decay coefficient is recommended to be determined through comparative experiments on the recognition rates of the validation set before and after the transfer; the recommended range is [insert range here]. ~ .
[0053] The generalized knowledge topology refers to the mass spectrometry feature distribution structure extracted from classical standard flavor library data that can generalize across component categories. It includes the overall topological relationship of mass spectrometry fragmentation patterns of different carbon skeleton types and functional group types in the feature space, which is implicitly modeled by the frequency domain attention model in the large-scale pre-training stage through a multi-scale pyramid attention mechanism.
[0054] The low-rank tensor kernel factorization layer refers to a network layer that decomposes a high-order input tensor into a product of multiple low-order factor matrices and a small-sized core tensor. Lossless information compression is achieved by constraining the rank of the factor matrix to not exceed a preset maximum rank. The preset maximum rank range is recommended to be determined through experimental comparative analysis of reconstruction error and memory usage under different rank orders, and the recommended range is 4 to 32.
[0055] The continuous information transmission topology refers to the method where, instead of being truncated by a discrete activation function, the factor matrix output by the previous layer is directly transmitted in continuous real number form as the dynamic weight generation independent variable for tensor shrinking in the next layer, thus ensuring the information integrity of multidimensional features during inter-layer transmission.
[0056] The local asymmetric gated cyclic flow refers to designing two parameter-independent information flow channels within the flow dynamic tensor model for the flavor component factor and the baseline drift factor. The cyclic step size of the forward fast flow channel is smaller than that of the slow feedback flow channel, and the gating coefficients of the two flow channels are independently output by the gating function, thereby achieving decoupled dynamic modeling of the changing characteristics at different time scales.
[0057] In the Fourier spectrum analysis frequency domain attention sparsity algorithm, the specific boundary value of the last 40% of the high-frequency term energy that is forcibly discarded is recommended to be determined by the following experimental method: On the validation set of different flavor samples, test the component decoupling error and memory usage when the discard ratio is 20%, 30%, 40%, 50%, and 60%, respectively, and select the ratio that is optimal in combination with the decoupling error and memory usage as the final value.
[0058] Among them, the comprehensive adjustment coefficient in the learning rate adjustment function The recommended calculation method is determined through the following steps: Normalize the proportion of low-frequency energy in the frequency domain sparsity, the current validation set decoupling error, and the historical iteration stability index, respectively, and then combine them using a weighted summation method. The values and weighting coefficients should be obtained through at least five rounds of ablation experiments, with a suggested range of 0.1 to 0.9.
[0059] The specific implementation method of step S01 is as follows: Collect the target food flavor sample, and select headspace solid-phase microextraction or liquid-liquid extraction to enrich the volatile components according to the boiling point distribution of the volatile components in the sample. During headspace solid-phase microextraction, place the sample in a headspace vial and seal it. After equilibration at the set extraction temperature (40-80℃ recommended) for a period of time, insert the extraction fiber head and maintain the extraction time (20-60 minutes recommended). After removal, immediately insert it into the injection port (200-280℃ recommended) for thermal desorption injection. The specific parameter combination is determined by gradient variable orthogonal experimental design, with the sum of the peak area response values of each component as the optimization target, and the optimal combination is determined by statistical analysis. When the gas chromatography-mass spectrometry (GC-MS) system is running, the sampling frequency should be set higher than the standard mode (5–20 Hz recommended). In high-frequency sampling mode, total ion current data is continuously acquired throughout the entire process, forming a time-indexed flow cytometry data sequence. Simultaneously, the column oven temperature sensor output value is read in real time via the instrument's communication interface. The column temperature sequence and the total ion current sequence are stored aligned at the same timestamp, serving as the column temperature axis data source for subsequent multidimensional modeling. The purpose of this step is to preserve the original amplitude information of weak signals to the greatest extent possible during signal acquisition, while simultaneously recording the column temperature, a key external perturbation variable, providing a physical driving input for subsequent dynamic modeling of baseline drift.
[0060] The specific implementation of step S02 is as follows: The raw total ion current data obtained in step S01 is combined with the real-time column temperature sequence to construct a high-order heterogeneous input tensor. The four axes of the tensor correspond to retention time, mass-to-charge ratio, response intensity, and real-time column temperature. The tensor data is fed batch by batch into the front-end cascaded low-rank tensor kernel factorization layer of the high-order tensor decomposition deep flow dynamic network model. Each layer uses Tucker decomposition or CP decomposition to losslessly reduce the high-order input tensor to the product of multiple low-order factor matrices and a small-sized core tensor. The maximum rank is suggested to be between 4 and 32, with the specific value determined through experimental analysis comparing reconstruction error and memory usage at different rank orders. A continuous-state information transmission topology is used between layers. The factor matrix output from the previous layer is directly used as the dynamic weights for the tensor shrinkage operation of the next layer in continuous real number form, ensuring the information integrity of multidimensional features during inter-layer transmission. Within the model's locally asymmetric gated circulating flow, the forward fast channel handles the fragrance component stabilization factor with a smaller circulation step size, while the slow feedback channel evolves the baseline drift slow variation factor with a larger circulation step size. The gating function takes the current information entropy increment and column temperature change rate as input, and outputs the gating coefficients of the fast and slow channels respectively through an experimentally calibrated mapping function. The mapping function coefficients are obtained by fitting flow cytometry experimental data from no less than 50 sets of different fragrance samples. The model ultimately outputs the separated fragrance component feature tensor and the baseline drift factor tensor.
[0061] The specific implementation of step S03 is as follows: Based on the dynamic constraint of increasing state entropy, an adaptive nonlinear dynamic drift correction is applied to the baseline drift factor tensor output in step S02. The rate of change of information entropy in the total ion current data of the flow cytometry is calculated in real time. When the increase in information entropy exceeds a dynamic threshold, the adaptive nonlinear dynamic drift correction operator is triggered. The dynamic threshold is obtained through statistical analysis of baseline drift experimental data from no fewer than 30 instruments with different aging levels, reflecting the typical information entropy increment distribution of baseline drift under different aging levels. The correction amount of the correction operator is jointly determined by three variables: the current information entropy increment, the historical baseline slope, and the column temperature change rate. The coefficients of the correction amount expression are jointly calibrated through multiple sets of gradient drift simulation experiments and real sample control experiments. After correction, the baseline drift factor tensor is subtracted from the flavor component characteristic tensor to restore the true flavor baseline and eliminate the effect of weak signal peaks being annihilated by the nonlinear drift background. The purpose of this step is to achieve high-precision separation of the baseline and signal at the time-domain tensor level, providing a pure component tensor input for subsequent frequency-domain decoupling.
[0062] The specific implementation of step S04 is as follows: The baseline-corrected multidimensional feature tensor output in step S03 is fed into the adaptive exponential decay frequency domain linear attention network model. The network front end performs discrete cosine transform on the one-dimensional and two-dimensional retained time axes respectively, mapping the high-dimensional time series to the frequency domain; the Fourier spectrum analysis frequency domain attention sparsification algorithm performs fast Fourier transform on the two axes within the frequency domain feature attention layer, mapping the time domain feature tensor to a two-dimensional dense spectral space, forcibly discarding the weak high-frequency spectral terms with the bottom 40% of energy percentage according to the energy ranking of spectral terms, retaining the core low-frequency energy terms, and completing the low-rank decomposition matrix compression. The sparsified frequency domain features enter the linear attention approximation module, replacing the traditional fully connected attention with an adaptive exponential decay sliding window. The attention weight of the current retained time term is exponentially decayed on the historical features according to the time and spatial span, reducing the computational complexity from quadratic to linear. The axial separation attention mechanism decouples the information flow into independent one-dimensional attention flows for the modulation period axis, the one-dimensional retained time axis, the two-dimensional retained time axis, and the mass spectrum channel axis, reducing memory usage. The multi-scale pyramid attention mechanism collaboratively constructs cross-scale correlations on sparse feature layers of different resolutions. Through an auxiliary orthogonal constraint loss function during the training phase, mass spectral feature vectors of different components are mapped to mutually orthogonal low-dimensional subspaces, achieving aliasing-free separation of overlapping peaks.
[0063] The specific implementation of step S05 is as follows: For the mass spectrometry feature signals of each component in the orthogonal subspace output in step S04, a state memory trace decay mechanism is used for enhanced identification. The state memory trace decay mechanism updates the component feature memory weights at historical moments using an exponential decay function. The suggested decay coefficient range is 0.8–0.99, with the specific value determined through experimental statistical analysis of weak signal detection rates under different signal-to-noise ratio conditions. This ensures the model prioritizes referencing recent high-confidence feature memories to identify weak signals at the current moment. The small-sample cross-domain adaptive transfer strategy transfers the parameters of the adaptive exponential decay frequency-domain linear attention network model pre-trained on a large-scale classical standard fragrance library to the ultra-trace component identification task through dynamic weight decay. The suggested dynamic weight decay coefficient range is [insert range here]. ~ The results were determined by comparing the recognition rates of the validation sets before and after migration, thus preserving the generalized knowledge topology and improving the recognition sensitivity of trace components under the condition of very few samples in the target domain.
[0064] The specific implementation of step S06 is as follows: The mass spectrometry characteristic signals of each component output in step S05 are compared with the standard flavor library to complete qualitative and quantitative analysis. Qualitative analysis is achieved by matching the extracted mass spectrometry fragmentation spectrum with the reference spectrum of each component in the standard library. The similarity calculation uses the vector inner product method after spectral point normalization. Quantitative analysis is performed by integrating the response intensity of each component in the orthogonal subspace and combining the calibration curve of the internal standard method or the external standard method to calculate the content of each component. Finally, the qualitative and quantitative analysis results are integrated to generate a food flavor component detection report containing the component name, retention time, mass-to-charge ratio characteristics, content, and confidence level.
[0065] Specifically, the principle of this invention is:
[0066] The present invention can solve the above-mentioned technical problems because the two core models jointly eliminate the two types of physical obstacles that restrict real-time decoupling from different dimensions.
[0067] The first type of obstacle is the annihilation of weak signals by nonlinear baseline drift. Traditional baseline correction methods treat the total ion current as a one-dimensional scalar sequence, failing to perceive the real-time modulation of drift kinetics by column temperature changes. This invention constructs a high-order heterogeneous input tensor from four dimensions: retention time, mass-to-charge ratio, response intensity, and real-time column temperature. This tensor is losslessly reduced to a product of multiple low-order factor matrices and the core tensor through a cascaded low-rank tensor kernel factorization layer. In an asymmetric gated circulating flow, the forward fast channel extracts the stabilizing factor of the fragrance components, while the slow feedback channel evolves the slowly varying baseline drift factor. The gating coefficients of the two channels are driven by both the current information entropy increment and the column temperature change rate. This mechanism conforms to physical logic: the baseline drift caused by column degradation is much slower on the time scale than the elution peak of the fragrance components. The two differ fundamentally in their entropy increase kinetics, and it is this difference that allows the gating function to achieve precise decoupling in tensor space, thereby recovering the weak signal peaks annihilated by the drift background.
[0068] The second type of obstacle is the real-time separation computational bottleneck of overlapping peaks in high-dimensional tensor space. Traditional fully connected attention mechanisms require constructing an alignment matrix of order square of the sequence length, which is unacceptable in terms of memory overhead for high-concurrency flow cytometry mass spectrometry data. This invention's frequency-domain attention model performs Fast Fourier Transform on the one-dimensional and two-dimensional retention time axes, mapping the high-dimensional interaction problem in the time domain to the frequency domain. It forcibly discards the weak high-frequency spectral terms with the last 40% of energy, retaining the core low-frequency energy terms, thus completing low-rank factorization matrix compression. This sparsification operation has a clear signal processing basis: the shape of chromatographic peaks is mainly determined by low-frequency components, while high-frequency components mainly come from noise; discarding high frequencies does not result in a loss of peak shape information. After sparsification, an adaptive exponential decay sliding window replaces the fully connected attention, reducing the computational complexity from quadratic to linear. The axial separation attention mechanism decouples the modulation period axis, retention time axis, and mass spectrometry channel axis into independent attention streams, further reducing memory requirements. Through the orthogonal constraint loss function during the training phase, the mass spectrometry feature vectors of different components are mapped to an orthogonal subspace, enabling aliasing-free separation of overlapping peaks in the frequency domain. After the two models are cascaded, the former outputs a pure component tensor that eliminates baseline interference, and the latter completes fine-grained orthogonal decoupling of overlapping peaks on this basis. Logically, this forms a two-level online processing flow from coarse to fine, and as a whole, it achieves real-time high-concurrency and accurate separation under resource-constrained conditions.
[0069] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0070] The specific implementation method of step S01 is as follows: After collecting food flavoring samples, volatile components are enriched using headspace solid-phase microextraction (HS-SPME) or liquid-liquid extraction (LC-SPME). The recommended extraction temperature for H-SPME is 40–80℃, the recommended extraction time is 20–60 minutes, and the recommended injection port temperature is 200–280℃. These parameters are obtained through orthogonal experiments with gradient variables combined with statistical analysis of peak area response values. The enriched sample is then injected into a gas chromatography-mass spectrometry (GC-MS) instrument. The recommended sampling frequency is 5–20 Hz, and the specific value is determined by comparing experimental data of weak signal peak detection rates and baseline noise levels at different frequencies. The instrument acquires the raw total ion current data throughout the flow cytometry process in high-frequency sampling mode, and simultaneously records the real-time column temperature for use in subsequent steps.
[0071] The specific implementation of step S02 is as follows: The raw total ion current data obtained in step S01 is input into a high-order tensor decomposition deep flow dynamic network model. The input data consists of retention time... mass-to-charge ratio Response strength and instrument real-time column temperature Four dimensions constitute a higher-order heterogeneous input tensor ,in To retain the number of time sampling points, The mass-to-charge ratio is the number of channels. To quantize the order of response intensity, This represents the number of column temperature sampling points. The model front end employs multiple cascaded low-rank tensor kernel factorization layers, with each layer taking a higher-order tensor as input. The decomposition is expressed as a Tucker product of a low-order factor matrix and a core tensor. This decomposition projects the original high-dimensional tensor onto low-rank subspaces of each dimension, achieving lossless dimensionality reduction. The specific description is as follows:
[0072] ;
[0073] In the formula, The core tensor reflects the coupling relationships between low-rank factors in each dimension. , , , These are factor matrices representing retention time, mass-to-charge ratio, response intensity, and column temperature, respectively. , , , These represent the preset maximum rank for the corresponding dimension, with a suggested range of 4 to 32. This was determined through experimental comparative analysis of reconstruction error and memory usage at different rank levels. To reconstruct the error tensor, Indicates the tensor along the first Modulo multiplication. The factor matrices of each dimension mentioned above and... The dimensions are all inherited from the input tensor. The corresponding dimension, and If the dimensions are the same, the dimensions on both sides of the equation are consistent.
[0074] Interlayers employ a continuous-state information transmission topology, the first... Factor matrix of layer output Directly as the first The dynamic weights generated by the layer tensor shrinking operation are not truncated by discrete activation functions, ensuring the integrity of information during the interlayer transmission of multidimensional features. The specific description is as follows:
[0075] ;
[0076] In the formula, For layer index, For dimensional indexing, For the first Layer A continuous mapping function of dimensions, For the corresponding learnable weight matrix, This is the inter-layer propagation error term. and They have the same dimensions.
[0077] The model internally constructs a locally asymmetric gated cyclic flow. A fast forward flow channel transmits stable flavor component factors, while a slow feedback flow channel incrementally updates the slowly varying baseline drift factors. The parameters of the two flow channels are independent, and the cyclic step size of the fast forward flow channel is smaller than that of the slow feedback flow channel, achieving decoupled dynamic modeling of changes across different time scales. The gating function uses the current time-incremental information entropy. and column temperature change rate For input, For the first The increment of the information entropy of the total ion current data at a given time step relative to the previous time step. For the first The first-order difference approximation of the column temperature with respect to time at time, with dimensions respectively and The gating coefficients are dimensionless normalized outputs, obtained through the Sigmoid function. Map dimensional inputs to The interval, specifically described as follows:
[0078] ;
[0079] ;
[0080] In the formula, and The first The gating coefficients for the fast feedback channel and the slow feedback channel at any given time, with values ranging from [value range missing]. , , For the corresponding fast flow channel gate function and Dimensionally learnable weight matrix This is the fast flow channel offset vector. , For the slow feedback channel, a dimensional learnable weight matrix is provided. For slow feedback flow channel bias vector, and These are the gating error terms for the fast flow channel and the slow feedback flow channel, respectively. The coefficients were obtained by fitting flow cytometry data from at least 50 different flavor samples. The mapping function linearly transforms the dimensional input through a weight matrix and outputs dimensionless gating coefficients, ensuring that both sides of the equation have consistent dimensions. The model outputs are the flavor component feature tensors. With baseline drift factor tensor This completes the dynamic decoupling and separation of the two.
[0081] The specific implementation of step S03 is as follows: Based on the dynamic constraint of increasing state entropy, the baseline drift factor tensor output in step S02 is... Adaptive nonlinear dynamic drift correction is implemented. The rate of change of information entropy in the total ion current data of the flow cytometry is calculated in real time, and the information entropy increment is... Exceeding the dynamic threshold At that time, the correction operator is triggered, and the dynamic threshold is obtained through statistical analysis of baseline drift experimental data from no fewer than 30 instruments with different aging levels. Correction amount. Information entropy increment at the current moment Historical baseline slope and column temperature change rate jointly determined, and All quantities are dimensionless, representing the response intensity dimension, and each band has a dimensional coefficient. , , , The consistency of dimensions was determined through calibration experiments, as detailed below:
[0082] ;
[0083] In the formula, , , , To establish dimensional calibration coefficients, the dimensions of all terms on the right-hand side of the equation are unified to the dimension of response intensity. Calibration is achieved through a combination of multiple gradient drift simulation experiments and real sample control experiments. For the first The baseline slope at time, i.e., the first difference of the baseline response intensity with respect to time. To correct the error term, the dimensions are... Same. Corrected true baseline signal The specific details are as follows:
[0084] ;
[0085] In the formula, For the first Original baseline estimate at time point For the first The real baseline value after constant correction has the same dimension for all three, which are all in the dimension of response intensity, thereby eliminating the weak signal annihilation effect and restoring the real flavor baseline.
[0086] The specific implementation of step S04 is as follows: The multidimensional feature tensor corrected from the baseline in step S03 is input into the adaptive exponential decay frequency domain linear attention network model. The input tensor covers the modulation period axis, the one-dimensional retained time axis, the two-dimensional retained time axis, and the mass spectrum channel axis. The network front-end performs a fast Fourier transform on the one-dimensional and two-dimensional retained time axes, mapping the time-domain feature tensor to a two-dimensional dense spectral space. The Fourier spectrum analysis frequency domain attention sparsification algorithm forcibly discards the weak high-frequency spectral terms with the lowest energy percentage based on the energy ranking of the spectral terms, retaining the core low-frequency energy terms, thus completing the low-rank decomposition matrix compression. Specifically, for the one-dimensional retained time series... Perform a Fast Fourier Transform to obtain the spectral coefficient vector. , For complex field vectors, the magnitude represents the energy intensity of each frequency component, retaining the set of the top 60% of spectral terms with the highest energy. , forming a sparse spectrum The specific description is as follows:
[0087] ;
[0088] In the formula, For frequency spectrum term index, To preserve the index set of spectral terms, and With the same dimensions, the boundary value of the last 40% of the energy ratio was determined by comprehensively optimizing the decoupling error and memory usage of multiple discard ratios tested on different fragrance sample validation sets.
[0089] The sparsified frequency domain features are fed into the linear attention approximation module, and the currently retained time term is used to approximate historical features by time span. Exponential decay, attention weights Reflecting the current moment Historical moments The degree of attention given is represented by a dimensionless normalized weight, as described below:
[0090] ;
[0091] In the formula, is the exponential decay coefficient, a dimensionless positive real number, which controls the rate of forgetting historical features. The time span is expressed in units of the number of sampling points. For the first Moments and Historical Moments The frequency domain similarity score between them is a dimensionless real number. The attention error term, with all terms in the equation being dimensionless, reduces the computational complexity from quadratic to linear. Axial attention is decoupled through an axial separation attention mechanism, mapping overlapping peaks to orthogonal subspaces, achieving high-concurrency, precise separation of isomers and co-efferentiation components.
[0092] Comprehensive adjustment coefficient The result is obtained by weighted summation of three normalized terms: the proportion of low-frequency energy in the frequency domain sparsity, the decoupling error of the validation set, and the stability index of historical iterations. Each input term is dimensionless after normalization. It is also a dimensionless quantity, specifically described as follows:
[0093] ;
[0094] In the formula, The proportion of low-frequency energy after normalization in the frequency domain sparsity. This represents the normalized decoupling error of the current validation set. This is the normalized historical iteration stability index. , , These are dimensionless weighted coefficients, and Each weighting coefficient was obtained through analysis of no fewer than five rounds of ablation experiments, and a suggested range is 0.1–0.9. To calculate the error term. When A conservative resource allocation strategy is adopted, reducing the batch size of weight transfers between neurons along each axis and increasing memory cache; when A balanced resource allocation strategy is adopted to maintain the memory allocation ratio of each layer unchanged; when At that time, an aggressive resource allocation strategy was adopted to increase the storage amount of inter-layer activation tensors and expand the proportion of video memory at the top layer of the multi-scale pyramid.
[0095] The specific implementation of step S05 is as follows: A state memory trace decay mechanism is used to enhance and identify the mass spectrometry feature signals of each component; an exponential decay function is used to decay and update the component feature memory weights at historical times; and the component feature memory vector at the current time is... Through the current feature vector memory vector from the previous time step The weighted fusion is obtained, and the specific expression is as follows:
[0096] ;
[0097] In the formula, For component indexing, , where is the memory attenuation coefficient, a dimensionless positive real number, determined through experimental statistical analysis of weak signal detection rates under different signal-to-noise ratios; a suggested range is 0.8–0.99. For the first Component in The current feature vector at time step [time]. To update the error term, , , They have the same dimensions, both being dimensionless vectors in the feature space. The dimensions are the same, and the dimensions on both sides of the equation are consistent. Simultaneously, a small-sample cross-domain adaptive transfer strategy is employed, transferring the parameters of the frequency domain attention model pre-trained on a large-scale classical standard fragrance library dataset to the ultra-trace component identification task through dynamic weight decay. The dynamic weight decay coefficient... The recommended range is ~ The detection of key aroma-producing substances in trace amounts was determined by comparing the recognition rates of the validation sets before and after migration.
[0098] The specific implementation of step S06 is as follows: compare the identification results of each component obtained in step S05 with the standard flavor library, complete the qualitative and quantitative analysis, and output a food flavor component detection report.
[0099] The training dataset for the flow dynamics tensor model collects standard gas chromatography-mass spectrometry data covering different categories of food flavorings, including mixed flavoring standards with known components and artificially constructed baseline drift overlay simulation data. The dataset size is recommended to be no less than 500 independent samples, and the simulation baseline drift nonlinear slope ranges from 0.01 to 0.5 (normalized to full-scale response). During training, the mean squared error loss function is used to measure the accuracy of factor decomposition and reconstruction, and the orthogonality between component factors and baseline factors is used as an auxiliary constraint. The Frobenius norm measures the orthogonality deviation between two sets of factor matrices. A value close to zero indicates that the component factors and baseline factors are orthogonal in the feature space, thus contributing to the joint optimization of the loss function. The specific details are as follows:
[0100] ;
[0101] In the formula, Reconstruct the tensor for the model. The Frobenius norm of a tensor or matrix. The component factor matrix, This is the baseline drift factor matrix. These are dimensionless orthogonality constraint weight coefficients. The loss term represents the error term. All terms in the equation have the dimensions of the sum of squares of tensor elements, and the dimensions on both sides are consistent. Training uses mini-batch gradient descent with a batch size of 16–64 and an initial learning rate ranging from [value missing]. ~ The convergence criterion is that the error on the validation set decreases by less than 1 / 2 for 10 consecutive rounds. .
[0102] The training dataset for the frequency domain attention model collects high-dimensional gas chromatography-mass spectrometry data of food flavorings with known components. The dataset size is recommended to be no less than 800 groups, with isomer mixtures accounting for at least 30%. During training, the decoupling error of the orthogonal subspace of each component is used as the primary loss function, and the energy coverage rate of the frequency domain sparsification spectral terms is used as an auxiliary constraint. To preserve the ratio of the sum of spectral terms' energies to the total energy of all spectral terms, this is a dimensionless quantity with a range of values of [value missing]. Jointly optimize the loss function The specific details are as follows:
[0103] ;
[0104] In the formula, For the first The true orthogonal subspace coordinate vectors of the components The model predicts the first Component orthogonal subspace coordinate vectors To preserve the energy coverage of spectral terms during frequency domain sparsification These are dimensionless energy coverage constraint weighting coefficients. For the loss error term, and Same dimensions As a dimensionless penalty term, the whole thing passes. The dimensional setting ensures uniformity across all dimensions, and the convergence criterion is that the error decreases by less than a certain value over five consecutive rounds. The range of this criterion was determined through preliminary experimental analysis of datasets of different sizes.
[0105] To better understand and implement this invention, Example 2 of a specific application scenario is provided below: This example uses a batch of compound fruit-flavored food flavorings as the testing object. The sample comes from a standard mixed flavoring prepared in a flavoring laboratory, containing six components: limonene, linalool, ethyl acetate, phenylethanol, ethyl 2-methylbutyrate, and trace amounts of rose ether. The concentration of rose ether is approximately 1 / 500 of the concentration of the other components, classifying it as an ultra-trace component. Detection is performed on a gas chromatography-mass spectrometry (GC-MS) instrument equipped with a capillary column. The column oven uses a programmed temperature ramp, with a temperature range of 40–220°C, a ramp rate of 5°C / min, and a total run time of 36 minutes.
[0106] In step S01, headspace solid-phase microextraction (HS-SPME) was used to enrich volatile components. The extraction temperature was set to 60℃, the extraction time to 40 minutes, and the injection port temperature to 250℃. These parameters were determined through an orthogonal experiment (factors: extraction temperature, extraction time, and injection port temperature, each with three levels) using the sum of the peak areas of the six components as the response value. The instrument sampling frequency was set to 10Hz, generating a total of 21,600 total ion current data points throughout the acquisition process. The column temperature sequence was recorded simultaneously, with the timestamp alignment error between the two not exceeding 0.02 seconds. The main acquisition parameters are shown in Table 1.
[0107] Table 1. Headspace Solid-Phase Microextraction and Instrument Acquisition Parameters
[0108]
[0109] In step S02, 21,600 total ion current data points are jointly constructed with corresponding column temperature sequences to form a high-order heterogeneous input tensor. The tensor dimensions are retention time × mass-to-charge ratio × response intensity × column temperature. These are fed into the high-order tensor decomposition deep flow dynamic network model in batches of 32. Four low-rank tensor kernel factorization layers are set, with a preset maximum rank of 16. Experiments comparing reconstruction error and memory usage at ranks of 4, 8, 16, and 32 show that rank 16 is the optimal combination. During the processing of the continuously flowing 21,600 data points, the gating function calculates the information entropy increment and column temperature change rate in real time and dynamically adjusts the gating coefficients of the fast and slow flow channels. The model outputs the flavor component characteristic tensor and the baseline drift factor tensor. For example... Figure 2 The figure shows a comparison between the original total ion current and the component characteristic tensors output by the high-order tensor decomposition depth flow dynamic network model. It can be seen that during the rapid increase of column temperature in the middle stage of the temperature program (approximately 18-26 minutes), there is a significant nonlinear baseline rise in the original total ion current. After model processing, the baseline of the component characteristic tensor approaches the zero level. The weak signal peak (corresponding to rose ether) is annihilated by the baseline in the original current, but is clearly presented in the component characteristic tensor.
[0110] In step S03, the information entropy change rate of the total ion current in flow cytometry is calculated in real time. The dynamic threshold is obtained by statistical analysis of baseline drift experimental data from 30 instruments across five gradients, ranging from new instruments to those with a cumulative operating time of 3000 hours. The instrument used in this embodiment has a cumulative operating time of approximately 800 hours, corresponding to a dynamic threshold set at 0.032 (normalized to full-scale response). Within the 18-26 minute interval, the information entropy increment repeatedly exceeds the dynamic threshold, triggering the correction operator. The correction amount is determined by a weighted average of the historical baseline slope, the current information entropy increment, and the column temperature change rate. Each coefficient is jointly calibrated using gradient drift simulation and real samples. After correction, the baseline is restored to near-zero baseline levels, and the weak signal peak corresponding to rose ether becomes identifiable again. Figure 3As shown, this is a comparison of the weak signal region before and after baseline correction. The figure shows the process of the rose ether chromatographic peak being submerged by the baseline before correction and clearly presented after correction. As the number of correction operator triggers accumulates, the local baseline slope of the weak signal peak region gradually approaches zero, and the peak height signal-to-noise ratio gradually recovers from below the detection threshold before correction to a quantifiable level.
[0111] In step S04, the baseline-corrected multidimensional feature tensor is fed into an adaptive exponentially decaying frequency-domain linear attention network model. Fast Fourier transforms are performed on the one-dimensional and two-dimensional retained time axes respectively. Spectral analysis shows that the peak shape information of the six components is concentrated in the first 60% of the low-spectral terms, while the energy contribution of the latter 40% of the high-spectral terms mainly comes from noise, and its contribution to decoupling error is negligible. By successively testing the decoupling error and memory usage at discard ratios of 20%, 30%, 40%, 50%, and 60%, 40% is found to be the optimal overall value, corresponding to a memory requirement reduction of approximately three times compared to traditional fully connected attention, and a reduction in computational complexity from quadratic to linear. Limonene and phenylethanol exhibit partial co-elution under the chromatographic conditions of this embodiment, with the co-elution interval approximately between 22.5 and 23.1 minutes. Traditional methods cannot effectively separate the mass spectrometric contributions of the two components in this interval. After the frequency-domain attention sparsification algorithm maps the two components to an orthogonal subspace, the inner product of the feature vectors of the two components is reduced to below 0.03, achieving effective separation. The decoupling errors of each component in the orthogonal subspace are shown in Table 2.
[0112] Table 2. Decoupling error of orthogonal subspaces for each component
[0113]
[0114] In step S05, a state memory trace attenuation mechanism is used to enhance the identification of the ultra-trace mass spectrometry characteristic signal of rose ether in the orthogonal subspace. The attenuation coefficient is set to 0.92, and the detection rate of weak signals is determined experimentally and statistically under four gradient conditions with signal-to-noise ratios of 3:1, 5:1, 10:1, and 20:1. Since the reference data for rose ether in the standard fragrance library is limited, a small-sample cross-domain adaptive transfer strategy is initiated, and the pre-trained model parameters are attenuated with dynamic weights. After migrating to the rose ether recognition task, the validation set recognition rate improved from 61% to 89%. Figure 4 As shown, this is a decay evolution diagram of the feature memory weight of rose ether weak signal under the state memory trace decay mechanism. The diagram shows the process of the feature memory weight of historical moments decaying exponentially as the time step increases. The slope of the decay curve is determined by the decay coefficient 0.92. The weight of recent high-confidence feature memory is significantly higher than that of distant memory, so that the model mainly relies on recent information when identifying weak signals at the current moment, effectively suppressing the interference of historical noise accumulation on the recognition accuracy.
[0115] In step S06, the identification results of the six components were compared with the standard fragrance library. The mass spectrometry similarity of each component was higher than 0.90. Quantitative analysis was performed using the internal standard method, with isoamyl acetate as the internal standard. The quantitative results of each component are shown in Table 3. Figure 5 As shown (the actual concentrations of rose ether have been multiplied by 500), this is a graph showing the correspondence between the quantitative results of each component and the prepared concentration. The deviations between the detected values and the prepared values of the six components in the graph increase slightly as the component concentration decreases. Rose ether has the largest deviation due to its ultra-trace level, but it is still within an acceptable range, indicating that this method is effective in detecting ultra-trace components under the background of nonlinear baseline drift.
[0116] Table 3 Quantitative Analysis Results of Each Component
[0117]
[0118] Regarding the neural network structure, the data flow of the high-order tensor decomposition deep flow dynamic network model is as follows: streaming input tensor (time × mass-to-charge ratio × response intensity × cylinder temperature) → 4-layer cascaded low-rank tensor kernel factorization layer (each layer outputs a factor matrix and a core tensor) → continuous-state information transmission topology (the factor matrix is directly used as the dynamic weight input for the next layer) → locally asymmetric gated cyclic flow (fast flow channel: flavor component stabilization factor; slow flow channel: baseline drift slowly varying factor) → output: component feature tensor + baseline drift factor tensor. The data flow of the adaptive exponential decay frequency domain linear attention network model is as follows: multidimensional feature tensor → discrete cosine transform + fast Fourier transform → frequency domain attention sparsification (discarding the last 40% of high-spectral terms) → linear attention approximation module (exponential decay sliding window) → axial separation attention (four-axis independent) → multi-scale pyramid attention → orthogonal subspace mapping → output: feature vectors of each component.
[0119] Alternative Neural Network Structure 1: A 3D convolutional tensor network replaces the high-order tensor decomposition deep flow dynamic network model. The four-dimensional input tensor is convolved along the three spatial axes of retention time, mass-to-charge ratio, and column temperature. The kernel size along the column temperature axis is set to 1 to preserve the real-time driving characteristics of column temperature. After each convolutional layer, gated linear units extract stable component features and slowly varying drift features respectively. The data flow is: four-dimensional input tensor → multi-layer 3D convolution + gated linear units → component feature map + drift feature map. This alternative structure is highly consistent with the main scheme in terms of feature extraction dimensions (retention time, mass-to-charge ratio, column temperature) and loss function (mean squared error + orthogonality constraint), and is an equivalent replacement that can be implemented by those skilled in the art without creative effort.
[0120] Alternative Neural Network Structure Two: A sparse transformer replaces the linear attention approximation module in the adaptive exponentially decaying frequency-domain linear attention network model. The sparse transformer, through a predefined sparse attention mask, restricts each retention time position to interact only with its nearest neighbors and long-range positions with a fixed step size. The data flow is: frequency-domain sparsified features → sparse attention mask construction → multi-head sparse attention calculation → orthogonal subspace mapping → feature vectors of each component. This alternative structure also uses orthogonal decoupling error as the convergence target of the loss function, with a computational complexity of O(n log n). This is an equivalent substitution that can be achieved by a person skilled in the art without creative effort.
[0121] This embodiment demonstrates that as the instrument ages (the nonlinear drift slope increases during the column temperature programming phase), the signal-to-noise ratio of weak signal peaks in the original total ion current continuously deteriorates. However, after dynamic decoupling using a high-order tensor decomposition deep flow dynamic network model, the local baselines of weak signal peaks in the component characteristic tensors tend to flatten. This trend, from a physical perspective, indicates that the gated circulating flow dynamically adjusts the gate coefficient through information entropy increments, enabling the slow feedback channel to track the drift acceleration caused by column temperature changes. This allows the drift signal to be promptly separated from the component signal, preventing the continuous annihilation of weak signals in the nonlinear drift superposition region. Simultaneously, the eigenvector inner product of the co-eluent components (limonene and phenylethanol) in the orthogonal subspace continuously decreases with increasing iterations, eventually approaching 0.03. This indicates that the frequency domain attention sparsification algorithm, by discarding high-frequency noise spectral terms and retaining the low-frequency core components of the peak shape, gradually separates the frequency domain representations of overlapping peaks under orthogonal constraints. This confirms the effectiveness of frequency domain orthogonal decoupling for co-eluent component separation from a signal processing principle perspective.
[0122] It should be noted that the variables involved in this invention are explained in detail in Tables 4 and 5.
[0123] Table 4. Variable Explanation Table (Part 1)
[0124]
[0125] Table 5. Variable Explanation Table (Part Two)
[0126]
[0127] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting food flavoring components based on gas chromatography-mass spectrometry, characterized in that, Includes the following steps: Food flavoring samples were collected, and volatile components were enriched by headspace solid-phase microextraction or liquid-liquid extraction. The samples were then injected into a gas chromatography-mass spectrometry instrument. The raw total ion current data of the entire flow cytometry process was obtained in high-frequency sampling mode, and the real-time column temperature of the instrument was recorded simultaneously. The raw total ion current data from the entire flow cytometry process is input into a high-order tensor decomposition deep flow dynamic network model. The high-order heterogeneous feature tensor composed of the retention time axis, mass-to-charge ratio axis, response intensity axis and column temperature axis is extracted online in real time. The dynamic decoupling and separation of baseline drift factor and real flavor component factor are completed simultaneously. Based on the dynamic constraint of increasing state entropy, an adaptive nonlinear dynamic drift correction is applied to the baseline drift factor in the high-order heterogeneous feature tensor to restore the true flavor baseline. The baseline-corrected multidimensional feature tensor is input into the adaptive exponential decay frequency domain linear attention network model. After processing by the Fourier spectrum analysis frequency domain attention sparsification algorithm, the overlapping peaks are decoupled and mapped to the orthogonal subspace, thus completing the separation of isomers and co-efferentiation components. A state memory trace decay mechanism and a small-sample cross-domain adaptive migration strategy are used to enhance the identification of mass spectrometry feature signals of each component in the orthogonal subspace; The results of each component identification are compared with the standard flavor library to complete qualitative and quantitative analysis and output a food flavor component detection report.
2. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 1, characterized in that, The high-frequency sampling mode refers to the gas chromatography-mass spectrometry instrument collecting the total ion current at a sampling frequency higher than the conventional mode. The specific value of the sampling frequency is determined by comparing experimental data analysis of the detection rate of weak signal peaks and the baseline noise level at different frequencies.
3. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 2, characterized in that, The front end of the high-order tensor decomposition deep flow dynamic network model contains multiple cascaded low-rank tensor kernel factorization layers. Each layer decomposes the input high-order tensor into the product of multiple low-order factor matrices and the core tensor. A continuous state information transmission topology is adopted between layers, and the factor matrix output by the previous layer is directly used as the dynamic weights of the tensor shrinking operation of the next layer to generate independent variables.
4. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 3, characterized in that, The high-order tensor decomposition deep flow dynamic network model internally constructs a locally asymmetric gated cyclic flow. The forward fast flow channel transmits the stabilizing factor representing the deterministic flavor components, while the slow feedback flow channel incrementally evolves and updates the slowly varying factor representing the baseline drift. The gate weights of the two flow channels are dynamically adjusted by the gate function, which takes the current information entropy increment and column temperature change rate as input variables.
5. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 4, characterized in that, The state entropy increase kinetic constraint refers to monitoring the baseline state by calculating the rate of change of information entropy of the total ion flow data in real time. When the increase of information entropy exceeds the dynamic threshold, an adaptive nonlinear kinetic drift correction operator is triggered. The correction amount of the adaptive nonlinear kinetic drift correction operator is jointly determined by the current information entropy increment, the historical baseline slope, and the column temperature change rate.
6. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 5, characterized in that, The high-dimensional feature tensor of the adaptive exponential decay frequency domain linear attention network model includes the modulation period axis, the one-dimensional retention time axis, the two-dimensional retention time axis, and the mass spectrum channel axis. The network front end performs discrete cosine transform on the one-dimensional retention time axis and the two-dimensional retention time axis, and performs fast Fourier transform on the two axes in the frequency domain feature attention layer.
7. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 6, characterized in that, The Fourier spectrum analysis frequency domain attention sparsification algorithm forcibly discards weak high-frequency spectral terms based on the energy sorting of spectral terms, retains core low-frequency energy terms, and completes low-rank decomposition matrix compression. The sparsified frequency domain features are fed into the linear attention approximation module, where an adaptive exponentially decaying sliding window replaces the traditional fully connected attention, reducing the computational complexity from quadratic to linear.
8. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 7, characterized in that, The orthogonal subspace maps the mass spectrometry feature vectors of different components to mutually orthogonal low-dimensional subspaces through the axial separation attention mechanism. The orthogonality is guaranteed by the auxiliary orthogonal constraint loss function during the training process. The axial separation attention mechanism decouples the information flow into independent attention flows for the modulation period axis, the one-dimensional retention time axis, the two-dimensional retention time axis, and the mass spectrometry channel axis.
9. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 8, characterized in that, In the adaptive exponential decay frequency domain linear attention network model, the weight transfer between neurons along each axis, the inter-layer activation tensor storage, the intermediate buffer size for data loop iterations, and the memory allocation for each layer of the multi-scale pyramid are all dynamically controlled by the output of the learning rate adjustment function. The learning rate adjustment function calculates the comprehensive adjustment coefficient using the proportion of low-frequency energy after frequency domain sparsification, the current validation set decoupling error, and the historical iteration stability index as inputs. .
10. The method for detecting food flavoring components based on gas chromatography-mass spectrometry according to claim 9, characterized in that, The state memory trace decay mechanism uses an exponential decay function to decay and update the component feature memory weights of historical moments, so that when the model identifies weak signals at the current moment, it will give priority to referencing recent high-confidence feature memories. The decay coefficient is determined by experimental statistical analysis of the detection rate of weak signals under different signal-to-noise ratio conditions.