Python-based chromatographic retention ratio correction gaussian iterative peak deconvolution quantitation method

CN122944590APending Publication Date: 2026-10-20NANNING JIANXIE ENG INSPECTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611175396.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

现有方法固定采用单一峰形模型和多依赖人工设定边界参数和峰数,难以覆盖实际色谱峰形的多样变化,导致峰形匹配误差直接影响定量准确性,拟合迭代对初始峰位和峰宽参数的取值高度敏感,当初始值与真实值偏差较大时,迭代过程易发散或收敛至局部最优而非全局最优解,拆分结果不稳定,尤其在低浓度组分或严重拖尾峰场景下问题更为突出,缺乏自动化的最优边界搜索机制,定量结果的客观性和可重复性不足

Benefits of technology

该基于Python的色谱保留比值校正高斯迭代峰拆分定量方法,通过分出峰区间的多个内标化合物为参考点,计算各内标化合物的理论保留指数与实测保留时间的局部偏差,建立保留时间漂移与保留指数区间的分段映射关系,对各目标组分实施基于所在区段内相邻内标对保留偏差约束的分段线性插值补偿,使各组分获得独立于其他区段的差异化漂移补偿量,提高峰位定位精度,通过先验状态特征的注入,使强化学习的搜索起点和方向受到保留时间化学规律的约束,降低搜索空间的无序性,提高低丰度峰和拖尾峰场景下的边界定位可靠性,根据最优峰积分边界截取目标峰区间后,分别提取峰前沿斜率和后沿斜率,根据两者差异程度独立匹配前沿曲线形态和后沿曲线形态,组合为目标峰形模板,使拆分模板与真实峰形的一致性更强,非对称峰拆分定量误差降低,以匹配的目标峰形模板对目标峰区间执行重叠信号解卷积,将原始重叠信号分解为各单组分的独立峰形曲线后积分定量,实现重叠峰信号中各组分贡献的精准剥离。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure SMS_2
    Figure SMS_2
Patent Text Reader

Abstract

This invention relates to a Python-based Gaussian iterative peak splitting and quantification method for chromatographic retention ratio correction, belonging to the field of data analysis technology. It includes acquiring the retention time of the target chromatogram and internal standard compounds. The invention establishes a segmented mapping relationship between retention time drift and retention index intervals by using multiple internal standard compounds as reference points within the peak intervals. This allows each component to obtain a differentiated drift compensation amount independent of other segments, improving peak position accuracy. By injecting prior state features, the reliability of boundary positioning in low-abundance peaks and tailing peak scenarios is improved. After truncating the target peak interval according to the optimal peak integration boundary, the peak leading edge slope and trailing edge slope are extracted separately. The leading edge curve shape and trailing edge curve shape are independently matched according to their degree of difference. The overlapping signal is deconvolved on the target peak interval using the matched target peak shape template, decomposing the original overlapping signal into independent peak shape curves of each single component before integration and quantification, achieving precise separation of the contribution of each component in the overlapping peak signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a Python-based method for quantitative analysis of Gaussian peaks using chromatographic retention ratio correction. Background Technology

[0002] Chromatographic analysis is one of the most widely used separation and analysis techniques in the fields of chemistry, biology, and medicine. In quantitative chromatographic analysis, the peak area is directly proportional to the concentration of the analyte. Therefore, accurately obtaining the peak area of ​​each component is a prerequisite for accurate quantification. However, when the retention times of two or more components are similar, the chromatographic signals will overlap, forming composite peaks that cannot be directly distinguished by simple integration. The accuracy of the separation and quantification of overlapping peaks directly affects the reliability of the final quantitative result. Currently, the separation and quantification of overlapping chromatographic peaks mainly relies on iterative fitting methods based on fixed peak shape models, empirical cutting methods based on derivatives and vertical lines, and peak alignment methods based on global retention time correction. Existing correction methods usually perform a uniform translation or linear transformation on the entire chromatogram, assuming that all peaks have the same drift mode. By fitting single peaks at multiple concentrations of the target compound, a calibration curve of peak height → peak shape parameters is established. For overlapping peaks, the peak height value is first substituted into the calibration curve to obtain the initial constructed peak, and then the true single peak is approximated through iteration.

[0003] However, the existing methods described above still have the following shortcomings in practical applications: Existing methods rely on a fixed single peak shape model and manual setting of boundary parameters and peak number, making it difficult to cover the diverse variations in actual chromatographic peak shapes. This leads to peak shape matching errors that directly affect quantitative accuracy. The fitting iteration is highly sensitive to the values ​​of initial peak position and peak width parameters. When the initial values ​​deviate significantly from the true values, the iteration process is prone to diverging or converging to a local optimum rather than a global optimum. The splitting results are unstable, especially in scenarios with low concentration components or severe tailing peaks. Furthermore, the lack of an automated optimal boundary search mechanism results in insufficient objectivity and repeatability of quantitative results.

[0004] To address the aforementioned technical shortcomings, a solution is proposed. Summary of the Invention

[0005] This invention adopts the following technical solution: a Python-based Gaussian iterative peak separation and quantification method for chromatographic retention ratio correction, comprising the following steps: Step S1: Obtain the retention time of the target chromatogram and internal standard compound. Based on the internal standard compound in the peak range of the target component as the reference point, calculate the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, and establish a segmented mapping relationship between retention time drift and retention index range. Step S2: Based on the segmented mapping relationship, perform piecewise linear interpolation with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. Use the local drift compensation amount to correct the measured peak position and generate the corrected peak position information. Step S3: Encode the corrected peak position information into the prior state features of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output, and outputs the optimal peak integral boundary in the peak boundary space through an iterative optimization method guided by the reward function. Step S4: Extract the target peak interval using the optimal peak integral boundary, extract the peak leading edge slope and trailing edge slope of the target peak interval, match the corresponding peak leading edge curve shape and trailing edge curve shape according to the degree of difference between the peak leading edge slope and trailing edge slope, and combine the peak leading edge curve shape and trailing edge curve shape into a target peak shape template. Step S5: Perform overlapping signal deconvolution on the target peak interval using the matched peak shape template, decompose the target peak interval into the peak shape curves of each single component, and then integrate to calculate and output the peak area of ​​each component.

[0006] Furthermore, the retention times of the target chromatogram and internal standard compounds are obtained. Using the internal standard compounds within the target component's peak range as reference points, the local deviation between the theoretical retention index and the measured retention time of each internal standard compound is calculated. A segmented mapping relationship between retention time drift and retention index range is established. The specific process is as follows: Obtain the target chromatogram and the measured retention times of the internal standard compounds in the preset retention index library. The preset retention index library is constructed from homologs, and the carbon number of each homolog is distributed in an arithmetic progression, covering the peak range of the target component. Using the theoretical retention index of each internal standard compound as the x-axis and the deviation between the measured retention time and the theoretical retention time as the y-axis, a retention time drift curve is constructed. Piecewise linear fitting is performed on the drift curve to divide the retention index interval into several continuous local correction segments. For each local calibration segment, the theoretical retention index deviation and the measured retention time deviation of the internal standard compounds at both ends of the segment are extracted, and a local linear mapping function between the retention time drift and the retention index change within the segment is established. After performing local correction, a segmented mapping relationship set is formed that covers the complete peak interval of the target component. The segmented mapping relationship set contains the preserved exponential boundary of each segment and the corresponding local linear mapping function, which is used to perform differential drift compensation for the measured peak position of each target component.

[0007] Furthermore, based on the piecewise mapping relationship, piecewise linear interpolation is performed with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. The measured peak position is then corrected using the local drift compensation amount to generate the corrected peak position information. The specific process is as follows: Obtain the theoretical retention index of the target component, locate the local correction segment where the theoretical retention index is located based on the boundary of the retention index of each segment in the segmented mapping relationship set, and determine the boundary retention index at both ends of the segment and the corresponding measured retention time deviation. Constrained by the retention deviation of the internal standard compounds at both ends of the segment, the local drift compensation of the target component is calculated linearly according to the relative position of the theoretical retention index of the target component within the segment. Obtain the measured peak position of the target component, and subtract the local drift compensation amount from the measured peak position to obtain the corrected peak position; The measured peak position is replaced with the corrected peak position to generate corrected peak position information. The corrected peak position information is used to reduce the impact of retention time drift on peak position positioning accuracy.

[0008] Furthermore, the corrected peak position information is encoded as a priori state feature of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output. The specific process is as follows: The corrected peak position information, the current left boundary position of the peak, and the current right boundary position of the peak are combined into a state vector. The state vector is then normalized to generate the prior state features of the reinforcement learning prediction model. The prior state features are input into the prediction model, and the prediction model outputs boundary adjustment actions based on the current state. The boundary adjustment actions include expanding the left boundary to the left, contracting the left boundary to the right, contracting the right boundary to the left, expanding the right boundary to the right, and maintaining the boundary. Furthermore, the optimal peak integral boundary is output in the peak boundary space using an iterative optimization method guided by the reward function. The specific process is as follows: Taking the current peak boundary state as the root node of the search, the boundary adjustment action output by the online policy network is used as the direction of the expansion branch of the search. The prediction model expands the candidate boundary adjustment scheme in the peak boundary space in the form of search, and divides the search space into several candidate boundary combinations. For each candidate boundary combination in the search, the peak interval corresponding to the current candidate boundary is extracted, and the weighted sum of the symmetry score, signal-to-noise ratio score and peak width rationality score of the peak interval is calculated as the peak quality reward value of the candidate boundary combination. The difference between the peak quality reward value of the current node's candidate boundary and the peak quality reward value of the child node's candidate boundary is used as the backtracking update value. The cumulative reward estimate of each parent node is updated layer by layer from the current node upwards to balance the search depth and breadth. The search terminates when the search depth reaches the preset maximum depth, and the boundary combination corresponding to the leaf node with the highest cumulative reward estimate in the search is selected as the optimal peak integral boundary output.

[0009] Furthermore, the target peak interval is truncated using the optimal peak integral boundary, and the slopes of the peak leading edge and trailing edge of the target peak interval are extracted. Based on the degree of difference between the slopes of the peak leading edge and trailing edge, the corresponding peak leading edge curve shapes and trailing edge curve shapes are matched respectively. The peak leading edge curve shapes and trailing edge curve shapes are combined into a target peak shape template. The specific process is as follows: Using the optimal peak integration boundary as the intercept range, the signal intensity sequence of the target peak interval is extracted from the original chromatographic signal. The signal intensity sequence is divided into the peak leading edge region and the trailing edge region according to the peak position. The peak leading edge region is the rising segment signal on the left side of the peak position, and the trailing edge region is the falling segment signal on the right side of the peak position. Linear regression fitting is performed on the signal points in the leading edge region to obtain the leading edge slope. The leading edge slope is used to analyze the rising rate of the leading edge. Linear regression fitting is performed on the signal points in the trailing edge region to obtain the trailing edge slope. The trailing edge slope is used to analyze the falling rate of the trailing edge. Calculate the slope difference between the peak leading edge slope and the trailing edge slope. When the slope difference is less than the preset symmetry threshold, the target peak shape is determined to be a symmetrical peak, and a Gaussian function is selected as the unified curve shape of the peak leading edge and trailing edge. When the slope difference is greater than or equal to the preset symmetry threshold, the peak leading edge curve shape and the trailing edge curve shape are matched respectively: If the absolute value of the slope of the leading edge is greater than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a steeply rising curve shape, and the trailing edge matches a gently falling curve shape. If the absolute value of the slope of the leading edge is less than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a gently rising curve shape, and the trailing edge matches a steeply falling curve shape. The matching peak leading edge curve shape and trailing edge curve shape are combined to generate a target peak shape template composed of the leading edge curve shape and trailing edge curve shape. The target peak shape template is a skewed Gaussian function, and different width parameters are used for the leading edge side and the trailing edge side.

[0010] Furthermore, the overlapping signals in the target peak region are deconvolved using the matched peak shape template. The target peak region is then decomposed into the peak shape curves of each single component, and the integral is calculated to output the peak area of ​​each component. The specific process is as follows: Obtain the target peak shape template corresponding to each target component within the target peak interval. The target peak shape template includes the leading edge width parameter and the trailing edge width parameter of each component. Using the original chromatographic signal within the target peak range as input, and taking the minimum fitting residual between the superimposed peak shape templates of each component and the original signal as the optimization objective, an objective function is constructed. Using the peak area coefficient of each component as the variable to be optimized, the objective function is solved by non-negative least squares method, so that the peak area coefficient of each component approaches the optimal solution under non-negative constraints, and the optimal estimated value of the peak area coefficient of each component is obtained. The obtained optimal peak area coefficient is multiplied with the peak shape template of the corresponding component to reconstruct the peak shape curve of each single component. The reconstructed peak shape curve of each single component is output as the deconvolution result of the overlapping signal of the target peak interval. The peak shape curves of each individual component are numerically integrated from the peak start point to the peak end point. The area value of each curve in the integration interval is calculated as the peak area of ​​each component, and the peak area of ​​each component is output.

[0011] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: This Python-based Gaussian iterative peak splitting and quantification method for chromatographic retention ratio correction uses multiple internal standard compounds within the peak interval as reference points. It calculates the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, establishing a piecewise mapping relationship between retention time drift and retention index intervals. Piecewise linear interpolation compensation is then applied to each target component based on the retention deviation constraints imposed by adjacent internal standards within its respective interval. This allows each component to obtain a differentiated drift compensation amount independent of other intervals, improving peak position accuracy. Furthermore, by injecting prior state features, the search starting point and direction of reinforcement learning are constrained by the chemical laws governing retention time. The method reduces the disorder of the search space and improves the reliability of boundary localization in low-abundance peaks and trailing peaks. After truncating the target peak interval according to the optimal peak integral boundary, the slope of the peak leading edge and the slope of the trailing edge are extracted respectively. The shape of the leading edge curve and the shape of the trailing edge curve are independently matched according to the degree of difference between the two and combined into a target peak shape template. This makes the consistency between the split template and the real peak shape stronger and reduces the quantitative error of asymmetric peak splitting. The overlapping signal is deconvolved on the target peak interval using the matched target peak shape template. The original overlapping signal is decomposed into independent peak shape curves of each single component and then integrated for quantitative analysis, so as to achieve accurate separation of the contribution of each component in the overlapping peak signal. Attached Figure Description

[0012] Figure 1 A schematic diagram of the overall structure of the method steps of the present invention is shown; Figure 2 A schematic diagram of the overall structure of the retention ratio correction flowchart of the present invention is shown. Detailed Implementation

[0013] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0014] Example 1: like Figure 1-2 As shown, the Python-based Gaussian iterative peak separation and quantification method for chromatographic retention ratio correction includes the following steps: Step S1: Obtain the retention time of the target chromatogram and internal standard compound. Based on the internal standard compound in the peak range of the target component as the reference point, calculate the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, and establish a segmented mapping relationship between retention time drift and retention index range. Step S2: Based on the segmented mapping relationship, perform piecewise linear interpolation with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. Use the local drift compensation amount to correct the measured peak position and generate the corrected peak position information. Step S3: Encode the corrected peak position information into the prior state features of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output, and outputs the optimal peak integral boundary in the peak boundary space through an iterative optimization method guided by the reward function. Step S4: Extract the target peak interval using the optimal peak integral boundary, extract the peak leading edge slope and trailing edge slope of the target peak interval, match the corresponding peak leading edge curve shape and trailing edge curve shape according to the degree of difference between the peak leading edge slope and trailing edge slope, and combine the peak leading edge curve shape and trailing edge curve shape into a target peak shape template. Step S5: Perform overlapping signal deconvolution on the target peak interval using the matched peak shape template, decompose the target peak interval into the peak shape curves of each single component, and then integrate to calculate and output the peak area of ​​each component.

[0015] Obtain the target chromatogram and the retention times of the internal standard compound. Using the internal standard compound in the peak range of the target component as a reference point, calculate the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, and establish a piecewise mapping relationship between retention time drift and retention index range. The specific process is as follows: Obtain the target chromatogram and the measured retention times of the internal standard compounds in the preset retention index library. The preset retention index library is constructed from homologs, and the carbon number of each homolog is distributed in an arithmetic progression, covering the peak range of the target component. Using the theoretical retention index of each internal standard compound as the x-axis and the deviation between the measured retention time and the theoretical retention time as the y-axis, a retention time drift curve is constructed. Piecewise linear fitting is performed on the drift curve to divide the retention index interval into several continuous local correction segments. For each local calibration segment, the theoretical retention index deviation and the measured retention time deviation of the internal standard compounds at both ends of the segment are extracted, and a local linear mapping function between the retention time drift and the change in retention index within the segment is established. ; These are the retention indices of the internal standard compounds at the left and right ends of the segment, respectively. , respectively, are the measured retention time deviations of the internal standard compounds at the left and right ends, and n is the index of the local correction section; After performing local correction, a segmented mapping relationship set is formed that covers the complete peak interval of the target component. The segmented mapping relationship set contains the preserved exponential boundary of each segment and the corresponding local linear mapping function, which is used to perform differential drift compensation for the measured peak position of each target component.

[0016] The specific implementation steps are as follows: A retention time drift curve is constructed using the theoretical retention index of each internal standard compound as the x-axis and the deviation between the measured retention time and the theoretical retention time as the y-axis. The theoretical retention time of each internal standard compound is predetermined by the retention index system and read from the configuration file during system operation. Piecewise linear fitting is performed on the drift curve, specifically using an adaptive piecewise fitting algorithm: using the deviation points of each internal standard compound as control points, the linear interpolation between two adjacent internal standard points is used as the correction function for that segment. The goal of piecewise linear fitting is to divide the retention index interval into several continuous local correction segments, with the drift amount within each segment changing approximately linearly. In this embodiment, the adaptive piecewise fitting algorithm includes two sub-steps: segment division and linear fitting.

[0017] Based on the piecewise mapping relationship, piecewise linear interpolation is performed with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. The measured peak position is then corrected using the local drift compensation amount to generate the corrected peak position information. The specific process is as follows: Obtain the theoretical retention index of the target component, locate the local correction segment where the theoretical retention index is located based on the boundary of the retention index of each segment in the segmented mapping relationship set, and determine the boundary retention index at both ends of the segment and the corresponding measured retention time deviation. Constrained by the retention deviation of the internal standard compounds at both ends of the segment, the local drift compensation of the target component is calculated linearly according to the relative position of the theoretical retention index of the target component within the segment. Obtain the measured peak position of the target component, and subtract the local drift compensation amount from the measured peak position to obtain the corrected peak position; The measured peak position is replaced with the corrected peak position to generate corrected peak position information. The corrected peak position information is used to reduce the impact of retention time drift on peak position positioning accuracy.

[0018] The corrected peak position information is encoded as the prior state feature of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output. The specific process is as follows: The corrected peak position information, the current left boundary position of the peak, and the current right boundary position of the peak are combined into a state vector. The state vector is then normalized to generate the prior state features of the reinforcement learning prediction model. The prior state features are input into the prediction model, and the prediction model outputs boundary adjustment actions based on the current state. The boundary adjustment actions include expanding the left boundary to the left, contracting the left boundary to the right, contracting the right boundary to the left, expanding the right boundary to the right, and maintaining the boundary. The optimal peak integral boundary is output in the peak boundary space using an iterative optimization method guided by the reward function. The specific process is as follows: Taking the current peak boundary state as the root node of the search, the boundary adjustment action output by the online policy network is used as the direction of the expansion branch of the search. The prediction model expands the candidate boundary adjustment scheme in the peak boundary space in the form of search, and divides the search space into several candidate boundary combinations. For each candidate boundary combination in the search, the peak interval corresponding to the current candidate boundary is extracted, and the weighted sum of the symmetry score, signal-to-noise ratio score, and peak width reasonableness score of the peak interval is calculated as the peak quality reward value of the candidate boundary combination: For peak symmetry value, The signal-to-noise ratio (SNR) value. The peak width is a reasonable value. Peak symmetry value: The selected candidate peak interval is flipped left and right around the peak position, and the percentage of the overlapping area between the original signal and the flipped signal is calculated. Signal-to-noise ratio (SNR): The maximum signal value within the current candidate integration boundary is extracted as the peak signal intensity, and the standard deviation of the signal in the adjacent region outside the integration boundary is extracted as the noise level. The ratio of the peak signal intensity to the noise level is used as the SNR value. Peak width reasonableness value: The deviation rate between the peak width of the candidate peak interval and the theoretical peak width is calculated by comparing the peak width of the candidate peak interval with the reference value of the typical peak width of the same compound under the same chromatographic conditions. The difference between the peak quality reward value of the current node's candidate boundary and the peak quality reward value of the child node's candidate boundary is used as the backtracking update value. The cumulative reward estimate of each parent node is updated layer by layer from the current node upwards to balance the search depth and breadth. The search terminates when the search depth reaches the preset maximum depth, and the boundary combination corresponding to the leaf node with the highest cumulative reward estimate in the search is selected as the optimal peak integral boundary output.

[0019] The specific steps for building the prediction model are as follows: obtain historical chromatographic peak splitting data with different resolutions, signal-to-noise ratios, and peak tailing degrees as training samples. The training samples contain the corrected peak position information of each chromatographic peak and the corresponding optimal peak integral boundary label. Divide multiple training samples into training set, validation set, and test set according to a preset ratio. Build a peak boundary search model based on the near-end strategy optimization algorithm. Initialize the policy network and value network parameters of the peak boundary search model, and set the shearing coefficient and generalized advantage estimation parameters of the proximal policy optimization algorithm; Using the corrected peak position information encoding as the prior state feature, it is concatenated with the current left and right boundary positions of the peak to form the input state vector. The probability distribution of the boundary adjustment action is output through the policy network, and the state value estimate of the current state is output through the value network. The near-end policy optimization shear loss is used as the optimization objective of the policy network, the mean square error is used as the loss function of the value network, and the Adam optimizer is used to update the network parameters. During training, the peak boundary search model interacts with the environment to collect trajectory samples of state, action, reward and next state, and stores them in the experience replay pool. After collecting a preset number of samples, a small batch of samples is randomly sampled from the experience replay pool for multiple rounds of updates. When the average peak quality reward value on the validation set does not increase for a preset number of consecutive rounds, training stops and the trained peak boundary search prediction model is saved. S305′ Deploy the trained peak boundary search model in the peak splitting quantitative system. With the current peak boundary state as input, the model outputs the probability distribution of boundary adjustment actions through forward inference, samples and executes the optimal action, and drives the Monte Carlo tree search to output the optimal peak integral boundary.

[0020] The target peak interval is truncated using the optimal peak integral boundary. The slopes of the peak leading edge and trailing edge of the target peak interval are extracted. Based on the degree of difference between the slopes of the peak leading edge and trailing edge, the corresponding peak leading edge curve shapes and trailing edge curve shapes are matched respectively. The peak leading edge curve shapes and trailing edge curve shapes are combined into a target peak shape template. The specific process is as follows: Using the optimal peak integration boundary as the intercept range, the signal intensity sequence of the target peak interval is extracted from the original chromatographic signal. The signal intensity sequence is divided into the peak leading edge region and the trailing edge region according to the peak position. The peak leading edge region is the rising segment signal on the left side of the peak position, and the trailing edge region is the falling segment signal on the right side of the peak position. Linear regression fitting is performed on the signal points in the leading edge region to obtain the leading edge slope. The leading edge slope is used to analyze the rising rate of the leading edge. Linear regression fitting is performed on the signal points in the trailing edge region to obtain the trailing edge slope. The trailing edge slope is used to analyze the falling rate of the trailing edge. Calculate the slope difference between the peak leading edge slope and the trailing edge slope. When the slope difference is less than the preset symmetry threshold, the target peak shape is determined to be a symmetrical peak, and a Gaussian function is selected as the unified curve shape of the peak leading edge and trailing edge. When the slope difference is greater than or equal to the preset symmetry threshold, the peak leading edge curve shape and the trailing edge curve shape are matched respectively: If the absolute value of the slope of the leading edge is greater than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a steeply rising curve shape, and the trailing edge matches a gently falling curve shape. If the absolute value of the slope of the leading edge is less than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a gently rising curve shape, and the trailing edge matches a steeply falling curve shape. The matching peak leading edge curve shape and trailing edge curve shape are combined to generate a target peak shape template composed of the leading edge curve shape and trailing edge curve shape. The target peak shape template is a skewed Gaussian function, and different width parameters are used on the leading edge side and the trailing edge side respectively. The leading and trailing edges use different width parameters, specifically: For the peak height, Peak position, For the front side width parameter, The trailing edge width parameter is used when the peak leading edge is steep. When taking a smaller value and having a gentle trailing edge Take the larger value, and vice versa.

[0021] The overlapping signal is deconvolved on the target peak region using a matched peak shape template. The target peak region is then decomposed into the peak shape curves of each single component, and the integral is calculated to output the peak area of ​​each component. The specific process is as follows: Obtain the target peak shape template corresponding to each target component within the target peak interval. The target peak shape template includes the leading edge width parameter and the trailing edge width parameter of each component. Using the original chromatographic signal within the target peak range as input, and minimizing the fitting residual between the superimposed peak shape templates of each component and the original signal as the optimization objective, the objective function is constructed as follows: This is the original chromatographic signal intensity sequence. The total number of components within the target peak range. Let be the peak area coefficient of the i-th component. Let be the normalized amplitude of the peak template of the i-th component at time t, where i is the component index; Using the peak area coefficient of each component as the variable to be optimized, the objective function is solved by non-negative least squares method, so that the peak area coefficient of each component approaches the optimal solution under non-negative constraints, and the optimal estimated value of the peak area coefficient of each component is obtained. The obtained optimal peak area coefficient is multiplied with the peak shape template of the corresponding component to reconstruct the peak shape curve of each single component. The reconstructed peak shape curve of each single component is output as the deconvolution result of the overlapping signal of the target peak interval. The peak shape curves of each individual component are numerically integrated from the peak start point to the peak end point. The area value of each curve in the integration interval is calculated as the peak area of ​​each component, and the peak area of ​​each component is output.

[0022] The size of the interval and threshold is set to facilitate comparison. The size of the threshold depends on the amount of sample data and the number of bases set by those skilled in the art for each set of sample data; as long as it does not affect the ratio between the parameter and the quantized value.

[0023] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. In the two embodiments provided in this application, it should be understood that the disclosed apparatus and system can be implemented in other ways; for example, the apparatus embodiments described above are merely illustrative, and the division of modules is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed; furthermore, the coupling or direct coupling or communication connection between the shown or discussed mutuals can be through some interfaces, and the indirect coupling or communication connection between the apparatus or modules can be electrical, mechanical or other forms. The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A Python-based method for chromatographic retention ratio correction and Gaussian iterative peak separation and quantification, characterized in that... Includes the following steps: Step S1: Obtain the retention time of the target chromatogram and internal standard compound. Based on the internal standard compound in the peak range of the target component as the reference point, calculate the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, and establish a segmented mapping relationship between retention time drift and retention index range. Step S2: Based on the segmented mapping relationship, perform piecewise linear interpolation with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. Use the local drift compensation amount to correct the measured peak position and generate the corrected peak position information. Step S3: Encode the corrected peak position information into the prior state features of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output, and outputs the optimal peak integral boundary in the peak boundary space through an iterative optimization method guided by the reward function. Step S4: Extract the target peak interval using the optimal peak integral boundary, extract the peak leading edge slope and trailing edge slope of the target peak interval, match the corresponding peak leading edge curve shape and trailing edge curve shape according to the degree of difference between the peak leading edge slope and trailing edge slope, and combine the peak leading edge curve shape and trailing edge curve shape into a target peak shape template. Step S5: Perform overlapping signal deconvolution on the target peak interval using the matched peak shape template, decompose the target peak interval into the peak shape curves of each single component, and then integrate to calculate and output the peak area of ​​each component.

2. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, Obtain the target chromatogram and the retention times of the internal standard compound. Using the internal standard compound in the peak range of the target component as a reference point, calculate the local deviation between the theoretical retention index and the measured retention time of each internal standard compound, and establish a piecewise mapping relationship between retention time drift and retention index range. The specific process is as follows: Obtain the target chromatogram and the measured retention times of the internal standard compounds in the preset retention index library. The preset retention index library is constructed from homologs, and the carbon number of each homolog is distributed in an arithmetic progression, covering the peak range of the target component. Using the theoretical retention index of each internal standard compound as the x-axis and the deviation between the measured retention time and the theoretical retention time as the y-axis, a retention time drift curve is constructed. Piecewise linear fitting is performed on the drift curve to divide the retention index interval into several continuous local correction segments. For each local calibration segment, the theoretical retention index deviation and the measured retention time deviation of the internal standard compounds at both ends of the segment are extracted, and a local linear mapping function between the retention time drift and the retention index change within the segment is established. After performing local correction, a segmented mapping relationship set is formed that covers the complete peak interval of the target component. The segmented mapping relationship set contains the preserved exponential boundary of each segment and the corresponding local linear mapping function, which is used to perform differential drift compensation for the measured peak position of each target component.

3. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, Based on the piecewise mapping relationship, piecewise linear interpolation is performed with the retention deviation of adjacent internal standard pairs within each target component segment as a constraint to generate the local drift compensation amount for each target component. The measured peak position is then corrected using the local drift compensation amount to generate the corrected peak position information. The specific process is as follows: Obtain the theoretical retention index of the target component, locate the local correction segment where the theoretical retention index is located based on the boundary of the retention index of each segment in the segmented mapping relationship set, and determine the boundary retention index at both ends of the segment and the corresponding measured retention time deviation. Constrained by the retention deviation of the internal standard compounds at both ends of the segment, the local drift compensation of the target component is calculated linearly according to the relative position of the theoretical retention index of the target component within the segment. Obtain the measured peak position of the target component, and subtract the local drift compensation amount from the measured peak position to obtain the corrected peak position; The measured peak position is replaced with the corrected peak position to generate corrected peak position information. The corrected peak position information is used to reduce the impact of retention time drift on peak position positioning accuracy.

4. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, The corrected peak position information is encoded as the prior state feature of the prediction model. The prediction model takes the current peak boundary state as input and the boundary adjustment action as output. The specific process is as follows: The corrected peak position information, the current left boundary position of the peak, and the current right boundary position of the peak are combined into a state vector. The state vector is then normalized to generate the prior state features of the reinforcement learning prediction model. The prior state features are input into the prediction model, and the prediction model outputs boundary adjustment actions based on the current state. The boundary adjustment actions include expanding the left boundary to the left, contracting the left boundary to the right, contracting the right boundary to the left, expanding the right boundary to the right, and maintaining the boundary.

5. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, The optimal peak integral boundary is output in the peak boundary space using an iterative optimization method guided by the reward function. The specific process is as follows: Taking the current peak boundary state as the root node of the search, the boundary adjustment action output by the online policy network is used as the direction of the expansion branch of the search. The prediction model expands the candidate boundary adjustment scheme in the peak boundary space in the form of search, and divides the search space into several candidate boundary combinations. For each candidate boundary combination in the search, the peak interval corresponding to the current candidate boundary is extracted, and the weighted sum of the symmetry score, signal-to-noise ratio score and peak width rationality score of the peak interval is calculated as the peak quality reward value of the candidate boundary combination. The difference between the peak quality reward value of the current node's candidate boundary and the peak quality reward value of the child node's candidate boundary is used as the backtracking update value. The cumulative reward estimate of each parent node is updated layer by layer from the current node upwards to balance the search depth and breadth. The search terminates when the search depth reaches the preset maximum depth, and the boundary combination corresponding to the leaf node with the highest cumulative reward estimate in the search is selected as the optimal peak integral boundary output.

6. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, The target peak interval is truncated using the optimal peak integral boundary. The slopes of the peak leading edge and trailing edge of the target peak interval are extracted. Based on the degree of difference between the slopes of the peak leading edge and trailing edge, the corresponding peak leading edge curve shapes and trailing edge curve shapes are matched respectively. The peak leading edge curve shapes and trailing edge curve shapes are combined into a target peak shape template. The specific process is as follows: Using the optimal peak integration boundary as the intercept range, the signal intensity sequence of the target peak interval is extracted from the original chromatographic signal. The signal intensity sequence is divided into the peak leading edge region and the trailing edge region according to the peak position. The peak leading edge region is the rising segment signal on the left side of the peak position, and the trailing edge region is the falling segment signal on the right side of the peak position. Linear regression fitting is performed on the signal points in the leading edge region to obtain the leading edge slope. The leading edge slope is used to analyze the rising rate of the leading edge. Linear regression fitting is performed on the signal points in the trailing edge region to obtain the trailing edge slope. The trailing edge slope is used to analyze the falling rate of the trailing edge. Calculate the slope difference between the peak leading edge slope and the trailing edge slope. When the slope difference is less than the preset symmetry threshold, the target peak shape is determined to be a symmetrical peak, and a Gaussian function is selected as the unified curve shape of the peak leading edge and trailing edge. When the slope difference is greater than or equal to the preset symmetry threshold, the peak leading edge curve shape and the trailing edge curve shape are matched respectively: If the absolute value of the slope of the leading edge is greater than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a steeply rising curve shape, and the trailing edge matches a gently falling curve shape. If the absolute value of the slope of the leading edge is less than the absolute value of the slope of the trailing edge, then the leading edge of the peak matches a gently rising curve shape, and the trailing edge matches a steeply falling curve shape. The matching peak leading edge curve shape and trailing edge curve shape are combined to generate a target peak shape template composed of the leading edge curve shape and trailing edge curve shape. The target peak shape template is a skewed Gaussian function, and different width parameters are used for the leading edge side and the trailing edge side.

7. The chromatographic retention ratio correction Gaussian iterative peak separation and quantification method based on Python according to claim 1, characterized in that, The overlapping signal is deconvolved on the target peak region using the matched target peak template. The target peak region is then decomposed into the peak curves of each single component, and the integral is calculated to output the peak area of ​​each component. The specific process is as follows: Obtain the target peak shape template corresponding to each target component within the target peak interval. The target peak shape template includes the leading edge width parameter and the trailing edge width parameter of each component. Using the original chromatographic signal within the target peak range as input, and taking the minimum fitting residual between the superimposed peak shape templates of each component and the original signal as the optimization objective, an objective function is constructed. Using the peak area coefficient of each component as the variable to be optimized, the objective function is solved by non-negative least squares method, so that the peak area coefficient of each component approaches the optimal solution under non-negative constraints, and the optimal estimated value of the peak area coefficient of each component is obtained. The obtained optimal peak area coefficient is multiplied with the peak shape template of the corresponding component to reconstruct the peak shape curve of each single component. The reconstructed peak shape curve of each single component is output as the deconvolution result of the overlapping signal of the target peak interval. The peak shape curves of each individual component are numerically integrated from the peak start point to the peak end point. The area value of each curve in the integration interval is calculated as the peak area of ​​each component, and the peak area of ​​each component is output.