CN116597227A - Mass spectrogram analysis method, device, equipment and storage medium - Google Patents

Mass spectrogram analysis method, device, equipment and storage medium Download PDF

Info

Publication number
CN116597227A
CN116597227A CN202310622755.4A CN202310622755A CN116597227A CN 116597227 A CN116597227 A CN 116597227A CN 202310622755 A CN202310622755 A CN 202310622755A CN 116597227 A CN116597227 A CN 116597227A
Authority
CN
China
Prior art keywords
pixel
color information
mass spectrum
sample
spectrum data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310622755.4A
Other languages
Chinese (zh)
Inventor
陈林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Max Scientific Instrument Innovation Research Institute
Original Assignee
Guangdong Max Scientific Instrument Innovation Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Max Scientific Instrument Innovation Research Institute filed Critical Guangdong Max Scientific Instrument Innovation Research Institute
Priority to CN202310622755.4A priority Critical patent/CN116597227A/en
Publication of CN116597227A publication Critical patent/CN116597227A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Image Processing (AREA)

Abstract

The application provides a mass spectrogram analysis method, a mass spectrogram analysis device, mass spectrogram analysis equipment and a storage medium, and relates to the technical field of mass spectrograms. The method comprises the following steps: acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected, wherein the mass spectrum data set comprises a plurality of pairs of mass spectrum data; according to a mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel, filling pixel values of pixel units in an original pixel matrix with a preset size to obtain an initial pixel matrix, wherein the pixel values of all the pixel units in the initial pixel matrix comprise first color information, second color information and third color information; extracting edge characteristics of the initial pixel matrix to obtain edge characteristics; inputting the edge characteristics into a classification model obtained by training in advance, and performing classification detection processing by the classification model to obtain the type of the substance to be detected. By applying the embodiment of the application, the probability of error occurrence of the classification result of the substance to be detected can be reduced.

Description

Mass spectrogram analysis method, device, equipment and storage medium
Technical Field
The application relates to the technical field of mass spectrograms, in particular to a mass spectrogram analysis method, a mass spectrogram analysis device, mass spectrogram analysis equipment and a storage medium.
Background
The mass spectrum of a substance to be measured collected by a mass spectrometer is generally represented by the abscissa of time of flight or mass number (i.e., mass-to-charge ratio), and the ordinate of intensity (e.g., peak height). Due to mass spectrometer performance fluctuations and resolution limitations, the acquired mass numbers may fluctuate around the true mass numbers when using the mass numbers as mass spectrum abscissas.
At present, the quality number is generally corrected based on characteristic peaks on a mass spectrogram, then the quality number is rounded, and the type of a substance to be detected is determined according to the quality number after the rounding operation and the characteristic peaks corresponding to the quality number.
However, when the abscissa of the characteristic ion in the mass spectrogram is at the middle position of the two mass numbers, different rounding methods may cause the peak position of the characteristic ion to deviate, and thus the classification result of the substance to be measured is wrong.
Therefore, how to reduce the probability of error in the classification result of the substance to be tested is a technical problem to be solved currently.
Disclosure of Invention
The application aims to overcome the defects in the prior art and provide a mass spectrogram analysis method, a mass spectrogram analysis device, mass spectrogram analysis equipment and a storage medium, which can reduce the probability of error occurrence of a classification result of a substance to be detected.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a mass spectrogram analysis method, where the method includes:
acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected, wherein the mass spectrum data set comprises a plurality of pairs of mass spectrum data;
according to the mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel, filling pixel values of pixel units in an original pixel matrix with a preset size to obtain an initial pixel matrix, wherein the pixel values of all the pixel units in the initial pixel matrix comprise first color information, second color information and third color information;
extracting edge characteristics of the initial pixel matrix to obtain edge characteristics;
inputting the edge features into a classification model obtained by pre-training, and performing classification detection processing by the classification model to obtain the type of the substance to be detected, wherein the classification model is obtained by training based on a pre-constructed training sample, the training sample comprises sample edge features obtained by extracting the edge features of a sample pixel matrix, and pixel values of each sample pixel unit in the sample pixel matrix comprise first color information, second color information and third color information.
Optionally, the filling pixel values of the pixel units in the original pixel matrix with a preset size according to the mass spectrum dataset, a preset filling rule and a preset gaussian convolution kernel to obtain an initial pixel matrix includes:
converting the original pixel matrix into an intermediate pixel matrix according to parameters of convolution operation by using the Gaussian convolution kernel and the size of the original pixel matrix;
determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum dataset and a neighborhood pixel unit of the target pixel unit based on the preset filling strategy;
and filling pixel values of all pixel units in the intermediate pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
Optionally, the filling the pixel values of each pixel unit in the intermediate pixel matrix according to the target pixel unit, the neighborhood pixel unit of the target pixel unit, the preset gaussian convolution kernel, and the mass spectrum dataset to obtain an initial pixel matrix includes:
Filling each pair of mass spectrum data in the mass spectrum data set into a corresponding target pixel unit to obtain first color information and second color information of the target pixel unit, wherein the first color information is used for representing the intensity in each pair of mass spectrum data, and the second color information is used for representing the mass number in each pair of mass spectrum data;
obtaining first color information and second color information of a neighborhood pixel unit of the target pixel unit according to the neighborhood pixel unit of the target pixel unit and a preset interpolation strategy;
and performing sliding filtering processing according to the target pixel unit, the first color information, the second color information and the Gaussian convolution check pixel matrix which are respectively corresponding to the neighborhood pixel units of the target pixel unit, and obtaining third color information which is respectively corresponding to each pixel unit.
And obtaining an initial pixel matrix according to the first color information and the second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
Optionally, the extracting the edge feature from the initial pixel matrix to obtain an edge feature includes:
Performing image expansion operation on the initial pixel matrix according to pixel values of pixel units in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image expansion operation;
and extracting edge characteristics of the pixel matrix after the image expansion operation to obtain the edge characteristics.
Optionally, the extracting edge features from the pixel matrix after the image expansion operation to obtain edge features includes:
performing image sharpening operation on the pixel matrix after the image expansion operation according to a preset Laplace template to obtain a plurality of isolated points in the pixel matrix after the image expansion operation;
performing image enhancement processing according to a plurality of isolated points, a preset neighborhood pixel region and a preset Laplacian in the pixel matrix after the image expansion operation to obtain the pixel matrix after the image enhancement;
and extracting edge characteristics of the pixel matrix after the image enhancement to obtain edge characteristics.
Optionally, the acquiring a mass spectrum data set according to the mass spectrogram of the substance to be detected includes:
acquiring an original mass spectrum data set according to a mass spectrogram of the substance to be detected;
normalizing the mass numbers in the original mass spectrum data set according to a preset mass normalization strategy to obtain normalized mass numbers;
Normalizing the intensities in the mass spectrum data set according to a preset intensity normalization strategy to obtain normalized intensities;
and obtaining the mass spectrum data set according to the normalized mass number and the normalized intensity.
Optionally, the inputting the edge feature into a classification model obtained by training in advance, and performing classification detection processing by the classification model, and before obtaining the type of the substance to be detected, the method further includes:
acquiring a sample mass spectrum data set corresponding to a plurality of sample mass spectrograms, wherein the sample mass spectrum data set comprises a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data comprises a sample mass number and a sample intensity corresponding to the sample mass number;
according to each sample mass spectrum data set and a preset filling strategy, filling pixel values of each sample pixel unit in a sample original pixel matrix with a preset size to obtain a plurality of initial sample pixel matrixes, wherein the pixel values of each sample pixel unit in each initial sample pixel matrix comprise first color information, second color information and third color information;
extracting edge features of each initial sample pixel matrix to obtain a plurality of sample edge features;
According to the edge characteristics of each sample and the type labels corresponding to the mass spectrograms of each sample, training samples are constructed;
and inputting the training sample into an initial classification model, and training to obtain the classification model when the training stopping condition is met.
In a second aspect, an embodiment of the present application further provides a mass spectrogram analysis device, where the device includes:
the acquisition module is used for acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected, wherein the mass spectrum data set comprises a plurality of pairs of mass spectrum data;
the filling module is used for filling pixel values of pixel units in an original pixel matrix with a preset size according to the mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel to obtain an initial pixel matrix, wherein the pixel values of all the pixel units in the initial pixel matrix comprise first color information, second color information and third color information;
the extraction module is used for extracting edge characteristics of the initial pixel matrix to obtain edge characteristics;
the detection module is used for inputting the edge characteristics into a classification model obtained by pre-training, and performing classification detection processing by the classification model to obtain the type of the substance to be detected, wherein the classification model is obtained by training based on a pre-constructed training sample, the training sample comprises sample edge characteristics obtained by extracting the edge characteristics of a sample pixel matrix, and pixel values of each sample pixel unit in the sample pixel matrix comprise first color information, second color information and third color information.
Optionally, the filling module is specifically configured to convert the original pixel matrix into an intermediate pixel matrix according to a parameter of a convolution operation performed by using the gaussian convolution kernel and a size of the original pixel matrix; determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum dataset and a neighborhood pixel unit of the target pixel unit based on the preset filling strategy; and filling pixel values of all pixel units in the intermediate pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
Optionally, the filling module is further specifically configured to fill each pair of mass spectrum data in the mass spectrum data set into a corresponding target pixel unit, so as to obtain first color information and second color information of the target pixel unit, where the first color information is used for representing intensity in each pair of mass spectrum data, and the second color information is used for representing quality number in each pair of mass spectrum data; obtaining first color information and second color information of a neighborhood pixel unit of the target pixel unit according to the neighborhood pixel unit of the target pixel unit and a preset interpolation strategy; performing sliding filtering processing according to the target pixel unit, the first color information, the second color information and the Gaussian convolution check pixel matrix which are respectively corresponding to the neighborhood pixel units of the target pixel unit, and obtaining third color information which is respectively corresponding to each pixel unit; and obtaining an initial pixel matrix according to the first color information and the second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
Optionally, the extracting module is specifically configured to perform an image expansion operation on the initial pixel matrix according to a pixel value of each pixel unit in the initial pixel matrix and a preset convolution template, so as to obtain a pixel matrix after the image expansion operation; and extracting edge characteristics of the pixel matrix after the image expansion operation to obtain the edge characteristics.
Optionally, the extracting module is further specifically configured to perform an image sharpening operation on the pixel matrix after the image expansion operation according to a preset laplace template, so as to obtain a plurality of isolated points in the pixel matrix after the image expansion operation; performing image enhancement processing according to a plurality of isolated points, a preset neighborhood pixel region and a preset Laplacian in the pixel matrix after the image expansion operation to obtain the pixel matrix after the image enhancement; and extracting edge characteristics of the pixel matrix after the image enhancement to obtain edge characteristics.
Optionally, the acquiring module is specifically configured to acquire an original mass spectrum data set according to a mass spectrum of the substance to be detected; normalizing the mass numbers in the original mass spectrum data set according to a preset mass normalization strategy to obtain normalized mass numbers; normalizing the intensities in the mass spectrum data set according to a preset intensity normalization strategy to obtain normalized intensities; and obtaining the mass spectrum data set according to the normalized mass number and the normalized intensity.
Optionally, the apparatus further comprises: a training module;
the training module is used for acquiring sample mass spectrum data sets corresponding to a plurality of sample mass spectrograms, wherein the sample mass spectrum data sets comprise a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data comprises a sample mass number and a sample intensity corresponding to the sample mass number; according to each sample mass spectrum data set and a preset filling strategy, filling pixel values of each sample pixel unit in a sample original pixel matrix with a preset size to obtain a plurality of initial sample pixel matrixes, wherein the pixel values of each sample pixel unit in each initial sample pixel matrix comprise first color information, second color information and third color information; extracting edge features of each initial sample pixel matrix to obtain a plurality of sample edge features; according to the edge characteristics of each sample and the type labels corresponding to the mass spectrograms of each sample, training samples are constructed; and inputting the training sample into an initial classification model, and training to obtain the classification model when the training stopping condition is met.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the mass spectrogram analysis method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the mass spectrogram analysis method of the first aspect described above.
The beneficial effects of the application are as follows:
the embodiment of the application provides a mass spectrogram analysis method, a mass spectrogram analysis device, mass spectrogram analysis equipment and a storage medium. Based on the method, the type of the substance to be detected is obtained by utilizing the edge characteristics obtained after extracting the edge characteristics of the initial pixel matrix containing the three-dimensional pixels and the classification model obtained by pre-training according to the constructed training sample, so that the phenomenon that the peak position of the characteristic ions is possibly deviated by utilizing the rounding method can be avoided, and the probability of error occurrence of the classification result of the substance to be detected is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a mass spectrogram analysis method provided by an embodiment of the application;
fig. 2 is a flow chart of another mass spectrogram analysis method according to an embodiment of the present application;
fig. 3 is a flow chart of another mass spectrogram analysis method according to an embodiment of the present application;
fig. 4 is a flow chart of another mass spectrogram analysis method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a mass spectrogram analysis device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The mass spectrum analysis method according to the present application is exemplified as follows with reference to the accompanying drawings. Fig. 1 is a flow chart of a mass spectrogram analysis method according to an embodiment of the present application. As shown in fig. 1, the method may include:
s101, acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected.
Wherein the mass spectrometry dataset comprises a plurality of pairs of mass spectrometry data. And inputting the substance to be detected into a mass spectrometer, sequentially processing the substance to be detected by an ion source, a mass analyzer and an ion detector in the mass spectrometer, generating a mass spectrogram corresponding to the substance to be detected, wherein the abscissa in the mass spectrogram represents mass numbers corresponding to various characteristic ions in the substance to be detected, and the ordinate represents the intensity corresponding to each mass number.
The peak position (intensity) corresponding to each characteristic ion can be detected from the mass spectrogram of the substance to be detected, and then the abscissa (mass number) corresponding to each peak position is determined, so that a plurality of pairs of mass spectrum data can be obtained, and the plurality of pairs of mass spectrum data form a mass spectrum data set.
S102, filling pixel values of pixel units in an original pixel matrix with a preset size according to a mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel to obtain an initial pixel matrix.
The pixel values of each pixel unit in the initial pixel matrix include first color information, second color information and third color information, the first color information, the second color information and the third color information can form an RGB pixel value, the first color information corresponds to a color R, the second color information corresponds to a color B and the third color information corresponds to a color G.
For example, after a mass spectrum data set corresponding to a substance to be detected is acquired, a three-dimensional pixel image matrix may be constructed based on an original pixel matrix of a preset size, a preset filling strategy, a preset gaussian convolution kernel, and each pair of mass spectrum data in the mass spectrum data set. The size of the original pixel matrix is represented by m×n, M represents the number of rows of the original pixel matrix, N represents the number of columns of the original pixel matrix, M is generally related to the maximum mass number in the mass spectrum data set, M is M times the maximum mass number, N is generally equal to M, and such original pixel matrix includes m×n pixel units.
The preset filling policy is used to indicate the reference grid size selected when the pixel value is filled, for example, the reference grid size may be 3*3, 6*6, etc., which is not limited by the present application. Assuming that the reference grid size is 3*3, a plurality of reference grid areas can be obtained according to the reference grid size and the initial pixel matrix, each pair of mass spectrum data in the mass spectrum data set can be filled into pixel units corresponding to the central area of each reference grid area, the intensity and the mass number in the mass spectrum data are respectively used as first color information and second color information in the pixel units corresponding to the central area of the reference grid area, meanwhile, the initial values of the first color information and the second color information in other pixel units outside the central area of each reference grid area can be set to be 0 or 1, and thus, the pixel matrix comprising the first color information and the second color information in the pixel values of each pixel unit can be obtained.
Based on the above, sliding filter processing is performed according to a Gaussian convolution check pixel matrix with a preset size, and third color information of each pixel unit is obtained according to the result of each sliding filter processing, so that an initial pixel matrix is obtained. It can be seen that the initial pixel matrix corresponds to a three-dimensional pixel image matrix that characterizes mass spectral data of the substance to be measured by three-dimensional color information.
S103, extracting edge features of the initial pixel matrix to obtain edge features.
After the initial pixel matrix is obtained, the initial pixel matrix with low discrimination degree can be enhanced by various image processing modes (such as image expansion processing, image sharpening processing and the like), so that edge characteristics are obtained.
S104, inputting the edge characteristics into a classification model obtained through training in advance, and performing classification detection processing by the classification model to obtain the type of the substance to be detected.
The classification model is obtained based on training of a pre-constructed training sample, the training sample comprises sample edge characteristics obtained by extracting edge characteristics of a sample pixel matrix, and pixel values of sample pixel units in the sample pixel matrix comprise first color information, second color information and third color information. The construction process of the edge features of the training samples may be described in the relevant section above and will not be described here. After the classification model is obtained according to the training mode, the edge characteristics corresponding to the substance to be tested are input into the classification model, and the type of the substance to be tested can be represented by the output result of the classification model. For example, assuming that the substance to be tested is a bio-sol, the bio-type corresponds to tag 0, and the non-living one corresponds to tag 1, when the output result of the classification model is 0, it indicates that the bio-sol is a bio-type, and vice versa.
In summary, in the mass spectrogram analysis method provided by the application, after a mass spectrum data set containing a plurality of pairs of mass spectrum data is obtained according to the mass spectrogram of a substance to be detected, an image initial pixel matrix can be constructed based on the mass spectrum data set, a preset filling strategy and a preset gaussian convolution kernel, so that a two-dimensional mass spectrogram can be expanded into an image matrix containing three-dimensional pixels (first color information, second color information and third color information). Based on the method, the type of the substance to be detected is obtained by utilizing the edge characteristics obtained after extracting the edge characteristics of the initial pixel matrix containing the three-dimensional pixels and the classification model obtained by pre-training according to the constructed training sample, so that the phenomenon that the peak position of the characteristic ions is possibly deviated by utilizing the rounding method can be avoided, and the probability of error occurrence of the classification result of the substance to be detected is reduced.
Fig. 2 is a flow chart of another mass spectrogram analysis method according to an embodiment of the present application. Optionally, as shown in fig. 2, according to the mass spectrum data set, the preset filling rule and the preset gaussian convolution kernel, filling pixel values of each pixel unit in the original pixel matrix with a preset size to obtain an initial pixel matrix, including:
S201, converting the original pixel matrix into an intermediate pixel matrix according to parameters of convolution operation by using a Gaussian convolution kernel and the size of the original pixel matrix.
The parameters of the convolution operation by using the gaussian convolution kernel may include the size and the step size of the gaussian convolution kernel, and the filling processing is performed on the original pixel matrix according to the size and the step size of the gaussian convolution kernel and the size of the original pixel matrix, so that the original pixel matrix is converted into an intermediate pixel matrix, and thus the size of the obtained original pixel matrix is kept consistent with the size of the original pixel matrix. The original pixel matrix is converted into an intermediate pixel matrix, namely, a plurality of pixel units are filled on the edge of the original pixel matrix, and the number of the filled pixel units is not limited by the application, so long as the size of the original pixel matrix is ensured to be consistent with that of the original pixel matrix. For example, assuming that the gaussian convolution kernel is 2 x 2 in size, the step size is 1, and the original pixel matrix is 4*4 in size, a plurality of pixel units, such as one pixel unit, may be filled in the periphery of the original pixel matrix, that is, the original pixel matrix of 4*4 size is converted into the intermediate pixel matrix of 6*6 size.
S202, determining a target pixel unit and a neighborhood pixel unit of the target pixel unit in an intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set based on a preset filling strategy.
The preset filling policy includes pixel value filling of the intermediate pixel matrix according to a preset reference grid size, wherein the reference grid size may be 3*3, 6*6, etc., the intermediate pixel matrix may be divided according to the reference grid size, the intermediate pixel matrix is divided into a plurality of reference grid areas, the grid corresponding to the central area of each reference grid area is used as a target pixel unit, and the other grids except the grid corresponding to the central area of the reference grid area are all used as neighborhood pixel units of the target pixel unit. For example, assuming that the reference grid size is 3*3, the initial pixel matrix may be divided into a plurality of 3*3-sized reference grid regions, a center grid corresponding to a center region in each reference grid region may be taken as a target pixel unit, and other grids except the center grid in the reference grid region may be taken as neighbor pixel units of the target pixel unit; if the reference grid size is 6*6, the initial pixel matrix may be divided into a plurality of reference grid areas with 6*6, where (2×2) grids corresponding to the central area in each reference grid area may be used as target pixel units, and other grids except the grid corresponding to the central area in the reference grid area may be used as neighbor pixel units of the target pixel units.
S203, filling pixel values of each pixel unit in the middle pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
After the target pixel unit and the neighborhood pixel units of the target pixel unit are determined, the first color information and the second color information of the target pixel unit and the neighborhood pixel unit in the middle pixel matrix can be obtained based on the mass spectrum data set, then the third color information of each pixel unit is determined based on a preset Gaussian convolution kernel, and finally the first color information, the second color information and the third color information on each pixel unit are used as pixel values of each pixel unit in the initial pixel matrix.
Optionally, filling each pair of mass spectrum data in the mass spectrum data set into a corresponding target pixel unit to obtain first color information and second color information of the target pixel unit, wherein the first color information is used for representing the intensity in each pair of mass spectrum data, and the second color information is used for representing the quality number in each pair of mass spectrum data; obtaining first color information and second color information of a neighborhood pixel unit of the target pixel unit according to the neighborhood pixel unit of the target pixel unit and a preset interpolation strategy; performing sliding filtering processing according to the target pixel unit, the first color information, the second color information and the Gaussian convolution check pixel matrix which are respectively corresponding to the neighborhood pixel units of the target pixel unit, and obtaining third color information which is respectively corresponding to each pixel unit; and obtaining an initial pixel matrix according to the first color information and the second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
For example, intensities corresponding to mass numbers in the mass spectrum data may be filled into corresponding target pixel units according to a filling sequence from left to right and from top to bottom, and in this case, a target pixel unit is taken as an example for explanation, the intensities in the mass spectrum data are taken as first color information of the target pixel unit, and the mass numbers corresponding to the intensities are taken as second color information of the target pixel unit.
After the first color information and the second color information of each target pixel unit are determined, the first color information and the second color information of each neighborhood pixel unit can be determined according to a preset interpolation strategy. In one example, the preset interpolation strategy is to assign 0 to the first color information and 1 to the second color information of each neighboring pixel cell. In another possible example, the preset interpolation policy is to determine the first color information and the second color information of the neighboring pixel unit according to the first color information and the second color information of the target pixel unit, for example, the first color information of the target pixel unit may be used as the first color information of the neighboring pixel unit located in a column with the target pixel unit, and the first color information and the second color information of the neighboring pixel unit in other columns may be determined according to the first color information, the second color information and the interpolation interval of the neighboring pixel unit, so that the quality number represented by the second color information of the target pixel unit may be extended to other pixel units.
After the first color information and the second color information of each pixel unit in the middle are determined, a convolution operation can be performed by using the weight corresponding to each unit on the Gaussian convolution kernel and the value of the second color information on each pixel unit, and the convolution result is used as third color information of a plurality of pixel units. Continuing the above example, the intermediate pixel matrix of 6*6 is subjected to sliding filtering with a step length of 1 by using a gaussian convolution kernel of 2×2, so as to obtain a first pixel matrix of 5*5, where the pixel values of the pixel units on the first pixel matrix include first color information, second color information and third color information. Finally, the pixel units around the periphery of the first pixel matrix can be used for obtaining an initial pixel matrix with the size of 4*4, and the pixel values of the pixel units on the initial pixel matrix comprise first color information, second color information and third color information.
Fig. 3 is a flow chart of another mass spectrogram analysis method according to an embodiment of the present application. As shown in fig. 3, optionally, the extracting edge features from the initial pixel matrix to obtain edge features includes:
s301, performing image expansion operation on the initial pixel matrix according to pixel values of pixel units in the initial pixel matrix and a preset convolution template to obtain the pixel matrix after the image expansion operation.
S302, extracting edge features of the pixel matrix after the image expansion operation to obtain the edge features.
The size of the preset convolution template may be the same as the size of the above-mentioned gaussian convolution kernel, and the gaussian convolution kernel performs and operation with the value of the first color information, the value of the second color information, and the value of the third color information on each pixel unit in the moving process, if the corresponding and result of the three color information are all 0, the corresponding values of the three color information may be scaled to 1/4 of the original value, otherwise, the corresponding values of the three color information are amplified by 1/4 and then averaged with the reference value specified on the convolution template, and the average processing result is used as the pixel value of the pixel unit, so that the pixel matrix after the image expansion operation can be obtained, and the differentiation of the adjacent quality numbers on the quality map can be increased. After the pixel matrix after the image expansion operation is obtained, edge feature extraction can be performed on the pixel matrix after the image expansion operation to obtain edge features.
Fig. 4 is a flow chart of another method for resolving a mass spectrogram according to an embodiment of the present application. As shown in fig. 4, the extracting the edge feature from the pixel matrix after the image expansion operation to obtain the edge feature includes:
S401, performing image sharpening operation on the pixel matrix after the image expansion operation according to a preset Laplace template, and obtaining a plurality of isolated points in the pixel matrix after the image expansion operation.
S402, performing image enhancement processing according to a plurality of isolated points, a preset neighborhood pixel region and a preset Laplacian in the pixel matrix after the image expansion operation, and obtaining the pixel matrix after the image enhancement.
S403, extracting edge features of the pixel matrix after image enhancement to obtain edge features.
The preset Laplace template can be consistent with the size of the convolution template, a window of the Laplace template is moved on a pixel matrix after image expansion operation, expansion parameters corresponding to all pixel units on the pixel matrix after the image expansion operation can be determined, the expansion parameters corresponding to all pixel units are compared with a preset threshold value, and a plurality of isolated points are obtained according to comparison results.
After detecting a plurality of isolated points in the pixel matrix after the image expansion operation, connecting the isolated points into a boundary line, then carrying out image enhancement on a preset neighborhood pixel region of a pixel unit on the boundary line by using a preset Laplace operator, if the value of the third color information of the central pixel unit of the neighborhood pixel region of a certain pixel unit is lower than the average value of the third color information corresponding to other pixel units except the central pixel unit, reducing the value of the third color information of the central pixel unit of the neighborhood pixel unit by 1/4 times, otherwise amplifying by 1/4 times, finally obtaining the pixel matrix after image enhancement, and further carrying out edge feature extraction on the pixel matrix after image enhancement to obtain edge features.
Optionally, the acquiring a mass spectrum data set according to the mass spectrogram of the substance to be detected includes: acquiring an original mass spectrum data set according to a mass spectrogram of a substance to be detected; normalizing the mass numbers in the original mass spectrum data set according to a preset mass normalization strategy to obtain normalized mass numbers; normalizing the intensity in the mass spectrum data set according to a preset intensity normalization strategy to obtain normalized intensity; and obtaining a mass spectrum data set according to the normalized mass number and the normalized intensity.
For example, after obtaining a mass spectrogram of a substance to be detected, peak positions (i.e., ordinate on the mass spectrogram) of various characteristic ions and abscissa corresponding to the peak positions may be extracted from the mass spectrogram, so as to obtain a plurality of pairs of original mass spectrum data, i.e., each pair of original mass spectrum data includes the peak position (intensity) and the mass number. The original mass spectrum data set is composed of a plurality of pairs of original mass spectrum data, and it should be noted that the application does not limit the number of the original mass spectrum data.
The number of masses in the raw mass spectrum data set is denoted here by x and the intensity in the raw mass spectrum data set is denoted by y. The preset quality normalization strategy can normalize the quality number by using the maximum and minimum values to obtain a normalized quality number x':
x'=(x–min(x))/(max(x)–min(x))
Wherein min (x) represents the minimum mass number in the original mass spectrum data set, and max (x) represents the maximum mass number in the original mass spectrum data set.
The preset intensity normalization strategy may be to normalize the intensity by log logarithm to obtain normalized intensity y':
y'=log10(y)/log10(max(y))
where max (y) represents the maximum intensity in the raw mass spectrum dataset.
It can be seen that the mass number and intensity in each pair of raw mass spectrum data can be normalized to a normalized mass number and normalized intensity, respectively, i.e. each pair of mass data includes the normalized mass number and normalized intensity, and each pair of mass spectrum data is formed into a mass spectrum data set.
It should be noted that the above-mentioned quality normalization strategy and intensity normalization strategy are only examples, and the present application is not limited thereto.
Optionally, the method further includes, before inputting the edge features into a classification model obtained by training in advance and performing classification detection processing by the classification model to obtain the type of the substance to be detected: acquiring a sample mass spectrum data set corresponding to a plurality of sample mass spectrograms, wherein the sample mass spectrum data set comprises a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data comprises a sample mass number and a sample intensity corresponding to the sample mass number; according to each sample spectrum data set and a preset filling strategy, filling pixel values of each sample pixel unit in a sample original pixel matrix with a preset size to obtain a plurality of initial sample pixel matrixes, wherein the pixel values of each sample pixel unit in the initial sample pixel matrixes comprise first color information, second color information and third color information; extracting edge features of each initial sample pixel matrix to obtain a plurality of sample edge features; according to the edge characteristics of each sample and the type labels corresponding to each intrinsic spectrogram, training samples are constructed; and inputting the training sample into the initial classification model, and training to obtain the classification model when the training stopping condition is met.
The model framework of the initial classification model may be an SVM (Support Vector Machine ) model, when training the initial classification model, a training sample needs to be constructed, the training sample includes features and labels corresponding to the features, the features in the training sample are used as input of the initial classification model, the labels are used as output of the initial classification model to train the initial classification model, and when the training stop condition is met, the training model can be obtained. The features in the training samples are the sample edge features mentioned above, and the labels are labels of the type mentioned above. The construction process of the edge features of the sample may be as described in the relevant section above and will not be described here. It can be understood that according to the sample edge feature corresponding to each sample mass spectrogram, and each sample mass spectrogram corresponds to a type label, the type label is used for representing the type of the sample substance, and can be represented by 0 or 1, the sample edge feature corresponding to each sample mass spectrogram and the type label form a plurality of training samples, and the initial classification model is trained by using the plurality of training samples, so as to obtain the classification model.
Fig. 5 is a schematic structural diagram of a mass spectrogram analysis device according to an embodiment of the present application. As shown in fig. 5, the apparatus includes:
an acquisition module 501, configured to acquire a mass spectrum data set according to a mass spectrum of a substance to be detected, where the mass spectrum data set includes a plurality of pairs of mass spectrum data;
the filling module 502 is configured to fill pixel values of pixel units in an original pixel matrix with a preset size according to a mass spectrum data set, a preset filling policy and a preset gaussian convolution kernel, so as to obtain an initial pixel matrix, where the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information and third color information;
an extracting module 503, configured to extract edge features from the initial pixel matrix to obtain edge features;
the detection module 504 is configured to input the edge feature into a classification model obtained by training in advance, and perform classification detection processing by the classification model to obtain a type of a substance to be detected, where the classification model is obtained by training based on a training sample constructed in advance, the training sample includes a sample edge feature obtained by extracting the edge feature of a sample pixel matrix, and pixel values of each sample pixel unit in the sample pixel matrix include first color information, second color information, and third color information.
Optionally, a filling module 502, specifically configured to convert the original pixel matrix into an intermediate pixel matrix according to a parameter of a convolution operation performed by using a gaussian convolution kernel and a size of the original pixel matrix; determining a target pixel unit in an intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set and a neighborhood pixel unit of the target pixel unit based on a preset filling strategy; and filling pixel values of each pixel unit in the middle pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
Optionally, the filling module 502 is further specifically configured to fill each pair of mass spectrum data in the mass spectrum data set into a corresponding target pixel unit, so as to obtain first color information and second color information of the target pixel unit, where the first color information is used for representing intensity in each pair of mass spectrum data, and the second color information is used for representing quality numbers in each pair of mass spectrum data; obtaining first color information and second color information of a neighborhood pixel unit of the target pixel unit according to the neighborhood pixel unit of the target pixel unit and a preset interpolation strategy; performing sliding filtering processing according to the target pixel unit, the first color information, the second color information and the Gaussian convolution check pixel matrix which are respectively corresponding to the neighborhood pixel units of the target pixel unit, and obtaining third color information which is respectively corresponding to each pixel unit; and obtaining an initial pixel matrix according to the first color information and the second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
Optionally, the extracting module 503 is specifically configured to perform an image expansion operation on the initial pixel matrix according to the pixel values of each pixel unit in the initial pixel matrix and a preset convolution template, so as to obtain a pixel matrix after the image expansion operation; and extracting edge characteristics of the pixel matrix after the image expansion operation to obtain the edge characteristics.
Optionally, the extracting module 503 is further specifically configured to perform an image sharpening operation on the pixel matrix after the image expansion operation according to a preset laplace template, so as to obtain a plurality of isolated points in the pixel matrix after the image expansion operation; performing image enhancement processing according to a plurality of isolated points, a preset neighborhood pixel region and a preset Laplacian in the pixel matrix after the image expansion operation to obtain the pixel matrix after the image enhancement; and extracting edge characteristics of the pixel matrix after the image enhancement to obtain the edge characteristics.
Optionally, the acquiring module 501 is specifically configured to acquire an original mass spectrum data set according to a mass spectrum of a substance to be detected; normalizing the mass numbers in the original mass spectrum data set according to a preset mass normalization strategy to obtain normalized mass numbers; normalizing the intensity in the mass spectrum data set according to a preset intensity normalization strategy to obtain normalized intensity; and obtaining a mass spectrum data set according to the normalized mass number and the normalized intensity.
Optionally, the apparatus further comprises: a training module;
the training module is used for acquiring sample mass spectrum data sets corresponding to a plurality of sample mass spectrograms, wherein the sample mass spectrum data sets comprise a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data comprises a sample mass number and a sample intensity corresponding to the sample mass number; according to each sample spectrum data set and a preset filling strategy, filling pixel values of each sample pixel unit in a sample original pixel matrix with a preset size to obtain a plurality of initial sample pixel matrixes, wherein the pixel values of each sample pixel unit in the initial sample pixel matrixes comprise first color information, second color information and third color information; extracting edge features of each initial sample pixel matrix to obtain a plurality of sample edge features; according to the edge characteristics of each sample and the type labels corresponding to each intrinsic spectrogram, training samples are constructed; and inputting the training sample into the initial classification model, and training to obtain the classification model when the training stopping condition is met.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (Digital Signal Processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 6, the electronic device may include: processor 601, storage medium 602, and bus 603, storage medium 602 storing machine-readable instructions executable by processor 601, processor 601 executing machine-readable instructions to perform steps of the above-described method embodiments when the electronic device is operating, communicating between processor 601 and storage medium 602 via bus 603. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present application further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor performs the steps of the above-described method embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A mass spectrum analysis method, characterized in that the method comprises:
acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected, wherein the mass spectrum data set comprises a plurality of pairs of mass spectrum data;
according to the mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel, filling pixel values of pixel units in an original pixel matrix with a preset size to obtain an initial pixel matrix, wherein the pixel values of all the pixel units in the initial pixel matrix comprise first color information, second color information and third color information;
extracting edge characteristics of the initial pixel matrix to obtain edge characteristics;
inputting the edge features into a classification model obtained by pre-training, and performing classification detection processing by the classification model to obtain the type of the substance to be detected, wherein the classification model is obtained by training based on a pre-constructed training sample, the training sample comprises sample edge features obtained by extracting the edge features of a sample pixel matrix, and pixel values of each sample pixel unit in the sample pixel matrix comprise first color information, second color information and third color information.
2. The method according to claim 1, wherein the performing pixel value filling on the pixel units in the original pixel matrix with the preset size according to the mass spectrum data set, the preset filling rule and the preset gaussian convolution kernel to obtain an initial pixel matrix includes:
converting the original pixel matrix into an intermediate pixel matrix according to parameters of convolution operation by using the Gaussian convolution kernel and the size of the original pixel matrix;
determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum dataset and a neighborhood pixel unit of the target pixel unit based on the preset filling strategy;
and filling pixel values of the pixel units in the middle pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
3. The method according to claim 2, wherein the performing pixel value filling on the pixel units in the intermediate pixel matrix according to the target pixel unit, the neighborhood pixel units of the target pixel unit, the preset gaussian convolution kernel, and the mass spectrum data set to obtain an initial pixel matrix includes:
Filling each pair of mass spectrum data in the mass spectrum data set into a corresponding target pixel unit to obtain first color information and second color information of the target pixel unit, wherein the first color information is used for representing the intensity in each pair of mass spectrum data, and the second color information is used for representing the mass number in each pair of mass spectrum data;
obtaining first color information and second color information of a neighborhood pixel unit of the target pixel unit according to the neighborhood pixel unit of the target pixel unit and a preset interpolation strategy;
performing sliding filtering processing according to the target pixel unit, the first color information, the second color information and the Gaussian convolution check pixel matrix which are respectively corresponding to the neighborhood pixel units of the target pixel unit, and obtaining third color information which is respectively corresponding to each pixel unit;
and obtaining an initial pixel matrix according to the first color information and the second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
4. The method according to claim 1, wherein the extracting edge features from the initial pixel matrix to obtain edge features includes:
Performing image expansion operation on the initial pixel matrix according to pixel values of pixel units in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image expansion operation;
and extracting edge characteristics of the pixel matrix after the image expansion operation to obtain the edge characteristics.
5. The method according to claim 4, wherein the extracting edge features from the pixel matrix after the image expansion operation to obtain edge features includes:
performing image sharpening operation on the pixel matrix after the image expansion operation according to a preset Laplace template to obtain a plurality of isolated points in the pixel matrix after the image expansion operation;
performing image enhancement processing according to a plurality of isolated points, a preset neighborhood pixel region and a preset Laplacian in the pixel matrix after the image expansion operation to obtain the pixel matrix after the image enhancement;
and extracting edge characteristics of the pixel matrix after the image enhancement to obtain edge characteristics.
6. The method of any one of claims 1-5, wherein the acquiring a mass spectrum dataset from a mass spectrum of a substance to be measured comprises:
Acquiring an original mass spectrum data set according to a mass spectrogram of the substance to be detected;
normalizing the mass numbers in the original mass spectrum data set according to a preset mass normalization strategy to obtain normalized mass numbers;
normalizing the intensities in the mass spectrum data set according to a preset intensity normalization strategy to obtain normalized intensities;
and obtaining the mass spectrum data set according to the normalized mass number and the normalized intensity.
7. The method according to any one of claims 1 to 5, wherein the inputting the edge features into a classification model trained in advance, and performing classification detection processing by the classification model, and before obtaining the type of the substance to be measured, the method further comprises:
acquiring a sample mass spectrum data set corresponding to a plurality of sample mass spectrograms, wherein the sample mass spectrum data set comprises a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data comprises a sample mass number and a sample intensity corresponding to the sample mass number;
according to each sample mass spectrum data set and a preset filling strategy, filling pixel values of each sample pixel unit in a sample original pixel matrix with a preset size to obtain a plurality of initial sample pixel matrixes, wherein the pixel values of each sample pixel unit in each initial sample pixel matrix comprise first color information, second color information and third color information;
Extracting edge features of each initial sample pixel matrix to obtain a plurality of sample edge features;
according to the edge characteristics of each sample and the type labels corresponding to the mass spectrograms of each sample, training samples are constructed;
and inputting the training sample into an initial classification model, and training to obtain the classification model when the training stopping condition is met.
8. A mass spectrum analysis device, the device comprising:
the acquisition module is used for acquiring a mass spectrum data set according to a mass spectrogram of a substance to be detected, wherein the mass spectrum data set comprises a plurality of pairs of mass spectrum data;
the filling module is used for filling pixel values of pixel units in an original pixel matrix with a preset size according to the mass spectrum data set, a preset filling strategy and a preset Gaussian convolution kernel to obtain an initial pixel matrix, wherein the pixel values of all the pixel units in the initial pixel matrix comprise first color information, second color information and third color information;
the extraction module is used for extracting edge characteristics of the initial pixel matrix to obtain edge characteristics;
the detection module is used for inputting the edge characteristics into a classification model obtained by pre-training, and performing classification detection processing by the classification model to obtain the type of the substance to be detected, wherein the classification model is obtained by training based on a pre-constructed training sample, the training sample comprises sample edge characteristics obtained by extracting the edge characteristics of a sample pixel matrix, and pixel values of each sample pixel unit in the sample pixel matrix comprise first color information, second color information and third color information.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the spectrogram-resolving method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the mass spectrogram analysis method of any one of claims 1-7.
CN202310622755.4A 2023-05-29 2023-05-29 Mass spectrogram analysis method, device, equipment and storage medium Pending CN116597227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310622755.4A CN116597227A (en) 2023-05-29 2023-05-29 Mass spectrogram analysis method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310622755.4A CN116597227A (en) 2023-05-29 2023-05-29 Mass spectrogram analysis method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116597227A true CN116597227A (en) 2023-08-15

Family

ID=87606100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310622755.4A Pending CN116597227A (en) 2023-05-29 2023-05-29 Mass spectrogram analysis method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116597227A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160071711A1 (en) * 2013-04-22 2016-03-10 Shimadzu Corporation Imaging mass spectrometric data processing method and imaging mass spectrometer
CN108445134A (en) * 2018-04-20 2018-08-24 泸州品创科技有限公司 Alcohol product mirror method for distinguishing
CN109870515A (en) * 2017-12-01 2019-06-11 中国科学院大连化学物理研究所 A kind of Chinese medicine recognition methods based on Chinese medicine chromatography-mass spectroscopy high dimensional image library
CN110110743A (en) * 2019-03-26 2019-08-09 中国检验检疫科学研究院 A kind of seven class mass spectrogram automatic recognition system of world's common pesticides and chemical pollutant and method based on cloud platform
CN110579554A (en) * 2018-06-08 2019-12-17 萨默费尼根有限公司 3D mass spectrometric predictive classification
CN112183677A (en) * 2020-11-25 2021-01-05 湖北第二师范学院 Mass spectrum imaging classification method based on multichannel convolutional neural network
CN113989525A (en) * 2021-12-24 2022-01-28 湖南大学 Hyperspectral traditional Chinese medicinal material identification method of self-adaptive random block convolution kernel network
CN115206422A (en) * 2022-07-05 2022-10-18 深圳承启生物科技有限公司 Mass spectrum spectrogram analyzing method and device and intelligent terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160071711A1 (en) * 2013-04-22 2016-03-10 Shimadzu Corporation Imaging mass spectrometric data processing method and imaging mass spectrometer
CN109870515A (en) * 2017-12-01 2019-06-11 中国科学院大连化学物理研究所 A kind of Chinese medicine recognition methods based on Chinese medicine chromatography-mass spectroscopy high dimensional image library
CN108445134A (en) * 2018-04-20 2018-08-24 泸州品创科技有限公司 Alcohol product mirror method for distinguishing
CN110579554A (en) * 2018-06-08 2019-12-17 萨默费尼根有限公司 3D mass spectrometric predictive classification
CN110110743A (en) * 2019-03-26 2019-08-09 中国检验检疫科学研究院 A kind of seven class mass spectrogram automatic recognition system of world's common pesticides and chemical pollutant and method based on cloud platform
CN112183677A (en) * 2020-11-25 2021-01-05 湖北第二师范学院 Mass spectrum imaging classification method based on multichannel convolutional neural network
CN113989525A (en) * 2021-12-24 2022-01-28 湖南大学 Hyperspectral traditional Chinese medicinal material identification method of self-adaptive random block convolution kernel network
CN115206422A (en) * 2022-07-05 2022-10-18 深圳承启生物科技有限公司 Mass spectrum spectrogram analyzing method and device and intelligent terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
FLANAGAN, BM: "Rapid quantification of starch molecular order through multivariate modelling of 13C CP/MAS NMR spectra", CHEMICAL COMMMUNICATIONS, vol. 51, no. 80, 15 October 2015 (2015-10-15) *
张成坤;韩敏;: "基于边缘保持滤波的高光谱影像光谱-空间联合分类", 自动化学报, no. 02, 11 December 2017 (2017-12-11) *
邓蕾蕾;张献;王政皓;黄涛;王闯;: "农作物状态的三色信息边缘检测研究", 西南师范大学学报(自然科学版), no. 09, 20 September 2020 (2020-09-20) *

Similar Documents

Publication Publication Date Title
CN110032998B (en) Method, system, device and storage medium for detecting characters of natural scene picture
Song et al. Hyperspectral image classification based on KNN sparse representation
CN110298414B (en) Hyperspectral image classification method based on denoising combination dimensionality reduction and guided filtering
CN109993221B (en) Image classification method and device
CN112733858B (en) Image character rapid identification method and device based on character region detection
CN111353531A (en) Hyperspectral image classification method based on singular value decomposition and spatial spectral domain attention mechanism
CN114140683A (en) Aerial image target detection method, equipment and medium
CN114463637A (en) Winter wheat remote sensing identification analysis method and system based on deep learning
CN110008949B (en) Image target detection method, system, device and storage medium
CN114419430A (en) Cultivated land plot extraction method and device based on SE-U-Net +model
CN112819769B (en) Nonlinear hyperspectral image anomaly detection algorithm based on kernel function and joint dictionary
CN116503677B (en) Wetland classification information extraction method, system, electronic equipment and storage medium
CN116304624B (en) Quick radio storm searching method based on oblique line detection and curve fitting dispersion elimination
CN116597227A (en) Mass spectrogram analysis method, device, equipment and storage medium
CN115861823A (en) Remote sensing change detection method and device based on self-supervision deep learning
CN113537253B (en) Infrared image target detection method, device, computing equipment and storage medium
CN112949592B (en) Hyperspectral image classification method and device and electronic equipment
CN115273123A (en) Bill identification method, device and equipment and computer storage medium
CN115564709A (en) Evaluation method and system for robustness of power algorithm model in confrontation scene
CN111127434B (en) Dyeing separation method and device
CN112907495A (en) Spatial resolution enhancement method and device for hyperspectral image and electronic equipment
CN111797737A (en) Remote sensing target detection method and device
Chen et al. Low-rank decomposition model for adaptive identification of similar neighboring pixels in hyperspectral images
CN116245848B (en) Product defect detection method and related equipment
CN112927149B (en) Method and device for enhancing spatial resolution of hyperspectral image and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination