Mass spectrometry combined qualitative and quantitative method and system for unified hidden state

By employing a unified latent state mass spectrometry joint characterization method, and utilizing wave-particle fusion modules and self-supervised pre-training, the problems of co-elution aliasing and instrument differences in chromatography-mass spectrometry were solved, enabling end-to-end qualitative and quantitative analysis and improving the accuracy of complex sample analysis and cross-instrument versatility.

CN122084812BActive Publication Date: 2026-06-26SHANGHAI DEV CENT OF COMP SOFTWARE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI DEV CENT OF COMP SOFTWARE TECH
Filing Date
2026-04-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing chromatography-mass spectrometry techniques suffer from co-elution and aliasing problems when processing complex matrix samples, resulting in a disconnect between qualitative and quantitative processes, a lack of physical consistency, and incompatibility between models of different instruments, leading to large errors and low accuracy in analytical results.

Method used

A unified hidden state mass spectrometry joint characterization method is adopted. Through wave-particle fusion module and self-supervised pre-training, a full-state context-aware model is constructed to realize end-to-end qualitative and quantitative analysis. A bidirectional cross-attention mechanism is used to suppress background interference. Fourier feature mapping and graph coding network are introduced to generate interpretable analysis results.

Benefits of technology

It effectively solves the problem of co-elution and aliasing, improves the accuracy of complex sample analysis, reduces the requirements for chromatographic separation conditions, and enhances cross-instrument versatility and interpretability of analytical results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122084812B_ABST
    Figure CN122084812B_ABST
Patent Text Reader

Abstract

The application discloses a mass spectrum combined characterization qualitative and quantitative method and system of unified hidden state, relates to the cross field of analytical chemistry, bioinformatics and artificial intelligence data processing, the method obtains original data and instrument / method metadata containing LC-MS / MS, encodes to form a condition vector and is used for conditional modulation, constructs wave encoder and particle encoder, respectively Tokenizes continuous chromatographic signal and discrete fragment peak set into wave encoder and particle encoder to obtain wave representation and particle representation, realizes cross-modal interaction through wave-particle fusion module, forms unified hidden state or object-level unified hidden state set, adopts two-stage training of self-supervised pre-training and task fine-tuning, and applies conditional quantitative operator and qualitative operator to unified hidden state or object-level unified hidden state set in the inference stage, and parallelly outputs quantitative results and identification score / probability, and is suitable for end-to-end qualitative and quantitative analysis in DDA / DIA scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the interdisciplinary fields of analytical chemistry, bioinformatics and artificial intelligence data processing, and in particular to a unified latent state mass spectrometry joint characterization qualitative and quantitative method and system. Background Technology

[0002] Chromatography-mass spectrometry (LC-MS / GC-MS), with its high separation efficiency of chromatography and high structural identification capability of mass spectrometry, has become the "gold standard" for analyzing complex mixtures in fields such as metabolomics, drug development, environmental monitoring, and clinical diagnostics. In a conventional analytical procedure, the mixture is separated over time (retention time) using a chromatographic column, and the eluent is ionized and fragmented at specific times using a mass spectrometer (mass-charge ratio), thereby obtaining three-dimensional data (time-mass-charge ratio-intensity) that includes both hydrodynamic and chemical structural information.

[0003] However, despite the rapid advancements in hardware technology, existing data analysis and processing workflows still largely employ the traditional paradigm of "step-by-step serial processing," which presents the following insurmountable technical bottlenecks.

[0004] 1. The Challenges of Co-elution and Overlap in Complex Matrix Analyses: When analyzing complex biological samples such as plasma and plant extracts, hundreds or even thousands of compounds are often present. Due to the limited capacity of chromatographic columns, multiple substances inevitably elute within the same time window (i.e., co-elution). Traditional deconvolution algorithms rely on mathematical morphological filtering or purely statistical independence assumptions (such as ICA / PCA). When faced with low-abundance signals drowned out by high background noise, or isomers exhibiting extremely high spectral similarity, they often fail to correctly separate overlapping chromatographic peaks, leading to false positives or false negatives.

[0005] 2. Fragmentation of qualitative and quantitative processes: Existing techniques mechanically divide the analytical process into two independent steps.

[0006] Quantitative steps rely on explicit peak detection and peak integration. This requires pre-setting complex parameters (such as signal-to-noise ratio threshold, full width at half maximum, and baseline correction algorithm). If peak tailing, leading-out, or baseline drift occurs, the integration results will be significantly biased.

[0007] Qualitative steps rely on "spectral library matching." The extracted mass spectrum is compared with a static standard library (such as NIST, mzCloud) using cosine similarity. This fragmentation leads to a lack of mutual corroboration of information: quantification ignores the specificity of mass spectrometry structures, and qualitative analysis ignores the time constraints of chromatographic behavior. The model cannot, like a human expert, comprehensively utilize global information such as "this substance elutes at this time, and the fragments conform to a certain fragmentation pattern" to aid in judgment.

[0008] 3. Severe "observer effect" and instrument fingerprint differences: The characterization of mass spectrometry data is highly dependent on measurement and control parameters (such as collision energy NCE, source voltage, and polarity) and hardware properties (such as differences in quadrupole, orbitrap, and TOF). The mass spectrometry fingerprint (fragment abundance ratio) of the same substance can be drastically different under different manufacturers' instruments or even different parameter settings of the same instrument. Existing algorithms often lack the ability to perceive these physical contexts, resulting in models that are not universally applicable across different laboratories and instruments. A separate standard library must be built for each instrument, which greatly limits the migration and implementation of analytical methods.

[0009] 4. "Black-box" AI models lacking physical consistency: In recent years, although deep learning has been introduced into this field, most methods treat chromatography-mass spectrometry data merely as ordinary "2D images" or "time series," directly applying computer vision (CNN) or natural language processing (RNN, Transformer) models. These methods ignore the physical nature of the data—that is, the intrinsic physical causal relationship between chromatographic behavior (wave-like properties) and mass spectrometry characteristics (particle-like properties). AI models lacking physical constraints are prone to producing predictions that violate common chemical sense (such as predicting impossible debris or peak shapes that violate hydrodynamics).

[0010] In summary, there is an urgent need for an end-to-end intelligent analysis method that can break down the boundaries between qualitative and quantitative analysis, overcome co-efferentiation interference, and adapt to dynamic measurement and control conditions. Summary of the Invention

[0011] The purpose of this application is to provide a unified latent state mass spectrometry joint characterization qualitative and quantitative method and system, which can realize the direct mapping from raw data to "quantitative values" and "qualitative structural probabilities", effectively avoid the co-eluenting and aliasing problem in complex backgrounds, and has universal sensing capabilities across instruments.

[0012] To achieve the above objectives, this application provides the following solution:

[0013] In a first aspect, this application provides a unified hidden state mass spectrometry joint characterization qualitative and quantitative method, which includes the following steps:

[0014] S1: Obtain raw liquid chromatography-mass spectrometry (LC-MS / MS) data and corresponding instrument / method metadata of the sample to be analyzed. The raw data includes at least the MS1 scan sequence and the MS2 scan sequence. Encode the instrument / method metadata into a condition vector. The condition vector is used for subsequent wave-side encoding, particle-side encoding, wave-particle fusion, and operator parameterization.

[0015] S2: Around the trajectory of the target precursor ion or candidate ion, extract the ion chromatography sequence from the MS1 scan sequence as the waveside input, perform logarithmic transformation or equivalent monotonic compression on the intensity of the waveside input, and tokenize the waveside input to obtain the wave token sequence; input the wave token sequence into the wave encoder composed of a one-dimensional convolutional network and a Transformer to obtain the wave representation that characterizes the retention time peak shape features and time dependence; the wave representation includes the temporal hidden representation corresponding to the wave token sequence and / or the object-level aggregated representation formed by its readout or pooling.

[0016] S3: Extract a fragment peak set from the MS2 scan sequence corresponding to the trajectory of the target precursor ion or candidate ion. The fragment peak set includes at least the fragment mass-to-charge ratio and fragment intensity. Perform continuous Fourier feature mapping on the fragment mass-to-charge ratio, perform logarithmic transformation or equivalent monotonic compression on the fragment intensity, and fuse the mapped mass-to-charge ratio feature and intensity feature with the conditional vector. Tokenize the fused granular input to obtain a granular token set. Input the granular token set into a granular encoder to obtain a granular representation. The granular encoder is a graph coding network based on an attention mechanism, such as Graphormer, and generates a neutral loss bias based on the fragment mass-to-charge ratio difference and the conditional vector to correct the edge attention weights. The granular representation includes the node-level hidden representation corresponding to the granular token set and / or the object-level aggregate representation formed by reading it out.

[0017] S4: The wave representation and the particle representation are input into the wave-particle fusion module for bidirectional cross-attention fusion, specifically including: using the wave representation as a query and the particle representation as a key and value, the particle representation is weighted for co-outflow consistency to suppress non-co-outflow background debris; using the particle representation as a query and the wave representation as a key and value, the wave representation is cleaned for structural evidence; the bidirectional cross-attention output is fused and normalized to obtain a unified hidden state; wherein, the identification branch normalizes the unified hidden state to maintain cross-condition consistency, and the quantitative branch retains object-level amplitude information as a scale bypass.

[0018] S5: Apply quantitative and qualitative operators in parallel to the unified latent state, wherein: the quantitative operator is a symmetric bilinear operator or a quadratic operator parameterized by the conditional vector, used to output a quantitative result that monotonically corresponds to the abundance of the target chemical object; the qualitative operator is a similarity operator or a projection operator, used to calculate the similarity between the unified latent state and the reference embedding of the reference compound, and output an identification score or identification probability; the reference embedding is obtained from the standard spectrum or historical observation spectrum of the reference compound through the same particle-side coding process and wave-particle fusion process as the sample to be analyzed, so that the reference compound and the sample to be analyzed are in the same characteristic manifold; based on the quantitative result and the identification score or identification probability, output the quantitative value and qualitative result of the target chemical object.

[0019] S6: A two-stage training paradigm of self-supervised pre-training and task fine-tuning is adopted. The pre-training includes at least masked waveform reconstruction (MWM), masked fragment prediction (MPM), and wave-particle cross-modal contrast matching (CMM) to learn wave-particle representations and achieve cross-modal alignment. In the fine-tuning stage, the quantitative and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results.

[0020] Secondly, this application provides a unified hidden-state mass spectrometry joint characterization qualitative and quantitative system. This unified hidden-state mass spectrometry joint characterization qualitative and quantitative system is used to implement the aforementioned unified hidden-state mass spectrometry joint characterization qualitative and quantitative method. The unified hidden-state mass spectrometry joint characterization qualitative and quantitative system includes the following modules:

[0021] The data acquisition and conditional encoding module is used to acquire raw liquid chromatography-tandem mass spectrometry (LC-MS / MS) data and corresponding instrument / method metadata of the sample to be analyzed. The raw data includes at least the MS1 scan sequence and the MS2 scan sequence. The instrument / method metadata is encoded into a conditional vector, which is used for subsequent wave-side encoding, particle-side encoding, wave-particle fusion, and operator parameterization.

[0022] The WaveEncoder module is used to extract the ion chromatography sequence from the MS1 scan sequence as wave-side input around the trajectory of the target precursor ion or candidate ion. The intensity of the wave-side input is logarithmically transformed or equivalently monotonically compressed, and the wave-side input is tokenized to obtain a wave token sequence. The wave token sequence is input into the wave encoder, which consists of a one-dimensional convolutional network and a Transformer, to obtain a wave representation that characterizes the retention time peak shape features and time dependence. The wave representation includes the temporal hidden representation corresponding to the wave token sequence and / or the object-level aggregated representation formed by its readout or pooling.

[0023] The ParticleEncoder module is used to extract a set of fragment peaks from the MS2 scan sequence corresponding to the trajectory of the target precursor ion or candidate ion. The set of fragment peaks includes at least the fragment mass-to-charge ratio and fragment intensity. The fragment mass-to-charge ratio is subjected to continuous Fourier feature mapping, and the fragment intensity is subjected to logarithmic transformation or equivalent monotonic compression. The mapped mass-to-charge ratio and intensity features are then fused with the conditional vector. The fused particle-side input is then tokenized to obtain a set of particle tokens. The set of particle tokens is input into the particle encoder to obtain a particle representation. The particle encoder is a graph coding network based on an attention mechanism, such as Graphormer, and generates a neutral loss bias based on the fragment mass-to-charge ratio difference and the conditional vector to correct the edge attention weights. The particle representation includes node-level hidden representations corresponding to the set of particle tokens and / or object-level aggregated representations formed by reading them out.

[0024] The wave-particle fusion module is used to perform bidirectional cross-attention fusion of the wave representation and the particle representation. Specifically, it includes: using the wave representation as a query and the particle representation as a key and value, applying co-outflow consistency weighting to the particle representation to suppress non-co-outflow background debris; using the particle representation as a query and the wave representation as a key and value, performing structural evidence cleansing on the wave representation; and obtaining a unified hidden state by fusing and normalizing the bidirectional cross-attention output. The identification branch normalizes the unified hidden state to maintain cross-condition consistency, while the quantitative branch retains object-level amplitude information as a scale bypass.

[0025] The wave encoder and particle encoder are preferred implementations, used to extract waveside time-dependent features and particleside structural relationship features respectively; in an equivalent implementation, the single-mode coding function can also be incorporated into the wave-particle fusion module, and the fusion module can jointly model the wave token sequence and the particle token set.

[0026] The quantitative and qualitative operator modules are used to apply quantitative and qualitative operators in parallel to the unified latent state, wherein: the quantitative operator is a symmetric bilinear operator or a quadratic operator parameterized by the conditional vector, used to output a quantitative result that monotonically corresponds to the abundance of the target chemical object; the qualitative operator is a similarity operator or a projection operator, used to calculate the similarity between the unified latent state and the reference embedding of the reference compound, and output an identification score or identification probability; the reference embedding is obtained from the standard spectrum or historical observation spectrum of the reference compound through the same particle-side encoding process and wave-particle fusion process as the sample to be analyzed, so that the reference compound and the sample to be analyzed are in the same characteristic manifold; based on the quantitative result and the identification score or identification probability, the quantitative value and qualitative result of the target chemical object are output.

[0027] The training module employs a two-stage training paradigm of self-supervised pre-training and task fine-tuning. The pre-training includes at least masked waveform reconstruction (MWM), masked fragment prediction (MPM), and wave-particle cross-modal contrastive matching (CMM) to learn wave-particle representations and achieve cross-modal alignment. In the fine-tuning stage, the quantitative and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results.

[0028] Based on the specific embodiments provided in this application, the following technical effects are disclosed.

[0029] 1. This application achieves end-to-end unified modeling for chromatography-mass spectrometry analysis, eliminating error accumulation in traditional step-by-step workflows. It abandons the independent "peak detection," "peak integration," and "spectral library search" steps in traditional workflows, and innovatively proposes a model based on unified wave-particle hidden states. This application employs an operator inference paradigm. By defining learnable quantitative operators (quadratic regression) and qualitative operators (basis projection), it can directly map from raw signals to chemical conclusions. This avoids the downstream propagation of integration errors caused by inaccurate peak boundary cutting or baseline drift, significantly improving the analytical accuracy for samples with low signal-to-noise ratios and complex matrices.

[0030] 2. This application overcomes the quantitative bottleneck in co-elution scenarios, achieving implicit deconvolution without physical separation. Addressing the common problem of overlapping chromatographic peaks in complex samples, this application utilizes a bidirectional cross-attention mechanism, employing particle embedding (fragment fingerprint) as a query probe to dynamically weight waveform features. When co-elution interference exists, the network automatically suppresses the contribution of background impurities to the unified latent state, ensuring that the quantitative operator responds only to the "energy component" of the target chemical entity. This allows the application to output accurate monomer quantification results even with insufficient chromatographic separation, significantly reducing the stringent requirements for chromatographic separation conditions.

[0031] 3. This application addresses the issue of precision loss in high-resolution mass spectrometry (HRMS) information, enhancing the resolution between isotopes and isomers. It introduces Fourier feature mapping into the particle encoder, replacing traditional discretization binning. This technique fully preserves the mass defect and fine isotopic distribution information in HRMS. Combined with the constraint of retention time behavior by the wave encoder, this application can effectively distinguish compounds with the same nominal mass but different structures (isomers) or slightly different elemental compositions (isotopes), significantly improving the specificity of qualitative analysis.

[0032] 4. A self-supervised learning paradigm based on physicochemical priors was established, reducing reliance on expensive standards. This application employs a two-stage training strategy of "self-supervised wave-particle pre-training + operator fine-tuning," and designs masked waveform reconstruction (MWM), masked particle prediction (MPM), and cross-modal consistency matching (CMM) tasks. It fully utilizes the massive amounts of unlabeled data in publicly available databases, enabling the model to master general chromatographic elution kinetics and molecular fragmentation laws before encountering labeled standards. This significantly improves the model's transferability across different instrument platforms and collision energy conditions, and substantially reduces labeling costs during practical deployment.

[0033] 5. Structured, mutually corroborating analysis results are provided, enhancing the interpretability of AI decision-making. Unlike traditional "black box" models, this application's bidirectional attention mechanism generates a visualized attention weight map. This weight map intuitively shows which fragment ions exhibit strong spatiotemporal correlations with specific chromatographic waveform evolutions, providing chemists with intuitive "mutual corroborating evidence." If the model determines the presence of a substance, users can directly view its corresponding wave-particle resonance intensity, greatly improving the credibility and interpretability of the analysis results. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A flowchart illustrating a unified latent state-based joint qualitative and quantitative characterization method for mass spectrometry is provided in an embodiment of this application.

[0036] Figure 2 This is a diagram illustrating the overall architecture of a unified latent state-based joint qualitative and quantitative characterization method for mass spectrometry, provided in an embodiment of this application.

[0037] Figure 3 This is a detailed diagram of the encoding and fusion provided in an embodiment of this application;

[0038] Figure 4 This is an exploded view of a DIA slot provided in an embodiment of this application;

[0039] Figure 5 This is a schematic diagram of the functional modules of a unified latent state mass spectrometry joint characterization qualitative and quantitative system provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] This application relates to a deep learning-based method for chromatographic-mass spectrometry data analysis. More specifically, it relates to a method and system that, based on unified wave-particle hidden state representation learning, can directly achieve end-to-end qualitative identification and quantitative analysis without explicit peak integration and spectral library retrieval.

[0042] This application is preferably applicable to the DDA mode of LC-MS / MS, especially under sample conditions where there is no severe co-elution or the degree of co-elution can be controlled through conventional preprocessing, enabling end-to-end qualitative and quantitative output with a unified wave-particle hidden state. Furthermore, when the acquisition mode is DDA but the sample exhibits significant co-elution, or when the acquisition mode is DIA, object-level decomposition processing can be triggered based on a preset aliasing criterion: competitive object slots are enabled on the waveside view to decouple the mixed signal at the object level, and fragment evidence triggered by MS2 is used to filter, weight, or attribute object representations, thereby continuing to output object-level qualitative and quantitative results without changing the overall end-to-end process. Furthermore, when the acquisition mode is GC-MS, the raw data can be mapped to a continuous spatiotemporal feature field of retention time-mass-charge ratio-intensity, using fragment fingerprints of the first-order spectrum as particle-side evidence, and generating a unified hidden state according to single objects or deterministic objects, so as to reuse the fusion and operator inference modules of this application to complete qualitative and quantitative analysis.

[0043] Inspired by the wave-particle duality in microphysics, this application innovatively proposes a multi-view embedding and unified latent state modeling method based on full-state context awareness. This application abandons the traditional "integration followed by library search" process. It constructs two physical characterization pathways: wave-like (chromatographic fluid dynamics) and particle-like (mass spectrometry chemical structure). Utilizing a bidirectional cross-attention mechanism, it generates unified latent states representing single chemical entities within a shared latent space. Furthermore, drawing on the concept of measurement operators, it introduces bilinear operators and basis projection as the observation readout mechanism for the unified latent states, achieving a direct mapping from latent representation to quantitative values ​​and qualitative structural probabilities. This scheme realizes a direct mapping from raw data to "quantitative values" and "qualitative structural probabilities," effectively avoiding co-eluenting aliasing problems in complex backgrounds and possessing cross-instrument universal sensing capabilities.

[0044] Specifically, this application discloses a unified latent state-based joint qualitative and quantitative characterization method for mass spectrometry. This method aims to overcome the limitations of the separation between qualitative and quantitative analysis in traditional analytical procedures and solve the universality problem caused by cross-instrument fingerprint differences and interference from dynamic measurement and control parameters (such as collision energy and polarity).

[0045] The core of this application lies in constructing a physically consistent unified wave-particle hidden state space. The system first generates a full-state context containing both static hardware and dynamic measurement and control information. Based on this, two physical representation pathways are constructed: a wave-like pathway represents chromatographic fluid dynamics, integrating continuous position encoding and retention time structure modeling; a particle-like pathway represents mass spectrometry chemical structure features, integrating spectral transformer encoding. Utilizing a three-pronged (self-learning-association-mutual verification) large-scale self-supervised pre-training, the model learns the molecular wave-particle duality causality law, which is independent of observation conditions. Finally, the unified hidden state is represented by a predefined physical observation operator. Projection measurements are performed to achieve end-to-end analysis that "inputs raw data and directly outputs quantitative results and structural qualitative conclusions".

[0046] At the model implementation level, the backbone network of this application can adopt an end-to-end modeling framework driven by attention / transformer: The particle-like pathway preferably employs a graph Transformer encoder, such as a Graphormer-like architecture, or a graph attention network to structurally aggregate the fragment set, encoding the mass-to-charge ratio difference, neutral loss relation, and conditional context between fragments into edge biases or structural biases, and injecting them into the attention scoring process; the wave-particle fusion module preferably employs bidirectional cross-attention to achieve mutual verification and denoising of wave-like and particle-like representations; simultaneously, this application can also combine an MLP module to achieve context modulation, bias modeling, and gated fusion, and can also combine elastic temporal coding / deformable convolution and Transformer to adapt to chromatographic peak drift and tailing effects, and complete quantitative regression and structural projection output through physical observation operators / operator heads. It should be understood that the above modules can all be replaced by functionally equivalent attention networks, graph attention networks, or sequence networks without affecting the core ideas and scope of protection of this application.

[0047] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] Example 1:

[0049] like Figure 1As shown, a unified hidden state joint qualitative and quantitative characterization method for mass spectrometry is provided, which includes the following steps:

[0050] S1: Obtain the raw data of liquid chromatography-tandem mass spectrometry (LC-MS / MS) and the corresponding instrument / method metadata (GC-MS can be adapted) of the sample to be analyzed. The raw data includes at least the MS1 scan sequence and the MS2 scan sequence. Encode the instrument / method metadata into a condition vector. The condition vector is used for subsequent wave-side encoding, particle-side encoding, wave-particle fusion, and operator parameterization.

[0051] S2: Around the trajectory of the target precursor ion or candidate ion, extract the ion chromatography sequence from the MS1 scan sequence as the waveside input, perform logarithmic transformation or equivalent monotonic compression on the intensity of the waveside input, and tokenize the waveside input to obtain the wave token sequence; input the wave token sequence into the wave encoder composed of a one-dimensional convolutional network and a Transformer to obtain the wave representation that characterizes the retention time peak shape features and time dependence; the wave representation includes the temporal hidden representation corresponding to the wave token sequence and / or the object-level aggregated representation formed by its readout or pooling.

[0052] S3: Extract a fragment peak set from the MS2 scan sequence corresponding to the trajectory of the target precursor ion or candidate ion. The fragment peak set includes at least the fragment mass-to-charge ratio and fragment intensity. Perform continuous Fourier feature mapping on the fragment mass-to-charge ratio, perform logarithmic transformation or equivalent monotonic compression on the fragment intensity, and fuse the mapped mass-to-charge ratio feature and intensity feature with the conditional vector. Tokenize the fused granular input to obtain a granular token set. Input the granular token set into a granular encoder to obtain a granular representation. The granular encoder is a graph coding network based on an attention mechanism, such as Graphormer, and generates a neutral loss bias based on the fragment mass-to-charge ratio difference and the conditional vector to correct the edge attention weights. The granular representation includes the node-level hidden representation corresponding to the granular token set and / or the object-level aggregate representation formed by reading it out.

[0053] S4: The wave representation and the particle representation are input into the wave-particle fusion module for bidirectional cross-attention fusion, specifically including: using the wave representation as a query and the particle representation as a key and value, the particle representation is weighted for co-outflow consistency to suppress non-co-outflow background debris; using the particle representation as a query and the wave representation as a key and value, the wave representation is cleaned for structural evidence; the bidirectional cross-attention output is fused and normalized to obtain a unified hidden state; wherein, the identification branch normalizes the unified hidden state to maintain cross-condition consistency, and the quantitative branch retains object-level amplitude information as a scale bypass.

[0054] S5: Apply quantitative and qualitative operators in parallel to the unified latent state, wherein: the quantitative operator is a symmetric bilinear operator or a quadratic operator parameterized by the conditional vector, used to output a quantitative result that monotonically corresponds to the abundance of the target chemical object; the qualitative operator is a similarity operator or a projection operator, used to calculate the similarity between the unified latent state and the reference embedding of the reference compound, and output an identification score or identification probability; the reference embedding is obtained from the standard spectrum or historical observation spectrum of the reference compound through the same particle-side coding process and wave-particle fusion process as the sample to be analyzed, so that the reference compound and the sample to be analyzed are in the same characteristic manifold; based on the quantitative result and the identification score or identification probability, output the quantitative value and qualitative result of the target chemical object.

[0055] S6: A two-stage training paradigm of self-supervised pre-training and task fine-tuning is adopted. The pre-training includes at least masked waveform reconstruction (MWM), masked fragment prediction (MPM), and wave-particle cross-modal contrast matching (CMM) to learn wave-particle representations and achieve cross-modal alignment. In the fine-tuning stage, the quantitative and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results.

[0056] like Figure 2 As shown, the end-to-end processing flow is macroscopically illustrated. Implementing steps S1 to S6 above can break the limitations of the separation between qualitative and quantitative analysis in the traditional analysis process and solve the universality problem caused by cross-instrument fingerprint differences and interference from dynamic measurement and control parameters (such as collision energy and polarity).

[0057] As an optional implementation, step S1 involves raw data input and conditional vector modulation. The conditional vector construction and modulation method are as follows:

[0058] The condition vector is obtained by fusing at least one type of static condition and at least one type of dynamic condition, wherein the static condition includes at least one of instrument type, ion source type or detector type, and the dynamic condition includes at least one of collision energy, polarity mode, isolation window or acquisition method parameters; the condition modulation includes at least one of the following: (a) at least one of FiLM modulation, gated modulation or adaptive normalization modulation, used to scale and bias intermediate features; and (b) conditional attention modulation, wherein the condition vector is mapped to a condition query vector or condition token, and cross-attention or multi-head attention is performed with the wave token sequence and / or particle token set to output a conditionally weighted feature representation for use by the wave encoder, particle encoder and / or wave-particle fusion module.

[0059] As an optional implementation, step S2 involves wave tokenization and wave encoding. The three implementation methods of wave tokenization and wave encoder are as follows:

[0060] The waveside input includes at least one of the following:

[0061] (1) XIC / EIC sequence caliber: Ion flow chromatography sequence is extracted from MS1 scan sequence around the target precursor or candidate trajectory as wave side input; wherein, the ion flow intensity is logarithmically transformed or equivalent monotonic compression transformation is performed, and a one-dimensional convolutional network is used to extract local peak shape features, and then a Transformer is used to model long-range time dependence to obtain wave characterization.

[0062] (2) Point-level Token Calibration: Sparse observation points in MS1 ​​scans are organized according to mass-to-charge ratio channels, local mass-to-charge ratio windows or candidate ion trajectories, and corresponding time series are constructed along the retention time axis as Token sequences. Tokens include at least retention time features, mass-to-charge ratio features and intensity features. The retention time features and / or mass-to-charge ratio features are constructed using sine / cosine Fourier continuous position coding or equivalent continuous position coding. The intensity features are intensity representations after logarithmic transformation or equivalent monotonic compression, and wave representations are obtained through sequence Transformer.

[0063] (3) Continuous spatiotemporal feature field caliber: The original data is represented as a sparse point set or sparse tensor containing retention time, mass-to-charge ratio, scan level and / or isolation window identifier, and mapped as a continuous spatiotemporal feature field as waveside input. During the mapping process, no expert rule-based peak localization, ROI pruning or signal aggregation preprocessing is performed. The continuous spatiotemporal feature field or its sampled segment is defined as a spectral object to carry subsequent object-level decomposition and inference.

[0064] Furthermore, when the waveside input is a point-level token sequence or a sampled token of the continuous spatiotemporal feature field, the wave encoder uses a sequence Transformer, an attention network with relative temporal bias, or an equivalent ensemble attention aggregation network to preserve the temporal structure and complete global modeling.

[0065] As an optional implementation, step S3 involves particle tokenization and particle encoding. The particle tokenization, Fourier continuum embedding, and particle encoder specifications are as follows:

[0066] On the particle side, a continuous feature map is used for the mass-to-charge ratio of fragments. To avoid loss of binning information, among which The sine / cosine Fourier feature map is used; and the mass-to-charge ratio feature after continuous feature mapping, the intensity feature after logarithmic transformation or equivalent monotonic compression, and the conditional vector are fused to obtain the fragment embedding.

[0067] Furthermore, in a preferred implementation, the particle-side input may further include precursor information corresponding to the fragment peak set. This precursor information includes at least one of precursor mass-to-charge ratio, precursor intensity, precursor charge, and isolation window identifier. Additionally, mass difference, mass ratio, or neutral loss features relative to the precursor can be constructed, which, together with the fragment mass-to-charge ratio features, intensity features, and condition vectors, form the particle-side input. The precursor information can participate in particle encoder modeling as explicit precursor conditions, or be encoded as precursor tokens / precursor nodes and input into the particle encoder along with the fragment token set to enhance the consistency between fragment structural relationships and precursor constraints.

[0068] As an optional implementation, step S4 involves wave-particle fusion, and the structure of wave-particle fusion is defined as follows:

[0069] The wave-particle fusion module includes at least one of bidirectional cross-attention, gated fusion, or alternating stacked cross-modal attention, and the fusion output can also be deconditioned to explicitly strip away the instrument response.

[0070] Furthermore, the joint qualitative and quantitative characterization method for the unified latent state by mass spectrometry also includes: wave view decoding and particle view decoding based on the unified latent state or the set of object-level unified latent states: using the wave view decoder to reconstruct at least a portion of the chromatographic elution curve or continuous spatiotemporal feature field, and using the particle view decoder to reconstruct fragment fingerprints, spectral profiles or fragment co-occurrence relationships, and using the reconstruction error and / or physical consistency constraints as training targets to inversely constrain the unified latent state and the object formation process.

[0071] Based on the above description, such as Figure 3 As shown, the microscopic model demonstrates how wave / particle encoding works and how it is fused through Fourier transform and attention mechanisms.

[0072] As an optional implementation, step S5 involves operator-based inference (both qualitative and quantitative), and the differentiable form of operator inference, which combines qualitative and quantitative aspects, is shown below:

[0073] The quantitative operator satisfies the following expression:

[0074] or ;

[0075] in, It is a symmetric matrix parameterized by conditional vectors, or an equivalent set of parameters modulated by conditional vectors; To unify hidden states; For object-level unified hidden state collection objects k ; For quantitative results; For object k Quantitative results; It is a quantitative operator.

[0076] Furthermore, to maintain the monotonic correspondence between the dimensions of the quantitative output and the object abundance, the in-slot normalization during object-level slot decomposition is only used for stable object representation learning; when used for quadratic quantitative inference, the unified hidden state retains object-level amplitude information as a scale bypass or uses the unnormalized object-level unified hidden state to participate in quadratic / symmetric bilinear operator calculation, thereby avoiding the loss of amplitude information caused by normalization.

[0077] The output of the qualitative operator is the similarity between the unified hidden state and the reference embedding, or the similarity between the object-level unified hidden state set and the reference embedding.

[0078] or ;

[0079] in, To unify the similarity between the hidden state and the reference embedding; For object-level unified hidden state collection objects k Similarity with reference embedding; The reference embedding, i.e. the reference vector of the reference compound in the same characterization space, can be obtained by acquiring the original data of the standard spectrum or historical observation spectrum of the reference compound and inputting it into the wave encoder, particle encoder and / or wave-particle fusion network, so as to ensure that the reference library and the sample to be tested are in the same feature manifold.

[0080] Furthermore, the unified latent state mass spectrometry joint characterization qualitative and quantitative method also includes: a hierarchical decision result based on a conditional threshold output of pass identification, rejection identification, or downgrade output.

[0081] As an optional implementation, step S6 pertains to training paradigm and operator fine-tuning. The training paradigm is (MWM / MPM / CMM + operator fine-tuning), specifically including the following:

[0082] The self-supervised pre-training includes at least Masked Wave Modeling (MWM), Masked Particle Modeling (MPM), and Cross-Modal Matching (CMM). During the self-supervised pre-training phase, a joint loss is used, satisfying the following expression:

[0083] ;

[0084] in, For the mask reconstruction loss of the wave token; for The weights; To predict the loss for the granular token mask; for The weights; For cross-modal matching loss, use InfoNCE or an equivalent contrastive learning form; for The weights; For joint losses.

[0085] Furthermore, during the task fine-tuning phase, the encoder is frozen or partially frozen, with a focus on updating quantitative operator parameters and / or qualitative reference embeddings and thresholds / calibrators. It can also adopt a joint fine-tuning strategy of half-freezing or partially unfreezing the backbone network as needed. Among these, qualitative tasks can adopt supervised retrieval training based on compound identity tags, while quantitative tasks can further superimpose waveform-related regression losses.

[0086] Furthermore, the self-supervised pre-training also includes object-level self-supervised learning: using the unified hidden state or the set of object-level unified hidden states as self-supervised units to perform object-level mask reconstruction and contrastive learning, and constructing isomers or samples with similar spectra but different retention times as hard negative samples, wherein the determination of hard negative samples is further based on waveform differences in peak width, tail, and / or rising edge slope; and the pre-training also includes wave-particle cross-verification generation constraints, so that when masking waveside information, the waveside is completed by the particle side, or when masking particle side information, the particle side is completed by the waveside, so as to improve the identifiability and calibrability of the object-level unified hidden state.

[0087] Furthermore, during the deployment inference phase, unknown raw chromatography-mass spectrometry data are input into the trained model. The metadata of the raw data is automatically parsed to construct a conditional vector, and the raw data is traversed or segmented along the retention time axis to form spectral object / wave-particle data pairs. These pairs are then mapped to an object-level unified hidden state while the backbone network parameters are frozen. The system executes quantitative and qualitative operators in parallel to output object-level quantitative and qualitative results; when the qualitative result is lower than a threshold, it outputs the substructure inference result and its confidence level as a downgraded output; and the qualitative operator can replace the retrieval head with a generative head to directly output the molecular structure representation.

[0088] As an optional implementation method, DDA mode difference solidification specifically includes the following:

[0089] When the acquisition mode is DDA, the number of objects in step S4 Alternatively, the object-level decomposition can be bypassed to make the unified hidden state a single-object unified hidden state; and the waveside input is constructed from the precursor trajectory associated with the triggered MS2 to form an XIC / EIC sequence, and the particle-side input is constructed from the single or partial MS2 spectrum of the corresponding triggering event to form a fragment set.

[0090] As an optional implementation method, DIA difference ①—the technical points of the three-step Slot object-level decomposition. For example... Figure 4 As shown, a slot competition attention mechanism is used to decompose aliased objects in complex scenarios.

[0091] When the acquisition mode is DIA, a competitive attention mechanism is performed to decompose the object slots before step S4 or as part of step S2 to obtain... An object-level representation, which includes the following:

[0092] (1) Initialize the object slot vector; wherein the object slot vector represents the candidate chemical entity, the number of object slots is preset or adaptively determined, and is modulated by the condition vector.

[0093] (2) Calculate the competitive allocation weights of the wave token sequence to each object slot, where the allocation weights are normalized in the object slot dimension to form competitive soft allocation, and allow the same observation signal to assign non-zero weights to multiple object slots to characterize co-fragmentation; then, co-outflow consistency and fragment co-occurrence are used as consistency constraints and incorporated into the training objective to suppress unreasonable allocation and force the model to restore the original observation through independent slot decoding, thereby driving the slot to complete object decoupling in a controlled and spontaneous manner in the unlabeled state; the co-outflow consistency is reflected by constraining the consistency of "object-level waveside waveform" and "fragment intensity trajectory allocated to the object slot" in the retention time dimension; the fragment co-occurrence is reflected by constraining the similarity of frequently co-occurring fragments in object slot allocation, or by the reconstruction error of fragment co-occurrence relationship by the granular view decoder; and combined with the reconstruction loss of the original mixed observation by independent slot decoding, the training objective of object slot decomposition is formed.

[0094] (3) Based on the allocated weights, the wave token sequence is aggregated within the slot and the object slot vector is updated to obtain the object-level waveside representation or intermediate object state, thereby forming a unified hidden state set at the object level; wherein, redundant object slots are adaptively empty or given low weights to absorb noise and residuals; and further based on the allocated weights, the intensity signal of the wave token sequence is weighted and aggregated within the slot to form the object-level chromatographic waveform or purification waveside signal corresponding to each object slot, so as to suppress non-co-eluting background ions and random noise.

[0095] DIA Difference ② - Wave encoding difference points + Particle encoding difference points.

[0096] When the acquisition mode is DIA, the unified hidden state mass spectrometry joint characterization qualitative and quantitative method also includes the following:

[0097] (a) Differences in wave encoders: The waveside input contains isolated window indexes or equivalent window identifier features associated with the mass-to-charge ratio range, wherein the semantics of the window identifier are interpreted according to a unified definition: on the waveside, it represents the window affiliation relationship of the precursor candidate, and on the particle side, it represents the window acquisition source of the fragment observation; and the wave token sequence is reconstructed or read out at the object level by assigning weights to the object slots, thereby obtaining the wave representation of each object.

[0098] (b) Granular encoder differences: The granular input contains MS2 mixed fragment points within the window, and the mixed fragments are assigned to object-level fragment sets based on window constraints and / or object slot allocation weights. The object slot allocation weights are not only used to form object-level waveside representations, but also serve as object-level temporal priors to which the granular mixed fragments belong. In the DIA scenario, for mixed MS2 fragments within the window, soft allocation is performed by combining window constraints and object slot allocation weights, thereby dividing the mixed fragments into multiple object-level fragment sets. Then, a granular encoder is used on each object-level fragment set to obtain the granular representation of each object.

[0099] (c) The wave representation and particle representation of each object are fused to obtain the object-level unified hidden state, and the object-level quantitative results and object-level qualitative results are output respectively.

[0100] Example 2:

[0101] like Figure 5 As shown, a unified hidden-state mass spectrometry joint characterization qualitative and quantitative system is provided. This system is used to implement the aforementioned unified hidden-state mass spectrometry joint characterization qualitative and quantitative method. The unified hidden-state mass spectrometry joint characterization qualitative and quantitative system includes the following modules:

[0102] The data acquisition and conditional encoding module is used to acquire raw liquid chromatography-tandem mass spectrometry (LC-MS / MS) data and corresponding instrument / method metadata of the sample to be analyzed. The raw data includes at least the MS1 scan sequence and the MS2 scan sequence. The instrument / method metadata is encoded into a conditional vector, which is used for subsequent wave-side encoding, particle-side encoding, wave-particle fusion, and operator parameterization.

[0103] A wave coding module is used to extract the ion chromatography sequence from the MS1 scan sequence as wave-side input around the trajectory of the target precursor ion or candidate ion. The intensity of the wave-side input is logarithmically transformed or equivalently monotonically compressed, and the wave-side input is wave-tokenized to obtain a wave token sequence. The wave token sequence is input into a wave encoder composed of a one-dimensional convolutional network and a Transformer to obtain a wave representation that characterizes the retention of time peak shape features and time dependence. The wave representation includes the temporal hidden representation corresponding to the wave token sequence and / or the object-level aggregated representation formed by its readout or pooling.

[0104] A grain encoding module is used to extract a set of fragment peaks from the MS2 scan sequence corresponding to the trajectory of the target precursor ion or candidate ion. The set of fragment peaks includes at least the fragment mass-to-charge ratio and fragment intensity. The module performs continuous Fourier feature mapping on the fragment mass-to-charge ratio, performs logarithmic transformation or equivalent monotonic compression on the fragment intensity, and fuses the mapped mass-to-charge ratio and intensity features with the conditional vector. The fused grain-side input is then grain-to-tokenized to obtain a set of grain tokens. The set of grain tokens is input into a grain encoder to obtain a grain representation. The grain encoder is an attention-based graph coding network, such as Graphormer, and generates a neutral loss bias based on the fragment mass-to-charge ratio difference and the conditional vector to correct the edge attention weights. The grain representation includes node-level hidden representations corresponding to the grain token set and / or object-level aggregated representations formed by reading them out.

[0105] The wave-particle fusion module is used to perform bidirectional cross-attention fusion of the wave representation and the particle representation input into the wave-particle fusion module. Specifically, it includes: using the wave representation as a query and the particle representation as a key and value, applying co-outflow consistency weighting to the particle representation to suppress non-co-outflow background debris; using the particle representation as a query and the wave representation as a key and value, performing structural evidence cleansing on the wave representation; and obtaining a unified hidden state after fusing and normalizing the bidirectional cross-attention output. Among these, the identification branch normalizes the unified hidden state to maintain cross-condition consistency, and the quantitative branch retains object-level amplitude information as a scale bypass.

[0106] The wave encoder and particle encoder are preferred implementations, used to extract waveside time-dependent features and particleside structural relationship features respectively; in an equivalent implementation, the single-mode coding function can also be incorporated into the wave-particle fusion module, and the fusion module can jointly model the wave token sequence and the particle token set.

[0107] The quantitative and qualitative operator modules are used to apply quantitative and qualitative operators in parallel to the unified latent state, wherein: the quantitative operator is a symmetric bilinear operator or a quadratic operator parameterized by the conditional vector, used to output a quantitative result that monotonically corresponds to the abundance of the target chemical object; the qualitative operator is a similarity operator or a projection operator, used to calculate the similarity between the unified latent state and the reference embedding of the reference compound, and output an identification score or identification probability; the reference embedding is obtained from the standard spectrum or historical observation spectrum of the reference compound through the same particle-side encoding process and wave-particle fusion process as the sample to be analyzed, so that the reference compound and the sample to be analyzed are in the same characteristic manifold; based on the quantitative result and the identification score or identification probability, the quantitative value and qualitative result of the target chemical object are output.

[0108] The training module employs a two-stage training paradigm of self-supervised pre-training and task fine-tuning. The pre-training includes at least masked waveform reconstruction (MWM), masked fragment prediction (MPM), and wave-particle cross-modal contrastive matching (CMM) to learn wave-particle representations and achieve cross-modal alignment. In the fine-tuning stage, the quantitative and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results.

[0109] Example 3:

[0110] In a real LC / GC–MS (DDA / DIA, including multi-instrument / multi-method conditions) scenario, the observation of the same chemical entity is decomposed into two complementary views.

[0111] Wave: The continuous form of chromatographic-mass spectrometric signals (which varies with retention time / continuous characteristic fields) is closer to "accumulative" quantitative evidence.

[0112] Particles: The discrete structure evidence of fragment peak sets (the m / z combination relationship of peaks) is closer to qualitative evidence of "discrimination".

[0113] The key to this application is not the hard binding of "wave = quantitative, particle = qualitative", but rather that both originate from the same object-level unified hidden state. Quantitative and qualitative are only relative to The different projection outputs of the "observation operator" form an end-to-end closed loop of "same object - same risk caliber - same chain of evidence", including the following:

[0114] A1: Input and unified representation. (This step corresponds to step S1).

[0115] A1.1: Original data and sparse point set representation.

[0116] For each sample, the raw data contains spectral peaks from multiple scans (MS1 / MS2) and method information (such as DIA window, collision energy, polarity, etc.). The raw data is then uniformly encoded into a sparse point set:

[0117] ;

[0118] in, Indexing sparse points (each non-zero peak / spectral point corresponds to one) ); The retention time (RT, or scan time) for that point. The mass-to-charge ratio at that point (m / z); For spectral level / energy level identification (e.g., MS1, MS2, or multi-level / multi-collision energy bucket); For window identifier (DIA, isolated window index; DDA can make...) =0); For intensity.

[0119] Equivalent implementation: It can also be implemented as a 4D sparse tensor:

[0120] ;

[0121] in, The intensity is stored on a discretized grid; however, point sets are recommended for formula derivation. To avoid dealing with the sparsity problem of high-dimensional tensors.

[0122] In the DIA (Discrete Intrusion Analysis) scenario, to unify the interface representation between waveside and particle-side observations, window identifiers can be added to the observation samples. For waveside observations, the window identifier indicates the DIA isolation window to which the observation point, precursor candidate trajectory, or waveside token is associated or belongs according to its mass-to-charge ratio range; for particle-side observations, the window identifier indicates that the fragment observation was acquired from the corresponding DIA isolation window and is therefore constrained by the mixed source of precursors within that window. Thus, the window identifier represents the "window affiliation relationship of precursor candidates" on the waveside and the "window acquisition source of fragment observations" on the particle-side, and both are used together for object-level decomposition and fragment affiliation.

[0123] A1.2: Full-state context (condition) vector.

[0124] Parse the instrument / method conditions from the original file header and method table, and construct the global context vector:

[0125] ;

[0126] in, It provides a full-state context (conditional prior) for conditionally modeling response differences caused by different instruments, energies, polarities, windows, etc. For conditional encoders, MLP / Embedding+MLP / gated networks, etc., can be used.

[0127] Specifically, within the system modules, this step corresponds to the data acquisition and conditional encoding module.

[0128] A2: Waveform encoding. (This step corresponds to step S2).

[0129] A2.1: Waveview Tokenization.

[0130] For the "wave" side, we are interested in continuous patterns, so we can first filter the point set to a subset used on the wave side (commonly MS1, or specify...). Subset):

[0131] ;

[0132] in, The set of spectral levels used on the waveside (e.g., MS1 only).

[0133] For each waveside point Constructing waveside embedding:

[0134] ;

[0135] in, For the first Each wave token (dimension) ); : Fourier feature mapping / sine position encoding (sin / cos embedding) can be used to process continuous coordinates ( Perform multi-scale location features, then superimpose / sew together intensity transformations (e.g.) This is implemented using the term "Fourier," which refers to the positional encoding of continuous coordinates (Fourierfeatures / sin-cos embedding), used to enable the model to perceive without binning. t , m The multi-scale positional differences are not FFT / frequency domain transformations of the waveform signal.

[0136] And define the waveside input as a wave token sequence:

[0137] ;

[0138] A2.2: Wave encoder.

[0139] The wave token sequence and conditional modulation (FiLM / AdaIN / gating) are input into the wave encoder to obtain the waveside implicit representation:

[0140] ;

[0141] in, The wave representation is preferably a temporal hidden representation corresponding to the wave token sequence; in optional implementations, the temporal hidden representation can also be further pooled or read out to obtain a single-vector or multi-vector object-level aggregated representation.

[0142] Preferred implementation: Press the waveside point Aggregate / sort into XIC / EIC sequences A hybrid encoder using 1D-CNN+Transformer is employed to extract local peak shapes (rising edge / falling edge / shoulder peak, etc.) and long-range dependencies.

[0143] Alternative implementations (with point set input): Sparse point sets can be processed using Transformer / SetTransformer, but require the use of a specific method. Sort or add relative position offset (e.g., based on) The bias) is explicitly preserved to preserve the peak structure; Set Transformer is only an optional implementation for irregular sampling / not dependent on strict serialization.

[0144] Furthermore, the waveside input can also be mapped from a sparse point set / sparse tensor to a continuous spatiotemporal feature field and defined as a spectral object. In this mapping process, no expert rule-based peak localization, ROI pruning or signal aggregation preprocessing is performed, so as to serve as a unified carrier for subsequent object-level decomposition and inference.

[0145] Specifically, in the system module, the output corresponds to the waveform encoding module. .

[0146] A3: Object-level decomposition (standard Slot Attention). (This step is inserted before step S3. When the acquisition mode is DIA, an iterative competitive attention mechanism is performed to decompose the object slots before step S4 or as part of step S2 to obtain...) (Object-level representation).

[0147] This section decomposes the mixed signal into... Each "object slot" (each slot corresponds to a candidate chemical entity / component) enables object-level modeling.

[0148] A3.1: Slot initialization.

[0149] Set the number of slots .

[0150] DDA: usually Or smaller (dominated by a single precursor).

[0151] DIA / Strong co-elution: (Multiple objects coexist).

[0152] The slot vector is initialized as follows:

[0153] ;

[0154] in, For the first The initial vector of each slot (dimension) ); It can be generated by conditions or set as a learnable parameter.

[0155] A3.2: Competitive Allocation (for) k (Perform softmax).

[0156] Let the key / value of the waveside token be:

[0157] ;

[0158] The query for the slot is:

[0159] ;

[0160] in, It is a learnable linear mapping.

[0161] For each token Calculate the competitive weights assigned to each slot (softmax along the slot dimension). ):

[0162] ;

[0163] in, For token Assigned to slot The weights; For fixed ,exist Normalization reflects "slot competition".

[0164] A3.3: In-slot normalization (for) j Normalization, stable updates).

[0165] To ensure that updates to each slot are not affected by the number of tokens, updates to the same slot are performed along the token dimension. j Normalization:

[0166] ;

[0167] in, To prevent small constants from being divided by zero.

[0168] The aggregate update amount of the slot is shown below:

[0169] ;

[0170] A3.4: Slot Update (GRU+MLP):

[0171] ;

[0172] After several iterations, the final slot representation is obtained. }

[0173] It should be noted that "softmax along" "Ensure object contention (the same token cannot be completely owned by multiple objects simultaneously)." Further along... Normalization ensures that the updated values ​​of each slot are stable, which facilitates training convergence.

[0174] Specifically, within the system module, the corresponding object decomposition module (Slot Attention) is used to output object slots { } and weight allocation Assign weights This is a competitive weight normalized along the slot dimension; when slot updates or object-level reads are required, this competitive weight is then normalized again within the slot before use. .

[0175] A4: Particle ensemble construction and Graphormer encoding. (This step corresponds to step S3).

[0176] A4.1: Particle Set Selection (Explicit Constraints) ).

[0177] The particles mainly originate from MS2 (or a specified set of energy levels). ), and retain DIA window information :

[0178] ;

[0179] For objects Particle points are assigned to objects using slot weighting (using the same slot weighting method). Alternatively, a separate allocation can be calculated for MS2; either approach is feasible in engineering practice.

[0180] ;

[0181] in, To assign a threshold; For object The set of windows (under DIA, it can be inferred from the precursor window or learned by the model; under DDA, it can be set by...) ).

[0182] Each object's particle set serves as the particle-side input, where each particle point contains at least fragmentation attributes:

[0183] ;

[0184] When the number of objects K When =1, let For each particle point in the particle-side input Granular tokens are obtained by constructing granular embeddings or tokenizing them. This forms a granular token set { }:

[0185] ;

[0186] Preferably, for Fourier feature mapping (denoted as...) (sin / cos embedding) to avoid binning loss, and with subsequent... Edge biases jointly encode "absolute position + fracture structure prior":

[0187] ;

[0188] in, A preset or learnable frequency matrix is ​​used to avoid binning loss and to integrate with subsequent... The edge offsets jointly encode "absolute position + fracture structure prior".

[0189] Furthermore, condition vector By employing FiLM / gated / adaptive normalization or conditional token cross-attention methods, the intermediate features of the particle encoder and fusion module are conditionally modulated to achieve consistency in characterization across instrument / method conditions.

[0190] For objects k The corresponding granular tokens constitute an object-level granular token set. = .

[0191] A4.2: Granular encoder.

[0192] Set of Tokens The input particle encoder yields the particle characterization:

[0193] ;

[0194] in, It can be specifically implemented as a "fragmented graph attention / Graphormer" structure, and a preferred implementation is given below.

[0195] A4.3: Edge bias (learnable injection of neutral loss / split prior).

[0196] For any node pair The quality difference is defined as follows:

[0197] ;

[0198] The additive edge bias is constructed as follows:

[0199] ;

[0200] in, The edge bias is a scalar or a small vector; scalars are often added to the attention score. To learn the priors of the "neutral loss / fragmentation pattern" as conditions change.

[0201] A4.4: Graphormer layer (correct attention formula: softmax only applies to scoring).

[0202] No. When using layers, let the query / key / value mapping be (Q, K, V) (all linear layers):

[0203] ;

[0204] Attention weights (for fixed) ,exist (Softmax)

[0205] ;

[0206] Node update:

[0207] ;

[0208] Stacking Particle side node characterization is obtained after layering. For objects Perform readout (pooling / CLS):

[0209] ;

[0210] For granular representation, the preferred representation is a node-level hidden representation corresponding to the granular token set and / or its structured representation after graph encoding; in optional implementations, the node-level hidden representation can also be further read out or pooled to obtain a single-vector or multi-vector object-level aggregated representation.

[0211] Specifically, in the system module, corresponding to the granular coding module: output .

[0212] A5: Wave-particle fusion yields a unified hidden state. (This step corresponds to step S4).

[0213] For objects We also possess: waveside object information (available via slot vectors) Or from according to Aggregation ) and particle-side object information .

[0214] A5.1: Waveside object readout (optional but recommended):

[0215] ;

[0216] in, It is a linear mapping; For object The waveside aggregation vector / token. When the acquisition mode is DIA, the waveside token may further include the isolation window index. Alternatively, equivalent window identifier features (such as window embedding / window condition token) can be used to enable object-level wave representation readouts under window conditions and consistent modeling across windows.

[0217] A5.2: Wave-Particle Fusion Module (Fusion Transformer Based on Bidirectional Cross-Attention).

[0218] Wave and particle representations are input into the wave-particle fusion module for cross-modal interaction:

[0219] ;

[0220] In a preferred implementation, the wave-particle fusion module is implemented using a fusion Transformer, with bidirectional cross-attention as the core cross-modal interaction mechanism. The fusion Transformer internally includes residual connections, normalization, and feedforward networks, which can be stacked one or more layers. Optionally, normalization is performed again on the read-out unified hidden state at its output. In a simplified implementation, the wave-particle fusion module can also employ a lightweight model consisting of bidirectional cross-attention, fusion, and normalization, where the fusion can be a combination of splicing and linear projection or gated fusion.

[0221] One preferred implementation is bidirectional cross-attention:

[0222] ;

[0223] ;

[0224] Preferably, with As a query, cross-attention readout is performed on the granular fragment representation, assigning higher weights to fragments that satisfy co-outflow consistency and lower weights to background fragments that do not co-outflow, thereby achieving purification and background removal of granular evidence. This bidirectional cross-attention, as a cross-modal attention interaction sublayer of the fusion Transformer, together with residual connections, normalization, and feedforward networks, constitutes the intra-layer structure of the fusion Transformer.

[0225] The fusion Transformer jointly models the waveside and particle-side representations to obtain a joint wave-particle representation:

[0226] ;

[0227] Normalization yields a unified hidden state:

[0228] ;

[0229] in, To put the context ( c Transform it into a vector that matches the fusion space; Normalize using LayerNorm or unit norm (used to stabilize cross-conditional consistency; if concerned about the quantitative dynamic range, Normalize can be used only for the identification branch, while the scale term is retained for the quantitative branch, see below).

[0230] Optionally, the fused output can be further deconditioned / normalized to explicitly strip away the instrument response, enabling comparability across different condition buckets with "the same threshold and the same risk caliber".

[0231] Specifically, in the system modules, the corresponding wave-particle fusion module outputs... .

[0232] A5.3: In the preferred training method, wave / particle view decoding reconstruction is subject to physical consistency constraints.

[0233] Optionally, upon obtaining Then, configure the wave view decoder. from Reconstruct object-level chromatographic elution curves or continuous spatiotemporal feature field segments, and set up a grain view decoder. from Reconstruct fragment fingerprints, spectral profiles, or fragment co-occurrence relationships; use reconstruction errors and physical consistency constraints such as co-outflow consistency, fragment co-occurrence, observation intensity conservation, and non-negativity as training objectives to unify the hidden states through inverse constraints. The process of object formation.

[0234] Furthermore, the wave / particle view decoding reconstruction and physical consistency constraints can be achieved through the following training objectives:

[0235] ;

[0236] in, For waveview decoding and reconstruction errors, For granular view decoding and reconstruction errors, For consistency constraints, For physical consistency constraints, , , , These are the corresponding weighting coefficients.

[0237] Furthermore, the consistency constraint preferably satisfies:

[0238] ;

[0239] in, For the first The object-level waveside waveform corresponding to each object slot To be allocated to the first Fragment intensity trajectory of each object slot, As a measure of relevance, For fragments With fragments Co-occurrence weights , For fragments , The allocation vector on the object slot. , The weighting coefficient is used. The co-outflow consistency is reflected by constraining the consistency of the object-level waveside waveform and the fragment intensity trajectory assigned to the corresponding object slot in the retention time dimension; the fragment co-occurrence is reflected by constraining the similarity of frequently co-occurring fragments in object slot assignment, or by the reconstruction error of the fragment co-occurrence relationship by the grain view decoder.

[0240] Furthermore, the physical consistency constraint preferably satisfies:

[0241] ;

[0242] in, For the original waveside mixed observation, For the first Waveside signal obtained by reconstructing the slot of each object For observation of the original grain-side mixture, For the first Granular-side signals obtained from object slot reconstruction , , , These are the corresponding weighting coefficients; the first two terms reflect the conservation of observation intensity between the sum of the reconstruction results of each object slot and the original mixed observation, while the latter two terms reflect the non-negativity of the reconstructed waveside signal, the reconstructed particle-side signal, and their object-level readout results. The above training objective updates the encoder, fusion module, and object formation-related parameters through backpropagation to unify the hidden state and object formation process through backpropagation.

[0243] A6: Operator-based inference: simultaneous qualitative and quantitative analysis. (This step corresponds to step S5).

[0244] A6.1: Quantitative Operators (Conditionalized quadratic form / symmetric bilinear form).

[0245] For objects Apply a quantitative operator to the unified hidden state and output a quantitative result:

[0246] ;

[0247] Furthermore, to maintain the monotonic correspondence between the dimensions of the quantitative output and the object abundance, the in-slot normalization during object-level slot decomposition is only used for stable object representation learning; when used for the quadratic quantitative inference, the unified hidden state retains object-level amplitude information as a scale bypass or uses an unnormalized object-level unified hidden state to participate in the quadratic / symmetric bilinear operator calculation, thereby avoiding the loss of amplitude information caused by normalization.

[0248] In engineering practice, an equivalent form can also be used as shown below:

[0249] ;

[0250] To ensure non-negative output.

[0251] A6.2: Qualitative Operators (Projection / Similarity + Open Set Degradation).

[0252] Establish a reference embedding library:

[0253] ;

[0254] Each Reference compound Reference embeddings in the same representation space.

[0255] Apply a qualitative operator to the unified hidden state and output the identification score / probability:

[0256] ;

[0257] The probability distribution can be further obtained (optional):

[0258] ;

[0259] in, For temperature parameters; The particle encoder in this embodiment can be input from the standard spectrum or historical observation spectrum of the reference compound. and / or wave-particle fusion module This ensures that the reference library and the sample to be tested are in the same representational manifold.

[0260] Open set hierarchical decision-making: setting conditional thresholds .

[0261] like Output: Passed authentication and corresponding .

[0262] Otherwise, the output will either reject the identification or downgrade the output (e.g., output substructure candidates and confidence levels).

[0263] (Optional) Embedded sets can also be defined for the substructure basis. And output Top- Substructures are interpreted as "unknown objects".

[0264] Specifically, within the system modules, there are corresponding quantitative operator and qualitative operator modules.

[0265] Quantitative operator head: Output .

[0266] Qualitative operator head: Output And the pass-reject-downgrade result.

[0267] A7: Training strategy: MWM / MPM / CMM + operator fine-tuning. (This step corresponds to step S6).

[0268] A7.0: Pre-trained three-term joint loss.

[0269] Joint loss is preferred during the pre-training phase.

[0270] ;

[0271] Freeze or partially freeze the encoder during the fine-tuning phase. , The main focus is on updating the parameters of the quantitative operator. With / or qualitative reference embedding And threshold / calibrator.

[0272] Pre-training also includes wave-particle mutual verification generation constraints: when waveside information is masked, the masked wave token / waveform fragment is completed by particle representation decoding; when particleside information is masked, the masked fragment token / spectral profile is completed by wave representation decoding, so as to improve the identifiability and calibrability of the object-level unified hidden state.

[0273] In cross-modal matching and object-level contrastive learning, isomers or samples with similar spectra but different retention times can be constructed as hard negative samples. Furthermore, the determination of hard negative samples is based on waveform difference features such as peak width, tailing degree, and rising edge slope.

[0274] A7.1: Supervised fine-tuning (optional overlay).

[0275] When labeled, identification supervision loss and quantitative regression loss can be further superimposed (e.g., This allows for end-to-end qualitative and quantitative output. Furthermore, in labeled qualitative tasks, supervised retrieval training based on compound identity tags can be employed. Supervised contrastive learning, triplet loss, prototype retrieval loss, or equivalent implementations can be performed on the unified latent state or reference embedding to make the representation or reference embedding of the same chemical substance in the unified characterization space closer, and the representations of different chemical substances more separable. Specifically, observations of the same chemical substance under different samples, different injections, different measurement repetitions, or different conditions can be constructed as positive sample pairs, while samples of different chemical substances, isomers, or spectra similar but with different retention times can be constructed as negative sample pairs or hard negative samples to enhance the stability and specificity of retrieval-based identification. If necessary, a joint fine-tuning strategy of semi-freezing or partially thawing can be adopted for the backbone network to improve the consistency between the unified latent state and the reference embedding, as well as the separability of retrieval-based identification.

[0276] Furthermore, in quantitative tasks, MWM, MPM and CMM can be used to perform self-supervised pre-training on the wave encoder, particle encoder and wave-particle fusion backbone, and then a small amount of labeled quantitative data can be used to fine-tune the quantitative operator. If necessary, a joint fine-tuning strategy of semi-freezing or partial thawing can be adopted for the backbone network, and waveform-related regression loss can be further superimposed during the fine-tuning stage to improve the high-precision quantitative capability.

[0277] A7.2: Small sample cross-conditional migration: Freeze the backbone, adjust only operators / calibrations.

[0278] When migrating to new instrument / energy tank / method conditions: Freeze the backbone ( (etc.), only updated With the calibrator, cross-bucket consistency can be achieved with a small number of standard samples.

[0279] In summary, the reasoning process of this application is summarized as follows:

[0280] Parse the original data → point set With context .

[0281] Wave encoding is obtained With object wave representation .

[0282] Object decomposition yields object slots Assigning weights .

[0283] Construct object granular token collection Granular encoding is obtained .

[0284] The fusion yields a unified hidden state at the object level. .

[0285] Parallel execution: Quantitative operators Output Qualitative operator output .

[0286] If the result is below the threshold, a rejection / downgrade result will be output.

[0287] Example 4:

[0288] DDA / Approximate Single Precursor: Simplest XIC Encoded Version (Single Object).

[0289] The system reads the MS1 ion chromatography curve corresponding to a precursor and the triggered single / small MS2 fragment spectra, while simultaneously resolving instrument and method metadata for conditionalization. On the waveside, one-dimensional convolution combined with attention and a Transformer is used to extract peak shape and time dependence. On the particle side, fragments are treated as a disordered set, continuously embedded, and then encoded using an ensemble network. The two paths are fused to obtain a single object representation, directly outputting quantitative and identification scores in parallel, and using thresholding to achieve pass / reject / downgrade.

[0290] Example 5:

[0291] DDA: Unified Point Set Interface (single object, emphasizing "same interface as DIA").

[0292] MS1 / MS2 are unified into point sets or sparse tensors. The window in DDA is marked as empty and fixed as a single object; object decomposition can be bypassed if necessary. Wave-side features are constructed and encoded from the MS1 subset, while particle-side features are constructed and encoded from the MS2 subset. The fused result still outputs a single object. The training and inference process is consistent with the simplified version, but the interface is fully shared with DDA, facilitating a single system to cover multiple acquisition modes.

[0293] Example 6:

[0294] DIA: Unified Point Set Interface (Multiple objects, mixed splitting within a window).

[0295] The data is unified into point sets / sparse tensors while preserving isolation window information. Metadata is parsed for conditionalization and cross-conditional consistency. First, object-level decomposition (competitive soft assignment) is performed on the wave side of the aliased signal to obtain multiple candidate objects and their assignment weights. Then, on the particle side, window constraints and assignment weights are combined to divide the mixed fragments into each object. Wave-particle evidence is fused for each object, and object-level quantification and identification are output in parallel. Redundant objects automatically absorb noise, and rejection or downgrade interpretations are given when the confidence level is low.

[0296] Example 7:

[0297] DDA but significant co-elution occurs: triggers "multi-object" compatibility mode.

[0298] The process still follows the end-to-end flow of DDA input and trigger logic, but when strong aliasing / co-elution is detected, it automatically switches from single-object to object-level decomposition, outputting quantitative and identification results for multiple objects. This maintains the acquisition advantages of DDA while using object decomposition to mitigate erroneous attributions caused by aliasing. The final output remains the same evidence chain format, only changing from a single object to an object-level list.

[0299] Example 8:

[0300] GC-MS adaptation: Change the input format and granular evidence, and reuse the rest of the modules.

[0301] GC-MS is mapped to a point set or continuous feature field of retention time-mass-charge ratio-intensity, and the fragment fingerprint of the first-order spectrum is used as particle-side evidence (or an equivalent set of fragments). Wavelength-side encoding still encodes chromatographic morphology, and particle-side encoding still encodes fragment structure information; fusion and operator output remain unchanged, achieving end-to-end qualitative and quantitative analysis. The number of objects can be processed as a single object, or multiple objects can be obtained according to a rule / decomposition mechanism and output object-by-object.

[0302] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0303] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A unified latent state mass spectrometry joint characterization qualitative and quantitative method, characterized in that, The method includes: S1: Obtain raw LC-MS / MS data and corresponding instrument / method metadata of the sample to be analyzed, wherein the raw data includes at least the MS1 scan sequence and the MS2 scan sequence; encode the instrument / method metadata into a condition vector; S2: Construct waveside input based on the original data and tokenize it to obtain a wave token sequence. Input the wave token sequence into the wave encoder to obtain the wave representation. The waveside input is constructed using any one of the following apertures: XIC / EIC sequence, point-level token, or continuous spatiotemporal feature field. S3: Construct a particle-side input based on the original data and tokenize it to obtain a particle token set. Input the particle token set into the particle encoder to obtain a particle representation. The particle token set includes at least: fragment mass-to-charge ratio and fragment intensity. S4: Input the wave representation and the particle representation into the wave-particle fusion module and perform bidirectional cross-attention fusion to obtain a unified hidden state; S5: Apply quantitative and qualitative operators in parallel to the unified hidden state, wherein: the quantitative operator is used to output a quantitative result that corresponds monotonically to the abundance of the target chemical object; the qualitative operator is used to calculate the similarity between the unified hidden state and the reference embedding of the reference compound, and output the identification score or identification probability. S6: A two-stage training paradigm of self-supervised pre-training and task fine-tuning is adopted. Pre-training is used to learn wave-particle representation and achieve cross-modal alignment. In the fine-tuning stage, the quantitative operators and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results. The waveside input includes at least one of the following: (1) XIC / EIC sequence aperture: around the trajectory of the target precursor ion or candidate ion, the ion chromatography sequence is extracted from the MS1 scan sequence as the waveside input, the intensity of the waveside input is logarithmically transformed or equivalently monotonically compressed, and the waveside input is tokenized to obtain the wave token sequence; the wave token sequence is input into the wave encoder composed of a one-dimensional convolutional network and a Transformer to obtain the wave representation that represents the retention time peak shape features and time dependence; the wave representation includes the temporal hidden representation corresponding to the wave token sequence and / or the object-level aggregated representation formed by its readout or pooling; (2) Point-level Token Calibration: Sparse observation points in MS1 ​​scans are organized according to mass-to-charge ratio channels, local mass-to-charge ratio windows, or candidate ion trajectories, and corresponding time series are constructed along the retention time axis as Token sequences. Tokens include at least retention time features, mass-to-charge ratio features, and intensity features. The retention time features and / or mass-to-charge ratio features are constructed using sine / cosine Fourier continuous position encoding or equivalent continuous position encoding. The intensity features are intensity representations after logarithmic transformation or equivalent monotonically compressed, and wave representations are obtained through a sequence Transformer. (3) Continuous spatiotemporal feature field aperture: The original data is represented as a sparse point set or sparse tensor containing retention time, mass-to-charge ratio, scan level and / or isolation window identifier, and mapped as a continuous spatiotemporal feature field as waveside input. During the mapping process, no expert rule-based peak localization, ROI pruning or signal aggregation preprocessing is performed. The continuous spatiotemporal feature field or its sampling segment is defined as a spectral object to carry subsequent object-level decomposition and inference. When the waveside input is a point-level token sequence or a sampled token of the continuous spatiotemporal feature field, the wave encoder uses a sequence Transformer, an attention network with relative time bias, or an equivalent ensemble attention aggregation network to preserve the temporal structure and complete global modeling. When the acquisition mode is DDA, the number of objects in step S4 Alternatively, the object-level decomposition can be bypassed to make the unified hidden state a single-object unified hidden state; and the waveside input is constructed from the precursor trajectory associated with the triggered MS2 to form an XIC / EIC sequence, and the particle-side input is constructed from the single or partial MS2 spectrum of the corresponding triggering event to form a fragment set.

2. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, The condition vector is obtained by fusing at least one type of static condition and at least one type of dynamic condition, wherein the static condition includes at least one of instrument type, ion source type or detector type, and the dynamic condition includes at least one of collision energy, polarity mode, isolation window or acquisition method parameters; the condition modulation includes at least one of the following: (a) at least one of FiLM modulation, gated modulation or adaptive normalization modulation, used to scale and bias intermediate features. (b) Conditional attention modulation, wherein conditional vectors are mapped to conditional query vectors or conditional tokens and cross-attention or multi-head attention is performed with wave token sequences and / or particle token sets to output conditionally weighted feature representations for use by wave encoders, particle encoders and / or wave-particle fusion modules.

3. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, Fragment peak sets are extracted from the MS2 scan sequence corresponding to the trajectory of the target precursor ion or candidate ion. These fragment peak sets include at least the fragment mass-to-charge ratio and fragment intensity. A continuous feature mapping is applied to the fragment mass-to-charge ratio. To avoid loss of binning information, among which For sine / cosine Fourier feature mapping, the fragment intensity is logarithmically transformed or equivalently monotonically compressed, and the mapped mass-to-charge ratio feature and intensity feature are fused with the conditional vector; the fused granular input is granularized to obtain a granular token set; the granular token set is input into the granular encoder to obtain the granular representation; wherein, the granular encoder is a graph coding network based on an attention mechanism, and a neutral loss bias is generated based on the fragment mass-to-charge ratio difference and the conditional vector to correct the edge attention weights; the granular representation includes the node-level hidden representation corresponding to the granular token set and / or the object-level aggregate representation formed by reading it out.

4. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, The wave-particle fusion module includes at least one of bidirectional cross-attention, gated fusion, or alternating stacked cross-modal attention, and the fusion output can also be deconditioned to explicitly strip away the instrument response. The bidirectional cross-attention fusion specifically includes: using the wave representation as a query and the particle representation as a key and value, applying co-outflow consistency weighting to the particle representation to suppress non-co-outflow background debris; using the particle representation as a query and the wave representation as a key and value, performing structural evidence cleansing on the wave representation; and obtaining a unified hidden state by fusing and normalizing the bidirectional cross-attention output; wherein, the identification branch normalizes the unified hidden state to maintain cross-condition consistency, and the quantitative branch retains object-level amplitude information as a scale bypass; The joint qualitative and quantitative characterization method for the unified latent state by mass spectrometry further includes: wave view decoding and particle view decoding based on the unified latent state or the set of unified latent states at the object level: using the wave view decoder to reconstruct at least a part of the chromatographic elution curve or continuous spatiotemporal feature field, and using the particle view decoder to reconstruct fragment fingerprints, spectral profiles or fragment co-occurrence relationships, and using the reconstruction error and / or physical consistency constraints as training targets to inversely constrain the unified latent state and the object formation process.

5. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, The quantitative operator satisfies: or ; in, It is a symmetric matrix parameterized by conditional vectors, or an equivalent set of parameters modulated by conditional vectors; To unify hidden states; For object-level unified hidden state collection objects k ; For quantitative results; For object k Quantitative results; For quantitative operators; To maintain the monotonic correspondence between the dimensions of the quantitative output and the object abundance, the in-slot normalization during object-level slot decomposition is only used for stable object representation learning. When used for quadratic quantitative inference, the unified hidden state retains object-level amplitude information as a scale bypass or uses the unnormalized object-level unified hidden state to participate in quadratic / symmetric bilinear operator computation, thereby avoiding the loss of amplitude information caused by normalization. The output of the qualitative operator is the similarity between the unified hidden state and the reference embedding, or the similarity between the object-level unified hidden state set and the reference embedding. or ; in, To unify the similarity between the hidden state and the reference embedding; For object-level unified hidden state collection objects k Similarity with reference embedding; The reference embedding, i.e., the reference vector of the reference compound in the same characterization space, can be obtained by acquiring the original data of the standard spectrum or historical observation spectrum of the reference compound and inputting it into the wave encoder, particle encoder and / or wave-particle fusion network to ensure that the reference library and the test sample are in the same characteristic manifold; based on the quantitative results and the identification score or identification probability, the quantitative value and qualitative results of the target chemical object are output; The unified latent state mass spectrometry joint characterization qualitative and quantitative method also includes: a hierarchical decision result based on conditional threshold output, which outputs either pass identification, refuse identification, or downgrade.

6. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, The self-supervised pre-training includes at least masked waveform reconstruction (MWM), masked fragment prediction (MPM), and wave-particle cross-modal contrast matching (CMM). During the self-supervised pre-training phase, a joint loss is used, satisfying the following: ; in, For the mask reconstruction loss of the wave token; for The weights; To predict the loss for the granular token mask; for The weights; For cross-modal matching loss, use InfoNCE or an equivalent contrastive learning form; for The weights; For joint losses; Furthermore, during the task fine-tuning phase, the encoder is frozen or partially frozen, with a focus on updating quantitative operator parameters and / or qualitative reference embeddings and thresholds / calibrators. It can also adopt a joint fine-tuning strategy of half-freezing or partially unfreezing the backbone network as needed. Among these, qualitative tasks can adopt supervised retrieval training based on compound identity tags, while quantitative tasks can further superimpose waveform-related regression losses. Furthermore, the self-supervised pre-training also includes object-level self-supervised learning: using the unified hidden state or the set of object-level unified hidden states as self-supervised units to perform object-level mask reconstruction and contrastive learning, and constructing hard negative samples as isomers or samples with similar spectra but different retention times, wherein the determination of hard negative samples is further based on waveform differences in peak width, tail, and / or rising edge slope; and the pre-training also includes wave-particle cross-verification generation constraints, so that when masking waveside information, the waveside is completed by the particle side, or when masking particle side information, the particle side is completed by the waveside, so as to improve the identifiability and calibrability of the object-level unified hidden state; During the deployment inference phase, unknown raw chromatographic-mass spectrometry data are input into the trained model. The metadata of the raw data is automatically parsed to construct a condition vector, and the raw data is traversed or segmented along the retention time axis to form spectral object / wave-particle data pairs. With the backbone network parameters frozen, these pairs are mapped to an object-level unified hidden state. Quantitative and qualitative operators are executed in parallel to output object-level quantitative and qualitative results. When the qualitative result is below a threshold, the substructure inference result and its confidence level are output as a downgraded output. Furthermore, the qualitative operator can replace the retrieval head with a generative head to directly output the molecular structure representation.

7. The unified latent state joint qualitative and quantitative characterization method for mass spectrometry according to claim 1, characterized in that, When the acquisition mode is DIA, an iterative competitive attention mechanism is performed to decompose the object slots before step S4 or as part of step S2 to obtain... Each object-level representation includes: (1) Initialize the object slot vector; wherein the object slot vector represents a candidate chemical entity, the number of object slots is preset or adaptively determined, and modulated by a condition vector; (2) Calculate the competitive allocation weights of the wave token sequence to each object slot, where the allocation weights are normalized in the object slot dimension to form competitive soft allocation, and allow the same observation signal to assign non-zero weights to multiple object slots to characterize co-fragmentation; then, co-outflow consistency and fragment co-occurrence are used as consistency constraints and incorporated into the training objective to suppress unreasonable allocation and force the model to restore the original observation through independent slot decoding, thereby driving the slot to complete object decoupling in a controlled and spontaneous manner in the unlabeled state; the co-outflow consistency is reflected by constraining the consistency of "object-level waveside waveform" and "fragment intensity trajectory allocated to the object slot" in the retention time dimension; the fragment co-occurrence is reflected by constraining the similarity of frequently co-occurring fragments in object slot allocation, or by the reconstruction error of fragment co-occurrence relationship by the granular view decoder; and combined with the reconstruction loss of the original mixed observation by independent slot decoding, the training objective of object slot decomposition is formed together; (3) Based on the allocated weights, the wave token sequence is aggregated within the slot and the object slot vector is updated to obtain the object-level waveside representation or intermediate object state, thereby forming a unified hidden state set at the object level; wherein, redundant object slots are adaptively empty or given low weights to absorb noise and residuals; and based on the allocated weights, the intensity signal of the wave token sequence is weighted and aggregated within the slot to form the object-level chromatographic waveform or purification waveside signal corresponding to each object slot, so as to suppress non-co-eluting background ions and random noise; When the acquisition mode is DIA, the unified hidden state mass spectrometry joint characterization qualitative and quantitative method further includes: (a) Differences in wave encoders: The waveside input contains isolated window indexes or equivalent window identifier features associated with the mass-to-charge ratio range, wherein the semantics of the window identifier are interpreted according to a unified definition: on the waveside, it represents the window affiliation relationship of the precursor candidate, and on the particle side, it represents the window acquisition source of the fragment observation; and the wave token sequence is reconstructed or read out at the object level with the object slot weight, so as to obtain the wave representation of each object. (b) Granular encoder differences: The granular input contains MS2 hybrid fragment points within the window, and the hybrid fragments are assigned to object-level fragment sets based on window constraints and / or object slot allocation weights. The object slot allocation weights are not only used to form object-level waveside representations, but also serve as object-level temporal priors to which the granular hybrid fragments belong. In the DIA scenario, for the hybrid MS2 fragments within the window, soft allocation is performed by combining window constraints and object slot allocation weights, thereby dividing the hybrid fragments into multiple object-level fragment sets. Then, a granular encoder is used on each object-level fragment set to obtain the granular representation of each object. (c) The wave representation and particle representation of each object are fused to obtain the object-level unified hidden state, and the object-level quantitative results and object-level qualitative results are output respectively.

8. A unified latent state mass spectrometry joint characterization qualitative and quantitative system, characterized in that, The unified latent state mass spectrometry joint characterization qualitative and quantitative system is used to implement the unified latent state mass spectrometry joint characterization qualitative and quantitative method according to any one of claims 1-7, the system comprising: The data acquisition and condition encoding module is used to acquire raw data of liquid chromatography-tandem mass spectrometry (LC-MS / MS) of the sample to be analyzed and the corresponding instrument / method metadata, wherein the raw data includes at least the MS1 scan sequence and the MS2 scan sequence; and to encode the instrument / method metadata into a condition vector. The wave coding module is used to construct waveside input based on the original data and tokenize it to obtain a wave token sequence. The wave token sequence is then input into the wave encoder to obtain a wave representation. The waveside input is constructed using any one of the following methods: XIC / EIC sequence, point-level token, or continuous spatiotemporal feature field. The grain encoding module is used to construct a grain-side input based on the original data and tokenize it to obtain a grain token set. The grain token set is then input into the grain encoder to obtain a grain representation. The grain token set includes at least: fragment mass-to-charge ratio and fragment intensity. The wave-particle fusion module is used to perform bidirectional cross-attention fusion of the wave representation and the particle representation to obtain a unified hidden state. The quantitative and qualitative operator modules are used to apply quantitative and qualitative operators in parallel to the unified hidden state, wherein: the quantitative operator is used to output a quantitative result that monotonically corresponds to the abundance of the target chemical object; the qualitative operator is used to calculate the similarity between the unified hidden state and the reference embedding of the reference compound, and output the identification score or identification probability. The training module employs a two-stage training paradigm of self-supervised pre-training and task fine-tuning. Pre-training is used to learn wave-particle representations and achieve cross-modal alignment. In the fine-tuning stage, the quantitative and / or qualitative operators are fine-tuned to adapt to the labeled task and output end-to-end qualitative and quantitative results.