Data classification and model construction method based on Raman and mass spectrum, and related equipment

Through fusion processing and feature extraction of Raman spectrum and mass spectrum data, a data classification model based on Raman and mass spectrometry is constructed, which solves the problem of insufficient data classification accuracy in the existing technology and achieves higher sample detection accuracy and Pathogen classification effect.

CN118760980AActive Publication Date: 2024-10-11AFFILIATED HUSN HOSPITAL OF FUDAN UNIV +1
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410836234.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-11
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The accuracy of existing data classification methods based on Raman and mass spectrometry in sample detection still needs to be improved, especially when the data is complex.

Method used

By obtaining the Raman spectrum and mass spectrum training data sets, perform data fusion processing, extract self-attention features, perform convolution processing and aggregation processing, build a data classification model based on Raman and mass spectrometry, and adjust the model weight through the loss function to improve Model performance.

Benefits of technology

It significantly improves the performance and prediction accuracy of the data classification model, enhances the detection ability of samples, and especially shows high accuracy in classifying pathogenic bacteria.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760980A_ABST
    Figure CN118760980A_ABST
Patent Text Reader

Abstract

A data classification and model construction method based on Raman and mass spectrometry, and related equipment, the data classification and model construction method based on Raman and mass spectrometry comprising: obtaining a first training data set comprising a plurality of Raman spectrum training data, and a second training data set comprising a plurality of Raman spectrum training data; the second training data set comprises multiple pieces of mass spectrum training data; performing fusion 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 to obtain a plurality of pieces of corresponding fusion training data to form a fusion training data set; and training by adopting the fusion training data in the fusion training data set to obtain a data classification model based on Raman and mass spectrometry. According to the technical scheme of the embodiment of the invention, the performance of the construction method of the data classification model based on Raman and mass spectrometry is improved, so that the accuracy of sample analysis is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of biological information processing technology, and in particular to a method and related equipment for data classification and model construction based on Raman and mass spectrometry. Background Art

[0002] Sample testing technology has been widely used in fields such as medicine, biology, environment and food science. By testing samples, test data with analytical significance can be obtained.

[0003] However, as the data classification methods based on Raman and mass spectrometry develop towards a more complex direction, the quantity of sample detection data required is also increasing. For example, with the development of artificial intelligence, technologies such as machine learning and deep learning have gradually been used to achieve data analysis. However, the accuracy of the current data classification methods based on Raman and mass spectrometry still needs to be improved. Summary of the invention

[0004] The problem solved by the embodiments of the present invention is to provide a method and related equipment for constructing data classification and model based on Raman and mass spectrometry, which is beneficial to improving the performance of the method for constructing a data classification model based on Raman and mass spectrometry, thereby further improving the accuracy of sample analysis.

[0005] To solve the above problems, an embodiment of the present invention provides a method for constructing a data classification model based on Raman and mass spectrometry, comprising:

[0006] Acquire a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data;

[0007] Fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively, obtaining a plurality of corresponding fused training data to form a fused training data set;

[0008] The fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrometry.

[0009] Optionally, the adopting the fused training data in the fused training data set to perform training to obtain a data classification model based on Raman and mass spectrometry includes:

[0010] Performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set, respectively, to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction, to form a first directional attention feature data set; performing a first convolution processing on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set with the corresponding mass spectrum training data, respectively, to obtain a plurality of corresponding first feature data, to generate a first feature data set;

[0011] Performing a self-attention feature extraction process in the mass spectrum direction on the fused training data in the fused training data set, respectively, to obtain a plurality of corresponding self-attention feature data in the mass spectrum direction, to form a second directional attention feature data set; performing a second convolution process on the self-attention feature data in the mass spectrum direction in the second directional attention feature data set with the corresponding Raman spectrum training data, respectively, to obtain a plurality of corresponding second feature data, to generate a second feature data set;

[0012] Aggregate the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data and generate an aggregated feature data set;

[0013] Classify the aggregated feature data in the aggregated feature data set to obtain corresponding prediction results;

[0014] According to the prediction results obtained, a preset loss function is used to calculate the loss value of the data classification model based on Raman and mass spectrometry, and the weight of the data classification model based on Raman and mass spectrometry is adjusted according to the calculated loss value until the loss value of the data classification model based on Raman and mass spectrometry converges.

[0015] Optionally, the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set are respectively subjected to a first convolution process with the corresponding mass spectrum training data to obtain a plurality of corresponding first feature data, and after the first feature data set is generated, the first feature data in the first feature data set are aggregated with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data, and before the aggregated feature data set is generated, the fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrum, and further includes: performing a first dimensionality reduction process on the first feature data in the first feature data set;

[0016] The self-attention feature data in the mass spectrum direction in the second directional attention feature data set are respectively subjected to a second convolution process with the corresponding Raman spectrum training data to obtain a plurality of corresponding second feature data, and after the second feature data set is generated, the first feature data in the first feature data set is aggregated with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data, and before the aggregated feature data set is generated, the fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrum, and further includes: performing a second dimensionality reduction process on the second feature data in the second feature data set;

[0017] Aggregating the first feature data in the first feature data set with the corresponding second feature data in the second feature data set, obtaining multiple corresponding aggregated feature data, and generating an aggregated feature data set, including: aggregating the first feature data that has undergone the first dimensionality reduction processing with the corresponding second feature data that has undergone the second dimensionality reduction processing, obtaining multiple corresponding aggregated feature data, and generating an aggregated feature data set.

[0018] Optionally, the first dimensionality reduction processing includes a first convolution dimensionality reduction processing, and the second dimensionality reduction processing includes a second convolution dimensionality reduction processing.

[0019] Optionally, the performing of self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction to form a first directional attention feature data set comprises: performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set using a first multi-head self-attention mechanism to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction to form a first directional attention feature data set;

[0020] The method of performing self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, obtaining a corresponding plurality of self-attention feature data in the mass spectrum direction, and forming a second directional attention feature data set includes: using the second multi-head self-attention mechanism to perform self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, obtaining a corresponding plurality of self-attention feature data in the mass spectrum direction, and forming a second directional attention feature data set.

[0021] Optionally, the Raman and mass spectrometry-based data classification model is used to classify pathogens.

[0022] Accordingly, an embodiment of the present invention further provides a device for constructing a data classification model based on Raman and mass spectrometry, comprising:

[0023] A first acquisition unit, adapted to acquire a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data;

[0024] a fusion processing unit, adapted to fuse the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to obtain a plurality of corresponding fused training data, and form a fused training data set;

[0025] The training unit is adapted to use the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry.

[0026] Accordingly, an embodiment of the present invention further provides a data classification method based on Raman and mass spectrometry, comprising:

[0027] Acquire Raman spectrum data and mass spectrum data of the sample to be analyzed;

[0028] The Raman spectrum data and mass spectrum data of the sample to be analyzed are fused and input into the data classification model based on Raman and mass spectrum constructed by the method for constructing a data classification model based on Raman and mass spectrum as described in any of the above items to obtain the corresponding data classification result.

[0029] Accordingly, an embodiment of the present invention further provides a data classification device based on Raman and mass spectrometry, comprising:

[0030] A second acquisition unit, adapted to acquire Raman spectrum data and mass spectrum data of the sample to be analyzed;

[0031] The analysis and prediction unit is suitable for inputting the Raman spectrum data and mass spectrum data of the sample to be analyzed into the data classification model based on Raman and mass spectrum constructed by the method for constructing a data classification model based on Raman and mass spectrum as described in any of the above items to obtain the corresponding data classification result.

[0032] Accordingly, an embodiment of the present invention also provides a device, comprising 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 constructing a data classification model based on Raman and mass spectrometry as described in any one of the above items or the data classification method based on Raman and mass spectrometry as described in any one of the above items.

[0033] Correspondingly, an embodiment of the present invention also provides a storage medium, which stores one or more computer instructions, and the one or more computer instructions are used to implement the method for constructing a data classification model based on Raman and mass spectrometry as described in any of the above items or the data classification method based on Raman and mass spectrometry as described in any of the above items.

[0034] Compared with the prior art, the technical solution of the embodiment of the present invention has the following advantages:

[0035] An embodiment of the present invention provides a method for constructing a data classification model based on Raman and mass spectrometry, comprising: obtaining a first training data set and a second training data set, wherein the first training data set includes multiple Raman spectrum training data, and the second training data set includes multiple mass spectrum training data; fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to obtain multiple corresponding fused training data, to form a fused training data set; and using the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry.

[0036] In the method for constructing a data classification model based on Raman and mass spectrometry provided by an embodiment of the present invention, the Raman spectrum training data in the first training data set are first fused with the mass spectrum training data in the second training data set to obtain corresponding multiple fused training data, which can improve the richness of feature information of the fused training data in the fused training data set. The fused training data in the fused training data set is then used for training to obtain a data classification model based on Raman and mass spectrometry, which correspondingly helps to improve the performance of the constructed data classification model based on Raman and mass spectrometry, and then when the data classification model based on Raman and mass spectrometry is subsequently used to detect the sample data to be processed, it helps to improve the prediction accuracy of the data classification model based on Raman and mass spectrometry. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a flow chart of an embodiment of a method for constructing a data classification model based on Raman and mass spectrometry provided by the technical solution of the present invention;

[0038] Figure 2 It is a schematic diagram of Raman spectroscopy training data;

[0039] Figure 3 It is a schematic diagram of mass spectrometry training data;

[0040] Figure 4 is a schematic diagram of fused training data obtained by fusing a Raman spectrum training data with a mass spectrum training data;

[0041] Figure 5 It is a flow chart of an embodiment of using the fused training data in the fused training data set to train and obtain a data classification model based on Raman and mass spectrometry in the technical solution of the present invention;

[0042] FIG6 is a schematic diagram showing a comparison of confusion matrices of the accuracy of data classification models based on Raman and mass spectrometry;

[0043] Figure 7 Schematic diagram of the framework structure of a device for constructing a data classification model based on Raman and mass spectrometry in an embodiment of the present invention;

[0044] Figure 8 Schematic diagram of a process of a data classification method based on Raman and mass spectrometry in an embodiment of the present invention;

[0045] Fig. 9 is a schematic structural diagram of a data classification device based on Raman and mass spectrometry in an embodiment of the present invention;

[0046] Fig.10 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] As mentioned in the background art, the accuracy of existing data classification methods based on Raman and mass spectrometry still needs to be improved.

[0048] In order to solve the above technical problems, an embodiment of the present invention provides a method for constructing a data classification model based on Raman and mass spectrometry, including: obtaining a first training data set and a second training data set, the first training data set including multiple Raman spectrum training data, and the second training data set including multiple mass spectrum training data; fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to obtain multiple corresponding fused training data, to form a fused training data set; using the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry.

[0049] In the method for constructing a data classification model based on Raman and mass spectrometry provided by an embodiment of the present invention, the Raman spectrum training data in the first training data set are first fused with the mass spectrum training data in the second training data set to obtain corresponding multiple fused training data, which can improve the richness of feature information of the fused training data in the fused training data set. The fused training data in the fused training data set is then used for training to obtain a data classification model based on Raman and mass spectrometry, which correspondingly helps to improve the performance of the constructed data classification model based on Raman and mass spectrometry, and then when the data classification model based on Raman and mass spectrometry is subsequently used to detect the sample data to be processed, it helps to improve the prediction accuracy of the data classification model based on Raman and mass spectrometry.

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

[0051] Figure 1The flowchart of an embodiment of a method for constructing a data classification model based on Raman and mass spectrometry provided by the technical solution of the present invention is shown. Figure 1 A method for constructing a data classification model based on Raman and mass spectrometry may specifically include the following steps:

[0052] Step S110: acquiring a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data;

[0053] Step S120: fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively, obtaining a plurality of corresponding fused training data, and forming a fused training data set;

[0054] Step S130: using the fused training data in the fused training data set to perform training to obtain a data classification model based on Raman and mass spectrometry.

[0055] Please continue to refer to Figure 1 , execute step S110 to obtain a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data.

[0056] Acquire a first training data set and a second training data set, and provide a basis for subsequently fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to obtain a corresponding plurality of fused training data, and form a fused training data set.

[0057] Raman spectroscopy is an analytical method that uses the Raman spectral scattering effect of molecules to obtain information on molecular vibration, rotation, etc. Specifically, Raman spectroscopy data is obtained by analyzing the scattered spectrum with a wavelength different from the excitation light to obtain information on molecular vibration and rotation.

[0058] See also Figure 2 , where the horizontal axis represents the difference between the relative frequencies of the sample and the laser light source, also called Raman shift or frequency shift, that is, the relative wave number, and the vertical axis represents the intensity of the scattered light from the sample or the signal intensity, or called Raman intensity.

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

[0060] See also Figure 3 , Figure 3 The horizontal axis in represents the mass-to-charge ratio of the mass spectrum data, and the vertical axis represents the intensity under the mass-to-charge ratio. For example, the sample to be tested may be a pathogen, and the mass spectrum data is obtained by detecting the pathogen using a mass spectrometer.

[0061] According to actual needs, the Raman spectrum training data in the first training data set may come from various sources.

[0062] As an example, the step of obtaining a first training data set includes: using a Raman spectrometer to detect a sample to be tested to obtain original Raman spectrum training data; performing a first data enhancement process on the original Raman spectrum training data to obtain corresponding first newly added training data, wherein the first newly added training data and the Raman spectrum original training data constitute the first training data set.

[0063] As an example, the original Raman spectrum training data is first copied, and the Raman frequency shift in the copied original Raman spectrum training data is adjusted according to the distribution law of the Raman frequency shift in the original Raman spectrum training data to obtain the corresponding first newly added training data.

[0064] The amount of Raman spectrum training data in the first training data set can be set according to the training requirements of the data classification model based on Raman and mass spectrometry, and is not limited here.

[0065] According to actual needs, the mass spectrometry training data in the second training data set may come from various sources.

[0066] As an example, the step of obtaining a second training data set includes: using a mass spectrometer to detect the sample to be tested to obtain original mass spectrometry training data; performing a second data enhancement process on the original mass spectrometry training data to obtain corresponding second newly added training data, and the second newly added training data and the original mass spectrometry training data constitute the second training data set.

[0067] As an example, the steps of performing a second data enhancement processing on the original mass spectrometry training data and obtaining the corresponding second newly added training data include: copying the original mass spectrometry training data to obtain the corresponding copied training data; adjusting the signal intensity in the copied training data according to the distribution law of the signal intensity in the original mass spectrometry training data to obtain the corresponding second newly added training data.

[0068] The amount of mass spectrometry training data in the second training data set can be set according to the training requirements of the data classification model based on Raman and mass spectrometry, and is not limited here.

[0069] Figure 4A schematic diagram of fused training data obtained by fusion processing of a Raman spectrum training data and a mass spectrum training data is shown. Figures 1 to 4 , execute step S120, fuse the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively, obtain corresponding multiple fused training data, and form a fused training data set.

[0070] The Raman spectrum training data in the first training data set are fused with the mass spectrum training data in the second training data set respectively to obtain a plurality of corresponding fused training data to form a fused training data set, thereby providing a basis for subsequent training using the fused training data in the fused training data set to obtain a data classification model based on Raman and mass spectrometry.

[0071] As an example, the steps of fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively include: traversing the Raman spectrum training data in the first training data set to obtain the current Raman spectrum training data traversed to; fusing the traversed Raman spectrum training data with each mass spectrum training data in the second training data set respectively to obtain multiple corresponding fused training data; obtaining the next Raman spectrum training data from the first training data set as the current Raman spectrum training data traversed to, and repeatedly fusing the traversed Raman spectrum training data with each mass spectrum training data in the second training data set respectively to obtain multiple corresponding fused training data until all the Raman spectrum training data in the first training data set are traversed.

[0072] According to actual needs, an appropriate data fusion algorithm can be used to fuse the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set. The data fusion algorithm can be selected by those skilled in the art according to actual needs and is not limited here.

[0073] The Raman spectrum training data in the first training data set are fused with the mass spectrum training data in the second training data set respectively, so that the corresponding fused training data generated includes the feature information of the Raman spectrum training data, the feature information of the mass spectrum training data and the associated feature information between the Raman spectrum training data and the mass spectrum training data, so that the generated fused training data has richer and more comprehensive feature information.

[0074] Figure 5The flowchart of an embodiment of using the fusion training data in the fusion training data set to train and obtain a data classification model based on Raman and mass spectrometry in the technical solution of the present invention is shown. Figure 5 The step of using the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry may specifically include:

[0075] Step S1301: performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set, respectively, obtaining corresponding self-attention feature data in the Raman spectrum direction, and forming a first directional attention feature data set;

[0076] Step S1302: performing a first convolution process on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set and the corresponding mass spectrum training data, respectively, to obtain a plurality of corresponding first feature data, and generate a first feature data set;

[0077] Step S1303: performing mass spectrum direction self-attention feature extraction processing on the fused training data in the fused training data set respectively, obtaining a plurality of corresponding mass spectrum direction self-attention feature data, and forming a second directional attention feature data set;

[0078] Step S1304: performing a second convolution process on the self-attention feature data in the mass spectrum direction in the second directional attention feature data set and the corresponding Raman spectrum training data, respectively, to obtain a plurality of corresponding second feature data and generate a second feature data set;

[0079] Step S1305: Aggregate the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data and generate an aggregated feature data set;

[0080] Step S1306: performing classification processing on the aggregated feature data in the aggregated feature data set to obtain corresponding prediction results;

[0081] Step S1307: According to the prediction results obtained, a preset loss function is used to calculate the loss value of the data classification model based on Raman and mass spectrometry, and the weight of the data classification model based on Raman and mass spectrometry is adjusted according to the calculated loss value until the loss value of the data classification model based on Raman and mass spectrometry converges.

[0082] Please continue to refer to Figures 1 to 4, execute step S1301, perform self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set, obtain corresponding self-attention feature data in the Raman spectrum direction, and form a first directional attention feature data set.

[0083] The fused training data in the fused training data set are respectively subjected to self-attention feature extraction processing in the Raman spectrum direction to obtain a corresponding plurality of self-attention feature data in the Raman spectrum direction to form a first directional attention feature data set, thereby providing a basis for subsequently performing a first convolution processing on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set with the corresponding mass spectrum training data to obtain a corresponding plurality of first feature data and generate a first feature data set.

[0084] The fused training data in the fused training data set are respectively subjected to self-attention feature extraction processing in the Raman spectral direction, so that the obtained self-attention feature data in the Raman spectral direction can pay more attention to detail information related to the features in the Raman spectral direction, which helps to improve the expression ability of the self-attention feature data in the Raman spectral direction and helps to speed up the information processing efficiency.

[0085] In some embodiments, a first multi-head self-attention mechanism is used to perform self-attention feature extraction processing in the Raman spectral direction on the fused training data in the fused training data set, and corresponding self-attention feature data in the Raman spectral direction are obtained to form a first directional attention feature data set.

[0086] Specifically, when the first multi-head self-attention mechanism is used to perform self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set, the fused training data in the fused training data set are respectively compared with the corresponding multiple sets of trainable parameter matrices W Q , W K , W V Multiply them to get multiple groups and parameter matrix W Q , W K , W V Multiple sets of query matrices (Q), key matrices (K) and value (V) matrices are corresponding one to one, and concatenation operations and vector dot product operations are performed on the multiple sets of query matrices, key matrices and value matrices to obtain the corresponding attention matrix.

[0087] Please continue to refer to Figures 1 to 4 , execute step S1302, perform a first convolution process on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set with the corresponding mass spectrum training data, obtain the corresponding multiple first feature data, and generate a first feature data set.

[0088] The self-attention feature data in the Raman spectrum direction in the first directional attention feature data set are respectively subjected to a first convolution process with the corresponding mass spectrum training data to obtain a corresponding plurality of first feature data and generate a first feature data set, in preparation for subsequently aggregating the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain a corresponding plurality of aggregated feature data and generate an aggregated feature data set.

[0089] In some embodiments, in the step of performing a first convolution process on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set and the corresponding mass spectrum training data, the corresponding mass spectrum training data is the mass spectrum data used when the corresponding fusion data is obtained by fusion processing. The corresponding fusion data obtained by fusion processing is the fusion data used when the self-attention feature extraction process in the Raman spectrum direction is performed to obtain the self-attention feature data in the Raman spectrum direction.

[0090] The self-attention feature data in the Raman spectrum direction in the first directional attention feature data set are respectively subjected to a first convolution process with the corresponding mass spectrum training data, so that the acquired first feature data can contain the associated feature information between the corresponding Raman spectrum training data and the mass spectrum training data, which is beneficial to further increase the information richness of the first feature data.

[0091] Please continue to refer to Figure 2 , execute step S1303, perform self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, obtain the corresponding multiple self-attention feature data in the mass spectrum direction, and form a second directional attention feature data set.

[0092] The fused training data in the fused training data set are respectively subjected to self-attention feature extraction processing in the mass spectrum direction to obtain a corresponding plurality of self-attention feature data in the mass spectrum direction to form a second directional attention feature data set, thereby providing a basis for subsequently performing a second convolution processing on the self-attention feature data in the mass spectrum direction in the second directional attention feature data set with the corresponding Raman spectrum training data to obtain a corresponding plurality of second feature data and generate a second feature data set.

[0093] The fused training data in the fused training data set are respectively subjected to self-attention feature extraction processing in the mass spectrum direction, so that the obtained self-attention feature data in the mass spectrum direction can pay more attention to the detail information related to the features in the mass spectrum direction, which helps to improve the expression ability of the self-attention feature data in the mass spectrum direction and helps to speed up the information processing efficiency.

[0094] In some embodiments, a second multi-head self-attention mechanism is used to perform self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, and corresponding multiple self-attention feature data in the mass spectrum direction are obtained to form a second directional attention feature data set.

[0095] The second multi-head self-attention mechanism is used to perform self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set. Please refer to the aforementioned self-attention feature extraction processing in the Raman spectrum direction on the fused training data set to obtain the corresponding multiple self-attention feature data in the Raman spectrum direction, and the content of the first multi-head self-attention mechanism used to form the first directional attention feature data set is executed, which will not be repeated here.

[0096] Please continue to refer to Figures 1 to 4 , execute step S1304, perform a second convolution process on the self-attention feature data in the mass spectrum direction in the second directional attention feature data set with the corresponding Raman spectrum training data, obtain the corresponding multiple second feature data, and generate a second feature data set.

[0097] The self-attention feature data in the mass spectrum direction in the second directional attention feature data set are respectively subjected to a second convolution process with the corresponding Raman spectrum training data to obtain a corresponding plurality of second feature data and generate a second feature data set, in preparation for the subsequent aggregation process of the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain a corresponding plurality of aggregated feature data and generate an aggregated feature data set.

[0098] In some embodiments, in the step of performing a second convolution process on the self-attention feature data in the mass spectrum direction in the second directional attention feature data set and the corresponding Raman spectrum training data, the corresponding Raman spectrum training data is the Raman spectrum training data used when performing a fusion process to obtain the corresponding fusion data. The corresponding fusion data obtained by performing a fusion process is the fusion data used when performing a self-attention feature extraction process in the mass spectrum direction to obtain the self-attention feature data in the mass spectrum direction.

[0099] The self-attention feature data in the mass spectrum direction in the second directional attention feature data set are subjected to a second convolution process with the corresponding Raman spectrum training data, so that the acquired second feature data can contain the associated feature information between the corresponding Raman spectrum training data and the mass spectrum training data, which is beneficial to further increase the information richness of the second feature data.

[0100] Please continue to refer to Figures 1 to 4, execute step S1305, aggregate the first feature data in the first feature data set with the corresponding second feature data in the second feature data set, obtain the corresponding multiple aggregated feature data, and generate an aggregated feature data set.

[0101] The first feature data in the first feature data set is aggregated with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data and generate an aggregated feature data set, thereby providing a basis for subsequent classification processing of the aggregated feature data in the aggregated feature data set to obtain corresponding prediction results.

[0102] The step of aggregating the first feature data in the first feature data set and the corresponding second feature data in the second feature data set includes: respectively splicing the first feature data in the first feature data set and the second feature data in the second feature data set to obtain corresponding multiple aggregated feature data.

[0103] In some embodiments, in the step of splicing the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain the corresponding multiple aggregated feature data, the self-attention feature data in the Raman spectrum direction used when performing the first convolution processing to obtain the first feature data and the self-attention feature data in the mass spectrum direction used when performing the second convolution processing to obtain the second feature data are obtained by performing self-attention feature extraction processing in the Raman spectrum direction and self-attention feature extraction processing in the mass spectrum direction on the same fusion training data, respectively. The first feature data corresponds to the second feature data.

[0104] Correspondingly, the first feature data in the first feature data set and the corresponding second feature data in the second feature data set are aggregated, so that the corresponding multiple aggregated feature data obtained each have richer and more comprehensive sample feature information.

[0105] In this embodiment, the first feature data in the first feature data set and the corresponding second feature data in the second feature data set are aggregated to obtain multiple corresponding aggregated feature data. Before generating the aggregated feature data set, the fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrometry, which also includes: performing a first dimensionality reduction process on the first feature data in the first feature data set.

[0106] Performing a first dimensionality reduction process on the first feature data in the first feature data set can achieve dimensionality reduction of the first feature data and the second feature data, which correspondingly helps to reduce the subsequent amount of calculations.

[0107] As an example, the step of performing a first dimensionality reduction process on the first feature data in the first feature data set includes: performing a first convolution dimensionality reduction process on the first feature data in the first feature data set.

[0108] In other implementations, other dimensionality reduction methods may be used to perform the first dimensionality reduction processing on the first feature data in the first feature data set. Those skilled in the art may select one according to actual needs, and no limitation is made here.

[0109] In this embodiment, the first feature data in the first feature data set and the corresponding second feature data in the second feature data set are aggregated to obtain multiple corresponding aggregated feature data. Before generating the aggregated feature data set, the fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrometry, which also includes: performing a second dimensionality reduction process on the second feature data in the second feature data set.

[0110] Performing a second dimensionality reduction process on the second feature data in the second feature data set can achieve dimensionality reduction of the second feature data, which correspondingly helps to reduce the subsequent amount of calculations.

[0111] As an example, the step of performing a second dimensionality reduction process on the second feature data in the second feature data set includes: performing a second convolution dimensionality reduction process on the second feature data in the second feature data set.

[0112] In other implementations, other dimensionality reduction methods may be used to perform a second dimensionality reduction process on the second feature data in the second feature data set. Those skilled in the art may select one according to actual needs, and no limitation is made here.

[0113] Correspondingly, the step of aggregating the first feature data in the first feature data set with the corresponding second feature data in the second feature data set includes: performing a first aggregation process on the first feature data that has undergone a first dimensionality reduction process and the corresponding second feature data that has undergone a second dimensionality reduction process, obtaining a corresponding plurality of first aggregated feature data, and generating a first aggregated feature data set.

[0114] Please continue to refer to Figures 1 to 4 , execute step S1306, classify the aggregated feature data in the aggregated feature data set, and obtain corresponding prediction results.

[0115] The aggregated feature data in the aggregated feature data set is classified and processed to obtain corresponding prediction results, thereby providing a basis for subsequently calculating the loss value of the Raman and mass spectrometry-based data classification model using a preset loss function according to the obtained prediction results.

[0116] In some embodiments, a linear classifier is used to perform linear classification on the aggregated feature data in the aggregated feature data set to obtain prediction results corresponding to the aggregated feature data, wherein the corresponding prediction results are information on the probability values ​​of the samples corresponding to the aggregated feature data belonging to each sample category.

[0117] Please continue to refer to Figures 1 to 4 , execute step S1307, calculate the loss value of the data classification model based on Raman and mass spectrometry according to the obtained prediction result, and adjust the weight of the data classification model based on Raman and mass spectrometry according to the calculated loss value until the loss value of the data classification model based on Raman and mass spectrometry converges.

[0118] According to the prediction results obtained, a preset loss function is used to calculate the loss value of the data classification model based on Raman and mass spectrometry, and the weight of the data classification model based on Raman and mass spectrometry is adjusted according to the calculated loss value until the loss value of the data classification model based on Raman and mass spectrometry converges, thereby obtaining the final data classification model based on Raman and mass spectrometry.

[0119] In some embodiments, according to the prediction results obtained, a preset loss function is used to calculate the loss value of the data classification model based on Raman and mass spectrometry, and the weight of the data classification model based on Raman and mass spectrometry is adjusted according to the calculated loss value to complete an iterative training of the data classification model based on Raman and mass spectrometry.

[0120] Specifically, the process of each iterative training includes: using a preset number (e.g., batch size) of aggregated feature data to train the Raman and mass spectrometry-based data classification models to be trained, respectively, to obtain a preset number of prediction results; according to the difference between the training results and the true results, using a preset loss function to calculate the corresponding loss value; performing back propagation derivation based on the calculated loss value to obtain the corresponding gradient value; and adjusting the weight of the Raman and mass spectrometry-based data classification model based on the gradient value obtained by back propagation derivation.

[0121] Accordingly, multiple iterations of training are performed to continuously iterate and update the weights of the data classification model based on Raman and mass spectrometry until the loss value of the data classification model based on Raman and mass spectrometry on the preset validation set converges. The convergence of the loss value of the data classification model based on Raman and mass spectrometry on the preset validation set means that the loss value of the data classification model based on Raman and mass spectrometry on the preset validation set reaches a minimum value.

[0122] For more detailed information about the multiple iterative training process of the data classification model based on Raman and mass spectrometry, please refer to the iterative training process of the neural network model in the prior art, which will not be repeated here.

[0123] In some embodiments, the data classification model based on Raman and mass spectrometry is used to classify pathogens. In other embodiments, the data classification model based on Raman and mass spectrometry can also classify other types of samples, which are not limited here.

[0124] Refer to FIG6 , which is a comparative schematic diagram of the prediction accuracy confusion matrix of the data classification model based on Raman and mass spectrometry, and the darker the color of the grid where the number is located, the higher the accuracy.

[0125] Among them, Figure 6(a) shows the prediction accuracy confusion matrix of an embodiment of a data classification model based on Raman and mass spectrometry obtained by training only with Raman spectrum training data, Figure 6(b) shows the prediction accuracy confusion matrix of an embodiment of a data classification model based on Raman and mass spectrometry obtained by training only with mass spectrometry training data, and Figure 6(c) shows the prediction accuracy confusion matrix of an embodiment of a data classification model based on Raman and mass spectrometry obtained by training with fused training data obtained by fusing Raman spectrum training data and mass spectrometry training data in an embodiment of the present invention.

[0126] As an example, the sample model is used to analyze pathogens, and in the confusion matrix, True represents the true result, Predicted represents the predicted result, and the types of pathogens include Mycobacterium chelonae (M. chelonae), Mycobacterium Houston (M. Huston), Mycobacterium abscessus (M. abscessus), Mycobacterium mucogenicum (M. mucogenicum), Mycobacterium ulcerans (M. ulcerans), and Mycobacterium peregrinum (M. peregrinum).

[0127] For example, taking Mycobacterium chelonae as an example, see Figure 6(a). When the Raman and mass spectrometry-based data classification model obtained by training with Raman training data is analyzed, the probability of predicting an accurate result is 0.85 (i.e. 85%), and there is also a 0.06 (i.e. 6%) probability of predicting it as Mycobacterium Houston (M. Huston), a 0.04 (i.e. 4%) probability of predicting it as Mycobacterium abscessus (M. abscessus), and a 0.05 (i.e. 5%) probability of predicting it as Mycobacterium mucogenicum (M. mucogenicum); see Figure 6(b). When the mass spectrometry training data is used for training, the probability of predicting it as accurate is 0.85 (i.e. 85%). The obtained samples were analyzed by the models respectively, and the probability of predicting the accurate result was 0.46 (ie 46%), the probability of predicting it as Mycobacterium ulcerans (M.ulcerans) was 0.27 (ie 27%), and the probability of predicting it as Mycobacterium peregrinum (M.peregrinum) was 0.27 (ie 27%); referring to FIG6(c), when the data classification model based on Raman and mass spectrometry obtained by training the fusion training data in some embodiments was used for analysis, the probability of predicting the accurate result was 0.99 (ie 99%), and the probability of predicting it as Mycobacterium ulcerans (M.ulcerans) was 0.01 (ie 1%).

[0128] As can be seen from Figure 6 (a), the overall prediction accuracy (acc) of the pathogen category of the Raman and mass spectrometry-based data classification model obtained by training only with Raman spectroscopy training data is 72.89%, and as can be seen from Figure 6 (b), the overall prediction accuracy (acc) of the pathogen category of the Raman and mass spectrometry-based data classification model obtained by training only with mass spectrometry training data is 63.22%, and as can be seen from Figure 6 (c), the prediction accuracy (acc) of the pathogen category of the Raman and mass spectrometry-based data classification model obtained by training with the fusion training data obtained by fusion of Raman spectroscopy training data and mass spectrometry training data in the embodiment of the present invention is 97.06%. It can be seen that the prediction accuracy of the Raman and mass spectrometry-based data classification model constructed by the construction method of the Raman and mass spectrometry-based data classification model in the embodiment of the present invention has been significantly improved.

[0129] It is worth noting that for biological samples that require a culture cycle, the Raman and mass spectrometry-based data classification model constructed by the method for constructing a Raman and mass spectrometry-based data classification model in the embodiment of the present invention can effectively integrate sample information of different scales in a short period of time, shorten the culture cycle of biological samples required to obtain corresponding sample data, and improve the identification speed of actual clinical samples or other biological samples.

[0130] For example, when using the current Raman and mass spectrometry-based data classification model to analyze and identify biological samples, it is usually necessary to culture the biological samples for at least 48 hours to obtain mass spectrometry data with resolution peaks in order to achieve relatively accurate analysis and identification of the biological samples. However, the Raman and mass spectrometry-based data classification model constructed by the Raman and mass spectrometry-based data classification model construction method in the embodiment of the present invention can analyze and identify the mass spectrometry data obtained from biological samples that have been cultured for only 24 hours, effectively shortening the culture period of the biological samples.

[0131] Accordingly, an embodiment of the present invention also provides a device for constructing a data classification model based on Raman and mass spectrometry.

[0132] Figure 7 FIG. 1 is a schematic diagram showing a framework structure of a device for constructing a data classification model based on Raman and mass spectrometry in an embodiment of the present invention. Figure 7 A device 700 for constructing a data classification model based on Raman and mass spectrometry comprises: a first acquisition unit 701, adapted to acquire 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; a fusion processing unit 702, adapted to fuse the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to acquire a plurality of corresponding fused training data, and to form a fused training data set; a training unit 703, adapted to use the fused training data in the fused training data set for training, and to acquire a data classification model based on Raman and mass spectrometry.

[0133] In some embodiments, the device for constructing a data classification model based on Raman and mass spectrometry can be used to execute the aforementioned method for constructing a data classification model based on Raman and mass spectrometry, or other functional structures can be used to execute the aforementioned method for constructing a data classification model based on Raman and mass spectrometry. For the device for constructing a data classification model based on Raman and mass spectrometry, please refer to the aforementioned method for constructing a data classification model based on Raman and mass spectrometry, which will not be repeated here.

[0134] Accordingly, an embodiment of the present invention further provides a data classification method based on Raman and mass spectrometry.

[0135] Figure 8 A schematic flow chart of a data classification method based on Raman and mass spectrometry in an embodiment of the present invention is shown. Referring to FIG6 , a data classification method based on Raman and mass spectrometry may include:

[0136] Step S810: Acquire Raman spectrum data and mass spectrum data of the sample to be analyzed;

[0137] Step S820: input the Raman spectrum data and mass spectrum data of the sample to be analyzed into the data classification model based on Raman and mass spectrum constructed by the method for constructing a data classification model based on Raman and mass spectrum provided in an embodiment of the present invention, and obtain the corresponding data classification result.

[0138] Accordingly, the data classification model based on Raman and mass spectrometry constructed by the method for constructing a data classification model based on Raman and mass spectrometry is used to detect the sample data to be analyzed, and the prediction result of the sample data to be analyzed is obtained. For the method for constructing a data classification model based on Raman and mass spectrometry, please refer to the corresponding description in the previous section, which will not be repeated here.

[0139] Correspondingly, an embodiment of the present invention further provides a data classification device based on Raman and mass spectrometry.

[0140] Fig. 9 FIG. 1 is a schematic diagram showing a data classification device based on Raman and mass spectrometry in an embodiment of the present invention. Fig. 9 A data classification device 900 based on Raman and mass spectrometry may include: a second acquisition unit 901, suitable for acquiring Raman spectrum data and mass spectrum data of a sample to be analyzed; a data classification unit 902, suitable for inputting the Raman spectrum data and mass spectrum data of the sample to be analyzed into a data classification model based on Raman and mass spectrometry constructed by the method for constructing a data classification model based on Raman and mass spectrometry provided in an embodiment of the present invention, and obtaining a corresponding data classification result.

[0141] In some embodiments, the data classification device based on Raman and mass spectrometry can be used to execute the aforementioned data classification method based on Raman and mass spectrometry, or other functional structures can be used to execute the aforementioned data classification method based on Raman and mass spectrometry. For the data classification device based on Raman and mass spectrometry, please refer to the aforementioned content about the data classification method based on Raman and mass spectrometry, which will not be repeated here.

[0142] Accordingly, an embodiment of the present invention further provides a device, comprising 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 constructing a data classification model based on Raman and mass spectrometry or the method for data classification based on Raman and mass spectrometry. The method for constructing a data classification model based on Raman and mass spectrometry or the method for data classification based on Raman and mass spectrometry can be executed by referring to the corresponding description in the aforementioned section, which will not be repeated here.

[0143] Accordingly, an embodiment of the present invention further provides a storage medium storing one or more computer instructions, wherein the one or more computer instructions are used to implement the method for constructing a data classification model based on Raman and mass spectrometry or the method for data classification based on Raman and mass spectrometry. The method for constructing a data classification model based on Raman and mass spectrometry or the method for data classification based on Raman and mass spectrometry can be executed by referring to the corresponding description in the aforementioned part, and will not be repeated here.

[0144] Correspondingly, an embodiment of the present invention also provides a device, which can implement the method for constructing a data classification model based on Raman and mass spectrometry or the data classification method based on Raman and mass spectrometry provided by an embodiment of the present invention by loading the above-mentioned method for constructing a data classification model based on Raman and mass spectrometry or the data classification method based on Raman and mass spectrometry in the form of a loading program.

[0145] refer to Fig.10 , shows a hardware structure diagram of a device provided by an embodiment of the present invention. The device of this embodiment includes: at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.

[0146] In some implementations, the number of each 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 communicate with each other via the communication bus 04 .

[0147] The communication interface 02 may be an interface of a communication module for network communication, such as an interface of a GSM module.

[0148] The processor 01 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the method described in this embodiment.

[0149] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 03 stores one or more computer instructions, and the one or more computer instructions are executed by the processor 01 to implement the method for constructing a data classification model based on Raman and mass spectrometry or the method for data classification based on Raman and mass spectrometry provided in the above-mentioned embodiments.

[0150] It should be noted that the above-mentioned implementation device may also include other devices (not shown) that may not be necessary for understanding the contents disclosed in the embodiments of the present invention; since these other devices may not be necessary for understanding the contents disclosed in the embodiments of the present invention, the embodiments of the present invention will not introduce them one by one.

[0151] The above-mentioned embodiments of the present invention are combinations of elements and features of the present invention. Unless otherwise mentioned, elements or features may be considered as optional. Each element or feature may be put into practice without being combined with other elements or features. In addition, embodiments of the present invention may be constructed by combining some elements and / or features. The order of operations described in the embodiments of the present invention may be rearranged. Some configurations of any one embodiment may be included in another embodiment, and may be replaced by the corresponding configuration of another embodiment. It is obvious to those skilled in the art that claims that do not have a clear reference relationship to each other in the attached claims may be combined into embodiments of the present invention, or may be included as new claims in the amendment after submitting this application.

[0152] The embodiments of the present invention can be implemented by various means such as hardware, firmware, software or a combination thereof. In a hardware configuration, the method according to the exemplary embodiment of the present invention 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, microcontrollers, microprocessors, etc.

[0153] In a firmware or software configuration, the embodiments of the present invention may be implemented in the form of modules, procedures, functions, etc. The software code may be stored in a memory unit and executed by a processor. The memory unit is located inside or outside the processor and may send data to and receive data from the processor via various known means.

[0154] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0155] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A method for constructing a data classification model based on Raman and mass spectrometry, characterized in that: include: Acquire a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data; Fusing the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set respectively, obtaining a plurality of corresponding fused training data to form a fused training data set; The fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrometry.

2. The method for constructing a data classification model based on Raman and mass spectrometry according to claim 1, characterized in that: The step of using the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry includes: Performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set, respectively, to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction, to form a first directional attention feature data set; performing a first convolution processing on the self-attention feature data in the Raman spectrum direction in the first directional attention feature data set with the corresponding mass spectrum training data, respectively, to obtain a plurality of corresponding first feature data, to generate a first feature data set; Performing mass spectrum direction self-attention feature extraction processing on the fused training data in the fused training data set, respectively, to obtain a plurality of corresponding mass spectrum direction self-attention feature data, to form a second directional attention feature data set; performing a second convolution processing on the mass spectrum direction self-attention feature data in the second directional attention feature data set with the corresponding Raman spectrum training data, respectively, to obtain a plurality of corresponding second feature data, to generate a second feature data set; Aggregate the first feature data in the first feature data set with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data and generate an aggregated feature data set; Classify the aggregated feature data in the aggregated feature data set to obtain corresponding prediction results; According to the prediction results obtained, a preset loss function is used to calculate the loss value of the data classification model based on Raman and mass spectrometry, and the weight of the data classification model based on Raman and mass spectrometry is adjusted according to the calculated loss value until the loss value of the data classification model based on Raman and mass spectrometry converges.

3. The method for constructing a data classification model based on Raman and mass spectrometry according to claim 2, characterized in that: The self-attention feature data in the Raman spectrum direction in the first directional attention feature data set are respectively subjected to a first convolution process with the corresponding mass spectrum training data to obtain a plurality of corresponding first feature data, and after generating a first feature data set, the first feature data in the first feature data set are aggregated with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data, and before generating the aggregated feature data set, the fused training data in the fused training data set are used for training to obtain a data classification model based on Raman and mass spectrum, and the method further includes: Performing first dimensionality reduction processing on the first feature data in the first feature data set respectively; The self-attention feature data in the mass spectrum direction in the second directional attention feature data set are respectively subjected to a second convolution process with the corresponding Raman spectrum training data to obtain a plurality of corresponding second feature data, and after the second feature data set is generated, the first feature data in the first feature data set is aggregated with the corresponding second feature data in the second feature data set to obtain a plurality of corresponding aggregated feature data, and before the aggregated feature data set is generated, the fused training data in the fused training data set is used for training to obtain a data classification model based on Raman and mass spectrum, and further includes: performing a second dimensionality reduction process on the second feature data in the second feature data set; Aggregating the first feature data in the first feature data set with the corresponding second feature data in the second feature data set, obtaining multiple corresponding aggregated feature data, and generating an aggregated feature data set, including: aggregating the first feature data that has undergone the first dimensionality reduction processing with the corresponding second feature data that has undergone the second dimensionality reduction processing, obtaining multiple corresponding aggregated feature data, and generating an aggregated feature data set.

4. The method for constructing a data classification model based on Raman and mass spectrometry according to claim 3, characterized in that: The first dimensionality reduction processing includes a first convolution dimensionality reduction processing, and the second dimensionality reduction processing includes a second convolution dimensionality reduction processing.

5. The method for constructing a data classification model based on Raman and mass spectrometry according to claim 2, characterized in that: The step of performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction to form a first directional attention feature data set includes: performing self-attention feature extraction processing in the Raman spectrum direction on the fused training data in the fused training data set using a first multi-head self-attention mechanism to obtain a plurality of corresponding self-attention feature data in the Raman spectrum direction to form a first directional attention feature data set; The method of performing self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, obtaining a corresponding plurality of self-attention feature data in the mass spectrum direction, and forming a second directional attention feature data set includes: using a second multi-head self-attention mechanism to perform self-attention feature extraction processing in the mass spectrum direction on the fused training data in the fused training data set, obtaining a corresponding plurality of self-attention feature data in the mass spectrum direction, and forming a second directional attention feature data set.

6. The method for constructing a data classification model based on Raman and mass spectrometry according to claim 1, characterized in that: The Raman and mass spectrometry-based data classification model is used to classify pathogens.

7. A device for constructing a data classification model based on Raman and mass spectrometry, characterized in that: include: A first acquisition unit, adapted to acquire a first training data set and a second training data set, wherein the first training data set includes a plurality of Raman spectrum training data, and the second training data set includes a plurality of mass spectrum training data; a fusion processing unit, adapted to fuse the Raman spectrum training data in the first training data set with the mass spectrum training data in the second training data set, respectively, to obtain a plurality of corresponding fused training data, and form a fused training data set; The training unit is adapted to use the fused training data in the fused training data set for training to obtain a data classification model based on Raman and mass spectrometry.

8. A data classification method based on Raman and mass spectrometry, characterized in that: include: Acquire Raman spectrum data and mass spectrum data of the sample to be analyzed; The Raman spectrum data and mass spectrum data of the sample to be analyzed are fused and input into the data classification model based on Raman and mass spectrum constructed by the method for constructing a data classification model based on Raman and mass spectrum as described in any one of claims 1 to 6 to obtain the corresponding data classification result.

9. A data classification device based on Raman and mass spectrometry, characterized in that: include: A second acquisition unit, adapted to acquire Raman spectrum data and mass spectrum data of the sample to be analyzed; The analysis and prediction unit is suitable for inputting the Raman spectrum data and mass spectrum data of the sample to be analyzed into the data classification model based on Raman and mass spectrum constructed by the method for constructing a data classification model based on Raman and mass spectrum as described in any one of claims 1-6 to obtain the corresponding data classification result.

10. A device, characterized in that: It comprises 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 constructing a data classification model based on Raman and mass spectrometry as described in any one of claims 1 to 6 or the method for data classification based on Raman and mass spectrometry as described in claim 8.

11. A storage medium, characterized in that: The storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the method for constructing a data classification model based on Raman and mass spectrometry as described in any one of claims 1 to 6 or the method for data classification based on Raman and mass spectrometry as described in claim 8.

Citation Information

Patent Citations

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

    CN103293141A

  • Myocardial infarction prediction method, system, equipment and medium

    CN114496242A

  • Raman spectrum classification method, species blood semen and species classification method

    CN117349741A

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

    CN117542446A

  • Mass spectrum data classification method suitable for nephropathy identification and electronic equipment

    CN117975102A