Mass spectrometry data clustering method, system, terminal and storage medium

The mass spectrometry data clustering method based on the dynamic system architecture solves the problem that mass spectrometry data clustering cannot be parallelized in existing technologies, and achieves efficient and accurate clustering analysis. It is adaptable to different similarity measures and ensures the stability of clustering results and the mathematical certainty of scientific research.

CN121786520BActive Publication Date: 2026-07-03SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-03-05
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing mass spectrometry data clustering methods cannot achieve large-scale parallel processing, which limits their flexibility and results in low efficiency and accuracy of data clustering analysis, failing to meet the needs of atmospheric observation missions.

Method used

A mass spectrometry data clustering method based on a dynamic system architecture is adopted. Through state freezing, affinity calculation, preset similarity selection strategy, centroid update and dynamic potential function iterative clustering, the parallel processing of mass spectrometry data is realized and the efficiency and accuracy of clustering analysis are improved.

Benefits of technology

Parallel processing of mass spectrometry data has been achieved, improving the efficiency and accuracy of cluster analysis. It can adapt to different similarity measures, ensuring the stability of clustering results and the mathematical certainty of scientific research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786520B_ABST
    Figure CN121786520B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of data processing, specifically disclosing a clustering method, system, terminal, and storage medium for mass spectrometry data. The method includes: acquiring a target mass spectrometry dataset, performing state freezing processing and affinity calculation to obtain an affinity score vector; determining a preset similarity selection strategy, and partitioning the target mass spectrometry dataset according to the preset similarity selection strategy and affinity score vector to obtain the optimal assigned cluster; updating the centroid of the optimal assigned cluster to obtain the updated centroid, and performing deterministic structure editing processing on the optimal assigned cluster to obtain the target assigned cluster; constructing a kinetic potential function, and performing iterative clustering processing on the target assigned cluster to obtain the final clustering result. This invention, by performing state freezing processing on mass spectrometry data, enables parallel processing of mass spectrometry data, effectively improving the efficiency of mass spectrometry data clustering analysis and the accuracy of clustering result output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, system, terminal, and computer-readable storage medium for clustering mass spectrometry data. Background Technology

[0002] With the rapid development of modern analytical instrument technology, especially the widespread adoption of single-particle aerosol mass spectrometry, high-resolution liquid chromatography-mass spectrometry (HPLC-MS), and proteomics and metabolomics platforms, data acquisition capabilities have grown exponentially. In typical atmospheric observation missions, a single instrument can generate tens of millions of high-dimensional time-of-flight mass spectrometry data points in a short period, officially entering the "archive-level" era. Cluster analysis of these mass spectrometry data has a significant impact on atmospheric observation research.

[0003] However, existing data clustering methods cannot achieve large-scale parallel processing of mass spectrometry data and have limited flexibility, resulting in low efficiency and accuracy of data clustering analysis, which cannot meet users' data clustering analysis needs for atmospheric observation tasks.

[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0005] The main objective of this invention is to provide a method, system, terminal, and computer-readable storage medium for clustering mass spectrometry data. This invention aims to solve the problem that existing data clustering methods in the prior art cannot achieve large-scale parallel processing of mass spectrometry data and have limited flexibility, resulting in low efficiency and accuracy of data clustering analysis.

[0006] To achieve the above objectives, the present invention provides a clustering method for mass spectrometry data, the mass spectrometry data clustering method comprising the following steps:

[0007] Obtain the target mass spectrometry dataset, and perform state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain the affinity score vector;

[0008] A preset similarity selection strategy is determined, and the target mass spectrometry dataset is divided according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster.

[0009] The optimal belonging cluster is subjected to centroid update processing to obtain an updated centroid, and the optimal belonging cluster is subjected to deterministic structure editing processing based on the updated centroid to obtain the target belonging cluster;

[0010] A dynamic potential energy function is constructed, and the target cluster is iteratively clustered according to the dynamic potential energy function to obtain the final clustering result.

[0011] Optionally, the clustering method for mass spectrometry data, wherein obtaining the target mass spectrometry dataset and performing state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector specifically includes:

[0012] Obtain the target mass spectrometry dataset and construct a mass spectrometry data matrix based on the target mass spectrometry dataset;

[0013] The mass spectrometry data matrix is ​​subjected to clustering state definition processing to obtain the target clustering state, wherein the target clustering state includes a set of cluster attributes and an array of sample affiliation labels;

[0014] Obtain the current cluster representative set in the mass spectrometry data matrix, and freeze the state of the current cluster representative set to obtain the frozen centroid;

[0015] Obtain the data vector from the mass spectrometry data matrix, and calculate the affinity based on the data vector and the frozen centroid to obtain the affinity score vector.

[0016] Optionally, the clustering method for mass spectrometry data, wherein the step of calculating affinity based on the data vector and the frozen centroid to obtain an affinity score vector specifically includes:

[0017] Obtain the first normalized matrix corresponding to the data vector, and obtain the second normalized matrix corresponding to the frozen centroid, wherein the first normalized matrix is ​​a pre-set normalized matrix for the data vector, and the second normalized matrix is ​​a pre-set normalized matrix for the frozen centroid;

[0018] A preset similarity kernel function is determined, and the cosine similarity between the first normalized matrix and the second normalized matrix is ​​calculated based on the preset similarity kernel function to obtain the affinity score vector.

[0019] Optionally, the clustering method for mass spectrometry data, wherein determining a preset similarity selection strategy and partitioning the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster, specifically includes:

[0020] A preset similarity requirement is determined, and the target mass spectrometry dataset is filtered according to the affinity score vector to obtain candidate clusters in the target mass spectrometry dataset that meet the preset similarity requirement;

[0021] Wherein, the preset similarity requirement is the effective radius of the preset cluster;

[0022] Determine whether the candidate cluster is an empty set. If so, mark the data vector as an outlier and recalculate the affinity of the outlier in the next iteration until the iteration converges.

[0023] If not, a preset similarity selection strategy is used to perform data partitioning on the candidate clusters to obtain the optimal assigned cluster;

[0024] The preset similarity selection strategy is either a similarity-first strategy or a density-enhanced similarity selection strategy.

[0025] Optionally, in the mass spectrometry data clustering method, the expression for the centroid update process is:

[0026] ;

[0027] in, To update the center of mass, To minimize mapping processing, Center of mass, The total number of the quantity vectors. To be similar to the kernel function The corresponding distance metric, For the first A vector of quantities;

[0028] The deterministic structure editing process includes merging and trimming.

[0029] Optionally, in the clustering method for the mass spectrometry data, the kinetic potential function includes a Lyapunov functional and a density-enhancing potential function;

[0030] The construction of the dynamic potential energy function specifically includes:

[0031] If the preset similarity selection strategy is a similarity-first strategy, then the Bregman divergence is used to minimize the target clustering state to obtain the Lyapunov generalized function.

[0032] The expression for the Lyapunov generic function is as follows:

[0033] ;

[0034] in, For Lyapunov generic functions, For the target cluster state, This represents the current total number of clusters. Let Bregman divergence be the property of the divergence. For the first The center vector of each cluster;

[0035] If the preset similarity selection strategy is a density-enhanced similarity selection strategy, then the target clustering state is subjected to a maximization mapping process to obtain the density-enhanced potential energy function.

[0036] The expression for the density-enhancing potential energy function is as follows:

[0037] ;

[0038] in, For density-enhancing potential energy function, To adjust the weights, For the count corresponding to the cluster, For paired interactive potential energy, for and The similarity kernel function is composed of these components.

[0039] Optionally, the clustering method for mass spectrometry data, wherein the iterative clustering process of the target cluster based on the kinetic potential function to obtain the final clustering result specifically includes:

[0040] The state hash value of the target cluster is calculated based on the dynamic potential energy function, and the target cluster is iteratively clustered based on the state hash value.

[0041] Determine the limit cycle state. When the state hash value reaches a preset state, obtain the minimum Lyapunov function value and the maximum potential energy corresponding to the limit cycle state, and use the minimum Lyapunov function value and the maximum potential energy as the final clustering result.

[0042] The final clustering result is expressed as:

[0043] ;

[0044] in, For the final clustering result, To maximize mapping processing, It is a limit cycle.

[0045] Furthermore, to achieve the above objectives, the present invention also provides a clustering system for mass spectrometry data, wherein the mass spectrometry data clustering system comprises:

[0046] The state-freezing module is used to acquire the target mass spectrometry dataset, and to perform state-freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector.

[0047] The strategy selection module is used to determine a preset similarity selection strategy, and to divide the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster.

[0048] The centroid update module is used to perform centroid update processing on the optimal belonging cluster to obtain the updated centroid, and to perform deterministic structure editing processing on the optimal belonging cluster based on the updated centroid to obtain the target belonging cluster.

[0049] The iterative clustering module is used to construct a dynamic potential energy function and perform iterative clustering processing on the target cluster based on the dynamic potential energy function to obtain the final clustering result.

[0050] In this invention, a target mass spectrometry dataset is acquired, and state freezing and affinity calculation are performed on the target mass spectrometry dataset to obtain an affinity score vector. A preset similarity selection strategy is determined, and the target mass spectrometry dataset is partitioned according to the preset similarity selection strategy and the affinity score vector to obtain the optimal assigned cluster. The centroid of the optimal assigned cluster is updated to obtain an updated centroid, and deterministic structure editing is performed on the optimal assigned cluster according to the updated centroid to obtain the target assigned cluster. A kinetic potential function is constructed, and iterative clustering is performed on the target assigned cluster according to the kinetic potential function to obtain the final clustering result. This invention enables parallel processing of mass spectrometry data by performing state freezing processing on the mass spectrometry data. At the same time, the processing methods such as centroid updating and constructing a kinetic potential function can effectively improve the efficiency of clustering analysis of mass spectrometry data and the accuracy of clustering result output. Attached Figure Description

[0051] Figure 1 This is a flowchart of a preferred embodiment of the mass spectrometry data clustering method of the present invention;

[0052] Figure 2 This is a schematic diagram of the overall workflow of the SFASC algorithm, which is a preferred embodiment of the mass spectrometry data clustering method of the present invention.

[0053] Figure 3 This is a schematic diagram comparing the theoretical expansion envelope of SFASC, a preferred embodiment of the mass spectrometry data clustering method of the present invention, with that of existing mainstream algorithms. Figure 3 In this context, SFASC is a clustering algorithm, HAC is a hierarchical agglomerative clustering algorithm, msCRUSH is a clustering algorithm, Falcon is a clustering algorithm, Affinity Propagation is an affinity propagation clustering algorithm, Spectral Clustering is a spectral clustering algorithm, K-means (Lloyd) is a K-means (Lloyd's algorithm), Mini-Batch K-means is a mini-batch K-means algorithm, GMM is a Gaussian mixture model algorithm, and DBSCAN / HDBSCAN are density clustering or hierarchical density clustering algorithms.

[0054] Figure 4This is a schematic diagram comparing the "flexibility-adaptability-stability" landscape of the clustering algorithm of the preferred embodiment of the mass spectrometry data clustering method of the present invention;

[0055] Figure 5 This is a schematic diagram comparing the mixed effects of SFASC and ART-2A, which are preferred embodiments of the mass spectrometry data clustering method of the present invention.

[0056] Figure 6 This is a structural diagram of a preferred embodiment of the mass spectrometry data clustering system of the present invention;

[0057] Figure 7 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0059] With the rapid development of modern analytical instrument technology, especially the widespread adoption of single-particle mass spectrometry (SPMS), high-resolution liquid chromatography-mass spectrometry (LC-MS), and proteomics and metabolomics platforms, data acquisition capabilities have increased exponentially. In typical atmospheric observation missions, a single instrument can generate tens of millions of high-dimensional time-of-flight (TOF) mass spectrometry data points in a short period of time, officially entering the "archive-scale" era.

[0060] These massive datasets typically exhibit the following extreme characteristics, making them difficult for traditional analysis methods to handle: 1. High dimensionality: A single spectrum often contains hundreds to thousands of mass-to-charge ratio (m / z) channels, forming a high-dimensional sparse vector. 2. High sparsity and noise-dominated: Environmental or biological samples contain a large amount of background noise, resulting in a low signal-to-noise ratio. 3. Extremely large dynamic range: Trace signals of interest (such as specific toxins or tracers) may account for only one-thousandth of the total data volume, while background signals dominate.

[0061] Faced with such a large amount of data, how to extract coherent patterns with clear chemical significance, or "chemical clustering", has become a core bottleneck restricting scientific discovery.

[0062] Existing clustering algorithms are generally constrained by the "algorithmic dilemma" when processing this type of data, namely, it is difficult to simultaneously achieve scalability, flexibility, adaptability, and stability.

[0063] Existing clustering algorithms include:

[0064] I. Traditional algorithms based on partitioning and density (e.g., K-means, DBSCAN, etc.):

[0065] 1. K-means and its variants: K-means lacks flexibility, forcing the use of Euclidean distance and arithmetic mean. In sparse high-dimensional spectral spaces, Euclidean distance often fails. In addition, the number of clusters K must be specified in advance, making it unsuitable for unknown chemical environments.

[0066] 2. DBSCAN or OPTICS: DBSCAN is highly dependent on the global density parameter. More critically, in high-dimensional spaces, spatial indexes (such as KD-Tree, R-Tree) become ineffective, and density-based neighborhood search degenerates to O(N) time. 2 The complexity makes it impossible to handle tens of millions of data points.

[0067] II. Stream / incremental clustering algorithms (such as ART-2A):

[0068] 1. Severe order dependency (lack of stability): In online algorithms such as ART-2A, because the centroid is updated in real time with the sample input, the input order of the data directly determines the evolutionary trajectory of the cluster. Different reading orders will lead to drastically different results, lacking the mathematical certainty necessary for scientific research.

[0069] 2. Algorithmic Blending: Random drift of the centroid causes chemical clusters that should be separated to stick together, producing spurious mixed clusters.

[0070] Based on this, the engineering acceleration schemes for mass spectrometry optimization are as follows. In recent years, tools such as Falcon, msCRUSH, MaRaCluster, and HyperSpec have improved speed, but often at the cost of sacrificing flexibility (forcing specific metrics) or accuracy (probabilistic missed detections caused by LSH).

[0071] Existing technologies employ a strategy combining "similarity-first" and "density-first" approaches. While these early technologies addressed efficiency issues to some extent, they still reveal fundamental flaws when processing larger-scale (hundreds of millions) and more complex data: 1. Inability to achieve large-scale parallelization (scalability bottleneck): Existing technologies follow the streaming approach, and the... The processing of the first sample strongly depends on the first... 1. The sequential dependency of the updated state after each sample locks out the potential for parallel acceleration using modern multi-core CPUs or distributed clusters. 2. The heuristic nature of the strategy leads to insufficient theoretical stability: its core "density-first" strategy is essentially a rule-based heuristic filtering, lacking a unified mathematical objective function, and its convergence cannot be rigorously proven at the dynamic system level. 3. Limited metric scalability (insufficient flexibility): its centroid update logic is hard-coded as a "weighted arithmetic mean", which cannot be adapted to non-Euclidean metrics (such as bipolar cosine, spectral entropy, and MS2DeepScore).

[0072] The clustering method for mass spectrometry data described in the preferred embodiment of the present invention, such as... Figure 1 As shown, the clustering method for the mass spectrometry data includes the following steps:

[0073] Step S10: Obtain the target mass spectrometry dataset, and perform state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain the affinity score vector.

[0074] To address the aforementioned issues and the limitations of existing technologies (especially the inability to parallelize streaming incremental clustering and its metric constraints), this invention proposes a Scalable Flexible Adaptive Stable Clustering (SFASC) method based on a dynamic system architecture.

[0075] like Figure 2 As shown, the basic scheme of this invention is as follows: This invention abandons the traditional "streaming incremental" architecture and instead adopts a "block-coordinate descent" dynamic system architecture. The algorithm decouples the clustering process into the following three independent periodic stages:

[0076] 1. Lock-free parallel allocation phase (Phase 1): Sample allocation is performed using the "state freeze" mechanism and the innovative "density-enhanced similarity selection (DASS)" potential function to achieve full parallelization.

[0077] 2. Generalized structural consolidation stage (Phase 2): Fréchet mean is introduced to update the centroid, achieving adaptation to any similarity measure.

[0078] 3. Lyapunov stability monitoring phase (Phase 3): Limit cycles are detected using the energy function to ensure convergence.

[0079] like Figure 2 The diagram shown is a flowchart of the dynamic system architecture of the SFASC algorithm. Figure 2 (a) in the text indicates hierarchical initialization: establishing an initial cluster representative pool. Figure 2 (b) in the text represents Phase 1 (parallel allocation): a “state freeze” mechanism is adopted, data streams are input in parallel, and scores are calculated through bipolar cosine similarity. This shows the difference between the DASS strategy (density enhancement) and the traditional SF strategy (similarity priority): DASS introduces a density term to guide samples to converge towards a high-density core. Figure 2 (c) in the diagram represents stage two (structural consolidation): based on the allocation results, the centroid is updated using the generalized Fréchet mean, and deterministic merging and pruning are performed. Figure 2 In the diagram, (d) represents stage three (convergence monitoring): monitoring structural similarity and centroid similarity, and detecting state limit cycles to determine convergence.

[0080] Specifically, a target mass spectrometry dataset is obtained, and a mass spectrometry data matrix is ​​constructed based on the target mass spectrometry dataset; the mass spectrometry data matrix is ​​subjected to clustering state definition processing to obtain a target clustering state, wherein the target clustering state includes a cluster attribute set and a sample belonging label array; the current cluster representative set in the mass spectrometry data matrix is ​​obtained, and the current cluster representative set is frozen to obtain a frozen centroid.

[0081] This invention models the clustering process as a deterministic dynamic evolution system driven by an energy function within a finite state space. The algorithm iteratively executes the following three stages (i.e., the lock-free parallel allocation stage, the generalized structure consolidation stage, and the Lyapunov stability monitoring stage) until convergence.

[0082] The overall architecture and data structure of this invention are as follows:

[0083] First, input the data matrix. In this embodiment, Specifically refers to the mass spectrometry data matrix (constructed from the target mass spectrometry dataset), where, For mass spectrometry quantity (e.g.) ), This represents the mass-to-charge ratio (m / z) of the mass spectrometer. This invention is universally applicable, not only to large-scale mass spectrometry data but also to arbitrarily high-dimensional sparse data. It can also be a matrix composed of any data.

[0084] Furthermore, based on the mass spectrometry data matrix Define cluster state ,in, : indicates the first The set of cluster attributes for the next iteration. For the first The centroid vector of each cluster (representing the typical pattern of that category). This is the count / support for that cluster. This is an array of sample affiliation labels, recording the cluster index to which each sample currently belongs.

[0085] Phase 1: Lock-free parallel allocation based on potential energy (Phase 1). The core of this phase is the state freezing mechanism and two optional allocation strategies (SF (Similarity-First) and DASS (Density-Augmented Similarity Selection)).

[0086] The specific process of the state freeze mechanism is as follows: In the first stage... At the start of the next iteration, the system "freezes" the current cluster representation set. (That is, the current cluster representative set in this invention). Throughout the allocation phase, all computing units (threads or processes) only read... For reference, no write or update operations are performed. This allows for analysis of each sample in the mass spectrometry data. The computations are independent of each other, completely eliminating "read-write conflicts" and "sequential dependencies", allowing the algorithm to use GPUs or multi-core CPUs for large-scale lock-free parallel computation.

[0087] Obtain the data vectors from the mass spectrometry data matrix, obtain the first normalized matrix corresponding to the data vectors, and obtain the second normalized matrix corresponding to the frozen centroids. The first normalized matrix is ​​a pre-set normalized matrix for the data vectors, and the second normalized matrix is ​​a pre-set normalized matrix for the frozen centroids. Determine a preset similarity kernel function, and calculate the cosine similarity between the first normalized matrix and the second normalized matrix according to the preset similarity kernel function to obtain the affinity score vector.

[0088] Furthermore, a candidate set is constructed for each data vector. First, using any given similarity kernel function The affinity of this compound with all frozen centroids is calculated as follows: Let... and These are the data vectors and centroids in the mass spectrometry data matrix, respectively. Normalized matrix, taking cosine similarity as an example, affinity score vector The calculation formula is:

[0089] ;

[0090] in, For transpose, this step can be performed efficiently and in parallel using matrix multiplication.

[0091] Step S20: Determine a preset similarity selection strategy, and divide the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster.

[0092] Specifically, a preset similarity requirement is determined, and the target mass spectrometry dataset is filtered according to the affinity score vector to obtain candidate clusters in the target mass spectrometry dataset that meet the preset similarity requirement; wherein, the preset similarity requirement is the effective radius of the preset cluster; it is determined whether the candidate cluster is an empty set. If so, the data vector is marked as an outlier, and the affinity of the outlier is recalculated in the next iteration until the iteration converges; if not, a preset similarity selection strategy is used to partition the candidate clusters to obtain the optimal cluster; wherein, the preset similarity selection strategy is a similarity-first strategy or a density-enhanced similarity selection strategy.

[0093] Furthermore, an Admissible Set is constructed based on the affinity score vector. That is, to select candidate clusters that meet the basic similarity requirements. :

[0094] ;

[0095] in, This refers to the similarity kernel function (such as cosine similarity or Pearson correlation coefficient). For the first The iteration of the ... The center vector of each cluster The assignment acceptance threshold is used to define the effective radius of the cluster. If... If empty, then the sample In this round, data points are marked as outliers (once a data point is marked as an outlier in an iteration, it retains the outlier label for that iteration and is treated the same as other points assigned to the cluster in the next iteration for similarity calculation, until the algorithm converges; the outlier at this point is the final output outlier). If the set is not empty, the best cluster is selected according to one of the following two strategies. .

[0096] Strategy A: Similarity-First (SF) strategy. This is the traditional allocation logic, which divides based solely on geometric distance. The expression is as follows:

[0097] ;

[0098] Discussion of Convergence Constraints: The SF strategy essentially optimizes a geometric objective function defined by similarity. According to Bregman clustering theory, the SF strategy can only guarantee the monotonic descent of the objective function and the global convergence of the algorithm when the similarity kernel function corresponds to Bregman divergence (e.g., Euclidean distance corresponds to squared error, KL divergence). For complex non-convex, non-Bregman chemometrics (e.g., bipolar cosine, Tanimoto coefficients), the SF strategy may lead to oscillations or failure to converge. Therefore, the SF strategy is mainly used as a benchmark in this invention, or for processing Euclidean space data.

[0099] Strategy B: Density-Augmented Similarity Selection (DASS), this is the core optimization strategy of this invention, which introduces a density potential term, expressed as:

[0100] ;

[0101] in, Density potential energy function (e.g.) ), To adjust the weights, For the first The set of cluster attributes for each iteration.

[0102] Strategy B on the similarity kernel function The expansion effect of the convergence range is as follows (key technical effects): The DASS strategy is not only a physical preference for high-density clusters, but more importantly, it significantly expands the convergence range of the algorithm for the similarity kernel function mathematically.

[0103] Principle: DASS introduces The term actually constructs a new global state energy function. The boundedness of this potential function no longer depends on the similarity kernel function. Is it a Bregman divergence, and only require... It is a bounded symmetric function.

[0104] Effect: This means that when using the DASS strategy, the SFASC algorithm can be "plug and play" adapted to any bounded metric (including bipolar cosine, spectral entropy, correlation coefficient, etc.) and can still mathematically guarantee convergence to a deterministic steady state. This feature completely solves the limitation of traditional K-means algorithms that can only handle Euclidean distance, which is the key to the "flexibility" of this invention.

[0105] Step S30: Perform centroid update processing on the optimal belonging cluster to obtain the updated centroid, and perform deterministic structure editing processing on the optimal belonging cluster based on the updated centroid to obtain the target belonging cluster.

[0106] Specifically, the centroid of the best-belonging cluster is updated using the generalized Fréchet mean update method to obtain the updated centroid; wherein, the expression for the centroid update process is:

[0107] ;

[0108] in, To update the center of mass, To minimize mapping processing, Center of mass, The total number of the quantity vectors. To be similar to the kernel function The corresponding distance metric, For the first A vector of quantities.

[0109] For centroid updates, this invention employs a generalized Fréchet mean update, the specific implementation process of which is as follows: To complement DASS's support for arbitrary metrics, centroid updates must be generalized to solving for the generalized Fréchet mean, expressed as:

[0110] ;

[0111] For example, if cosine similarity is used, the Fréchet mean is the normalized vector sum; if Euclidean distance is used, it is the arithmetic mean; and if Manhattan distance is used, it is the geometric median.

[0112] Based on the updated centroid, the optimal belonging cluster is subjected to deterministic structural editing to obtain the target belonging cluster; wherein, the deterministic structural editing includes merging and pruning.

[0113] Furthermore, this invention performs deterministic structural editing on the updated centroid, specifically as follows: After the centroid is updated, deterministic structural adjustments are performed to maintain physical constraints, including:

[0114] 1. Merge: Identify items that meet the following criteria. The clusters are then merged, where, Let be the center vector of the k-th cluster. This is the merging threshold, used to prevent different clusters from getting too close.

[0115] 2. Pruning: Remove items that satisfy the specified conditions. Tiny clusters. Among them, For a set of cluster attributes, Minimum Support is used for filtering noise.

[0116] Step S40: Construct a kinetic potential function, and perform iterative clustering on the target cluster based on the kinetic potential function to obtain the final clustering result. The kinetic potential function includes a Lyapunov functional and a density-enhancing potential function.

[0117] Phase 3: Lyapunov stability monitoring, which determines convergence by monitoring the evolution of the global state energy function and detecting limit cycle guards in the state hash table.

[0118] The theoretical proof of the algorithm's convergence and stability is as follows: To overcome the lack of theoretical convergence guarantees in existing heuristic clustering algorithms (such as ART-2A and the previous generation FASC), this invention constructs a rigorous convergence proof based on dynamical system theory. The trajectory of the SFASC algorithm is modeled as an evolution within a finite state space, and its convergence is jointly guaranteed by the Energy Landscape and finite state machine theory.

[0119] Specifically, if the preset similarity selection strategy is a similarity-first strategy, then the Bregman divergence is used to minimize the target clustering state to obtain the Lyapunov function; wherein, the expression of the Lyapunov function is:

[0120] ;

[0121] in, For Lyapunov generic functions, For the target cluster state, This represents the current total number of clusters. Let Bregman divergence be the property of the divergence. For the first The center vector of each cluster.

[0122] Furthermore, for the construction of the dynamic potential function, this invention will cluster the states. The optimization process of mapping the evolution to a specific potential function is as follows:

[0123] For the SF strategy: the algorithm minimizes the Lyapunov functional based on the Bregman divergence. For the target clustering state The expression is as follows:

[0124] ;

[0125] in, This represents the current total number of clusters. This is the Bregman divergence (e.g., squared Euclidean distance).

[0126] If the preset similarity selection strategy is a density-enhanced similarity selection strategy, then the target clustering state is subjected to maximization mapping processing to obtain a density-enhanced potential function; wherein, the expression of the density-enhanced potential function is:

[0127] ;

[0128] in, For density-enhancing potential energy function, To adjust the weights, For the count corresponding to the cluster, For paired interactive potential energy, for and The similarity kernel function is composed of these components.

[0129] For the DASS strategy: The algorithm maximizes a bounded density-enhancing potential function. :

[0130] ;

[0131] Among them, the second item This is the pairwise interaction potential, which physically corresponds to the density reward in the allocation rule. (when The introduction of this potential energy function (at time) mathematically explains why the DASS strategy can automatically identify high-density manifolds.

[0132] The state hash value of the target cluster is calculated based on the dynamic potential energy function, and the target cluster is iteratively clustered based on the state hash value; the limit cycle state is determined, and when the state hash value reaches a preset state, the minimum Lyapunov function value and the maximum potential energy corresponding to the limit cycle state are obtained, and the minimum Lyapunov function value and the maximum potential energy are used as the final clustering result;

[0133] The final clustering result is expressed as:

[0134] ;

[0135] in, For the final clustering result, To maximize mapping processing, It is a limit cycle.

[0136] It is understandable that the hash value is only used to detect whether the algorithm has already reached a certain state (i.e., the preset state in this invention, where the hash value is repeated), and is unrelated to convergence. Convergence is determined in two ways: 1. The algorithm terminates in a state, and theoretical convergence analysis reveals that this state is the optimal state, possessing the highest potential energy or the smallest Lyapunov functional value; 2. The algorithm cycles through several states (a limit cycle), and the state with the highest potential energy or the smallest Lyapunov functional value among all states on the limit cycle is selected as the final result.

[0137] For the optimization properties of the two-stage iteration, the iterative process (Phase 1 and Phase 2) of this invention constitutes block-coordinate optimization, including:

[0138] 1. Allocation Phase (Phase 1): Given a fixed centroid The DASS strategy utilizes parallel computation. This ensures the potential energy function Maximize marginal gain.

[0139] 2. Update Phase (Phase 2): Given a fixed allocation The centroid is updated to the generalized Fréchet mean, which guarantees global optimality under the current structure.

[0140] Therefore, without structural editing (merging or splitting), the algorithm guarantees the monotonicity of the potential function, i.e. .

[0141] To escape local optima and address the issue of structural editing and global convergence to a limiting cycle, this invention introduces structural editing (merging and pruning). According to the lemma, although these operations may temporarily disrupt the monotonicity of the potential energy, they are performed to satisfy physical consistency constraints. and The necessary disturbances are made as a result.

[0142] Convergence Theorem: Due to the efficient clustering state space It is a finite (bounded) sample size. And discrete allocation), and the algorithm's update rule (including tie handling) is deterministic. According to dynamical system theory, the trajectory of the SFASC algorithm must enter a limit cycle or a fixed point. Therefore, at the end of the iteration, the final clustering result is obtained, expressed as:

[0143] ;

[0144] This invention locks the limit cycle by detecting the cycle of state hash values ​​in Phase 3. And return from it the state with the maximum potential energy (i.e., the optimal clustering quality). (That is, the final clustering result in this invention). This mathematically proves that this invention can terminate and output a deterministic result under any input conditions, solving the stability problem in the "four difficulties of algorithms".

[0145] Regarding complexity analysis and performance verification: This invention will demonstrate in detail the linear scalability and efficiency of the SFASC algorithm in processing archive-scale high-dimensional data from both theoretical derivation and experimental measurement perspectives.

[0146] The theoretical time complexity analysis is as follows:

[0147] For including Each sample, with dimensions as The total time complexity of the SFASC algorithm on the given dataset is... It can be given by the following formula:

[0148] ;

[0149] in: The number of iterations required for convergence, The preset budget limit for the number of clusters, The cost of computing a single similarity kernel function (typically 100%) In big data scenarios, sample size Much larger than the number of clusters (Right now Therefore, the quadratic term This can be ignored. The dominant term in the algorithm is the allocation process in the first phase, i.e. This means that the time complexity of SFASC increases with the amount of data. It exhibits a linear growth relationship .

[0150] The analysis process regarding space complexity and memory efficiency is as follows:

[0151] SFASC employs a "state freeze" mechanism, supporting streaming batch processing without loading all data into memory at once. Its peak memory usage... for:

[0152] ;

[0153] in, For batch size in parallel computing, due to and Since all parameters are constants, the space complexity of SFASC is relatively small compared to the amount of data. It is linear and the coefficient is extremely small.

[0154] Real-world testing and verification with 25 million-level archived data:

[0155] To verify the correctness of the theoretical analysis, this invention conducted a full clustering test on a real-world environmental dataset containing 25 million bipolar single-particle aerosol mass spectrometry (SPMS) data points on a single-node server (Intel Xeon Scalable, 100 cores). Key performance indicators are shown in Table 1.

[0156] Table 1: Measured performance of the SFASC algorithm on a dataset of 25 million records.

[0157]

[0158] like Figure 3 As shown, the theoretical expansion envelopes of SFASC and existing mainstream algorithms are compared: that is, the algorithm expansion envelopes are compared based on theoretical derivation (the data axes are logarithmic scales). Figure 3 In this context, 'a' represents the time complexity versus the data size N: SFASC exhibits strict O(N) linear scalability, while matrix-based methods (such as HAC, Affinity Propagation) and high-dimensional DBSCAN exhibit O(N) time complexity. 2 The growth rate is too fast to handle big data. Figure 3 In the equation, b represents memory complexity versus data size N: SFASC's memory usage grows slowly and linearly with N, which is better than algorithms that require storing similarity matrices. Figure 3 In the equation, 'c' represents time complexity versus dimensionality 'D': As the dimension increases, SFASC maintains linear growth and is not significantly affected by the 'curse of dimensionality'. Figure 3 In this context, d represents memory complexity versus dimension D: SFASC's memory usage is linearly related to dimension D, which is far superior to tree-based indexing methods.

[0159] like Figure 4The image shows a landscape comparison of clustering algorithms in terms of "flexibility, adaptability, and stability": that is, a performance landscape comparison of existing mainstream clustering algorithms. Figure 4 The horizontal axis represents flexibility (the ability to adapt to different metrics), the vertical axis represents adaptability (the ability to discover heterogeneous structures), and the color intensity represents stability (robustness to input order and random seeds). Figure 4 In the K-means and its variants, speed is fast but flexibility and adaptability are poor. Figure 4 In regions such as ART-2A and Falcon, the adaptability is good but the stability is extremely poor (low stability), and there is a serious order dependency. Figure 4 Mid-spectral clustering and DBSCAN regions offer decent flexibility and adaptability, but cannot be linearly expanded (hollow markers indicate non-scalability). Figure 4 The SFASC region (i.e., this invention), through its dynamic architecture design, is the only one that simultaneously achieves "high" standards in three dimensions while maintaining linear scalability. Figure 4 The algorithm using solid pentagram markers (in the algorithm) successfully broke through the "four dilemmas of algorithms".

[0160] like Figure 5 As shown, this is a comparison of the mixed effects of SFASC and ART-2A: comparing the mixed effects of the algorithms. Figure 5 In (a), SFASC (in this invention) is shown: the diagonal represents the main clusters, the lower left corner shows that the number of "mixed pairs" is 0, and the heatmap in the upper right corner shows that the similarity between each cluster is lower than the merging threshold, indicating that strict cluster separation has been achieved and "algorithm mixing" has been eliminated. Figure 5 In (b) of the diagram, ART-2A is shown: there are a large number of mixed pairs in the lower left corner (as shown by the connecting line), indicating that centroid drift causes different chemical clusters to stick together. The heatmap in the upper right corner shows that the similarity between multiple clusters is too high, resulting in blurred classification boundaries.

[0161] Compared with existing technologies (including the applicant's previous application ZL202510839139.3), the key innovations of this invention are as follows:

[0162] 1. Block coordinate descent parallel architecture based on "state freezing" (replacing streaming incremental architecture):

[0163] Key difference: Existing technologies are streaming, with updates dependent on the order and unable to be parallelized. This invention "freezes" the centroid during the allocation phase, making the computation of all samples independent.

[0164] Protection point: Divide the iterative process into non-overlapping allocation and update phases, and keep the cluster parameters unchanged during the allocation phase.

[0165] 2. Density Enhanced Similarity Selection (DASS) strategy with expanded convergence region:

[0166] Key difference: Existing technologies use heuristic rules, and existing K-means algorithms only converge under Bregman divergence. This invention constructs a universal bounded potential function by introducing density potential energy.

[0167] Technical effects: It not only achieves priority capture of high-density manifolds, but more importantly, it extends the convergence guarantee of the algorithm to any bounded symmetric similarity kernel function (such as bipolar cosine and Tanimoto coefficients), no longer limited to Euclidean geometry.

[0168] Protective point: The objective function includes a similarity term and a density potential term, thus adapting to non-convex similarity measures and ensuring convergence.

[0169] 3. Generalized Fréchet mean update kernel (replacing the arithmetic mean):

[0170] Key difference: Existing technology hardcodes the arithmetic mean, while this invention abstracts it into a Fréchet mean solution.

[0171] Protected Points: Automatically select the corresponding geometric center calculation operator based on the similarity metric (such as bipolar cosine) selected by the user.

[0172] 4. Lyapunov dynamic stability control:

[0173] Key difference: The introduction of a global energy function and limit cycle detection provides a mathematical guarantee of convergence.

[0174] Protection point: Termination is determined by monitoring changes in the global state energy function and the cycle of state hash values.

[0175] Technical effects of the present invention:

[0176] 1. Extremely high scalability: By "freezing the state", the calculation of each sample in the allocation phase does not interfere with each other, supporting large-scale multi-threaded parallel processing, breaking through the serial bottleneck of existing technologies, and achieving true linear time complexity O(N).

[0177] 2. Mathematical determinism and stability: It eliminates the influence of the order of input data on the results, ensuring the reproducibility of scientific research.

[0178] 3. Extremely high metric flexibility: The Fréchet mean update mechanism allows the algorithm to be "plug and play" adapted to various chemical metrics such as bipolar cosine and Tanimoto coefficient.

[0179] 4. Excellent adaptability: The DASS function uses the density term as a continuous potential energy penalty, which can more smoothly identify high-density manifolds and effectively separate background noise from trace signals.

[0180] Furthermore, the core of this invention lies in the dynamic cycle of "parallel allocation based on DASS potential energy" and "generalized Fréchet mean update". Based on this core architecture, those skilled in the art can conceive of the following modifications or variations, all of which should be covered within the scope of protection of this invention:

[0181] I. Density Potential Energy Function The nonlinearity and dynamic scheduling include:

[0182] 1. Nonlinear function replacement: In the original embodiment This is a linear potential energy. Competitors might use nonlinear functions to alter the decay characteristics of the density weights. For example: logarithmic potential energy. Used to suppress excessive adsorption of super-clusters, prevent the "winner-takes-all" effect, and improve sensitivity to medium-sized clusters. Sigmoid or saturation potential. :in, Given the current size of the cluster, This is the saturation inflection point (i.e., the cluster size at half saturation). This variant is used to set an upper limit on the effect of density, a parameter used to control the growth slope, so that once the cluster size reaches a certain level, it no longer gains an additional competitive advantage simply by increasing the size.

[0183] 2. Parameters Dynamic annealing strategy: It doesn't have to be a constant; it can be designed to vary with the number of iterations. changing function For example, setting a large initial value. Encourage the rapid formation of the main structure, which should be gradually reduced as iterations proceed. This reduces the algorithm to a fine-tuning process driven by pure similarity (similar to the idea of ​​simulated annealing).

[0184] II. Diverse Adaptation of Similarity Kernel Functions and Update Operators (Metric Agnosticism)

[0185] The "Generalized Fréchet Mean" framework proposed in this invention allows for the replacement of any metric that satisfies symmetry and boundedness, and its corresponding centroid solving operator. Some examples are given below:

[0186] 1. Non-Euclidean Metrics and Substitutions: Spectral Entropy: Used for information-theoretic weighted matching of fragment ions in metabolomics. Tanimoto or Jaccard Coefficients: Used for clustering molecular fingerprints or binary presence / absence data. Deep Learning Embedding Distance: Latent space vectors generated by neural networks (such as Word2Vec, MS2DeepScore), using Euclidean or cosine distance. Mahalanobis Distance: Considers the covariance between features, suitable for feature-correlated spectral data.

[0187] 2. Transformation of the Fréchet mean: If the metric is changed, the update operator in Phase 2 needs to be transformed accordingly to the geometric median (corresponding to L1 Manhattan distance), the mode (corresponding to Hamming distance), or the latent space mean (corresponding to Embedding), rather than being limited to the arithmetic mean or normalized vector sum.

[0188] Third, the introduction of Approximate Nearest Neighbor Search (ANN) accelerates the allocation stage. Although this invention emphasizes full and accurate computation, it is still necessary to consider the challenges of handling extremely large-scale applications. When processing Phase 1 data, approximation algorithms can be introduced to accelerate the process. Build:

[0189] 1. Integrate LSH or HNSW indexes: During the allocation phase, do not calculate the relationship between samples and all... Instead of calculating the distance between centroids, the algorithm uses Locality Sensitive Hash (LSH) or Hierarchical Navigation Small World Graph (HNSW) to quickly filter out the top-k candidate centroids, and then calculates the DASS score in the candidate set.

[0190] 2. Variation point: This hybrid strategy of "coarse screening + fine screening" still uses the DASS objective function and dynamic framework of the present invention, only optimizing the search efficiency, and belongs to the subordinate variation of the present invention.

[0191] IV. Hierarchical or Multi-resolution Clustering Strategy: Based on the analytical capabilities of this invention for "continuum" and "discrete clusters," hierarchical cascade schemes can be designed, including:

[0192] 1. Multi-level threshold strategy: The first level uses a lenient threshold (low) ) and strong density weights (high Run SFASC to quickly extract the macroscopic "main trunk manifold" (such as the SIA trunk); the second level applies a strict threshold (high) to the samples within the trunk. ) and zero-density weights ( Run SFASC again to resolve the fine aging gradient or subtype within.

[0193] 2. Local adaptive threshold: This modifies the global threshold... Replace with local functions for each cluster The admission criteria for a cluster are dynamically adjusted based on the compactness of the cluster.

[0194] V. Memory optimization scheme based on "Sketching" for extremely high-dimensional data ( (such as genome or high-resolution full spectrum), in order to break through Due to memory limitations, sketching techniques can be introduced:

[0195] 1. Centroid Compression: When updating the centroid in Phase 2, the complete centroid is not stored. Instead of storing dimensional vectors, it stores their Count-Min Sketch or Random Projection summary.

[0196] 2. Compressed Domain Calculation: Similarity calculation in Phase 1 is performed directly in the sketch / projection space. This allows the algorithm to run on memory-constrained edge devices.

[0197] VI. Hardware heterogeneous acceleration and distributed deployment, including:

[0198] 1. GPU or TPU acceleration: Given the complete independence of sample computation in Phase 1, DASS score computation is mapped to matrix multiplication (GEMM) operations, which are then accelerated by large-scale parallelism using CUDA cores.

[0199] 2. Map-Reduce Distributed Architecture: Map Phase (Phase 1): Data is sharded and distributed to different nodes. Each node uses its locally cached "frozen centroids" to calculate sample attribution in parallel. Reduce Phase (Phase 2): Each node only uploads locally aggregated statistics (local vector sums, local counts), and the master node aggregates and calculates the global Fréchet mean, greatly reducing network communication overhead.

[0200] In addition, regarding bipolar data fusion (Late Fusion): The "bipolar cosine similarity" (taking the minimum value of the similarity between positive and negative spectra) mentioned in this invention is a feature-level data fusion strategy. This is different from simple vector splicing (Early Fusion) and can effectively avoid the problem of strong unipolar signals masking the mismatch of the other polarity. This is a special optimization for mass spectrometry data.

[0201] Regarding the elimination of "algorithm mixing": This invention, through deterministic merging and pruning mechanisms, physically guarantees the separation between clusters, eliminating the "fuzzy boundaries" and "mixed pairs" common in algorithms such as ART-2A, which is crucial for scientific tracing.

[0202] Furthermore, such as Figure 6 As shown, based on the above-described clustering method for mass spectrometry data, this invention also provides a clustering system for mass spectrometry data, wherein the clustering system for mass spectrometry data includes:

[0203] The state-freezing module 51 is used to acquire the target mass spectrometry dataset, and to perform state-freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector.

[0204] The strategy selection module 52 is used to determine a preset similarity selection strategy, and to divide the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster.

[0205] The centroid update module 53 is used to perform centroid update processing on the optimal belonging cluster to obtain an updated centroid, and perform deterministic structure editing processing on the optimal belonging cluster based on the updated centroid to obtain the target belonging cluster.

[0206] The iterative clustering module 54 is used to construct a dynamic potential energy function and perform iterative clustering processing on the target cluster based on the dynamic potential energy function to obtain the final clustering result.

[0207] Furthermore, such as Figure 7 As shown, based on the above-mentioned clustering method and system for mass spectrometry data, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 7 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0208] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a mass spectrometry data clustering program 40, which can be executed by the processor 10 to implement the mass spectrometry data clustering method of this application.

[0209] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing clustering methods for the mass spectrometry data.

[0210] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface.

[0211] In one embodiment, the steps of the mass spectrometry data clustering method are implemented when the processor 10 executes the clustering program 40 of the mass spectrometry data in the memory 20.

[0212] In summary, this invention provides a clustering method, system, terminal, and storage medium for mass spectrometry data. The method includes: acquiring a target mass spectrometry dataset, performing state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector; determining a preset similarity selection strategy, and partitioning the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal assigned cluster; performing centroid update processing on the optimal assigned cluster to obtain an updated centroid, and performing deterministic structure editing processing on the optimal assigned cluster according to the updated centroid to obtain the target assigned cluster; constructing a kinetic potential function, and performing iterative clustering processing on the target assigned cluster according to the kinetic potential function to obtain the final clustering result. This invention enables parallel processing of mass spectrometry data by performing state freezing processing on the mass spectrometry data. Simultaneously, the processing methods such as centroid update and construction of the kinetic potential function effectively improve the efficiency of mass spectrometry data clustering analysis and the accuracy of the clustering result output.

[0213] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0214] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0215] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method of clustering mass spectrometry data, characterized in that, The clustering methods for the mass spectrometry data include: Obtain the target mass spectrometry dataset, and perform state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain the affinity score vector; A preset similarity selection strategy is determined, and the target mass spectrometry dataset is divided according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster. The optimal belonging cluster is subjected to centroid update processing to obtain an updated centroid, and the optimal belonging cluster is subjected to deterministic structure editing processing based on the updated centroid to obtain the target belonging cluster; A dynamic potential energy function is constructed, and the target cluster is iteratively clustered according to the dynamic potential energy function to obtain the final clustering result; The kinetic potential energy function includes the Lyapunov generalized function and the density-enhanced potential energy function; The construction of the dynamic potential energy function specifically includes: If the preset similarity selection strategy is a similarity-first strategy, then the Bregman divergence is used to minimize the target clustering state to obtain the Lyapunov generalized function. The target clustering state includes a set of cluster attributes and an array of sample affiliation labels; The expression for the Lyapunov generic function is as follows: ; wherein, is a Lyapunov function, is a target clustering state, is a current total number of clusters, is a Bregman divergence, is a center vector of a th cluster, is a data vector of a th cluster; If the preset similarity selection strategy is a density-enhanced similarity selection strategy, then the target clustering state is subjected to a maximization mapping process to obtain the density-enhanced potential energy function. The expression for the density-enhancing potential energy function is as follows: ; wherein, is a density enhanced potential function, is a tuning weight, is a count corresponding to the cluster, is a pairwise interaction potential, is and a similarity kernel function composed of The iterative clustering process based on the kinetic potential energy function to obtain the final clustering result specifically includes: The state hash value of the target cluster is calculated based on the dynamic potential energy function, and the target cluster is iteratively clustered based on the state hash value. Determine the limit cycle state. When the state hash value reaches a preset state, obtain the minimum Lyapunov function value and maximum potential energy corresponding to the limit cycle state, and use the minimum Lyapunov function value and maximum potential energy as the final clustering result. The final clustering result is expressed as: ; wherein, is the final clustering result, is the maximum mapping process, is the limit cycle.

2. The method of clustering mass spectrometry data of claim 1, wherein, The process of acquiring the target mass spectrometry dataset and performing state freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector specifically includes: Obtain the target mass spectrometry dataset and construct a mass spectrometry data matrix based on the target mass spectrometry dataset; The mass spectrometry data matrix is ​​subjected to clustering state definition processing to obtain the target clustering state; Obtain the current cluster representative set in the mass spectrometry data matrix, and freeze the state of the current cluster representative set to obtain the frozen centroid; Obtain the data vector from the mass spectrometry data matrix, and calculate the affinity based on the data vector and the frozen centroid to obtain the affinity score vector.

3. The method of clustering mass spectrometry data of claim 2, wherein, The step of calculating affinity based on the data vector and the frozen centroid to obtain an affinity score vector specifically includes: Obtain the first normalized matrix corresponding to the data vector, and obtain the second normalized matrix corresponding to the frozen centroid, wherein the first normalized matrix is ​​a pre-set normalized matrix for the data vector, and the second normalized matrix is ​​a pre-set normalized matrix for the frozen centroid; A preset similarity kernel function is determined, and the cosine similarity between the first normalized matrix and the second normalized matrix is ​​calculated based on the preset similarity kernel function to obtain the affinity score vector.

4. The method of clustering mass spectrometry data of claim 2, wherein, The step of determining a preset similarity selection strategy and partitioning the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster includes: A preset similarity requirement is determined, and the target mass spectrometry dataset is filtered according to the affinity score vector to obtain candidate clusters in the target mass spectrometry dataset that meet the preset similarity requirement; Wherein, the preset similarity requirement is the effective radius of the preset cluster; Determine whether the candidate cluster is an empty set. If so, mark the data vector as an outlier and recalculate the affinity of the outlier in the next iteration until the iteration converges. If not, a preset similarity selection strategy is used to perform data partitioning on the candidate clusters to obtain the optimal assigned cluster; The preset similarity selection strategy is either a similarity-first strategy or a density-enhanced similarity selection strategy.

5. The method of clustering mass spectrometry data of claim 4, wherein, The expression for the centroid update process is: ; wherein, is to update the centroid, is to minimize the mapping process, is the centroid, is the total number of quantity vectors, is the similarity kernel function corresponding distance measure, is the first data vector; The deterministic structure editing process includes merging and trimming.

6. A clustering system for mass spectrometry data, characterized in that, The mass spectrometry data clustering system is used to implement the mass spectrometry data clustering method as described in any one of claims 1-5, wherein the mass spectrometry data clustering system comprises: The state-freezing module is used to acquire the target mass spectrometry dataset, and to perform state-freezing processing and affinity calculation on the target mass spectrometry dataset to obtain an affinity score vector. The strategy selection module is used to determine a preset similarity selection strategy, and to divide the target mass spectrometry dataset according to the preset similarity selection strategy and the affinity score vector to obtain the optimal cluster. The centroid update module is used to perform centroid update processing on the optimal belonging cluster to obtain the updated centroid, and to perform deterministic structure editing processing on the optimal belonging cluster based on the updated centroid to obtain the target belonging cluster. The iterative clustering module is used to construct a dynamic potential energy function and perform iterative clustering processing on the target cluster based on the dynamic potential energy function to obtain the final clustering result.

7. A terminal, characterized in that, The terminal includes: a memory, a processor, and a mass spectrometry data clustering program stored in the memory and executable on the processor. When the mass spectrometry data clustering program is executed by the processor, it implements the steps of the mass spectrometry data clustering method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a clustering program for mass spectrometry data, which, when executed by a processor, implements the steps of the mass spectrometry data clustering method as described in any one of claims 1-5.