Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification method, raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification model generation method, and related device

By splicing Raman spectroscopy and mass spectrometry training datasets, a pathogen identification model is generated, which solves the problem of insufficient accuracy in pathogen identification in existing technologies and achieves higher prediction accuracy.

WO2026002066A1PCT designated stage Publication Date: 2026-01-02FUDAN UNIVERSITY +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/103554
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-25
Filing Date
2025-06-25
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

The accuracy of existing methods for identifying pathogenic bacteria based on Raman and mass spectrometry still needs to be improved.

Method used

By acquiring Raman spectroscopy and mass spectrometry training datasets, and performing splicing, self-attention feature extraction, one-dimensional convolution, and aggregation processing, a pathogen identification model is generated. The model weights are then adjusted using a loss function until convergence.

Benefits of technology

It improved the predictive accuracy of pathogen identification and enhanced the performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025103554_02012026_PF_FP_ABST
    Figure CN2025103554_02012026_PF_FP_ABST
Patent Text Reader

Abstract

A Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification method, a Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification model generation method, and a related device. The Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification model generation method comprises: acquiring a first training data set and a second training data set, wherein the first training data set comprises a plurality of pieces of Raman spectroscopy training data, and the second training data set comprises a plurality of pieces of mass spectrometry training data; concatenating the Raman spectroscopy training data in the first training data set with the mass spectrometry training data in the second training data set respectively to obtain a plurality of pieces of corresponding concatenated training data to form a concatenated training data set; and using the concatenated training data in the concatenated training data set for training to obtain a Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification model. The technical solution in the embodiments of the present invention is beneficial to improving the performance of Raman spectroscopy- and mass spectrometry-based pathogenic bacteria identification models, thereby further improving the accuracy of sample analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Raman and mass spectrometry-based pathogenic bacteria identification and model generation method and related equipment

[0001] The present application claims priority to the patent applications with the application number of 202410836320.4 and the invention name of "Raman and mass spectrometry-based pathogenic bacteria identification and model generation method and related equipment" filed on June 25, 2024, and the application number of 202410836217.X and the invention name of "Mass spectrometry data processing method and system, equipment and storage medium" filed on June 25, 2024 TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of biological information processing, in particular to a Raman and mass spectrometry-based pathogenic bacteria identification and model generation method and related equipment. BACKGROUND

[0003] Sample detection technology has been widely used in medical, biological, environmental and food science fields, etc. By detecting samples, detection data with analytical significance can be obtained.

[0004] However, as sample analysis is developing towards a more complex direction, the quantity requirement of sample detection data is also increasing, for example, with the development of artificial intelligence, machine learning and deep learning technologies have been gradually used to realize data analysis. However, the accuracy of the current pathogenic bacteria identification method still needs to be improved. TECHNICAL PROBLEM

[0005] The problem solved by embodiments of the present application is to provide a Raman and mass spectrometry-based pathogenic bacteria identification and model generation method and related equipment, which is beneficial to improve the performance of the Raman and mass spectrometry-based pathogenic bacteria identification model, thereby further improving the accuracy of pathogenic bacteria identification. TECHNICAL SOLUTION

[0006] To solve the above problems, embodiments of the present application provide a Raman and mass spectrometry-based pathogenic bacteria identification model generation method, comprising:

[0007] Obtain a first training data set and a second training data set, the first training data set comprising a plurality of Raman spectrum training data, and the second training data set comprising a plurality of mass spectrometry training data;

[0008] The Raman spectrum training data in the first training data set is respectively spliced with the mass spectrometry training data in the second training data set, and a plurality of spliced training data corresponding to the spliced training data in the spliced training data set is obtained, forming a spliced training data set;

[0009] The spliced training data in the spliced training data set is used for training to obtain a Raman and mass spectrometry-based pathogenic bacteria identification model.

[0010] Optionally, the training based on the spliced training data in the spliced training data set obtains a pathogenic bacteria identification model based on Raman and mass spectrometry, and the method comprises the following steps:

[0011] The self-attention feature extraction processing is performed on the spliced training data in the spliced training data set respectively, and a plurality of pieces of self-attention feature data corresponding to the spliced training data are obtained, thereby forming a self-attention feature data set.

[0012] The one-dimensional convolution processing is performed on the self-attention feature data in the self-attention feature data set respectively, and a plurality of pieces of spliced feature data corresponding to the self-attention feature data are obtained, thereby generating a spliced feature data set.

[0013] The aggregation processing is performed on the plurality of pieces of spliced feature data in the spliced feature data set respectively, and a plurality of pieces of aggregation feature data corresponding to the spliced feature data are obtained, thereby generating an aggregation feature data set.

[0014] The classification processing is performed on the aggregation feature data in the aggregation feature data set respectively, and a corresponding prediction result is obtained.

[0015] According to the obtained prediction result, a preset loss function is used to calculate a loss value of the pathogenic bacteria identification model based on Raman and mass spectrometry, and the weight of the pathogenic bacteria identification model based on Raman and mass spectrometry is adjusted according to the calculated loss value, until the loss value of the pathogenic bacteria identification model based on Raman and mass spectrometry converges.

[0016] Optionally, the self-attention feature extraction processing is performed on the spliced training data in the spliced training data set respectively, and a plurality of pieces of self-attention feature data of the spliced data are obtained, thereby forming a self-attention feature data set, which comprises the following steps: the self-attention feature extraction processing is performed on the spliced training data in the spliced training data set respectively by using a multi-head self-attention mechanism, a plurality of pieces of self-attention feature data of the spliced data are obtained, and a self-attention feature data set is formed.

[0017] Optionally, the pathogenic bacteria identification model based on Raman and mass spectrometry is used for classifying pathogenic bacteria or particulate matter.

[0018] Correspondingly, the embodiment of the application further provides a device for generating a pathogenic bacteria identification model based on Raman and mass spectrometry, which comprises:

[0019] A first obtaining unit is adapted to obtain a first training data set and a second training data set, wherein the first training data set comprises a plurality of pieces of Raman spectrum training data, and the second training data set comprises a plurality of pieces of mass spectrum training data.

[0020] A splicing processing unit is adapted to perform splicing processing on the Raman spectrum training data in the first training data set and the mass spectrum training data in the second training data set respectively, to obtain a plurality of pieces of spliced training data corresponding to the Raman spectrum training data and the mass spectrum training data, and to form a spliced training data set.

[0021] a model training unit, adapted to train based on the spliced training data in the spliced training data set, to obtain the Raman and mass spectrum based pathogenic bacteria identification model.

[0022] Optionally, the model training unit is adapted to perform self-attention feature extraction processing on the spliced training data in the spliced training data set respectively, to obtain corresponding multiple pieces of self-attention feature data, form a self-attention feature data set, perform one-dimensional convolution processing on the self-attention feature data in the self-attention feature data set respectively, to obtain corresponding multiple pieces of spliced feature data, generate a spliced feature data set, perform aggregation processing on the multiple pieces of spliced feature data in the spliced feature data set, to obtain corresponding multiple pieces of aggregated feature data, generate an aggregated feature data set, perform classification processing on the aggregated feature data in the aggregated feature data set respectively, to obtain corresponding prediction results, calculate a loss value of the Raman and mass spectrum based pathogenic bacteria identification model using a preset loss function according to the obtained prediction results, and adjust the weight of the Raman and mass spectrum based pathogenic bacteria identification model according to the calculated loss value, until the loss value of the Raman and mass spectrum based pathogenic bacteria identification model converges.

[0023] Optionally, the model training unit is adapted to perform self-attention feature extraction processing on the spliced training data in the spliced training data set respectively using a multi-head self-attention mechanism, to obtain corresponding multiple pieces of self-attention feature data of the spliced data, form a self-attention feature data set.

[0024] Optionally, the Raman and mass spectrum based pathogenic bacteria identification model is used for classifying pathogenic bacteria or particulate matter.

[0025] Correspondingly, the embodiment of the present application also provides a Raman and mass spectrum based pathogenic bacteria identification method, comprising:

[0026] obtaining Raman spectrum data and mass spectrum data of a sample to be analyzed;

[0027] inputting the Raman spectrum data and the mass spectrum data of the sample to be analyzed into a Raman and mass spectrum based pathogenic bacteria identification model generated by using the Raman and mass spectrum based pathogenic bacteria identification model generation method according to any one of the above, to obtain a corresponding pathogenic bacteria identification result.

[0028] Correspondingly, the embodiment of the present application also provides a Raman and mass spectrum based pathogenic bacteria identification device, comprising:

[0029] a second obtaining unit, adapted to obtain Raman spectrum data and mass spectrum data of a sample to be analyzed;

[0030] The analysis and identification unit is suitable for inputting Raman spectrum data and mass spectrum data of a sample to be analyzed into a Raman and mass spectrum based pathogenic bacteria identification model generated by the Raman and mass spectrum based pathogenic bacteria identification model generation method according to any one of the preceding embodiments, and obtaining a corresponding pathogenic bacteria identification result.

[0031] Correspondingly, the embodiments of the present application also provide a device comprising at least one memory and at least one processor, the memory storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the Raman and mass spectrum based pathogenic bacteria identification model generation method according to any one of the preceding embodiments or the Raman and mass spectrum based pathogenic bacteria identification method according to the preceding embodiments.

[0032] Correspondingly, the embodiments of the present application also provide a storage medium storing one or more computer instructions, the one or more computer instructions being used to implement the Raman and mass spectrum based pathogenic bacteria identification model generation method according to any one of the preceding embodiments or the Raman and mass spectrum based pathogenic bacteria identification method according to the preceding embodiments. Advantages

[0033] Compared with the prior art, the technical scheme of the present application has the following advantages: in the Raman and mass spectrum based pathogenic bacteria identification model generation method provided by the embodiments of the present application, the Raman spectrum training data in the first training data set are first spliced with the mass spectrum training data in the second training data set respectively to obtain a plurality of spliced training data, which can improve the feature information richness of the spliced training data in the spliced training data set, and then the spliced training data in the spliced training data set are used for training to obtain a Raman and mass spectrum based pathogenic bacteria identification model, which is helpful to improve the performance of the constructed Raman and mass spectrum based pathogenic bacteria identification model, and further improve the prediction accuracy of the Raman and mass spectrum based pathogenic bacteria identification model when the Raman and mass spectrum based pathogenic bacteria identification model is used for detecting sample data subsequently. BRIEF DESCRIPTION OF DRAWINGS

[0034] Fig. 1 is a flowchart of an embodiment of the Raman and mass spectrum based pathogenic bacteria identification model generation method provided by the technical scheme of the present application;

[0035] Fig. 2 is a schematic diagram of Raman spectrum training data;

[0036] Fig. 3 is a schematic diagram of mass spectrum training data;

[0037] Fig. 4 is a schematic diagram of spliced training data obtained by splicing a Raman spectrum training data and a mass spectrum training data;

[0038] Figure 5 is a flowchart of an embodiment of a method for obtaining a Raman and mass spectrometry based pathogenic bacteria identification model by training using spliced training data in a spliced training data set according to the present application;

[0039] Figure 6 is a comparison of the confusion matrix of the accuracy of a Raman and mass spectrometry based pathogenic bacteria identification model according to the present application;

[0040] Figure 7 is a schematic diagram of the framework structure of a device for generating a Raman and mass spectrometry based pathogenic bacteria identification model according to an embodiment of the present application;

[0041] Figure 8 is a flowchart of a method for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application;

[0042] Figure 9 is a schematic diagram of the structure of a device for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application;

[0043] Figure 10 is a flowchart of a method for processing mass spectrometry data according to an embodiment of the present application;

[0044] Figure 11 is a schematic diagram of raw mass spectrometry data according to an embodiment of step S10 in Figure 10;

[0045] Figure 12 is a schematic diagram of the Gaussian distribution of signal intensity according to an embodiment of the method for processing mass spectrometry data according to the present application;

[0046] Figure 13 is a schematic diagram of newly added mass spectrometry data according to an embodiment of step S20 in Figure 10;

[0047] Figure 14 is a t-SNE distribution map obtained based on raw mass spectrometry data according to an embodiment, and a t-SNE distribution map obtained based on mass spectrometry data processed according to the method for processing mass spectrometry data according to an embodiment of the present application;

[0048] Figure 15 is a comparison of the confusion matrix of the accuracy of a machine learning model according to the present application;

[0049] Figure 16 is a comparison of the confusion matrix of the accuracy of a deep learning model according to the present application;

[0050] Figure 17 is a schematic diagram of the structure of a data processing system according to an embodiment of the present application;

[0051] Figure 18 is a schematic diagram of the structure of a device according to an embodiment of the present application. Embodiments of the present application

[0052] As described in the background, the accuracy of existing Raman and mass spectrometry based pathogenic bacteria identification methods still needs to be improved.

[0053] To solve the above technical problems, the embodiment of the present application provides a pathogenic bacteria identification model generation method based on Raman and mass spectrum, comprising: obtaining a first training data set and a second training data set, wherein the first training data set comprises a plurality of Raman spectrum training data, and the second training data set comprises a plurality of mass spectrum training data; performing splicing processing on the Raman spectrum training data in the first training data set and the mass spectrum training data in the second training data set respectively to obtain a plurality of corresponding splicing training data, and form a splicing training data set; and training the splicing training data in the splicing training data set to obtain a pathogenic bacteria identification model based on Raman and mass spectrum.

[0054] In the pathogenic bacteria identification model generation method based on Raman and mass spectrum provided by the embodiment of the present application, the Raman spectrum training data in the first training data set and the mass spectrum training data in the second training data set are spliced respectively to obtain a plurality of corresponding splicing training data, which can improve the feature information richness of the splicing training data in the splicing training data set. Then, the splicing training data in the splicing training data set is trained to obtain a pathogenic bacteria identification model based on Raman and mass spectrum, which is helpful to improve the performance of the pathogenic bacteria identification model based on Raman and mass spectrum constructed, and further improve the prediction accuracy of the pathogenic bacteria identification model based on Raman and mass spectrum when the pathogenic bacteria identification model based on Raman and mass spectrum is used to detect the sample data to be processed.

[0055] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0056] FIG. 1 shows a flowchart of an embodiment of the pathogenic bacteria identification model generation method based on Raman and mass spectrum provided by the present application. Referring to FIG. 1, a pathogenic bacteria identification model generation method based on Raman and mass spectrum can specifically include the following steps:

[0057] Step S110: obtaining a first training data set and a second training data set, wherein the first training data set comprises a plurality of Raman spectrum training data, and the second training data set comprises a plurality of mass spectrum training data;

[0058] Step S120: performing splicing processing on the Raman spectrum training data in the first training data set and the mass spectrum training data in the second training data set respectively to obtain a plurality of corresponding splicing training data, and form a splicing training data set;

[0059] Step S130: training the splicing training data in the splicing training data set to obtain a pathogenic bacteria identification model based on Raman and mass spectrum.

[0060] Please continue to refer to FIG. 1, and perform step S110 to obtain a first training data set and a second training data set, the first training data set including a plurality of Raman spectrum training data, and the second training data set including a plurality of mass spectrum training data.

[0061] The first training data set and the second training data set are obtained to provide a basis for subsequent splicing of the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set to obtain a plurality of spliced training data and form a spliced training data set.

[0062] Raman spectrum (Raman) is an analysis method for obtaining information about vibration, rotation, etc. of molecules by using the Raman spectrum scattering effect of molecules. Specifically, Raman spectrum data is obtained by analyzing scattered light spectrum different from the wavelength of excitation light to obtain information about molecular vibration and rotation.

[0063] Referring to FIG. 2, the horizontal axis represents the difference between the relative frequency of the sample and the laser light source, also known as the Raman shift or frequency shift, that is, the relative wave number, and the vertical axis represents the intensity or signal strength of the sample scattered light, also known as the Raman intensity.

[0064] Mass spectrum data is commonly used in the fields of medicine, biology, environment, and food science, etc. It is the information about the mass-to-charge ratio (m / z) of molecules in the sample and the intensity at each mass-to-charge ratio obtained by detecting the sample by a mass spectrometer. Accordingly, the mass spectrum data contains information about the intensity changing with the mass-to-charge ratio.

[0065] Referring to FIG. 3, the horizontal axis represents the mass-to-charge ratio of the mass spectrum data, and the vertical axis represents the intensity at the mass-to-charge ratio. For example, the sample to be detected can be a pathogenic bacteria, and the mass spectrum data is obtained by detecting the pathogenic bacteria by a mass spectrometer.

[0066] According to actual needs, the source of the Raman spectrum training data in the first training data set can be various.

[0067] As an example, the step of obtaining the first training data set includes detecting the sample to be detected by a Raman spectrometer to obtain original Raman spectrum training data, and performing first data enhancement processing on the original Raman spectrum training data to obtain corresponding first additional training data, the first additional training data and the original Raman spectrum training data constituting the first training data set.

[0068] As an example, the original Raman spectrum training data is first copied, and the Raman shift in the copied original Raman spectrum training data is adjusted according to the distribution rule of the Raman shift in the original Raman spectrum training data to obtain corresponding first additional training data.

[0069] The number of Raman spectrum training data in the first training data set can be set according to the training requirements of the Raman and mass spectrum based pathogenic bacteria identification model, and is not limited herein.

[0070] Similarly, the sources of the mass spectrum training data in the second training data set can also be various.

[0071] As an example, the step of obtaining the second training data set includes: detecting the sample to be tested by using a mass spectrometer to obtain original mass spectrum training data; and performing second data enhancement processing on the original mass spectrum training data to obtain corresponding second newly added training data, wherein the second newly added training data and the original mass spectrum training data constitute the second training data set.

[0072] As an example, the step of performing second data enhancement processing on the original mass spectrum training data to obtain corresponding second newly added training data includes: duplicating the original mass spectrum training data to obtain corresponding duplicate training data; and adjusting the signal intensity in the duplicate training data according to the distribution rule of the signal intensity in the original mass spectrum training data to obtain the corresponding second newly added training data.

[0073] The number of mass spectrum training data in the second training data set can be set according to actual needs. Specifically, the number of mass spectrum training data in the second training data set can be set according to the training requirements of the Raman and mass spectrum based pathogenic bacteria identification model.

[0074] FIG. 4 shows a schematic diagram of a spliced training data obtained by splicing a Raman spectrum training data and a mass spectrum training data. Please refer to FIGS. 1-4 in combination. In step S120, the Raman spectrum training data in the first training data set is respectively spliced with the mass spectrum training data in the second training data set to obtain corresponding multiple spliced training data, thereby forming a spliced training data set.

[0075] Splicing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set to obtain corresponding multiple spliced training data, thereby forming a spliced training data set, provides a basis for subsequent training using the spliced training data in the spliced training data set to obtain the Raman and mass spectrum based pathogenic bacteria identification model.

[0076] As an example, the step of splicing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively includes: traversing the Raman spectrum training data in the first training data set, and obtaining current Raman spectrum training data traversed to; splicing the current Raman spectrum training data traversed to with each mass spectrum training data in the second training data set respectively, and obtaining a plurality of splicing training data corresponding; obtaining the next Raman spectrum training data in the first training data set as the current Raman spectrum training data traversed to, and repeating the step of splicing the current Raman spectrum training data traversed to with each mass spectrum training data in the second training data set respectively, and obtaining a plurality of splicing training data corresponding, until the Raman spectrum training data in the first training data set is completely traversed.

[0077] According to actual needs, the Raman spectrum training data in the first training data set can be spliced with the mass spectrum training data in the second training data set by using a preset data fusion algorithm. The data fusion algorithm can be selected by those skilled in the art according to actual needs, and is not limited herein.

[0078] Splicing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively enables the generated corresponding splicing training data to simultaneously have the characteristic information of the Raman spectrum training data and the characteristic information of the mass spectrum training data, so that the generated splicing training data has more rich and comprehensive characteristic information.

[0079] FIG. 5 shows a flowchart of an embodiment of the present application in which the splicing training data in the splicing training data set is used for training to obtain a pathogenic bacteria identification model based on Raman and mass spectrum. Please refer to FIGS. 1 to 5 in combination, and perform step S130 to train the splicing training data in the splicing training data set to obtain a pathogenic bacteria identification model based on Raman and mass spectrum.

[0080] In this embodiment, the step of training the splicing training data in the splicing training data set to obtain a pathogenic bacteria identification model based on Raman and mass spectrum can specifically include:

[0081] Step S1301: respectively performing self-attention feature extraction processing on the splicing training data in the splicing training data set, obtaining a plurality of self-attention feature data corresponding, and forming a self-attention feature data set;

[0082] Step S1302: respectively performing one-dimensional convolution processing on the self-attention feature data in the self-attention feature data set, obtaining a plurality of splicing feature data corresponding, and generating a splicing feature data set.

[0083] Step S1303: aggregating a plurality of splicing feature data in the splicing feature data set to obtain corresponding plurality of aggregated feature data, and generating an aggregated feature data set;

[0084] Step S1304: classifying the aggregated feature data in the aggregated feature data set to obtain a corresponding prediction result;

[0085] Step S1305: calculating the loss value of the Raman and mass spectrum based pathogenic bacteria identification model by using a preset loss function according to the obtained prediction result, and adjusting the weight of the Raman and mass spectrum based pathogenic bacteria identification model according to the calculated loss value until the loss value of the Raman and mass spectrum based pathogenic bacteria identification model converges.

[0086] Please continue to refer to FIGS. 1-5, and perform step S1301 to respectively perform self-attention feature extraction processing on the splicing training data in the splicing training data set, obtain corresponding plurality of self-attention feature data, and form a self-attention feature data set.

[0087] Respectively performing self-attention feature extraction processing on the splicing training data in the splicing training data set, obtaining corresponding plurality of self-attention feature data, and forming a self-attention feature data set, which provides a basis for subsequently performing one-dimensional convolution processing on the self-attention feature data in the self-attention feature data set to obtain corresponding plurality of splicing feature data and generate a splicing feature data set.

[0088] Respectively performing self-attention feature extraction processing on the splicing training data in the splicing training data set enables the obtained plurality of self-attention feature data of the splicing data to consider the feature related detail information of Raman spectrum (Reman) and mass spectrum (Mass), increase the information extraction range, and help to speed up the information processing efficiency.

[0089] In this embodiment, the multi-head self-attention mechanism is used to respectively perform self-attention feature extraction processing on the splicing training data in the splicing training data set, obtain corresponding plurality of self-attention feature data, and form a self-attention feature data set.

[0090] Specifically, when the multi-head self-attention mechanism is used for self-attention feature extraction processing of the spliced training data in the spliced training data set, the spliced training data in the spliced training data set are multiplied by a plurality of groups of trainable parameter matrices WQ, WK, and WV respectively, to obtain a plurality of groups of query matrix (Q), key matrix (K), and value (V) matrix corresponding to the parameter matrices WQ, WK, and WV respectively, and the plurality of groups of query matrix, key matrix, and value matrix are subjected to splicing operation and vector dot product operation to obtain a corresponding attention matrix as the corresponding self-attention feature data.

[0091] Please continue to refer to FIGS. 1 to 5, and perform step S1302 to respectively perform one-dimensional convolution processing on the self-attention feature data in the self-attention feature data set, to obtain a plurality of pieces of spliced feature data, and generate a spliced feature data set.

[0092] The self-attention feature data in the self-attention feature data set are respectively subjected to one-dimensional convolution processing to obtain a plurality of pieces of spliced feature data, and generate a spliced feature data set, which prepares for subsequent aggregation processing of the plurality of pieces of spliced feature data in the spliced feature data set to obtain a plurality of pieces of aggregated feature data, and generate an aggregated feature data set.

[0093] The self-attention feature data are subjected to one-dimensional convolution processing to obtain a plurality of pieces of spliced feature data, so that the obtained spliced feature data can simultaneously contain feature information of the corresponding Raman spectrum training data and mass spectrum training data, which is conducive to further increasing the information richness of the spliced feature data.

[0094] At the same time, the self-attention feature data are subjected to one-dimensional convolution processing to obtain a plurality of pieces of self-attention feature data, which can realize dimension reduction of the self-attention feature data, and accordingly help to reduce the subsequent computational amount. Please continue to refer to FIGS. 1 to 5, and perform step S1303 to aggregate the plurality of pieces of spliced feature data in the spliced feature data set to obtain a plurality of pieces of aggregated feature data, and generate an aggregated feature data set.

[0095] The plurality of pieces of spliced feature data in the spliced feature data set are aggregated to obtain a plurality of pieces of aggregated feature data, and generate an aggregated feature data set, which provides a basis for subsequent classification processing of the aggregated feature data in the aggregated feature data set to obtain a corresponding prediction result.

[0096] In this embodiment, the step of aggregating the plurality of pieces of spliced feature data in the spliced feature data set includes splicing the plurality of pieces of spliced feature data in the spliced feature data set to obtain a plurality of pieces of aggregated feature data.

[0097] Correspondingly, the plurality of splicing feature data in the splicing feature data set is aggregated to obtain a plurality of corresponding aggregated feature data, so that the plurality of corresponding aggregated feature data respectively has more rich and comprehensive sample feature information.

[0098] Please continue to refer to FIGS. 1-5, and perform step S1304 to classify the aggregated feature data in the aggregated feature data set respectively to obtain corresponding prediction results.

[0099] The classification processing of the aggregated feature data in the aggregated feature data set obtains corresponding prediction results, which provides a basis for subsequent calculation of the loss value of the Raman and mass spectrum based pathogenic bacteria identification model using a preset loss function according to the obtained prediction results.

[0100] In this embodiment, a linear classifier is used to perform linear classification processing on the aggregated feature data in the aggregated feature data set to obtain the prediction results corresponding to the aggregated feature data. The corresponding prediction results are probability values of the sample corresponding to the aggregated feature data belonging to each sample category.

[0101] Please continue to refer to FIGS. 1-5, and perform step S1305 to calculate the loss value of the Raman and mass spectrum based pathogenic bacteria identification model using a preset loss function according to the obtained prediction results, and adjust the weight of the Raman and mass spectrum based pathogenic bacteria identification model according to the calculated loss value until the loss value of the Raman and mass spectrum based pathogenic bacteria identification model converges.

[0102] According to the obtained prediction results, the loss value of the Raman and mass spectrum based pathogenic bacteria identification model is calculated using a preset loss function, and the weight of the Raman and mass spectrum based pathogenic bacteria identification model is adjusted according to the calculated loss value until the loss value of the Raman and mass spectrum based pathogenic bacteria identification model converges, thereby obtaining a final Raman and mass spectrum based pathogenic bacteria identification model.

[0103] In this embodiment, according to the obtained prediction results, the loss value of the Raman and mass spectrum based pathogenic bacteria identification model is calculated using a preset loss function, and the weight of the Raman and mass spectrum based pathogenic bacteria identification model is adjusted according to the calculated loss value, thereby completing one iteration training of the Raman and mass spectrum based pathogenic bacteria identification model.

[0104] Specifically, the process of each iteration training includes: training the Raman and mass spectrum based pathogenic bacteria identification model to be trained respectively by using a preset number (such as a batch size) of aggregated feature data, and obtaining a preset number of prediction results; calculating a corresponding loss value by using a preset loss function according to the difference between the prediction results and the true results; obtaining a corresponding gradient value by back propagation derivation according to the calculated loss value; and adjusting the weight of the Raman and mass spectrum based pathogenic bacteria identification model once according to the gradient value obtained by the back propagation derivation.

[0105] Correspondingly, the Raman and mass spectrum based pathogenic bacteria identification model is iteratively updated by performing multiple iteration training until the loss value of the Raman and mass spectrum based pathogenic bacteria identification model on the preset verification set converges. Wherein, the loss value of the Raman and mass spectrum based pathogenic bacteria identification model on the preset verification set converges, which means that the loss value of the Raman and mass spectrum based pathogenic bacteria identification model on the preset verification set reaches a minimum value.

[0106] For more detailed content of the multiple iteration training process of the Raman and mass spectrum based pathogenic bacteria identification model, please refer to the iteration training process of the neural network model in the prior art, which will not be repeated here.

[0107] In this embodiment, the Raman and mass spectrum based pathogenic bacteria identification model is used for classifying pathogenic bacteria. In other embodiments, the Raman and mass spectrum based pathogenic bacteria identification model can also be used for classifying other types of samples, which is not limited here.

[0108] Referring to FIG. 6, a comparison diagram of the prediction accuracy confusion matrix of the Raman and mass spectrum based pathogenic bacteria identification model is shown, and the darker the color of the grid where the number is located, the higher the corresponding prediction accuracy.

[0109] Wherein, FIG. 6(a) shows the prediction accuracy confusion matrix of the Raman and mass spectrum based pathogenic bacteria identification model trained by using only Raman spectrum training data, FIG. 6(b) shows the prediction accuracy confusion matrix of the Raman and mass spectrum based pathogenic bacteria identification model trained by using only mass spectrum training data, and FIG. 6(c) shows the prediction accuracy confusion matrix of the Raman and mass spectrum based pathogenic bacteria identification model trained by using the splicing training data obtained by splicing the Raman spectrum training data and the mass spectrum training data in the embodiment of the application.

[0110] As an example, the sample model is used for analysis of pathogenic bacteria, and in the confusion matrix, True represents the true result, Predicted represents the predicted result, and the types of pathogenic bacteria include different species or subspecies of Enterobacter cloacae: E. bugandensis, E. hormaechei, E. chengduensis, E. cloacae, E. dissolvens, E. asburiae, E. kobei, and E. ludwigii.

[0111] For example, taking E. hormaechei as an example, referring to FIG. 6(a), when the Raman and mass spectrum-based pathogenic bacteria identification model trained by using the Raman spectrum training data is used to analyze the sample, the probability of predicting the correct result is 0.49 (i.e., 49%), the probability of predicting E. chengduensis is 0.46 (i.e., 46%), and the probability of predicting E. cloacae is 0.05 (i.e., 5%); referring to FIG. 6(b), when the Raman and mass spectrum-based pathogenic bacteria identification model trained by using the mass spectrum training data is used to analyze the sample, the probability of predicting the correct result is 0.3 (i.e., 30%), the probability of predicting E. bugandensis is 0.55 (i.e., 55%), and the probability of predicting E. chengduensis is 0.15 (i.e., 15%); referring to FIG. 6(c), when the Raman and mass spectrum-based pathogenic bacteria identification model in the embodiment is used to analyze the sample, the probability of predicting the correct result is 0.71 (i.e., 71%), the probability of predicting E. bugandensis is 0.16 (i.e., 16%), the probability of predicting E. asburiae is 0.01 (i.e., 1%), and the probability of predicting E. ludwigii is 0.12 (i.e., 12%).

[0112] As can be seen from FIG. 6(a), the overall prediction accuracy (acc) of the Raman and mass spectrum based pathogenic bacteria identification model trained by using only the Raman spectrum training data for training on the pathogenic bacteria categories is 71.72%, as can be seen from FIG. 6(b), the overall prediction accuracy (acc) of the Raman and mass spectrum based pathogenic bacteria identification model trained by using only the mass spectrum training data for training on the pathogenic bacteria categories is 60.71%, as can be seen from FIG. 6(c), the prediction accuracy (acc) of the Raman and mass spectrum based pathogenic bacteria identification model trained by using the spliced training data obtained by splicing the Raman spectrum training data and the mass spectrum training data in the embodiment of the present application on the pathogenic bacteria categories is 82.98%. Therefore, the Raman and mass spectrum based pathogenic bacteria identification model generated by the Raman and mass spectrum based pathogenic bacteria identification model generation method in the embodiment of the present application can effectively improve the prediction accuracy.

[0113] Correspondingly, the embodiment of the present application also provides a Raman and mass spectrum based pathogenic bacteria identification model generation device.

[0114] FIG. 7 shows a schematic diagram of the framework structure of a Raman and mass spectrum based pathogenic bacteria identification model generation device in the embodiment of the present application. Referring to FIG. 7, a Raman and mass spectrum based pathogenic bacteria identification model generation device 700 comprises: a first acquisition unit 701 adapted to acquire a first training data set and a second training data set, the first training data set comprising a plurality of Raman spectrum training data, and the second training data set comprising a plurality of mass spectrum training data; a splicing processing unit 702 adapted to splice the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively, acquire a plurality of spliced training data corresponding thereto, and form a spliced training data set; and a model training unit 703 adapted to train by using the spliced training data in the spliced training data set, and acquire a Raman and mass spectrum based pathogenic bacteria identification model.

[0115] The Raman and mass spectrum based pathogenic bacteria identification model generation device in the embodiment can be used to execute the aforementioned Raman and mass spectrum based pathogenic bacteria identification model generation method, or other functional structures can also be used to execute the aforementioned Raman and mass spectrum based pathogenic bacteria identification model generation method. For the Raman and mass spectrum based pathogenic bacteria identification model generation device, please refer to the aforementioned content of the Raman and mass spectrum based pathogenic bacteria identification model generation method, which will not be repeated here.

[0116] Correspondingly, the embodiment of the present application also provides a Raman and mass spectrum based pathogenic bacteria identification method.

[0117] FIG. 8 shows a flowchart of a method for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application. Referring to FIG. 8, the method for identifying pathogenic bacteria based on Raman and mass spectrometry can include the following steps.

[0118] Step S810: Obtain Raman spectrum data and mass spectrum data of a sample to be analyzed.

[0119] Step S820: Input the Raman spectrum data and mass spectrum data of the sample to be analyzed into a model for identifying pathogenic bacteria based on Raman and mass spectrometry generated by a method for generating a model for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application, and obtain a corresponding result of identifying pathogenic bacteria.

[0120] The Raman spectrum data and mass spectrum data of the sample to be analyzed are one-dimensional detection data obtained by detecting the sample to be analyzed using a Raman spectrometer and a mass spectrometer, respectively.

[0121] Correspondingly, the model for identifying pathogenic bacteria based on Raman and mass spectrometry generated by the method for generating a model for identifying pathogenic bacteria based on Raman and mass spectrometry is used to detect sample data to be analyzed, and the prediction result of the sample data to be analyzed. For the method for generating a model for identifying pathogenic bacteria based on Raman and mass spectrometry, please refer to the corresponding description in the foregoing part, which will not be repeated here.

[0122] Correspondingly, the present embodiment also provides a device for identifying pathogenic bacteria based on Raman and mass spectrometry.

[0123] FIG. 9 shows a structural diagram of a device for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application. Referring to FIG. 9, the device 900 for identifying pathogenic bacteria based on Raman and mass spectrometry can include a second obtaining unit 901 adapted to obtain Raman spectrum data and mass spectrum data of a sample to be analyzed; and an identifying unit 902 adapted to input the Raman spectrum data and mass spectrum data of the sample to be analyzed into a model for identifying pathogenic bacteria based on Raman and mass spectrometry generated by a method for generating a model for identifying pathogenic bacteria based on Raman and mass spectrometry according to an embodiment of the present application, and obtain a corresponding result of identifying pathogenic bacteria.

[0124] The device for identifying pathogenic bacteria based on Raman and mass spectrometry according to the present embodiment can be used to perform the method for identifying pathogenic bacteria based on Raman and mass spectrometry described above, or other functional structures can also be used to perform the method for identifying pathogenic bacteria based on Raman and mass spectrometry described above. For the device for identifying pathogenic bacteria based on Raman and mass spectrometry, please refer to the content of the method for identifying pathogenic bacteria based on Raman and mass spectrometry described above, which will not be repeated here.

[0125] Correspondingly, the present embodiment also provides a method for processing mass spectrum data. Referring to FIG. 10, a flowchart of an embodiment of the method for processing mass spectrum data according to the present application is shown.

[0126] In the embodiment, the processing method of the mass spectrum data comprises the following basic steps:

[0127] Step S10: obtaining original mass spectrum data containing signal intensity varying with mass-to-charge ratio;

[0128] Step S20: obtaining Gaussian distribution of the signal intensity;

[0129] Step S30: data sampling is performed on the Gaussian distribution of the signal intensity, and based on the sampling result, the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees to obtain a plurality of different new mass spectrum data corresponding to the original mass spectrum data.

[0130] The embodiment of the application utilizes the Gaussian distribution of the signal intensity, and through the sampling manner, based on the sampling result, the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees to obtain a plurality of different new mass spectrum data corresponding to the original mass spectrum data, wherein, since the Gaussian distribution of the signal intensity can represent the normal fluctuation rule of the signal intensity, the signal intensity is sampled based on the Gaussian distribution of the signal intensity, so that the reliability of the new mass spectrum data is higher, and the data expansion of the original mass spectrum data is realized, so that the quantity of the data is increased and the diversity of the data is improved.

[0131] In order to make the above-mentioned purpose, features and advantages of the application more obvious and easy to understand, the specific embodiments of the application will be described in detail below with reference to the accompanying drawings.

[0132] With reference to FIGS. 10 and 11, FIG. 11 is a schematic diagram of an embodiment of original mass spectrum data, and step S10 is performed to obtain original mass spectrum data containing signal intensity varying with mass-to-charge ratio.

[0133] Subsequently, the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees to obtain adjusted signal intensity, and based on this, new mass spectrum data different from the original mass spectrum data is obtained, so that more quantity of new mass spectrum data is obtained based on the original mass spectrum data, and data expansion is realized.

[0134] It should be noted that in the mass spectrum data, the horizontal coordinate of the mass spectrum data is mass-to-charge ratio (m / z), and the vertical coordinate is signal intensity.

[0135] The mass spectrum data is: the sample is dissociated, and different fragmentation mass spectrum characteristics are formed according to the mechanism that the flight time is different according to the different molecular sizes.

[0136] Therefore, the mass spectrum data is data augmented in a manner of adjusting the distribution of signal intensity to different degrees. Since the test of mass spectrum data usually has certain volatility, the processing method of mass spectrum data of the embodiment can generate fitting mass spectrum data caused by signal intensity volatility.

[0137] It should be noted that the original mass spectrum data is obtained by detecting a preset number of measured samples.

[0138] As shown in FIG. 11, the abscissa in FIG. 11 represents mass-to-charge ratio, and the ordinate represents signal intensity. In the embodiment, the signal intensity of the mass spectrum data is the peak intensity. For example, the measured sample can be a pathogenic bacteria, and the mass spectrum data is obtained by detecting the pathogenic bacteria.

[0139] Mass spectrometry is a technology for analyzing the chemical composition of molecules in a sample to be tested. By detecting the sample to be tested by a mass spectrometer, the mass-to-charge ratio (m / z) of the molecule and the intensity at each mass-to-charge ratio can be obtained. Therefore, the mass spectrum data contains intensity varying with mass-to-charge ratio, and the mass spectrum data is commonly used in the fields of medicine, biology, environment, and food science.

[0140] Correspondingly, the mass-to-charge ratio of the mass spectrum data is the position of the mass-to-charge ratio corresponding to each molecule, and the signal intensity is the intensity at the mass-to-charge ratio.

[0141] In order to further improve the reliability of sample analysis, the mass spectrum data is gradually fused or spliced with other modal data (for example, Raman data). For example, when a machine learning model or a deep learning model is used for sample analysis, the mass spectrum data and the Raman data of the sample to be tested can be input into the model, and the sample analysis can be realized by the fused data or spliced data of the two, thereby improving the accuracy of sample analysis.

[0142] Specifically, the original mass spectrum data is obtained by detecting a measured sample by a detection device. For example, the detection device can be a mass spectrometer.

[0143] It should be noted that the number of original mass spectrum data can be one or multiple.

[0144] Referring back to FIG. 10, step S20 is performed to obtain the Gaussian distribution of the signal intensity.

[0145] The Gaussian distribution of the signal intensity can represent the normal fluctuation rule of the signal intensity. Therefore, the Gaussian distribution of the signal intensity is obtained first, so that the signal intensity can be sampled based on the Gaussian distribution subsequently, thereby generating simulated mass spectrum data as new mass spectrum data.

[0146] Further, sampling the signal intensity based on the Gaussian distribution of the signal intensity makes the reliability of the new mass spectrum data higher.

[0147] In the embodiment, in the step of obtaining the Gaussian distribution of the signal intensity, the Gaussian distribution of the signal intensity that can be detected by the detection device used to obtain the original mass spectrum data is obtained.

[0148] When the detection device detects the sample to be detected, the detected signal intensity usually fluctuates (for example, the detection result of the detection device may fluctuate due to human operation, sample preparation or the detection device itself), and the random distribution of the signal intensity of the mass spectrum data satisfies the Gaussian distribution.

[0149] Further, the fluctuation of the detection result of the detection device usually has an approximate or same influence on different mass-to-charge ratios of the same sample to be detected, that is, it can be considered that the same Gaussian distribution is applicable to different mass-to-charge ratios, or has an approximate or same influence on different samples to be detected, that is, it can be considered that the same Gaussian distribution is applicable to different samples to be detected. Therefore, selecting the Gaussian distribution of the signal intensity that can be detected by the detection device is beneficial to improve the universality of the Gaussian distribution. Accordingly, compared with the scheme of setting an independent Gaussian distribution for each mass-to-charge ratio, the embodiment is beneficial to reduce the complexity of the mass spectrum data processing method.

[0150] In addition, when the new mass spectrum data is used for model training, feature extraction is usually performed. Therefore, using the Gaussian distribution of the signal intensity for representing the stability of the detection result of the detection device indicates that the fluctuation cannot reflect the characteristics of the sample to be detected, and the fluctuation is caused by the detection device. This is beneficial to reduce the attention to the fluctuation caused by the detection device during model training. Therefore, using the new mass spectrum data obtained by the mass spectrum data processing method of the embodiment for model training can increase the training samples while reducing the probability of negatively affecting the training effect, so that the trained model is more accurate.

[0151] Specifically, in combination with reference to FIG. 12, FIG. 12 is a schematic diagram of the Gaussian distribution of the signal intensity according to an embodiment of the present application. In the embodiment, the Gaussian distribution is a Gaussian distribution of signal intensity offset percentage, and the signal intensity offset percentage refers to the offset percentage of the signal intensity relative to the signal intensity of the original mass spectrum data.

[0152] As shown in FIG. 12, the abscissa in FIG. 12 represents the signal intensity offset percentage, the ordinate represents the number, and the higher the number of the ordinate, the higher the probability corresponding to the offset percentage.

[0153] The offset percentage is used to represent the relative intensity, so that the same Gaussian distribution data (i.e., the offset percentage of the signal intensity) can be shared by different mass-to-charge ratios or different samples to be measured during subsequent sampling, thereby reducing the complexity of data processing.

[0154] It should be noted that before the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees, step S25 is performed, and the original mass spectrum data is first data augmented by copying the data to obtain a plurality of copied data corresponding to the original mass spectrum data.

[0155] The copied data is obtained by copying the original mass spectrum data, that is, the copied data is the same as the original mass spectrum data corresponding thereto, so that the distribution of the signal intensity of the copied data is adjusted to different degrees, which is equivalent to adjusting the distribution of the signal intensity of the original mass spectrum data to different degrees.

[0156] It should be noted that by copying the data, the subsequent data sampling facilitates the simultaneous adjustment of each copied data by using a plurality of sampling results, thereby improving the efficiency of data processing.

[0157] It can be understood that in other embodiments, the step of copying data can not be performed, and the distribution of the signal intensity of the original mass spectrum data is adjusted by different sampling results, and the adjusted data is stored as new mass spectrum data.

[0158] It should be further noted that when the number of original mass spectrum data is multiple, the number of copied data corresponding to each original mass spectrum data can be determined according to the data requirement.

[0159] In this embodiment, the original mass spectrum data is first data augmented by copying the data, and the higher the quality of the original mass spectrum data, the more the number of corresponding copied data.

[0160] The higher the quality of the original mass spectrum data, the higher the accuracy of the original mass spectrum data, and accordingly, the more features it embodies, and the greater the effect on data analysis (for example, it is beneficial to realize data calculation or classification), therefore, the more the number of data augmentation for the original mass spectrum data with higher quality, the more beneficial to improve the reliability of data analysis results, accordingly, when training the model, increasing the number of reliable training samples is beneficial to improve the training effect of the model, so that the trained model is more accurate.

[0161] As an example, the manner of obtaining the quantity of the replicated data corresponding to each of the original mass spectrum data comprises: setting a weight corresponding to each of the original mass spectrum data based on the quality of the original mass spectrum data, and the higher the quality of the original mass spectrum data is, the greater the corresponding weight is; and obtaining the quantity of the replicated data corresponding to each of the original mass spectrum data based on the target total quantity of the mass spectrum data and the weight of each of the original mass spectrum data.

[0162] The weight is set based on the quality, so as to increase the proportion of high-quality mass spectrum data in the whole data, that is, to improve the effectiveness of the data information.

[0163] In this embodiment, the manner of judging the quality of the original mass spectrum data comprises: comparing the original mass spectrum data with standard mass spectrum data, and the higher the matching degree is, the higher the quality of the original mass spectrum data is.

[0164] The matching degree with the standard mass spectrum data is used as the evaluation standard, so as to reduce the complexity of the quality judgment.

[0165] Specifically, the manner of comparing the original mass spectrum data with the standard mass spectrum data comprises: comparing the position distribution of the mass-to-charge ratio of the original mass spectrum data with the position distribution of the mass-to-charge ratio of the standard mass spectrum data, and the higher the matching degree of the position distribution is, the higher the quality of the original mass spectrum data is.

[0166] The signal intensity obtained by testing different samples is often different, and the signal intensity has little significance for the quality evaluation. In a single original mass spectrum, the position of each mass-to-charge ratio should be fixed in theory. Therefore, the quality of the original mass spectrum data is comprehensively evaluated by the position distribution of the mass-to-charge ratio, so as to obtain the overall quality of the single original mass spectrum.

[0167] It should be noted that in other embodiments, other quality evaluation manners can be selected according to the specific type of the original mass spectrum data and other situations or actual needs.

[0168] Referring to FIG. 10, step S30 is performed to sample the Gaussian distribution of the signal intensity, and based on the sampling result, the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees to obtain a plurality of different new mass spectrum data corresponding to the original mass spectrum data.

[0169] Since the Gaussian distribution of the signal intensity can represent the normal fluctuation rule of the signal intensity, the signal intensity is sampled based on the Gaussian distribution of the signal intensity, so that the reliability of the new mass spectrum data is higher, and the data expansion of the original mass spectrum data is realized, so as to increase the quantity of the data while improving the diversity of the data. Correspondingly, the model is trained based on the more diverse data, which is beneficial to improving the accuracy of the model.

[0170] In addition, by data augmentation on the original mass spectrum data, in actual operation, when the original mass spectrum data needs to be fused or spliced with data of other modal, the data amount of the mass spectrum data of the embodiment can be matched with the data of other modal, so as to be compatible with the data of other modal.

[0171] Since the original mass spectrum data corresponds to several replication data by replicating the data first, the Gaussian distribution of the signal intensity is sampled, and the distribution of the signal intensity of the original mass spectrum data is adjusted to different degrees based on the sampling result, including: adjusting the signal intensity of the several replication data based on different sampling results, respectively, to realize second data augmentation, and obtain a plurality of different new mass spectrum data.

[0172] That is, for a single original mass spectrum data, through second data augmentation, a plurality of new mass spectrum data different from the original mass spectrum data are obtained, and the new mass spectrum data are also different from each other.

[0173] In the embodiment, in the process of sampling the Gaussian distribution of the signal intensity and adjusting the distribution of the signal intensity of the original mass spectrum data to different degrees based on the sampling result, an offset percentage is selected for each mass-to-charge ratio from the Gaussian distribution of the offset percentage, and the signal intensity corresponding to the mass-to-charge ratio in the original mass spectrum data is adjusted based on the selected offset percentage.

[0174] In the case where the number of original mass spectrum data is multiple, since each original mass spectrum data shares the same Gaussian distribution data, and the Gaussian distribution is the Gaussian distribution of the signal intensity offset percentage, for each mass-to-charge ratio in each original mass spectrum data, the original value of the signal intensity of the mass-to-charge ratio can be adjusted based on the sampled selected offset percentage.

[0175] For example, for each mass-to-charge ratio, the signal intensity can be adjusted by formula I2=I1*(1+m%); wherein I2 represents the signal intensity of the mass-to-charge ratio in the new mass spectrum data, I1 represents the signal intensity of the mass-to-charge ratio in the original mass spectrum data, m% represents the offset percentage of the signal intensity, and m% can be zero, positive or negative. That is, for each mass-to-charge ratio, after determining the signal intensity offset percentage, the original signal intensity of the mass-to-charge ratio is adjusted to obtain a new signal intensity.

[0176] It can be seen that although the signal intensity of different mass-to-charge ratios can be different, and the signal intensity distribution of different samples to be measured can be different, by using the Gaussian distribution of the relative intensity, the original signal intensity of each mass-to-charge ratio can be adjusted in the same way for different original mass spectrum data and different mass-to-charge ratios, thereby reducing the complexity of data amplification.

[0177] In this embodiment, the adjustment degree of the signal intensity of each mass-to-charge ratio in the same new mass spectrum data relative to the signal intensity of the mass-to-charge ratio in the original mass spectrum data is different.

[0178] Specifically, since the original mass spectrum data is obtained by copying the data, the signal intensity of the plurality of copied data is adjusted based on different sampling results, and the signal intensity of each mass-to-charge ratio in the same copied data is adjusted to different degrees.

[0179] By making the change degree of the signal intensity of each mass-to-charge ratio in the same new mass spectrum data relative to the original value different, more diverse data can be obtained. Moreover, when the data obtained by the method of this embodiment is analyzed, even if the data is normalized, the diversity of the normalized data can still be maintained.

[0180] For example, for a certain mass-to-charge ratio, the signal intensity in the new mass spectrum data is offset by +3% (i.e. the increase is 3%) relative to the signal intensity in the original mass spectrum data, and for another mass-to-charge ratio, the signal intensity in the new mass spectrum data is offset by -2% (i.e. the decrease is 2%) relative to the signal intensity in the original mass spectrum data.

[0181] Referring to FIG. 13, FIG. 13 is a schematic diagram of new mass spectrum data according to an embodiment of the present application, and in order to represent the difference between the original mass spectrum data and the new mass spectrum data, in FIG. 10, the new mass spectrum data and the original mass spectrum data in FIG. 8 are shown in the same coordinate.

[0182] In FIG. 13, the darker data represents the original mass spectrum data, and the lighter data represents the new mass spectrum data. Therefore, by data amplification, new mass spectrum data different from the original mass spectrum data can be obtained.

[0183] Referring to FIG. 14, FIG. 14 shows a t-SNE distribution diagram based on mass spectrum data, wherein FIG. 14(a) shows a t-SNE distribution diagram of an embodiment based on original mass spectrum data, and FIG. 14(b) shows a t-SNE distribution diagram of an embodiment based on mass spectrum data obtained by the method of this embodiment.

[0184] t-SNE (t-Distributed Stochastic Neighbor Embedding) is an unsupervised nonlinear technique mainly used to realize dimensionality reduction of data and make the data still carry the information in high-dimensional space in low-dimensional space.

[0185] As shown in FIG. 14, taking the analysis of pathogenic bacteria as an example, each point represents a data, and the data points in the same circle, oval, square or trapezoidal circle belong to the same pathogenic bacteria category, for example, the pathogenic bacteria include M. abscessus, M. fortuitum, M. ulcerans, M. peregrinum, M. phlei and M. chelonae.

[0186] It should be noted that, for the convenience of illustration, in FIG. 14, the points in the circle represent M. chelonae, the points in the square circle represent M. fortuitum, the points in the trapezoidal circle represent M. abscessus, the points in the solid line oval circle represent M. ulcerans, the points in the dotted line oval circle represent M. peregrinum, and the points in the double-dot-dash line oval circle represent M. phlei.

[0187] As can be seen from FIG. 14(a), the number of data points in the same pathogenic bacteria category is small in the t-SNE distribution diagram obtained by analyzing the sample through the original mass spectrum data, and as can be seen from FIG. 14(b), the number of data points in the same pathogenic bacteria category is increased and the distribution is stable by analyzing the sample through the mass spectrum data obtained by the method described in the embodiment, the distribution of the data points does not appear serious deformation, and the classification can still be well distinguished.

[0188] Referring to FIG. 15, FIG. 15 is a comparison diagram of accuracy confusion matrix based on a machine learning model, and the deeper the color of the grid where the number is located, the higher the accuracy.

[0189] Among them, FIG. 15(a) represents the accuracy confusion matrix of an embodiment of the machine learning model obtained based on the training of the original mass spectrum data, and FIG. 15(b) represents the accuracy confusion matrix of an embodiment of the machine learning model obtained based on the training of the mass spectrum data obtained by the processing method of the mass spectrum data described in the embodiment.

[0190] As an example, the model is used for pathogenic bacteria analysis, and in the confusion matrix, True represents the true result, and Predicted represents the predicted result. The types of pathogenic bacteria include M. abscessus, M. fortuitum, M. ulcerans, M. peregrinum, M. phlei, and M. chelonae.

[0191] For example, taking M. chelonae as True, when the machine learning model trained based on the original mass spectrum data is used for analysis, the probability of predicting the correct result is 0.83 (i.e., 83%), and the probability of predicting M. ulcerans is 0.17 (i.e., 17%).

[0192] As shown in FIG. 15(a), after training based on the original mass spectrum data, the overall prediction accuracy of the machine learning model for pathogenic bacteria categories is 69.40%, as shown in FIG. 15(b), after training based on the mass spectrum data obtained by the mass spectrum data processing method of the present embodiment, the overall prediction accuracy of the machine learning model for pathogenic bacteria categories is 78.43%, and a higher prediction accuracy can be obtained.

[0193] Referring to FIG. 16, FIG. 16 is a comparison diagram of accuracy confusion matrix based on a deep learning model.

[0194] Among them, FIG. 16(a) represents the accuracy confusion matrix of an embodiment of the deep learning model trained based on the original mass spectrum data, and FIG. 16(b) represents the accuracy confusion matrix of an embodiment of the deep learning model trained based on the mass spectrum data obtained by the mass spectrum data processing method of the present embodiment.

[0195] As an example, the model is used for pathogenic bacteria analysis, and in the confusion matrix, True represents the true result, and Predicted represents the predicted result.

[0196] As shown in FIG. 16(a), after training based on the original mass spectrum data, the overall prediction accuracy of the deep learning model for pathogenic bacteria categories is 75.38%, as shown in FIG. 16(b), after training based on the mass spectrum data obtained by the mass spectrum data processing method of the present embodiment, the overall prediction accuracy of the deep learning model for pathogenic bacteria categories is 90.33%, and a higher prediction accuracy can be obtained.

[0197] Correspondingly, the present application also provides a data processing system. FIG. 17 is a structural schematic diagram of an embodiment of the data processing system of the present application.

[0198] Referring to FIG. 17, and in combination with FIGS. 11-16, the data processing system comprises: an original data acquisition module 10 configured to acquire original mass spectrum data, the original mass spectrum data comprising signal intensity varying with mass-to-charge ratio; a Gaussian distribution acquisition module 20 configured to acquire Gaussian distribution of the signal intensity; and a data augmentation module 30 configured to sample the Gaussian distribution of the signal intensity, and to adjust the distribution of the signal intensity of the original mass spectrum data to different degrees based on the sampling result, to obtain a plurality of different new mass spectrum data corresponding to the original mass spectrum data.

[0199] The data processing system adjusts the distribution of the signal intensity of the original mass spectrum data to different degrees to obtain adjusted signal intensity, and accordingly obtains new mass spectrum data different from the original mass spectrum data, thereby obtaining a larger number of new mass spectrum data based on the original mass spectrum data, and achieving data augmentation.

[0200] Since the Gaussian distribution of the signal intensity can represent the normal fluctuation rule of the signal intensity, sampling the signal intensity based on the Gaussian distribution of the signal intensity makes the reliability of the new mass spectrum data higher, and in addition, achieves data augmentation of the original mass spectrum data, thereby increasing the number of data while improving the diversity of the data. Accordingly, model training based on more diverse data is beneficial to improving the accuracy of the model.

[0201] In addition, by augmenting the original mass spectrum data, in actual operation, when the original mass spectrum data needs to be fused or spliced with data of other modalities, the data amount of the mass spectrum data of the embodiment can be matched with the data of other modalities, thereby being compatible with the data of other modalities.

[0202] It should be noted that in the mass spectrum data, the horizontal coordinate of the mass spectrum data is mass-to-charge ratio, and the vertical coordinate is signal intensity.

[0203] It should also be noted that the original mass spectrum data is obtained by detecting a preset number of measured samples.

[0204] As shown in FIG. 11, the horizontal coordinate in FIG. 11 represents the position of mass-to-charge ratio, and the vertical coordinate is signal intensity. In this embodiment, the signal intensity of the mass spectrum data is the peak intensity. For example, the measured sample can be pathogenic bacteria, and the mass spectrum data is obtained by detecting the pathogenic bacteria.

[0205] Mass spectrometry is a technique for analyzing the chemical composition of molecules in a sample to be tested. By detecting the sample to be tested by a mass spectrometer, the mass-to-charge ratio (m / z) of the molecules and the intensity at each mass-to-charge ratio can be obtained. Therefore, the mass spectrometry data contains the intensity varying with the mass-to-charge ratio. Mass spectrometry data is commonly used in the fields of medicine, biology, environment and food science, etc.

[0206] Correspondingly, the mass-to-charge ratio of the mass spectrometry data is the position of the mass-to-charge ratio corresponding to each molecule, and the signal intensity is the intensity at the mass-to-charge ratio.

[0207] In order to further improve the reliability of sample analysis, the mass spectrometry data is gradually fused or spliced with other modal data (for example, Raman data). For example, when a machine learning model or a deep learning model is used for sample analysis, the mass spectrometry data and the Raman data of the sample to be tested can be input into the model, and the fusion data or the splicing data of the two are used to realize sample analysis, thereby improving the accuracy of sample analysis.

[0208] Specifically, the original mass spectrometry data is obtained by detecting the sample to be tested by a detection device. For example, the detection device can be a mass spectrometer.

[0209] The Gaussian distribution of the signal intensity can represent the normal fluctuation rule of the signal intensity. Therefore, the Gaussian distribution of the signal intensity is first obtained, so that the data augmentation module 30 samples the signal intensity based on the Gaussian distribution, thereby generating simulated mass spectrometry data as new mass spectrometry data.

[0210] Moreover, sampling the signal intensity based on the Gaussian distribution of the signal intensity makes the reliability of the new mass spectrometry data higher.

[0211] In this embodiment, the Gaussian distribution acquisition module 20 is configured to acquire the Gaussian distribution of the signal intensity that can be detected by a detection device used to acquire the original mass spectrometry data.

[0212] When the detection device detects the sample to be tested, the detected signal intensity usually fluctuates to a certain extent (for example, the fluctuation of the detection result of the detection device, which can be caused by human operation, sample preparation or the detection device itself), and the random distribution of the signal intensity of the mass spectrometry spectrum data is usually Gaussian.

[0213] Furthermore, fluctuations in the detection results of the detection equipment usually have approximately or identical effects on different mass-to-charge ratios of the same sample. In other words, it can be assumed that different mass-to-charge ratios are subject to the same Gaussian distribution, and even have approximately or identical effects on different samples. Therefore, selecting a Gaussian distribution of signal intensity that the detection equipment can detect is beneficial to improving the universality of the Gaussian distribution. Correspondingly, compared to setting an independent Gaussian distribution for each mass-to-charge ratio, this embodiment is beneficial to reducing the complexity of the mass spectrometry data processing method.

[0214] Furthermore, when using newly added mass spectrometry data for model training, feature extraction is usually performed. A Gaussian distribution of signal intensity, used to characterize the stability of the detection results of the detection device, is adopted. This indicates that the fluctuation does not reflect the characteristics of the sample itself and is caused by the detection device. This helps to reduce the focus on fluctuations caused by the detection device during model training. Therefore, using the newly added mass spectrometry data obtained by the mass spectrometry data processing method described in this embodiment for model training can increase the number of training samples while reducing the probability of negative impact on the training effect, making the trained model more accurate.

[0215] Referring to Figure 12, in this embodiment, the Gaussian distribution is a Gaussian distribution of signal intensity offset percentage, and the signal intensity offset percentage refers to the percentage offset of the signal intensity relative to the signal intensity of the original mass spectrometry data. As shown in Figure 12, the horizontal axis represents the signal intensity offset percentage, and the vertical axis represents the quantity. The higher the quantity on the vertical axis, the higher the probability corresponding to the offset percentage.

[0216] The offset percentage is used to characterize the relative intensity, so that in subsequent sampling, different mass-to-charge ratios or different test samples can share the same Gaussian distribution data (i.e., the offset percentage of the signal intensity), thereby reducing the complexity of the data processing.

[0217] It should be noted that the data processing system further includes a data copying module 25, which is used to perform a first data amplification on the original mass spectrometry data by copying data before making different adjustments to the signal intensity distribution of the original mass spectrometry data in the future, thereby obtaining a number of copied data corresponding to the original mass spectrometry data.

[0218] The copied data is obtained by copying the original mass spectrometry data, that is, the copied data is the same as its corresponding original mass spectrometry data. Therefore, the signal intensity distribution of the copied data is adjusted to different degrees, which is equivalent to adjusting the signal intensity distribution of the original mass spectrometry data to different degrees.

[0219] It should be noted that by copying the data, after subsequent data sampling, it is convenient to adjust each copied data using multiple sampling results, thereby improving the efficiency of data processing.

[0220] It can be understood that in other embodiments, the data replication module can also be omitted, and the data augmentation module 30 adjusts the distribution of the signal intensity of the original mass spectrum data through different sampling results, and stores the adjusted data as new mass spectrum data.

[0221] It should be further noted that in the case of multiple original mass spectrum data, the number of copied data corresponding to each original mass spectrum data can be determined according to data requirements.

[0222] In this embodiment, the higher the quality of the original mass spectrum data, the more the number of corresponding copied data.

[0223] The higher the quality of the original mass spectrum data, the higher the accuracy of the original mass spectrum data, and accordingly, the more features it embodies, and the greater the effect on data analysis (for example, it is beneficial to realize data calculation or classification). Therefore, the more the number of data augmentation for the original mass spectrum data with higher quality, the more beneficial to improve the reliability of data analysis results, and accordingly, the number of reliable training samples can be increased when training the model, which is beneficial to improve the training effect of the model, so that the trained model is more accurate.

[0224] As an example, the data replication module 25 includes: a weight setting unit configured to set a weight corresponding to each original mass spectrum data based on the quality of the original mass spectrum data, and the higher the quality of the original mass spectrum data, the greater the corresponding weight; and a number setting unit configured to obtain the number of copied data corresponding to each original mass spectrum data based on the target total number of mass spectrum data and the weight of each original mass spectrum data.

[0225] The weight is set based on the quality, thereby increasing the proportion of high-quality mass spectrum data in the whole data, that is, improving the effectiveness of data information.

[0226] In this embodiment, the way to judge the quality of the original mass spectrum data includes: comparing the original mass spectrum data with standard mass spectrum data, and the higher the matching degree, the higher the quality of the original mass spectrum data.

[0227] The matching degree with the standard mass spectrum data is used as the evaluation standard, which reduces the complexity of quality judgment.

[0228] Specifically, the manner of comparing the original mass spectrum data with the standard mass spectrum data comprises: comparing the position distribution of the mass-to-charge ratio of the original mass spectrum data with the position distribution of the mass-to-charge ratio of the standard mass spectrum data, and the higher the matching degree of the position distribution is, the higher the quality of the original mass spectrum data is.

[0229] The signal intensity obtained by testing different samples to be tested is often different, and the signal intensity has little significance for the evaluation of quality. In a single original mass spectrum, the position of each mass-to-charge ratio should be fixed in theory. Therefore, the quality of the original mass spectrum data is comprehensively evaluated by the position distribution of the mass-to-charge ratio to obtain the overall quality of the single original mass spectrum.

[0230] It should be noted that in other embodiments, according to the specific type of the original mass spectrum data and other conditions or actual needs, the quality of the original mass spectrum data can also be obtained by other quality evaluation manners.

[0231] In this embodiment, since the original mass spectrum data is obtained by copying the data, the data amplification module 30 adjusts the signal intensity of the plurality of copied data based on different sampling results to realize the second data amplification and obtain a plurality of different new mass spectrum data.

[0232] That is, for a single original mass spectrum data, a plurality of new mass spectrum data different from the original mass spectrum data are obtained by the second data amplification, and the new mass spectrum data are also different from each other.

[0233] In the case where the number of original mass spectrum data is multiple, since each original mass spectrum data shares the same Gaussian distribution data, and the Gaussian distribution is the Gaussian distribution of the signal intensity offset percentage, for each mass-to-charge ratio in each original mass spectrum data, the original value of the signal intensity of the mass-to-charge ratio can be adjusted based on the selected offset percentage of the sampling.

[0234] For example, for each mass-to-charge ratio, the data amplification module 30 adjusts the signal intensity based on the formula I2=I1*(1+m%); wherein I2 represents the signal intensity of the mass-to-charge ratio in the new mass spectrum data, I1 represents the signal intensity of the mass-to-charge ratio in the original mass spectrum data, m% represents the offset percentage of the signal intensity, and m% can be zero, positive or negative. That is, for each mass-to-charge ratio, after the signal intensity offset percentage is determined, the original signal intensity of the mass-to-charge ratio is adjusted to obtain the new signal intensity.

[0235] It can be seen that although the signal intensity of different mass-to-charge ratios can be different, and the signal intensity distribution of different samples to be measured can be different, by using the Gaussian distribution of relative intensity, the original signal intensity of each mass-to-charge ratio can be adjusted in the same way for different original mass spectrum data and different mass-to-charge ratios, thereby reducing the complexity of data amplification.

[0236] In this embodiment, the adjustment degree of the signal intensity of each mass-to-charge ratio in the same new mass spectrum data relative to the signal intensity of the mass-to-charge ratio in the original mass spectrum data is different.

[0237] Specifically, since the original mass spectrum data corresponds to several copied data by copying the data first, the data amplification module 30 adjusts the signal intensity of each mass-to-charge ratio in the same copied data to different degrees.

[0238] By making the change degree of the signal intensity of each mass-to-charge ratio in the same new mass spectrum data relative to the original value different, it is beneficial to obtain more diverse data. Moreover, when the data obtained by the method of this embodiment is used for data analysis, even if the data is normalized, the diversity of the normalized data can still be maintained.

[0239] For example, for a certain mass-to-charge ratio, the offset of the signal intensity in the new mass spectrum data relative to the signal intensity in the original mass spectrum data is +3% (i.e. the increase is 3%), and for another mass-to-charge ratio, the offset of the signal intensity in the new mass spectrum data relative to the signal intensity in the original mass spectrum data is -2% (i.e. the decrease is 2%).

[0240] Referring to FIG. 13, FIG. 13 is a schematic diagram of new mass spectrum data according to an embodiment of the present application, and in order to represent the difference between the original mass spectrum data and the new mass spectrum data, in FIG. 10, the new mass spectrum data and the original mass spectrum data in FIG. 8 are shown in the same coordinate.

[0241] In FIG. 13, the darker data represents the original mass spectrum data, and the lighter data represents the new mass spectrum data. Therefore, by performing data amplification, new mass spectrum data different from the original mass spectrum data can be obtained.

[0242] Referring to FIG. 14, FIG. 14 shows t-SNE distribution diagrams based on mass spectrum data, wherein FIG. 14(a) shows a t-SNE distribution diagram based on original mass spectrum data according to an embodiment, and FIG. 14(b) shows a t-SNE distribution diagram based on mass spectrum data obtained by the method according to an embodiment.

[0243] As shown in FIG. 14, taking the analysis of pathogenic bacteria as an example, each point represents a data, and the data points in the same circle, oval, square or trapezoidal circle belong to the same pathogenic bacteria category, for example, the pathogenic bacteria include M. abscessus, M. fortuitum, M. ulcerans, M. peregrinum, M. phlei and M. chelonae.

[0244] It should be noted that, in FIG. 11, for the convenience of illustration, the points in the circle represent M. chelonae, the points in the square circle represent M. fortuitum, the points in the trapezoidal circle represent M. abscessus, the points in the solid line oval circle represent M. ulcerans, the points in the dashed line oval circle represent M. peregrinum, and the points in the double-dot chain line oval circle represent M. phlei.

[0245] As can be seen from FIG. 14(a), the t-SNE distribution diagram obtained by analyzing the sample through the original mass spectrum data has a small number of data points in the same pathogenic bacteria category, and as can be seen from FIG. 11(b), the sample analysis through the mass spectrum data obtained by the method described in the embodiment has an increased number of data points in the same pathogenic bacteria category and stable distribution, and the distribution of the data points does not appear serious deformation, and the classification can still be well distinguished.

[0246] Referring to FIG. 15, FIG. 15 is a comparison diagram of the accuracy confusion matrix obtained based on the machine learning model, and the deeper the color of the grid where the number is located, the higher the accuracy.

[0247] Among them, FIG. 15(a) represents the accuracy confusion matrix of an embodiment of the machine learning model obtained based on the training of the original mass spectrum data, and FIG. 15(b) represents the accuracy confusion matrix of an embodiment of the machine learning model obtained based on the training of the mass spectrum data obtained by the processing method of the mass spectrum data described in the embodiment.

[0248] As an example, the model is used for pathogenic bacteria analysis, and in the confusion matrix, True represents the true result, and Predicted represents the predicted result, and the types of pathogenic bacteria include M. abscessus, M. fortuitum, M. ulcerans, M. peregrinum, M. phlei and M. chelonae.

[0249] For example, taking M. chelonae as an example, when a machine learning model trained based on original mass spectrum data is used for analysis, the probability of predicting the accurate result is 0.83 (i.e. 83%), and the probability of predicting M. ulcerans is 0.17 (i.e. 17%).

[0250] As shown in FIG. 15(a), after training based on original mass spectrum data, the overall prediction accuracy of the pathogenic bacteria class of the machine learning model is 69.40%, as shown in FIG. 15(b), after training based on the mass spectrum data obtained by the mass spectrum data processing method described in the embodiment, the overall prediction accuracy of the pathogenic bacteria class of the machine learning model is 78.43%, and a higher prediction accuracy can be obtained.

[0251] Referring to FIG. 16, FIG. 16 is a comparison diagram of accuracy confusion matrix based on a deep learning model.

[0252] Among them, FIG. 16(a) represents the accuracy confusion matrix of an embodiment of the deep learning model trained based on original mass spectrum data, and FIG. 16(b) represents the accuracy confusion matrix of an embodiment of the deep learning model trained based on the mass spectrum data obtained by the mass spectrum data processing method described in the embodiment.

[0253] As an example, the model is used for pathogenic bacteria analysis, and in the confusion matrix, True represents the true result, and Predicted represents the predicted result.

[0254] As shown in FIG. 16(a), after training based on original mass spectrum data, the overall prediction accuracy of the pathogenic bacteria class of the deep learning model is 75.38%, as shown in FIG. 16(b), after training based on the mass spectrum data obtained by the mass spectrum data processing method described in the embodiment, the overall prediction accuracy of the pathogenic bacteria class of the deep learning model is 90.33%, and a higher prediction accuracy can be obtained.

[0255] It should be noted that in the embodiment, the data processing system is used to implement the mass spectrum data processing method described in the foregoing embodiments, and the specific description of the data processing system can be combined with the related description in the foregoing embodiments.

[0256] Correspondingly, the embodiment of the present application further provides a device comprising at least one memory and at least one processor, the memory storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method for constructing a data processing model based on multi-modal fusion or the method for processing mass spectrum data based on multi-modal fusion. The method for constructing a data processing model based on multi-modal fusion or the method for processing mass spectrum data based on multi-modal fusion is described in the foregoing part, and will not be described here.

[0257] Correspondingly, the embodiment of the present application further provides a storage medium storing one or more computer instructions for implementing the method for generating a pathogenic bacteria identification model based on Raman and mass spectrum, the method for identifying pathogenic bacteria based on Raman and mass spectrum or the method for processing mass spectrum data. The method for generating a pathogenic bacteria identification model based on Raman and mass spectrum, the method for identifying pathogenic bacteria based on Raman and mass spectrum or the method for processing mass spectrum data is described in the foregoing part, and will not be described here.

[0258] Correspondingly, the embodiment of the present application further provides a device which can implement the method for generating a pathogenic bacteria identification model based on Raman and mass spectrum, the method for identifying pathogenic bacteria based on Raman and mass spectrum or the method for processing mass spectrum data by loading the one or more computer instructions in the form of a program, so as to implement the method for generating a pathogenic bacteria identification model based on Raman and mass spectrum, the method for identifying pathogenic bacteria based on Raman and mass spectrum or the method for processing mass spectrum data.

[0259] Referring to FIG. 18, a hardware structure diagram of the device provided by the embodiment of the present application is shown. The device of the present embodiment comprises at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.

[0260] In some embodiments, the number of the processor 01, the communication interface 02, the memory 03 and the communication bus 04 is at least one, and the processor 01, the communication interface 02 and the memory 03 complete the communication among each other through the communication bus 04.

[0261] The communication interface 02 can be the interface of the communication module for network communication, for example, the interface of the GSM module.

[0262] The processor 01 can be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the method described in the present embodiment.

[0263] The memory 03 can include a high-speed RAM memory and can also include a non-volatile memory, such as at least one disk memory. The memory 03 stores one or more computer instructions, which are executed by the processor 01 to implement the Raman and mass spectrometry-based pathogenic bacteria identification model generation method, the Raman and mass spectrometry-based pathogenic bacteria identification method, or the mass spectrometry data processing method provided by the foregoing embodiments.

[0264] It should be noted that the implementation device described above can also include other devices (not shown) that can not be necessary for the disclosure of the embodiments of the present application; since these other devices can not be necessary for understanding the disclosure of the embodiments of the present application, the embodiments of the present application do not introduce them one by one.

[0265] The above-described embodiments of the present application are combinations of elements and features of the present application. The elements or features can be considered selective unless otherwise mentioned. Each element or feature can be practiced without being combined with other elements or features. Also, the embodiments of the present application can be constructed by combining some of the elements and / or features. The order of the operations described in the embodiments of the present application can be changed. Some constructions of any of the embodiments can be included in another embodiment and can be substituted for corresponding constructions of another embodiment. It is obvious that the claims that are not explicitly cited in each other in the appended claims can be combined in the embodiments of the present application, or can be included in new claims after amendment.

[0266] The embodiments of the present application can be implemented by various means, for example, hardware, firmware, software, or a combination thereof. In a hardware configuration, the method according to the exemplary embodiments of the present application can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, etc.

[0267] In a firmware or software configuration, the embodiments of the present application can be implemented in the form of modules, procedures, functions, and the like. Software code can be stored in a memory unit and executed by a processor. The memory unit is located at the interior or exterior of the processor and can deliver data to and receive data from the processor via various known means.

[0268] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Numerous modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without the use of the inventive faculty. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0269] While the application has been disclosed by reference to the above embodiments, other modifications, variations, and alternatives are also possible. Accordingly, the application should not be limited to what has been specifically shown and described hereinabove.

Claims

1. A method for generating pathogenic bacteria identification models based on Raman and mass spectrometry, characterized in that, include: Obtain a first training dataset and a second training dataset. The first training dataset includes multiple Raman spectral training data, and the second training dataset includes multiple mass spectrometry training data. The Raman spectroscopy training data in the first training dataset is spliced ​​with the mass spectrometry training data in the second training dataset to obtain multiple spliced ​​training data, forming a spliced ​​training dataset. The spliced ​​training data in the spliced ​​training dataset is used for training to obtain a pathogen identification model based on Raman and mass spectrometry.

2. The method for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 1, characterized in that, The step of training using the spliced ​​training data in the spliced ​​training dataset to obtain a pathogen identification model based on Raman and mass spectrometry includes: Self-attention feature extraction is performed on the splicing training data in the splicing training dataset to obtain multiple corresponding self-attention feature data, forming a self-attention feature dataset. The self-attention feature data in the self-attention feature dataset are processed by one-dimensional convolution to obtain multiple corresponding concatenated feature data and generate a concatenated feature dataset. Multiple spliced ​​feature data in the spliced ​​feature dataset are aggregated to obtain corresponding multiple aggregated feature data, and an aggregated feature dataset is generated. The aggregated feature data in the aggregated feature dataset is classified to obtain the corresponding prediction results; Based on the obtained prediction results, the loss value of the pathogen identification model based on Raman and mass spectrometry is calculated using a preset loss function, and the weights of the pathogen identification model based on Raman and mass spectrometry are adjusted according to the calculated loss value until the loss value of the pathogen identification model based on Raman and mass spectrometry converges.

3. The method for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 2, characterized in that, The self-attention feature extraction process is performed on the splicing training data in the splicing training dataset to obtain the self-attention feature data of multiple splicing data, forming a self-attention feature dataset. This includes: using a multi-head self-attention mechanism to perform self-attention feature extraction on the splicing training data in the splicing training dataset to obtain the self-attention feature data of multiple splicing data, forming a self-attention feature dataset.

4. The method for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 1, characterized in that, The Raman and mass spectrometry-based pathogen identification model is used to classify pathogens.

5. A device for generating a pathogenic bacteria identification model based on Raman and mass spectrometry, characterized in that, include: The first acquisition unit is adapted to acquire a first training dataset and a second training dataset, wherein the first training dataset includes multiple Raman spectral training data and the second training dataset includes multiple mass spectrometry training data. The splicing processing unit is adapted to splice the Raman spectroscopy training data in the first training dataset with the mass spectrometry training data in the second training dataset to obtain multiple spliced ​​training data and form a spliced ​​training dataset. The model training unit is adapted to be trained using the spliced ​​training data in the spliced ​​training dataset to obtain a pathogen identification model based on Raman and mass spectrometry.

6. The apparatus for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 5, characterized in that, The model training unit is adapted to perform self-attention feature extraction processing on the spliced ​​training data in the spliced ​​training dataset to obtain multiple corresponding self-attention feature data, forming a self-attention feature dataset; perform one-dimensional convolution processing on the self-attention feature data in the self-attention feature dataset to obtain multiple corresponding spliced ​​feature data, generating a spliced ​​feature dataset; aggregate the multiple spliced ​​feature data in the spliced ​​feature dataset to obtain multiple corresponding aggregated feature data, generating an aggregated feature dataset; classify the aggregated feature data in the aggregated feature dataset to obtain corresponding prediction results; calculate the loss value of the pathogen identification model based on Raman and mass spectrometry using a preset loss function based on the obtained prediction results, and adjust the weights of the pathogen identification model based on Raman and mass spectrometry based on the calculated loss value until the loss value of the pathogen identification model based on Raman and mass spectrometry converges.

7. The apparatus for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 6, characterized in that, The model training unit is adapted to use a multi-head self-attention mechanism to perform self-attention feature extraction processing on the spliced ​​training data in the spliced ​​training dataset, respectively, to obtain the self-attention feature data of the corresponding multiple spliced ​​data, forming a self-attention feature dataset.

8. The apparatus for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in claim 5, characterized in that, The Raman and mass spectrometry-based pathogen identification model is used to classify pathogens.

9. A method for identifying pathogenic bacteria based on Raman and mass spectrometry, characterized in that, include: Acquire Raman spectral data and mass spectrometry data of the sample to be analyzed; The Raman spectral data and mass spectrometry data of the sample to be analyzed are input into the Raman and mass spectrometry-based pathogen identification model generated by the method for generating pathogen identification models based on Raman and mass spectrometry as described in any one of claims 1-4, and the corresponding pathogen identification results are obtained.

10. A device for identifying pathogenic bacteria based on Raman and mass spectrometry, characterized in that, include: The second acquisition unit is suitable for acquiring Raman spectral data and mass spectrometry data of the sample to be analyzed; The analysis and identification unit is adapted to input the Raman spectral data and mass spectrometry data of the sample to be analyzed into the Raman and mass spectrometry-based pathogen identification model generated by the method for generating pathogen identification models based on Raman and mass spectrometry as described in any one of claims 1-4, and obtain the corresponding pathogen identification results.

11. A method for processing mass spectrometry data, characterized in that, include: Acquire raw mass spectrometry data, which includes signal intensity as the mass-to-charge ratio varies; Obtain the Gaussian distribution of the signal strength; Data sampling is performed on the Gaussian distribution of the signal intensity, and the distribution of the signal intensity of the original mass spectrometry data is adjusted to different degrees based on the sampling results, so as to obtain multiple different new mass spectrometry data corresponding to the original mass spectrometry data.

12. The method for processing mass spectrometry data as described in claim 11, characterized in that, Before adjusting the signal intensity distribution of the original mass spectrometry data to different degrees, the process also includes: The original mass spectrometry data is amplified by copying the data to obtain several copies of the original mass spectrometry data. Data sampling is performed on the Gaussian distribution of the signal intensity, and the distribution of the signal intensity of the original mass spectrometry data is adjusted to different degrees based on the sampling results. This includes adjusting the signal intensity of the several replicated data based on different sampling results to achieve second data amplification and obtain multiple different new mass spectrometry data.

13. The method for processing mass spectrometry data as described in claim 12, characterized in that, In the first data amplification of the original mass spectrometry data by copying data, the higher the quality of the original mass spectrometry data, the more copies of data are generated.

14. The method for processing mass spectrometry data as described in claim 13, characterized in that, The quality of the raw mass spectrometry data can be determined by comparing the raw mass spectrometry data with standard mass spectrometry data. The higher the matching degree, the higher the quality of the raw mass spectrometry data.

15. The method for processing mass spectrometry data as described in claim 14, characterized in that, The method of comparing the raw mass spectrometry data with the standard mass spectrometry data includes: comparing the positional distribution of the mass-to-charge ratio of the raw mass spectrometry data with the positional distribution of the mass-to-charge ratio of the standard mass spectrometry data. The higher the degree of matching of the positional distribution, the higher the quality of the raw mass spectrometry data.

16. The method for processing mass spectrometry data as described in claim 13, characterized in that, The methods for obtaining the number of replicates corresponding to each of the original mass spectrometry data include: Based on the quality of the raw mass spectrometry data, a weight is set for each raw mass spectrometry data, and the higher the quality of the raw mass spectrometry data, the greater the corresponding weight. Based on the target total number of mass spectrometry data and the weight of each of the original mass spectrometry data, the number of replicates corresponding to each of the original mass spectrometry data is obtained.

17. The method for processing mass spectrometry data as described in claim 11, characterized in that, The Gaussian distribution of the signal intensity is obtained, and the Gaussian distribution of the signal intensity that the detection device can detect is obtained. The detection device is used to obtain the raw mass spectrometry data.

18. The method for processing mass spectrometry data as described in any one of claims 11 to 17, characterized in that, In each new mass spectrometry dataset, the signal intensity of each mass-to-charge ratio is adjusted to a different degree relative to its signal intensity in the original mass spectrometry dataset.

19. The method for processing mass spectrometry data as described in any one of claims 11 to 17, characterized in that, In obtaining the Gaussian distribution of the signal intensity, the Gaussian distribution is a Gaussian distribution of signal intensity offset percentage, and the signal intensity offset percentage refers to the percentage offset of the signal intensity relative to the signal intensity of the original mass spectrometry data; In the process of sampling the Gaussian distribution of the signal intensity and adjusting the distribution of the signal intensity of the original mass spectrometry data to different degrees based on the sampling results, an offset percentage is selected for each mass-to-charge ratio from the Gaussian distribution of the offset percentage, and the signal intensity corresponding to the mass-to-charge ratio in the original mass spectrometry data is adjusted based on the selected offset percentage.

20. The method for processing mass spectrometry data as described in any one of claims 11 to 17, characterized in that, The signal intensity of the mass spectrometry data is the peak intensity.

21. A mass spectrometry data processing system, characterized in that, include: The raw data acquisition module is used to acquire raw mass spectrometry data, which includes signal intensity that varies with mass-to-charge ratio. A Gaussian distribution acquisition module is used to acquire the Gaussian distribution of the signal intensity; The data amplification module is used to sample the Gaussian distribution of the signal intensity and adjust the distribution of the signal intensity of the original mass spectrometry data to different degrees based on the sampling results, so as to obtain multiple different new mass spectrometry data corresponding to the original mass spectrometry data.

22. A device, characterized in that, The method includes at least one memory and at least one processor, wherein the memory stores one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in any one of claims 1-4, or the method for identifying pathogenic bacteria based on Raman and mass spectrometry as described in claim 9, or the method for processing mass spectrometry data as described in any one of claims 11-20.

23. A storage medium, characterized in that, The storage medium stores one or more computer instructions, which are used to implement the method for generating a pathogenic bacteria identification model based on Raman and mass spectrometry as described in any one of claims 1-4, or the method for identifying pathogenic bacteria based on Raman and mass spectrometry as described in claim 9, or the method for processing mass spectrometry data as described in any one of claims 11-20.

Citation Information

Patent Citations

  • A liquor vintage recognition method based on a fusion technology of ion mobility spectrometry / mass spectrometry / Raman spectroscopy

    CN103293141A

  • Mass spectrum data analysis method

    CN107818329A

  • Raman spectrum quantitative analysis method and analysis system based on deep learning

    CN117542446A

  • Super-resolution reconstruction method and device for mass spectrum image and electronic equipment

    CN117911247A

  • Raman and mass spectrum-based pathogenic bacterium identification and model generation method and related equipment

    CN118782154A