A high-precision spectrum signal peak detection method and system
By combining dynamic segmentation and multi-scale morphological feature system with adaptive threshold method and density clustering, the peak detection problem in complex structures and high noise environments in spectral analysis is solved, and high-precision and robust spectral peak detection is achieved.
Patent Information
- Application Number
- CN202510865753.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing spectral analysis methods have difficulty accurately detecting spectral peaks when dealing with complex structures and high-noise environments. Traditional methods also ignore the characteristic differences between different bands, resulting in limited peak detection accuracy and efficiency.
A dynamic blocking strategy is adopted to divide the spectral curve. Combining the multi-scale morphological feature system and the adaptive threshold method, a density clustering algorithm is used to identify potential peaks. Iterative detection and correction processing is then performed, and local features and physical constraints are integrated to improve detection accuracy.
It effectively handles spectral data with complex structures and high noise levels, improves the accuracy and robustness of peak detection, reduces the cost of manual parameter adjustment, and improves the accuracy and reliability of detection results.
Smart Images

Figure CN120354155B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spectral signal processing, and in particular to a high-precision spectral signal peak detection method and system. Background Art
[0002] Spectral signal peak detection is a key technical means for material composition analysis, structural characterization, and concentration determination, and is widely used in environmental monitoring, biomedicine, materials science, and other fields. Traditional spectral analysis methods generally have the following technical bottlenecks:
[0003] Spectral data acquisition is susceptible to environmental noise, instrument response fluctuations, and other factors, leading to signal distortion. While wavelet transforms can separate signal from noise through multi-scale decomposition (signal wavelet coefficients are concentrated at specific scales, while noise coefficients are dispersed), thresholding high-frequency details can easily lead to the loss of weak peak features. The Savitzky-Golay (SG) smoothing algorithm suppresses noise through local polynomial fitting, but its parameter selection (window size / polynomial order) is highly sensitive, its edge processing capabilities are insufficient, and its stability in complex spectral scenarios is limited.
[0004] Existing methods often treat spectral curves as a single data volume, ignoring the characteristic differences between different bands. For example, the gradient change rate between high-curvature regions and flat regions can differ by orders of magnitude. A unified processing strategy results in both missed peak detections (in high-dynamic regions) and false peak detections (in low-variance regions), making it difficult to handle complex data with asymmetric peaks and shoulder structures, such as Doppler-broadened spectra.
[0005] Over 80% of traditional approaches rely solely on intensity or differential features (such as first- and second-order derivatives), failing to effectively integrate key information such as frequency domain characteristics and local signal-to-noise ratio. This single feature dimension results in insufficient resolution of overlapping peaks (peak spacing < 0.5 times the half-width at half maximum), significantly reducing the recognition accuracy of clustering algorithms (such as DBSCAN) in two-dimensional feature space.
[0006] Detection algorithm parameters (such as thresholds and cluster radius) are typically statically set. When noise levels fluctuate by more than 20%, fixed-parameter solutions can degrade detection accuracy by over 35%. Existing technologies struggle to balance sensitivity and specificity, especially in highly dynamic noise environments (where local signal-to-noise ratio fluctuations range from 5-50dB).
[0007] Initial detection results often exhibit peak shifts, residual spurious peaks, and redundant peaks. Traditional correction methods often rely on simple threshold screening, lacking physical constraints (peak width / symmetry) and adaptive merging mechanisms. This results in the final output being unable to accurately reflect the material's true optical properties.
[0008] In summary, there is an urgent need to develop a high-precision spectral peak detection scheme that integrates local feature analysis, multi-dimensional information fusion, dynamic parameter optimization and intelligent result correction to break through the technical bottleneck of spectral data analysis with complex structures and high noise levels. Summary of the Invention
[0009] The purpose of the present invention is to propose a high-precision spectral signal peak detection method and system to address the problem that existing methods in the background technology mostly treat the spectrum as a whole, ignore the differences in characteristics of different regions, resulting in limited peak detection accuracy and efficiency, and difficulty in dealing with spectral data with complex structures and high noise levels.
[0010] In one aspect, the present application provides a high-precision spectral signal peak detection method, comprising the following steps:
[0011] S1, denoising and smoothing preprocessing of spectral data;
[0012] S2, using dynamic block strategy to divide the spectral curve: generating candidate block points based on multiple local features, and generating feature blocks through optimization processing;
[0013] S3. Construct a multi-scale morphological feature system: integrate derivative features, morphological gradient features, local extreme value features, frequency domain features, and signal-to-noise ratio features, and perform standardization processing;
[0014] S4. Perform hierarchical iterative peak detection:
[0015] Locate candidate peaks using adaptive thresholding;
[0016] Density clustering algorithm is used to analyze the feature matrix and identify potential peak areas;
[0017] Deduct the residual signal based on the model and iterate the detection until the termination condition is met;
[0018] S5. Dynamically adjust detection parameters according to local spectral characteristics;
[0019] S6. Perform correction and fusion processing on the detected peaks, and perform local search window correction, physical constraint condition screening, peak merging algorithm and secondary merging processing in sequence. The peak correction and fusion mechanism of the present invention effectively improves the peak detection accuracy and result simplicity through local search window correction, physical constraint condition screening, peak merging algorithm and secondary merging processing, ensuring that the detection results accurately reflect the true characteristics of the spectral curve.
[0020] Optionally, step S2 includes:
[0021] Extract the gradient, Laplace response and curvature of the spectral curve as local features;
[0022] Dynamically generate block thresholds based on feature distribution;
[0023] Blocks containing multiple peaks are subdivided according to the peak positions, and super-long blocks are divided according to size constraints.
[0024] The dynamic block strategy generation method includes:
[0025] The first-order derivative, second-order differential, and curvature characteristics of the spectral curve are combined. The first-order derivative, or gradient, reflects the slope change of the spectral curve at different points, providing key information for determining the upward and downward trends of the curve. The second-order differential, calculated using the Laplace operator, can capture the local acceleration changes of the spectral curve and assist in identifying the transition of the curve's concave and convex characteristics. The curvature characteristic directly quantifies the degree of curvature of the curve.
[0026] Dynamic threshold optimization: Generates an adaptive threshold based on the 95th percentile of the feature distribution to avoid over / under detection caused by fixed thresholds.
[0027] Based on the selected candidate block points, the initial block area is generated and optimized. For blocks containing multiple local peaks, they are further subdivided according to the specific location of the local peaks, so that each sub-block more specifically covers the characteristics of a single peak. For blocks that are too long, they are evenly divided according to the preset maximum block size to ensure the rationality and processability of the blocks.
[0028] Optionally, in step S3:
[0029] The derivative features include first-order derivatives and second-order derivatives;
[0030] The normalization process adopts a robust normalization method based on statistical distribution.
[0031] It should be noted that the purpose of constructing multi-scale morphological features is to fully mine the useful information of the spectral curve and improve the accuracy and reliability of peak detection. Its specific features are as follows:
[0032] Basic differential features: Calculate the first and second derivatives of the spectral curve to obtain basic differential features. The first derivative reflects the slope change of the spectral curve at different wavelengths, providing a quantitative basis for determining the rising or falling range of the curve. The second derivative is used to capture the curvature change of the spectral curve, helping to identify the local morphological transition points of the curve.
[0033] Morphological gradient verification: Morphological gradients are calculated by convolving structuring elements with spectral curves. This feature can highlight edges and sudden changes in spectral curves, enhance the contrast between peak regions and surrounding areas, and make potential peaks more prominent in the curve.
[0034] Local maximum verification: By quickly identifying these local maximum points, the search range can be effectively narrowed, allowing subsequent analysis to more accurately focus on potential peak areas, thereby improving detection efficiency and accelerating the entire peak identification process.
[0035] Frequency domain features: The spectral signal is converted from the time domain to the frequency domain through fast Fourier transform, which reflects the periodic changes and frequency components of the spectral signal and helps to identify whether there are periodic peak patterns in the spectrum.
[0036] Local signal-to-noise ratio feature: Quantifies the comparison between the signal and background noise at each point on the spectral curve, thereby effectively distinguishing true signal peaks from false peaks caused by noise.
[0037] Optionally, in the density cluster analysis of step S4:
[0038] The cluster radius parameter is dynamically calculated based on the feature space distance distribution;
[0039] The minimum number of samples is adaptively adjusted based on the local signal-to-noise ratio and data size;
[0040] In addition, in step S4, the hierarchical iterative detection algorithm is dedicated to the peak detection of the spectrum curve, and its specific contents include:
[0041] Adaptive thresholding for rapid location: Analyzes the statistical characteristics of the spectral signal within a local region, such as mean and variance, and dynamically calculates an appropriate threshold based on these characteristics. This threshold is then used to perform a preliminary scan of the spectral curve, quickly identifying candidate peak locations that are significantly above background noise.
[0042] Density-based feature point analysis: The DBSCAN algorithm clusters feature points based on their local density, effectively identifying clusters corresponding to potential peak regions in the spectral curve. For each cluster, the algorithm further calculates its morphological characteristics, such as cluster size, shape, and density. By analyzing these characteristics, it screens and confirms true and reliable peaks.
[0043] Gaussian model subtraction and iterative processing: The constructed Gaussian model is subtracted from the original spectral signal to obtain a residual signal. The algorithm then reapplies the detection process to the residual signal, performing adaptive thresholding and density clustering analysis again.
[0044] Optionally, the dynamically adjusting detection parameters in step S5 includes:
[0045] Quantify the local signal-to-noise ratio to characterize the contrast between the signal and the background noise;
[0046] The sensitivity threshold of the detection algorithm is dynamically adjusted according to the local signal-to-noise ratio.
[0047] Optionally, the local search window correction in step S6 includes:
[0048] An adaptive window is established with the initial detection peak as the center, and the window size is dynamically adjusted according to the spectral resolution;
[0049] A secondary extreme value search is performed within the window to correct for peak position deviations.
[0050] Optionally, the adjacent peak merging in step S6 includes:
[0051] Merging is triggered when the peak spacing and peak height difference meet the preset conditions;
[0052] The weighting factors are used to optimize the parameters of the merged peaks.
[0053] On the other hand, the present application provides a high-precision spectral signal peak detection system, comprising:
[0054] Preprocessing module, which performs spectral denoising and smoothing;
[0055] Dynamic segmentation module, which realizes adaptive segmentation of spectral curve based on local features;
[0056] Feature construction module, generating standardized feature matrix for multi-scale fusion;
[0057] Hierarchical detection module, integrating adaptive threshold detection, density clustering and residual iteration unit;
[0058] Parameter optimization module, dynamically configures detection parameters according to local spectral characteristics;
[0059] Peak optimization module performs peak position correction, pseudo peak removal and adjacent peak merging.
[0060] Optionally, the dynamic block module is configured as follows:
[0061] Generate candidate block points through three-sign edge detection;
[0062] Blocks containing multiple peaks are subdivided according to peak positions, and super-long blocks are evenly divided according to the preset maximum size.
[0063] Optionally, the peak optimization module includes:
[0064] Physical constraint screening unit, which removes pseudo peaks based on peak width threshold, peak height ratio and peak shape symmetry;
[0065] The peak merging unit uses a weight factor optimization algorithm to merge adjacent similar peaks.
[0066] Compared with the prior art, this application has at least one of the following beneficial technical effects:
[0067] Adaptive segmentation based on the local characteristics of the spectral signal (gradient, Laplace response, curvature) reduces the impact of feature differences in different regions on the detection algorithm and improves processing targeting;
[0068] Integrate multi-dimensional features such as basic differential, morphological gradient, frequency domain, and local signal-to-noise ratio to comprehensively characterize the spectral curve morphology and enhance the integrity and noise resistance of feature expression;
[0069] Combining adaptive thresholding, DBSCAN density clustering, and Gaussian model subtraction iteration, it gradually explores potential peaks, effectively handles complex structured spectral data, and improves detection accuracy and robustness.
[0070] Dynamically optimize the sensitivity of algorithm parameters based on the local signal-to-noise ratio, so that the detection process adapts to the local characteristics of the spectral signal, reduces the cost of manual parameter adjustment, and improves the generalization ability of the algorithm;
[0071] Through local search window correction, physical constraint screening and peak merging algorithm, peak position deviation is corrected, false peaks are eliminated, redundancy is eliminated, and the accuracy and reliability of detection results are improved.
[0072] The present invention uses a dynamic blocking strategy to reduce the impact of feature differences in different regions on the detection algorithm, constructs a multi-scale morphological feature system to comprehensively characterize the morphological characteristics of the spectral curve, uses a hierarchical iterative peak detection algorithm to gradually explore potential peaks, uses an adaptive parameter adjustment mechanism to adapt to the local characteristics of the spectral signal, and uses a peak correction and fusion mechanism to improve the quality and reliability of the detection results. It can effectively deal with spectral data with complex structures and high noise levels, providing an efficient and reliable solution for the field of spectral analysis, and improving the accuracy and robustness of peak detection and the simplicity and reliability of the results. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a flow chart of spectrum signal processing of the present invention;
[0074] Figure 2 This is the dynamic block result and feature extraction effect diagram of the present invention;
[0075] Figure 3 It is a multi-scale feature fusion feature matrix diagram of the present invention;
[0076] Figure 4 This is the final peak detection result diagram of the present invention. DETAILED DESCRIPTION
[0077] The technical solution of the present invention is further described below with reference to the accompanying drawings and specific embodiments.
[0078] Example 1
[0079] The present invention proposes a high-precision spectral signal peak detection method. The core architecture of the present invention includes five functional modules: Figure 1 System composition:
[0080] Signal preprocessing module: performs data normalization, noise suppression and signal enhancement;
[0081] Adaptive segmentation engine: dynamic segmentation of spectral intervals based on multi-feature fusion;
[0082] Hierarchical detection unit: integrating iterative threshold detection and density cluster analysis;
[0083] Result fusion mechanism: realize the optimized integration of multi-level test results;
[0084] Post-processing verification: Provides peak position correction and visual interactive interface.
[0085] 1. Spectral data preprocessing
[0086] 1. Data loading and baseline correction
[0087] Parse SIF standard format spectrum files and automatically identify track numbers and frame sequence information;
[0088] Perform differential signal processing: When data is detected, a background subtraction algorithm is used to remove ambient noise;
[0089] Baseline drift correction: The first 50 data points are intercepted to calculate the average noise floor value. When the maximum signal offset exceeds 1000 counts, a global baseline zeroing is performed.
[0090] 2. Wavelet threshold denoising
[0091] The Sym5 wavelet basis is selected for three-level decomposition, retaining the low-frequency approximate components;
[0092] High-frequency noise processing: Based on the improved Donoho threshold model, calculate the detail coefficient shrinkage threshold: , where 1.4826 is the constant correction factor, which is a calibration factor relating the median absolute deviation to the standard deviation of the normal distribution; MAD( ) is the median absolute deviation of the third layer detail coefficients, Represents the detail coefficient of the third layer after the three-level wavelet decomposition. MAD is a robust statistic that aims to estimate the degree of noise dispersion in the detail coefficient of the third layer. N is the number of data points, which refers to the total number of samples of the original data to be denoised.
[0093] Soft threshold shrinkage is performed on high-frequency components exceeding the threshold, and the signal-to-noise ratio after reconstruction is improved by more than 40%.
[0094] 3. Interpolation and smoothing
[0095] Dynamically select interpolation strategy: cubic spline interpolation is enabled when the wavelength step size is less than 0.2nm, otherwise linear interpolation is used;
[0096] A Savitzky-Golay filter was applied with a fixed window length of 25 data points and a third-order polynomial fit to effectively preserve the peak shape characteristics.
[0097] 2. Dynamic Block Processing
[0098] 1. Three-sign edge detection
[0099] like Figure 2 , extract three sets of feature vectors:
[0100] Gradient strength: calculates the absolute value of the first-order derivative of the signal;
[0101] Laplace correspondence: identifying mutation edges through second-order differential operators;
[0102] Curvature feature: quantifies the curvature of the spectral profile
[0103] Dynamic threshold setting: extract the top 5% quantiles of each feature as the edge judgment threshold.
[0104] 2. Candidate point detection and screening
[0105] Detect salient feature points and select candidate partition points that meet minimum spacing constraints. By comparing feature values with dynamic thresholds, key feature points in the spectral curve are identified. These feature points typically correspond to local maxima, mutation points, or locations where the curvature of the spectral curve changes significantly. To ensure reasonable partitioning, these candidate partition points are screened and those that are too close are removed. These selected candidate partition points can effectively delineate spectral regions with distinct features, providing a foundation for subsequent partition generation.
[0106] 3. Block generation
[0107] Generate initial blocks and adjust them according to the block length constraint. Divide the spectral curve into multiple initial block areas using the screened candidate block points as boundaries. During the block process, the initial blocks are further optimized, considering that there may be multiple overlapping peaks or complex structures in the spectral curve. For blocks containing multiple local peaks, they are subdivided according to the positions of the local peaks to ensure that the spectral features in each block area are relatively concentrated; for blocks that are too long, they are evenly divided according to the preset maximum block size to avoid a single block area that is too large and leads to reduced processing efficiency. The final block result can effectively divide the spectral curve into multiple easy-to-process feature blocks, laying the foundation for subsequent feature extraction and peak detection.
[0108] 3. Multi-scale feature extraction
[0109] like Figure 3 , construct a multi-scale feature matrix.
[0110] 1. Basic feature calculation
[0111] The first-order derivative locates spectral mutation regions, the second-order derivative captures curvature inflection points, and the morphological gradient enhances peak-to-valley contrast. These three methods capture slope, curvature, and mutation characteristics, respectively, to construct a multi-dimensional representation of local changes and provide underlying data support for feature fusion.
[0112] 2. Frequency domain feature extraction
[0113] Perform a Fast Fourier Transform (FFT) on the spectral signal to extract its frequency domain characteristics. This FFT acquires the spectral frequency domain characteristics and analyzes periodic peak patterns and noise frequencies. Based on the frequency energy distribution, peaks associated with material characteristics are identified, providing frequency-dimensional information support for spectral analysis.
[0114] 3. Feature Matrix Construction and Standardization
[0115] Multi-dimensional features such as spectral derivatives, morphological gradients, and signal-to-noise ratios are integrated to construct a point-by-point spectral feature matrix. The influence of outliers is eliminated through median normalization, and data scaling is normalized based on feature medians and absolute deviations, generating highly consistent input data to support subsequent cluster analysis.
[0116] 4. Layered Iterative Peak Detection
[0117] 1. Primary iterative detection layer
[0118] The initial peak threshold was set to 400 counts, and three rounds of iterative detection were performed with a decay coefficient of 0.6.
[0119] Gaussian residual subtraction model: ,in, is the residual signal strength after deducting the Gaussian model, 0.8 is the weight coefficient, is the original signal strength; The horizontal coordinate of the independent variable corresponding to the current residual calculation, indicating the wavelength of the spectrum; is the peak position of the i-th Gaussian peak, that is, the horizontal coordinate value corresponding to the maximum value of the peak signal; is the height of the i-th Gaussian peak, that is, the peak is at the center The maximum signal strength at is the original peak width of the i-th detected peak; is the exponential term of the Gaussian function, describing the attenuation law of the peak signal as the horizontal coordinate is closer to the peak center;
[0120] Termination condition: The residual signal strength is less than 15% of the maximum value of the original signal.
[0121] 2. Secondary density clustering layer
[0122] Construct a 12-dimensional feature space, including normalized wavelength / intensity, morphological gradient, Fourier harmonic components, and local signal-to-noise ratio;
[0123] Dynamic DBSCAN parameters: ;in, It is the maximum neighborhood distance in the DBSCAN algorithm, indicating the neighborhood range of the sample; Indicates the distance from a single sample to its kth nearest neighbor sample; 5.8 and 2.8 are scaling factors, corresponding to the core area and non-core area respectively. The core area requires a larger , making it easier for samples in high-density areas to connect with each other and shrinking the non-core area , reduce the over-inclusion of low-density / noise areas and avoid misjudging noise as cluster members.
[0124] The minimum number of samples is adaptively adjusted according to the local signal-to-noise ratio. The formula is: ,in, is the minimum sample number threshold of the DBSCAN algorithm, 0.015 is the proportional coefficient, which controls the influence of the total number of samples N and the signal-to-noise ratio SNR on min_samples; N is the total number of samples in the local area. The more total samples, the more neighboring samples can be determined as core points; SNR is the local signal-to-noise ratio, which measures the ratio of effective feature signals to noise in the local area; is the signal-to-noise ratio adjustment factor. The stronger the signal, the higher the SNR, and the denser the effective samples in the area. It is to ensure that the minimum number of samples is not less than 3 to ensure the basic reliability of clustering.
[0125] 3. Peak feature extraction
[0126] The peak position is determined by locating the spectral maximum within the cluster domain, calculating the corresponding intensity value to determine the peak height. The full width at half maximum (FWHM) represents the peak width, and skewness is quantified based on the symmetry of the peak region. The four-dimensional parameters (position / height / width / skewness) fully describe the peak shape. The skewness metric can effectively identify asymmetric peaks caused by instrument response or sample characteristics, providing a basis for correlation analysis of material properties.
[0127] 5. Peak Correction and Post-Processing
[0128] 1. Local search window correction
[0129] Based on the initial peak position, an adaptive search window is established to perform secondary extreme value positioning. The window size is dynamically adjusted according to the spectral resolution: high-resolution narrow window precision calibration (matching narrow peak characteristics), low-resolution wide window full coverage (adapting to broad peak morphology), effectively eliminating peak position offset errors caused by noise interference.
[0130] 2. Physical Constraint Screening
[0131] Physical constraints are established based on peak width thresholds, peak height ratios, and peak symmetry to eliminate excessively narrow / wide peaks (noise artifacts) and abnormally asymmetric peaks (detection errors). The screening thresholds support dynamic parameter adjustment to adapt to different detection requirements, ensuring that spectral characteristics conform to the optical properties of the material.
[0132] 3. Peak Merging
[0133] Based on the dual criteria of peak distance and peak height difference, merging is triggered when the distance between adjacent peaks is less than a dynamic threshold and the height difference is ≤20%. Merging parameters are optimized using weighting factors (peak height weight 0.7, position weight 0.3), and the dynamic threshold is adaptively calibrated in 0.01λ steps based on spectral resolution to eliminate redundant peaks while maintaining the integrity of the true multi-peak structure.
[0134] 4. Secondary merge processing
[0135] After the peak correction and screening steps described above, the test results are merged again to further eliminate any overlapping or similar peaks. By comprehensively considering characteristic information such as peak position, height, and width, the test results are comprehensively optimized and integrated. This step ensures that the final peak list is concise and accurate, truly reflecting the actual peaks in the spectral curve. The peak list after the second merging process becomes the final test result, providing reliable data support for subsequent spectral analysis and data interpretation.
[0136] In this example, a modified Donoho threshold model and Sym5 wavelet basis are used to improve the signal-to-noise ratio and effectively suppress high-frequency noise, while preserving the low-frequency trends and detailed features of the spectral signal. A Savitzky-Golay filter with a fixed window (25 points) and third-order polynomial fitting are used to precisely preserve peak shape characteristics while removing noise, avoiding the damage to peak morphology caused by traditional smoothing methods. Dynamic background noise subtraction and global baseline zeroing eliminate environmental interference. The interpolation algorithm (cubic spline / linear) is adaptively selected based on the wavelength step size to ensure the continuity and accuracy of the spectral data.
[0137] The system uses multi-feature edge detection and dynamic thresholding, combining gradient strength, Laplace response, and curvature features to identify spectral mutation points and curvature. Dynamic thresholding is set based on the 95th percentile to avoid over- or under-detection caused by fixed thresholds and accurately locate block boundaries. Blocks containing multiple peaks are subdivided by peak position, and overly long blocks are evenly divided to ensure that each subblock contains only a single peak or a feature interval of reasonable length. This reduces interference from cross-regional feature contamination on the detection algorithm and improves subsequent processing efficiency.
[0138] In addition, 12-dimensional features such as first-order / second-order derivatives (slope and curvature changes), morphological gradients (edge enhancement), frequency domain features (periodic analysis), and local signal-to-noise ratio (distinguishing between signals and noise) are integrated to comprehensively characterize the spatial morphology, frequency components, and noise distribution of the spectral curve, thereby improving the recognition of peak features.
[0139] Median normalization (based on feature medians and absolute deviations) eliminates the influence of outliers, ensuring the stability and consistency of the feature matrix. This provides reliable input for subsequent analyses such as density clustering, gradually uncovering potential peaks and adapting to complex spectral structures. An adaptive thresholding method combined with a Gaussian residual subtraction model, through multiple iterations, gradually removes strong peak signals and exposes hidden weak peaks, effectively handling peak detection in the presence of overlapping peaks and noisy backgrounds.
[0140] It is worth noting that the DBSCAN algorithm clusters the 12-dimensional feature matrix, dynamically adjusting parameters (ε and min_samples) to adapt to the local signal-to-noise ratio, identifying potential peak regions of arbitrary shapes, and filtering true peaks through morphological features (peak width, skewness, etc.), suppressing noise interference and false peaks. Secondary detection of the residual signal uncovers weak peaks obscured by strong peaks, improving detection capabilities for complex spectra (such as multi-component superposition signals) and preventing missed detections.
[0141] In this embodiment, the search window is dynamically adjusted based on spectral resolution, and the true maximum point is relocated near the initial peak position to correct for peak position shifts caused by noise or feature extraction errors. This method is particularly suitable for mixed high- and low-resolution spectral data. Pseudo-peaks that do not conform to optical properties are eliminated through physical constraints such as peak width, peak height ratio, and symmetry. Redundant peaks are dynamically merged based on peak distance and peak height difference, preserving the true multi-peak structure while eliminating duplicate detections. This ensures that the results conform to the laws of material properties and improves the reliability and readability of the results.
[0142] This method forms a complete closed-loop through signal preprocessing, adaptive segmentation, hierarchical detection, result fusion, and post-processing verification. Each module can be independently optimized and adapted to different spectral data types (such as Doppler spectra). Dynamic segmentation, parameter adjustment, and threshold optimization reduce reliance on manual parameter adjustment, improving the algorithm's generalization capabilities for high-noise, complex-structure spectra, making it suitable for automated spectral analysis scenarios. This systematically addresses the challenges of traditional methods, such as sensitivity to regional differences, poor noise robustness, and missed detection of complex peaks, providing an efficient and reliable engineering solution for high-precision spectral peak detection.
[0143] Example 2
[0144] This embodiment provides a high-precision spectral signal peak detection system, including:
[0145] Preprocessing module, which performs spectral denoising and smoothing;
[0146] The dynamic segmentation module implements adaptive segmentation of spectral curves based on local features, specifically including:
[0147] Generate candidate block points through three-sign edge detection;
[0148] Subdivide blocks with multiple peaks by peak position, and evenly divide super-long blocks by preset maximum size
[0149] Feature construction module, generating standardized feature matrix for multi-scale fusion;
[0150] Hierarchical detection module, integrating adaptive threshold detection, density clustering and residual iteration unit;
[0151] Parameter optimization module, dynamically configures detection parameters according to local spectral characteristics;
[0152] The peak optimization module performs peak position correction, pseudo-peak removal, and adjacent peak merging, including:
[0153] Physical constraint screening unit, which removes pseudo peaks based on peak width threshold, peak height ratio and peak shape symmetry;
[0154] The peak merging unit uses a weight factor optimization algorithm to merge adjacent similar peaks.
[0155] The system of this embodiment improves the quality of spectral data through the preprocessing module, suppresses noise and preserves peak shape; the dynamic block module is based on three-sign edge detection and adaptive block strategy to reduce the interference of regional feature differences and improve the processing pertinence, such as Figure 2 ; The feature construction module generates a standardized feature matrix of multi-scale fusion to fully characterize the spectral morphology and enhance noise resistance, such as Figure 3The hierarchical detection module integrates multiple detection methods, gradually explores potential peaks, and effectively copes with complex spectral structures; the parameter optimization module dynamically configures parameters, reduces manual parameter adjustment, and improves generalization ability; the peak optimization module corrects peak positions, removes pseudo-peaks, and eliminates redundancy through physical constraint screening and weight factor merging algorithms, ultimately achieving efficient and high-precision peak detection of complex and high-noise spectral data. The results are accurate, reliable, and concise. Figure 4 The results show the accuracy of the peak detection results.
[0156] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art may make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A high-precision spectral signal peak detection method, characterized in that: The following steps are involved: S1, denoising and smoothing preprocessing of spectral data; S2. Use dynamic block partitioning strategy to divide the spectral curve: Generate candidate block points based on multiple local features, and generate feature blocks through optimization processing, including: Extract the gradient, Laplace response and curvature of the spectral curve as local features; Dynamically generate block thresholds based on feature distribution; For blocks with multiple peaks, subdivide them according to the peak positions, and for very long blocks, divide them according to size constraints; Dynamic segmentation includes three-sign edge detection to generate candidate segmentation points. Three-sign edge detection specifically includes extracting three sets of feature vectors: Gradient strength, which calculates the absolute value of the first-order derivative of the signal; Laplace correspondence, identifying mutation edges through second-order differential operators; The curvature feature quantifies the degree of curvature of the spectral profile; Dynamic threshold setting, extracting the top 5% quantiles of each feature as the edge judgment threshold; S3. Construct a multi-scale morphological feature system: integrate derivative features, morphological gradient features, local extreme value features, frequency domain features, and signal-to-noise ratio features, and perform standardization processing; S4. Perform hierarchical iterative peak detection: Locate candidate peaks using adaptive thresholding; Density clustering algorithm is used to analyze the feature matrix and identify potential peak areas; Deduct the residual signal based on the model and iterate the detection until the termination condition is met; In density cluster analysis: The cluster radius parameter is dynamically calculated based on the feature space distance distribution; The minimum number of samples is adaptively adjusted based on the local signal-to-noise ratio and data size; S5. Dynamically adjust detection parameters according to local spectral characteristics; S6. Perform correction and fusion processing on the detected peaks, and sequentially perform local search window correction, physical constraint condition screening, peak merging algorithm and secondary merging processing.
2. A high-precision spectral signal peak detection method according to claim 1, characterized in that: In the step S3: The derivative features include first-order derivatives and second-order derivatives; The normalization process adopts a robust normalization method based on statistical distribution.
3. The high-precision spectral signal peak detection method according to claim 1, characterized in that: The dynamic adjustment of detection parameters in step S5 includes: Quantify the local signal-to-noise ratio to characterize the contrast between the signal and the background noise; The sensitivity threshold of the detection algorithm is dynamically adjusted according to the local signal-to-noise ratio.
4. The high-precision spectrum signal peak detection method according to claim 1, characterized in that: The local search window correction in step S6 includes: An adaptive window is established with the initial detection peak as the center, and the window size is dynamically adjusted according to the spectral resolution; A secondary extreme value search is performed within the window to correct for peak position deviations.
5. The high-precision spectrum signal peak detection method according to claim 1, characterized in that: The adjacent peak merging in step S6 includes: Merging is triggered when the peak spacing and peak height difference meet the preset conditions; The weighting factors are used to optimize the parameters of the merged peaks.
6. A system for implementing the high-precision spectral signal peak detection method according to any one of claims 1 to 5, characterized in that: include: Preprocessing module, which performs spectral denoising and smoothing; The dynamic block module realizes adaptive block division of spectral curves based on local features and adopts dynamic block strategy to divide spectral curves: it generates candidate block points based on multiple local features and generates feature blocks through optimization processing, including: Extract the gradient, Laplace response and curvature of the spectral curve as local features; Dynamically generate block thresholds based on feature distribution; Dynamic segmentation includes three-sign edge detection to generate candidate segmentation points. Three-sign edge detection specifically includes extracting three sets of feature vectors: Gradient strength, which calculates the absolute value of the first-order derivative of the signal; Laplace correspondence, identifying mutation edges through second-order differential operators; The curvature feature quantifies the degree of curvature of the spectral profile; Dynamic threshold setting, extracting the top 5% quantiles of each feature as the edge judgment threshold; For blocks with multiple peaks, subdivide them according to the peak positions, and for super-long blocks, divide them evenly according to the preset maximum size; The feature construction module generates a standardized feature matrix for multi-scale fusion, constructs a multi-scale morphological feature system: integrates derivative features, morphological gradient features, local extreme value features, frequency domain features and signal-to-noise ratio features, and performs standardization processing; The hierarchical detection module integrates adaptive threshold detection, density clustering, and residual iteration units to perform hierarchical iterative peak detection: Locate candidate peaks using adaptive thresholding; Density clustering algorithm is used to analyze the feature matrix and identify potential peak areas; Deduct the residual signal based on the model and iterate the detection until the termination condition is met; In density cluster analysis: The cluster radius parameter is dynamically calculated based on the feature space distance distribution; The minimum number of samples is adaptively adjusted based on the local signal-to-noise ratio and data size; Parameter optimization module, dynamically configures detection parameters according to local spectral characteristics; The peak optimization module performs peak position correction, pseudo peak removal and adjacent peak merging, performs correction and fusion processing on the detected peaks, and sequentially performs local search window correction, physical constraint condition screening, peak merging algorithm and secondary merging processing.
7. The high-precision spectrum signal peak detection system according to claim 6, characterized in that: The peak optimization module includes: Physical constraint screening unit, which removes pseudo peaks based on peak width threshold, peak height ratio and peak shape symmetry; The peak merging unit uses a weight factor optimization algorithm to merge adjacent similar peaks.
Citation Information
Patent Citations
Human body fluid spectral analysis method and system based on artificial intelligence
CN118471348A
Analysis method and system for improving spectrum quality of mass spectrum
CN120121695A