Method for generating simulated secondary spectrum, and substance identification method and device

By sorting and analyzing the signal values ​​of fragmented ions in the secondary spectrum set, a simulated secondary spectrum is generated, which solves the problem of inaccurate metabolite identification results in the existing technology and achieves higher identification accuracy and reliability.

CN122157833APending Publication Date: 2026-06-05SUZHOU BIONOVOGENE BIOMEDICAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU BIONOVOGENE BIOMEDICAL TECH CO LTD
Filing Date
2024-12-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the existing technology, the methods for establishing metabolite reference spectra are limited by the high cost of standards, differences in mass spectrometry conditions, and data errors, leading to false positives and inaccurate identification results.

Method used

By generating simulated secondary spectra, the most stable target sequence number and key ion are determined by sorting the fragmented ion signal values ​​in the secondary spectrum set, and the simulated secondary spectrum of the compound is generated based on its signal value distribution.

Benefits of technology

It improves the accuracy and reliability of metabolite identification, making the simulated secondary spectra closer to the results of actual standard detection, and reducing false positives and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157833A_ABST
    Figure CN122157833A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of generation method of simulated secondary spectrum, substance identification method, device, electronic equipment and computer readable storage medium, it is related to the field of spectrum analysis.The method comprises: obtaining the secondary spectrum set obtained by detection, the secondary spectrum set includes multiple secondary spectra of a compound;Determine the serial number of each fragment ion in the secondary spectrum;For each fragment ion, according to the serial number of the fragment ion in each secondary spectrum, determine the target serial number of the most stable appearance, to obtain the key ion of the target serial number;According to the distribution of the signal value of the key ion with the target serial number in each secondary spectrum, obtain the theoretical signal value of the key ion, generate the simulated secondary spectrum of the compound.The embodiment of the application realizes that the obtained simulated secondary spectrum is similar to the secondary spectrum of actual standard sample detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of spectral analysis technology. Specifically, this application relates to a method for generating a simulated secondary spectrum, a method for identifying substances, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Currently, the main methods for establishing metabolite reference spectra are either purchasing standards for mass spectrometry detection or integrating open-source or commercial public spectrum libraries.

[0003] Metabolite identification often relies on reference spectra, which are typically obtained through mass spectrometry analysis of purchased standards. However, due to limitations such as the high cost of standards and variations in fragmented ion characteristics under different mass spectrometry conditions, it is often necessary to combine reference spectra with those from public databases to achieve comparative analysis of the detected spectra in the sample, thereby enabling substance identification. However, reference spectra are often limited by data errors, metadata errors, and large data discrepancies, resulting in a lack of high-quality spectra that accurately represent the actual fragmented ion characteristics of the compound, leading to false positives and inaccurate identification results. Summary of the Invention

[0004] This application provides a method for generating simulated secondary spectra, a method for substance identification, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which can solve the above-mentioned problems of the prior art. The technical solution is as follows: According to a first aspect of the embodiments of this application, a method for generating a simulated second-order spectrum is provided, the method comprising: Obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of a compound; For each secondary spectrum, the fragmented ions in the secondary spectrum are sorted in descending order of their signal values ​​to determine their sequence number. For each fragmented ion, the target number that appears most stably is determined based on the index of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target index; Based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with the target number, the theoretical signal value of the key ion is obtained; Based on the theoretical signal values ​​of each key ion, a simulated second-order spectrum of the compound is generated.

[0005] In some optional embodiments, determining the most stably occurring target sequence number to obtain the key ion of the target sequence number includes: For each fragmented ion, based on the index of the fragmented ion in each secondary spectrum and the frequency of each index, the target index corresponding to the maximum frequency of the fragmented ion is determined, and the fragmented ion is used as the key ion of the target index.

[0006] In some optional embodiments, obtaining the theoretical signal value of the key ion based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with corresponding ordinal numbers includes: For each secondary spectrum, the signal value of each fragmented ion is normalized using the maximum signal value in the secondary spectrum. Based on the distribution of normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number, the median of the normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number is obtained. Based on the median, the theoretical signal value of the key ion is obtained.

[0007] In some optional embodiments, the theoretical signal value of the key ion is obtained based on the median: The stability of the key ion at the target number is determined based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing at the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set. The median value is weighted by the stability of the key ion at the target index to obtain the theoretical signal value of the key ion.

[0008] In some optional embodiments, determining the stability of the key ion at the target number based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing in the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set includes: The first frequency is obtained based on the first frequency of the key ion appearing with the target number and the second frequency of the key ion appearing in the secondary spectrum set; The second frequency is obtained based on the first frequency of the key ion appearing with the target number and the number of secondary spectra in the secondary spectrum set; The stability of the key ion at the target sequence number is obtained based on the first frequency and the second frequency.

[0009] In some optional embodiments, the theoretical signal value of the key ion is obtained based on the median: The median value is used as the theoretical signal value of the key ion.

[0010] In some optional embodiments, the step of obtaining the theoretical signal value of the key ion based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with corresponding ordinal numbers further includes: For each serial number, if it is determined that the number of key ions of the serial number is greater than a first preset threshold, then at least one ion cluster is constructed based on each key ion of the serial number, and the ion cluster includes at least two key ions of the serial number. For each ion cluster with each serial number, the third frequency of the ion cluster appearing simultaneously in a secondary spectrum is counted, and the ion clusters whose third frequency exceeds a second preset threshold or the largest third frequency are taken as target ion clusters. For each sequence number, the fragmented ions in the target ion cluster are used as the key ions for that sequence number.

[0011] In some optional embodiments, the simulated secondary spectrum of the compound is generated based on the theoretical signal values ​​of each key ion; Based on the maximum theoretical signal value of the key ions of all serial numbers, the theoretical signal values ​​of each key ion are normalized to obtain the simulated second-order spectrum of the compound.

[0012] In some optional embodiments, the step of generating a simulated secondary spectrum of the compound based on the theoretical signal values ​​of each key ion further includes: For each serial number, a weight coefficient related to the serial number is obtained based on the size of the serial number, and the weight coefficient is inversely proportional to the size of the serial number; The theoretical signal values ​​of the key ions corresponding to the serial numbers are weighted according to the weighting coefficients to obtain the corrected theoretical signal values.

[0013] In some optional embodiments, determining the sequence number of each fragmented ion in the secondary spectrum further includes: For each fragmented ion, the frequency of occurrence of the fragmented ion in the secondary spectrum set is counted; Delete fragmented ions that occur less frequently than a preset frequency threshold.

[0014] In some optional embodiments, determining the sequence number of each fragmented ion in the secondary spectrum further includes: Remove fragmented ions whose signal values ​​are less than a preset signal threshold in each secondary spectrum.

[0015] According to a second aspect of the embodiments of this application, a method for identifying a substance is provided, comprising: Obtain the first and second-order spectra to be identified; The first secondary spectrum is identified based on a pre-created spectral library; The spectral library includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated by the simulated secondary spectrum generation method provided in the first aspect.

[0016] According to a third aspect of the embodiments of this application, an apparatus for simulating the generation of a secondary spectrum is provided, the apparatus comprising: The spectrum acquisition module is used to obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of a compound; The sorting module is used to sort each fragmented ion in the secondary spectrum according to the signal value of each fragmented ion in the secondary spectrum from largest to smallest, and to determine the sequence number of each fragmented ion in the secondary spectrum. The key ion determination module is used to determine the most stable target number for each fragmented ion based on the number of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target number. The theoretical signal module is used to obtain the theoretical signal value of the key ion based on the distribution of the signal values ​​of the key ion appearing in each secondary spectrum with corresponding numbers; The simulation module is used to generate a simulated secondary spectrum of the compound based on the theoretical signal values ​​of each key ion.

[0017] According to a fourth aspect of the embodiments of this application, a substance identification apparatus is provided, comprising: The module for acquiring spectra to be identified is used to acquire the first and second-level spectra to be identified. The identification module is used to identify the first secondary spectrum based on a pre-created spectrum library; The spectral library includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated by the simulated secondary spectrum generation method provided in the first aspect.

[0018] According to a fifth aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of the method provided in the first or second aspect described above.

[0019] According to a sixth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the steps of the method provided in the first or second aspect described above.

[0020] According to a seventh aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method provided in the first or second aspect described above.

[0021] The beneficial effects of the technical solutions provided in this application are: Obtaining the secondary spectrum set obtained through detection ensures data accuracy from the source. Furthermore, based on the ranking of signal values ​​of each fragmented ion in the secondary spectrum, the fragmented ion sequence number is obtained. This sequence number reflects the stability of a fragmented ion in each secondary spectrum and the abundance of the fragmented ion itself. Based on the sequence number of each fragmented ion in each secondary spectrum, the most stable target sequence number is determined to obtain the key ion of the target sequence number. Further, based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with corresponding sequence numbers, the theoretical signal value of the key ion can be obtained more accurately. Finally, based on the theoretical signal values ​​of each key ion, a simulated secondary spectrum of the compound is generated. The embodiments of this application can obtain representative fragmented ions that are stable and highly important in mass spectrometry detection of the compound. Furthermore, verification shows that the obtained simulated secondary spectrum approximates the secondary spectrum detected by actual standards. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0023] Figure 1 A schematic diagram of the system architecture for implementing the method for generating simulated second-order spectra provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for generating a simulated second-order spectrum provided in an embodiment of this application; Figure 3 A flowchart illustrating a method for generating a simulated secondary spectrum according to another embodiment of this application; Figure 4 A flowchart illustrating a method for generating a simulated secondary spectrum as provided in another embodiment of this application; Figure 5 This is a flowchart illustrating a method for generating a simulated second-order spectrum according to an embodiment of this application; Figure 6 A flowchart illustrating a method for generating a simulated secondary spectrum as provided in another embodiment of this application; Figure 7 A schematic flowchart of a substance identification method provided in an embodiment of this application; Figure 8 A schematic diagram of a device for generating a simulated secondary spectrum provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a substance identification device provided in an embodiment of this application; Figure 10aThe simulated second-order spectrum generated by the method provided in the embodiments of this application is shown; Figure 10b The standard spectrum generated using relevant techniques is shown; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0025] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0027] First, let's introduce and explain several terms used in this application: Secondary mass spectrometry (MS / MS or MS²) is an important analytical tool in mass spectrometry. Based on the results of primary mass spectrometry (MS), it further fragments selected precursor ions (also called molecular ions) to generate fragment ions (Ions, also known as daughter ions or fragment ions), which are then detected by a mass spectrometer. Specifically, in primary mass spectrometry, molecules or ions in the sample are ionized and accelerated and separated in an electromagnetic field, forming a mass spectrum arranged according to their mass-to-charge ratio (m / z). In secondary mass spectrometry, one or more specific precursor ions from the primary spectrum are selected and fragmented using methods such as collision-induced dissociation (CID) and electron transfer dissociation (ETD), generating a series of fragment ions. The mass-to-charge ratio and Ion intensity of these daughter ions are detected and recorded by the mass spectrometer, forming the secondary spectrum.

[0028] The method for generating simulated secondary spectra, the method for identifying substances, the apparatus, the electronic equipment, the computer-readable storage medium, and the computer program product provided in this application are intended to solve the above-mentioned technical problems of the prior art.

[0029] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0030] Figure 1 This is a schematic diagram of the system architecture for generating simulated secondary spectra provided in an embodiment of this application. The system includes a terminal 101 and a server 102. The server 102 stores a set of spectra of compounds or literature related to the spectra. The terminal 101 sends a spectra acquisition request to the server 102, and the server 102 returns a set of secondary spectra obtained through detection to the terminal. For each secondary spectrum, the terminal 101 sorts the fragmented ions in the secondary spectrum according to the signal values ​​from largest to smallest, determining the index of each fragmented ion in the secondary spectrum. Based on the index of each fragmented ion in each secondary spectrum and the frequency of each index, the terminal determines the fragmented ion that appears most stably for each index, serving as the key ion for each index. Based on the distribution of the signal values ​​of the key ions appearing in each secondary spectrum with corresponding indices, the terminal obtains the theoretical signal value of the key ion. Based on the theoretical signal values ​​of each key ion, a simulated secondary spectrum of the compound is generated. When identifying metabolites, the terminal 101 can use the simulated secondary spectrum as a reference spectrum for the compound.

[0031] This application provides a method for generating a simulated second-order spectrum, such as... Figure 2 As shown, the method includes: S101. Obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of the compound.

[0032] In this application embodiment, a set of secondary spectra can be obtained by searching databases or literature. However, it is necessary to ensure that each secondary spectrum in the obtained set of secondary spectra is a real secondary spectrum obtained through experimental testing, rather than a secondary spectrum predicted by an algorithm (such as an artificial intelligence algorithm), in order to ensure the accuracy of the analysis.

[0033] S102. For each secondary spectrum, sort the fragmented ions in the secondary spectrum from largest to smallest according to their signal values, and determine the sequence number of each fragmented ion in the secondary spectrum.

[0034] It should be noted that in secondary spectra, large signal values ​​of fragmented ions usually indicate the following information: I. High ion abundance The most direct explanation for a large signal value is a high abundance of the target ion, that is, a relatively high content of the ion during mass spectrometry detection. This may be due to the high initial concentration of the compound that generates the ion in the sample, or the easy formation of the ion by the compound in the sample during the ionization process.

[0035] II. Abundant information from fragmented ions In the secondary spectrum, the parent ion is further dissociated into fragment ions (daughter ions). The signal values ​​of these fragment ions can reflect the structural information of the metabolites corresponding to the parent ion. If the signal value of a fragment ion is large, it indicates that a large number of fragment ions were produced during the fragmentation of the parent ion, which helps in infer the possible structure of the corresponding metabolite. At the same time, fragment ions with large signal values ​​are more likely to be accurately detected and identified.

[0036] Theoretically, for a given compound, each fragmented ion in its secondary spectrum corresponds to its chemical structure. For example, in the secondary spectrum of n-propylbenzene in positive ion mode, there may be ions with m / z 120, 91, 78, 77, 65, and 51. Among them, m / z 120 is the parent ion formed by the loss of one electron by propylbenzene; m / z 91 is the fragmented ion formed by the loss of CH2CH3 through β-cleavage of the parent ion; the parent ion can also lose CH2CH2CH3 through α-cleavage to form fragmented ion 77; and the parent ion can also lose CH2=CHCH3 through Maxwell rearrangement to form fragmented ion m / z 78. m / z 91 can further fragment to form m / z 65, m / z 77 can further fragment to form m / z 51, and so on. The formation of these fragmented ions is related to the structure of n-propylbenzene. For example, β-fracture is more likely to occur, and the signal value of m / z91 is often higher. m / z77 or m / z78 are relatively more stable, and their signal values ​​are often higher as well. It is also related to the mass spectrometry conditions. For example, the higher the ionization energy of the mass spectrometer, the greater the proportion of ions with smaller m / z. It may also be related to other interference factors that may be introduced into the detection system.

[0037] III. High detection sensitivity A large signal value also indicates that the mass spectrometer has high detection sensitivity for that ion. The sensitivity of a mass spectrometer refers to its ability to detect trace amounts of substances in a sample; the higher the sensitivity, the smaller the amount of ion that can be detected. Therefore, a large signal value indicates that the mass spectrometer has a strong detection capability for that ion and can accurately capture its signal.

[0038] Therefore, in this embodiment of the application, for each secondary spectrum, the fragmented ions are sorted in descending order of their signal values ​​to determine their serial numbers. The smaller the serial number, the higher the abundance and the richer the information of the fragmented ions in the corresponding secondary spectrum, and the greater their value for the identification of metabolites.

[0039] S103. For each fragmented ion, determine the target number that appears most stably based on the index of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target index.

[0040] In this embodiment of the application, after determining the sequence number of each fragmented ion in each secondary spectrum, the sequence number of each fragmented ion in each secondary spectrum is further statistically analyzed to determine the frequency of occurrence of each sequence number. For example, if there are 80 secondary spectra in the set of secondary spectra, and a certain fragmented ion has a sequence number of 1 in 50 of the secondary spectra and a sequence number of 2 in another 30 of the secondary spectra, then the frequency of this fragmented ion for sequence number 1 is 50, and the frequency of its occurrence for sequence number 2 is 30. Therefore, this fragmented ion is considered the key ion for sequence number 1.

[0041] In some embodiments, multiple fragmented ions may be used as key ions with the same serial number. In this case, this application may use all of these fragmented ions as key ions with the same serial number, or it may further screen these fragmented ions to reduce the number of key ions with the same serial number.

[0042] In some embodiments, the present application can analyze the stability of each key ion at the same index, retaining only the key ions with the highest stability, or a certain number of key ions ranked from highest to lowest stability. For example, if three fragmented ions are all key ions at index 1, the stability of the three fragmented ions at index 1 can be analyzed, and only the fragmented ion with the highest stability can be retained as the key ion at index 1.

[0043] In some embodiments, the method by which this application calculates the stability of key ions at the same index may include: 1) The frequency of the key ion appearing in the secondary spectrum at that number is the highest; that is, the higher the frequency of the key ion appearing in the secondary spectrum at that number, the stronger the stability. 2) The first frequency of the key ion in the secondary spectrum at that number is used to represent the first frequency. The first frequency is the quotient between the first frequency and the frequency of the key ion in the secondary spectrum. For example, if the frequency of the key ion in number 1 is 20 and the key ion appears in 50 secondary spectra, then the first frequency is 20 / 50=40%. It can be understood that the higher the first frequency, the stronger the stability. 3) The second frequency of the key ion appearing in the secondary spectrum at that number is used to represent the first frequency. The first frequency is the quotient between the first frequency and the total number of secondary spectra in the secondary spectrum set. For example, if the frequency of the key ion appearing in number 1 is 20 and the secondary spectrum set includes 100 secondary spectra, then the second frequency is 20 / 100=20%. It can be understood that the higher the second frequency, the stronger the stability. 4) The product between the first and second frequencies of the key ion is used to represent the stability. It can be understood that the higher the product, the stronger the stability.

[0044] In some embodiments, if the number of key ions with the specified sequence number is determined to be greater than a first preset threshold, the present application embodiments may also reduce the number of key ions based on the simultaneous appearance of multiple fragmented ions in the secondary spectrum. Specifically: At least one ion cluster is constructed based on each key ion of the serial number, and the ion cluster includes at least two key ions of the serial number. For each ion cluster with each serial number, the third frequency of the ion cluster appearing simultaneously in a secondary spectrum is counted, and the ion clusters whose third frequency exceeds a second preset threshold or the largest third frequency are taken as target ion clusters. For each sequence number, the fragmented ions in the target ion cluster are used as the key ions for that sequence number.

[0045] For example, if a certain serial number has 3 key ions, the embodiments of this application can combine the 3 key ions in pairs to obtain 3 ion clusters. Each ion cluster includes 2 key ions. For each ion cluster, if a secondary spectrum contains the key ions of the ion cluster, the count of the ion cluster is incremented by 1. By traversing all secondary spectra in the secondary spectrum set, the final count of each ion cluster is counted. The ion cluster with the highest final count or the count exceeding the second preset threshold is taken as the target ion cluster. Only the fragmented ions in the target ion cluster are taken as the key ions of that serial number.

[0046] It should be noted that although there are certain differences in the fragmented ions and their signal magnitudes in different secondary spectra, this application converts the more random information of the signal values ​​of fragmented ions in the secondary spectra into a sequence number that is easier to find and reflects the order of signal values. By analyzing the sequence number of fragmented ions in each secondary spectrum, the fragmented ion that appears most stably for each sequence number is determined and used as the key ion for the corresponding sequence number.

[0047] S104. Based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with the target number, obtain the theoretical signal value of the key ion.

[0048] The embodiments of this application can obtain the representative signal values ​​of the key ion in each secondary spectrum by observing the distribution of the signal values ​​of the key ion in each secondary spectrum with the target number, which is also the theoretical signal value of the key ion.

[0049] In some embodiments, the theoretical signal value of the key ion can be determined based on the average, median, or maximum signal value of the key ion appearing in each secondary spectrum at the target index.

[0050] S105. Based on the theoretical signal values ​​of each key ion, generate a simulated secondary spectrum of the compound.

[0051] It is understandable that the theoretical signal values ​​of each key ion, that is, the theoretical signal values ​​of each sequence number, can be used to obtain the simulated secondary spectrum of the compound by summing up the theoretical signal values ​​of all or some (e.g., the first 20) sequence numbers.

[0052] This application embodiment obtains a set of secondary spectra obtained through detection, ensuring data accuracy from the source. Furthermore, based on the ranking of signal values ​​of each fragmented ion in the secondary spectra, the serial numbers of the fragmented ions are obtained. These serial numbers reflect the stability of a fragmented ion in each secondary spectra and its abundance. Based on the serial numbers of each fragmented ion in each secondary spectra, the most stable target serial number is determined as the key ion for that target serial number. Further, based on the distribution of signal values ​​of the key ion appearing in each secondary spectra with corresponding serial numbers, the theoretical signal values ​​of the key ions can be obtained more accurately. Finally, based on the theoretical signal values ​​of each key ion, a simulated secondary spectrum of the compound is generated. This application embodiment can obtain representative fragmented ions that are stable and highly important in mass spectrometry detection of the compound. Furthermore, verification shows that the obtained simulated secondary spectra approximate the secondary spectra detected by actual standards. Based on the above embodiments, as an optional embodiment, determining the most stably occurring target sequence number to obtain the key ion of the target sequence number includes: For each fragmented ion, based on the index of the fragmented ion in each secondary spectrum and the frequency of each index, the target index corresponding to the maximum frequency of the fragmented ion is determined, and the fragmented ion is used as the key ion of the target index.

[0053] The embodiments of this application determine the target sequence number based on the frequency of fragmented ions appearing in each sequence number, and use fragmented ions as key ions for the target sequence number, which can quickly determine the correspondence between key fragmented ions and target sequence numbers.

[0054] Based on the above embodiments, as an optional embodiment, the theoretical signal value of the key ion is obtained according to the distribution of the signal values ​​of the key ion appearing in each secondary spectrum with corresponding ordinal numbers, including: For each secondary spectrum, the signal value of each fragmented ion is normalized using the maximum signal value in the secondary spectrum. Based on the distribution of normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number, the median of the normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number is obtained. Based on the median, the theoretical signal value of the key ion is obtained.

[0055] In this embodiment, for each secondary spectrum, the maximum signal value in that secondary spectrum is used to normalize each fragmented ion in that secondary spectrum. That is, the normalized signal value of a fragmented ion in a secondary spectrum is the ratio of its signal value to the maximum signal value in that secondary spectrum. This step allows for comparison of fragmented ions in all secondary spectra at the same scale. The normalized signal value in this embodiment is a percentage value, which in some embodiments is also referred to as signal intensity or relative intensity.

[0056] In this embodiment, the median of the normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number is obtained based on the distribution of the normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number, and the theoretical signal value of the key ion is obtained based on the median.

[0057] In some embodiments, the median of the normalized signal value is directly used as the theoretical signal value.

[0058] In some embodiments, the present application embodiments may further determine the stability of the key ion at the target number based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing in the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set; and weight the median value with the stability of the key ion at the target number to obtain the theoretical signal value of the key ion.

[0059] This application embodiment obtains the stability of key ions at target numbers and weights the median value based on the stability. The stability is calculated based on the intensity ranking (the smaller the number, the higher the intensity) and occurrence of fragmented ions in the secondary spectrum. It reflects the criticality of fragmented ions in the spectrum, as well as the intensity and occurrence probability of fragmented ion signals. By weighting the median value based on the stability, the difference between fragmented ions and other fragmented ions can be increased, thereby improving the distinguishability between fragmented ions.

[0060] In some embodiments, the stability of the key ion at the specified index can be calculated in the following manner: The first frequency is obtained based on the first frequency of the key ion appearing with the target number and the second frequency of the key ion appearing in the secondary spectrum set; The second frequency is obtained based on the first frequency of the key ion appearing with the target number and the number of secondary spectra in the secondary spectrum set; The stability of the key ion at the target sequence number is obtained based on the first frequency and the second frequency.

[0061] In this application embodiment, the product of the first frequency and the second frequency can be used as the stability of the key ion at the target sequence.

[0062] Based on the above embodiments, as an optional embodiment, a simulated second-order spectrum of the compound is generated according to the theoretical signal values ​​of each key ion, further including: For each serial number, a weight coefficient related to the serial number is obtained based on the size of the serial number, and the weight coefficient is inversely proportional to the size of the serial number; The theoretical signal values ​​of the key ions corresponding to the serial numbers are weighted according to the weighting coefficients to obtain the corrected theoretical signal values.

[0063] In this application embodiment, a weighting coefficient is set for each serial number. The smaller the serial number value, the larger the weighting coefficient. In some embodiments, the weighting coefficient can be calculated using the following formula:

[0064] in, mz order i Indicates serial number i , mz order weight i Indicates serial number i The weighting coefficients.

[0065] By weighting the theoretical signal values ​​of the key ions corresponding to each sequence number using a weighting coefficient, a corrected theoretical signal value can be obtained, which can more accurately reflect the theoretical signal values ​​of key ions with different sequences.

[0066] In some embodiments, the theoretical signal value of the key ion of sequence number i mz theoretical intensity i It can be calculated using the following formula:

[0067] in, mz order weight i This represents the weight coefficient for index i. mz importance i This indicates the stability of the key ion at index i. mz intensity i The reference signal value represents the key ion of sequence number i.

[0068] In some embodiments, the reference signal value of the key ion number i is the median of the normalized signal values ​​of the key ion appearing in each secondary spectrum with index i; in other embodiments, the reference signal value of the key ion number i is the result of weighting the above median value by the stability of the key ion at index i.

[0069] Based on the above embodiments, as an optional embodiment, a simulated secondary spectrum of the compound is generated according to the theoretical signal values ​​of each key ion; Based on the maximum theoretical signal value among all key ions, the theoretical signal values ​​of each key ion are normalized to obtain the simulated second-order spectrum of the compound.

[0070] In this embodiment, after obtaining the theoretical signal values ​​of each key ion, the maximum theoretical signal value is selected. For each key ion, the ratio of the theoretical signal value of the key ion to the maximum theoretical signal value is used as the normalized theoretical signal value. By summarizing the normalized theoretical signal values ​​of all or some key ions, the simulated secondary spectrum of the compound can be obtained.

[0071] Please see Figure 3 The figure illustrates a flowchart of a method for generating a simulated secondary spectrum according to another embodiment of this application, as shown in the figure, including: In this embodiment, after obtaining the secondary spectrum set obtained through detection, for each secondary spectrum, the fragmented ions are sorted in descending order of their signal values ​​to determine their serial numbers. Then, for each fragmented ion, based on its serial number in each secondary spectrum and the frequency of each serial number, a target serial number corresponding to the maximum frequency of that fragmented ion is determined. This fragmented ion is used as the key ion for the target serial number. For each secondary spectrum, the signal values ​​of each fragmented ion are normalized using the maximum signal value in that secondary spectrum. Based on the distribution of the normalized signal values ​​of the key ion appearing with the target serial number in each secondary spectrum, the distribution of the key ion appearing with the target serial number in each secondary spectrum is obtained. The median of the normalized signal values ​​is used. Furthermore, the stability of the key ion at the target number is determined based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing in the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set. The median is weighted by the stability of the key ion at the target number to obtain a reference signal value for the key ion. For each number, a weighting coefficient related to the number is obtained based on the size of the number, and the weighting coefficient is inversely proportional to the size of the number. The theoretical signal value of the key ion corresponding to the number is weighted according to the weighting coefficient to obtain a corrected theoretical signal value. Based on the maximum theoretical signal value among all key ions, the theoretical signal values ​​of each key ion are normalized to obtain a simulated secondary spectrum of the compound.

[0072] Based on the above embodiments, as an optional embodiment, this application embodiment determines the sequence number of each fragmented ion in the secondary spectrum, and further includes the following steps beforehand: For each fragmented ion, the frequency of occurrence of the fragmented ion in the secondary spectrum set is counted; Delete fragmented ions that occur less frequently than a preset frequency threshold.

[0073] The preset frequency threshold in this embodiment can be 10%, which removes fragmented ions with a frequency less than 10%. By removing low-frequency fragmented ions, interference from noise, instrument errors, or trace components in the sample can be avoided, resulting in a clearer mass spectrum and easier identification and analysis of the main ions.

[0074] Based on the above embodiments, as an optional embodiment, determining the sequence number of each fragmented ion in the secondary spectrum further includes: Remove fragmented ions whose signal values ​​are less than a preset signal threshold in each secondary spectrum.

[0075] Ions with excessively low signal values ​​in a mass spectrum may be caused by noise, instrument errors, or trace impurities. The presence of these ions can interfere with the accurate identification of the major ions, thus affecting the accuracy of the analytical results. Removing these ions with excessively low signal values ​​can reduce this interference and improve the accuracy of the analysis.

[0076] Please see Figure 4 The figure illustrates, by way of example, a flowchart of a method for generating a simulated secondary spectrum provided in another embodiment of this application, as shown in the figure, including: S201. Obtain the secondary spectrum set obtained through detection; S202. Normalize the signal values ​​of fragmented ions in the secondary spectrum. Divide the signal value of each fragmented ion in a single secondary spectrum by the maximum signal value in that secondary spectrum and multiply by 100 to obtain the normalized signal value. This makes the signal values ​​of all spectra uniform to the same metric value, further filtering out fragmented ions with signal values ​​below 1, ensuring that the remaining fragmented ions are all real and reliable. S203. Calculate the frequency of each fragment ion in all secondary spectra. When the mass-to-charge ratio difference between two fragment ions is less than 0.1 Da, they are considered to belong to the same fragment ion. Calculate the frequency of fragment ions based on the statistical frequency and retain ions with a frequency greater than 10%. S204. For each fragmented ion, based on the serial number of the fragmented ion in each secondary spectrum and the frequency of each serial number, determine the target serial number corresponding to the maximum frequency of the fragmented ion, and use the fragmented ion as a candidate key ion for the target serial number. S205. For each serial number, if the number of candidate key ions for the serial number is greater than a first preset threshold, then at least one ion cluster is constructed based on each candidate key ion, wherein the ion cluster includes at least two candidate key ions for the serial number. S206. For each ion cluster of each serial number, count the third frequency of the ion cluster appearing simultaneously in a secondary spectrum, and take the ion cluster whose third frequency exceeds the second preset threshold or the largest third frequency as the target ion cluster, and take the fragmented ions in the target ion cluster as the key ions of the serial number. S207. For each fragmented ion, count the first number of times the fragmented ion appears in the secondary spectrum set and the second number of secondary spectra in the secondary spectrum set. Obtain a first frequency based on the maximum frequency of the fragmented ion and the first number. Obtain a second frequency based on the maximum frequency of the fragmented ion and the second number. Obtain the stability of the fragmented ion with respect to the target sequence number based on the first frequency and the second frequency. S208. Obtain the median of the normalized signal of each secondary spectrum of the key ion appearing with the target number, and the weighting coefficient of the target number. Weight the median with the stability of the key ion with respect to the target number and the weighting coefficient to obtain the theoretical signal value of the key ion. S209. Based on the maximum theoretical signal value among all key ions, normalize the theoretical signal values ​​of each key ion to obtain the simulated secondary spectrum of the compound.

[0077] Based on the above embodiments, as an optional embodiment, this application also provides a scheme for determining the key ion for each index based on the target index of multiple fragmented ions and the stability of each fragmented ion with respect to the target index. Compared with the above scheme for determining the key ion of the target index based on the target index where a fragmented ion is most stable, this application comprehensively considers the distribution of signal values ​​of multiple fragmented ions and can reduce the number of key ions for a single index.

[0078] Specifically, in this embodiment of the application, the target number corresponding to the maximum frequency of the fragmented ion is determined based on the serial number of the fragmented ion in each secondary spectrum and the frequency of each serial number, and the stability of the fragmented ion at the target serial number is calculated. For each serial number, the fragmented ion corresponding to the most stable degree of the serial number is taken as the key ion of that serial number.

[0079] In other words, after calculating the target number corresponding to each fragmented ion, this embodiment of the application further obtains the stability of each fragmented ion with that number as the target number for each number, and then takes the most stable fragmented ion as the key ion of that number.

[0080] Please see Figure 5 The figure illustrates a flowchart of a method for generating a simulated secondary spectrum according to an embodiment of this application, as shown in the figure. In this embodiment of the application, after obtaining the set of secondary spectra obtained through detection, for each secondary spectrum, the fragmented ions in the secondary spectrum are sorted in descending order of their signal values ​​to determine the serial number of each fragmented ion in the secondary spectrum. Then, for each fragmented ion, the target serial number corresponding to the maximum frequency of the fragmented ion is determined based on the serial number of the fragmented ion in each secondary spectrum and the frequency of each serial number. For each fragmented ion, the first number of times the fragmented ion appears in the secondary spectrum set and the second number of secondary spectra in the secondary spectrum set are counted. A first frequency is obtained based on the maximum frequency of the fragmented ion and the first number. A second frequency is obtained based on the maximum frequency of the fragmented ion and the second number. The stability of the fragmented ion with respect to the target index is obtained based on the first frequency and the second frequency. For each index, the most stable fragmented ion of that index is taken as the key ion of that index, and the secondary spectrum in which the key ion appears with that index is taken as the reference secondary spectrum. For each reference secondary spectrum, the signal values ​​of each fragmented ion in the reference secondary spectrum are normalized to obtain the normalized signal values ​​of each fragmented ion in the reference secondary spectrum. Based on the distribution of the normalized signal values ​​of the key ion in each reference secondary spectrum, the reference signal value of the key ion is determined. The reference signal value is weighted according to the stability of the key ion at the serial number to obtain a first weighted result. The theoretical signal value of the key ion is obtained according to the first weighted result. The weight coefficient of the serial number is obtained. The first weighted result of the key ion at the serial number is weighted according to the weight coefficient of the serial number to obtain a second weighted result. The second weighted result is used as the theoretical signal value of the key ion. The theoretical signal values ​​of each key ion were normalized to obtain the simulated second-order spectrum of the compound.

[0081] Please see Figure 6 The figure illustrates, by way of example, a flowchart of a method for generating a simulated secondary spectrum provided in another embodiment of this application, as shown in the figure, including: S301. Obtain the secondary spectrum set obtained through detection; S302. Normalize the signal values ​​of fragmented ions in the secondary spectrum. Divide the signal value of each fragmented ion in a single secondary spectrum by the maximum signal value in that secondary spectrum and multiply by 100 to obtain the normalized signal value. This makes the signal values ​​of all spectra uniform to the same metric value, further filtering out fragmented ions with signal values ​​below 1, ensuring that the remaining fragmented ions are all real and reliable. S303. Calculate the frequency of each fragment ion in all secondary spectra. When the mass-to-charge ratio difference between two fragment ions is less than 0.1 Da, they are considered to belong to the same fragment ion. Calculate the frequency of fragment ions based on the statistical frequency and retain ions with a frequency greater than 10%. S304. For each fragmented ion, determine the target number corresponding to the maximum frequency of the fragmented ion based on the ion's serial number in each secondary spectrum and the frequency of each serial number. S305. For each fragmented ion, count the first number of times the fragmented ion appears in the secondary spectrum set and the second number of secondary spectra in the secondary spectrum set. Obtain a first frequency based on the maximum frequency of the fragmented ion and the first number. Obtain a second frequency based on the maximum frequency of the fragmented ion and the second number. Obtain the importance of the fragmented ion to the target sequence number based on the first frequency and the second frequency. S306. For each serial number, the fragmented ion corresponding to the maximum importance of the serial number is taken as the key ion of the serial number. S307. The secondary spectrum in which the key ion appears with the serial number is used as a reference secondary spectrum. For each reference secondary spectrum, the signal value of each fragmented ion in the reference secondary spectrum is normalized to obtain the normalized signal value of each fragmented ion in the reference secondary spectrum. S308. Determine the reference signal value of the key ion based on the distribution of the normalized signal values ​​of the key ion in each reference secondary spectrum. S309. Weight the reference signal value according to the importance of the key ion in the serial number to obtain a first weighted result; S310. Obtain the weight coefficient of the serial number, and according to the weight coefficient of the serial number, weight the first weighted result of the key ion of the serial number to obtain the second weighted result, and use the second weighted result as the theoretical signal value of the key ion. S311. Normalize the theoretical signal values ​​of each key ion to obtain the simulated secondary spectrum of the compound.

[0082] This application also provides a method for substance identification, such as... Figure 7 As shown, it includes: S401. Obtain the first and second-level spectra to be identified; S402. Identify the first secondary spectrum based on the pre-created spectrum library.

[0083] The spectral library of this application includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated according to the simulated secondary spectrum generation method provided in the above embodiments.

[0084] The substance identification method of this application embodiment does not require purchasing and testing standards to establish a standard spectral library. It only requires using the above-described method for generating simulated secondary spectra to obtain a set of secondary spectra based on the detection from the Internet, thereby constructing a highly accurate simulated secondary spectrum that can be used as a reference spectrum, which greatly improves the efficiency of substance identification.

[0085] This application provides an apparatus for generating a simulated secondary spectrum, such as... Figure 8 As shown, the device may include: a spectrum acquisition module 801, a sorting module 802, a key ion determination module 803, a theoretical signal module 804, and a simulation module 805, wherein, The spectrum acquisition module 801 is used to obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of a compound; The sorting module 802 is used to sort each fragmented ion in the secondary spectrum according to the signal value of each fragmented ion in the secondary spectrum from largest to smallest, and to determine the sequence number of each fragmented ion in the secondary spectrum. The key ion determination module 803 is used to determine the most stable target number for each fragmented ion based on the number of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target number. The theoretical signal module 804 is used to obtain the theoretical signal value of the key ion based on the distribution of the signal values ​​of the key ion appearing in each secondary spectrum with the target number; The simulation module 805 is used to generate a simulated secondary spectrum of the compound based on the theoretical signal values ​​of each key ion.

[0086] The apparatus in this application embodiment can execute the method for generating simulated secondary spectra provided in this application embodiment. The implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method for generating simulated secondary spectra of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0087] This application provides a substance identification device, such as... Figure 9 As shown, it includes: The spectrum acquisition module 901 is used to acquire the first and second level spectra to be identified. The identification module 902 is used to identify the first secondary spectrum based on a pre-created spectrum library; The spectral library includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated by the simulated secondary spectrum generation method provided in the above embodiments.

[0088] The identification effect of the substance identification method provided in this application is illustrated below with reference to specific embodiments.

[0089] Based on various open-source metabolite spectral databases such as MoNA, MS-Dial, GPNS, ​​HMDB, and MASSBANK, all secondary spectra of the organic acid metabolite (S)-2-hydroxybutyric acid were collected from these databases. First, signal values ​​for each secondary spectrum were normalized: the signal value of each fragmented ion was divided by the highest signal value in the current spectrum, and then multiplied by 100 to obtain the normalized secondary spectra. Fragmented ions with signal values ​​below 0.01, i.e., noise signals, were filtered out.

[0090] Calculations were performed on all secondary spectra of (S)-2-hydroxybutyric acid to identify the stable fragmentation ions that characterize the compound, including the following steps: Find the frequency of each fragmented ion in all secondary spectra and calculate its frequency; Calculate the sorting position of the signal value of each fragmented ion in a single spectrum, and merge the sorting positions of the fragmented ion in all spectra; Based on the sorting position value of the fragmented ions, retain the sorting position that appears most frequently. A weight value for the sorting position of fragmented ions is predefined; Find the signal value of each fragmented ion at each sorting position in all secondary spectra, and calculate its median, mean, or maximum value; The importance of a fragmented ion is calculated based on its frequency of occurrence in all spectra and its position in the order of most occurrences. Based on the fragmented ions at the same sorting position, and based on the calculated importance of the fragmented ions, the ion with the highest importance at each sorting position is determined as the key ion.

[0091] Based on the obtained key ions, the theoretical signal value of each key fragmentation ion is calculated by multiplying its importance by its signal value.

[0092] The obtained theoretical signal values ​​are normalized to obtain the theoretical signal values ​​of each key fragmented ion based on its frequency and sorting position.

[0093] Figure 10a The simulated second-order spectrum generated by the method provided in the embodiments of this application is shown. Figure 10b The standard sample spectrum is shown. The simulated secondary spectrum obtained in this application shows that the mass-to-charge ratios (m / z) of five key fragmentation ions are 57.034, 101.0244, 102.243, 103.0387, and 104.042, with corresponding relative intensities of 51.8308, 1.8673, 13.6769, 100, and 1.7571, respectively. The standard sample spectrum shows eight key fragmentation ions. Among them, the fragmentation ions with the closest mass-to-charge ratios to those in the simulated secondary spectrum of this application have m / z values ​​of 57.0346, 101.0245, 103.0401, and 104.0435, with corresponding relative intensities of 49.0371, 1.2710, 100, and 3.2018, respectively.

[0094] By comparison Figure 10a The four key fragmentation ions are 57.034, 101.0244, 103.0387, and 104.042. Figure 10b The relavtive abundles of the four key fragmentation ions (57.0346, 101.0245, 103.0401, and 104.0435) in the two spectra show that the signal intensities of the three key fragmentation ions are very similar. Furthermore, by substituting the signal values ​​of the four key fragmentation ions in the two spectra into the Consine similarity formula, the Consine similarity is determined to be 98.85, which proves that the above method can obtain a pseudo-spectrum that is highly consistent with the spectrum of the metabolite standard.

[0095] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a method for generating a simulated secondary spectrum and a method for identifying substances. Compared with related technologies, it can achieve: obtaining a set of secondary spectra obtained through detection, ensuring the accuracy of data from the source; further, based on the sorting of the signal values ​​of each fragmented ion in the secondary spectrum, obtaining the serial number of the fragmented ion, which can reflect the stability of a fragmented ion in each secondary spectrum and the abundance of the fragmented ion itself; determining the most stable target serial number based on the serial number of each fragmented ion in each secondary spectrum, thereby obtaining the key ion of the target serial number; further, based on the distribution of the signal values ​​of the key ion appearing in each secondary spectrum with the corresponding serial number, obtaining the theoretical signal value of the key ion more accurately; finally, generating a simulated secondary spectrum of the compound based on the theoretical signal values ​​of each key ion. This application can obtain representative fragmented ions that are stable and important in mass spectrometry detection of the compound, and through verification, the obtained simulated secondary spectrum is approximately similar to the secondary spectrum detected by actual standards.

[0096] In one alternative embodiment, an electronic device is provided, such as Figure 11 As shown, Figure 11 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0097] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0098] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, bus 4002 is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.

[0099] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0100] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0101] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0102] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0103] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.

[0104] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0105] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A method for generating a simulated second-order spectrum, characterized in that, include: Obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of a compound; For each secondary spectrum, the fragmented ions in the secondary spectrum are sorted in descending order of their signal values ​​to determine their sequence number. For each fragmented ion, the target number that appears most stably is determined based on the index of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target index; Based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with the target number, the theoretical signal value of the key ion is obtained; Based on the theoretical signal values ​​of each key ion, a simulated second-order spectrum of the compound is generated.

2. The method according to claim 1, characterized in that, The process of determining the most stable target sequence number to obtain the key ion of the target sequence number includes: For each fragmented ion, based on the index of the fragmented ion in each secondary spectrum and the frequency of each index, the target index corresponding to the maximum frequency of the fragmented ion is determined, and the fragmented ion is used as the key ion of the target index.

3. The method according to claim 1 or 2, characterized in that, The step of obtaining the theoretical signal value of the key ion based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with corresponding ordinal numbers includes: For each secondary spectrum, the signal value of each fragmented ion is normalized using the maximum signal value in the secondary spectrum. Based on the distribution of normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number, the median of the normalized signal values ​​of the key ion appearing in each secondary spectrum with the target number is obtained. Based on the median, the theoretical signal value of the key ion is obtained.

4. The method according to claim 3, characterized in that, The theoretical signal value of the key ion is obtained based on the median value. The stability of the key ion at the target number is determined based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing at the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set. The median value is weighted by the stability of the key ion at the target index to obtain the theoretical signal value of the key ion.

5. The method according to claim 4, characterized in that, The determination of the stability of the key ion at the target number based on the first frequency of the key ion appearing at the target number, the second frequency of the key ion appearing in the secondary spectrum set, and the number of secondary spectra in the secondary spectrum set includes: The first frequency is obtained based on the first frequency of the key ion appearing with the target number and the second frequency of the key ion appearing in the secondary spectrum set; The second frequency is obtained based on the first frequency of the key ion appearing with the target number and the number of secondary spectra in the secondary spectrum set; The stability of the key ion at the target sequence number is obtained based on the first frequency and the second frequency.

6. The method according to claim 3, characterized in that, Based on the median, the theoretical signal value of the key ion is obtained: The median value is used as the theoretical signal value of the key ion.

7. The method according to any one of claims 1-6, characterized in that, The step of obtaining the theoretical signal value of the key ion based on the distribution of signal values ​​of the key ion appearing in each secondary spectrum with corresponding ordinal numbers also includes: For each serial number, if it is determined that the number of key ions of the serial number is greater than a first preset threshold, then at least one ion cluster is constructed based on each key ion of the serial number, and the ion cluster includes at least two key ions of the serial number. For each ion cluster with each serial number, the third frequency of the ion cluster appearing simultaneously in a secondary spectrum is counted, and the ion clusters whose third frequency exceeds a second preset threshold or the largest third frequency are taken as target ion clusters. For each sequence number, the fragmented ions in the target ion cluster are used as the key ions for that sequence number.

8. The method according to any one of claims 1-7, characterized in that, The simulated second-order spectrum of the compound is generated based on the theoretical signal values ​​of each key ion. Based on the maximum theoretical signal value of the key ions of all serial numbers, the theoretical signal values ​​of each key ion are normalized to obtain the simulated second-order spectrum of the compound.

9. The method according to any one of claims 1-8, characterized in that, The process of generating a simulated second-order spectrum of the compound based on the theoretical signal values ​​of each key ion also includes: For each serial number, a weight coefficient related to the serial number is obtained based on the size of the serial number, and the weight coefficient is inversely proportional to the size of the serial number; The theoretical signal values ​​of the key ions corresponding to the serial numbers are weighted according to the weighting coefficients to obtain the corrected theoretical signal values.

10. The method according to any one of claims 1-9, characterized in that, Before determining the sequence number of each fragmented ion in the secondary spectrum, the process also includes: For each fragmented ion, the frequency of occurrence of the fragmented ion in the secondary spectrum set is counted; Delete fragmented ions that occur less frequently than a preset frequency threshold.

11. The method according to any one of claims 1-10, characterized in that, Before determining the sequence number of each fragmented ion in the secondary spectrum, the process also includes: Remove fragmented ions whose signal values ​​are less than a preset signal threshold in each secondary spectrum.

12. A method for identifying a substance, characterized in that, include: Obtain the first and second-order spectra to be identified; The first secondary spectrum is identified based on a pre-created spectral library; The spectral library includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated by the method for generating simulated secondary spectra according to any one of claims 1-11.

13. A device for generating a simulated second-order spectrum, characterized in that, include: The spectrum acquisition module is used to obtain a set of secondary spectra obtained through detection, wherein the set of secondary spectra includes multiple secondary spectra of a compound; The sorting module is used to sort each fragmented ion in the secondary spectrum according to the signal value of each fragmented ion in the secondary spectrum from largest to smallest, and to determine the sequence number of each fragmented ion in the secondary spectrum. The key ion determination module is used to determine the most stable target number for each fragmented ion based on the number of the fragmented ion in each secondary spectrum, so as to obtain the key ion of the target number. The theoretical signal module is used to obtain the theoretical signal value of the key ion based on the distribution of the signal values ​​of the key ion appearing in each secondary spectrum with the target number; The simulation module is used to generate a simulated secondary spectrum of the compound based on the theoretical signal values ​​of each key ion.

14. A substance identification device, characterized in that, include: The module for acquiring spectra to be identified is used to acquire the first and second-level spectra to be identified. The identification module is used to identify the first secondary spectrum based on a pre-created spectrum library; The spectral library includes reference spectra of multiple compounds, and the reference spectrum of at least one compound is a simulated secondary spectrum generated by the method for generating simulated secondary spectra according to any one of claims 1-11.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1-12.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-12.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-12.