Gas chromatograph peak-splitting method and system based on wavelet transform and multi-derivative characteristics

By using wavelet transform and multi-derivative features, baseline drift interference was eliminated, the onset point, peak apex and peak end point of chromatographic peaks were accurately identified, the separation problem of complex peak shapes was solved, and the analytical accuracy of chromatographic data was improved.

CN122173889APending Publication Date: 2026-06-09BEIJING HENGHE INFORMATION & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HENGHE INFORMATION & TECH CO LTD
Filing Date
2026-02-24
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, peak identification methods based on signal intensity thresholds cannot accurately identify the boundary positions of complex peaks when faced with factors such as column aging, temperature fluctuations, and unstable carrier gas flow rates, resulting in poor accuracy of chromatographic data analysis.

Method used

The wavelet transform and multi-derivative feature method is used to eliminate baseline drift through wavelet decomposition, calculate first and second derivative data, identify the peak initiation point, peak apex and peak end point of chromatographic peaks, and segment them using the vertical peak segmentation method.

Benefits of technology

It achieves accurate separation of complex peak shapes, improves the analytical precision of chromatographic data, eliminates the interference of baseline drift on peak identification, and ensures accurate positioning and segmentation of chromatographic peaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173889A_ABST
    Figure CN122173889A_ABST
Patent Text Reader

Abstract

The application provides a gas chromatograph peak separation method and system based on wavelet transform and multi-derivative characteristics, and relates to the technical field of gas chromatography analysis. The technical scheme provided by the application realizes the automatic identification of the peak starting point, the peak top point and the peak ending point by comparing the numerical relationship between the first derivative data, the second derivative data and the determination threshold value in the process of traversing the time sequence of the target chromatographic data. Based on the accurate identification of the peak starting point, the peak top point and the peak ending point, the vertical line peak separation method is used to separate the chromatographic peaks, the accurate separation of complex peak types such as overlapping peaks and shoulder peaks is realized, and the analysis accuracy of the chromatographic data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas chromatography analysis technology, specifically to a gas chromatograph peak separation method and system based on wavelet transform and multi-derivative characteristics. Background Technology

[0002] Gas chromatography separates different components in a mixture over time using a chromatographic column. Each component generates a corresponding signal response at the detector, forming a chromatographic peak. These peaks appear as a series of curves showing the intensity changing over time. Peak fractionation refers to the process of identifying the start, maximum, and end positions of each chromatographic peak from a continuous chromatographic signal and accurately separating adjacent peaks. The results of peak fractionation directly affect the accuracy of subsequent qualitative and quantitative analysis of the components.

[0003] Existing technologies often employ peak identification methods based on signal intensity thresholds for peak segmentation. This method determines the start and end positions of chromatographic peaks by setting fixed intensity thresholds. A peak is identified when the signal intensity exceeds the threshold, and a peak is identified when the signal intensity falls below the threshold. The position of the peak's maximum value is designated as the peak apex. However, in actual analysis, factors such as column aging, temperature fluctuations, and unstable carrier gas flow rates cause varying degrees of baseline drift and fluctuations. Especially when adjacent peaks overlap or form shoulder peaks, the intensity changes between peaks are not significant. Intensity thresholds alone cannot accurately identify peak boundaries, increasing the difficulty of accurately separating complex peak shapes and resulting in poor accuracy in chromatographic data analysis. Summary of the Invention

[0004] This application provides a gas chromatograph peak separation method and system based on wavelet transform and multi-derivative features, which can achieve accurate separation of complex peak shapes, thereby improving the analytical accuracy of chromatographic data.

[0005] In a first aspect, this application provides a gas chromatograph peak separation method based on wavelet transform and multi-derivative features, the method comprising: The raw chromatographic data collected by the gas chromatograph is acquired, and wavelet decomposition is performed on the raw chromatographic data. The wavelet approximation coefficients after decomposition are set to zero and reconstructed to obtain the target chromatographic data after baseline correction. Calculate the first and second derivatives of the target chromatographic data respectively; Traverse the event sequence of the target chromatographic data, and determine the starting point, peak apex, and peak end of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first-order derivative data and the second-order derivative data relative to the judgment threshold. The chromatographic peaks are divided using the vertical peak separation method based on the peak initiation point, peak apex point, and peak end point.

[0006] By employing the above technical solution, the approximation coefficients in the original chromatographic data are set to zero and reconstructed, eliminating the interference of baseline drift on chromatographic peak identification and obtaining baseline-corrected target chromatographic data. By calculating the first and second derivatives of the target chromatographic data, the rise, fall, and curvature changes of the chromatographic peaks are transformed into extreme values ​​and zero points in the derivative domain, making the inflection points and peak apexes of the chromatographic peaks significant feature points on the derivative curve. During the traversal of the time series of the target chromatographic data, the automatic identification of the peak initiation point, peak apex, and peak endpoint is achieved by comparing the numerical relationship between the first and second derivative data and the judgment threshold. Based on the accurately identified peak initiation point, peak apex, and peak endpoint, the vertical peak segmentation method is used to segment the chromatographic peaks, achieving accurate separation of complex peak shapes such as overlapping peaks and shoulder peaks, thus improving the analytical accuracy of the chromatographic data.

[0007] Secondly, this application provides a gas chromatograph peak separation system based on wavelet transform and multi-derivative features, the system comprising: The processing module is used to acquire the raw chromatographic data collected by the gas chromatograph, perform wavelet decomposition on the raw chromatographic data, set the wavelet approximation coefficients after decomposition to zero and reconstruct them to obtain the target chromatographic data after baseline correction. The calculation module is used to calculate the first and second derivative data of the target chromatographic data, respectively. The identification module is used to traverse the event sequence of the target chromatographic data and determine the starting point, peak apex, and peak end of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first-order derivative data and the second-order derivative data and the judgment threshold. The segmentation module is used to segment chromatographic peaks using the vertical peak segmentation method based on the peak start point, peak apex, and peak end point.

[0008] Thirdly, this application provides a computer storage medium that stores multiple instructions adapted for loading by a processor and executing any of the methods described above.

[0009] Fourthly, this application provides an electronic device including a processor, a memory, and a transceiver. The memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform any of the methods described above.

[0010] In summary, the beneficial effects of the technical solution of this application include: By employing the above technical solution, the approximation coefficients in the original chromatographic data are set to zero and reconstructed, eliminating the interference of baseline drift on chromatographic peak identification and obtaining baseline-corrected target chromatographic data. By calculating the first and second derivatives of the target chromatographic data, the rise, fall, and curvature changes of the chromatographic peaks are transformed into extreme values ​​and zero points in the derivative domain, making the inflection points and peak apexes of the chromatographic peaks significant feature points on the derivative curve. During the traversal of the time series of the target chromatographic data, the automatic identification of the peak initiation point, peak apex, and peak endpoint is achieved by comparing the numerical relationship between the first and second derivative data and the judgment threshold. Based on the accurately identified peak initiation point, peak apex, and peak endpoint, the vertical peak segmentation method is used to segment the chromatographic peaks, achieving accurate separation of complex peak shapes such as overlapping peaks and shoulder peaks, thus improving the analytical accuracy of the chromatographic data. Attached Figure Description

[0011] Figure 1 This is a schematic flowchart of a gas chromatography peak separation method based on wavelet transform and multi-derivative features provided in an embodiment of this application; Figure 2 This is a schematic diagram of an exemplary chromatographic peak type and its first and second derivatives provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a gas chromatograph peak separation system based on wavelet transform and multi-derivative features provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0012] Explanation of reference numerals in the attached figures: 400, electronic device; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory. Detailed Implementation

[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0014] In the description of the embodiments of this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.

[0015] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0016] Please see Figure 1 This document presents a flowchart illustrating a gas chromatography peak-splitting method based on wavelet transform and multi-derivative features, as provided in this application embodiment. This method can be implemented using a computer program, a microcontroller, or run on a von Neumann-based gas chromatography peak-splitting system. The computer program can be integrated into the application or run as a standalone utility application. The specific steps of the gas chromatography peak-splitting method based on wavelet transform and multi-derivative features are described in detail below.

[0017] S101: Acquire the raw chromatographic data collected by the gas chromatograph, perform wavelet decomposition on the raw chromatographic data, set the wavelet approximation coefficients after decomposition to zero and reconstruct them to obtain the target chromatographic data after baseline correction. Raw chromatographic data refers to the unprocessed sequence data of the detector response signal, directly acquired by the gas chromatograph during analysis, showing its change over time. It is typically expressed as voltage or current, representing the response intensity of the analyte at different retention times. Wavelet decomposition is a mathematical process that uses wavelet transform theory to decompose the raw signal into approximate and detail components at different frequency scales. Wavelet approximation coefficients represent the low-frequency portion of the signal, reflecting slow changes such as baseline drift, while wavelet detail coefficients represent the high-frequency portion, containing information about rapid changes such as chromatographic peaks. Baseline correction eliminates or reduces deviations from the zero-point baseline in the chromatogram caused by instrument drift, column bleed, temperature variations, etc., ensuring accurate measurement of chromatographic peaks on a unified benchmark. Target chromatographic data refers to the chromatographic signal data after baseline correction. This data eliminates low-frequency drift interference and more accurately reflects the true shape and intensity information of each chromatographic peak. Wavelet reconstruction is the process of recovering the time-domain signal using modified wavelet coefficients through inverse wavelet transform. Selectively retaining or removing coefficients at specific levels can achieve signal filtering or feature extraction.

[0018] Specifically, the system first acquires the complete raw chromatographic data sequence from the gas chromatograph's data acquisition module. This data includes time axis information and corresponding detector response values. Then, a suitable wavelet basis function (such as the Daubechies wavelet or Symlet wavelet) is selected to perform multi-level wavelet decomposition on the raw data. The number of decomposition levels is adaptively determined based on the data length. The decomposition process progressively breaks down the signal into low-frequency approximation coefficients and high-frequency detail coefficients. After obtaining the wavelet coefficients at each level, the system identifies the highest-level approximation coefficients representing baseline drift (these coefficients reflect the slowest trend in signal change) and sets all of these approximation coefficients to zero to eliminate baseline effects. All detail coefficients and lower-level approximation coefficients are retained, and these modified coefficients are used to perform inverse wavelet transform to reconstruct the signal. The reconstructed signal is the target chromatographic data with an effectively corrected baseline. The baseline of this data approaches zero, providing an accurate data foundation for subsequent peak identification and quantitative analysis.

[0019] In some embodiments, wavelet decomposition and baseline correction of the original chromatographic data can be achieved in various ways: Optionally, a fixed-level decomposition scheme is adopted. First, the number of wavelet decomposition levels (e.g., 4 or 5 levels) is preset according to empirical values ​​or standard specifications. Then, the db4 wavelet basis function is used to perform multi-level decomposition on the original chromatographic data. During the decomposition process, the approximation coefficients and detail coefficients are calculated and stored layer by layer. Next, all approximation coefficients of the highest level (the Nth level) are set to zero, while keeping the coefficients of all other levels unchanged. Finally, the modified complete coefficient set is used to perform inverse wavelet transform, and the target chromatogram after baseline correction is finally obtained through layer-by-layer reconstruction. Data; Optionally, an adaptive layer selection scheme is adopted. First, the length of the original chromatographic data is calculated, and the theoretical maximum number of decomposition layers is determined accordingly (usually log2(data length) rounded down). Then, each possible decomposition layer is traversed within the range of 1 to the maximum number of layers. For each layer, a complete process of wavelet decomposition, zeroing the coefficients of the highest layer, and reconstruction is performed. The information entropy difference or correlation coefficient between the reconstructed signal and the original signal is calculated as an evaluation index. The layer that maximizes the rate of change of entropy or has the best correlation is selected as the optimal decomposition layer. Finally, the decomposition-zeroing-reconstruction process is re-executed according to the optimal layer to obtain the final target chromatographic data. It is understood that other wavelet transform methods or baseline correction algorithms can also be used to preprocess the original chromatographic data, which is not limited here.

[0020] S102: Calculate the first and second derivative data of the target chromatographic data respectively; The first derivative data refers to the first derivative of the target chromatographic data with respect to time, used to represent the rate or slope of change of the chromatographic signal at each moment. Positive values ​​indicate a rising signal, negative values ​​indicate a falling signal, and zero values ​​indicate that the signal has reached an extreme point or inflection point. The second derivative data represents the second derivative of the target chromatographic data with respect to time, reflecting the trend of the rate of change of the chromatographic signal, i.e., curvature information, and can characterize the changes in the convexity and concavity of the signal. Positive values ​​indicate that the signal curve is convex upwards, and negative values ​​indicate that it is concave downwards.

[0021] Specifically, the system first calculates the first derivative of the target chromatographic data. It uses a numerical differentiation method to calculate the difference between adjacent data points point by point. That is, for a data point y(t) on the time series t, its first derivative is approximately [y(t+Δt)-y(t)] / Δt, or using the central difference scheme [y(t+Δt)-y(t-Δt)] / (2Δt), resulting in a first derivative sequence that is the same length as or slightly shorter than the original data. The first derivative sequence clearly reflects the changing trend of the chromatographic signal, with positive values ​​in the rising segment of the chromatographic peak, zero crossing at the peak, and negative values ​​in the falling segment. The system then performs derivative calculations again on the first derivative data to obtain the second derivative data. That is, it differentiates the first derivative sequence dy / dt to obtain d²y / dt², also calculated using the finite difference method. Second derivative data can highlight changes in signal curvature. At the beginning of a chromatographic peak, a positive peak appears as the signal changes from flat to rapid rise. Near the peak, the signal changes from rising to falling, crossing zero and possibly showing a negative peak. At the end of the peak, the signal changes from rapid decline to flatness, and a positive change appears again.

[0022] In some embodiments, the derivative calculation of the target chromatographic data can be achieved in several ways: Optionally, the basic difference method can be used for calculation. First, a time index sequence and a corresponding numerical sequence are established for the target chromatographic data. Then, the data sequence is traversed, and the first derivative of each point is calculated starting from the second point. The forward difference result is obtained using the formula dy[i]=(y[i]-y[i-1]) / (t[i]-t[i-1]). For data sampled at equal time intervals, it can be simplified to dy[i]=(y[i]-y[i-1]) / Δt. Then, the same difference operation is repeated on the obtained first derivative sequence to obtain the second derivative d²y[i]=(dy[i]-dy[i-1]) / Δt. Finally, boundary processing is performed on the endpoints of the derivative sequence to maintain consistent data length. Optionally, the Savitzky-Golay smoothing differentiation method can be used. First, the smoothing window size (e.g., 5 or 7 points) and the polynomial fitting order (e.g., 2nd or 3rd order) are set. Then, local polynomial fitting is performed on each data point of the target chromatographic data and its neighborhood. The value of the analytical derivative of the fitted polynomial at the center point is used as the first derivative value at that point. This method achieves smoothing and noise reduction while calculating the derivative. Then, Savitzky-Golay differentiation is applied again to the calculated first derivative sequence to obtain the second derivative data. The final derivative data has better noise resistance and smoother characteristics. It is understood that other numerical differentiation techniques can also be used to calculate the derivative, such as using cubic spline interpolation to obtain the analytical derivative, using Fourier transform frequency domain differentiation, using the finite element method, etc., which are not limited here.

[0023] S103: Traverse the event sequence of the target chromatographic data, and determine the starting point, peak apex, and peak end of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first derivative data and the second derivative data and the judgment threshold. In this context, an event sequence refers to an ordered set of data points arranged chronologically from the target chromatographic data, where each data point represents a time event and its corresponding detector response value. The decision threshold represents a pre-set critical value used to determine whether the derivative data has reached a significant change level, including the first derivative decision threshold and the second derivative decision threshold, typically determined based on the statistical characteristics of the baseline noise level. The peak initiation point is the starting position where the chromatographic peak begins to rise significantly from the baseline, marking the beginning of elution of a component from the column and its response to the detector. Before this point, the signal is at the baseline level, after which it begins to rise continuously. The peak apex represents the position where the chromatographic peak reaches its maximum response intensity, corresponding to the moment when the component concentration is highest. Mathematically, this is represented by the point where the first derivative crosses zero and the second derivative is negative, representing a maximum value. The peak endpoint is the position where the chromatographic peak ends its descent and returns to the baseline, marking the complete elution of the component. After this point, the signal returns to the baseline level or the next chromatographic peak begins.

[0024] Specifically, the system first iterates through the target chromatographic data point by point in chronological order, starting from the initial time of the data point. For each data point, it simultaneously checks the corresponding first and second derivative values. During the iteration, the system continuously monitors whether the first derivative data exceeds the first derivative threshold. When the first derivative exceeds the threshold for the first time and the second derivative also exceeds the second derivative threshold simultaneously, this moment is marked as a candidate peak point. However, it is not immediately confirmed; instead, it continues to check whether the first derivative remains consistently greater than the threshold within a certain time window (e.g., 10-20 data points). If the persistence condition is met, the candidate peak point is confirmed as a valid peak point. After determining the peak point, the system continues to iterate to find the peak apex by detecting the moment when the first derivative changes from a positive value to a negative value, and simultaneously verifying that the data value at that moment is indeed greater than the values ​​at the adjacent moments. Points that meet these conditions are the peak apexes. After the peak apex, the system continues to search for the peak endpoint. When it detects that the first derivative gradually approaches zero from a negative value (between the negative threshold and zero), and the second derivative turns from a negative value to a positive value (between zero and the positive threshold), it indicates that the chromatographic peak's descent trend is slowing down and it is about to return to the baseline. This moment is determined as the peak endpoint. Through this intelligent recognition mechanism based on multi-derivative features and threshold determination, the system can accurately locate the complete contour boundary of each chromatographic peak.

[0025] S104: The chromatographic peaks are divided using the vertical peak separation method based on the peak start point, peak apex, and peak end point.

[0026] The vertical line peak segmentation method refers to a method of dividing overlapping or adjacent peaks by drawing a dividing line perpendicular to the time axis between adjacent chromatographic peaks. This method assumes that the chromatographic signal reaches a local minimum at a certain position between two peaks, and drawing a vertical line at that point can separate the two peaks. Chromatographic peak segmentation means dividing the continuous chromatographic signal according to the peak boundaries, so that each individual chromatographic peak becomes an independent data segment, which facilitates subsequent analysis and processing such as peak area integration and component quantification.

[0027] Specifically, the system first examines the distribution of characteristic points of all identified chromatographic peaks to determine if there is overlap between adjacent peaks. Specifically, it checks if the peak endpoint of the preceding peak is later than the peak initiation time of the following peak. If time overlap exists, it indicates that these are overlapping peaks that need to be separated. For overlapping peaks requiring separation, the system searches for a local minimum point of the chromatographic signal within the interval between the peak endpoint of the preceding peak and the peak endpoint of the following peak. This minimum point is typically located at the valley between the two peaks, representing the lowest response point after the superposition of the two component concentrations. After determining the valley location, a virtual dividing line perpendicular to the time axis is established at this time point. This dividing point is simultaneously defined as the new peak endpoint of the preceding peak and the new peak initiation time of the following peak, thus achieving the physical separation of the two peaks. For independent peaks without overlap, the previously identified peak initiation and peak endpoints are directly used as peak boundaries, requiring no additional separation processing. After determining the boundaries of all peaks, the system establishes a complete description for each chromatographic peak, including information such as start time, end time, peak position, peak height, and peak width. This information will be used for subsequent peak area integration calculations. The peak area is obtained by numerically integrating the chromatographic signal within the peak boundary, and then the quantitative analysis of the components is completed based on the calibration curve.

[0028] Based on the above embodiments, as an optional implementation method, the determination of the judgment threshold in S103 can be implemented through the following steps.

[0029] Select a baseline data segment from the peakless data in the original chromatographic data and calculate the standard deviation of the baseline data; set the preset multiple of the standard deviation as the judgment threshold for the first derivative data and the second derivative data respectively.

[0030] Baseline data refers to the pure baseline noise segment selected from the raw chromatographic data that does not contain any chromatographic peak signals. This data segment only contains random fluctuations such as instrument electronic noise and thermal noise, and can truly reflect the background noise level characteristics of the detection system. The peak-free region represents the time period during which no component elutes and generates a detector response throughout the entire chromatographic analysis time range. It is usually located in the beginning part of the chromatogram or a flat area between adjacent chromatographic peaks.

[0031] Specifically, the first step is to identify baseline regions without chromatographic peaks in the raw chromatographic data. The selection criteria are that the data changes smoothly within these regions without obvious peak shapes. Typically, the first few seconds of data after the start of the chromatogram are selected, or an automatic detection algorithm scans the entire chromatogram to find the segment with the least data fluctuation as the baseline segment. From the selected baseline region, a data sequence of suitable length is extracted. The arithmetic mean of all data points in this sequence is calculated. Then, the square of the difference between each data point and the mean is calculated. All squared differences are summed and divided by the number of data points minus one. Finally, the square root of the result is taken to obtain the standard deviation of the baseline data. After obtaining the baseline standard deviation, a judgment threshold is set for the first derivative data. The baseline standard deviation is multiplied by a first preset factor to obtain the first derivative judgment threshold. This factor is usually set to three to five times to balance sensitivity and anti-interference capability. When setting the judgment threshold for the second derivative data, since the second derivative is more sensitive to noise, a larger preset factor is needed, typically five to ten times the baseline standard deviation, to avoid noise fluctuations in the second derivative triggering erroneous peak identification.

[0032] In practice, baseline data is acquired using a direct extraction method, selecting the median range from the raw chromatographic data as the baseline region. Specifically, the raw data is sorted by numerical value, and data segments located near the median are extracted. These segments, situated in the middle of the numerical distribution, typically do not contain high-response values ​​from chromatographic peaks and effectively represent the baseline noise level. The extracted median range is then used as baseline information and saved to the baseline data set for subsequent calculations.

[0033] Baseline correction was achieved using wavelet transform, employing the db4 wavelet function from the Daubechies wavelet family as the basis function to perform multi-level decomposition of the original data. The decomposition level could be set to 14 levels, separating the chromatographic signal into components at different frequency scales through layer-by-layer decomposition. In the coefficients obtained from each decomposition, the approximate coefficients of the highest level represent the slowest-changing baseline drift component in the signal; setting all these approximate coefficients to zero effectively eliminates baseline shift. The positions of the zeroed coefficients were filled with the value 0 to maintain the integrity of the coefficient matrix structure. After the coefficients were modified, inverse wavelet transform was used to reconstruct the modified coefficients, recovering the signal layer by layer to finally obtain the baseline-corrected data, which was then saved to the target dataset.

[0034] It should be noted that the choice of the db4 wavelet function and its 14-level decomposition is not the only option. In practical applications, the specific parameter configuration of the baseline correction processing method should be flexibly adjusted according to the characteristics of the actual chromatographic data. This includes the selection of the wavelet basis function type, the determination of the number of decomposition levels, and the threshold processing strategy, all of which can be optimized according to the data quality requirements to achieve the best baseline correction effect.

[0035] Based on the above embodiments, as an optional implementation method, the method of obtaining the raw chromatographic data collected by the gas chromatograph in S101, performing wavelet decomposition on the raw chromatographic data, setting the wavelet approximation coefficients after decomposition to zero and reconstructing them to obtain the target chromatographic data after baseline correction can be specifically implemented through the following steps S201-S204.

[0036] S201: Obtain the raw chromatographic data acquired by the gas chromatograph and the data length of the raw chromatographic data, and calculate the maximum allowed number of wavelet decomposition layers of the raw chromatographic data based on the data length; Here, data length refers to the total number of discrete data points contained in the original chromatographic data. This value depends on the product of the time span of the chromatographic analysis and the data acquisition frequency. The maximum wavelet decomposition level represents the theoretically maximum number of decompositions that wavelet transform can perform under a given data length. This number of levels is limited by the number of data points. The data length is halved with each decomposition level. Therefore, the maximum number of levels cannot exceed the result of rounding down the base-two logarithm of the data length.

[0037] Specifically, the complete raw chromatographic data sequence is first acquired from the gas chromatograph's data acquisition system. This data is stored in time-series format, containing detector response values ​​throughout the entire process from injection to analysis. Simultaneously, the total number of data points in this data sequence is counted, i.e., the data length. After obtaining the data length, the maximum allowed number of decomposition layers is calculated based on the mathematical constraints of wavelet decomposition. The calculation method is to take the logarithm of the data length to base 2, and then round down to obtain the integer number of layers. For example, when the data length is 1024 points, its logarithm to base 2 is 10, and rounding down yields a maximum of 10 decomposition layers. This calculation ensures that each layer has sufficient data points to support wavelet transform operations in subsequent decomposition processes, avoiding decomposition failure or accuracy loss due to insufficient data points, and providing an effective search range for subsequent adaptive selection of the optimal number of decomposition layers.

[0038] S202: Within the range of the maximum number of wavelet decomposition layers, calculate the entropy values ​​of the reconstructed signal and the original chromatographic data under different decomposition layers, and select the decomposition layer with the largest rate of change of entropy value as the optimal number of decomposition layers. The reconstructed signal refers to the time-domain signal recovered through inverse wavelet transform using modified wavelet coefficients. Compared to the original signal, this signal has either removed or retained specific frequency components. Entropy represents the complexity or information content of a signal; a higher entropy value indicates richer information or greater uncertainty. In chromatographic data processing, changes in entropy reflect the degree of change in signal components. The entropy change rate represents the magnitude of change in the entropy of the reconstructed signal relative to the entropy of the original signal at different decomposition levels. This index is used to assess the impact of different decomposition levels on the signal information structure. The optimal decomposition level refers to the wavelet decomposition level that achieves the best baseline correction effect. At this level, the reconstructed signal effectively removes baseline drift while maximizing the retention of chromatographic peak information.

[0039] Specifically, the process begins with one layer and gradually increases until the maximum wavelet decomposition layer is reached. A complete wavelet decomposition operation is performed on the values ​​of each layer. After each decomposition, all approximation coefficients of the highest layer corresponding to that layer are set to zero, while all detail coefficients and lower layer approximation coefficients are retained. Then, an inverse wavelet transform is performed to obtain the reconstructed signal at that layer. The information entropy of the reconstructed signal is calculated by first normalizing the signal to a probability distribution, then taking the logarithm of the probability value for each data point, multiplying it by the probability value, summing the results, and taking the negative value. Simultaneously, the information entropy of the original chromatographic data is calculated as a reference. For each decomposition layer, the difference between the entropy value of the reconstructed signal and the entropy value of the original signal is calculated, and then divided by the entropy value of the original signal to obtain the rate of change of entropy. After traversing all layers, the rate of change of entropy for each layer is compared, and the layer with the largest absolute value of the rate of change of entropy is selected as the optimal decomposition layer, as this layer removes the baseline most thoroughly and has the most significant impact on the effective signal.

[0040] S203: Perform wavelet decomposition on the original chromatographic data according to the optimal decomposition level; Specifically, the db4 wavelet is used as the basis function, and multi-level wavelet decomposition is performed on the original chromatographic data according to the set optimal decomposition level. The decomposition process starts from the first level, passing the original signal through a low-pass filter to obtain approximation coefficients and through a high-pass filter to obtain detail coefficients. Both sets of coefficients are downsampled to halve length. After the first level decomposition, the obtained approximation coefficients are used for the second level decomposition, further separating lower-frequency approximation and detail components. This iterative process is repeated layer by layer, with the frequency resolution doubling and the time resolution decreasing by half with each deeper level. Decomposition continues until the optimal decomposition level is reached, at which point a set of approximation coefficients for the highest level and detail coefficients for each level from the first to the optimal level are obtained. These coefficients fully describe the characteristic distribution of the original chromatographic signal at different frequency scales, where the highest level approximation coefficients correspond to extremely low-frequency components such as baseline drift, and the detail coefficients for each level correspond to higher-frequency components such as chromatographic peaks and noise.

[0041] S204: Set the Nth wavelet approximation coefficients obtained after decomposition to zero, and use the remaining wavelet approximation coefficients to reconstruct the baseline-corrected target chromatographic data, where N is the optimal decomposition layer.

[0042] The N-level wavelet approximation coefficients refer to the highest-level approximation coefficients obtained after N-level wavelet decomposition. These coefficients represent the lowest-frequency and slowest-changing components in the original signal, primarily corresponding to instrument baseline drift in chromatographic data. The remaining wavelet approximation coefficients represent all lower-level approximation coefficients except for the N-level. These coefficients contain relatively higher-frequency components and are closer to the frequency range of the chromatographic peak signal.

[0043] Specifically, the highest-level approximation coefficient array obtained from the Nth-level decomposition is first located. This array is short but contributes the most to the baseline. All coefficient values ​​in this array are replaced with zero to completely suppress baseline components. All approximation coefficients from the first level to the Nth minus one level and all detail coefficients from the first level to the Nth level are kept unchanged; these coefficients contain the main information of the chromatographic peaks. Wavelet inverse transform is performed using the modified complete coefficient set for signal reconstruction. The reconstruction process is the reverse of the decomposition process, synthesizing layer by layer upwards from the highest level. In each layer reconstruction, the approximation coefficients and detail coefficients are upsampled to double their length, and then combined through a reconstruction filter to form the output signal of that layer. Reconstruction is performed layer by layer until the first level, ultimately obtaining a time-domain signal of the same length as the original data. This signal is the baseline-corrected target chromatographic data. Since the highest-level approximation coefficients have been set to zero, the reconstructed signal no longer contains low-frequency baseline drift components, the baseline approaches zero, and the chromatographic peaks retain their original shape and amplitude, providing a high-quality data foundation for subsequent peak identification and quantitative analysis.

[0044] The following is combined Figure 2 The chromatographic peaks in the embodiments of this application are described below. Figure 2 This is a schematic diagram of an exemplary chromatographic peak type and its first and second derivatives provided for an embodiment of this application. The diagram shows the waveform characteristics of four typical chromatographic peak types and their corresponding first and second derivative curves. Figure 2 Each peak shape is characterized by three dimensions: the original signal, the first derivative, and the second derivative, which intuitively presents the significant differences between different peak shapes in the derivative domain. Figure 2 include Figure 2 The single peak shown in a Figure 2 The overlapping peak shown in b, Figure 2 c shows the anterior shoulder peak and Figure 2 The back shoulder peak shown in d is marked with the location of key feature points for each peak type, which is used to illustrate the detection basis and judgment conditions of various feature points in the chromatographic peak identification method.

[0045] Figure 2A illustrates the complete structure of a single-peaked signal and its derivative characteristics. The original signal of the single-peaked signal exhibits a symmetrical or approximately symmetrical bell-shaped curve. Starting from the peak point (start), the signal strength gradually increases, reaching its maximum rate of increase after the left turning point. The rate of increase then gradually decreases until reaching the peak (top), where the signal strength is at its maximum. After the peak, the signal strength begins to decrease, reaching its maximum rate of decrease after the right turning point. The rate of decrease then gradually decreases until reaching the end point (end), returning to the baseline. The first derivative curve of the single-peaked signal exhibits a characteristic of being positive initially and then negative. It reaches a positive maximum at the left turning point, crosses zero at the peak point (changing from positive to negative), and reaches a negative minimum at the right turning point. The second derivative curve of the single-peaked signal exhibits a fluctuating characteristic of being positive initially, then negative, and then positive again. It reaches a negative minimum at the peak point, and the zero point of the second derivative corresponds to the inflection point of the original signal. A key characteristic of the single-peaked signal is that both the first and second derivatives exhibit a monotonically smooth trend, without any local extrema.

[0046] Figure 2 b illustrates the composite structure of the overlapping peaks and their derivative characteristics. The original signal of the overlapping peaks is formed by the superposition of two adjacent peaks, creating a waveform with two peaks and a valley point. The valley point is located between the two peaks, and the signal intensity is above the baseline level. The first derivative curve of the overlapping peaks exhibits multiple zero-crossing characteristics. The first derivative is positive in the rising segment of the first peak. At the first peak, the first derivative crosses zero for the first time, changing from positive to negative. At the valley point, the first derivative crosses zero for the second time, changing from negative to positive. At the second peak, the first derivative crosses zero for the third time, changing from positive to negative. The first derivative approaches zero at the peak endpoint. The second derivative curve of the overlapping peaks exhibits multiple alternating positive and negative peaks and troughs. A positive peak appears near the valley point, indicating that the signal transitions from a decreasing to an increasing trend. The criteria for determining overlapping peaks is the moment when the first and second derivatives are simultaneously greater than their respective thresholds after the first peak. This moment corresponds to the starting position of the rise near the trough point, marking the beginning of the second peak superimposed on the falling segment of the first peak.

[0047] Figure 2c illustrates the local superposition structure and derivative characteristics of the anterior shoulder peak. The original signal of the anterior shoulder peak exhibits a local shoulder-like bulge in the rising segment ahead of the main peak. The acromion point marks the boundary between the anterior shoulder peak and the main peak; the signal intensity at this location is lower than the peak of the main peak but higher than the starting point. The first derivative curve of the anterior shoulder peak shows a local maximum in the rising segment of the main peak, corresponding to the acromion point. Before the acromion point, the first derivative gradually increases; after the acromion point, the first derivative first decreases and then increases again, forming a local trough-rising fluctuation. The second derivative curve of the anterior shoulder peak shows a positive local maximum near the acromion point. Before the acromion point, the second derivative is positive and gradually increases; at the acromion point, the second derivative reaches a local maximum; after the acromion point, the second derivative rapidly decreases. The criteria for determining the front shoulder peak is when both the first and second derivatives are local maxima and the first derivative is greater than zero. A positive first derivative indicates that the signal is in an upward state. The local maxima of the first and second derivatives indicate that the rate of ascent and acceleration begin to decrease after reaching a local peak at that point. This is a characteristic manifestation of the subsequent peaks starting to overlap.

[0048] Figure 2 Figure d illustrates the local superposition structure and derivative characteristics of the posterior acromion. The original signal of the posterior acromion shows a local shoulder-like protrusion in the descending segment behind the main peak. The acromion point marks the boundary between the main peak and subsequent smaller peaks; the signal intensity at this point is lower than the peak of the main peak but higher than the peak endpoint. The first derivative curve of the posterior acromion shows a local maximum in the descending segment of the main peak, corresponding to the acromion point. Before the acromion point, the first derivative is negative and its absolute value gradually decreases. At the acromion point, the first derivative reaches a local maximum but remains negative. After the acromion point, the absolute value of the first derivative increases again. The second derivative curve of the posterior acromion shows a positive local maximum near the acromion point. Before the acromion point, the second derivative gradually increases. At the acromion point, the second derivative reaches a local maximum, and after the acromion point, the second derivative decreases rapidly. The criterion for determining the back shoulder peak is when both the first and second derivatives are local maxima and the first derivative is less than zero. A negative first derivative indicates that the signal is in a declining state. The local maxima of the first and second derivatives indicate that the absolute value of the decline rate reaches a local minimum at that point, that is, the decline process has slowed down locally. This is a characteristic manifestation of subsequent small peaks superimposed on the decline segment of the main peak.

[0049] Based on the above embodiments, as an optional implementation method, the determination threshold in step S103 includes a first derivative determination threshold and a second derivative determination threshold. The method of traversing the time series of the target chromatographic data and determining the peak point of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first derivative data and the second derivative data and the determination threshold can be specifically implemented through the following steps S301-S302.

[0050] S301: Traverse the target chromatographic data in chronological order. When the first derivative data at the first moment is detected to be greater than the first derivative judgment threshold, and the second derivative data at the first moment is greater than the second derivative judgment threshold, then the first moment is selected as the candidate peak point. Among them, the candidate peak point refers to the moment point that is initially identified as a possible starting position of the chromatographic peak during the traversal of chromatographic data. This point satisfies the condition that both the first and second derivatives exceed their respective judgment thresholds, but further verification is still required to confirm it as the true peak point. The first moment represents the specific time position currently being detected when traversing the target chromatographic data in chronological order. This moment corresponds to a specific index position in the chromatographic data sequence.

[0051] Specifically, starting from the initial time of the target chromatographic data, the entire data sequence is traversed point by point in chronological order from morning to evening. At each time point, the corresponding first and second derivative values ​​are simultaneously read and compared with pre-set first and second derivative thresholds, respectively. When the first derivative value at a given time point is found to be greater than the first derivative threshold, it indicates that the signal at that point is beginning to show an upward trend and the rate of increase exceeds the noise level. Simultaneously, the second derivative value at that time is checked to see if it is greater than or equal to zero. A non-negative second derivative indicates that the signal's rate of increase is stable or increasing, meaning the signal is in a uniform or accelerating upward phase, a typical characteristic of the chromatographic peak initiation stage. Only when both derivative conditions are simultaneously met at the same time is that time point marked as a candidate peak initiation point, the peak initiation status flag is set to true, and the corresponding time coordinate is recorded as the candidate peak initiation point.

[0052] S302: Starting from the candidate peak point, continue traversing backwards. If the first derivative data is continuously greater than the first derivative judgment threshold within the preset time window, then the candidate peak point is determined as the peak point of the chromatographic peak corresponding to the target chromatographic data.

[0053] The preset time window refers to a fixed time interval extending from the candidate peak point. The length of this time window is set based on the minimum width characteristic of the chromatographic peak and is used to verify whether there is a continuous upward trend after the candidate peak point. A value consistently greater than the judgment threshold indicates that the first derivative value remains above the judgment threshold during the verification process, without falling below the threshold, reflecting a stable and persistent upward trend in the signal.

[0054] Specifically, starting from the identified candidate peak point, the target chromatographic data and its first derivative data are traversed forward along the time axis. During this traversal, the first derivative value at each time point is checked sequentially to determine if it is greater than or equal to the first derivative threshold. A time window is set as the validation range; its length is typically determined based on the minimum expected width of the chromatographic peak, ensuring the window covers the main rise phase of the peak's initial segment. A persistence test is used, accumulating the first derivative value point-by-point within the window to determine if it consistently remains above the threshold. Only when the first derivative value remains consistently above the threshold without interruption throughout the entire time period from the candidate peak point to the end of the window is the candidate point considered to have passed persistence validation. This persistence requirement ensures that a stable and significant signal rise process truly exists after the candidate peak point, rather than an occasional single-point noise spike or transient fluctuation. Validated candidate peak points are officially confirmed and saved as the true peak point of the chromatographic peak, while maintaining the peak-starting status flag as true, providing an accurate starting reference position for subsequent peak detection and peak-ending point determination. If the verification fails, the peak status flag is reset, and the process continues to traverse backwards to find new candidate peak points.

[0055] Based on step S302 above, as an optional implementation method, the peak apex of the chromatographic peak corresponding to the target chromatographic data is determined based on the numerical relationship between the first derivative data and the second derivative data and the determination threshold. This can be specifically achieved through the following steps S401-S402.

[0056] S401: Continue traversing the target chromatographic data in chronological order after the peak point; Specifically, starting from the time corresponding to the determined peak point, the target chromatographic data sequence is traversed point by point in chronological order from morning to evening. The traversal process maintains the same temporal order and data access method as the peak point detection phase, reading the raw chromatographic data value and the first derivative value for each time point. The traversal range begins from the next time point after the peak point and continues until the peak apex or peak end point is detected. During the traversal, the peak apex status flag is kept true, indicating that the current stage is the peak rise or peak identification phase. This continuous traversal process provides the data foundation for subsequent peak determination, ensuring that no potential peak positions are missed, while the continuity of the traversal guarantees the complete capture of chromatographic peak morphology characteristics.

[0057] S402: If the original chromatographic data value at the second moment is greater than both the original chromatographic data value at the previous moment and the original chromatographic data value at the next moment, and the first derivative data at the previous moment is greater than or equal to zero, and the first derivative data at the next moment is less than zero, then the second moment is determined as the peak of the chromatographic peak.

[0058] The second moment refers to the specific time point currently being detected during the traversal following the peak point. This moment is used to determine whether it is the apex of the chromatographic peak. The preceding moment represents the time point immediately preceding the second moment in the time series, and the following moment represents the time point immediately following the second moment in the time series. These three moments form a continuous three-point structure in the data series. The peak apex refers to the moment when the original data value of the chromatographic peak reaches its maximum value over its entire time range. This point marks the turning point where the chromatographic peak transitions from the rising phase to the falling phase.

[0059] Specifically, when traversing to the second time point, the original chromatographic data value corresponding to this time point is first extracted, along with the original chromatographic data values ​​corresponding to the previous and next time points, forming a numerical sequence of three consecutive time points. These three values ​​are compared to determine if the value at the second time point is simultaneously greater than or equal to the values ​​at the previous and next time points. This three-point extremum characteristic indicates that the signal at the second time point has reached a peak within a local range. Simultaneously, the first derivative values ​​corresponding to the previous and next time points are read. The first derivative at the previous time point is checked to see if it is greater than or equal to zero, indicating that the signal was still in an upward or horizontal state before reaching the second time point. Further checks are made to see if the first derivative at the next time point is less than zero, indicating that the signal began to decline after leaving the second time point. Only when the original data at the second time point satisfies the local maximum condition, and the first derivatives at the time points before and after it satisfy the change characteristic of changing from non-negative to negative, can the second time point be confirmed as the true peak. Once confirmed, this moment is recorded as the peak apex position of the chromatographic peak, and the corresponding original chromatographic data value is also recorded as the peak height. The peak apex status flag is set to true, providing a crucial reference position for subsequent peak end point detection and peak type classification. This dual determination mechanism based on numerical extrema and derivative sign changes ensures the accuracy and stability of peak apex identification and avoids misjudgments caused by data noise.

[0060] Based on the above embodiments, as an optional implementation method, after determining the second time as the peak apex of the chromatographic peak in step S402, the peak endpoint can be determined through the following steps S501-S504.

[0061] S501: Continue traversing the target chromatographic data in chronological order after the peak apex; Specifically, in the peak determination step, when the original chromatographic data at the second time point is detected to be greater than the values ​​at both the previous and subsequent time points, and the first derivative at the previous time point is greater than or equal to zero, while the first derivative at the subsequent time point is less than zero, the peak height status flag is updated to true, and the peak height value is recorded as the original data value at the second time point. After peak confirmation, starting from the next time point after the peak, the remaining dataset in the target chromatographic data sequence is traversed point by point in chronological order from early to late. The prerequisite for traversal is that the peak initiation status flag and the peak height status flag are true, and the current index plus one is less than the length of the first derivative data. This ensures that the traversal is performed after the peak initiation point and peak point have been detected, and does not exceed the valid range of the data sequence. During the traversal, the first and second derivative values ​​corresponding to the current time point are read each time to prepare the necessary data for subsequent peak endpoint determination or peak shape classification determination. The traversal continues until a time point that meets the peak endpoint determination condition or other peak shape characteristic determination condition is detected. Throughout the process, both the peak initiation status flag and the peak height status flag remain true.

[0062] S502: When the first derivative data at the third time point is detected to be between the negative first derivative judgment threshold and zero, and the second derivative data is between zero and the second derivative judgment threshold, the third time point is determined as the peak endpoint. The third moment refers to the specific time point currently being detected during the traversal process after the peak apex. This moment is used to determine whether it is the termination point of the chromatographic peak. The peak endpoint refers to the time point when the chromatographic peak ends and returns to near the baseline. This point marks the end of the descent phase of the chromatographic peak, and the signal returns to the noise level or baseline state.

[0063] Specifically, firstly, the first derivative value corresponding to that moment is extracted, and it is determined whether this value is between the negative first derivative threshold and zero, i.e., the first derivative value is greater than or equal to the negative first derivative threshold and less than or equal to zero. This condition indicates that the signal's rate of decline has slowed to near zero, and the decline amplitude has fallen below the peak threshold, indicating that the signal's downward trend is about to end. Simultaneously, the second derivative value corresponding to that moment is extracted, and it is determined whether this value is between zero and the second derivative threshold, i.e., the second derivative value is greater than or equal to zero and less than or equal to the second derivative threshold. This condition indicates that the signal's rate of decline itself is decreasing or remaining stable, and the curve curvature is changing from negative to positive, indicating that the curve is turning from a downward trend to a horizontal state, i.e., approaching the baseline state. Only when the third moment simultaneously satisfies all three conditions—the peak height status flag is true, the first derivative is within the range of the negative threshold to zero, and the second derivative is within the range of zero to the positive threshold—is the third moment determined as the peak endpoint, and the corresponding time coordinate is recorded as the peak end position, providing complete peak boundary information for subsequent peak width and peak height verification.

[0064] S503: Calculate the time difference between the peak end point and the peak start point as the peak width, and compare the peak width and peak height with the preset peak width threshold and peak height threshold respectively; Peak width refers to the time span from the onset point to the end point of a chromatographic peak. This parameter reflects the broadening of the peak along the time axis and is used to evaluate the chromatographic separation effect and peak validity. The peak width threshold is a pre-set minimum peak width limit used to filter out spurious peaks or noise spikes with excessively narrow time spans, ensuring that identified chromatographic peaks have a reasonable time width. The peak height threshold is a pre-set minimum peak height limit used to filter out signal fluctuations with excessively low amplitudes, ensuring that identified chromatographic peaks have sufficient signal intensity.

[0065] Specifically, firstly, the time coordinates corresponding to the recorded peak endpoint and peak initiation are extracted. The time coordinate of the peak endpoint is subtracted from the time coordinate of the peak initiation to obtain the time difference between the two moments; this difference is the peak width value. Then, the peak width threshold and peak height threshold are read from the preset parameter configuration. The peak width threshold defaults to 0.2 but can be configured according to actual needs; the peak height threshold defaults to 0.3 but can also be configured. The calculated peak width value is compared with the peak width threshold to determine if the peak width meets the threshold requirement. Simultaneously, the recorded peak height value is compared with the peak height threshold to determine if the peak height meets the threshold requirement. These two comparison operations verify whether the chromatographic peak meets the minimum requirements in the time and amplitude dimensions, respectively, eliminating false peaks with excessively narrow time spans or excessively low signal amplitudes, providing a basis for the next step of validity determination.

[0066] S504: If both the peak width threshold and the peak height threshold are met, the chromatographic peak is determined to be a separation peak.

[0067] Among them, the separated peak refers to the normal chromatographic peak that simultaneously meets the minimum requirements for peak width and peak height.

[0068] Specifically, the results of peak width comparison and peak height comparison are first checked to determine whether both the peak width and peak height meet the threshold requirements simultaneously. Only when both conditions are met is the chromatographic peak identified as a separated peak. After identification as a separated peak, all characteristic parameters of the chromatographic peak, including the time coordinates of the peak start point, peak apex, and peak end, peak height, peak width, peak type, and peak type number, are saved to the result data structure. The peak type remains the default separated peak type at this stage. Then, the peak type number is incremented to assign a new identifier to the next chromatographic peak. At the same time, the peak type, peak start status flag, peak height status flag, peak start point, peak end, and peak height values ​​are reset to their respective default values, preparing to begin the identification process for the next chromatographic peak. If either peak width or peak height does not meet the threshold requirement, the detection result is considered to be a false signal generated by random fluctuations in the baseline rather than a real chromatographic peak. The peak type, peak status flag, peak height status flag, peak start point, peak end point, and peak height value are directly reset to their default values ​​without saving the information of the peak, and the process continues to traverse backwards to find a new peak start point.

[0069] Based on the above embodiments, as an optional implementation method, the determination of chromatographic peak type can be achieved through the following steps S601-S603.

[0070] S601: Continue traversing the target chromatographic data in chronological order after the peak apex; Specifically, in the peak apex determination step, after a peak apex is detected and the peak height status flag is updated to true, the remaining dataset in the target chromatographic data sequence continues to traverse point by point from the next moment after that peak apex, following the chronological order from earliest to latest. The traversal is predicated on the peak apex status flag being true, the peak height status flag being true, and the current index plus one being less than the length of the first derivative data. This ensures that the traversal is performed only after all peak apex points and peak apexes have been detected. During the traversal, the first and second derivative values ​​corresponding to the current moment are read each time, used to subsequently determine whether the current moment meets the conditions for a common peak endpoint, overlapping peak boundary, front shoulder peak boundary, or back shoulder peak boundary. The traversal continues until a moment satisfying any of the above determination conditions is detected. Throughout the process, both the peak apex status flag and the peak height status flag remain true, indicating that the current stage is the identification process of the descent phase of the same chromatographic peak.

[0071] S602: If the first derivative data at the fourth time point is detected to be greater than the first derivative judgment threshold, and the second derivative data is greater than the second derivative judgment threshold, then the chromatographic peak is judged as an overlapping peak. The fourth moment refers to the specific time point currently being detected during the traversal process after the peak apex. This moment is used to determine the boundary characteristics of overlapping peaks. An overlapping peak refers to a composite peak shape where two or more chromatographic peaks partially overlap in time, resulting in the peak shapes superimposed on each other. Its characteristic is that the next peak has already begun to rise before the previous peak has completely fallen to the baseline, forming a complex waveform with multiple peak apexes in the superimposed region.

[0072] Specifically, firstly, the first derivative value corresponding to that moment is extracted, and it is determined whether this value is greater than or equal to the first derivative judgment threshold. A first derivative greater than or equal to the threshold indicates that the signal shows a significant upward trend at that moment, and the rate of increase exceeds the noise level, which is completely different from the characteristic that the first derivative is close to zero or negative at the end of a normal peak. At the same time, the second derivative value corresponding to that moment is extracted, and it is determined whether this value is greater than or equal to the second derivative judgment threshold. A second derivative greater than or equal to the threshold indicates that the rate of increase of the signal itself is also increasing, and the curve is in an accelerating upward state, which is a typical characteristic of a new chromatographic peak starting to rise. Only when the three conditions are met simultaneously at the fourth moment—the peak height status flag is true, the first derivative is greater than or equal to the first derivative judgment threshold, and the second derivative is greater than or equal to the second derivative judgment threshold—is the currently being identified chromatographic peak determined as an overlapping peak type, and the peak type category is updated to the overlapping peak identifier.

[0073] S603: Mark the fourth time point as the peak endpoint of the chromatographic peak, and simultaneously update the fourth time point as the starting point of the next chromatographic peak.

[0074] Specifically, the fourth moment is first recorded as the peak endpoint of the currently being identified chromatographic peak. The time coordinate corresponding to the fourth moment is saved as the peak end position, marking the end of the identification range of the previous chromatographic peak. Then, the peak width and peak height are calculated to determine if they simultaneously meet the peak width and peak height thresholds. If the thresholds are met, all characteristic parameters of the overlapping peak, including the starting point, peak apex, peak endpoint, peak height, peak width, peak type (overlapping peak), and peak type number, are saved to the result data structure, and the peak type number is incremented. Simultaneously, the time coordinate corresponding to the fourth moment is updated to the starting point of the next chromatographic peak. The starting point is set to the time coordinate of the fourth moment, the starting status flag is kept true, and the peak type is updated to the overlapping peak identifier. This indicates that subsequent data from the fourth moment onwards belongs to the latter half of the overlapping peak, i.e., the range of the next chromatographic peak. The peak height status flag, peak endpoint, and peak height are reset to their default values, preparing to perform peak apex detection and peak endpoint detection processes on the latter half of the overlapping peak, thereby completely identifying the boundaries and characteristic parameters of the two overlapping chromatographic peaks.

[0075] Based on the above embodiments, as an optional implementation method, the determination of chromatographic peak type can be achieved through the following steps S701 or S702.

[0076] S701: If the first derivative data and the second derivative data at any time are both greater than the data at the previous time and the next time, and the first derivative data at any time is greater than zero, then the chromatographic peak corresponding to any time is determined as the fore-shoulder peak, and any time is recorded as the peak end point of the fore-shoulder peak and the starting point of the next peak. Among them, the front shoulder peak refers to a composite peak shape in which the next chromatographic peak begins to rise before the previous chromatographic peak has completely fallen to the baseline, resulting in a local inflection point in the falling segment of the front peak. Its characteristics are that the first and second derivatives have local maxima during the falling process of the front peak, and the first derivative is still positive, forming a shoulder-shaped structure in which the falling of the front peak slows down and the subsequent peak begins to rise.

[0077] Specifically, firstly, the first derivative values ​​at the current moment, the previous moment, and the next moment are extracted. It is then determined whether the first derivative value at the current moment is simultaneously greater than both the previous and next moment's values, indicating that the first derivative has reached a local maximum at this moment. Simultaneously, the second derivative values ​​at the current moment, the previous moment, and the next moment are extracted. It is then determined whether the second derivative value at the current moment is simultaneously greater than both the previous and next moment's values, indicating that the second derivative has also reached a local maximum at this moment. Further checks are made to ensure that the first derivative value at this moment is greater than zero. A positive first derivative indicates that the signal is still in a rising or slowing-down state. Only when all three conditions are met at any given moment—that the first derivative is a local maximum, the second derivative is a local maximum, and the first derivative is greater than zero—is the currently being identified chromatographic peak classified as a fore-shoulder peak, the peak type updated to the fore-shoulder peak identifier, the moment recorded as the peak endpoint of the fore-shoulder peak, and the moment updated as the starting point of the next chromatographic peak, thus achieving the boundary division between the two fore-shoulder peaks.

[0078] S702: If the first and second derivative data at any given time are both greater than the data at the previous and next time times, and the first derivative data at the current time is less than zero, then the chromatographic peak corresponding to any given time time is determined to be a back shoulder peak, and any given time time is recorded as the peak end point of the back shoulder peak and the starting point of the next peak.

[0079] Among them, the back shoulder peak refers to a composite peak that appears immediately after the previous chromatographic peak has begun to decline but has not yet fully returned to the baseline, resulting in a local inflection point in the decline of the previous peak. Its characteristics are that the first and second derivatives have local maxima during the decline of the previous peak, and the first derivative is still negative, forming a shoulder-shaped structure that suddenly slows down and then accelerates during the decline of the previous peak.

[0080] Specifically, firstly, the first derivative values ​​at the current moment, the previous moment, and the next moment are extracted. It is then determined whether the first derivative value at the current moment is simultaneously greater than both the previous and next moment's values, indicating that the first derivative has reached a local maximum at this moment. Simultaneously, the second derivative values ​​at the current moment, the previous moment, and the next moment are extracted. It is then determined whether the second derivative value at the current moment is simultaneously greater than both the previous and next moment's values, indicating that the second derivative has also reached a local maximum at this moment. Further checks are made to see if the first derivative value at this moment is less than zero. A negative first derivative indicates that the signal is in a decreasing state, but the rate of decrease has reached a local minimum at this point. Only when all three conditions are met at any given moment—that the first derivative is a local maximum, the second derivative is a local maximum, and the first derivative is less than zero—is the currently being identified chromatographic peak classified as a back shoulder peak, the peak type updated to the back shoulder peak identifier, the moment recorded as the peak endpoint of the back shoulder peak, and the moment updated as the starting point of the next chromatographic peak, thus achieving the boundary division between the two shoulder peaks.

[0081] The following are system embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the system embodiments of this application, please refer to the method embodiments of the application.

[0082] Please see Figure 3 This illustration shows a schematic diagram of a gas chromatograph peak separation system based on wavelet transform and multi-derivative features, provided in an exemplary embodiment of this application. This system can be implemented entirely or partially through software, hardware, or a combination of both. The gas chromatograph peak separation system based on wavelet transform and multi-derivative features includes: The processing module is used to acquire the raw chromatographic data collected by the gas chromatograph, perform wavelet decomposition on the raw chromatographic data, set the wavelet approximation coefficients after decomposition to zero and reconstruct them to obtain the target chromatographic data after baseline correction. The calculation module is used to calculate the first and second derivative data of the target chromatographic data, respectively. The identification module is used to traverse the event sequence of the target chromatographic data and determine the starting point, peak apex, and peak end of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first-order derivative data and the second-order derivative data and the judgment threshold. The segmentation module is used to segment chromatographic peaks using the vertical peak segmentation method based on the peak start point, peak apex, and peak end point.

[0083] This application also provides a computer storage medium that can store multiple instructions. The instructions are adapted to be loaded by a processor and executed as described in the above embodiments of the gas chromatograph peak separation method based on wavelet transform and multi-derivative features. For the specific execution process, please refer to the detailed description of the embodiments, which will not be repeated here.

[0084] Please see Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 may include: at least one processor 401, at least one network interface 404, user interface 403, memory 405, and at least one communication bus 402.

[0085] The communication bus 402 is used to enable communication between these components.

[0086] The user interface 403 may include a display screen and a camera.

[0087] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0088] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of digital signal processing, field-programmable gate array, or programmable logic array. The processor 401 may integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 401.

[0089] The memory 405 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 405 may include a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401. Figure 4 As shown, the memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a gas chromatograph peak separation method based on wavelet transform and multi-derivative features.

[0090] exist Figure 4 In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call an application program stored in the memory 405 that is a gas chromatograph peak separation method based on wavelet transform and multi-derivative features. When executed by one or more processors, the electronic device performs one or more methods as described in the above embodiments.

[0091] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more methods as described in the above embodiments.

[0092] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0093] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.

[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0097] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0098] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and practical application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.

Claims

1. A gas chromatography peak separation method based on wavelet transform and multi-derivative features, characterized in that, The method includes: The raw chromatographic data collected by the gas chromatograph is acquired, and wavelet decomposition is performed on the raw chromatographic data. The wavelet approximation coefficients after decomposition are set to zero and reconstructed to obtain the target chromatographic data after baseline correction. Calculate the first and second derivatives of the target chromatographic data respectively; By traversing the event sequence of the target chromatographic data, and based on the numerical relationship between the first derivative data and the second derivative data relative to the judgment threshold, the starting point, peak apex, and peak end of the chromatographic peak corresponding to the target chromatographic data are determined. The chromatographic peak is divided using the vertical peak separation method based on the peak initiation point, the peak apex point, and the peak end point.

2. The method according to claim 1, characterized in that, Before traversing the event sequence of the target chromatographic data based on the numerical relationship between the first-order derivative data and the second-order derivative data relative to a preset threshold, the method further includes: Select a baseline data segment from the peak-free segments of the original chromatographic data and calculate the standard deviation of the baseline data; The preset multiples of the standard deviation are set as the judgment thresholds for the first derivative data and the second derivative data, respectively.

3. The method according to claim 1, characterized in that, The process of acquiring raw chromatographic data from a gas chromatograph, performing wavelet decomposition on the raw chromatographic data, setting the wavelet approximation coefficients to zero and reconstructing the data to obtain baseline-corrected target chromatographic data includes: The raw chromatographic data collected by the gas chromatograph and the data length of the raw chromatographic data are obtained, and the maximum allowed number of wavelet decomposition layers of the raw chromatographic data is calculated based on the data length. Within the range of the maximum number of wavelet decomposition layers, the entropy values ​​of the reconstructed signal and the original chromatographic data under different decomposition layers are calculated, and the decomposition layer with the largest rate of change of entropy value is selected as the optimal number of decomposition layers. The original chromatographic data are decomposed using wavelet decomposition according to the optimal number of decomposition layers. The wavelet approximation coefficients of the Nth layer obtained after decomposition are set to zero, and the remaining wavelet approximation coefficients are used for reconstruction to obtain the target chromatographic data after baseline correction, where N is the optimal decomposition layer.

4. The method according to claim 1, characterized in that, The determination thresholds include a first-derivative determination threshold and a second-derivative determination threshold. By traversing the time series of the target chromatographic data and based on the numerical relationship between the first-derivative data and the second-derivative data relative to the determination thresholds, the peak point of the chromatographic peak corresponding to the target chromatographic data is determined, including: The target chromatographic data are traversed in chronological order. When the first derivative data at the first moment is detected to be greater than the first derivative judgment threshold and the second derivative data at the first moment is greater than the second derivative judgment threshold, the first moment is selected as the candidate peak point. Starting from the candidate peak point and continuing to traverse backwards, if the first derivative data is continuously greater than the first derivative determination threshold within a preset time window, then the candidate peak point is determined as the peak point of the chromatographic peak corresponding to the target chromatographic data.

5. The method according to claim 4, characterized in that, Based on the numerical relationship between the first-order derivative data and the second-order derivative data relative to the judgment threshold, the peak apex of the chromatographic peak corresponding to the target chromatographic data is determined, including: After the peak point, the target chromatographic data are traversed in the time sequence. If the original chromatographic data value at the second moment is greater than both the original chromatographic data value at the previous moment and the original chromatographic data value at the next moment, and the first derivative data at the previous moment is greater than or equal to zero, and the first derivative data at the next moment is less than zero, then the second moment is determined as the peak of the chromatographic peak.

6. The method according to claim 5, characterized in that, After determining the second time as the peak apex of the chromatographic peak, the method further includes: The target chromatographic data are traversed in the time sequence following the peak apex. When the first derivative data at the third time point is detected to be between the negative first derivative determination threshold and zero, and the second derivative data is between zero and the second derivative determination threshold, the third time point is determined as the peak endpoint. The time difference between the peak endpoint and the peak start point is calculated as the peak width, and the peak width and peak height are compared with preset peak width thresholds and peak height thresholds, respectively. If both the peak width threshold and the peak height threshold are met, then the chromatographic peak is determined to be a separation peak.

7. The method according to claim 5, characterized in that, After determining the second time as the peak apex of the chromatographic peak, the method further includes: The target chromatographic data are traversed in the time sequence following the peak apex. If the first derivative data at the fourth time point is detected to be greater than the first derivative determination threshold, and the second derivative data is also greater than the second derivative determination threshold, then the chromatographic peak is determined to be an overlapping peak. The fourth time point is marked as the peak endpoint of the chromatographic peak, and the fourth time point is simultaneously updated as the starting point of the next chromatographic peak.

8. The method according to claim 1, characterized in that, The method further includes: If it is detected that the first derivative data and the second derivative data at any time are both greater than the data at the previous time and the next time, and the first derivative data at any time is greater than zero, then the chromatographic peak corresponding to any time is determined as the fore-shoulder peak, and the any time is recorded as the peak end point of the fore-shoulder peak and the starting point of the next peak. or, If it is detected that the first derivative data and the second derivative data at any time are both greater than the data at the previous time and the next time, and the first derivative data at the current time is less than zero, then the chromatographic peak corresponding to any time is determined as a back shoulder peak, and any time is recorded as the peak end point of the back shoulder peak and the starting point of the next peak.

9. A gas chromatograph peak separation system based on wavelet transform and multi-derivative features, characterized in that, The system includes: The processing module is used to acquire the raw chromatographic data collected by the gas chromatograph, perform wavelet decomposition on the raw chromatographic data, set the wavelet approximation coefficients after decomposition to zero and reconstruct them to obtain the target chromatographic data after baseline correction. The calculation module is used to calculate the first and second derivative data of the target chromatographic data, respectively. The identification module is used to traverse the event sequence of the target chromatographic data and determine the starting point, peak apex and peak end of the chromatographic peak corresponding to the target chromatographic data based on the numerical relationship between the first derivative data and the second derivative data relative to the judgment threshold. The segmentation module is used to segment the chromatographic peak using the vertical peak segmentation method based on the peak start point, the peak apex, and the peak end point.

10. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the method as described in any one of claims 1 to 8.