Mass spectrum parameter configuration method and system based on scene feature perception
By adopting a scene feature-aware mass spectrometry parameter configuration method, a tuning complexity feature curve is generated using spectral information entropy and baseline noise derivative variance. The inertia weight factor is dynamically adjusted and heavy-tailed distribution perturbation is introduced, which solves the problems of computational resource waste and local extremum trapping in existing automatic mass spectrometry tuning methods in complex environments, and achieves high efficiency and stability in mass spectrometry parameter configuration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG SHENGLI MEDICAL TECH CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-15
AI Technical Summary
Existing automatic mass spectrometry tuning methods lack the ability to detect tuning peak distortion characteristics in real time when dealing with severe instrument detuning or high background noise, leading to wasted computational resources and miscalibration. Furthermore, a single optimization logic cannot balance global search breadth and local convergence accuracy, and is prone to getting stuck in local extrema.
By acquiring the wide-domain parameter pre-scan data stream of the mass spectrometer, the variance of the first derivative of the spectral information entropy and the baseline noise is calculated to generate the tuning complexity characteristic curve. A multi-dimensional parameter gradient response surface is constructed by combining the historical tuning parameter database, the inertia weight factor is dynamically adjusted, the trajectory-signal covariance matrix is used to monitor the convergence state of the algorithm, and heavy-tailed distribution perturbation is introduced to escape the local extreme value region.
It achieves precise quantification of the complexity of mass spectrometry data stream, eliminates invalid parameter regions, reduces computational load, improves the accuracy and stability of parameter optimization space, and ensures the global optimality of mass spectrometry configuration.
Smart Images

Figure CN122045948A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mass spectrometry detection technology, specifically to a method and system for configuring mass spectrometry parameters based on scene feature perception. Background Technology
[0002] Mass spectrometry, as a core tool for substance identification and quantitative analysis, relies heavily on the precise settings of its ion optical system and electrical parameters for performance indicators such as resolution, sensitivity, and peak shape symmetry. Long-term operation, changes in ambient temperature and humidity, or contamination of the ion source can cause electronic component drift, leading to a decline in instrument performance. Therefore, it is essential to periodically perform automatic tuning of the instrument using standard tuning solutions (such as perfluorotributylamine (PFTBA) commonly used in gas chromatography-mass spectrometry, and polypropylene glycol (PPG) commonly used in liquid chromatography-mass spectrometry) to calibrate the mass axis and optimize peak shape.
[0003] However, most existing automated mass spectrometry tuning methods employ static, pre-defined strategies (such as the simplex method or hill-climbing method). These methods suffer from substantial computational logic defects when dealing with non-ideal initial states where the instrument is severely detuned or has high background noise: on the one hand, conventional algorithms lack real-time perception of tuning peak distortion characteristics and cannot distinguish between chemical noise interference and severely deformed tuning liquid characteristic peaks, leading to a large number of ineffective iterations in the low-value parameter space, wasting computational resources and even causing miscalibration; on the other hand, a single optimization logic cannot balance global search breadth and local convergence accuracy. When faced with complex tuning parameter response surfaces with multiple extrema, the algorithm is prone to getting stuck in local extrema, causing the automated tuning process to stall prematurely and failing to obtain the optimal parameter combination suitable for the current instrument state. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for configuring mass spectrometry parameters based on scene feature perception, thus solving the problems mentioned above.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a mass spectrometry parameter configuration method based on scene feature perception, comprising the following steps: S1. Acquiring a wide-domain parameter pre-scan data stream of the mass spectrometer under the condition of injecting standard tuned material, dividing the data stream by a sliding window of a set width, calculating the spectral information entropy value and the first derivative variance value of the baseline noise within the window, performing normalization fusion calculation on the spectral information entropy value and the first derivative variance value, and generating a tuning complexity feature curve of the mass-to-charge ratio distribution dimension; S2. Extracting the standard tuned material feature peak region in the tuning complexity feature curve where the curvature value exceeds a preset threshold, calling the historical tuning parameter database to perform interpolation mapping on the feature peak region, constructing a multidimensional parameter gradient response surface, calculating the extreme point coordinate distribution of each dimension on the gradient response surface, and constructing an extended... The geometric space range is then used as a restricted parameter search domain with a high probability of containing the optimal solution; S3. A multi-objective optimization algorithm is run within the restricted parameter search domain. In each iteration, the tuning complexity feature value corresponding to the current search coordinate is extracted. The tuning complexity feature value is substituted into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm. The search coordinate is updated according to the modified inertia weight factor to generate the parameter optimization trajectory; S4. The parameter coordinate changes and mass spectrum signal intensity changes of a preset number of continuous time steps in the parameter optimization trajectory are cached. The trajectory-signal covariance matrix is constructed and the matrix eigenvalues are calculated. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertia weight factor until the matrix eigenvalue is greater than the convergence threshold, and the mass spectrum configuration parameters are output.
[0006] Furthermore, the process of acquiring the wide-domain parameter pre-scan data stream of the mass spectrometer under the injected standard tuned material state, dividing the data stream by a sliding window of set width, and calculating the spectral information entropy value and the first derivative variance value of the baseline noise within the window is as follows: The pre-scan data stream intercepted by the sliding window is discretized at equal intervals to construct the mass-to-charge ratio-intensity data matrix corresponding to the window. The intensity values in the matrix are mapped to relative probability distribution vectors. Logarithmic summation is performed on the relative probability distribution vectors, and the discrete information entropy of this vector is calculated as the spectral information entropy value. Simultaneously, the intensity sequence in the data matrix is extracted, the first-order difference sequence of adjacent sampling points is calculated, the variance statistic of the first-order difference sequence is statistically analyzed, and the variance statistic is smoothed to separate the trend component. The remaining value after removing the trend component is determined as the first derivative variance value of the baseline noise.
[0007] Furthermore, the specific process of performing normalization and fusion calculation on the spectral information entropy values and first derivative variance values to generate the tuning complexity feature curve of the mass-to-charge ratio distribution dimension is as follows: traverse the spectral information entropy values and first derivative variance values across the entire mass-to-charge ratio range, calculate the global mean and standard deviation, perform mean removal and variance scaling processing to map the values to the same dimension interval, generating standard entropy sequences and standard variance sequences; construct a linear weighted fusion operator containing weights, perform weighted summation on the standard entropy sequence values and standard variance sequence values corresponding to the same sliding window to generate comprehensive complexity feature values, and connect the comprehensive complexity feature values into discrete time series curves according to the time step order of the sliding window to generate the tuning complexity feature curve.
[0008] Furthermore, the specific process of extracting the standard tuned material characteristic peak region with curvature values exceeding a preset threshold from the tuning complexity characteristic curve, and performing interpolation mapping on the characteristic peak region by calling the historical tuning parameter database to construct the multidimensional parameter gradient response surface is as follows: Calculate the second-order difference values of adjacent data points in the tuning complexity characteristic curve, and mark the continuous data segments with absolute values of second-order difference values greater than the inflection point threshold as characteristic mutation intervals; extract the central mass-to-charge ratio and average complexity amplitude of the characteristic mutation interval to construct an index feature vector, perform vector similarity matching in the historical tuning parameter database, obtain the historical sample set with the closest Euclidean distance to the index feature vector, perform nonlinear spatial interpolation operation based on distance weight on the historical sample set, and reconstruct the multidimensional parameter gradient response surface.
[0009] Furthermore, the specific process of calculating the distribution of extreme point coordinates in each dimension of the gradient response surface and constructing the expanded geometric space as a restricted parameter search domain with a high probability of containing the optimal solution is as follows: Perform a gridded gradient scan on the multidimensional parameter gradient response surface to identify the set of stationary point coordinates with a gradient vector magnitude of zero on the response surface. Filter out local maxima by analyzing the numerical monotonicity of the stationary point neighborhood. Construct a minimal convex polyhedron that can geometrically enclose the local maxima. With the geometric center of the minimal convex polyhedron as the origin, perform an isotropic expansion operation on the polyhedron boundary according to the expansion coefficient, and lock the expanded geometric space as the restricted parameter search domain.
[0010] Further, the specific process of step S3 is as follows: Initialize multiple sets of probe parameter vectors within the restricted parameter search domain, define a nonlinear mapping function based on tuning complexity and a convergence state correction factor, input the extracted tuning complexity feature values into the mapping function, and output the corresponding dynamic inertia weight factor. The execution logic of the mapping function is as follows: compare the tuning complexity feature values with a preset complexity threshold. If the tuning complexity feature values are greater than the preset complexity threshold, output the inertia weight factor whose value is within the first preset interval. At the same time, monitor the convergence state of the algorithm in real time. If it is detected that the change amplitude of the global optimal solution within a preset number of iterations is less than the preset oscillation judgment threshold, then call the convergence state correction factor with a value less than 1 to perform a multiplicative decay operation on the current inertia weight factor.
[0011] Furthermore, the specific process of constructing the trajectory-signal covariance matrix and calculating the matrix eigenvalues by caching the parameter coordinate changes and mass spectrum signal intensity changes of a preset number of consecutive time steps in the parameter optimization trajectory is as follows: A first-in-first-out circular data buffer is established, storing the parameter coordinate vectors of the most recent consecutive time steps and the corresponding mass spectrum signal intensity scalars. A difference operation is performed on the data in the buffer to obtain the parameter change vector sequence and the signal intensity change scalar sequence. The expectation of the outer product of the parameter change vector and the signal intensity change scalar is calculated to construct the cross-covariance matrix. An orthogonal transformation decomposition is performed on the cross-covariance matrix, and the largest element in the resulting diagonal matrix is extracted as the largest eigenvalue of the matrix.
[0012] Furthermore, when the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal strength has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertial weighting factor until the matrix eigenvalue is greater than the convergence threshold. The specific process for outputting the final mass spectrometry configuration parameters is as follows: When it is determined that the stagnation state has been entered, a random step size value following a power-law decay distribution is generated; the random step size value is superimposed as an additive perturbation term on the current inertial weighting factor, changing the magnitude of the velocity term in the vector iteration equation, driving the probe parameter vector to jump out of the local extreme value region, and recalculating the eigenvalue of the cross-covariance matrix in the next iteration; the loop monitoring logic is executed, and when the recalculated maximum eigenvalue of the matrix recovers to above the convergence threshold and the moving average of the mass spectrometry signal strength meets the standard, the iteration loop is terminated, and the probe parameter vector at the current moment is locked as the final mass spectrometry configuration parameters.
[0013] The scene feature-aware mass spectrometry parameter configuration system includes the following modules: a feature generation module, used to acquire the wide-domain parameter pre-scan data stream of the mass spectrometer under the injected standard tuned material state, segment the data stream by a sliding window of set width, calculate the spectral information entropy value and the first derivative variance value of the baseline noise within the window, perform normalization fusion calculation on the spectral information entropy value and the first derivative variance value, and generate a tuning complexity feature curve of the mass-to-charge ratio distribution dimension; a spatial reduction module, used to extract the standard tuned material feature peak region in the tuning complexity feature curve where the curvature value exceeds a preset threshold, call the historical tuning parameter database to perform interpolation mapping on the feature peak region, construct a multi-dimensional parameter gradient response surface, calculate the extreme point coordinate distribution of each dimension on the gradient response surface, and construct the expanded geometric space range as a high probability. The system includes a constrained parameter search domain containing the optimal solution; a parameter optimization module, which runs a multi-objective optimization algorithm within the constrained parameter search domain. In each iteration, it extracts the tuning complexity feature value corresponding to the current search coordinates, substitutes this value into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm, updates the search coordinates based on the modified inertia weight factor, and generates the parameter optimization trajectory; and a feedback adjustment module, which caches the parameter coordinate changes and mass spectrum signal intensity changes for a preset number of consecutive time steps in the parameter optimization trajectory, constructs the trajectory-signal covariance matrix, and calculates the matrix eigenvalues. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, it adds a random perturbation following a heavy-tailed probability distribution to the inertia weight factor until the matrix eigenvalue is greater than the convergence threshold, and then outputs the mass spectrum configuration parameters.
[0014] The present invention has the following beneficial effects:
[0015] (1) The mass spectrometry parameter configuration method based on scene feature perception achieves quantitative characterization of the complexity of mass spectrometry data stream by calculating the variance of the first derivative of the spectrum information entropy and the baseline noise, and can accurately distinguish the feature attributes of the detection scene from the data level. Combining the interpolation mapping of the feature peak region and the minimum convex hull space construction technology, the originally huge full parameter search space is reduced to a high-value restricted parameter search domain through mathematical and geometric means. This processing method effectively eliminates the interference of invalid parameter regions, greatly reduces the computational load of subsequent optimization algorithms, solves the problem of slow convergence speed and serious waste of computational resources in traditional methods when searching the entire domain, and realizes the accurate positioning of the parameter optimization space.
[0016] (2) The mass spectrometry parameter configuration system based on scene feature perception utilizes the numerical adjustment of the inertia weight factor of the optimization algorithm based on the tuning complexity feature, giving the algorithm the ability to adaptively adjust the search step size according to the data features, and realizing a dynamic balance between global exploration and local development. Furthermore, by constructing the trajectory-signal covariance matrix and calculating its eigenvalues, a real-time mathematical auditing mechanism for the stability of the optimization trajectory is established. Combined with a random perturbation strategy that follows a heavy-tailed probability distribution, it can force the algorithm to jump out of the local extreme value region when it gets stuck in a stagnation or saddle point. This mechanism solves the technical problem that existing single algorithms are prone to getting stuck in local optima and have poor robustness in complex and ever-changing data environments, and significantly improves the accuracy and stability of mass spectrometry parameter configuration.
[0017] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0018] Figure 1 This is a flowchart of the mass spectrometry parameter configuration method based on scene feature perception according to the present invention.
[0019] Figure 2 This is a flowchart of the mass spectrometry parameter configuration system based on scene feature perception according to the present invention. Detailed Implementation
[0020] This application's embodiments address the problem in existing mass spectrometry parameter configuration technologies that lack scene awareness and dynamic adjustment mechanisms, leading to low parameter optimization efficiency and a tendency to get trapped in local optima in complex data environments. This is achieved through a scene feature-aware mass spectrometry parameter configuration method and system.
[0021] The overall approach of the scheme in this application embodiment is as follows: the mass spectrometry parameter configuration process is constructed as a data-driven closed-loop control flow. First, the mass spectrometry pre-scan data stream is segmented by a sliding window and features are extracted. Information entropy and derivative variance are used to generate feature curves reflecting tuning complexity. Based on these curves, a convex hull algorithm is used to delineate an effective restricted search domain in the multi-dimensional parameter space, completing the initial reduction of the search space. Subsequently, multi-objective optimization is performed within the restricted domain. The inertia weight of the algorithm is dynamically adjusted in real time using tuning complexity, allowing the search behavior to adapt to environmental changes. Finally, the convergence state of the algorithm is monitored in real time by calculating the eigenvalues of the covariance matrix of the optimization trajectory and signal strength. Once computational stagnation is detected, a heavy-tailed random perturbation is immediately introduced to break the equilibrium, ensuring that the final output configuration parameters possess global optimality.
[0022] Please see Figure 1This invention provides a technical solution: a mass spectrometry parameter configuration method based on scene feature perception, comprising the following steps: S1. Acquiring a wide-domain parameter pre-scan data stream of the mass spectrometer under the condition of injecting standard tuned material, dividing the data stream by a sliding window of a set width, calculating the spectral information entropy value and the first derivative variance value of the baseline noise within the window, performing normalization fusion calculation on the spectral information entropy value and the first derivative variance value, and generating a tuning complexity feature curve of the mass-to-charge ratio distribution dimension; S2. Extracting the standard tuned material feature peak region in the tuning complexity feature curve where the curvature value exceeds a preset threshold, calling the historical tuning parameter database to perform interpolation mapping on the feature peak region, constructing a multidimensional parameter gradient response surface, calculating the extreme point coordinate distribution of each dimension on the gradient response surface, and constructing the expanded geometry. The spatial range serves as a restricted parameter search domain with a high probability of containing the optimal solution; S3. A multi-objective optimization algorithm is run within the restricted parameter search domain. In each iteration, the tuning complexity feature value corresponding to the current search coordinate is extracted. The tuning complexity feature value is substituted into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm. The search coordinate is updated according to the modified inertia weight factor to generate the parameter optimization trajectory; S4. The parameter coordinate changes and mass spectrum signal intensity changes of a preset number of continuous time steps in the parameter optimization trajectory are cached. The trajectory-signal covariance matrix is constructed and the matrix eigenvalues are calculated. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertia weight factor until the matrix eigenvalue is greater than the convergence threshold, and the mass spectrum configuration parameters are output.
[0023] In this implementation scheme, the main function is to establish a digital characteristic fingerprint of the mass spectrometry detection environment. This step first acquires the pre-scan data stream from the mass spectrometer, uses a sliding window technique to divide the continuous signal stream into local segments, and calculates the spectral entropy and the first derivative variance of the baseline noise within each segment. The spectral entropy characterizes the richness and disorder of ion components within the current window; a higher entropy value indicates greater component complexity. The first derivative variance of the baseline noise is a statistical measure of the signal's micro-oscillation frequency, reflecting the coarsening of high-frequency noise. By normalizing and fusing these two indicators, the system generates a tuning complexity characteristic curve that varies with the mass-to-charge ratio. The technical significance of this process lies in transforming the abstract physical detection environment into a mathematically quantifiable indicator that can be processed by a computer, allowing the algorithm to identify which mass-to-charge ratio ranges are more difficult to optimize, providing data support for subsequent targeted searches. The core of step S2 lies in achieving intelligent reduction of the parameter search space through geometric calculations. Based on the feature curves generated in the previous step, the system extracts regions where the curvature values exceed a threshold, i.e., feature peak regions with drastic data changes, and constructs a multi-dimensional parametric gradient response surface by combining it with historical databases. Here, the gradient response surface is a virtual mapping model based on historical experience data, used to predict the trend of parameter changes on signal quality; the minimum convex hull space is a computational geometry concept, referring to the region with the highest probability containing the minimum convex polygon or polyhedron. By constructing the minimum convex hull space as the restricted parameter search domain, this step can accurately extract high-value regions containing the optimal solution from the massive full parameter space, directly eliminating invalid search dead zones, thereby significantly reducing the computational load of subsequent optimization algorithms and greatly improving optimization efficiency. Step S3 is the core process of performing adaptive parameter optimization. Within the defined restricted parameter search domain, the system runs a multi-objective optimization algorithm and dynamically adjusts the inertia weight factor according to the tuning complexity feature value of the current position. The inertia weight factor is a key hyperparameter in the optimization algorithm, determining the algorithm's ability to maintain its current motion state. When the tuning complexity is high, the system automatically increases the inertia weight factor to enhance the algorithm's global exploration capability and prevent it from getting trapped in local traps; conversely, it decreases the factor to strengthen local fine-grained search. This mechanism empowers the algorithm to perceive the environment and adjust its strategy, solving the problem that traditional fixed-weight algorithms cannot simultaneously handle breadth and depth of search, ensuring optimal convergence within signal regions of varying complexity. Step S4 is primarily used for real-time auditing of the algorithm's state and deadlock escape. The system monitors the correlation between parameter changes and signal response by constructing a trajectory-signal covariance matrix and calculating its maximum eigenvalue. The covariance matrix eigenvalue serves as an indicator of search activity; if the eigenvalue is too small, it indicates that parameter changes have failed to elicit an effective signal response, and the algorithm may be trapped in a flat saddle point or a stagnant state.At this point, the system introduces a random perturbation that follows a heavy-tailed probability distribution. This distribution, characterized by its long tail, allows the algorithm to generate large-span jumps with a high probability. The technical role of this step is to establish a self-correcting mechanism that can forcibly break the equilibrium when conventional searches fail, driving the system out of local extrema and ensuring that the final output mass spectrometry configuration parameters are globally optimal.
[0024] Specifically, the process of acquiring the wide-domain parameter pre-scan data stream of the mass spectrometer under standard tuned material injection, dividing the data stream by a sliding window of a set width, and calculating the spectral information entropy and the first derivative variance of the baseline noise within the window is as follows: The pre-scan data stream intercepted by the sliding window is discretized at equal intervals to construct the mass-to-charge ratio-intensity data matrix corresponding to the window. The intensity values in the matrix are mapped to relative probability distribution vectors. Logarithmic summation is performed on the relative probability distribution vectors, and the discrete information entropy of this vector is calculated as the spectral information entropy value. Simultaneously, the intensity sequence in the data matrix is extracted, the first-order difference sequence of adjacent sampling points is calculated, the variance statistic of the first-order difference sequence is statistically analyzed, and the variance statistic is smoothed to separate the trend component. The remaining value after removing the trend component is determined as the first derivative variance of the baseline noise.
[0025] In this implementation scheme, the acquired pre-scan data stream is first processed by sliding window segmentation and equal-interval discretization. This step aims to convert the continuous time-based analog signal into a discrete digital sequence that can be processed by a computer. By constructing a mass-to-charge ratio-intensity data matrix, the system can process massive amounts of spectral data in parallel using matrix operations. Next, the spectral information entropy value within the window is calculated. The core of this step is to quantify the complexity of the material components within the current detection window. The system extracts the intensity data from the matrix and normalizes it into a relative probability distribution, which represents the probability of ions appearing at a specific mass-to-charge ratio. Here, the spectral information entropy value no longer simply represents component richness; in the tuning scenario, it is used to characterize the peak shape integrity and splitting degree of the standard tuning peak. The first derivative variance of the baseline noise is a statistical representation of instrument circuit noise and chemical background interference. By normalizing and fusing these two indicators, the system generates a tuning complexity characteristic curve. The physical meaning of this curve lies in quantifying the difficulty of tuning: that is, characterizing the unpredictability of the impact of multi-parameter adjustments on the response signal under the current instrument state. Higher complexity means a more drastic impact of parameter combinations on peak shape or a stronger coupling effect, making it difficult to achieve the optimal state directly through simple linear adjustment. Subsequently, the discrete information entropy is calculated using the Shannon entropy principle. This calculation measures the disorder of the signal distribution; a higher entropy value indicates more ion peaks and more complex composition within the window. The specific spectral information entropy value is calculated using the following formula. The meanings of the parameters in the formula are as follows: The spectral information entropy value calculated by the Kth sliding window; The total number of discrete sampling points contained within the sliding window; : The mass spectrum signal intensity value corresponding to the m-th sampling point in the k-th sliding window; The natural logarithm operator. The spectral information entropy value is used to characterize the peak shape integrity and splitting degree of the standard tuning peak. Mathematically, information entropy is negatively correlated with the resolution of the mass spectrometry peak; the sharper the peak shape and the narrower the half-width (FWHM) (i.e., the higher the resolution), the lower the discrete information entropy value; conversely, peak broadening or splitting leads to an increase in entropy. Therefore, the optimization algorithm aims to minimize tuning complexity, which essentially means monitoring and optimizing the system's resolution in real time. Simultaneously, the first derivative variance of the baseline noise is calculated. This step aims to separate the effective ion signal from the low-frequency baseline drift, solely evaluating the oscillation intensity of the high-frequency electronic noise. The system first performs a first-order difference operation on the intensity sequence. The difference operation effectively eliminates the DC component and linear trend term in the signal. Then, the variance of the difference sequence is calculated, and a smoothing process is introduced to remove residual trend term components. The larger this value, the coarser the baseline, and the stronger the masking effect on trace signals. The specific first derivative variance of the baseline noise is calculated using the following formula: The meanings of the parameters in the formula are as follows: The first derivative variance of the baseline noise calculated by the k-th sliding window; The first-order difference of the intensities of adjacent sampling points in the k-th sliding window is calculated by subtracting the intensity of the previous sampling point from the intensity of the next sampling point. The arithmetic mean of all first-order differences within the k-th sliding window, used to represent the central tendency of the difference sequence; The smoothing correction coefficient is used to eliminate the influence of low-frequency trend terms on high-frequency noise statistics. This coefficient is determined through statistical analysis of historical pure blank solvent noise data and is typically between 0.8 and 0.95. Baseline noise extraction can be performed using the Savitzky-Golay filtering fitting method. For example, a window of preset width (e.g., 50-100 points) and a low-order polynomial (e.g., second-order) are selected to fit the pre-scan data stream to obtain the baseline component. After subtracting the baseline component from the original signal, the first-order difference variance of the remaining residual sequence is calculated, thereby accurately separating chemical noise from instrument drift.
[0026] Specifically, the process of performing normalization and fusion calculation on the spectral information entropy values and first derivative variance values to generate the tuning complexity feature curve of the mass-to-charge ratio distribution dimension is as follows: traverse the spectral information entropy values and first derivative variance values across the entire mass-to-charge ratio range, calculate the global mean and standard deviation, perform mean removal and variance scaling to map the values to the same dimension interval, and generate standard entropy and standard variance sequences; construct a linear weighted fusion operator with weights, perform weighted summation on the standard entropy and standard variance sequences corresponding to the same sliding window to generate comprehensive complexity feature values, and connect the comprehensive complexity feature values into discrete time series curves according to the time step order of the sliding window to generate the tuning complexity feature curve.
[0027] In this implementation scheme, after obtaining the entropy and variance values of each window, the system enters the feature normalization fusion stage. Since the spectral information entropy value is usually a small logarithmic value, while the first derivative variance value can be of a large order of magnitude due to differences in signal strength, direct calculation would cause large numerical features to mask small numerical features. Therefore, the system first traverses the entire mass-to-charge ratio range, calculates the global mean and standard deviation, and performs mean-reduction and variance scaling, i.e., Z-score standardization. This step maps data with different physical dimensions to the same distribution interval, eliminating the interference of dimensional differences on subsequent fusion calculations. Subsequently, the system constructs a linear weighted fusion operator to perform a weighted summation of the standardized sequences. This process essentially seeks a balance between "component complexity" and "noise interference" based on actual application requirements, generating a single index that comprehensively reflects the processing difficulty of the current detection scenario. The specific comprehensive complexity feature value is calculated using the following formula: The meanings of the parameters in the formula are as follows: The overall complexity feature value corresponding to the kth sliding window; The global arithmetic mean of the information entropy values of all spectra within the full mass-to-charge ratio range; The global standard deviation of the information entropy values of all spectra across the entire mass-to-charge ratio range; The global arithmetic mean of the variances of the first derivatives of all baseline noises within the full mass-to-charge ratio range; The global standard deviation of the variance of the first derivative of all baseline noise values across the full mass-to-charge ratio range; The weighting coefficients of the information entropy feature are used to adjust the contribution of component richness to tuning complexity. The weighting coefficients of the noise variance feature are used to adjust the contribution of noise interference to the tuning complexity. Finally, the system sequentially connects the calculated comprehensive complexity feature values according to the time step order of the sliding window. This process reconstructs discrete feature points into a discrete time series curve with a continuous mass-to-charge ratio distribution dimension, i.e., the tuning complexity feature curve. This curve can intuitively show the detection environment status of the mass spectrometer in different mass-to-charge ratio ranges, providing direct data input for subsequent adaptive parameter adjustment.
[0028] Specifically, the process of extracting the standard tuned material characteristic peak region with curvature values exceeding a preset threshold from the tuning complexity characteristic curve, and performing interpolation mapping on the characteristic peak region by calling the historical tuning parameter database to construct the multidimensional parameter gradient response surface is as follows: Calculate the second-order difference values of adjacent data points in the tuning complexity characteristic curve, and mark the continuous data segments with absolute values of second-order difference values greater than the inflection point threshold as feature mutation intervals; extract the central mass-to-charge ratio and average complexity amplitude of the feature mutation intervals to construct index feature vectors, perform vector similarity matching in the historical tuning parameter database, obtain the historical sample set with the closest Euclidean distance to the index feature vector, perform nonlinear spatial interpolation operation based on distance weight on the historical sample set, and reconstruct the multidimensional parameter gradient response surface.
[0029] In this implementation scheme, specifically, to accurately capture key changing features in the mass spectrometry detection environment, the core of step S2 lies in using prior knowledge to guide feature extraction. The system first defines the theoretical existence window of the target feature peak based on the theoretical mass-to-charge ratio of the standard tuned material (e.g., m / z 59, m / z 175, m / z 500, m / z 616, m / z 906), and forcibly extracts data fragments within this window. Simultaneously, the resolution value of the target feature peak within this window is calculated using the full width at half maximum (FWHM) method. This resolution value will serve as a key indicator for subsequent evaluation of the tuning state; only when the resolution value falls within a preset acceptable range will the system further evaluate its peak shape complexity. Subsequently, the curvature and complexity of the data within this window are calculated. Here, curvature exceeding a threshold is used to identify whether the peak shape has been distorted at the theoretical position (e.g., peak collapse, bifurcation). For chemical background interference (i.e., signals with high response but not the target peak), the system employs a theoretical position matching method for elimination: since the ion peak positions of the standard tuning material are known, any high-response signal not falling within the theoretical mass-to-charge ratio window, even if its peak shape exhibits a standard normal distribution, is still identified as chemical noise or background interference and eliminated by the system, thus ensuring that parameter optimization is performed only for the true target characteristic peak. Subsequently, for the extracted characteristic abrupt change intervals, the system constructs an index feature vector and performs database matching. This process aims to utilize historical experience data to guide current parameter configuration, and the historical tuning parameter database has an online self-learning mechanism. Its initialization process is as follows: during the instrument's factory or calibration stage, the standard tuning material is injected, and a gridded scan is performed in the full parameter space, recording the peak shape characteristics and response scores under different parameter combinations to form an initial sample set. In subsequent use, whenever the system completes a successful parameter configuration and the mass spectrometry signal intensity and resolution meet the preset standards, it automatically extracts the current characteristic peak region feature vector and the final configuration parameters, updating the historical tuning parameter database as a new sample entry to adapt to performance changes throughout the instrument's lifecycle. The system extracts the central mass-to-charge ratio position of the mutation interval and the average complexity magnitude of that interval, forming a two-dimensional index feature vector. This vector is then used to perform an Euclidean distance search in the historical tuning parameter database to find the most similar historical records for the detection scene. After obtaining a set of similar historical samples, the core step is to construct a multidimensional parameter gradient response surface. This step uses nonlinear spatial interpolation to reconstruct discrete historical parameter-signal point pairs into a continuous function surface, thereby predicting the signal quality that different combinations of mass spectrometry parameters may produce in the current scene. This interpolation operation uses distance weighting logic to give greater influence to historical samples closer to the current query vector. The specific values of the multidimensional parameter gradient response surface are calculated using the following formula: The meanings of the parameters in the formula are as follows: The multidimensional parameter gradient response surface represents the predicted signal response value at any coordinate vector x of the parameter to be detected; N represents the total number of similar historical samples retrieved. represents the mass spectrometry signal quality score of the nth historical sample record, which is obtained by normalizing the signal-to-noise ratio and resolution of historical detections; x represents the coordinate vector of the multidimensional parameters of the mass spectrometer to be predicted, including dimensions such as ion source voltage and lens potential. This represents the coordinate vector of the mass spectrometer parameters used when recording the nth historical sample. This represents the coordinate vector of the mass spectrometer parameters used when recording the j-th historical sample. The kernel width parameter, representing the radial basis function, controls the local extent of the influence of a single historical sample on the response surface. This parameter is determined by cross-validation and is 0.5 to 1.5 times the average distance between all historical samples.
[0030] Specifically, the process of calculating the distribution of extreme point coordinates in each dimension of the gradient response surface and constructing the expanded geometric space as a restricted parameter search domain with a high probability of containing the optimal solution is as follows: Perform a gridded gradient scan on the multidimensional parameter gradient response surface to identify the set of stationary point coordinates with a gradient vector magnitude of zero on the response surface. Filter out local maxima by analyzing the numerical monotonicity of the stationary point neighborhood. Construct a minimal convex polyhedron that can geometrically enclose the local maxima. With the geometric center of the minimal convex polyhedron as the origin, perform an isotropic expansion operation on the polyhedron boundary according to the expansion coefficient, and lock the expanded geometric space as the restricted parameter search domain.
[0031] In this implementation scheme, after constructing the multidimensional parameter gradient response surface, the system needs to further determine the effective range of parameter optimization, i.e., the constrained parameter search domain. First, a gridded gradient scan and stationary point identification are performed. This step utilizes computer numerical analysis methods to perform high-density grid sampling on the virtual response surface and calculate the magnitude of the gradient vector at each grid point. The gradient vector indicates the direction of the fastest increase in function value, and the point with a gradient magnitude of zero is a stationary point, typically corresponding to a peak, valley, or saddle point of the response surface. The system identifies all stationary points and, by analyzing the numerical monotonicity of the stationary point's neighborhood—that is, checking whether the function values within a small range around the stationary point are all less than the stationary point value—it filters out local maxima representing locally optimal parameter combinations. Next, to define a geometric space containing all potential optimal solutions with minimal computational cost, the system performs minimum convex hull space construction. Using a fast convex hull algorithm, a minimum convex polyhedron that geometrically encloses all selected local maxima is constructed. This convex polyhedron compactly encloses all high-value parameter regions. Finally, considering the prediction errors in the interpolation model and to prevent missing better solutions near the boundary, the system performs an isotropic expansion operation with the geometric center of the minimum convex polyhedron as the origin. This step pushes the boundary of the convex polyhedron outward according to a preset expansion coefficient, thereby forming a restricted parameter search domain with a safety buffer. The specific vertex coordinates of the boundary of the restricted parameter search domain are calculated using the following formula: The meanings of the parameters in the formula are as follows: The coordinate vector of the kth vertex in the constrained parameter search domain generated after the expansion operation; The geometric center coordinate vector of the minimum convex polyhedron is obtained by calculating the arithmetic mean of the coordinates of all local maxima. : The coordinate vector of the kth vertex of the original minimal convex polyhedron; The preset expansion coefficient defines the proportion of the search domain's boundary expansion. This coefficient determines the size of the buffer region, typically set between 0.1 and 0.3, representing an outward expansion of 10% to 30% of the space to ensure the algorithm has sufficient leeway to explore potential global optima. Through these steps, the system reduces the originally infinite or enormous full parameter space to a compact geometric region, significantly reducing the computational load of the optimization algorithm and ensuring the search process focuses on the parameter range most likely to produce the best detection results. By constructing a minimum convex hull space and expanding it, this geometric space is locked into a restricted parameter search domain with a high probability of containing the optimal solution. This description acknowledges the probabilistic nature of the optimal solution's location and significantly increases the likelihood of covering the global optimum through the expansion operation (expansion coefficient).
[0032] Specifically, the process of step S3 is as follows: Initialize multiple sets of probe parameter vectors within the restricted parameter search domain, define a nonlinear mapping function based on tuning complexity and a convergence state correction factor, input the extracted tuning complexity feature values into the mapping function, and output the corresponding dynamic inertia weight factor. The execution logic of the mapping function is as follows: compare the tuning complexity feature values with a preset complexity threshold. If the tuning complexity feature values are greater than the preset complexity threshold, output the inertia weight factor whose value is within the first preset interval. At the same time, monitor the convergence state of the algorithm in real time. If it is detected that the change amplitude of the global optimal solution within a preset number of iterations is less than the preset oscillation judgment threshold, call the convergence state correction factor with a value less than 1 to perform a multiplicative decay operation on the current inertia weight factor.
[0033] In this implementation scheme, after determining the restricted parameter search domain, the system enters the core parameter optimization stage. First, the system initializes multiple sets of probe parameter vectors within the restricted parameter search domain. These probe parameter vectors are digital mappings of the mass spectrometer's multidimensional physical parameters (such as voltage, frequency, and temperature) in the computer algorithm, with each set of vectors representing a potential parameter configuration scheme. The initialization process typically employs uniform distribution strategies such as Latin hypercube sampling to ensure good initial coverage of the probes within the search domain. During multi-objective optimization, the algorithm uses a weighted evaluation strategy to balance the responses of multiple characteristic peaks. Specifically, the system locks the positions of multiple theoretical characteristic peaks of the standard tuned material, calculates the local complexity values of each characteristic peak region, and assigns preset weights based on the sensitivity requirements of different mass-to-charge ratio ranges. A global tuning complexity characteristic value is generated through weighted summation. This global value serves as the input to the fitness function of the optimization algorithm, ensuring that the final output configuration parameters can take into account the comprehensive performance of high, medium, and low mass characteristic peaks, achieving a trade-off between multi-parameter responses and overall optimization. Subsequently, the system performs a crucial adaptive control operation, namely defining a nonlinear mapping function based on tuning complexity and calculating a dynamic inertia weight factor. The inertia weight factor is a core control variable in multi-objective optimization algorithms (such as particle swarm optimization), determining the probe's ability to maintain its previous motion state. This embodiment constructs a monotonically increasing nonlinear function, mapping the tuning complexity feature values extracted in the preceding steps to weight factors. Its physical meaning is as follows: when the tuning complexity is high (large feature value), it indicates a complex detection environment with significant noise or interference. In this case, a larger weight factor is output, giving the probe greater kinetic energy and enabling it to perform a wide-range global search to escape complex local traps. When the tuning complexity is low (small feature value), it indicates a simple environment. In this case, a smaller weight factor is output, causing the probe to decelerate rapidly and focus on a local region for refined convergence. Based on the above monotonically increasing logic, a convergence state correction factor is introduced. The specific logic is as follows: The system monitors the convergence status of the algorithm in real time. When it detects that although the tuning complexity is high (which should output large inertia), the change amplitude of the global optimal solution within a preset number of iterations is less than the oscillation judgment threshold (i.e., the algorithm repeatedly jumps around a high-value region but fails to converge), the system forcibly calls a convergence state correction factor less than 1 to perform a multiplicative decay operation on the current inertia weight. This ensures that the probe can stably stay at the optimal parameter coordinate point in the high-complexity environment, avoiding flying past the global optimal solution due to excessive kinetic energy. The specific dynamic inertia weight factor is calculated using the following formula: The meanings of the parameters in the formula are as follows: : The dynamic inertia weight factor obtained from the t-th iteration; The preset lower limit of the weight factor is usually between 0.4 and 0.6, which is used to ensure the minimum search capability of the algorithm during the convergence phase. The preset upper limit of the weight factor, usually between 0.9 and 1.2, is used to limit the maximum impulse of the algorithm during the exploration phase. An exponential function with the natural constant e as its base; : The real-time tuning complexity feature value corresponding to the current probe location; The slope adjustment coefficient of the nonlinear mapping function is used to control the sensitivity of the weights to changes in complexity; The complexity threshold offset is used to set the central inflection point position for rapid weight changes. After determining the current weight factor, the system constructs a vector iteration equation containing velocity and position terms to update the probe state. This is a vector operation process where the system calculates the displacement update vector (i.e., velocity vector) for the next moment, which consists of three parts: the inertial component from the previous moment, the cognitive component pointing to the individual's historical optimal solution, and the social component pointing to the global optimal solution. The dynamic inertial weight factor directly affects the historical component of the velocity term, thereby dynamically adjusting the probe's flight trajectory. The specific vector iteration equation is calculated using the following formula: ; The meanings of the parameters in the formula are as follows: : The displacement update vector of the i-th probe at the next time t+1, i.e., the velocity vector; : The historical component of the velocity term of the i-th probe at the current time t; The new probe parameter vector generated by the i-th probe at the next time t+1, i.e., the updated position coordinates; The search coordinate vector of the i-th probe at the current time t; The cognitive learning factor is used to adjust the weight of the probe as it moves closer to its historical best position. The first random number in the interval [0,1] is used to increase the randomness of individual searches; The optimal coordinate vector of the individual found by the i-th probe up to the current time. Social learning factor, used to adjust the weight of the probe to approach the global optimal position of the group; The second random number within the interval [0,1] is used to increase the randomness of group collaboration; This represents the globally optimal coordinate vector found by the entire probe swarm up to the current moment. Through the iterative calculations described above, the system continuously generates new probe positions and records the coordinate sequences generated in each iteration, forming a parameter optimization trajectory. This trajectory data not only records the final result but also includes the algorithm's convergence path information, providing a direct data source for trajectory stability auditing in subsequent steps.
[0034] Specifically, the process of constructing the trajectory-signal covariance matrix and calculating the matrix eigenvalues by storing the parameter coordinate changes and mass spectrum signal intensity changes of a preset number of consecutive time steps in the cache parameter optimization trajectory is as follows: A first-in-first-out circular data buffer is established, storing the parameter coordinate vectors of the most recent consecutive time steps and the corresponding mass spectrum signal intensity scalars. A difference operation is performed on the data in the buffer to obtain the parameter change vector sequence and the signal intensity change scalar sequence. The expectation of the outer product of the parameter change vector and the signal intensity change scalar is calculated to construct the cross-covariance matrix. An orthogonal transformation decomposition is performed on the cross-covariance matrix, and the largest element in the resulting diagonal matrix is extracted as the largest eigenvalue of the matrix.
[0035] In this implementation scheme, specifically, to quantify the search activity and signal sensitivity of the multi-objective optimization algorithm at the current stage in real time, the system first performs data caching and differential preprocessing. A first-in-first-out (FIFO) circular data buffer is established, which acts as a finite-length sliding storage structure, storing the parameter coordinate vectors and corresponding mass spectrometry signal intensity scalars of the most recent consecutive time steps in real time. As new data is written, the oldest data is automatically removed, ensuring the system always analyzes the latest trends. Next, the system performs differential operations on the data in the buffer. The purpose of this step is to eliminate the numerical influence of the absolute position of the parameters and the absolute intensity of the signal, focusing instead on the "changes". By calculating the vector difference and scalar difference between adjacent time steps, the sequence of parameter change vectors and the sequence of signal intensity change scalars are obtained. Subsequently, the core step is to construct the cross-covariance matrix and calculate its eigenvalues. The system calculates the expected value of the outer product of the parameter change vector and the signal intensity change scalar, constructing the cross-covariance matrix. Mathematically, this matrix describes the degree of linear correlation between the parameter adjustment magnitudes in various dimensions of the mass spectrometer and the final signal response changes. If the matrix elements are small, it indicates that significant parameter adjustments have failed to produce a significant change in the signal, meaning the parameter-signal sensitivity is reduced. To extract the key features of this matrix, the system performs orthogonal transformation decomposition, such as singular value decomposition or eigenvalue decomposition, transforming complex matrix operations into a diagonal matrix form. The largest element in the diagonal matrix is extracted as the matrix's maximum eigenvalue, which is the core indicator for measuring the signal response gradient along the current search direction. The specific maximum eigenvalue is calculated using the following formula: ; The meanings of the parameters in the formula are as follows: The trajectory-signal cross-covariance matrix is constructed. This matrix is a square matrix with dimensions consistent with the dimensions of the mass spectrometer parameters to be optimized. The preset length of the first-in-first-out circular data buffer is used to define the size of the time window for covariance calculation; The parameter change vector corresponding to the Kth time step in the buffer is obtained by subtracting the coordinate of the previous time step from the coordinate of the current time step. The scalar value representing the change in mass spectrum signal intensity at the k-th time step in the buffer; The vector outer product operator is used to generate a matrix with a rank of 1. The calculated maximum eigenvalue of the matrix is used to quantify the maximum signal sensitivity in the current search state; eig: eigenvalue decomposition operator, used to extract all eigenvalues of the square matrix; Maximum value extraction function.
[0036] Specifically, when the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal strength has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertial weighting factor until the matrix eigenvalue is greater than the convergence threshold. The specific process for outputting the final mass spectrometry configuration parameters is as follows: When it is determined that the stagnation state has been entered, a random step size value following a power-law decay distribution is generated; the random step size value is superimposed as an additive perturbation term on the current inertial weighting factor to change the magnitude of the velocity term in the vector iteration equation, driving the probe parameter vector to jump out of the local extreme value region, and recalculating the eigenvalue of the cross-covariance matrix in the next iteration; the loop monitoring logic is executed, and when the recalculated maximum eigenvalue of the matrix recovers to above the convergence threshold and the moving average of the mass spectrometry signal strength meets the standard, the iteration loop is terminated, and the probe parameter vector at the current moment is locked as the final mass spectrometry configuration parameters.
[0037] In this implementation scheme, specifically, after obtaining the largest eigenvalue of the matrix, the system enters the logic judgment and feedback adjustment stage. When the largest eigenvalue of the matrix is less than a preset stagnation threshold, and the current mass spectrometry signal intensity has not reached the expected target value, the system determines that the algorithm has entered a stagnation state or is trapped in a local parameter saddle point. The stagnation threshold is determined based on the lower quartile of the covariance matrix eigenvalues of historical successful tuning trajectories. This means that fine-tuning the parameters at this point can no longer improve the signal, and the algorithm's search step size gradually approaches zero due to convergence. To break this deadlock, the system executes a random perturbation strategy based on a heavy-tailed probability distribution. First, a random step size value following a power-law decaying distribution is generated. Unlike the conventional Gaussian distribution (normal distribution), the power-law decaying distribution (such as the Levy distribution) has a heavy-tailed characteristic, meaning that it still maintains a non-negligible probability density in regions far from the central value. This allows the algorithm to generate mutation values much larger than the conventional step size with a high probability, simulating the long-distance flight behavior of organisms during foraging. Subsequently, the generated random step size value is added as an additive perturbation term to the current inertial weight factor. A sudden change in the inertia weighting factor directly alters the magnitude of the velocity term in the vector iteration equation, thus imparting significant kinetic energy to the probe and forcing the probe parameter vector out of its current local extremum or flat region. In the next iteration, the system recalculates the eigenvalues of the cross-covariance matrix based on the new position to verify whether search activity has been restored. Finally, the system executes a loop monitoring logic. Only when the recalculated maximum eigenvalue of the matrix recovers above the convergence threshold, indicating that the parameter adjustment has regained signal sensitivity (the convergence threshold is based on the rate of change of signal intensity corresponding to the instrument design specifications (e.g., mass axis deviation <0.1 Da), and the moving average of the mass spectrometry signal intensity meets a preset standard, does the iteration loop terminate, and the probe parameter vector at the current moment is locked as the final mass spectrometry configuration parameters. The specific heavy-tailed distribution random step size is calculated using the following formula: The meanings of the parameters in the formula are as follows: : The generated random step size value that follows a heavy-tailed probability distribution; u: A random variable that follows a normal distribution, whose standard deviation is calculated by the gamma function and is used to control the distribution shape of the step size; Random variables that follow a standard normal distribution; The power law exponent parameter is used to adjust the degree of tailing of the heavy-tailed distribution. It is usually taken between 1.0 and 2.0. The smaller the value, the higher the probability of generating a maximum step size. The base step size scaling factor is used to map dimensionless random numbers to the numerical range of the inertia weight factor. This factor is determined by analyzing the fluctuation range of historical weight factors and is typically set to 10% to 50% of the weight factor variation range. Through the above mechanism, this scheme uses mathematical methods to simulate nonlocal search behavior, effectively solving the problem that traditional algorithms are prone to getting trapped in local optima on complex parameter surfaces of mass spectrometry, and ensuring the robustness of the final configuration parameters.
[0038] Please see Figure 2 A scene-feature-aware mass spectrometry parameter configuration system includes the following modules: a feature generation module, used to acquire a wide-domain parameter pre-scan data stream of the mass spectrometer under standard tuned material injection conditions; it segments the data stream through a sliding window of a set width, calculates the spectral entropy value and the first derivative variance of the baseline noise within the window, performs normalization and fusion calculation on the spectral entropy value and the first derivative variance value, and generates a tuning complexity feature curve in the mass-to-charge ratio distribution dimension; and a spatial reduction module, used to extract the standard tuned material feature peak regions in the tuning complexity feature curve where the curvature value exceeds a preset threshold, calls the historical tuning parameter database to perform interpolation mapping on the feature peak regions, constructs a multi-dimensional parameter gradient response surface, calculates the extreme point coordinate distribution of each dimension on the gradient response surface, and constructs the expanded geometric space range as a high-probability... The system includes a constrained parameter search domain containing the optimal solution; a parameter optimization module, which runs a multi-objective optimization algorithm within the constrained parameter search domain. In each iteration, it extracts the tuning complexity feature value corresponding to the current search coordinates, substitutes this value into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm, updates the search coordinates based on the modified inertia weight factor, and generates the parameter optimization trajectory; and a feedback adjustment module, which caches the parameter coordinate changes and mass spectrum signal intensity changes for a preset number of consecutive time steps in the parameter optimization trajectory, constructs the trajectory-signal covariance matrix, and calculates the matrix eigenvalues. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, it adds a random perturbation following a heavy-tailed probability distribution to the inertia weight factor until the matrix eigenvalue is greater than the convergence threshold, and then outputs the mass spectrum configuration parameters.
[0039] In this implementation scheme, the feature generation module, as the data sensing front end of the system, is primarily responsible for the digital feature extraction of mass spectrometry signals. This module discretizes the continuous pre-scan data stream using a sliding window mechanism, and calculates in parallel the spectral information entropy reflecting component richness and the first-order derivative variance reflecting noise oscillations. Through normalization fusion processing, this module transforms heterogeneous physical signals into a unified tuning complexity feature curve, providing a quantitative basis for the complexity of the detection environment for subsequent parameter space planning, thus realizing the mapping from physical signals to digital features. The spatial reduction module is the core computational unit of the system, responsible for the intelligent compression and positioning of the parameter search space. This module identifies key feature peak regions based on the curvature of the feature curve and reconstructs the multidimensional parameter gradient response surface using a historical database, thereby predicting the trend of parameter influence on signal quality. Based on this, the module calculates the distribution of gradient extrema and constructs a minimum convex hull space, accurately locking the originally vast full parameter space into a high-value restricted parameter search domain, effectively eliminating invalid search regions and significantly reducing the computational load of subsequent optimization algorithms. The parameter optimization module primarily performs adaptive path search tasks, running a multi-objective optimization algorithm within a defined, constrained parameter search domain. This module features a dynamic adjustment mechanism that reads the tuning complexity characteristic values at the current coordinates in real time and modifies the algorithm's inertia weight factor accordingly. Through this mechanism, the module automatically enhances global exploration capabilities in complex regions and strengthens local convergence accuracy in simple regions, ensuring that the generated parameter optimization trajectory can flexibly adapt to changing detection environments and achieve a dynamic balance between optimization efficiency and accuracy. The feedback adjustment module, acting as the system's monitoring and error correction terminal, is responsible for ensuring the algorithm's robustness. This module caches and analyzes changes in parameter coordinates and signal intensity to construct a trajectory-signal covariance matrix to audit the sensitivity of the search process. When the maximum eigenvalue of the matrix is detected to be below a threshold and the target has not been reached, the algorithm is deemed to have stalled. A random perturbation following a heavy-tailed probability distribution is immediately added to the inertia weight factor, forcing the system to escape local extreme regions until search activity is restored and the final mass spectrometry configuration parameters are output.
[0040] In summary, this application has at least the following effects: The mass spectrometry parameter configuration method and system based on scene feature perception achieves quantitative perception of the tuning complexity of mass spectrometry detection by constructing a fusion feature curve of spectral information entropy and baseline noise variance. Based on this, a limited search domain is constructed using the minimum convex hull space algorithm, effectively eliminating invalid parameter intervals and significantly reducing the computational load of optimization. At the same time, the inertia weight factor of the optimization algorithm is dynamically adjusted in combination with scene features, and a stagnation monitoring and heavy-tailed distribution perturbation mechanism based on the trajectory-signal covariance matrix is established. While ensuring the convergence speed of the algorithm, it gives the system the adaptive ability to automatically jump out of local extreme regions and parameter saddle points. This effectively solves the technical problems of low optimization efficiency, easy getting trapped in local optima, and poor robustness of traditional single algorithms in complex biological matrices or dynamic non-steady-state detection environments, realizing intelligent and high-precision closed-loop control of mass spectrometer parameter configuration.
[0041] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0042] This invention is described with reference to flowchart illustrations and / or block diagrams of systems, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0043] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0044] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0045] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0046] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for configuring mass spectrometry parameters based on scene feature perception, characterized in that, Includes the following steps: S1. Obtain the wide-domain parameter pre-scan data stream of the mass spectrometer under the state of injection of standard tuned material, divide the data stream by a sliding window of set width, calculate the spectral information entropy value and the first derivative variance value of the baseline noise within the window, perform normalization fusion calculation on the spectral information entropy value and the first derivative variance value, and generate the tuning complexity feature curve of the mass-to-charge ratio distribution dimension. S2. Extract the standard tuning material characteristic peak region in the tuning complexity characteristic curve where the curvature value exceeds the preset threshold, call the historical tuning parameter database to perform interpolation mapping on the characteristic peak region, construct a multi-dimensional parameter gradient response surface, calculate the extreme point coordinate distribution of each dimension on the gradient response surface, and construct the expanded geometric space range as a restricted parameter search domain with a high probability of containing the optimal solution. S3. Run a multi-objective optimization algorithm within the restricted parameter search domain. In each iteration, extract the tuning complexity feature value corresponding to the current search coordinates, substitute the tuning complexity feature value into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm, update the search coordinates according to the modified inertia weight factor, and generate the parameter optimization trajectory. S4. Cache the parameter coordinate changes and mass spectrum signal intensity changes of a preset number of continuous time steps in the parameter optimization trajectory, construct the trajectory-signal covariance matrix and calculate the matrix eigenvalues. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, add random perturbation quantities that follow a heavy-tailed probability distribution to the inertial weight factor until the matrix eigenvalue is greater than the convergence threshold, and output the mass spectrum configuration parameters.
2. The mass spectrometry parameter configuration method based on scene feature perception according to claim 1, characterized in that, The specific process for acquiring the wide-domain parameter pre-scan data stream of the mass spectrometer under standard tuned material injection conditions, dividing the data stream by a sliding window of a set width, and calculating the spectral entropy value and the first derivative variance of the baseline noise within the window is as follows: The pre-scan data stream captured by the sliding window is discretized at equal intervals to construct the mass-to-charge ratio-intensity data matrix corresponding to the window. The intensity values in the matrix are mapped to relative probability distribution vectors. Logarithmic summation is performed on the relative probability distribution vectors, and the discrete information entropy of the vector is calculated as the spectral information entropy value. The intensity sequence in the data matrix is extracted synchronously, the first-order difference sequence of adjacent sampling points is calculated, the variance statistic of the first-order difference sequence is calculated, the variance statistic is smoothed to separate the trend component, and the remaining value after removing the trend component is determined as the first derivative variance value of the baseline noise.
3. The mass spectrometry parameter configuration method based on scene feature perception according to claim 2, characterized in that, The specific process of performing normalized fusion calculations on the spectral information entropy value and the first derivative variance value to generate the tuning complexity feature curve of the mass-to-charge ratio distribution dimension is as follows: Traverse the spectral information entropy values and first derivative variance values within the full mass-to-charge ratio range, calculate the global mean and standard deviation, perform mean removal and variance scaling processing, map the values to the same dimension interval, and generate standard entropy and standard variance sequences. A linear weighted fusion operator with weights is constructed. The weighted summation operation is performed on the standard entropy sequence values and standard variance sequence values corresponding to the same sliding window to generate comprehensive complexity feature values. The comprehensive complexity feature values are connected into discrete time series curves according to the time step order of the sliding window to generate the tuning complexity feature curve.
4. The mass spectrometry parameter configuration method based on scene feature perception according to claim 1, characterized in that, The specific process of extracting the standard tuned material characteristic peak region with curvature values exceeding a preset threshold from the tuning complexity characteristic curve, and then performing interpolation mapping on the characteristic peak region by calling the historical tuning parameter database to construct a multidimensional parametric gradient response surface is as follows: Calculate the second-order difference values of adjacent data points in the tuning complexity characteristic curve, and mark the continuous data segments where the absolute value of the second-order difference value is greater than the inflection point threshold as the feature mutation interval. The central mass-to-charge ratio and average complexity magnitude of the feature mutation interval are extracted to construct an index feature vector. Vector similarity matching is performed in the historical tuning parameter database to obtain the historical sample set that is closest to the index feature vector in Euclidean distance. Nonlinear spatial interpolation based on distance weight is performed on the historical sample set to reconstruct the multidimensional parameter gradient response surface.
5. The mass spectrometry parameter configuration method based on scene feature perception according to claim 4, characterized in that, The specific process of calculating the distribution of extreme point coordinates in each dimension of the gradient response surface and constructing the expanded geometric space as a restricted parameter search domain with high probability of containing the optimal solution is as follows: A gridded gradient scan is performed on the multidimensional parametric gradient response surface to identify the set of stationary point coordinates on the response surface where the gradient vector magnitude is zero. Local maxima are then selected by analyzing the numerical monotonicity of the stationary point neighborhood. Construct a minimal convex polyhedron that can geometrically enclose the local maxima. Using the geometric center of the minimal convex polyhedron as the origin, perform an isotropic expansion operation on the polyhedron boundary according to the expansion coefficient, and lock the geometric space range formed after expansion as the restricted parameter search domain.
6. The mass spectrometry parameter configuration method based on scene feature perception according to claim 1, characterized in that, The specific process of step S3 is as follows: Multiple probe parameter vectors are initialized within the restricted parameter search domain. A nonlinear mapping function based on tuning complexity and a convergence state correction factor are defined. The extracted tuning complexity feature values are input into the mapping function, and the corresponding dynamic inertia weight factor is output. The execution logic of the mapping function is as follows: the tuning complexity feature values are compared with a preset complexity threshold. If the tuning complexity feature values are greater than the preset complexity threshold, the inertia weight factor with values within the first preset interval is output. At the same time, the convergence state of the algorithm is monitored in real time. If the change amplitude of the global optimal solution within a preset number of iterations is less than the preset oscillation judgment threshold, the convergence state correction factor with a value less than 1 is called to perform a multiplicative decay operation on the current inertia weight factor. A vector iterative equation containing velocity and position terms is constructed. The dynamic inertia weight factor is applied to the historical component of the velocity term. The displacement update vector at the next moment is calculated by combining the difference vector between the current search coordinates and the global optimal coordinates. The displacement update vector is superimposed on the current search coordinates to generate a new probe parameter vector. The coordinate sequence of each iteration is recorded as the parameter optimization trajectory.
7. The mass spectrometry parameter configuration method based on scene feature perception according to claim 1, characterized in that, The specific process of constructing the trajectory-signal covariance matrix and calculating the matrix eigenvalues based on the parameter coordinate changes and mass spectrum signal intensity changes at a preset number of consecutive time steps in the cache parameter optimization trajectory is as follows: Establish a first-in-first-out circular data buffer, store the parameter coordinate vector of the most recent continuous time step and the corresponding mass spectrum signal intensity scalar, perform differential operation on the data in the buffer to obtain the parameter change vector sequence and the signal intensity change scalar sequence; Calculate the expectation of the cross product between the parameter change vector and the signal intensity change scalar, construct the cross covariance matrix, perform orthogonal transformation decomposition on the cross covariance matrix, and extract the largest element in the resulting diagonal matrix as the largest eigenvalue of the matrix.
8. The mass spectrometry parameter configuration method based on scene feature perception according to claim 7, characterized in that, When the largest eigenvalue of the matrix is less than the stagnation threshold and the current signal strength has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertial weighting factor until the matrix eigenvalue is greater than the convergence threshold. The specific process for outputting the final mass spectrometry configuration parameters is as follows: When it is determined that the state has entered a stagnant state, a random step size value that follows a power-law decaying distribution is generated. The random step size value is added as an additive perturbation term to the current inertia weight factor, which changes the magnitude of the velocity term in the vector iteration equation, drives the probe parameter vector to jump out of the local extreme value region, and recalculates the eigenvalues of the cross-covariance matrix in the next iteration. The loop monitoring logic is executed. When the maximum eigenvalue of the recalculated matrix recovers to above the convergence threshold and the moving average of the mass spectrometry signal intensity meets the standard, the iteration loop is terminated and the probe parameter vector at the current moment is locked as the final mass spectrometry configuration parameter.
9. A scene-feature-aware mass spectrometry parameter configuration system, applied to the scene-feature-aware mass spectrometry parameter configuration method according to any one of claims 1-8, characterized in that, Includes the following modules: The feature generation module is used to acquire the wide-domain parameter pre-scan data stream of the mass spectrometer under the state of injecting standard tuned material. The data stream is divided by a sliding window of a set width. The spectral information entropy value and the first derivative variance value of the baseline noise within the window are calculated. The spectral information entropy value and the first derivative variance value are normalized and fused to generate the tuning complexity feature curve of the mass-to-charge ratio distribution dimension. The spatial reduction module is used to extract the standard tuning material characteristic peak region in the tuning complexity characteristic curve where the curvature value exceeds the preset threshold, call the historical tuning parameter database to perform interpolation mapping on the characteristic peak region, construct a multi-dimensional parameter gradient response surface, calculate the extreme point coordinate distribution of each dimension on the gradient response surface, and construct the expanded geometric space range as a restricted parameter search domain with a high probability of containing the optimal solution. The parameter optimization module is used to run a multi-objective optimization algorithm within a restricted parameter search domain. In each iteration, it extracts the tuning complexity feature value corresponding to the current search coordinates, substitutes the tuning complexity feature value into the inertia weight adjustment function to modify the inertia weight factor of the optimization algorithm, updates the search coordinates according to the modified inertia weight factor, and generates the parameter optimization trajectory. The feedback adjustment module is used to cache the parameter coordinate changes and mass spectrum signal intensity changes of a preset number of continuous time steps in the parameter optimization trajectory, construct the trajectory-signal covariance matrix and calculate the matrix eigenvalues. When the maximum eigenvalue of the matrix is less than the stagnation threshold and the current signal intensity has not reached the target value, a random perturbation following a heavy-tailed probability distribution is superimposed on the inertial weight factor until the matrix eigenvalue is greater than the convergence threshold, and the mass spectrum configuration parameters are output.