Ion mobility spectrometry spectrogram recognition model training method and device and storage medium

By using a GAN to generate additional spectrogram samples for training, the ion mobility spectrum recognition model improves analysis efficiency and accuracy in identifying chemical compositions.

CN119132440APending Publication Date: 2024-12-13GUILIN UNIV OF ELECTRONIC TECH

Patent Information

Application Number
CN202410984993.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing ion mobility spectrometry methods rely heavily on expert experience for chemical identification, leading to poor analysis efficiency.

Method used

A method involving a generative adversarial network (GAN) is used to generate additional spectrogram samples, which are then used to train an ion mobility spectrum recognition model, enhancing the training dataset and improving the model's recognition accuracy.

Benefits of technology

The trained model achieves higher recognition accuracy and efficiency in identifying ion mobility spectra without requiring expert experience, expanding the scope of sample component analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132440A_ABST
    Figure CN119132440A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an ion mobility spectrometry spectrogram recognition model training method and device and a storage medium, and the method comprises the steps: obtaining a first spectrogram sample which is a spectrogram collected based on an ion mobility spectrometry detection device, training a generative adversarial network based on the first spectrogram sample, and obtaining a second spectrogram sample which is a spectrogram collected based on an ion mobility spectrometry detection device; and obtaining a spectrogram generation model, generating a third spectrogram sample based on the spectrogram generation model, training a preset image recognition network based on the first spectrogram sample and the third spectrogram sample, and obtaining an ion mobility spectrometry spectrogram recognition model. According to the embodiment of the invention, the third spectrogram sample can be generated through the spectrogram generation model, the training samples of the preset image recognition network are enriched, the ion mobility spectrometry spectrogram recognition model obtained through training has high recognition accuracy, and when the ion mobility spectrometry spectrogram recognition model is used for ion mobility spectrometry spectrogram recognition, the recognition accuracy of the ion mobility spectrometry spectrogram recognition model is improved. The analysis efficiency and the application range of sample components can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of ion mobility spectrometry, and in particular to a method, device and storage medium for training an ion mobility spectrometry pattern recognition model. Background Art

[0002] Ion mobility spectrometry is an atmospheric spectroscopy technique used for chemical identification. Taking high-field asymmetric ion mobility spectrometry (FAIMS) as an example, FAIMS is based on the dependence of ion mobility on nonlinear electric field strength and measures the difference in ion mobility in an asymmetric oscillating electric field. When testing a sample, FAIMS will generate a unique spectrum of the substance to analyze the material components in the sample. In the prior art, excessive reliance on expert experience to identify ion mobility spectra to obtain sample analysis results has poor analysis efficiency. Summary of the invention

[0003] The embodiments of the present application provide a method, device and storage medium for training an ion mobility spectrometry pattern recognition model to improve the efficiency of material analysis based on ion mobility spectrometry.

[0004] In order to solve the above technical problems, this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides an ion mobility spectrometry pattern recognition model training method, comprising:

[0006] Acquire a first spectrum sample, where the first spectrum sample is a spectrum collected based on an ion mobility spectrometry detection device;

[0007] Based on the first spectrogram sample, a generative adversarial network is trained to obtain a spectrogram generation model, wherein the generative adversarial network includes a generator and a discriminator, wherein the generator is used to generate a second spectrogram sample, and the discriminator is used to obtain a discrimination result for the first spectrogram sample and the second spectrogram sample, and the discrimination result is used to update the network parameters of the generative adversarial network until the training is completed, and the spectrogram generation model is the generator in the trained generative adversarial network;

[0008] Generate a third spectrogram sample based on the spectrogram generation model;

[0009] A preset image recognition network is trained based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

[0010] In a second aspect, the embodiment of the present application further provides an ion mobility spectrum recognition model training device, comprising:

[0011] An acquisition module, used for acquiring a first spectrum sample, where the first spectrum sample is a spectrum collected based on an ion mobility spectrometry detection device;

[0012] A first training module is used to train a generative adversarial network based on the first spectrogram sample to obtain a spectrogram generation model. The generative adversarial network includes a generator and a discriminator. The generator is used to generate a second spectrogram sample. The discriminator is used to obtain a discrimination result for the first spectrogram sample and the second spectrogram sample. The discrimination result is used to update the network parameters of the generative adversarial network until the training is completed. The spectrogram generation model is the generator in the trained generative adversarial network.

[0013] A generation module, used for generating a third spectrogram sample based on the spectrogram generation model;

[0014] The second training module is used to train a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above method is implemented when the processor executes the computer program.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.

[0017] The ion mobility spectrum spectrum recognition model training method provided in the embodiment of the present application obtains a first spectrum sample, the first spectrum sample is a spectrum collected based on an ion mobility spectrum detection device, trains a generative adversarial network based on the first spectrum sample to obtain a spectrum generation model, generates a third spectrum sample based on the spectrum generation model, and trains a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum spectrum recognition model. The present application obtains a spectrum generation model by training a generative adversarial network, and the spectrum generation model can generate a third spectrum sample, enriching the training samples of the preset image recognition network, so that the trained ion mobility spectrum spectrum recognition model has a higher recognition accuracy. At the same time, when the ion mobility spectrum spectrum recognition model is used for the recognition of ion mobility spectrum, it can effectively improve the analysis efficiency and application scope of sample components. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a flow chart of an ion mobility spectrometry recognition model training method provided in an embodiment of the present application;

[0019] Figure 2 Examples of FAIMS spectra of various types of volatile organic compound samples;

[0020] Figure 3 A schematic diagram of a network architecture for generating adversarial networks;

[0021] Figure 4 A schematic diagram of another network architecture for generating adversarial networks;

[0022] Figure 5 Schematic diagram of the network architecture of the discriminator based on up-sampling and down-sampling mechanism;

[0023] Figure 6 A schematic diagram of the structure of an ion mobility spectrum recognition model training device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the technical problems, technical solutions and advantages to be solved by the application clearer, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the application. In addition, for clarity and brevity, the description of known functions and structures has been omitted.

[0025] Unless otherwise defined, the technical terms or scientific terms used in this application shall have the usual meanings understood by persons with ordinary skills in the field to which this application belongs. The words "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, the words "one" or "an" and similar words do not indicate a quantitative limitation, but indicate the presence of at least one.

[0026] like Figure 1 As shown, the ion mobility spectrum recognition model training method provided in the embodiment of the present application includes:

[0027] Step 101, obtaining a first spectrum sample, where the first spectrum sample is a spectrum collected based on an ion mobility spectrometry detection device;

[0028] Step 102: training a generative adversarial network based on the first spectrogram sample to obtain a spectrogram generation model, wherein the generative adversarial network includes a generator and a discriminator, wherein the generator is used to generate a second spectrogram sample, and the discriminator is used to obtain a discrimination result for the first spectrogram sample and the second spectrogram sample, and the discrimination result is used to update the network parameters of the generative adversarial network until the training is completed, and the spectrogram generation model is the generator in the trained generative adversarial network;

[0029] Step 103, generating a third spectrogram sample based on the spectrogram generation model;

[0030] Step 104: training a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

[0031] The ion mobility spectrum pattern recognition model training method provided in the embodiment of the present application can be applied to electronic devices such as servers, personal computers, industrial computers or mobile terminals. No specific limitation is made here. To simplify the description, the following will mainly use electronic devices as the executor of the ion mobility spectrum pattern recognition model training method as an example to illustrate the embodiment of the present application.

[0032] In step 101, the electronic device may obtain a first spectrum sample, where the first spectrum sample is a spectrum collected by an ion mobility spectrometry detection device.

[0033] The ion mobility spectrometry detection device can be a detection device based on ion mobility spectrometry (IMS) technology. In some examples, IMS can be FAIMS, or drift-time ion mobility spectrometry (DTIMS), aspiration ion mobility spectrometry (AIMS), trapped ion mobility spectrometry (TIMS), etc., which are not specifically limited here. The following will mainly be explained by taking FAIMS as an example.

[0034] The first spectrogram sample can be an ion mobility spectrum spectrum actually collected for a substance, where the substance can be a single-component substance, a multi-component mixed substance, etc. The type and composition of the substance may be selected according to actual detection needs. In combination with some examples, acetone can be used as a key component to be detected. Accordingly, through the FAIMS detection equipment, the ion mobility spectrum spectrum of pure acetone can be collected, for example, the ion mobility spectrum spectrum of a high-purity acetone sample (close to 100% concentration) can be collected, and the ion mobility spectrum spectrum of a plurality of concentration gradients of pure acetone (for example, it can be obtained by diluting a high-purity sample) can also be further collected. Samples, further, other types of volatile organic compounds (volatileorganic compounds, VOCs), such as ethanol, ethyl acetate, butanone, pentanone, etc., can be mixed with acetone to obtain a mixture with different acetone contents, and the ion mobility spectrum spectrum of the mixture is collected. The above-collected ion mobility spectrum spectra can all be used as the above-mentioned first spectrogram sample.

[0035] Generally speaking, the first spectrum sample can be used to train a preset image recognition network to obtain an ion mobility spectrum recognition model. However, in complex information systems such as FAIMS, due to the widespread existence of problems such as difficulty in data collection and scarce samples, the number of first spectrum samples is insufficient, which affects the training accuracy of the ion mobility spectrum recognition model.

[0036] To overcome the above problems, in step 102, the electronic device can use the first spectrogram sample to train a generative adversarial network (GANs, Generative Adversarial Networks) to obtain a spectrogram generation model, such as a spectrogram generation model to expand the number of spectrogram samples. The GANs here can be a basic generative adversarial network, or a conditional generative adversarial network (Conditional Generative Adversarial Nets, CGAN), a deep convolutional generative adversarial network (Deep Convolutional Generative Adversarial Networks, DCGAN) or a Wasserstein generative adversarial network (Wasserstein Generative Adversarial Networks, WGAN), etc., which are not exhaustively listed here. To simplify the description, the generative adversarial network is referred to as GAN below.

[0037] GAN includes a generator and a discriminator. The generator can be used to generate a second spectrogram sample. For example, the generator can use random noise as input to generate the second spectrogram sample, or the generator can further combine data such as conditional constraints to generate the second spectrogram sample. The first spectrogram sample and the second spectrogram sample can be input into the discriminator to obtain a discrimination result, which can be used to update the network parameters of the GAN to achieve training of the GAN.

[0038] The first spectrogram sample can be considered as a real sample, and the second spectrogram sample can be considered as a false sample (i.e., a generated sample). From the perspective of the discriminator, the purpose of training the discriminator is to enable it to accurately distinguish between real samples and false samples. From the perspective of the generator, the purpose of training the generator is to enable the discriminator to identify false samples as real. The generator and the discriminator are trained alternately in a cycle, so that the two can deepen their respective abilities in continuous game learning. The discriminator strengthens its recognition ability by continuously comparing real samples with generated samples until the samples generated by the generator are difficult to distinguish from real samples, indicating that the generator's spectrogram generation quality has reached a better level. At this point, it can be considered that the GAN training is completed, and the generator in the trained GAN can be a spectrogram generation model.

[0039] In step 103, the electronic device may generate a third spectrogram sample based on the spectrogram generation model.

[0040] Generally speaking, the authenticity or falsity of a spectrogram sample can be considered as a label of the input spectrogram sample of the discriminator. After the GAN training is completed, the trained generator, that is, the spectrogram generation model, can be taken out and used separately, while the discriminator can be discarded. At this time, authenticity or falsity is no longer used as a label. At the same time, as mentioned above, the spectrogram generation model can generate high-quality spectrograms, which can be used as an extension of the first spectrogram sample and used as a training sample for the image recognition network.

[0041] In step 104, the electronic device may train a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

[0042] As mentioned above, the first spectrum sample is limited by technical difficulty or other factors, resulting in a small number of available samples, while the third spectrum sample can be considered to be a relatively high-quality spectrum to a certain extent, which can complement the first spectrum sample in terms of quantity. The first spectrum sample and the second spectrum sample are used together to train the preset image recognition network, which greatly enriches the training samples of the image recognition network, and thus helps to improve the recognition accuracy of the trained ion mobility spectrum recognition model.

[0043] The ion mobility spectrum recognition model can be used to identify the ion mobility spectrum of the sample to obtain detection data such as the composition or content of the substance. These identification and detection processes can be achieved through the neural network model without the need for expert experience, greatly improving the analysis efficiency and scope of application of the sample components.

[0044] The ion mobility spectrum spectrum recognition model training method provided in the embodiment of the present application obtains a first spectrum sample, the first spectrum sample is a spectrum collected based on the ion mobility spectrum detection equipment, trains a generative adversarial network based on the first spectrum sample to obtain a spectrum generation model, generates a third spectrum sample based on the spectrum generation model, and trains a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum spectrum recognition model. The present application obtains a spectrum generation model by training a generative adversarial network, and the spectrum generation model can generate a third spectrum sample, enriching the training samples of the preset image recognition network, so that the trained ion mobility spectrum spectrum recognition model has a higher recognition accuracy. At the same time, the use of the ion mobility spectrum spectrum recognition model to identify ion mobility spectrum spectra can effectively improve the analysis efficiency and application scope of sample components.

[0045] In addition, combined with the example of the first spectrum sample in the above embodiment, the first spectrum sample may include ion mobility spectra of substances with different component concentrations or component compositions. By training the preset image recognition network with the spectrum samples corresponding to these substances, the obtained ion mobility spectrum recognition model can process the spectra of multiple types of samples and adapt to the complex and diverse needs of sample components. In addition, based on the ion mobility spectrum recognition model, one-time continuous analysis can be achieved, greatly improving the spectrum processing and analysis efficiency of large-scale samples.

[0046] In some embodiments, a preset image recognition network is trained based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model, including:

[0047] A preset image recognition network is trained based on multiple sample sets to obtain an ion mobility spectrum recognition model, wherein a spectrum sample in one sample set is associated with a sample label, and the spectrum samples in each sample set include a first spectrum sample and a third spectrum sample.

[0048] Take the detection of VOCs using FAIMS as an example. Figure 2 As shown, Figure 2 Provides FAIMS spectra of various types of VOCs samples, including 5 concentration gradients of pure acetone (obtained by diluting high-purity samples) and 10 mixtures containing acetone. A series of concentration solutions are prepared according to specific conditions, and sample labels such as C3H6O_7.88, etc., not only identify the acetone component, but also reflect its concentration, to facilitate qualitative and quantitative analysis, and support multi-task processing of image recognition networks.

[0049] Figure 2 The FAIMS spectrum example graph in the figure can correspond to the first spectrum sample, and each first spectrum sample can have a corresponding sample label. Conversely, each sample label can have multiple first spectrum samples, and these first spectrum samples can be classified into the sample set corresponding to the sample label. Accordingly, when there are multiple sample labels, there can be multiple groups of sample sets.

[0050] In addition to the first spectrum sample obtained through actual collection, each sample set may also have a third spectrum sample generated by the spectrum generation model, so that the number of spectrum samples in each sample set can be enriched and the recognition accuracy of the ion mobility spectrum recognition model can be improved. In some examples, the ion mobility spectrum recognition model can be a multi-classification model that can adapt to the analysis requirements of complex and diverse sample components.

[0051] Of course, it is worth emphasizing that Figure 2These are some exemplary descriptions of the types and composition of sample substances. In practical applications, sample spectrum samples of the target substances to be analyzed can be established according to actual analysis needs, and an ion mobility spectrum recognition model can be trained based on these spectrum samples to achieve analysis of the target substances. No repeated description will be given here.

[0052] Optionally, the above step 102, training a generative adversarial network based on the first spectrogram sample to obtain a spectrogram generation model, includes:

[0053] generating a second spectrogram sample based on the generator;

[0054] Inputting the first spectrum sample and the second spectrum sample into the discriminator respectively to obtain a discrimination result;

[0055] Determine the loss value of the loss function of the generated adversarial network based on the discrimination result;

[0056] Update the network parameters of the generative adversarial network based on the loss value until the loss value converges to obtain a trained generative adversarial network;

[0057] The generator in the trained generative adversarial network is determined as a spectral graph generation model.

[0058] like Figure 3 As shown, Figure 3 It is a schematic diagram of a network architecture of a generative adversarial network (hereinafter referred to as GAN), including a generator and a discriminator, wherein the generator can obtain generated data (Generated Data) based on random noise, i.e., the second spectrogram sample mentioned above, and the real image sample (Real Image Sample) corresponds to the first spectrogram sample mentioned above. The first spectrogram sample and the second spectrogram sample are respectively input to the discriminator to obtain a discrimination result, which can indicate whether the output spectrogram sample is real (Real) or fake (Fake), and the loss value (Loss Rate) of the loss function of the generative adversarial network can be determined based on the discrimination result. Generally speaking, the loss function of the generative adversarial network is divided into two parts, one is the generator loss (G Loss), and the other is the discriminator loss (DLoss). During the training process, the generator optimizes the generation strategy based on the feedback signal of the discriminator on the authenticity of its output, that is, combines the generator loss to update its own network parameters; the discriminator loss function quantifies its ability to distinguish between real and fake samples, calculates the gradient through back propagation, and then uses the gradient descent method (Gradient) to iteratively update the network parameters of both. The two are trained alternately in a cycle to form a minimax game optimization, and finally complete the training of GAN and the acquisition of the spectrogram generation model. The spectrogram generation model is used to realize the simulation of complex data distribution and the generation of high-quality samples.

[0059] Theoretically, the optimal point of minimax game optimization is that for the second spectrum data generated by the generator, the probability that the discriminator outputs the result of the real data is 0.5. When the optimal point of the theory is reached or converged near the optimal point, the GAN can be considered to have completed training. This is reflected in the loss function of the GAN, which can be that the loss function reaches the minimum value or converges.

[0060] In an example, the loss function of a GAN can be as follows:

[0061]

[0062] Among them, x represents the real data, corresponding to the first spectrum sample, represents the probability of true data, z represents false data, corresponding to the second spectrum sample, represents the probability of false data, D represents the discriminator loss, G represents the generator loss, and V(D,G) is the loss value of the loss function of GAN.

[0063] Of course, the above is an example of a loss function for a generative adversarial network. In practical applications, other types of generative adversarial networks can be used, and the loss function will change accordingly.

[0064] In a feasible embodiment, generating a second spectrogram sample based on a generator includes:

[0065] Constructing a conditional constraint based on the first spectrum sample;

[0066] The random noise and the conditional constraints are input into the generator to generate a second spectrogram sample.

[0067] In this embodiment, the electronic device can construct a conditional constraint based on the first spectrogram sample, for example, the conditional constraint can be constructed in combination with the label information of the first spectrogram sample, and the generator generates the second spectrogram sample based on random noise and the conditional constraint. This embodiment can guide the generative adversarial network to learn in a targeted manner on a specific feature space, thereby helping to improve the controllability of the generator's generation results, and further improve the training effect of the generative adversarial network.

[0068] like Figure 4 As shown, Figure 4 This is a schematic diagram of the network architecture of the generative adversarial network with conditional constraints. Figure 3The difference between the network architectures shown is that this network architecture adds a conditional constraint C(class), which can be concatenated with real image samples, can be used as input to the generator to generate generated data, and can also be reflected in the loss function of the discriminator. When introducing label information into the generator and discriminator training, the adversarial learning objective is adjusted accordingly, aiming to finely characterize the target data distribution and its related label attributes, and promote high-quality conditional generation. Specifically, the optimization goal of the GAN based on conditional constraints will reflect the precise modeling of conditional dependencies.

[0069] The loss function of the GAN based on conditional constraints will undergo the following changes to reflect the consideration and optimization of conditional dependencies:

[0070]

[0071] In the formula, y represents the conditional constraint.

[0072] Optionally, generating a second spectrogram sample based on the generator includes:

[0073] Generate an initial spectrogram sample of a preset size based on random noise;

[0074] Batch normalization is performed on each color channel in an initial spectrum sample of a preset size to obtain a second spectrum sample.

[0075] In this embodiment, the preset size can be the image size set at the input end of the discriminator, for example, it can be 256×256 size, of course, it can also be other set sizes, which are not specifically limited here. For the generator, the second spectrogram sample generated by it can be directly set to the preset size by setting the hyperparameters of the network layer, thereby eliminating the hardware performance loss caused by size preprocessing.

[0076] The generator generates the second spectrum sample, which can be mainly divided into two stages. The first stage can generate an initial spectrum sample of a preset size. The second stage can normalize the pixel values ​​of each color channel of the initial spectrum sample to the [-1,1] interval to match the activation function used by the generator, thereby optimizing the spatial contrast and color saturation of the output image.

[0077] In a specific implementation, batch normalization processing may be performed on each color channel in the first spectrum sample of a preset size according to the following formula:

[0078]

[0079] Among them, x is any color channel of the initial spectrogram sample, μ represents the channel mean within the batch, δ is the channel variance within the batch, ∈ is added to prevent division by zero, γ and β are learnable scalar parameters to ensure that nonlinear transformation can be maintained after batch normalization, and y is the color channel after batch normalization.

[0080] As a feasible generator architecture, its core is to construct high-fidelity images from random noise, using the principles of inverse mapping and feature learning. The generator starts with a random noise vector sampled from a multi-dimensional Gaussian distribution, which is mapped to a high-dimensional feature space through a fully connected layer, capturing potential features and preprocessing to adapt to image reconstruction. Next, the output of the fully connected layer is flattened and reshaped into a three-dimensional feature map suitable for the input of the deconvolution layer. The generator increases the image resolution through a series of transposed convolutional layers (deconvolutional layers), expands the dimension with zero padding technology, gradually refines the features and increases the spatial details. Each layer of 3*3 convolution kernel filtering strengthens the spatial correlation, while adjusting the number of channels to enrich the image content. After multiple layers of upsampling and feature extraction, the generator outputs a 256×256 pixel synthetic image similar to the real image in the training set. These high-quality synthetic data will be fed into the discriminator for true and false identification, and iteratively optimized in the training game of GAN.

[0081] Optionally, the discriminator includes multiple downsampling layers, multiple upsampling layers and a classification network, and the multiple downsampling layers and the multiple upsampling layers are symmetrically arranged;

[0082] The first spectrum sample and the second spectrum sample are respectively input into the discriminator to obtain a discrimination result, including:

[0083] The spectrum sample to be identified is processed through multiple downsampling layers and multiple upsampling layers in sequence to obtain a target feature map, the spectrum sample to be identified is the first spectrum sample or the second spectrum sample, and the target feature map has the same size as the spectrum sample to be identified;

[0084] Output the target feature map to the classification network to obtain the discrimination result.

[0085] In this embodiment, a symmetrical up-and-down sampling mechanism is used in the discriminator, that is, a plurality of down-sampling layers and a plurality of up-sampling layers are symmetrically arranged, and the plurality of down-sampling layers and the plurality of up-sampling layers can be connected in sequence. The spectrogram samples to be discriminated input into the discriminator can be encoded in sequence through the plurality of down-sampling layers of the encoder, for example, by extracting high-dimensional features through convolution or pooling, and then decoded in sequence through the plurality of up-sampling layers of the decoder, for example, by restoring the spatial resolution through interpolation or deconvolution, and then obtaining the target feature map. The plurality of down-sampling layers and the plurality of up-sampling layers are symmetrical to each other, which means that if there is a down-sampling layer that encodes the input image (for example, the spectrogram sample to be discriminated or the intermediate feature map) from the first size to the second size, then there is a corresponding up-sampling layer that decodes the input image from the second size to the first size, thereby forming symmetry in parameters such as the number of network layers and the number of network layer nodes.

[0086] The above symmetrical downsampling and upsampling layer architecture can help the upsampling layer to efficiently perform operations such as feature extraction and propagation, which in turn helps the classification network to accurately classify the true and false spectrogram samples.

[0087] Optionally, the multiple downsampling layers include at least one target downsampling layer, and the output layer residual of the target downsampling layer is linked to the input layer of an upsampling layer symmetrically arranged with respect to the target downsampling layer.

[0088] like Figure 5 As shown, this embodiment performs a jump connection between the downsampling layer and the upsampling layer, that is, on the basis of the chain-connected architecture of multiple downsampling layers (corresponding to d1, d2, d3) and multiple upsampling layers (corresponding to u1, u2, u3), a residual connection (Residual Connection) between the target downsampling layer and the symmetrical upsampling layer is added. For the upsampling layer, the input layer can simultaneously receive the output of the previous upsampling layer and the output of the downsampling layer of the residual connection, which is helpful to realize the fusion of high-level features and low-level features.

[0089] The design of the network architecture of the discriminator in this embodiment can help the discriminator to efficiently perform key operations such as feature extraction, propagation and fusion. High-level abstract features are captured through the convolution and pooling layers in the downsampling stage; and the upsampling stage uses interpolation or deconvolution technology to restore the spatial resolution, and simultaneously seamlessly integrates high-level features with low-level detail information, reflecting excellent multi-scale feature integration capabilities. In general, the core advantage of the symmetrical up and down sampling structure in image processing is reflected in the effective fusion of deep and shallow layer features. The structure obtains high-level abstract features through downsampling in the encoding stage, and reconstructs spatial details through upsampling in the decoding stage. It uses residual links to achieve cross-layer information fusion, which effectively alleviates the gradient vanishing problem in deep networks. This design improves the overall performance of the model, especially in pixel-level tasks such as image segmentation, and improves the generalization ability of the model on small sample data sets, reducing dependence on large-scale annotated data.

[0090] By further extending the structure of the generator and discriminator in the generative adversarial network, we can regard it as a disguised symmetric up-and-down sampling process. This design concept can be applied to optimize the discriminator design. By introducing the symmetry and multi-level feature interaction mechanism inside the discriminator, the discriminator can efficiently extract the multi-scale and deep semantic information of the input spectrogram samples, thereby synergistically enhancing the overall learning efficiency and generation quality of GAN. Even under the conditions of limited training samples, it can ensure that the spectrogram generation model can generate both realistic and diverse image content.

[0091] Optionally, a preset image recognition network is trained based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model, including:

[0092] Performing image enhancement processing on the first spectrum sample to obtain a fourth spectrum sample;

[0093] A preset image recognition network is trained based on the first spectrum sample, the third spectrum sample and the fourth spectrum sample to obtain an ion mobility spectrum recognition model.

[0094] In some examples, the image enhancement process may refer to rotating, flipping, scaling, cropping, or adding noise to the first spectrogram sample, which is not specifically limited here.

[0095] In the training of the image recognition network, in addition to using the first spectrum sample as real data, this embodiment can further form a complementary enhancement strategy based on the high-quality third spectrum sample generated by the spectrum generation model and the fourth spectrum sample obtained based on image enhancement, which combines the problem of scarce real data, enhances the generalization ability of the trained ion mobility spectrum recognition model, and significantly improves the model performance.

[0096] In practical applications, the quantity ratios among the first spectrum sample, the third spectrum sample, and the fourth spectrum sample may be set to improve the training effect of the ion mobility spectrum recognition model.

[0097] In some embodiments, the first spectrogram sample, or a mixed sample of the first spectrogram sample and the fourth spectrogram sample can be regarded as a first type of sample, and the third spectrogram sample can be regarded as a second type of sample. The ratio of the first type of sample to the second type of sample is adjusted to form multiple groups of sample data sets. 70% of each sample data set is used as a training set to promote model learning, 10% is used as a validation set to monitor model optimization and adjust hyperparameters, and the remaining 20% ​​is used as a test set to independently evaluate the generalization ability of the model on new data, so as to draw reliable conclusions based on quantitative analysis.

[0098] Each group of sample data sets is put into VGG and ResNet for training and spectrum recognition, and the recognition accuracy and other data are used as evaluation indicators. Based on the evaluation indicators, the optimal ratio of the first type of samples to the second type of samples is determined to guide the training of the subsequent ion mobility spectrum recognition model. Compared with relying solely on real data training, the embodiment of the present application adopts a mixed training method of synthetic data and real data, which not only effectively addresses data shortages, but also significantly optimizes model performance, thereby improving the accuracy and reliability in the field of material composition analysis.

[0099] like Figure 6 As shown, the embodiment of the present application also provides an ion mobility spectrum recognition model training device, comprising:

[0100] An acquisition module 601 is used to acquire a first spectrum sample, where the first spectrum sample is a spectrum collected based on an ion mobility spectrometry detection device;

[0101] The first training module 602 is used to train a generative adversarial network based on the first spectrogram sample to obtain a spectrogram generation model. The generative adversarial network includes a generator and a discriminator. The generator is used to generate a second spectrogram sample. The discriminator is used to obtain a discrimination result for the first spectrogram sample and the second spectrogram sample. The discrimination result is used to update the network parameters of the generative adversarial network until the training is completed. The spectrogram generation model is the generator in the trained generative adversarial network.

[0102] A generating module 603, configured to generate a third spectrogram sample based on the spectrogram generating model;

[0103] The second training module 604 is used to train a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

[0104] Optionally, the first training module 602 may be specifically used for:

[0105] generating a second spectrogram sample based on the generator;

[0106] Inputting the first spectrum sample and the second spectrum sample into the discriminator respectively to obtain a discrimination result;

[0107] Determine the loss value of the loss function of the generated adversarial network based on the discrimination result;

[0108] Update the network parameters of the generative adversarial network based on the loss value until the loss value converges to obtain a trained generative adversarial network;

[0109] The generator in the trained generative adversarial network is determined as a spectral graph generation model.

[0110] Optionally, the first training module 602 may also be used to:

[0111] Generate an initial spectrogram sample of a preset size based on random noise;

[0112] Batch normalization is performed on each color channel in an initial spectrum sample of a preset size to obtain a second spectrum sample.

[0113] Optionally, the first training module 602 may also be used to:

[0114] Constructing a conditional constraint based on the first spectrum sample;

[0115] The random noise and the conditional constraints are input into the generator to generate a second spectrogram sample.

[0116] Optionally, the discriminator includes multiple downsampling layers, multiple upsampling layers and a classification network, and the multiple downsampling layers and the multiple upsampling layers are symmetrically arranged;

[0117] Optionally, the first training module 602 may also be used to:

[0118] The spectrum sample to be identified is processed through multiple downsampling layers and multiple upsampling layers in sequence to obtain a target feature map, the spectrum sample to be identified is the first spectrum sample or the second spectrum sample, and the target feature map has the same size as the spectrum sample to be identified;

[0119] Output the target feature map to the classification network to obtain the discrimination result.

[0120] Optionally, the multiple downsampling layers include at least one target downsampling layer, and the output layer residual of the target downsampling layer is linked to the input layer of an upsampling layer symmetrically arranged with respect to the target downsampling layer.

[0121] Optionally, the second training module 604 may also be used to:

[0122] Performing image enhancement processing on the first spectrum sample to obtain a fourth spectrum sample;

[0123] A preset image recognition network is trained based on the first spectrum sample, the third spectrum sample and the fourth spectrum sample to obtain an ion mobility spectrum recognition model.

[0124] Optionally, the second training module 604 may also be used to:

[0125] A preset image recognition network is trained based on multiple sample sets to obtain an ion mobility spectrum recognition model, wherein a spectrum sample in one sample set is associated with a sample label, and the spectrum samples in each sample set include a first spectrum sample and a third spectrum sample.

[0126] The ion mobility spectrum recognition model training device provided in the embodiment of the present application is a device authority corresponding to the ion mobility spectrum recognition model training method in the above embodiment. The method embodiment can be applied to the device embodiment and achieve the same technical effect, which will not be repeated here.

[0127] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned ion migration spectrum recognition model training method when executing the computer program.

[0128] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned ion mobility spectrum recognition model training method is implemented.

[0129] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0130] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0131] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0132] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and 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.

[0133] 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.

[0134] 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 software functional units.

[0135] If the integrated module / 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 computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0136] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for training an ion mobility spectrometry recognition model, characterized in that: include: Acquire a first spectrum sample, where the first spectrum sample is a spectrum collected based on an ion mobility spectrometry detection device; Based on the first spectrogram sample, a generative adversarial network is trained to obtain a spectrogram generation model, wherein the generative adversarial network includes a generator and a discriminator, wherein the generator is used to generate a second spectrogram sample, and the discriminator is used to obtain a discrimination result for the first spectrogram sample and the second spectrogram sample, and the discrimination result is used to update the network parameters of the generative adversarial network until the training is completed, and the spectrogram generation model is the generator in the trained generative adversarial network; Generate a third spectrogram sample based on the spectrogram generation model; A preset image recognition network is trained based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model.

2. The method according to claim 1, characterized in that: The step of training a generative adversarial network based on the first spectrogram sample to obtain a spectrogram generation model includes: generating the second spectrogram sample based on the generator; Inputting the first spectrum sample and the second spectrum sample into the discriminator respectively to obtain a discrimination result; Determine the loss value of the loss function of the generative adversarial network based on the discrimination result; Based on the loss value, the network parameters of the generative adversarial network are updated until the loss value converges to obtain a trained generative adversarial network; The generator in the trained generative adversarial network is determined as the spectrogram generation model.

3. The method according to claim 2, characterized in that The generating the second spectrogram sample based on the generator comprises: Generate an initial spectrogram sample of a preset size based on random noise; Batch normalization is performed on each color channel in the initial spectrum sample of the preset size to obtain the second spectrum sample.

4. The method according to claim 2, characterized in that: The generating the second spectrogram sample based on the generator comprises: Constructing a conditional constraint based on the first spectrogram sample; Random noise and the conditional constraints are input into the generator to generate the second spectrogram samples.

5. The method according to claim 2, characterized in that: The discriminator includes a plurality of downsampling layers, a plurality of upsampling layers and a classification network, wherein the plurality of downsampling layers and the plurality of upsampling layers are symmetrically arranged; The step of inputting the first spectrum sample and the second spectrum sample into the discriminator to obtain a discrimination result comprises: Processing the spectrum sample to be identified through the multiple downsampling layers and the multiple upsampling layers in sequence to obtain a target feature map, wherein the spectrum sample to be identified is the first spectrum sample or the second spectrum sample, and the target feature map has the same size as the spectrum sample to be identified; The target feature map is output to the classification network to obtain the discrimination result.

6. The method according to claim 5, characterized in that The multiple downsampling layers include at least one target downsampling layer, and the output layer residual of the target downsampling layer is linked to the input layer of the upsampling layer symmetrically arranged with the target downsampling layer.

7. The method according to claim 1, characterized in that The step of training a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model includes: Performing image enhancement processing on the first spectrum sample to obtain a fourth spectrum sample; A preset image recognition network is trained based on the first spectrum sample, the third spectrum sample and the fourth spectrum sample to obtain an ion mobility spectrum recognition model.

8. The method according to claim 1, characterized in that Training a preset image recognition network based on the first spectrum sample and the third spectrum sample to obtain an ion mobility spectrum recognition model includes: A preset image recognition network is trained based on multiple groups of sample sets to obtain an ion mobility spectrum recognition model, wherein the spectrum samples in one group of sample sets are associated with a sample label, and the spectrum samples in each group of sample sets include the first spectrum sample and the third spectrum sample.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the computer program.

10. 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 method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • A method for expand spectral database based on generate antagonistic network

    CN109508647A

  • Intelligent library building method for Raman spectrum data

    CN113378680A

  • Near infrared spectrum generation method and system

    CN118172627A

Cited By

  • Through-the-wall radar signal enhancement method and device for human motion

    CN119988837A

  • A method and device for enhancing through-the-wall radar signals of human motion

    CN119988837B

  • Mixture component analysis method and detection system based on ion mobility spectrometer

    CN120948590A