Flight time mass spectrum data processing method and device based on machine learning, medium and product

By constructing a predefined database and the LightGBM model, time-of-flight mass spectrometry data is processed automatically, solving the problems of low efficiency and low accuracy caused by reliance on manual identification in existing technologies, and achieving fast, simple data identification and high repeatability.

CN121456653APending Publication Date: 2026-02-03EAST CHINA UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511590796.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing time-of-flight mass spectrometry data analysis relies heavily on human expertise, resulting in slow analysis speed, high error rates, and poor reproducibility. Furthermore, the time-of-flight distribution of ions of the same species is complex and difficult to accurately identify.

Method used

A machine learning-based approach was adopted to construct a predefined database and a LightGBM model. Through mass-to-charge ratio matching and normalization, peak signals in time-of-flight mass spectrometry data were automatically identified, and element identification was performed using the LightGBM model.

Benefits of technology

It enables rapid, concise, and automated processing of time-of-flight mass spectrometry data, reducing time costs and improving the accuracy and repeatability of identification. It can identify data composed of unknown elements without human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456653A_ABST
    Figure CN121456653A_ABST
Patent Text Reader

Abstract

The invention discloses a time-of-flight mass spectrometry data processing method and device based on machine learning, a medium and a product, and relates to the field of mass spectrometry analysis and artificial intelligence, and the method comprises the steps: obtaining time-of-flight mass spectrometry data; extracting peak signal data in the flight time mass spectrum data; traversing a predefined database, and performing mass-to-charge ratio matching with the peak signal data to obtain a matching result; dividing the peak signal data according to a matching result; screening the single-peak data and the double-peak data in a predefined database to obtain corresponding elements of the single-peak data and the double-peak data; respectively carrying out normalization processing on the three-peak data, the four-peak data, the five-peak data and the seven-peak data, and respectively inputting corresponding LightGBM models to obtain corresponding elements of the three-peak data, the four-peak data, the five-peak data and the seven-peak data; and finally obtaining an identification result of the time-of-flight mass spectrum data. According to the invention, the processing efficiency of the time-of-flight mass spectrometry data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of mass spectrometry analysis and artificial intelligence, and in particular to a method, apparatus, medium and product for time-of-flight mass spectrometry data processing based on machine learning. Background Technology

[0002] Time-of-flight mass spectrometry (ToF-MS) plays a vital role in various fields due to its unique advantages. Rapid and accurate identification and interpretation of the rich patterns and correlations in ToF-MS data are crucial. However, current analysis and identification processes heavily rely on user expertise, resulting in slow analysis speeds, high error rates, and severely hindering the reproducibility of results. Automating the analysis of ToF-MS data presents challenges. Because ions of the same species exhibit an initial velocity distribution upon leaving the sample, their time-of-flight distribution broadens. Therefore, under different experimental conditions, the shape of time-of-flight spectral peaks (peak shapes) can present a variety of complex morphologies and is not always easy to identify.

[0003] Therefore, there is an urgent need for a method that can be used to automate the processing of time-of-flight mass spectrometry data, identify data patterns without human intervention, and make the process of time-of-flight mass spectrometry data processing and identification simple, fast and reusable. Summary of the Invention

[0004] The purpose of this application is to provide a machine learning-based time-of-flight mass spectrometry data processing method, device, medium, and product that can improve the processing efficiency of time-of-flight mass spectrometry data.

[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a machine learning-based time-of-flight mass spectrometry data processing method, including: Build a predefined database; Acquire time-of-flight mass spectrometry data; Extract peak signal data from the time-of-flight mass spectrometry data; The predefined database is traversed, and the mass-to-charge ratio is matched with the peak signal data to obtain the matching result; The peak signal data is divided according to the matching results to obtain single-peak data, double-peak data, triple-peak data, four-peak data, five-peak data and seven-peak data; For the single-peak data and the double-peak data, the corresponding elements of the single-peak data and the double-peak data are obtained by filtering in the predefined database. The three-peak data, the four-peak data, the five-peak data, and the seven-peak data are normalized respectively to obtain normalized three-peak data, normalized four-peak data, normalized five-peak data, and normalized seven-peak data; The normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the corresponding elements of the three-peak data, the four-peak data, the five-peak data, and the seven-peak data. The identification results of time-of-flight mass spectrometry data are obtained based on the corresponding elements of single-peak and double-peak data, as well as the corresponding elements of triple-peak, quadruple-peak, quintuple-peak, and seven-peak data.

[0006] In one embodiment, the process of constructing the predefined database includes: Based on the standard periodic table, a predefined database is constructed; the predefined database includes the number of isotope peaks and isotope abundance ratios for each element.

[0007] In one embodiment, the process of constructing the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model includes: Gaussian noise is introduced into the data of each element in the predefined database to construct a sample dataset; The sample dataset is divided into a training set and a validation set; Three-peak, four-peak, five-peak, and seven-peak LightGBM initial models were constructed using the GBDT-based LightGBM model. The training set and the validation set are divided into three-peak training set, four-peak training set, five-peak training set, seven-peak training set, three-peak validation set, four-peak validation set, five-peak validation set and seven-peak validation set according to the number of isotope peaks of the elements. The corresponding initial LightGBM models were trained using three-peak, four-peak, five-peak, and seven-peak training sets, respectively, and the trained initial LightGBM models were validated using three-peak, four-peak, five-peak, and seven-peak validation sets, respectively, to obtain the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model.

[0008] In one implementation, the corresponding LightGBM initial models are trained using three-peak, four-peak, five-peak, and seven-peak training sets, respectively, including: Three-peak, four-peak, five-peak, and seven-peak training sets were used respectively to train each initial LightGBM model based on the set learning rate and number of iterations, and the weighted cross-entropy loss function was used to optimize each initial LightGBM model.

[0009] In one embodiment, extracting peak signal data from the time-of-flight mass spectrometry data includes: The peak signals in the time-of-flight mass spectrometry data are identified and extracted using the find_peaks function through a multi-parameter joint optimization method, and the peak signal data is obtained. The multi-parameters include peak height, peak spacing and peak prominence.

[0010] In one embodiment, the `find_peaks` function is used to identify and extract peak signals from the time-of-flight mass spectrometry data through a multi-parameter joint optimization method, obtaining the peak signal data, including: The peak signals in the time-of-flight mass spectrometry data are identified and extracted using the find_peaks function and a multi-parameter joint optimization method; the peak signals include mass-to-charge ratio and relative intensity. The mass-to-charge ratio is calibrated and fault-tolerant to obtain the calibrated mass-to-charge ratio; The peak signal data is determined based on the calibrated mass-to-charge ratio and the relative intensity.

[0011] In one embodiment, the normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the corresponding elements of the three-peak data, the four-peak data, the five-peak data, and the seven-peak data, including: The normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the original score vector. The original score vector is converted into the predicted probability of the classification element using the Softmax function; Based on the predicted probabilities of the classification elements, the corresponding elements for three-peak, four-peak, five-peak, and seven-peak data are obtained.

[0012] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the machine learning-based time-of-flight mass spectrometry data processing method described in any one of the above applications.

[0013] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the machine learning-based time-of-flight mass spectrometry data processing method described above.

[0014] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the machine learning-based time-of-flight mass spectrometry data processing method described above.

[0015] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a machine learning-based time-of-flight mass spectrometry (TOF-MS) data processing method, device, medium, and product. By extracting peak signal data from the TOF-MS data and performing mass-to-charge ratio matching on the peak signal data in a predefined database, the peak signal data is segmented, improving data processing efficiency. For single-peak and double-peak data, the corresponding elements are obtained directly from the predefined database. For triple-peak, quadruple-peak, quintuple-peak, and seven-peak data, the corresponding elements are determined using constructed triple-peak, quadruple-peak, quintuple-peak, and seven-peak LightGBM models, respectively, further improving the processing efficiency of TOF-MS data. This makes the TOF-MS data processing process simple and fast, reducing time costs, and requiring no manual intervention throughout. This application can be used to process TOF-MS data composed of unknown elements to obtain identification results, with high repeatability. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a machine learning-based time-of-flight mass spectrometry data processing method according to an embodiment of this application; Figure 2A schematic diagram of parameters for extracting peak signals using a multi-parameter joint optimization method provided in an embodiment of this application; Figure 3 A schematic diagram of the peak signal of FGH96 alloy provided in an embodiment of this application; Figure 4 This is a schematic diagram of mass-to-charge ratio calibration provided in an embodiment of this application; Figure 5 This is a schematic diagram of complex peak shapes in time-of-flight mass spectrometry data provided in an embodiment of this application; Figure 6 This is a schematic diagram of Gaussian noise data enhancement provided in an embodiment of this application; Figure 7 A schematic diagram of a LightGBM machine learning model based on the GBDT framework provided for another embodiment of this application; Figure 8 This application provides a schematic diagram of the structure of the weak learner (decision tree) and the forward propagation of data flow in a three-peaked LightGBM model according to an embodiment; Figure 9 A schematic diagram of the initial training and validation results of the LightGBM model provided in an embodiment of this application; Figure 10 A schematic diagram of the manual identification results of FGH96 alloy provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application 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. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] To make the objectives, features, and advantages of this application more apparent and understandable, the following detailed description of this application is provided in conjunction with the accompanying drawings and specific embodiments.

[0020] The purpose of this application is to provide a machine learning-based time-of-flight mass spectrometry (ToF-MS) data processing method, which aims to automatically assign elemental identities to a series of peaks in ToF-MS data, thereby reducing the time consumed in the peak identification process. Data augmentation techniques based on Gaussian noise are used to train and evaluate a machine learning classification model. After detecting, standardizing, and extracting the peak shapes of the initial data, the trained machine learning classification model is used for prediction, retaining high-confidence possible classification results. Finally, the mass-to-charge ratio of the possible classification results is matched and confirmed with a database. The entire process is connected through data flow to form a closed-loop analysis chain, achieving rapid and high-throughput ToF-MS data analysis.

[0021] In one exemplary embodiment, such as Figure 1 As shown, a machine learning-based time-of-flight mass spectrometry data processing method is provided, which includes: Step 100: Build a predefined database.

[0022] Step 200: Acquire time-of-flight mass spectrometry (TOF-MS) data and extract peak signal data from the TOF-MS data.

[0023] Step 300: Traverse the predefined database and perform mass-to-charge ratio matching with the peak signal data to obtain the matching result.

[0024] Step 400: Divide the peak signal data according to the matching results to obtain single-peak data, double-peak data, triple-peak data, quadruple-peak data, quintuple-peak data, and seven-peak data.

[0025] Step 500: For unimodal and bimodal data, filter in the predefined database to obtain the corresponding elements of unimodal and bimodal data.

[0026] Step 600: Normalize the three-peak, four-peak, five-peak, and seven-peak data respectively to obtain normalized three-peak, four-peak, five-peak, and seven-peak data. Input the normalized three-peak, four-peak, five-peak, and seven-peak data into the three-peak LightGBM model, four-peak LightGBM model, five-peak LightGBM model, and seven-peak LightGBM model respectively to obtain the corresponding elements of the three-peak, four-peak, five-peak, and seven-peak data.

[0027] Step 700: Based on the corresponding elements of single-peak and double-peak data, as well as the corresponding elements of triple-peak, quadruple-peak, quintuple-peak, and seven-peak data, the identification results of time-of-flight mass spectrometry data are obtained.

[0028] By implementing steps 100 to 700 above, this application can improve the processing efficiency of time-of-flight mass spectrometry data, make the processing of time-of-flight mass spectrometry data simple and fast, reduce time costs, and eliminate the need for manual intervention throughout the process. For any segment of time-of-flight mass spectrometry data composed of unknown elements, this application can be used to process and obtain identification results with high repeatability.

[0029] As an optional implementation, to ensure the robustness of the peak signal data, the process of extracting peak signal data from the time-of-flight mass spectrometry data in step 200 can be described as follows: using the find_peaks function, a multi-parameter joint optimization method is used to identify and extract peak signals from the time-of-flight mass spectrometry data to obtain peak signal data. The multi-parameters include peak height, peak spacing, and peak prominence.

[0030] Furthermore, the `find_peaks` function is used to identify and extract peak signals from the time-of-flight mass spectrometry (TOF-MS) data through a multi-parameter joint optimization method, resulting in peak signal data. This includes: identifying and extracting peak signals from the TOF-MS data using the `find_peaks` function and a multi-parameter joint optimization method. The peak signals include the mass-to-charge ratio (MTR) and relative intensity. The MTR is then calibrated to obtain a calibrated MTR. The peak signal data is determined based on the calibrated MTR and relative intensity.

[0031] For example, the `find_peaks` function from the SciPy library in Python is used to identify and extract peak signals from time-of-flight mass spectrometry (TOF-MS) data through a multi-parameter joint optimization method. The parameters in this method include peak height, peak spacing, and peak prominence. Different parameter values ​​are set for different types of TOF-MS data to filter background noise. After extracting the peak signals, the mass-to-charge ratio (MTR) is calibrated and error-tolerant, normalizing the decimal part of the MTR to 1 / 4, 1 / 3, 2 / 3, or 3 / 4 Da to account for minor offsets in the experimental instrument (used to acquire TOF-MS data). Finally, the peak signal data is obtained. Furthermore, based on the relative intensity of each peak in the peak signal, the abundance ratio between different peaks can be determined.

[0032] As an optional implementation, to improve the speed of analyzing and processing time-of-flight mass spectrometry data, step 100 includes: constructing a predefined database based on the standard periodic table. The predefined database includes the number of isotopic peaks and isotopic abundance ratios for each element.

[0033] The construction process of the three-peaked, four-peaked, five-peaked, and seven-peaked LightGBM models in step 600 includes: Step 610: Gaussian noise is introduced into the data of each element in the predefined database to construct a sample dataset.

[0034] Step 620: Divide the sample dataset into a training set and a validation set.

[0035] Step 630: Using the LightGBM model based on the GBDT framework, construct the initial three-peak LightGBM model, the initial four-peak LightGBM model, the initial five-peak LightGBM model, and the initial seven-peak LightGBM model respectively.

[0036] Step 640: Divide the training set and validation set into three-peak training set, four-peak training set, five-peak training set, seven-peak training set, three-peak validation set, four-peak validation set, five-peak validation set, and seven-peak validation set according to the number of isotope peaks of the elements.

[0037] Step 650: Train the corresponding initial LightGBM models using three-peak, four-peak, five-peak, and seven-peak training sets respectively, and validate the trained initial LightGBM models using the same three-peak, four-peak, five-peak, and seven-peak validation sets respectively, to obtain the three-peak, four-peak, five-peak, and seven-peak LightGBM models. Specifically, each initial LightGBM model can be trained using the three-peak, four-peak, five-peak, and seven-peak training sets based on a set learning rate and number of iterations, and optimized using a weighted cross-entropy loss function.

[0038] In step 600, normalized trimodal, quadrmodal, quintuplet, and heptaplet data are input into the trimodal, quadrmodal, quintuplet, and heptaplet LightGBM models, respectively, to obtain the corresponding elements of the trimodal, quadrmodal, quintuplet, and heptaplet data. This includes: inputting the normalized trimodal, quadrmodal, quintuplet, and heptaplet data into the trimodal, quadrmodal, quintuplet, and heptaplet LightGBM models, respectively, to obtain the original score vectors. The Softmax function is used to convert the original score vectors into predicted probabilities of the classification elements. Based on the predicted probabilities of the classification elements, the corresponding elements of the trimodal, quadrmodal, quintuplet, and heptaplet data are obtained.

[0039] For example, based on a predefined database, Gaussian noise is introduced into the data of each element, and noisy data is generated according to formula (1).

[0040] (1) In the formula, This indicates the generated data containing noise. It follows a normal distribution. It is the isotopic abundance ratio. Pick Based on formula (1), a large number of data points are generated for each element to construct a sample dataset. The sample dataset is then divided into a training set and a validation set according to a set ratio, which are used to train and validate the machine learning model, respectively.

[0041] The LightGBM model based on the Gradient Boosting Decision Tree (GBDT) framework was used to construct three-peak, four-peak, five-peak, and seven-peak initial LightGBM models, respectively. The input of the LightGBM model is the normalized isotope abundance ratio (summing up to 100%), and the output is the probability distribution of element categories (original score vector). The Softmax function is used to convert the original score vector into the predicted probability of the categorical element. The LightGBM model has a built-in histogram algorithm. The three-peak, four-peak, five-peak, and seven-peak training sets were used respectively to train each LightGBM initial model based on the set learning rate and number of iterations, and the weighted cross-entropy loss function was used to optimize each LightGBM initial model. In this embodiment, the learning rate is 0.01 or 0.005, the number of iterations is set to 1000, and early stopping is set for 100 rounds. The weighted cross-entropy loss function is shown in formula (2).

[0042] (2) In the formula, This represents the weighted cross-entropy loss. This represents the number of categories (i.e., the number of elements in each training set). For class weights (the first class in the training set) (weight of each element) For the first A real element, For the first The predicted probability of each element.

[0043] In practical use, by setting category weights, the model can increase or decrease its consideration of one or more elements.

[0044] For the single-peak, double-peak, triple-peak, quadruple-peak, pentapex, and seven-peak data obtained in step 400 of the above embodiments, a simple threshold method is used for classification of single-peak and double-peak data. For single-peak data, it is checked whether there is a single mass-to-charge ratio match in the predefined database, and then only the existence of the peak needs to be verified to determine the corresponding element. For double-peak data, it is checked whether exactly two mass-to-charge ratios are matched in the predefined database, and then the standard deviation of the relative intensity distribution of the double-peak data is compared with the standard deviation of the isotopic abundance ratio distribution in the predefined database. When the deviation is ≤50%, the corresponding element is determined.

[0045] For multi-peak data (including tri-peak, quadruple-peak, quintuple-peak, and heptapruple-peak data), check whether more than two mass-to-charge ratios are matched in the predefined database. Normalize the tri-peak, quadruple-peak, quintuple-peak, and heptapruple-peak data respectively to obtain normalized tri-peak, quadruple-peak, quintuple-peak, and heptapruple-peak data. Then, call the tri-peak, quadruple-peak, quintuple-peak, and heptapruple-peak LightGBM models respectively to perform classification tasks and obtain the original score vectors. Then, use the Softmax function to convert the original score vectors into the predicted probabilities of the classification elements, as shown in formula (3).

[0046] (3) In the formula, Represents the original fraction vector The Middle The predicted probability of each element. This represents the dimension of the original score vector (i.e., the number of categories). It is the natural logarithm (approximately 2.71828). and Represents the original fraction vector The first in and the A number.

[0047] The hyperparameters used in the LightGBM model include: 30 or 50 leaf nodes, 20 minimum leaf node samples, 5 or 10 maximum depth, a sample sampling ratio of 0.9, a feature sampling ratio of 0.9, and a sample sampling frequency of 5.

[0048] Finally, based on the predicted probabilities of the classification elements, the corresponding elements for three-peak, four-peak, five-peak, and seven-peak data are obtained. For the corresponding elements of three-peak and four-peak data, it is also necessary to compare the standard deviation of the relative intensity distribution with the standard deviation of the isotope abundance ratio distribution in the predefined database. If the deviation is ≤50% and the predicted probability of the classification element is ≥80%, then the classification element is determined to be a possible element. For five-peak and seven-peak elements, as long as the predicted probability of the classification element is ≥80%, the classification element is determined to be a possible element. Based on the determined corresponding elements of single-peak and double-peak data, as well as the corresponding elements of three-peak, four-peak, five-peak, and seven-peak data, the identification results of the time-of-flight mass spectrometry data are obtained.

[0049] In an exemplary embodiment, taking FGH96 alloy as an example, atomic probe tomography (APT) is performed on FGH96 alloy to obtain time-of-flight mass spectrometry data of FGH96 alloy. The time-of-flight mass spectrometry data of FGH96 alloy is processed using steps 100 to 700 provided in the above embodiment to analyze the constituent elements of FGH96 alloy.

[0050] S1, based on the standard periodic table, establishes a predefined database including the following elements: H, Be, B, C, N, O, Na, Mg, Al, Si, P, S, K, Ca, Sc, Ti, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, In, Ag, Zr, Nb, Mo, W, Ru, Sm, Nd, Gd, Yd, and Ta. This database contains the most frequently encountered elements (excluding inert gases) and some lanthanides.

[0051] S2. Obtain time-of-flight mass spectrometry (TOF-MS) data for FGH96 alloy. Using the `find_peaks` function from the SciPy library in Python, a multi-parameter joint optimization method is employed to identify and extract peak signals from the TOF-MS data. The parameters in the multi-parameter joint optimization method are as follows: Figure 2 As shown, this includes peak height = 4 (logarithmic count, such as...). Figure 2 As shown in part (b) of the diagram), the peak spacing is 0.25 Da (as shown in the diagram). Figure 2 As shown in part (b) of the figure), peak prominence = 0.5 (logarithmic count, such as... Figure 2 As shown in section (a) of the diagram, background noise is filtered out. The extracted peak signal is as follows: Figure 3 As shown. The mass-to-charge ratio in the peak signal is calibrated and fault-tolerant by normalizing its decimal to 1 / 4, 1 / 3, 2 / 3, or 3 / 4 Da to account for minor offsets in the experimental apparatus, such as... Figure 4 As shown. Finally, the peak signal data of the FGH96 alloy were obtained.

[0052] S3, in order for the model to be able to identify complex peak shapes in time-of-flight mass spectrometry data (such as... Figure 5 As shown in the figure, based on the established predefined database, Gaussian noise (such as...) is introduced into the data of each element. Figure 6 As shown in the diagram, 5000 data points were generated and divided into a training set and a validation set in an 80:20 ratio, meaning each element contains 4000 training data points and 1000 validation data points. Figure 5 Part A has a perfect peak shape. Figure 5 Part B is a peak shape that broadens due to the spatial distribution of particles. Figure 5 The C-section is a peak with a long tail. Figure 5 The D portion is a peak with a short tail. S3: Build LightGBM machine learning models (i.e., initial LightGBM models) for three-peak, four-peak, five-peak, and seven-peak elements respectively. The model architecture is as follows: Figure 7 As shown. The structure of the weak learner (decision tree) and the forward propagation of data flow in the three-peaked LightGBM model are as follows. Figure 8 As shown, R1, R2, and R3 represent the intensities of the three peaks. The model performs binary splits (rectangles) based on the intensity of each peak until it reaches a node (ellipse). Each node outputs a raw score for an element category, which is then converted into a predicted probability for the corresponding element using a Softmax function. The LightGBM model is an ensemble model trained sequentially by weak learners. In each training iteration, the decision tree learns from the residuals up to the current iteration using gradient descent. Each subsequent tree minimizes the loss function between the true output and the weighted sum of predictions from previous iterations. The final model is a weighted average of all weak learners. The hyperparameters of each LightGBM model are shown in Table 1.

[0053] Table 1. Hyperparameters of the LightGBM model with different numbers of isotopic peaks.

[0054] The hyperparameters 1-9 are: number of leaf nodes, minimum number of samples per leaf node, maximum depth, sample sampling ratio, feature sampling ratio, sample sampling frequency, learning rate, number of iteration rounds, and number of early stopping rounds, respectively.

[0055] Initial LightGBM models with three, four, five, and seven peaks were trained respectively. The training and validation of the models are as follows: Figure 9As shown, the training and validation curves correspond to the training history of the weighted cross-entropy loss function. The class weights are all set to 1 to ensure the model comprehensively considers all elements in the predefined database without artificially influencing the results. In the four LightGBM models, the two curves almost completely overlap, indicating that the weighted cross-entropy loss on the training and validation sets is almost identical. The weighted cross-entropy loss of the three-peaked, five-peaked, and seven-peaked LightGBM models shows similar trends. The four-peaked LightGBM model converges faster, reaching near-zero loss after approximately 100 iterations, thus stopping early around 500 iterations. Figure 9 Part A is a three-peak LightGBM model, Part B is a four-peak LightGBM model, Part C is a five-peak LightGBM model, and Part D is a seven-peak LightGBM model.

[0056] S4. Traverse the predefined database and perform mass-to-charge ratio matching with the peak signal data of FGH96 alloy to obtain matching results. Then, classify the peak signal data of FGH96 alloy according to the matching results to obtain single-peak, double-peak, triple-peak, quadruple-peak, quintuple-peak, and seven-peak data. Following steps 500-700 provided in the above embodiment, the identification results of the time-of-flight mass spectrometry data of FGH96 alloy are obtained, and the entire process is automated. The identification results include elements Al, Co, N, B, C, Mo, Ni, Ti, W, and Nb. The manual identification results by engineers are as follows... Figure 10 As shown, the identification results include elements C, Ni, Mo, W, Re, B, Al, Ti, Cr, Co, Nb, and Mo2. Mass Spectrum refers to all mass spectrometry signals detected during manual identification. It is evident that the machine learning-based time-of-flight mass spectrometry data processing method provided in this application can automate the entire identification and classification process in just 10 seconds, with high accuracy.

[0057] Based on the above embodiments, the machine learning-based time-of-flight mass spectrometry data processing method proposed in this application achieves automated identification of elements in ToF-MS data. Compared with manual processing, efficiency is greatly improved. Domain experts typically need several minutes or even hours to manually analyze a labeled spectrum, while this application can complete the task in just a few seconds, with high accuracy and universality, significantly reducing the time cost of data processing.

[0058] The training set in this application is automatically generated based on the mass-to-charge ratio and isotopic abundance ratio of elements, eliminating the need for manual annotation and further improving the reliability and scalability of the method. Compared to traditional statistical methods that rely on Bayesian classification, this application significantly reduces the dependence on reasonable prior information. Traditional methods become extremely computationally expensive if they assume inappropriate priors; while this application simplifies the preliminary preparation work, eliminating the need for prior knowledge of sample composition or mastery of specific material systems and analytical techniques.

[0059] Furthermore, this application can intelligently output recognition results with an uncertainty assessment. Unlike traditional "yes / no" answers, the technical solution provided by this application generates a list of candidate labels sorted by probability. Even if the input data cannot find an exact match in the theoretical database, the algorithm can still provide a ranking of the most likely matches by recognizing partially preserved patterns, providing valuable clues for researchers.

[0060] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 11 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to a machine learning-based time-of-flight mass spectrometry data processing method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a machine learning-based time-of-flight mass spectrometry data processing method.

[0061] Those skilled in the art will understand that Figure 11 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0062] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0063] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0065] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0066] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0067] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0068] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A machine learning-based time-of-flight mass spectrometry data processing method, characterized in that, include: Build a predefined database; Acquire time-of-flight mass spectrometry data; Extract peak signal data from the time-of-flight mass spectrometry data; The predefined database is traversed, and the mass-to-charge ratio is matched with the peak signal data to obtain the matching result; The peak signal data is divided according to the matching results to obtain single-peak data, double-peak data, triple-peak data, four-peak data, five-peak data and seven-peak data; For the single-peak data and the double-peak data, the corresponding elements of the single-peak data and the double-peak data are obtained by filtering in the predefined database. The three-peak data, the four-peak data, the five-peak data, and the seven-peak data are normalized respectively to obtain normalized three-peak data, normalized four-peak data, normalized five-peak data, and normalized seven-peak data; The normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the corresponding elements of the three-peak data, the four-peak data, the five-peak data, and the seven-peak data. The identification results of time-of-flight mass spectrometry data are obtained based on the corresponding elements of single-peak and double-peak data, as well as the corresponding elements of triple-peak, quadruple-peak, quintuple-peak, and seven-peak data.

2. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 1, characterized in that, The process of constructing the predefined database includes: Based on the standard periodic table, a predefined database is constructed; the predefined database includes the number of isotope peaks and isotope abundance ratios for each element.

3. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 2, characterized in that, The process of constructing the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model includes: Gaussian noise is introduced into the data of each element in the predefined database to construct a sample dataset; The sample dataset is divided into a training set and a validation set; Three-peak, four-peak, five-peak, and seven-peak LightGBM initial models were constructed using the GBDT-based LightGBM model. The training set and the validation set are divided into three-peak training set, four-peak training set, five-peak training set, seven-peak training set, three-peak validation set, four-peak validation set, five-peak validation set and seven-peak validation set according to the number of isotope peaks of the elements. The corresponding initial LightGBM models were trained using three-peak, four-peak, five-peak, and seven-peak training sets, respectively, and the trained initial LightGBM models were validated using three-peak, four-peak, five-peak, and seven-peak validation sets, respectively, to obtain the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model.

4. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 3, characterized in that, The corresponding initial LightGBM models were trained using three-peak, four-peak, five-peak, and seven-peak training sets, respectively, including: Three-peak, four-peak, five-peak, and seven-peak training sets were used respectively to train each initial LightGBM model based on the set learning rate and number of iterations, and the weighted cross-entropy loss function was used to optimize each initial LightGBM model.

5. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 1, characterized in that, Extracting peak signal data from the time-of-flight mass spectrometry data includes: The peak signals in the time-of-flight mass spectrometry data are identified and extracted using the find_peaks function through a multi-parameter joint optimization method, and the peak signal data is obtained. The multi-parameters include peak height, peak spacing and peak prominence.

6. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 5, characterized in that, The `find_peaks` function is used to identify and extract peak signals from the time-of-flight mass spectrometry data through a multi-parameter joint optimization method, resulting in peak signal data, including: The peak signals in the time-of-flight mass spectrometry data are identified and extracted using the find_peaks function and a multi-parameter joint optimization method; the peak signals include mass-to-charge ratio and relative intensity. The mass-to-charge ratio is calibrated and fault-tolerant to obtain the calibrated mass-to-charge ratio; The peak signal data is determined based on the calibrated mass-to-charge ratio and the relative intensity.

7. The machine learning-based time-of-flight mass spectrometry data processing method according to claim 1, characterized in that, The normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the corresponding elements of the three-peak data, four-peak data, five-peak data, and seven-peak data, including: The normalized three-peak data, the normalized four-peak data, the normalized five-peak data, and the normalized seven-peak data are respectively input into the three-peak LightGBM model, the four-peak LightGBM model, the five-peak LightGBM model, and the seven-peak LightGBM model to obtain the original score vector. The original score vector is converted into the predicted probability of the classification element using the Softmax function; Based on the predicted probabilities of the classification elements, the corresponding elements for three-peak, four-peak, five-peak, and seven-peak data are obtained.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the machine learning-based time-of-flight mass spectrometry data processing method according to any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the machine learning-based time-of-flight mass spectrometry data processing method according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the machine learning-based time-of-flight mass spectrometry data processing method according to any one of claims 1-7.