Method, device and electronic device for building an automated interpretation model for mass chromatograms
The automatic interpretation of mass chromatograms through the neural network model solves the problem of cumbersome manual interpretation in the existing technology and achieves more accurate and efficient petroleum exploration data analysis.
Patent Information
- Application Number
- CN202110935751.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-16
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-08-16
AI Technical Summary
Existing mass chromatogram processing methods rely on manual interpretation, which is cumbersome and time-consuming, limiting the accuracy and widespread application of compound analysis in petroleum exploration.
A neural network model is used to automatically interpret mass chromatograms. By acquiring and processing chromatographic curve data, extracting feature data and calculating sample labels, the model is trained to achieve automated information analysis.
It realizes automated analysis of quality chromatograms, extracts more features, reflects more comprehensive information, supports high-dimensional analysis, and improves the accuracy and efficiency of data interpretation in petroleum exploration.
Smart Images

Figure CN113567605B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated processing technology, and in particular to a method, device and electronic equipment for constructing an automated interpretation model of a mass chromatogram. Background Art
[0002] Gas chromatography-mass spectrometry (GC-MS) is an important analytical test method for oil exploration. The GC-MS system can identify and quantify many compounds in oil by separating mixed organic matter with a chromatograph and identifying the molecular structure with a mass spectrometer. The mass chromatogram is the original data obtained by GC-MS analysis. It consists of an undulating curve. Various raised peaks reflect the instrument's response to different compounds, and the area (or height) of the peak reflects the content of the compound. Based on this data, petroleum geochemists can analyze the age, parent material type, thermal maturity and other information of organic matter in oil and sediments, thereby providing important reference for maturity evaluation, oil source comparison and other work in the process of oil exploration.
[0003] Under the existing technical methods, mass chromatograms cannot be directly used for oil exploration related work. They need to be manually processed and interpreted by geochemical or analytical chemists. The general process includes a series of tedious operations such as peak annotation, compound identification, peak area integral calculation, and analysis report generation. Finally, the sterane C 29 αα20S / (20S+20R), terpane Ts / Tm and Ga / C 30 αβ and other parameters used to describe the geochemical characteristics of petroleum samples. Therefore, under the existing technical methods, mass chromatograms rely heavily on manual interpretation by professionals, and the processing process is cumbersome and time-consuming, with high technical and usage thresholds, which to a certain extent limits the widespread use of such data. In addition, due to the limitations of manual analysis methods, for very complex mixtures such as petroleum, only a small number of typical compounds can be used in actual work and research, resulting in a defect that reduces the accuracy of interpretation results and subsequent research. Summary of the invention
[0004] The objects of the present invention include, for example, providing a method, device and electronic device for constructing an automated interpretation model of a mass chromatogram, which can extract more features, reflect more comprehensive information and achieve high-dimensional analysis for the mass chromatogram.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a method for constructing an automated interpretation model for a mass chromatogram, the method comprising:
[0007] Obtaining mass chromatograms corresponding to multiple samples;
[0008] Processing each of the mass chromatograms to obtain corresponding characteristic data;
[0009] Calculate and obtain sample labels for each of the feature data;
[0010] The constructed neural network model is trained using the characteristic data carrying the sample labels until an interpretation model is obtained when the preset requirements are met. The interpretation model can be used to perform automated information parsing and analysis on the mass chromatogram to be processed.
[0011] In an optional embodiment, each of the mass chromatograms comprises a chromatographic curve;
[0012] The step of processing each of the mass chromatograms to obtain corresponding characteristic data comprises:
[0013] For each chromatographic curve in the mass chromatogram, extracting coordinate data of each curve point contained in the chromatographic curve;
[0014] Corresponding feature data is formed based on a plurality of coordinate data of the chromatographic curve.
[0015] In an optional embodiment, the step of extracting coordinate data of each curve point contained in the chromatographic curve includes:
[0016] Traversing each curve point included in the chromatogram curve, and obtaining the grayscale value of each curve point;
[0017] The curve points whose grayscale values meet the preset requirements are extracted, and the coordinate data of the extracted curve points in the longitudinal direction are obtained.
[0018] In an optional embodiment, the mass chromatogram corresponding to each of the samples comprises a plurality of mass sub-chromatograms, each of the mass sub-chromatograms having a different mass-to-charge ratio;
[0019] The step of extracting coordinate data of each curve point contained in the chromatographic curve in each of the mass chromatograms comprises:
[0020] For each of the mass sub-chromatograms contained in each of the mass chromatograms, intercepting a target chromatographic curve segment contained in the mass sub-chromatogram according to a preset rule;
[0021] The coordinate data of each curve point included in the target chromatogram curve segment in each of the mass sub-chromatograms is extracted.
[0022] In an optional embodiment, the step of forming corresponding characteristic data based on the plurality of coordinate data of the chromatographic curve comprises:
[0023] For each of the mass chromatograms, the coordinate data of the curve points of the target chromatogram curve segment of all the mass sub-chromatogram images contained in the mass chromatogram are combined to obtain the characteristic data of the mass chromatogram.
[0024] In an optional implementation, the step of calculating and obtaining a sample label of each feature data includes:
[0025] For each of the characteristic data, obtaining a biomarker parameter corresponding to the characteristic data;
[0026] According to the values of the biomarker parameters and the corresponding factor score coefficients, the sample labels corresponding to the characteristic data are calculated, and the sample labels include a maturity index and a maternal type index.
[0027] In an optional embodiment, the step of training the constructed neural network model using the feature data carrying the sample labels until the explanation model is obtained when the preset requirements are met includes:
[0028] Import the feature data carrying the sample labels into the constructed neural network model to obtain the model output labels;
[0029] According to the sample labels of the feature data, the model output labels and the constructed loss function, the model parameters of the neural network model are adjusted and then training is continued until the preset requirements are met, thereby obtaining an explanatory model obtained by training the neural network model.
[0030] In an optional embodiment, the plurality of samples include training samples and test samples, and the method further includes:
[0031] Importing the feature data of each of the test samples into the trained explanation model to obtain a test output label for each of the test samples;
[0032] The model performance evaluation value is calculated based on the number of test samples, test output labels, and test true labels.
[0033] In a second aspect, the present invention provides a device for constructing an automated interpretation model of a mass chromatogram, the device comprising:
[0034] An acquisition module, used for acquiring mass chromatograms corresponding to a plurality of samples;
[0035] A processing module, used for processing each of the mass chromatograms to obtain corresponding characteristic data;
[0036] A calculation module, used to calculate and obtain sample labels of each of the feature data;
[0037] The training module is used to train the constructed neural network model using the characteristic data carrying the sample labels until an explanation model is obtained when the preset requirements are met. The explanation model can be used to perform automated information parsing and analysis on the mass chromatogram to be processed.
[0038] In a third aspect, the present invention provides an electronic device comprising one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine executable instructions executable by the processor, and when the electronic device is running, the processor executes the machine executable instructions to perform the method steps described in any one of the aforementioned embodiments.
[0039] The beneficial effects of the embodiments of the present invention include, for example:
[0040] The present application provides a method, device and electronic device for constructing an automated interpretation model of a mass chromatogram, by obtaining mass chromatograms corresponding to a plurality of samples, processing each mass chromatogram to obtain corresponding characteristic data, and calculating sample labels of each characteristic data, using the characteristic data carrying the sample labels to train the constructed neural network model until an interpretation model is obtained when the preset requirements are met, and the interpretation model can be used for automated information parsing and analysis of the mass chromatogram to be processed. The scheme adopts a machine learning approach, and obtains an interpretation model by obtaining characteristic data and sample labels for training, so that it can be used to automatically realize the analysis and interpretation of mass chromatogram data, and can support the purpose of extracting more features of the mass chromatogram, reflecting more comprehensive information, and realizing high-dimensional analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flowchart of a construction method provided in an embodiment of the present application;
[0043] Figure 2 for Figure 1 Flow chart of sub-steps included in step S120;
[0044] Figure 3 for Figure 2 Flow chart of sub-steps included in step S121;
[0045] Figure 4 A schematic diagram of extracting curve points in a mass chromatogram provided in an embodiment of the present application;
[0046] Figure 5 for Figure 1 Another flowchart of the sub-steps included in step S120;
[0047] Figure 6 A schematic diagram of the interception and splicing of the mass sub-chromatogram provided in the embodiment of the present application;
[0048] Figure 7 for Figure 1 Flow chart of sub-steps included in step S130;
[0049] Figure 8 for Figure 1 Flow chart of sub-steps included in step S140;
[0050] Fig. 9 A flowchart of a testing method provided in an embodiment of the present application;
[0051] Fig.10 A schematic diagram comparing the actual values and interpreted values of the samples provided in the examples of the present application;
[0052] Fig.11 Another schematic diagram comparing the actual values and interpreted values of the samples provided in the examples of the present application;
[0053] Fig.12 A structural block diagram of an electronic device provided in an embodiment of the present application;
[0054] Fig.13 A block diagram of the functional modules of the construction device provided in an embodiment of the present application.
[0055] Icon: 110 - processor; 120 - memory; 130 - multimedia component; 140 - I / O interface; 150 - communication component; 200 - device for building an automated interpretation model for mass chromatograms; 210 - acquisition module; 220 - processing module; 230 - calculation module; 240 - training module. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0059] In the description of the present invention, it should be noted that the features in the embodiments of the present invention can be combined with each other without conflict.
[0060] See also Figure 1 , is a flow chart of a method for constructing an automated interpretation model of a mass chromatogram provided in an embodiment of the present application. The method steps defined in the process related to the construction method can be implemented by an electronic device with image and data analysis and processing functions. Figure 1 The specific process shown is described in detail.
[0061] Step S110, obtaining mass chromatograms corresponding to a plurality of samples respectively.
[0062] Step S120, processing each of the mass chromatograms to obtain corresponding characteristic data.
[0063] Step S130, calculating and obtaining sample labels of each of the feature data.
[0064] Step S140, training the constructed neural network model using the characteristic data carrying the sample labels until an explanation model is obtained when preset requirements are met. The explanation model can be used to perform automated information parsing and analysis on the mass chromatogram to be processed.
[0065] In this embodiment, the training and optimization of the interpretation model can be performed first. The mass chromatograms of multiple samples can be prepared in advance, and the analysis report of the qualitative and quantitative results of the mass chromatograms corresponding to each sample can also be obtained. Among them, the mass chromatograms of the same mass-to-charge ratio have a uniform scale, lateral range and resolution.
[0066] Since the obtained mass chromatogram is in the form of a picture, it is not convenient to directly use it for interpreting the training of the model. Therefore, in this embodiment, each mass chromatogram can be processed first to obtain the corresponding characteristic data, and the data in numerical form can be used for subsequent model training optimization.
[0067] To optimize the training of the explanation model, it is necessary to use the sample labels of the samples, combined with the differences between the sample labels and the model output, so as to train the model in a training direction that minimizes the differences. Therefore, in this embodiment, the sample labels of each feature data can be calculated.
[0068] On this basis, the constructed neural network model can be trained using feature data carrying sample labels until the training meets preset requirements, which can be unlimited, such as the number of training iterations reaching a set number, the loss function converges and no longer decreases, and the training time reaches a preset time.
[0069] The interpretation model obtained through training and optimization can be used to perform automated information parsing and analysis on subsequent mass chromatograms to be processed.
[0070] In this embodiment, a machine learning approach is adopted to obtain feature data and sample labels to train an interpretation model, which can be used to automatically realize the analysis and interpretation of mass chromatographic data, and can support the extraction of more features of the mass chromatogram, reflect more comprehensive information, and achieve the purpose of high-dimensional analysis.
[0071] In this embodiment, the mass chromatogram mainly includes the mass chromatogram curve, which can reflect the compounds that make up the sample. Figure 2 In this embodiment, the step of processing the mass chromatogram to obtain corresponding characteristic data includes the following implementations:
[0072] Step S121 : extracting coordinate data of each curve point contained in each chromatogram curve in the mass chromatogram.
[0073] Step S122: construct corresponding feature data based on the plurality of coordinate data of the chromatographic curve.
[0074] For each mass chromatogram, the chromatogram curve included in the mass chromatogram is composed of multiple curve points. Each curve point has corresponding coordinate data on the coordinate system where the chromatogram is located. The coordinate data of the multiple curve points included in the chromatogram curve corresponding to the sample can be used to form feature data, and the feature data can be in array form.
[0075] In this embodiment, the information in the form of pictures is converted into information in the form of numerical values represented by coordinate data in the above manner, which can facilitate the processing and training of the model.
[0076] In this embodiment, considering that the vertical coordinates in the chromatographic curve can represent the content of the compound in the petroleum sample, the coordinate data of the curve point in the vertical direction can be mainly obtained. In addition, considering that the chromatographic curve is also composed of pixels, in the vertical direction, the curve points under the same horizontal coordinate may not occupy only one pixel, and some of the pixels may have problems such as unclear display due to the difference in gray value. Therefore, please refer to Figure 3 In this embodiment, in the above step of extracting the coordinate data of each curve point in the chromatographic curve, it can be achieved by the following method:
[0077] Step S1211, traversing each curve point included in the chromatogram curve, and obtaining the gray value of each curve point;
[0078] Step S1212, extracting the curve points whose grayscale values meet the preset requirements, and obtaining the coordinate data of the extracted curve points in the longitudinal direction.
[0079] In image display, white and black can be divided into several levels according to the logarithmic relationship, which is called grayscale. The grayscale value generally ranges from 0 to 255, where the grayscale value of a white pixel is 255 and the grayscale value of a black pixel is 0.
[0080] The quality chromatogram is essentially a picture composed of several pixels with gray values between 0 and 255. Among them, the gray value is 0 and multiple pixels close to 0 can be highlighted from other white pixels with a gray value of 255, thus forming a chromatogram curve.
[0081] However, some curve points in the chromatogram curve may have higher grayscale values, that is, they appear gray visually. Therefore, for each curve point in the chromatogram curve, the grayscale value of each curve point can be obtained respectively, and the curve point with a grayscale value lower than a preset value can be determined as a curve point that meets the preset requirements, wherein the preset value can be set according to demand, for example, the preset value can be 1, 2, 3, etc.
[0082] In this way, the extracted curve points under each transverse coordinate value can accurately represent the corresponding longitudinal coordinate value under the transverse coordinate value. In this embodiment, the coordinate data of the extracted curve points in the longitudinal direction are obtained.
[0083] For example, Figure 4 As shown in , for a partially enlarged curve segment in a chromatographic curve, the curve points extracted under the first horizontal unit are curve points with a vertical coordinate of 5, the curve points extracted under the second horizontal unit are curve points with a vertical coordinate of 4, and the curve points extracted under the third horizontal unit are curve points with a vertical coordinate of 3. The curve points extracted later can be as follows Figure 4 as shown in .
[0084] In this way, the feature data composed of the coordinate data of the extracted curve points in the longitudinal direction can be a one-dimensional array.
[0085] In order to unify the coordinate data standards between different samples, in this embodiment, after obtaining the characteristic data of each sample in the form of a one-dimensional array, the array can be normalized so that the elements of each array are between 0 and 1. In detail, the normalization process can be performed according to the following formula:
[0086]
[0087] Wherein, x and x' represent the elements in the feature data before and after normalization, respectively, and min(x) and max(x) represent the minimum value and maximum value of the elements in the feature data of the same sample, respectively.
[0088] In this embodiment, for the same sample, when different mass-to-charge ratios are used for processing, the mass chromatograms obtained present different results. In order to more comprehensively analyze the components of petroleum compounds, in this embodiment, the mass chromatogram corresponding to each sample includes multiple mass sub-chromatograms, each of which has a different mass-to-charge ratio.
[0089] In order to facilitate the unified processing of subsequent models, multiple mass sub-chromatograms of the same sample can be spliced and imported into the model for model training. As a possible implementation method, please refer to Figure 5 , when extracting the coordinate data of each curve point contained in the chromatographic curve, it can be achieved by the following method:
[0090] Step S123 , for each of the mass sub-chromatograms contained in each of the mass chromatograms, intercepting a target chromatogram curve segment contained in the mass sub-chromatogram according to a preset rule.
[0091] Step S124, extracting coordinate data of each curve point included in the target chromatogram curve segment in each of the mass sub-chromatograms.
[0092] Please refer to Figure 6 In this embodiment, for each sample, an example is given in which the sample has two mass sub-chromatograms. Among them, there are two mass sub-chromatograms with a mass-to-charge ratio of m / z=217 and a mass-to-charge ratio of m / z=191. For each mass sub-chromatogram, one of the target chromatogram curve segments can be intercepted according to a preset rule. The preset rule can be to intercept a curve segment in the mass sub-chromatogram that can concentrate on reflecting the composition of the compound, for example, a curve segment containing the main peaks, troughs, etc. in the mass sub-chromatogram.
[0093] For example, Figure 6As shown in FIG. 1 , for a mass sub-chromatogram with a mass-to-charge ratio of 2.17, the intercepted target chromatogram curve segment is the curve segment in the dashed box, which contains the main peak portion. In detail, the mass sub-chromatogram intercepts C 27 The left side of the sterane (αα20S) peak starts at C 29 The curve segment ending at the right side of the sterane (αα20R) peak. For the mass sub-chromatogram with a mass-to-charge ratio of 191, similarly, the curve segment containing the main peak portion is intercepted. In detail, the mass sub-chromatogram intercepts the curve segment starting from the left side of the Ts peak to the C 30 The curve segment ends on the right side of the βα peak.
[0094] By sequentially stitching together the intercepted target chromatographic curve segments, we can obtain Figure 6 The stitched image shown in the middle of the second row.
[0095] After the curve segments of each mass sub-chromatogram contained in the mass chromatogram of the sample are intercepted, the characteristic data can be constructed in the following way:
[0096] The coordinate data of the curve points of the target chromatogram curve segment of all the mass sub-chromatograms included in the mass chromatogram are combined to obtain the characteristic data of the mass chromatogram.
[0097] In this embodiment, the coordinate data of each curve point in the target chromatogram curve segment can be obtained based on the above-mentioned method of obtaining coordinate data. The coordinate data of all curve points are combined to obtain an integrated set of characteristic data in the form of an array.
[0098] For example, taking the above as an example, the target chromatogram curve segment intercepted by the mass sub-chromatogram with a mass-to-charge ratio of 217 may include 900 curve points with horizontal pixel points, while the target chromatogram curve segment intercepted by the mass sub-chromatogram with a mass-to-charge ratio of 191 may include 300 curve points with horizontal pixel points. After the splicing is completed, the characteristic data formed by a one-dimensional array containing 1300 elements can be obtained.
[0099] The above method can be used to process the data of the mass chromatogram of the sample. In addition, it is necessary to calculate the sample labels of the feature data imported into the model in order to achieve model training optimization based on the labels.
[0100] See also Figure 7 In this embodiment, the sample label of the characteristic data of each sample can be calculated in the following way:
[0101] Step S131, for each of the characteristic data, obtaining a biomarker parameter corresponding to the characteristic data.
[0102] Step S132, calculating the sample label corresponding to the characteristic data according to the value of the biomarker parameter and the corresponding factor score coefficient, wherein the sample label includes a maturity index and a maternal type index.
[0103] In this embodiment, the biomarker parameters with the same petroleum geochemical meaning can be reduced in dimension by factor analysis, and the comprehensive index obtained by the dimension reduction is used as the label of the input feature.
[0104] In this embodiment, illustratively, 15 typical biomarker parameters may be used, as shown in Table 1. For each sample, the biomarker parameters corresponding to its characteristic data may be several of the 15 typical biomarker parameters.
[0105] Table 1
[0106] Serial number Corresponding biomarker parameters MI PMI 1 <![CDATA[C 30 * / C 29 Ts]]> 0.195 0.041 2 <![CDATA[C 30 * / C 30 ab]]> 0.139 -0.004 3 <![CDATA[C 29 bb / (aa+bb)]]> 0.231 0.188 4 <![CDATA[C 29 aa20S / (20S+20R)]]> 0.273 0.036 5 <![CDATA[C 30 ba / C 30 ab]]> -0.083 0.116 6 Ts / (Ts+Tm) 0.24 -0.029 7 <![CDATA[Regular sterane C 27 / C 27-29 > -0.038 -0.349 8 <![CDATA[Regular sterane C 28 / C 27-29 > -0.03 0.065 9 <![CDATA[Regular sterane C 29 / C 27-29 > 0.074 0.376 10 Rearranged steranes / regular steranes 0.118 -0.214 11 <![CDATA[ΣC 19 –C 26 TT / C 30 ab]]> -0.083 -0.024 12 <![CDATA[C 24 TET / C 30 ab]]> 0.024 0.04 13 <![CDATA[Ga / C 30 ab]]> -0.015 -0.028 14 <![CDATA[C 23 TT / C 30 ab]]> -0.075 -0.029 15 <![CDATA[C 29 ab / C 30 ab]]> -0.16 0.136
[0107] The sample label may include a maturity index MI and a maternal type index PMI, which can be calculated based on the values of the biomarker parameters and the corresponding factor score coefficients. The third and fourth columns in Table 1 represent the factor score coefficients of each biomarker parameter, respectively, and the values of the biomarker parameters can be obtained from the analysis report based on the qualitative and quantitative results of the mass chromatogram obtained in advance.
[0108] For example, for a certain sample, the C 29 αα20S / (20S+20R), Ts / (Ts+Tm), C 30 * / C 29 Ts, C 29 The maturity index (MI) can be calculated by reducing the dimension of six biomarker parameters with maturity meaning, such as ββ / (αα+ββ). 27 / C 27-29 、Regular sterane C 29 / C 27-29 The maternal type index (PMI) was calculated by reducing the factor scores of the three biomarker parameters with maternal type meanings, namely, rearranged steranes / regular steranes.
[0109] In this embodiment, the calculation formulas for the maturity index and the maternal type index can be respectively as follows:
[0110]
[0111]
[0112] Wherein, j represents the serial number of the biomarker parameter (see Table 1), n represents the total number of the corresponding biomarker parameters, α and β represent the factor score coefficients of the biomarker parameters on MI and PMI, respectively, and x represents the numerical value of the corresponding biomarker parameter.
[0113] In addition, in order to unify the standards of sample labels for each sample, the calculated sample labels can also be normalized to eliminate the differences in scales.
[0114] After processing the feature data and calculating the sample labels, the feature data carrying the sample labels can be imported into the constructed neural network model to perform model training. In this embodiment, the constructed neural network model can be a one-dimensional convolutional neural network (1D-CNN) model, which includes a convolutional layer, a pooling layer, and a fully connected layer connected in sequence.
[0115] Among them, the convolution layer consists of a set of convolution kernels with trainable parameters. The convolution kernel slides in a certain direction on the feature data of the input model and performs convolution operations on the covered data:
[0116]
[0117] Among them, f is the activation function, * represents the convolution operation, y represents the output of the convolution layer, and x i is the i-th local input data, k i is the corresponding convolution kernel, and b is the bias.
[0118] In this embodiment, the activation function f can use a linear function (RFLU), which can avoid the problems of gradient explosion and gradient disappearance. Its expression is as follows:
[0119]
[0120] After passing through the convolution layer, the pooling layer is reached. The pooling layer can sample the convolution layer operation results, which is used to reduce the amount of data and improve the operation speed. In this embodiment, the pooling layer samples the maximum pooling method (Max-pooling), which can be expressed as:
[0121] y=max(x1,x2,...,x n )
[0122] Among them, x is the input data, n is the size of the convolution kernel, and y is the output of the pooling operation.
[0123] The model also includes a fully connected layer at the end, which can be used to integrate differentiated local information to achieve global optimization.
[0124] See also Figure 8In this embodiment, the training of the neural network model can be achieved by the following methods:
[0125] Step S141, importing the feature data carrying the sample label into the constructed neural network model to obtain the model output label.
[0126] Step S142, according to the sample labels of the feature data, the model output labels and the constructed loss function, the model parameters of the neural network model are adjusted and the training is continued until the preset requirements are met, thereby obtaining an explanation model obtained by training the neural network model.
[0127] In this embodiment, the collected samples can be divided into training samples and test samples, for example, 70% of the collected samples are divided into training samples and the remaining 30% are test samples. The training samples and test samples are randomly divided to ensure that there is no difference in their data features.
[0128] When training the model, the feature data corresponding to the training samples can be used for training, and the feature data carrying the sample labels can be imported into the neural network model. The neural network model processes the feature data according to the above processing method to obtain the model output label.
[0129] The purpose of model training is to optimize the model so that the sample labels of the feature data are consistent with the model output labels as much as possible. The quality of the model can be judged by the constructed loss function. The loss function is constructed by the sample labels and the model output labels. The model training process is the process of minimizing the loss function.
[0130] After each iteration, the model parameters of the neural network model can be adjusted and training can continue until the preset requirements are met and the training is stopped to obtain an explanation model. The preset requirements can be that the loss function converges and no longer decreases, or reaches the set maximum number of iterations, or the iteration time reaches the set time, etc.
[0131] During model training, the batch size can be set to 32, the number of epochs can be set to 1000, and the gradient descent uses the Adagrad algorithm with the ability to adaptively adjust the learning rate.
[0132] Also, see Fig. 9 , the obtained explanation model can be evaluated using test samples, that is, the method provided in this embodiment can also include the following steps:
[0133] Step S210, importing the characteristic data of each test sample into the trained explanation model to obtain a test output label of each test sample.
[0134] Step S220, calculating the model performance evaluation value according to the number of test samples, the test output labels and the test true labels.
[0135] Similarly, each test sample can obtain corresponding feature data and test true labels through the above method. After the feature data of the test sample is imported into the explanation model and processed by the explanation model, the test output label can be output.
[0136] The evaluation of the explanation model can be achieved by comparing the difference between the test output label and the test true label. Specifically, in this embodiment, the evaluation can be performed using a determination coefficient evaluation model, where the determination coefficient can be calculated in the following way:
[0137]
[0138] Among them, m represents the number of test samples, y i is the true test label of the i-th test sample, p i represents the corresponding test output label, represents the average of all test true labels.
[0139] The determination coefficient obtained above can be used as a model performance evaluation value. When the model performance evaluation value reaches above a set value, it can be determined that the explanatory model can meet the requirements, for example, reaching above a set value of 0.8.
[0140] In this embodiment, the test real label includes a maturity indicator and a parent source type indicator, and the test output label accordingly includes a maturity indicator and a parent source type indicator.
[0141] Experiments have shown that the interpretation model trained in the above manner in this embodiment can achieve model performance evaluation values of 0.85 and 0.8 on maturity index and maternal type index. Fig.10 As shown in , the actual value is the test sample label, and the interpretation value is the test output label. In addition, the maturity index obtained by the interpretation model of this embodiment and the maturity index actually measured have a significant linear relationship, such as Fig.11 As shown in , the model performance evaluation value reaches 0.98, indicating that the automatic interpretation result of the interpretation model of this embodiment has good accuracy.
[0142] The automatic interpretation model construction scheme of the mass chromatogram provided in this embodiment can realize the functions of automatic analysis and interpretation of mass chromatogram data in the field of oil exploration, and the results have good accuracy, which can bring convenience to oil geological exploration work and research. More importantly, the present invention can extract more features of the mass chromatogram, reflect the information of the oil sample more comprehensively, and can realize high-dimensional analysis, providing a more accurate and efficient research method for this field.
[0143] Fig.12 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Fig.12 As shown, the electronic device may include: a processor 110 , a memory 120 , a multimedia component 130 , an I / O interface 140 , and a communication component 150 .
[0144] The processor 110 is used to control the overall operation of the electronic device to complete all or part of the steps of the above-mentioned construction method. The memory 120 is used to store various types of data to support the operation of the electronic device, and these data may include, for example, instructions for any processing software or method used to operate on the electronic device, and data related to the processing software.
[0145] The memory 120 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0146] The multimedia component 130 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 120 or sent through the communication component 150. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 140 provides an interface between the processor 110 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 150 is used for wired or wireless communication between the electronic device and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 150 may include: Wi-Fi module, Bluetooth module, NFC module.
[0147] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), digital signal processors 110 (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors 110 or other electronic components to execute the above-mentioned construction method.
[0148] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, such as a memory 120 including program instructions. The program instructions can be executed by a processor 110 of an electronic device to complete the above-mentioned construction method.
[0149] See also Fig.13 The embodiment of the present application also provides an automatic interpretation model building device 200 for a mass chromatogram. The building device can be understood as the above-mentioned electronic device, or the processor 110 of the electronic device, or can be understood as a software function module that is independent of the above-mentioned electronic device or the processor 110 and implements the above-mentioned automatic interpretation model building method for the mass chromatogram under the control of the electronic device.
[0150] like Fig.13 As shown, the automatic interpretation model building device 200 for mass chromatograms may include an acquisition module 210, a processing module 220, a calculation module 230 and a training module 240. The functions of each functional module of the building device are described in detail below.
[0151] An acquisition module 210 is used to acquire mass chromatograms corresponding to a plurality of samples;
[0152] It can be understood that the acquisition module 210 can be used to execute the above step S110. The detailed implementation of the acquisition module 210 can refer to the above content related to step S110.
[0153] A processing module 220, used for processing each of the mass chromatograms to obtain corresponding characteristic data;
[0154] It can be understood that the processing module 220 can be used to execute the above step S120. The detailed implementation of the processing module 220 can refer to the above content related to step S120.
[0155] A calculation module 230 is used to calculate and obtain a sample label of each of the feature data;
[0156] It can be understood that the calculation module 230 can be used to execute the above step S130. The detailed implementation of the calculation module 230 can refer to the above content related to step S130.
[0157] The training module 240 is used to train the constructed neural network model using the characteristic data carrying the sample labels until an explanation model is obtained when the preset requirements are met. The explanation model can be used to perform automated information parsing and analysis on the mass chromatogram to be processed.
[0158] It can be understood that the training module 240 can be used to execute the above step S140. The detailed implementation of the training module 240 can refer to the above content related to step S140.
[0159] In a possible implementation, each of the mass chromatograms includes a chromatographic curve; the processing module 220 may be specifically used for:
[0160] For each chromatographic curve in the mass chromatogram, extracting coordinate data of each curve point contained in the chromatographic curve;
[0161] Corresponding feature data is formed based on a plurality of coordinate data of the chromatographic curve.
[0162] In a possible implementation, the processing module 220 may be specifically used to extract the coordinate data in the following manner:
[0163] Traversing each curve point included in the chromatogram curve, and obtaining the pixel grayscale value of each curve point;
[0164] The curve points whose pixel grayscale values exceed a preset threshold are extracted, and the coordinate data of the extracted curve points in the longitudinal direction are obtained.
[0165] In a possible implementation, the mass chromatogram corresponding to each sample includes a plurality of mass sub-chromatograms, each of which has a different mass-to-charge ratio; the processing module 220 may be specifically used to obtain the coordinate data in the following manner:
[0166] For each of the mass sub-chromatograms contained in each of the mass chromatograms, intercepting a target chromatographic curve segment contained in the mass sub-chromatogram according to a preset rule;
[0167] The coordinate data of each curve point included in the target chromatogram curve segment in each of the mass sub-chromatograms is extracted.
[0168] In a possible implementation, the processing module 220 may be specifically used for:
[0169] For each of the mass chromatograms, the coordinate data of the curve points of the target chromatogram curve segment of all the mass sub-chromatogram images contained in the mass chromatogram are combined to obtain the characteristic data of the mass chromatogram.
[0170] In a possible implementation, the calculation module 230 may be specifically used for:
[0171] For each of the characteristic data, obtaining a biomarker parameter corresponding to the characteristic data;
[0172] According to the values of the biomarker parameters and the corresponding factor score coefficients, the sample labels corresponding to the characteristic data are calculated, and the sample labels include a maturity index and a maternal type index.
[0173] In a possible implementation, the training module 240 may be specifically used for:
[0174] Import the feature data carrying the sample labels into the constructed neural network model to obtain the model output labels;
[0175] According to the sample labels of the feature data, the model output labels and the constructed loss function, the model parameters of the neural network model are adjusted and then training is continued until the preset requirements are met, thereby obtaining an explanatory model obtained by training the neural network model.
[0176] In a possible implementation, the multiple samples include training samples and test samples, and the construction device further includes an evaluation module, which can be used to:
[0177] Importing the feature data of each of the test samples into the trained explanation model to obtain a test output label for each of the test samples;
[0178] The model performance evaluation value is calculated based on the number of test samples, test output labels, and test true labels.
[0179] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0180] In summary, the embodiments of the present application provide a method, device and electronic device for constructing an automated interpretation model of a mass chromatogram, by obtaining mass chromatograms corresponding to a plurality of samples, processing each mass chromatogram to obtain corresponding feature data, and calculating sample labels of each feature data, and using the feature data carrying the sample labels to train the constructed neural network model until an interpretation model is obtained when the preset requirements are met, and the interpretation model can be used to perform automated information parsing analysis on the mass chromatogram to be processed. The scheme adopts a machine learning approach, and obtains an interpretation model by obtaining feature data and sample labels for training, so that it can be used to automatically realize the analysis and interpretation of mass chromatogram data, and can support the purpose of extracting more features of the mass chromatogram, reflecting more comprehensive information, and realizing high-dimensional analysis.
[0181] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for building an automated interpretation model for mass chromatograms, It is characterized in that The method comprises: Obtaining mass chromatograms corresponding to multiple samples; Processing each of the mass chromatograms to obtain corresponding characteristic data; Calculate and obtain sample labels for each of the feature data; The constructed neural network model is trained using the characteristic data carrying the sample labels until an explanation model is obtained when the preset requirements are met. The explanation model can be used to perform automated information parsing analysis on the mass chromatogram to be processed; Each of the mass chromatograms contains a chromatographic curve, and the step of processing each of the mass chromatograms to obtain corresponding characteristic data includes: For each chromatogram curve in the mass chromatogram, extract the coordinate data of each curve point contained in the chromatogram curve; and construct corresponding feature data based on the multiple coordinate data of the chromatogram curve; The step of extracting coordinate data of each curve point contained in the chromatographic curve comprises: Traversing each curve point included in the chromatographic curve, and obtaining the grayscale value of each curve point; extracting the curve point whose grayscale value meets the preset requirements, and obtaining the coordinate data of the extracted curve point in the longitudinal direction; The mass chromatogram corresponding to each sample includes a plurality of mass sub-chromatograms, each of which has a different mass-to-charge ratio; the step of extracting coordinate data of each curve point included in the chromatographic curve in each of the mass chromatograms comprises: For each of the mass sub-chromatograms contained in each of the mass chromatograms, intercepting the target chromatogram curve segment contained in the mass sub-chromatogram according to a preset rule; extracting the coordinate data of each curve point contained in the target chromatogram curve segment in each of the mass sub-chromatograms; The step of forming corresponding characteristic data based on a plurality of coordinate data of the chromatographic curve comprises: For each of the mass chromatograms, coordinate data of curve points of the target chromatogram curve segment of all mass sub-chromatogram images contained in the mass chromatogram are combined to obtain characteristic data of the mass chromatogram; The step of calculating and obtaining a sample label of each feature data comprises: For each of the characteristic data, a biomarker parameter corresponding to the characteristic data is obtained; based on the numerical value of the biomarker parameter and the corresponding factor score coefficient, a sample label corresponding to the characteristic data is calculated, the sample label includes a maturity index and a maternal type index, and the maturity index and the maternal type index are calculated through the numerical value of the biomarker parameter and the corresponding factor score coefficient.
2. The method for constructing an automated interpretation model for a mass chromatogram according to claim 1, It is characterized in that The step of training the constructed neural network model using the feature data carrying the sample labels until the explanation model is obtained when the preset requirements are met includes: Import the feature data carrying the sample labels into the constructed neural network model to obtain the model output labels; According to the sample labels of the feature data, the model output labels and the constructed loss function, the model parameters of the neural network model are adjusted and training is continued until the preset requirements are met, thereby obtaining an explanatory model obtained by training the neural network model.
3. The method for constructing an automated interpretation model of a mass chromatogram according to claim 1 or 2, It is characterized in that The plurality of samples include training samples and test samples, and the method further includes: Importing the feature data of each of the test samples into the trained explanation model to obtain a test output label for each of the test samples; The model performance evaluation value is calculated based on the number of test samples, test output labels, and test true labels.
4. A device for constructing an automated interpretation model of a mass chromatogram, It is characterized in that A method for constructing an automated interpretation model for a mass chromatogram according to any one of claims 1 to 3, the device comprising: An acquisition module, used for acquiring mass chromatograms corresponding to a plurality of samples; A processing module, used for processing each of the mass chromatograms to obtain corresponding characteristic data; A calculation module, used to calculate and obtain sample labels of each of the feature data; The training module is used to train the constructed neural network model using the characteristic data carrying the sample labels until an explanation model is obtained when the preset requirements are met. The explanation model can be used to perform automated information parsing and analysis on the mass chromatogram to be processed.
5. An electronic device, It is characterized in that The electronic device comprises one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine executable instructions executable by the processor, and when the electronic device is running, the processor executes the machine executable instructions to perform the method steps described in any one of claims 1 to 3.
