Mass spectrum peak identification method and device, computer equipment and storage medium
Through the lightweight U-Net model and channel space attention module, the automatic identification of mass spectrometry peaks is realized, solving the problems of low detection efficiency and large manual intervention in the existing technology, and improving the analysis efficiency and identification accuracy.
Patent Information
- Application Number
- CN202510284132.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-27
AI Technical Summary
Existing mass spectrometric peak recognition methods are difficult to automatically identify mass spectrometric peaks, resulting in low detection efficiency and increased manual intervention.
The lightweight U-Net model is adopted to extract the image features of the mass spectrogram through convolution and downsampling operations, and combine the bottleneck module and multi-layer decoder to extract and segment the result generation, and a channel space attention module is introduced to retain detailed information.
Automatic identification of mass spectrometry peaks is achieved, which significantly reduces manual intervention, improves analysis efficiency, and reduces computational burden through lightweight models.
Smart Images

Figure CN120220885A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of programming, and particularly to a method, device, computer device and storage medium for mass spectrometry peak recognition. Background Art
[0002] Due to its advantages such as high sensitivity, high resolution, and wide dynamic range, mass spectrometry is widely used in analytical techniques in many fields, such as medicine, environmental science, analytical chemistry, etc. At the same time, with the development of emerging fields such as proteomics, related research on mass spectrometry also has broad development prospects.
[0003] Processing the data obtained by the instrument is also an important part of mass spectrometry detection. The data of the mass spectrometry peaks in the spectrum is related to the quantification and qualitative analysis of the detected items. Due to factors such as noise interference, changing peak shapes, and overlapping peaks, accurately identifying characteristic peaks is very complex. Many existing mass spectrometry characteristic peak recognition methods only locate the peak values, without delimiting the boundaries of the peaks. The complete peaks must be manually marked to facilitate the subsequent calculation of the characteristic peak areas. Automating this process can save time, reduce the impact of human intervention, and improve the reliability of experimental results. Therefore, our goal is to use deep learning to fully automate peak detection, which can lower the operation threshold of related analysis software and improve the detection efficiency. Currently, most existing artificial intelligence algorithms combined with mass spectrometry data processing methods focus on detecting specific substances or diseases or analyzing characteristic data, rather than processing the raw data directly obtained from the instrument. We hope that this method can be applicable to more general detections in cooperation with mass spectrometers rather than being limited to the analysis of certain types of compounds. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: to provide a method for mass spectrometry peak recognition to improve the detection efficiency of mass spectrometry peaks.
[0005] On the one hand, the present invention provides a method for mass spectrometry peak recognition, including the following steps:
[0006] Input the mass spectrometry spectrum into a trained lightweight U-Net model; the lightweight U-Net model includes: an input end convolutional layer, multiple encoder layers, a bottleneck module, multiple decoder layers, and an output end convolutional layer connected in sequence; each encoder layer in the multiple encoder layers is connected in sequence, and a channel spatial attention module is connected between each decoder layer corresponding to each decoder layer in the multiple decoder layers;
[0007] The input end convolutional layer adjusts the number of channels of the input mass spectrometry spectrum and then inputs it into the multiple encoder layers;
[0008] The multiple encoder layers extract the image features of the mass spectrometry spectrum through convolution and downsampling operations, and the generated high-order feature map is output to the bottleneck module;
[0009] The bottleneck module extracts key information from the high-order feature map and then outputs the feature map processed by encoding to the multi-layer decoder;
[0010] The multi-layer decoder decodes the encoded feature map and then restores the feature map to the size of the original input mass spectrum through upsampling operations, and gradually generates the segmentation result;
[0011] Meanwhile, each layer of the encoder in the multi-layer encoder is connected to each layer of the decoder in the multi-layer decoder through a skip connection channel, and the feature maps output by each layer of the encoder are passed to the corresponding decoder through the channel-spatial attention module to retain detailed information;
[0012] The decoded feature map is convolved through the convolutional layer at the output end to adjust the number of channels to obtain the desired output of the mass spectrum peak recognition result.
[0013] On the other hand, the present invention also provides a mass spectrum peak recognition device, including:
[0014] An image input module for inputting a mass spectrum into a trained lightweight U-Net model; the lightweight U-Net model includes: an input-end convolutional layer, a multi-layer encoder, a bottleneck module, a multi-layer decoder, and an output-end convolutional layer connected in sequence; each layer of the encoder in the multi-layer encoder is connected in sequence, and a channel-spatial attention module is connected between each layer of the decoder corresponding to each layer of the decoder in the multi-layer decoder;
[0015] A channel adjustment module for the input-end convolutional layer to adjust the number of channels of the input mass spectrum and then input it into the multi-layer encoder;
[0016] A feature encoding module for the multi-layer encoder to extract the image features of the mass spectrum through convolutional and downsampling operations and output the generated high-order feature map to the bottleneck module;
[0017] A key information extraction module for the bottleneck module to extract key information from the high-order feature map and then output the feature map processed by encoding to the multi-layer decoder;
[0018] A feature decoding module for the multi-layer decoder to decode the encoded feature map and then restore the feature map to the size of the original input mass spectrum through upsampling operations and gradually generate the segmentation result;
[0019] A feature map transfer module for each layer of the encoder in the multi-layer encoder to be connected to each layer of the decoder in the multi-layer decoder through a skip connection channel, and the feature maps output by each layer of the encoder are passed to the corresponding decoder through the channel-spatial attention module to retain detailed information;
[0020] The result output module is used to obtain the desired mass spectrometry peak recognition result output by adjusting the number of channels through convolution of the decoded feature map by the output end convolutional layer.
[0021] On the other hand, the present invention provides a computer device, which includes a memory and a processor. A computer program is stored on the memory, and when the processor executes the computer program, the above-mentioned mass spectrometry peak recognition method is implemented.
[0022] On the other hand, the present invention provides a storage medium, characterized in that: the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned mass spectrometry peak recognition method can be implemented.
[0023] The beneficial effects of the present invention are as follows: through the automatic recognition of mass spectrometry peaks, manual intervention is greatly reduced, and the analysis efficiency is improved; a lightweight model is used to reduce the model operation parameters, and at the same time, a channel-spatial attention module is introduced to enhance the network's recognition ability of the input image, so as to achieve a good mass spectrometry peak recognition effect. Description of the Drawings
[0024] The following details the specific structure of the present invention in conjunction with the drawings.
[0025] Figure 1 It is the overall architecture diagram of the lightweight image segmentation network according to the embodiment of the present invention;
[0026] Figure 2 It is the structural diagram of the encoder and decoder in the network according to the embodiment of the present invention;
[0027] Figure 3 It is the structural diagram of the bottleneck module in the network according to the embodiment of the present invention;
[0028] Figure 4 It is the block diagram of the channel-spatial attention module according to the embodiment of the present invention;
[0029] Figure 5 It is the diagram of the channel attention module according to the embodiment of the present invention;
[0030] Figure 6 It is the diagram of the spatial attention module according to the embodiment of the present invention;
[0031] Figure 7 It is the recognition diagram of different models according to the embodiment of the present invention;
[0032] Figure 8 It is the schematic block diagram of the computer device according to the embodiment of the present invention. Detailed Embodiments
[0033] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0034] It should be understood that when used in this specification and the appended claims, the terms "comprises" and "comprising" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0035] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0036] It should be further understood that the term " / and / " used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the related listed items, and includes these combinations.
[0037] The first embodiment of the present invention is: a method for identifying mass spectrometry peaks, including the following steps:
[0038] S10. Input the mass spectrometry diagram into the trained lightweight U-Net model; as Figure 1 shown, the lightweight U-Net model includes: an input convolutional layer, a multi-layer encoder, a bottleneck module, a multi-layer decoder, and an output convolutional layer connected in sequence; each layer of the encoder in the multi-layer encoder is connected in sequence, and there is a channel spatial attention module connected between each layer of the decoder corresponding to each layer of the decoder in the multi-layer decoder.
[0039] S20. The input convolutional layer adjusts the number of channels of the input mass spectrometry diagram and then inputs it into the multi-layer encoder.
[0040] S30. The multi-layer encoder extracts the image features of the mass spectrometry diagram through convolution and downsampling operations, and outputs the generated high-order feature map to the bottleneck module.
[0041] Among them, each layer of the encoder in the multi-layer encoder includes a 7×7 depthwise separable convolutional layer, a 1×1 point convolutional layer, and a max pooling layer connected in sequence.
[0042] Among them, step S30 specifically includes:
[0043] The depthwise separable convolution layer performs depth convolution calculation on the input mass spectrometry diagram to extract the feature map from the mass spectrometry diagram;
[0044] Perform batch normalization on the extracted feature map;
[0045] Adjust the number of channels of the normalized feature map through the point convolution layer;
[0046] Perform pooling on the feature map with adjusted number of channels through the max pooling layer to reduce the spatial size of the feature map;
[0047] Perform operations on the feature map with reduced spatial size through the GELU activation function to obtain the output of each layer of the encoder.
[0048] In this embodiment, the encoder and decoder are as Figure 2 shown. To achieve the lightweight design of the model and reduce the parameters of the convolution layer, both the encoder and decoder use depthwise separable convolution to replace the traditional multi-layer convolution operation. To ensure the effective extraction of mass spectrometry peaks, the depth convolution uses a convolution kernel of size 7×7 to effectively expand the receptive field and information extraction ability. The data processed through batch normalization (BN) has two uses. One is to perform skip connection and output to the decoder of the corresponding level to retain the detailed information of the data. The other is to continue to be processed in the encoder. The number of channels is adjusted through the 1×1 point convolution, and then the spatial size of the feature map is reduced through max pooling processing. Finally, through the GELU activation function operation, the output of the first-level encoder is obtained.
[0049] S40. The bottleneck module extracts key information from the high-order feature map, and then outputs the feature map processed by encoding to the multi-layer decoder.
[0050] The bottleneck module includes a small cross convolution kernel formed by 1×3 and 3×1 convolution kernels.
[0051] Step S40 specifically includes:
[0052] S41. Adjust the number of channels of the high-order feature map input to the bottleneck module to one-fourth of the original through point convolution;
[0053] S42. Process three copies of the feature map data through axial depth convolution with different dilation rates, and one copy of the feature map is not processed, and then perform feature map splicing;
[0054] S43. Perform batch normalization on the spliced feature map and adjust the number of channels through point convolution;
[0055] S44. Process the feature map with adjusted number of channels through the activation function to obtain the output of the bottleneck module.
[0056] In this embodiment, the network structure of the bottleneck module is asFigure 3 As shown. The feature map of the input bottleneck module is characterized by a high number of channels and a low spatial size. Therefore, the convolution method used in the bottleneck module is adjusted. The feature map processed by the last-stage encoder is adjusted to one-fourth of the original number of channels through point convolution. Three portions of data are respectively processed by axial depth convolution with different dilation rates, and one portion is not processed and directly participates in the splicing of the feature map. After batch normalization and point convolution to adjust the number of channels, the output of the bottleneck block is finally obtained through activation function processing. In the bottleneck module, a small cross convolution kernel formed by 1×3 and 3×1 convolution kernels is used, which is suitable for the case of this low-spatial-size feature map, and at the same time, the number of parameters is reduced compared to traditional convolution kernels. At the same time, convolution operations with different dilation rates also help to better capture key information in the feature map.
[0057] S50. The multi-layer decoder decodes the encoded feature map and then restores the feature map to the size of the original input mass spectrum through upsampling operations, and gradually generates the segmentation result.
[0058] Each decoder in the multi-layer decoder includes a 1×1 point convolution layer, a 7×7 convolution layer, and a 1×1 point convolution layer connected in sequence;
[0059] Step S50 includes:
[0060] Each decoder takes the output feature map of the previous decoder and the bottleneck module as input, and adjusts the spatial storage of the feature map through upsampling;
[0061] The feature map output by the skip connection of each encoder is spliced with the upsampled feature map;
[0062] The spliced feature map is adjusted to the number of channels before splicing through point convolution after batch normalization;
[0063] The feature map after channel adjustment is subjected to depth convolution calculation through depthwise separable convolution, and the output feature map of the decoder is obtained after activation function processing.
[0064] In this embodiment, the decoder takes the output feature map of the previous decoder or the bottleneck block as input, adjusts the spatial storage of the feature map through upsampling, then splices the output of the skip connection of the encoder with the upsampling result, adjusts the number of channels to the number of channels before splicing through point convolution after batch normalization, and then passes through a depthwise separable convolution (7×7 convolution kernel + 1×1 point convolution), and the output feature map of the decoder is obtained after activation function processing.
[0065] S60. At the same time, each encoder in the multi-layer encoder is connected to each decoder in the multi-layer decoder through a skip connection channel, and the feature maps output by each layer of encoder are transmitted to the corresponding decoder through the channel-spatial attention module to retain detailed information.
[0066] Among them, the channel-spatial attention module integrates the channel attention module and the spatial attention module;
[0067] Among them, step S60 includes
[0068] S61. Process the feature maps output from the skip connection part of each layer of the encoder through the channel attention module, and perform element-wise multiplication with the directly output feature maps;
[0069] S62. Process the feature maps after element-wise multiplication through the spatial attention module;
[0070] S63. Perform element-wise addition with the feature maps of the original input through residual connection to obtain the feature maps output to the decoder.
[0071] In step S61, processing the feature maps output from the skip connection part of each layer of the encoder through the channel attention module includes:
[0072] Process the feature maps input by the skip connection through max pooling and average pooling to obtain two tensors with the same number of channels and a spatial size of 1×1;
[0073] Add the two tensors after being processed by a multi-layer perceptron, and obtain the channel attention tensor after passing through the sigmoid activation function.
[0074] In step S62, processing the feature maps after element-wise multiplication through the spatial attention module includes:
[0075] Perform max pooling and average pooling on the feature maps processed by the channel attention module in the channel dimension to obtain a single-channel feature map with a constant spatial size and 1 channel;
[0076] Concatenate the single-channel feature maps and compress the number of channels through a convolutional layer;
[0077] Obtain the spatial attention weight through the sigmoid activation function.
[0078] In this embodiment, the introduction of the channel-spatial attention module can generally effectively suppress irrelevant information, capture key information, and improve the efficiency of the deep learning algorithm and the final performance of the model. In the identification of mass spectrometry peaks in a mass spectrum, there are many background factors and the key information of the mass spectrometry peaks accounts for a relatively small proportion. Therefore, it is suitable for the exertion of the attention mechanism. The present invention introduces a channel-spatial attention module (CBAM) in the designed network, as Figure 4As shown, this module integrates a channel attention module and a spatial attention module. First, the feature map output from the encoder at the skip connection part is processed by the channel module and element-wise multiplied with the directly output feature map. Then, similarly, it is processed by the spatial attention module. Finally, it is added to the original input through a residual connection to obtain the feature map output to the decoder. The formula for the processing process of the channel-spatial attention module is as follows, where F in is the module input, F out is the module output, M c and M s are the processing processes of the channel attention module and the spatial attention module:
[0079] F′ in = M c (F in ) × F in
[0080] F" in = M s (F′ in ) × F′ in
[0081] F out = F″ in + F in #
[0082] Among them, F' in is the data processed by the channel attention module, and F″ in is the data processed by the spatial attention module.
[0083] Specifically, as Figure 5 shown, the operation of the channel attention module is to process the feature map input from the skip connection through max pooling and average pooling to obtain two tensors with the same number of channels and a spatial size of 1×1. After being processed by a multi-layer perceptron, the two tensors are added together, and after passing through the sigmoid activation function, the channel attention tensor is obtained. Its processing process is as follows: the formula, where F is the input feature map:
[0084] M c (F) = Sigmoid(MLP(Avgpool(F)) + MLP(MaxPool(F)))
[0085] Max pooling and average pooling respectively compress and obtain the maximum value and average information of the channels in the feature map, effectively obtaining the prominent part and overall performance of the input data. The multi-layer perceptron (MLP) can learn the relationships between channels and generate channel attention weights, which can enhance the expression of important information in the channels and improve the recognition ability of the model. The calculation formula of MLP is as follows:
[0086]
[0087] Where \(x\) is the input, \(c\) and \(r\) respectively represent the number of channels of the input tensor and the compression ratio of the MLP. The MLP will first compress the channels of the tensor to \(1 / r\) of the original, and then expand the tensor back to the original size after being processed by the activation function ReLU.
[0088] As Figure 6 shown, the spatial attention module is used to enhance the feature response in the spatial dimension. It first obtains a single-channel feature map with the same spatial size and 1 channel number by performing max-pooling and average-pooling on the feature map processed by the channel attention module in the channel dimension, and then concatenates them and compresses the number of channels through a convolutional layer. Finally, the spatial attention weight is obtained through the sigmoid activation function. The calculation process formula of spatial attention is as follows:
[0089] M s (F)=Sigmoid(f 7×7 (Concat[AvgPool(F);MaxPool(F)]))
[0090] Where \(F\) is the input feature map, and \(f\) 7×7 is a convolutional operation that uses a \(7\times7\) convolutional kernel after concatenating two single-channel feature maps.
[0091] S70. The decoded feature map is convolved through the output convolutional layer to adjust the number of channels to obtain the desired mass spectrometry peak recognition result output.
[0092] As Figure 7 shown, (a) is the input mass spectrometry diagram, (b) is the image segmentation recognition result of the input mass spectrometry diagram by the lightweight U-Net model of the present application, the black is the characteristic peak recognized by the model, (c) is the recognition result of the U-Net for the input mass spectrometry diagram, the part in the dotted line box is that the model misidentifies the image border, (d) is the recognition result of the U-Lite for the input mass spectrometry diagram, the part in the dotted line box is that the model misidentifies the image border and there are breaks caused by incomplete recognition of the mass spectrometry peak, (e) is the recognition result of the input mass spectrometry diagram when the CBAM module in the model is replaced by the SE module (squeeze-and-excitation module), the part in the dotted line box is the break caused by incomplete recognition of the characteristic peak, (f) is the recognition result of the input mass spectrometry diagram when the CBAM module in the model is replaced by the ECA module (efficient channel attention module), the part in the dotted line box is the wrong mark caused by the model recognition error.
[0093] The recognition results show that the lightweight U-Net model of the present application can well recognize the characteristic peaks in the spectrogram. The recognition results of other models will have situations where other elements in the image such as coordinate borders are marked, or there are situations where the characteristic peak markings are incomplete, as indicated by the dotted line boxes in the figure.
[0094] An embodiment of the present invention further provides a mass spectrometry peak recognition device, including:
[0095] An image input module for inputting a mass spectrometry graph into a trained lightweight U-Net model; the lightweight U-Net model includes: an input end convolutional layer, a multi-layer encoder, a bottleneck module, a multi-layer decoder, and an output end convolutional layer connected in sequence; each layer of the encoder in the multi-layer encoder is connected in sequence, and a channel spatial attention module is connected between each layer of the decoder corresponding to each layer of the decoder in the multi-layer decoder;
[0096] A channel adjustment module for the input end convolutional layer to adjust the number of channels of the input mass spectrometry graph and then input it into the multi-layer encoder;
[0097] A feature encoding module for the multi-layer encoder to extract the image features of the mass spectrometry graph through convolution and downsampling operations, and output the generated high-order feature map to the bottleneck module;
[0098] A key information extraction module for the bottleneck module to extract key information from the high-order feature map, and then output the encoded feature map to the multi-layer decoder;
[0099] A feature decoding module for the multi-layer decoder to decode the encoded feature map and then restore the feature map to the size of the original input mass spectrometry graph through upsampling operations, and gradually generate a segmentation result;
[0100] A feature map transfer module for each layer of the encoder in the multi-layer encoder to be connected to each layer of the decoder in the multi-layer decoder through a skip connection channel, and the feature maps output by each layer of the encoder are transferred to the corresponding decoder through the channel spatial attention module to retain detailed information;
[0101] A result output module for the decoded feature map to be convolved by the output end convolutional layer to adjust the number of channels and output the desired mass spectrometry peak recognition result.
[0102] It should be noted that those skilled in the art can clearly understand the specific implementation processes of the above mass spectrometry peak recognition device and each unit, and can refer to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity of description, they will not be repeated here.
[0103] The above mass spectrometry peak recognition device can be implemented in the form of a computer program, and this computer program can run on a computer device as shown in Figure 8 shown.
[0104] Please refer to Figure 8 , Figure 8It is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server. Among them, the terminal can be an electronic device with communication functions such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.
[0105] Referring to Figure 8 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501. Among them, the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0106] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions. When the program instructions are executed, the processor 502 can be caused to execute a mass spectrometry peak identification method.
[0107] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0108] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a mass spectrometry peak identification method.
[0109] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 8 the structure shown in
[0110] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0111] It should be understood that in the embodiments of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0112] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0113] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by the processor, the processor is caused to execute the mass spectrometry peak identification method as described above.
[0114] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, an optical disc, or other computer-readable storage media that can store program codes.
[0115] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0116] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0117] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0119] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A mass spectrometry peak identification method, characterized in that: The following steps are involved: Input the mass spectrum into the trained lightweight U-Net model; The lightweight U-Net model includes: an input convolution layer, a multi-layer encoder, a bottleneck module, a multi-layer decoder, and an output convolution layer connected in sequence; each layer of encoders in the multi-layer encoder is connected in sequence, and each layer of decoders in the multi-layer decoder corresponding to each layer of decoders in the multi-layer decoder is connected with a channel space attention module; The convolutional layer at the input end adjusts the number of channels of the input mass spectrum and then inputs it into the multi-layer encoder; The multi-layer encoder extracts the image features of the mass spectrogram through convolution and downsampling operations, and the generated high-order feature map is output to the bottleneck module; The bottleneck module extracts key information from the high-order feature map and then outputs the encoded feature map to the multi-layer decoder; The multi-layer decoder decodes the encoded feature map and restores the feature map to the size of the original input mass spectrum through upsampling operation, and gradually generates segmentation results; At the same time, each encoder layer in the multi-layer encoder is connected to each decoder layer in the multi-layer decoder through a skip connection channel. The feature maps output by each encoder layer are passed to the corresponding decoder through the channel space attention module to retain the detail information; The decoded feature map is convolved through the output convolution layer to adjust the number of channels to obtain the desired mass spectrum peak recognition result output.
2. The mass spectrum peak identification method according to claim 1, characterized in that: Each layer of the encoder in the multi-layer encoder includes a 7×7 depth-separable convolution layer, a 1×1 point convolution layer and a maximum pooling layer connected in sequence; The multi-layer encoder extracts the image features of the mass spectrogram through convolution and downsampling operations, including: The depth-wise separable convolution layer performs deep convolution calculation on the input mass spectrum and extracts feature maps from the mass spectrum; Perform batch normalization on the extracted feature maps; The normalized feature map is passed through a point convolution layer to adjust the number of channels; The feature map after adjusting the number of channels is pooled through the maximum pooling layer to reduce the spatial size of the feature map; The feature map with reduced spatial size is operated through the GELU activation function to obtain the output of each layer encoder.
3. The mass spectrum peak identification method according to claim 1, characterized in that: The bottleneck module includes a small cross convolution kernel formed by 1×3 and 3×1 convolution kernels; The bottleneck module extracts key information from the high-order feature map and then outputs the encoded feature map to the multi-layer decoder, including: The high-order feature map of the input bottleneck module is adjusted to a quarter of the original number of channels through point convolution; The three feature map data are processed by axial depth convolution with different expansion rates respectively, one feature map is not processed, and the feature maps are spliced; The concatenated feature maps are processed by batch normalization and point convolution to adjust the number of channels; The feature map after adjusting the number of channels is processed by the activation function to obtain the output of the bottleneck module.
4. The mass spectrum peak identification method according to claim 1, characterized in that: Each layer of the multi-layer decoder includes a 1×1 point convolution layer, a 7×7 convolution layer and a 1×1 point convolution layer connected in sequence; The multi-layer decoder decodes the encoded feature map and restores the feature map to the size of the original input mass spectrum through an upsampling operation, and gradually generates segmentation results including: Each layer of decoder takes the output feature map of the previous layer of decoder and bottleneck module as input, and adjusts the feature map space storage by upsampling; Concatenate the feature map output by the skip connection of each encoder layer with the upsampled feature map; The number of channels of the spliced feature map is adjusted to the number of channels before splicing by batch normalization and point convolution; The channel-adjusted feature map is subjected to depth-wise separable convolution for depth-wise convolution calculation, and the feature map output by the decoder is obtained after being processed by the activation function.
5. The mass spectrum peak identification method according to claim 1, characterized in that: The channel-space attention module combines the channel attention module and the spatial attention module; The feature maps output by the encoders of each layer are passed to the corresponding decoders through the channel space attention module to retain the detail information including: The feature maps output from the skip connection part of each layer encoder are processed by the channel attention module and multiplied element by element with the direct output feature map; The element-wise multiplied feature map is processed by the spatial attention module; The feature map output to the decoder is obtained by element-by-element addition of the residual connection and the original input feature map.
6. The mass spectrum peak identification method according to claim 5, characterized in that: The processing of the feature graphs outputted from the jump connection part of each layer encoder by the channel attention module includes: The feature map of the skip connection input is processed by maximum pooling and average pooling to obtain two tensors with the same number of channels and a spatial size of 1×1; The two tensors are processed by a multi-layer perceptron and then added together, and the channel attention tensor is obtained after the sigmoid activation function.
7. The mass spectrum peak identification method according to claim 5, characterized in that: The processing of the element-wise multiplied feature map by the spatial attention module includes: The feature map processed by the channel attention module is subjected to maximum pooling and average pooling in the channel dimension to obtain a single-channel feature map with unchanged spatial size and 1 channel number; Concatenate single-channel feature maps and compress the number of channels through convolutional layers; The spatial attention weight is obtained through the sigmoid activation function.
8. A mass spectrometry peak identification device, characterized in that: include: Image input module, used to input mass spectra into the trained lightweight U-Net model; The lightweight U-Net model includes: an input convolution layer, a multi-layer encoder, a bottleneck module, a multi-layer decoder, and an output convolution layer connected in sequence; each layer of encoders in the multi-layer encoder is connected in sequence, and each layer of decoders in the multi-layer decoder corresponding to each layer of decoders in the multi-layer decoder is connected with a channel space attention module; The channel adjustment module is used for the input convolution layer to adjust the number of channels of the input mass spectrum and then input it into the multi-layer encoder; The feature encoding module is used for multi-layer encoders to extract the image features of the mass spectrometer through convolution and downsampling operations, and the generated high-order feature map is output to the bottleneck module; The key information extraction module is used by the bottleneck module to extract key information from the high-order feature map, and then outputs the encoded feature map to the multi-layer decoder; The feature decoding module is used for multi-layer decoders to decode the encoded feature map and then restore the feature map to the size of the original input mass spectrum through upsampling operations, and gradually generate segmentation results; The feature map transfer module is used to connect each layer of encoders in the multi-layer encoders to each layer of decoders in the multi-layer decoders through skip connection channels. The feature maps output by each layer of encoders are transferred to the corresponding decoders through the channel space attention module to retain detail information; The result output module is used to adjust the number of channels of the decoded feature map through the output convolution layer to obtain the desired mass spectrum peak recognition result output.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the mass spectrum peak identification method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the mass spectrometry peak identification method according to any one of claims 1 to 7 can be implemented.
Citation Information
Cited By
Work clothes wearing identification method based on hypergraph calculation
CN121170505A
Mass spectrum high-order characterization extraction and matching method and system based on cross-domain contrast learning
CN122451436A
Mass spectrometry high-order representation extraction and matching method and system based on cross-domain contrast learning
CN122451436B
