Mass spectrum analysis method, device, equipment and storage medium
By constructing a three-dimensional pixel matrix and extracting edge features, the problem of incorrect classification results caused by rounding of characteristic ions in the mass spectrum is solved and the accuracy of the classification results is improved.
Patent Information
- Application Number
- CN202310622755.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-05-29
AI Technical Summary
The existing rounding methods of characteristic ions in mass spectra lead to incorrect classification results, especially when the mass number is between two numbers. Different rounding methods may cause the peak position of characteristic ions to shift, thereby affecting the quality of the substance to be measured. Classification results.
By constructing a three-dimensional pixel matrix, the preset filling strategy and Gaussian convolution kernel are used to fill the mass spectrum data with pixel values, extract edge features, and input them into the pre-trained classification model for detection to reduce the error probability of the classification results.
It effectively avoids the shift in the characteristic ion peak position caused by the rounding method, improves the accuracy of the classification results of the substances to be measured, and reduces the probability of errors.
Smart Images

Figure CN116597227B
Abstract
Description
Technical Field
[0001] The present application relates to the field of mass spectrometry technology, and more specifically, to a mass spectrometry analysis method, device, equipment and storage medium. Background Art
[0002] The horizontal axis of the mass spectrum of the substance to be tested collected by the mass spectrometer is generally the flight time or mass number (i.e., mass-to-charge ratio), and the vertical axis is generally the intensity (such as peak height). Due to the fluctuation of mass spectrometer performance and the limitations of factors such as resolution, when the mass number is used as the horizontal axis of the mass spectrum, the collected mass number will fluctuate around the true mass number.
[0003] At present, the mass number is generally corrected based on the characteristic peaks on the mass spectrum and then rounded, and the type of the substance to be tested is determined based on the mass number after the rounding operation and the characteristic peaks corresponding to the mass number.
[0004] However, when the horizontal coordinate of the characteristic ion in the mass spectrum is in the middle of two mass numbers, different rounding methods may cause the peak position of the characteristic ion to shift, thereby causing errors in the classification results of the substance to be tested.
[0005] Therefore, how to reduce the probability of errors in the classification results of the substances to be tested is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The purpose of the present application is to provide a mass spectrum analysis method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, which can reduce the probability of errors in the classification results of the substances to be tested.
[0007] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0008] In a first aspect, an embodiment of the present application provides a mass spectrum analysis method, the method comprising:
[0009] Acquire a mass spectrum data set according to a mass spectrum of the substance to be tested, wherein the mass spectrum data set includes multiple pairs of mass spectrum data;
[0010] According to the mass spectrometry data set, a preset filling strategy, and a preset Gaussian convolution kernel, pixel values are filled in pixel units in an original pixel matrix of a preset size to obtain an initial pixel matrix, wherein the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information, and third color information;
[0011] Extracting edge features from the initial pixel matrix to obtain edge features;
[0012] The edge feature is input into a pre-trained classification model, and the classification model performs classification detection processing to obtain the type of the substance to be tested, wherein the classification model is trained based on a pre-constructed training sample, and the training sample includes a sample edge feature obtained by performing edge feature extraction on a sample pixel matrix, and the pixel value of each sample pixel unit in the sample pixel matrix includes first color information, second color information, and third color information.
[0013] Optionally, the step of filling pixel values of pixel units in an original pixel matrix of a preset size according to the mass spectrum data set, a preset filling rule and a preset Gaussian convolution kernel to obtain an initial pixel matrix includes:
[0014] According to the parameters of the convolution operation performed by the Gaussian convolution kernel and the size of the original pixel matrix, the original pixel matrix is converted into an intermediate pixel matrix;
[0015] Based on the preset filling strategy, determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set and a neighboring pixel unit of the target pixel unit;
[0016] According to the target pixel unit, the neighborhood pixel units of the target pixel unit, a preset Gaussian convolution kernel and the mass spectrum data set, each pixel unit in the intermediate pixel matrix is filled with pixel values to obtain an initial pixel matrix.
[0017] Optionally, the step of filling pixel values of each pixel unit in the intermediate pixel matrix according to the target pixel unit, the neighboring pixel units of the target pixel unit, a preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix includes:
[0018] 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 to characterize the intensity in each pair of mass spectrum data, and the second color information is used to characterize the mass number in each pair of mass spectrum data;
[0019] Obtaining first color information and second color information of neighboring pixel units of the target pixel unit according to the neighboring pixel units of the target pixel unit and a preset interpolation strategy;
[0020] The pixel matrix is subjected to sliding filtering processing according to the first color information and the second color information respectively corresponding to the target pixel unit and the neighboring pixel units of the target pixel unit and the Gaussian convolution kernel to obtain the third color information respectively corresponding to each pixel unit.
[0021] An initial pixel matrix is obtained according to the first color information and the second color information of the neighboring pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
[0022] Optionally, the extracting edge features from the initial pixel matrix to obtain edge features includes:
[0023] Performing an image dilation operation on the initial pixel matrix according to the pixel value of each pixel unit in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image dilation operation;
[0024] The edge features are extracted from the pixel matrix after the image dilation operation to obtain the edge features.
[0025] Optionally, performing edge feature extraction on the pixel matrix after the image dilation operation to obtain edge features includes:
[0026] Performing an image sharpening operation on the pixel matrix after the image dilation operation according to a preset Laplace template to obtain a plurality of isolated points in the pixel matrix after the image dilation operation;
[0027] Performing image enhancement processing according to the plurality of isolated points in the pixel matrix after the image dilation operation, a preset neighborhood pixel region, and a preset Laplace operator to obtain a pixel matrix after image enhancement;
[0028] Edge features are extracted from the pixel matrix after image enhancement to obtain edge features.
[0029] Optionally, acquiring a mass spectrum data set according to a mass spectrum of the substance to be tested includes:
[0030] Acquire an original mass spectrum data set according to the mass spectrum of the substance to be tested;
[0031] Normalizing the mass numbers in the original mass spectrometry data set according to a preset mass normalization strategy to obtain a normalized mass number;
[0032] Normalizing the intensity in the mass spectrometry data set according to a preset intensity normalization strategy to obtain a normalized intensity;
[0033] The mass spectrum data set is obtained according to the normalized mass number and the normalized intensity.
[0034] Optionally, before inputting the edge feature into a pre-trained classification model and performing classification detection processing by the classification model to obtain the type of the substance to be detected, the method further includes:
[0035] Acquire a sample mass spectrum data set corresponding to a plurality of sample mass spectra, wherein the sample mass spectrum data set includes a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data includes a sample mass number and a sample intensity corresponding to the sample mass number;
[0036] According to each of the sample mass spectrometry data sets and a preset filling strategy, pixel values are filled in each sample pixel unit in a sample original pixel matrix of a preset size to obtain a plurality of initial sample pixel matrices, wherein the pixel values of each sample pixel unit in the initial sample pixel matrix include first color information, second color information, and third color information;
[0037] Extracting edge features from each of the initial sample pixel matrices to obtain a plurality of sample edge features;
[0038] Constructing training samples according to the edge features of each sample and the type labels corresponding to the mass spectra of each sample;
[0039] The training samples are input into an initial classification model, and when a training stop condition is met, the classification model is obtained through training.
[0040] In a second aspect, an embodiment of the present application further provides a mass spectrum analysis device, the device comprising:
[0041] An acquisition module, used for acquiring a mass spectrum data set according to a mass spectrum of a substance to be tested, wherein the mass spectrum data set includes a plurality of pairs of mass spectrum data;
[0042] A filling module, used to fill pixel values of pixel units in an original pixel matrix of a preset size according to the mass spectrometry data set, a preset filling strategy and a preset Gaussian convolution kernel to obtain an initial pixel matrix, wherein the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information and third color information;
[0043] An extraction module, used for extracting edge features from the initial pixel matrix to obtain edge features;
[0044] A detection module is used to input the edge feature into a pre-trained classification model, and the classification model performs classification detection processing to obtain the type of the substance to be tested, wherein the classification model is trained based on a pre-constructed training sample, and the training sample includes a sample edge feature obtained by performing edge feature extraction on a sample pixel matrix, and the pixel value of each sample pixel unit in the sample pixel matrix includes a first color information, a second color information, and a third color information.
[0045] Optionally, the filling module is specifically used to convert the original pixel matrix into an intermediate pixel matrix based on the parameters of the convolution operation using the Gaussian convolution kernel and the size of the original pixel matrix; determine the target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set and the neighborhood pixel unit of the target pixel unit based on the preset filling strategy; fill the pixel units in the intermediate pixel matrix with pixel values according to the target pixel unit, the neighborhood pixel unit of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
[0046] Optionally, the filling module is also specifically used to fill each pair of mass spectrum data in the mass spectrum data set into the corresponding target pixel unit to obtain the first color information and the second color information of the target pixel unit, wherein the first color information is used to characterize the intensity in each pair of mass spectrum data, and the second color information is used to characterize the mass number in each pair of mass spectrum data; according to the neighborhood pixel units of the target pixel unit and the preset interpolation strategy, the first color information and the second color information of the neighborhood pixel units of the target pixel unit are obtained; according to the first color information and the second color information corresponding to the target pixel unit and the neighborhood pixel units of the target pixel unit, respectively, and the Gaussian convolution kernel, the pixel matrix is subjected to sliding filtering processing to obtain the third color information corresponding to each pixel unit; 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, an initial pixel matrix is obtained.
[0047] Optionally, the extraction module is specifically used to perform an image dilation operation on the initial pixel matrix according to the pixel value of each pixel unit in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image dilation operation; and perform edge feature extraction on the pixel matrix after the image dilation operation to obtain edge features.
[0048] Optionally, the extraction module is further specifically used to perform an image sharpening operation on the pixel matrix after the image dilation operation according to a preset Laplace template to obtain multiple isolated points in the pixel matrix after the image dilation operation; perform image enhancement processing according to the multiple isolated points in the pixel matrix after the image dilation operation, a preset neighborhood pixel area and a preset Laplace operator to obtain the pixel matrix after image enhancement; perform edge feature extraction on the pixel matrix after image enhancement to obtain edge features.
[0049] Optionally, the acquisition module is specifically used to acquire an original mass spectrum data set according to the mass spectrum of the substance to be tested; normalize the mass number in the original mass spectrum data set according to a preset mass normalization strategy to obtain a normalized mass number; normalize the intensity in the mass spectrum data set according to a preset intensity normalization strategy to obtain a normalized intensity; and obtain the mass spectrum data set based on the normalized mass number and the normalized intensity.
[0050] Optionally, the device further comprises: a training module;
[0051] The training module is used to obtain a sample mass spectrum data set corresponding to a plurality of sample mass spectra, wherein the sample mass spectrum data set includes a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data includes a sample mass number and a sample intensity corresponding to the sample mass number; according to each of the sample mass spectrum data sets and a preset filling strategy, each sample pixel unit in a sample original pixel matrix of a preset size is filled with a pixel value to obtain a plurality of initial sample pixel matrices, wherein the pixel value of each sample pixel unit in the initial sample pixel matrix includes a first color information, a second color information and a third color information; edge feature extraction is performed on each of the initial sample pixel matrices to obtain a plurality of sample edge features; training samples are constructed according to each of the sample edge features and the type labels corresponding to each of the sample mass spectra; the training samples are input into an initial classification model, and when a training stop condition is met, the classification model is obtained by training.
[0052] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the mass spectrometry analysis method of the first aspect above.
[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the mass spectrometry analysis method of the first aspect are executed.
[0054] The beneficial effects of this application are:
[0055] The embodiment of the present application provides a mass spectrometry analysis method, device, equipment and storage medium. After obtaining a mass spectrometry data set containing multiple pairs of mass spectrometry data according to the mass spectrometry of the substance to be tested, the method can construct an image initial pixel matrix based on the mass spectrometry data set, a preset filling strategy and a preset Gaussian convolution kernel, so that the two-dimensional mass spectrometry can be expanded to an image matrix containing three-dimensional pixels (first color information, second color information, and third color information). Based on this, the type of the substance to be tested is obtained by using the edge features obtained after edge feature extraction of the initial pixel matrix containing three-dimensional pixels and the classification model obtained by pre-training according to the constructed training samples, so as to avoid the phenomenon that the peak position of the characteristic ion may be offset by using the rounding method, and reduce the probability of errors in the classification results of the substance to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] 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.
[0057] Figure 1 A schematic diagram of a mass spectrum analysis method provided in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of another mass spectrum analysis method provided in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of a process flow of another mass spectrum analysis method provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of a process flow of another mass spectrum analysis method provided in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of the structure of a mass spectrum analysis device provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0064] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0065] 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.
[0066] The mass spectrum analysis method mentioned in this application is illustrated as follows with reference to the accompanying drawings. Figure 1 A schematic diagram of a mass spectrum analysis method provided in an embodiment of the present application. Figure 1 As shown, the method may include:
[0067] S101. Acquire a mass spectrum data set according to the mass spectrum of the substance to be tested.
[0068] The mass spectrum data set includes multiple pairs of mass spectrum data. The substance to be tested is input into the mass spectrometer, and after being processed in sequence by the ion source, mass analyzer, and ion detector in the mass spectrometer, a mass spectrum corresponding to the substance to be tested can be generated. The horizontal axis in the mass spectrum represents the mass numbers corresponding to the multiple characteristic ions in the substance to be tested, and the vertical axis represents the intensity corresponding to each mass number.
[0069] Exemplarily, the peak position (intensity) corresponding to each characteristic ion can be detected from the mass spectrum of the substance to be tested, and then the horizontal coordinate (mass number) corresponding to each peak position can be determined, so that multiple pairs of mass spectrum data can be obtained, and the multiple pairs of mass spectrum data can be combined into a mass spectrum data set.
[0070] S102, filling pixel values of pixel units in an original pixel matrix of a preset size according to the mass spectrometry data set, a preset filling strategy, and a preset Gaussian convolution kernel to obtain an initial pixel matrix.
[0071] Among them, the pixel value of each pixel unit in the initial pixel matrix includes first color information, second color information and third color information, the first color information, the second color information and the third color information can constitute an RGB pixel value, the first color information is equivalent to color R, the second color information is equivalent to color B, and the third color information is equivalent to color G.
[0072] Exemplarily, after obtaining the mass spectrum data set corresponding to the substance to be tested, a three-dimensional pixel image matrix can be constructed based on the 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, where M represents the number of rows of the original pixel matrix, and N represents the number of columns of the original pixel matrix. M is usually related to the maximum mass number in the mass spectrum data set, which is m times the maximum mass number, and N is usually equal to M. Such an original pixel matrix includes M*N pixel units.
[0073] Among them, the preset filling strategy is used to indicate the reference grid size selected when filling the pixel value, such as the reference grid size can be 3*3, 6*6, etc., and this application does not limit it. Assuming that the reference grid size is 3*3, then multiple reference grid areas can be obtained according to the reference grid size and the initial pixel matrix, and each pair of mass spectrum data in the mass spectrum data set can be filled into the pixel unit corresponding to the central area of each reference grid area, and the intensity and mass number in the mass spectrum data are used as the first color information and the second color information in the pixel unit corresponding to the central area of the reference grid area, respectively. At the same time, 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 0 or 1, so that the pixel value of each pixel unit can be obtained. The pixel matrix includes the first color information and the second color information.
[0074] Based on this, a sliding filter process is performed on the pixel matrix according to a Gaussian convolution kernel of a preset size, and the third color information of each pixel unit is obtained according to the result of each sliding filter process, thereby obtaining an initial pixel matrix. It can be seen that the initial pixel matrix is equivalent to a three-dimensional pixel image matrix, which represents the mass spectrum data of the substance to be tested through three-dimensional color information.
[0075] S103: extract edge features from the initial pixel matrix to obtain edge features.
[0076] Among them, after obtaining the initial pixel matrix, the initial pixel matrix with low discrimination can be enhanced through various image processing methods (such as image expansion processing, image sharpening processing, etc.) to obtain edge features.
[0077] S104, inputting the edge features into a pre-trained classification model, and performing classification detection processing by the classification model to obtain the type of the substance to be detected.
[0078] Among them, the classification model is obtained by training based on pre-constructed training samples, and the training samples include sample edge features obtained by extracting edge features from a sample pixel matrix, and the pixel values of each sample pixel unit in the sample pixel matrix include first color information, second color information, and third color information. The construction process of the sample edge features in the training samples can be described in the above-mentioned relevant parts, and will not be described here. After the classification model is obtained according to the above-mentioned training method, the edge features corresponding to the substance to be tested are input into the classification model, and the output result of the classification model can characterize the type of the substance to be tested. For example, assuming that the substance to be tested is a biosol, the biological type corresponds to label 0, and the non-biological type corresponds to label 1, then when the output result of the classification model is 0, it means that the biosol is a biological type, otherwise it is a non-biological type.
[0079] In summary, in the mass spectrum analysis method provided by the present application, after obtaining a mass spectrum data set containing multiple pairs of mass spectrum data according to the mass spectrum of the substance to be tested, an 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 the two-dimensional mass spectrum can be expanded to an image matrix containing three-dimensional pixels (first color information, second color information, and third color information). Based on this, the type of the substance to be tested is obtained by using the edge features obtained by edge feature extraction of the initial pixel matrix containing three-dimensional pixels and the classification model obtained by pre-training according to the constructed training samples, so as to avoid the phenomenon that the peak position of the characteristic ion may be offset by the use of the rounding method, and reduce the probability of errors in the classification results of the substance to be tested.
[0080] Figure 2 A schematic diagram of another mass spectrum analysis method provided in an embodiment of the present application. Figure 2 As shown, the above-mentioned pixel values are filled for each pixel unit in the original pixel matrix of a 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, including:
[0081] S201. Convert the original pixel matrix into an intermediate pixel matrix according to the parameters of the convolution operation performed using the Gaussian convolution kernel and the size of the original pixel matrix.
[0082] Among them, the parameters for the convolution operation using the Gaussian convolution kernel may include the size of the Gaussian convolution kernel, the step size, etc., and the original pixel matrix is filled according to the size of the Gaussian convolution kernel, the step size, and the size of the original pixel matrix, and the original pixel matrix is converted into an intermediate pixel matrix, so that the size of the obtained initial pixel matrix can be consistent with the size of the original pixel matrix. The original pixel matrix is converted into an intermediate pixel matrix, that is, a plurality of pixel units are filled on the edge of the original pixel matrix. The number of filled pixel units is not limited in this application, as long as the size of the initial pixel matrix is guaranteed to be consistent with that of the original pixel matrix. For example, assuming that the size of the Gaussian convolution kernel is 2*2, the step size is 1, and the size of the original pixel matrix is 4*4, then a plurality of pixel units, such as one pixel unit, can be filled around the original pixel matrix, that is, the original pixel matrix of 4*4 is converted into an intermediate pixel matrix of 6*6.
[0083] S202: Based on a preset filling strategy, determine a target pixel unit and a neighboring 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.
[0084] Exemplarily, the preset filling strategy includes filling the intermediate pixel matrix with pixel values according to a preset reference grid size, wherein the reference grid size may be 3*3, 6*6, etc., and the intermediate pixel matrix may be divided according to the reference grid size, and the intermediate pixel matrix is divided into multiple reference grid areas, and the grid corresponding to the central area of each reference grid area is used as the target pixel unit, and the other grids outside the grid corresponding to the central area of the reference grid area are used as neighborhood pixel units of the target pixel unit. It should be noted that the present application does not limit the number of intermediate grids. For example, assuming that the reference grid size is 3*3, the initial pixel matrix can be divided into multiple reference grid areas of 3*3 size, and a central grid corresponding to the central area of each reference grid area can be used as the target pixel unit, and the other grids in the reference grid area except the central grid can be used as the neighboring pixel units of the target pixel unit; if the reference grid size is 6*6, the initial pixel matrix can be divided into multiple reference grid areas of 6*6 size, and (2*2) grids corresponding to the central area of each reference grid area can be used as the target pixel unit, and the other grids in the reference grid area except the grid corresponding to the central area can be used as the neighboring pixel units of the target pixel unit.
[0085] S203, filling pixel values of each pixel unit in the intermediate pixel matrix according to the target pixel unit, the neighboring pixel units of the target pixel unit, the preset Gaussian convolution kernel and the mass spectrum data set to obtain an initial pixel matrix.
[0086] Among them, after the target pixel unit and the neighboring 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 neighboring pixel units in the intermediate pixel matrix can be obtained based on the mass spectrum data set, and then the third color information of each pixel unit is determined based on the 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 the pixel value of each pixel unit in the initial pixel matrix.
[0087] Optionally, each pair of mass spectrum data in the mass spectrum data set is filled into the corresponding target pixel unit to obtain first color information and second color information of the target pixel unit, the first color information is used to characterize the intensity in each pair of mass spectrum data, and the second color information is used to characterize the mass number in each pair of mass spectrum data; according to the neighborhood pixel units of the target pixel unit and a preset interpolation strategy, the first color information and second color information of the neighborhood pixel units of the target pixel unit are obtained; according to the first color information, second color information and Gaussian convolution kernel corresponding to the target pixel unit and the neighborhood pixel units of the target pixel unit, respectively, the pixel matrix is subjected to sliding filtering processing to obtain third color information corresponding to each pixel unit; according to the first color information and second color information of the neighborhood pixel units of the target pixel unit and the third color information corresponding to each pixel unit, an initial pixel matrix is obtained.
[0088] Exemplarily, the intensity corresponding to the mass number in the mass spectrum data can be filled into the corresponding target pixel unit in a filling order from left to right and from top to bottom. At this time, a target pixel unit is taken as an example to illustrate, and the intensity in the mass spectrum data is used as the first color information of the target pixel unit, and the mass number corresponding to the intensity is used as the second color information of the target pixel unit.
[0089] After determining the first color information and the second color information of each target pixel unit, the first color information and the second color information of each neighboring pixel unit can be determined according to a preset interpolation strategy. In one feasible example, the preset interpolation strategy is to assign the first color information of each neighboring pixel unit to 0 and the second color information to 1. In another feasible example, the preset interpolation strategy 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 can be used as the first color information of the neighboring pixel unit in the same column as the target pixel unit, and the first color information and the second color information of the neighboring pixel units in other columns can be determined according to the first color information, the second color information and the interpolation interval of the adjacent target pixel unit, so that the quality number represented by the second color information of the target pixel unit can be extended to other pixel units.
[0090] After the first color information and the second color information of each intermediate pixel unit are determined, the weights corresponding to each unit on the Gaussian convolution kernel and the value of the second color information on each pixel unit can be used to perform a convolution operation, and the convolution result can be used as the third color information of multiple pixel units. Continuing with the above example, the intermediate pixel matrix of 6*6 is subjected to a sliding filter processing with a step size of 1 using a Gaussian convolution kernel of 2*2 to obtain a first pixel matrix of 5*5. The pixel values of each pixel unit on the first pixel matrix include the first color information, the second color information, and the third color information. Finally, the pixel units in the outer circle of the first pixel matrix can be used to obtain an initial pixel matrix of 4*4. The pixel values of each pixel unit on the initial pixel matrix include the first color information, the second color information, and the third color information.
[0091] Figure 3 A schematic diagram of a process flow of another mass spectrum analysis method provided in the present application embodiment. Figure 3 As shown, optionally, the above-mentioned edge feature extraction of the initial pixel matrix to obtain edge features includes:
[0092] S301, performing an image dilation operation on the initial pixel matrix according to the pixel value of each pixel unit in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image dilation operation.
[0093] S302: extract edge features from the pixel matrix after the image dilation operation to obtain edge features.
[0094] Exemplarily, the size of the preset convolution template can be consistent with the size of the Gaussian convolution kernel mentioned above. During the movement process, the Gaussian convolution kernel performs an "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. If the AND results corresponding to the three color information are all 0, then the values corresponding to the three color information can be scaled to 1 / 4 of the original. Otherwise, the values corresponding to the three color information are enlarged by 1 / 4 and then averaged with the reference value specified on the convolution template. The average processing result is used as the pixel value of the pixel unit. Finally, the pixel matrix after the image expansion operation can be obtained, which can increase the distinction between adjacent mass numbers on the quality map. After obtaining the pixel matrix after the image expansion operation, edge feature extraction can be performed on the pixel matrix after the image expansion operation to obtain edge features.
[0095] Figure 4 A schematic diagram of a process flow of another mass spectrum analysis method provided in an embodiment of the present application. Figure 4 As shown, the above-mentioned edge feature extraction is performed on the pixel matrix after the image expansion operation to obtain edge features, including:
[0096] S401, performing an image sharpening operation on the pixel matrix after the image dilation operation according to a preset Laplace template to obtain a plurality of isolated points in the pixel matrix after the image dilation operation.
[0097] S402, performing image enhancement processing according to a plurality of isolated points in the pixel matrix after the image dilation operation, a preset neighborhood pixel region, and a preset Laplace operator to obtain a pixel matrix after image enhancement.
[0098] S403: extract edge features from the pixel matrix after image enhancement to obtain edge features.
[0099] Among them, the preset Laplace template can be consistent with the size of the convolution template mentioned above. By moving the window of the Laplace template on the pixel matrix after the image dilation operation, the dilation parameter corresponding to each pixel unit on the pixel matrix after the image dilation operation can be determined, and the dilation parameter corresponding to each pixel unit is compared with the preset threshold, and multiple isolated points are obtained according to the comparison result.
[0100] After detecting and obtaining multiple isolated points in the pixel matrix after the image expansion operation, the isolated points can be first connected into a boundary line, and then the preset Laplace operator is used to perform image enhancement on the preset neighborhood pixel area of the pixel unit on the boundary line. If the value of the third color information of the central pixel unit of the neighborhood pixel area 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, the value of the third color information of the central pixel unit of the neighborhood pixel unit can be reduced by 1 / 4 times, otherwise it is enlarged by 1 / 4 times. Finally, the pixel matrix after image enhancement can be obtained, and then edge feature extraction is performed on the pixel matrix after image enhancement to obtain edge features.
[0101] Optionally, the above-mentioned obtaining a mass spectrum data set according to the mass spectrum of the substance to be tested includes: obtaining an original mass spectrum data set according to the mass spectrum of the substance to be tested; normalizing the mass number in the original mass spectrum data set according to a preset mass normalization strategy to obtain a normalized mass number; normalizing the intensity in the mass spectrum data set according to a preset intensity normalization strategy to obtain a normalized intensity; and obtaining a mass spectrum data set based on the normalized mass number and the normalized intensity.
[0102] Exemplarily, after obtaining the mass spectrum of the substance to be tested, the peak positions of multiple characteristic ions (i.e., the ordinates on the mass spectrum) and the abscissas corresponding to the peak positions can be extracted from the mass spectrum to obtain multiple pairs of raw mass spectrum data, i.e., each pair of raw mass spectrum data includes the peak position (intensity) and the mass number. Multiple pairs of raw mass spectrum data are combined into a raw mass spectrum data set. It should be noted that the present application does not limit the number of raw mass spectrum data.
[0103] Here, x represents the mass number in the original mass spectrum data set, and y represents the intensity in the original mass spectrum data set. The preset mass normalization strategy can be to normalize the mass number using the maximum and minimum values to obtain the normalized mass number x':
[0104] x'=(x–min(x)) / (max(x)–min(x))
[0105] Among them, min(x) represents the smallest mass number in the original mass spectrum data set, and max(x) represents the largest mass number in the original mass spectrum data set.
[0106] The preset intensity normalization strategy can be to normalize the intensity using the logarithm to obtain the normalized intensity y':
[0107] y'=log10(y) / log10(max(y))
[0108] Where max(y) represents the maximum intensity in the original mass spectrum data set.
[0109] It can be seen that the mass number and intensity in each pair of original mass spectrometry data can be normalized to the normalized mass number and the normalized intensity, respectively, that is, each pair of mass data includes the normalized mass number and the normalized intensity, and each pair of mass spectrometry data constitutes a mass spectrometry data set.
[0110] It should be noted that the quality normalization strategy and strength normalization strategy mentioned above are only examples and are not limited in this application.
[0111] Optionally, before the above-mentioned edge feature is input into the pre-trained classification model and the classification model performs classification detection processing to obtain the type of the substance to be tested, the method also includes: obtaining a sample mass spectrum data set corresponding to a plurality of sample mass spectra, the sample mass spectrum data set including a plurality of pairs of sample mass spectrum data, each pair of sample mass spectrum data including 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 of a preset size to obtain a plurality of initial sample pixel matrices, the pixel value of each sample pixel unit in the initial sample pixel matrix including first color information, second color information and third color information; performing edge feature extraction on each initial sample pixel matrix to obtain a plurality of sample edge features; constructing a training sample according to each sample edge feature and the type label corresponding to each sample mass spectrum; inputting the training sample into the initial classification model, and training to obtain the classification model when the training stop condition is met.
[0112] Exemplarily, the model framework of the initial classification model can be a SVM (Support Vector Machine) model. When training the initial classification model, it is first necessary to construct a training sample, which includes features and labels corresponding to the features. The features in the training sample are used as the input of the initial classification model, and the labels are used as the output of the initial classification model to train the initial classification model. When the training stop condition is met, the classification model can be trained. The features in the training sample are the sample edge features mentioned above, and the labels are the type labels mentioned above. The construction process of the sample edge features can be described in the above-mentioned relevant parts, and will not be explained here. It can be understood that each sample mass spectrum corresponds to a sample edge feature, and each sample mass spectrum corresponds to a type label. The type label is used to characterize the type of the sample substance and can be represented by 0 or 1. The sample edge features and type labels corresponding to each sample mass spectrum are composed of multiple training samples, and the initial classification model is trained using multiple training samples to obtain a classification model.
[0113] Figure 5 A schematic diagram of the structure of a mass spectrum analysis device provided in an embodiment of the present application. Figure 5 As shown, the device comprises:
[0114] An acquisition module 501 is used to acquire a mass spectrum data set according to a mass spectrum of a substance to be tested, wherein the mass spectrum data set includes a plurality of pairs of mass spectrum data;
[0115] A filling module 502 is used to fill pixel values of pixel units in an original pixel matrix of 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, wherein the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information, and third color information;
[0116] An extraction module 503 is used to extract edge features from the initial pixel matrix to obtain edge features;
[0117] The detection module 504 is used to input the edge features into a pre-trained classification model, and the classification model performs classification detection processing to obtain the type of the substance to be tested, wherein the classification model is trained based on a pre-constructed training sample, and the training sample includes the sample edge features obtained by extracting the edge features of the sample pixel matrix, and the pixel value of each sample pixel unit in the sample pixel matrix includes the first color information, the second color information and the third color information.
[0118] Optionally, the filling module 502 is specifically used to convert the original pixel matrix into an intermediate pixel matrix according to the parameters of the convolution operation using the Gaussian convolution kernel and the size of the original pixel matrix; based on a preset filling strategy, determine the target pixel unit and the neighborhood pixel unit of the target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set; fill the pixel value 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 data set to obtain an initial pixel matrix.
[0119] Optionally, the filling module 502 is also specifically used to fill each pair of mass spectrum data in the mass spectrum data set into the corresponding target pixel unit to obtain the first color information and the second color information of the target pixel unit, the first color information is used to characterize the intensity in each pair of mass spectrum data, and the second color information is used to characterize the mass number in each pair of mass spectrum data; according to the neighborhood pixel units of the target pixel unit and the preset interpolation strategy, the first color information and the second color information of the neighborhood pixel units of the target pixel unit are obtained; according to the first color information, the second color information and the Gaussian convolution kernel corresponding to the target pixel unit and the neighborhood pixel units of the target pixel unit, respectively, the pixel matrix is subjected to sliding filtering processing to obtain the third color information corresponding to each pixel unit; 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, the initial pixel matrix is obtained.
[0120] Optionally, the extraction module 503 is specifically used to perform an image dilation operation on the initial pixel matrix according to the pixel value of each pixel unit in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image dilation operation; and perform edge feature extraction on the pixel matrix after the image dilation operation to obtain edge features.
[0121] Optionally, the extraction module 503 is further specifically used to perform an image sharpening operation on the pixel matrix after the image dilation operation according to a preset Laplace template to obtain multiple isolated points in the pixel matrix after the image dilation operation; perform image enhancement processing according to the multiple isolated points in the pixel matrix after the image dilation operation, a preset neighborhood pixel area and a preset Laplace operator to obtain the pixel matrix after image enhancement; perform edge feature extraction on the pixel matrix after image enhancement to obtain edge features.
[0122] Optionally, the acquisition module 501 is specifically used to obtain an original mass spectrum data set based on the mass spectrum of the substance to be tested; normalize the mass number in the original mass spectrum data set according to a preset mass normalization strategy to obtain a normalized mass number; normalize the intensity in the mass spectrum data set according to a preset intensity normalization strategy to obtain a normalized intensity; obtain a mass spectrum data set based on the normalized mass number and the normalized intensity.
[0123] Optionally, the device further comprises: a training module;
[0124] The training module is used to obtain a sample mass spectrum data set corresponding to a plurality of sample mass spectra, wherein the sample mass spectrum data set includes a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data includes 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, each sample pixel unit in a sample original pixel matrix of a preset size is filled with a pixel value to obtain a plurality of initial sample pixel matrices, wherein the pixel value of each sample pixel unit in the initial sample pixel matrix includes first color information, second color information and third color information; edge feature extraction is performed on each initial sample pixel matrix to obtain a plurality of sample edge features; training samples are constructed according to each sample edge feature and a type label corresponding to each sample mass spectrum; the training samples are input into an initial classification model, and when a training stop condition is met, a classification model is obtained through training.
[0125] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0126] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0127] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 601, a storage medium 602 and a bus 603, the storage medium 602 stores machine-readable instructions executable by the processor 601, when the electronic device is running, the processor 601 and the storage medium 602 communicate through the bus 603, and the processor 601 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0128] Optionally, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method embodiment are executed.
[0129] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0132] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0134] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A mass spectrum analysis method, characterized in that: The method comprises: Acquire a mass spectrum data set according to a mass spectrum of the substance to be tested, wherein the mass spectrum data set includes multiple pairs of mass spectrum data; According to the mass spectrometry data set, a preset filling strategy, and a preset Gaussian convolution kernel, pixel values are filled in pixel units in an original pixel matrix of a preset size to obtain an initial pixel matrix, wherein the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information, and third color information, and the original pixel matrix includes M*N pixel units, wherein M represents the number of rows of the original pixel matrix, and N represents the number of columns of the original pixel matrix; Extracting edge features from the initial pixel matrix to obtain edge features; Inputting the edge feature into a pre-trained classification model, and performing classification detection processing by the classification model to obtain the type of the substance to be tested, wherein the classification model is trained based on a pre-constructed training sample, and the training sample includes a sample edge feature obtained by performing edge feature extraction on a sample pixel matrix, and the pixel value of each sample pixel unit in the sample pixel matrix includes first color information, second color information, and third color information; The method of filling pixel values of pixel units in an original pixel matrix of 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 includes: According to the parameters of the convolution operation performed by the Gaussian convolution kernel and the size of the original pixel matrix, the original pixel matrix is converted into an intermediate pixel matrix; Based on the preset filling strategy, determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set and a neighboring pixel unit of the target pixel unit; According to the target pixel unit, the neighborhood pixel units of the target pixel unit, a preset Gaussian convolution kernel and the mass spectrum data set, pixel values are filled in the pixel units in the intermediate pixel matrix to obtain an initial pixel matrix.
2. The method according to claim 1, characterized in that The method of filling pixel values of pixel units in the intermediate pixel matrix according to the target pixel unit, the neighboring 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 to characterize the intensity in each pair of mass spectrum data, and the second color information is used to characterize the mass number in each pair of mass spectrum data; Obtaining first color information and second color information of neighboring pixel units of the target pixel unit according to the neighboring pixel units of the target pixel unit and a preset interpolation strategy; Perform sliding filtering on the pixel matrix according to the first color information and the second color information respectively corresponding to the target pixel unit and the neighboring pixel units of the target pixel unit and the Gaussian convolution kernel to obtain third color information respectively corresponding to each pixel unit; An initial pixel matrix is obtained according to the first color information and the second color information of the neighboring pixel units of the target pixel unit and the third color information corresponding to each pixel unit.
3. The method according to claim 1, characterized in that: The step of extracting edge features from the initial pixel matrix to obtain edge features includes: Performing an image dilation operation on the initial pixel matrix according to the pixel value of each pixel unit in the initial pixel matrix and a preset convolution template to obtain a pixel matrix after the image dilation operation; The edge features are extracted from the pixel matrix after the image dilation operation to obtain the edge features.
4. The method according to claim 3, characterized in that: The step of extracting edge features from the pixel matrix after the image dilation operation to obtain edge features includes: Performing an image sharpening operation on the pixel matrix after the image dilation operation according to a preset Laplace template to obtain a plurality of isolated points in the pixel matrix after the image dilation operation; Performing image enhancement processing according to the plurality of isolated points in the pixel matrix after the image dilation operation, a preset neighborhood pixel region, and a preset Laplace operator to obtain a pixel matrix after image enhancement; Edge features are extracted from the pixel matrix after image enhancement to obtain edge features.
5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining a mass spectrum data set according to the mass spectrum of the substance to be tested comprises: Acquire an original mass spectrum data set according to the mass spectrum of the substance to be tested; Normalizing the mass numbers in the original mass spectrometry data set according to a preset mass normalization strategy to obtain a normalized mass number; Normalizing the intensity in the mass spectrometry data set according to a preset intensity normalization strategy to obtain a normalized intensity; The mass spectrum data set is obtained according to the normalized mass number and the normalized intensity.
6. The method according to any one of claims 1 to 4, characterized in that: Before inputting the edge features into a pre-trained classification model and performing classification detection processing by the classification model to obtain the type of the substance to be detected, the method further includes: Acquire a sample mass spectrum data set corresponding to a plurality of sample mass spectra, wherein the sample mass spectrum data set includes a plurality of pairs of sample mass spectrum data, and each pair of sample mass spectrum data includes a sample mass number and a sample intensity corresponding to the sample mass number; According to each of the sample mass spectrometry data sets and a preset filling strategy, pixel values are filled in each sample pixel unit in a sample original pixel matrix of a preset size to obtain a plurality of initial sample pixel matrices, wherein the pixel values of each sample pixel unit in the initial sample pixel matrix include first color information, second color information, and third color information; Extracting edge features from each of the initial sample pixel matrices to obtain a plurality of sample edge features; Constructing training samples according to the edge features of each sample and the type labels corresponding to the mass spectra of each sample; The training samples are input into an initial classification model, and when a training stop condition is met, the classification model is obtained through training.
7. A mass spectrum analysis device, characterized in that: The device comprises: An acquisition module, used for acquiring a mass spectrum data set according to a mass spectrum of a substance to be tested, wherein the mass spectrum data set includes a plurality of pairs of mass spectrum data; A filling module, used to fill pixel values of pixel units in an original pixel matrix of a preset size according to the mass spectrometry data set, a preset filling strategy and a preset Gaussian convolution kernel to obtain an initial pixel matrix, wherein the pixel values of each pixel unit in the initial pixel matrix include first color information, second color information and third color information, and the original pixel matrix includes M*N pixel units, wherein M represents the number of rows of the original pixel matrix, and N represents the number of columns of the original pixel matrix; An extraction module, used for extracting edge features from the initial pixel matrix to obtain edge features; A detection module, used for inputting the edge feature into a pre-trained classification model, and performing classification detection processing by the classification model to obtain the type of the substance to be detected, wherein the classification model is trained based on a pre-constructed training sample, the training sample includes a sample edge feature obtained by performing edge feature extraction on a sample pixel matrix, and the pixel value of each sample pixel unit in the sample pixel matrix includes first color information, second color information and third color information; The filling module is specifically used for: According to the parameters of the convolution operation performed by the Gaussian convolution kernel and the size of the original pixel matrix, the original pixel matrix is converted into an intermediate pixel matrix; Based on the preset filling strategy, determining a target pixel unit in the intermediate pixel matrix associated with each pair of mass spectrum data in the mass spectrum data set and a neighboring pixel unit of the target pixel unit; According to the target pixel unit, the neighborhood pixel units of the target pixel unit, a preset Gaussian convolution kernel and the mass spectrum data set, pixel values are filled in the pixel units in the intermediate pixel matrix to obtain an initial pixel matrix.
8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the mass spectrometer analysis method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the mass spectrum analysis method according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Method for identifying wine products
CN108445134A
Traditional Chinese medicine identification method based on traditional Chinese medicine chromatography-mass spectrometry high-dimensional image database
CN109870515A
