Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output

By using a Raman spectral characteristic peak segmentation method based on distance and probability vectors, the problem of expressing the hierarchical relationship between shoulder peaks and sub-peaks in existing technologies is solved. This method achieves accurate segmentation and hierarchical labeling of the main peak, shoulder peaks, and sub-peaks, thereby improving the efficiency and accuracy of analysis.

CN120892805AActive Publication Date: 2025-11-04JILIN SCIENCE & TECHNOLOGY INNOVATION RESEARCH INSTITUTE CO LTD

Patent Information

Application Number
CN202511419065.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-11-04
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

Existing Raman spectroscopy peak segmentation methods struggle to effectively express the hierarchical relationship between shoulder peaks, sub-peaks, and main peaks when dealing with multi-level peak structures. This leads to the loss of key feature information and inaccurate molecular fingerprint identification, resulting in high false positive and false negative rates, especially in the analysis of complex samples.

Method used

A method based on distance vector and probability vector output is adopted. Through multi-scale wavelet decomposition, local curvature change rate calculation, adaptive distance calculation kernel function and deep neural network, a joint segmentation decision function is constructed to achieve accurate segmentation and hierarchical labeling of main peak, shoulder peak and sub-peak.

Benefits of technology

It improves the ability to distinguish overlapping peak regions, reduces the false positive and false negative rates, ensures the reliable identification of weak features, enhances analysis efficiency and objectivity, and adapts to various complex peak shapes without human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892805A_ABST
    Figure CN120892805A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of spectral analysis, and discloses a Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output. Spectral detail features are extracted through multi-scale wavelet decomposition, and a spectral multi-layer structure representation matrix is constructed; identifying a potential peak site and a hierarchical affiliation relationship thereof based on the local curvature change rate; generating an adaptive distance calculation kernel function in combination with the asymmetry index and the peak shape complexity coefficient; and calculating a distance vector of hierarchical perception and a probability vector extracted by deep learning, and constructing a joint segmentation decision function of a multi-layer peak structure. According to the method, the hierarchical relationship among the main peak, the shoulder peak and the sub-peak can be accurately distinguished, the complex conditions of peak overlapping, asymmetric peak shapes, low signal-to-noise ratio and the like are effectively processed, and the accuracy and the reliability of Raman spectrum analysis are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of spectral analysis, more particularly, the present application relates to a Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output. BACKGROUND

[0002] As a non-destructive molecular structure characterization method, Raman spectroscopy is widely used in material science, biomedical, drug development, environmental monitoring and food safety fields. Based on the principle of non-elastic scattering of molecular vibration and rotation energy level, it can provide the "fingerprint spectrum" of the molecular structure of the substance, and realize the qualitative and quantitative analysis of the sample composition. However, the accurate analysis of Raman spectrum depends on the accurate identification and segmentation of the characteristic peaks in the spectrum curve, especially in the analysis of complex samples, the extraction and processing of spectral peaks directly affect the reliability of the subsequent analysis results.

[0003] The existing Raman spectrum characteristic peak segmentation method has defects in processing multi-level peak structure, especially the hierarchical relationship between shoulder peak, sub-peak and main peak cannot be effectively expressed and accurately segmented by a single distance vector. In the analysis of complex molecules such as protein structure, multi-component drug preparation or semiconductor material, the traditional algorithm often incorrectly combines the shoulder peak into the main peak or completely ignores it, resulting in the loss of key feature information; at the same time, the low-intensity sub-peak is often misjudged as noise or background fluctuation and filtered out, which seriously affects the accuracy of molecular fingerprint identification. For example, in the Raman analysis of carbon nanomaterials, the overlapping region of G peak and D' peak, the 2D peak multi-component structure in graphene, and the complex structure of protein amide I band in biological samples all show a complex hierarchical relationship of main peak-shoulder peak-sub-peak, and the existing methods based on single distance measurement or threshold segmentation cannot capture this hierarchical dependency, resulting in peak assignment errors and spectrum interpretation bias. Especially when the sample is in a chemical environment change, phase change process or contains trace impurities, the secondary peak characteristics often carry the most critical change information, and the shortcomings of the existing technology directly limit the fine application potential of Raman spectrum in material science, drug development and biomedical fields. The equal weight distance vector commonly used in existing algorithms cannot adapt to the width change of the main peak and the fine features of the sub-peak, and cannot express the subordinate relationship between the shoulder peak and the main peak, resulting in systematic errors in molecular structure analysis and component quantitative analysis.

[0004] In view of this, the present application proposes a Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output to solve the above problems. SUMMARY

[0005] In order to overcome the above-mentioned defects of the prior art, in order to achieve the above-mentioned purpose, the present application provides the following technical scheme: a Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output, comprising: Obtain the original intensity sequence data of the Raman spectrum to be analyzed, and preprocess the original intensity sequence data to obtain a standardized spectrum sequence; Perform multi-scale wavelet decomposition on the standardized spectrum sequence, extract spectral detail features under different frequency components, and construct a spectrum multi-level structure representation matrix; Based on the spectrum multi-level structure representation matrix, the potential peak site and its hierarchical attribution relationship are identified through local curvature change rate calculation in the sliding window; For each potential peak site, a neighborhood topology centered on the site is constructed, and the asymmetry index and peak shape complexity coefficient in the neighborhood are calculated; According to the asymmetry index and the peak shape complexity coefficient, an adaptive distance calculation kernel function is generated to process the differentiated boundary features of shoulder peaks, sub-peaks and main peaks; Based on the adaptive distance calculation kernel function, the weighted distance of each spectrum point to its left and right effective valley is calculated to generate a hierarchical distance vector; The standardized spectrum sequence is extracted by a deep neural network, and an initial probability vector is output, and the hierarchical distance vector is combined to correct the probability distribution; According to the corrected probability vector and the hierarchical distance vector, a joint segmentation decision function of multi-level peak structure is constructed; Based on the joint segmentation decision function, the accurate segmentation and hierarchical labeling of the main peak, shoulder peak and sub-peak in the Raman spectrum are realized.

[0006] The technical effects and advantages of the Raman spectrum feature peak segmentation method based on the distance vector and the probability vector output of the present application are as follows: The present application can accurately distinguish the hierarchical relationship between the main peak, shoulder peak and sub-peak, so that the secondary features previously ignored or incorrectly combined can be accurately identified, thereby retaining the complete information in the spectrum. Through the hierarchical perception of the structured processing framework, the resolution of the overlapping peak region is greatly improved, so that the weak shoulder peak hidden in the edge of the main peak and the sub-peak with lower intensity can be reliably identified. Especially under low signal-to-noise ratio conditions, the present application effectively reduces the false positive rate and the false negative rate, ensuring that the weak features are not covered by noise or misjudged. In addition, the high adaptability of the present application can intelligently cope with various complex peak shapes, automatically adjust the processing strategy without human intervention, and greatly improve the analysis efficiency and objectivity. BRIEF DESCRIPTION OF DRAWINGS

[0007] Figure 1 The Raman spectrum feature peak segmentation method based on the distance vector and the probability vector output of the present application is shown in the figure; Figure 2 The feature peak region mask of the present application is shown in the figure; Figure 3 The final segmentation effect of the present application is shown in the figure. DETAILED DESCRIPTION

[0008] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0009] The examples of the present application provide a Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output. The execution subject of the method includes but is not limited to: a spectrum analysis device, a spectrum data processing system, a spectrum feature recognition device, an intelligent spectrum analysis terminal, etc., which can be regarded as a general computing node of the present application, and the spectrum data processing system includes but is not limited to: a spectrum signal processor, a distributed spectrum analysis system, and at least one programmable spectrum analysis controller.

[0010] In the embodiments of the present application, the detailed implementation steps of the Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output include: The original intensity sequence data of the Raman spectrum to be analyzed is obtained, and the original intensity sequence data is preprocessed to obtain a standardized spectrum sequence. The original intensity sequence data includes Raman shift (wavenumber) and corresponding scattering intensity value, which is obtained by spectrum instrument acquisition. The preprocessing steps include baseline correction, smoothing and denoising, and intensity normalization, wherein the baseline correction uses polynomial fitting or wavelet transform method to eliminate fluorescence background interference, the smoothing and denoising uses Savitzky-Golay filtering algorithm to retain peak shape characteristics while suppressing high-frequency noise, and the intensity normalization maps the spectrum intensity to the [0, 1] interval to ensure the comparability between different spectra. These preprocessing steps ensure the accuracy and reliability of subsequent analysis.

[0011] The standardized spectrum sequence is subjected to multi-scale wavelet decomposition to extract spectral detail features under different frequency components and construct a spectrum multi-level structure representation matrix. The multi-scale wavelet decomposition uses discrete wavelet transform technology, and uses wavelet basis functions with different scale parameters to decompose the standardized spectrum sequence to extract high-frequency detail features and low-frequency approximation features. The decomposition usually uses orthogonal wavelet bases such as Daubechies or symlet, and the decomposition layer number is determined according to the spectrum complexity, and is generally 3-5 layers. The detail coefficients and approximation coefficients generated by each layer of decomposition form the spectrum multi-level structure representation matrix, which contains complete feature information of the spectrum at different frequency scales, and provides a multi-scale analysis basis for subsequent peak site identification.

[0012] Based on the spectrum multi-level structure representation matrix, potential peak sites and their hierarchical attribution relationships are identified through local curvature change rate calculation in a sliding window. For example,Figure 2 As shown, a feature peak region mask diagram (1 for feature peak region, 0 for other region) generated according to potential peak site identification results; this step calculates the second derivative sequence in the window by setting an adaptive size sliding window on different scale layers, extracts the sign change point as a candidate peak site, and calculates its significance score, determines the hierarchical type according to the distribution mode of the significance score on each scale layer, establishes the subordination relationship atlas between different hierarchical peak sites through cross-scale correlation analysis, and determines the hierarchical attribution relationship of potential peak sites.

[0013] For each potential peak site, a neighborhood topology centered on the site is constructed, and the asymmetry index and peak shape complexity coefficient in the neighborhood are calculated. This step first determines the neighborhood radius according to the hierarchical type of the peak site, calculates the spectral curve integral area of the left and right intervals in the determined neighborhood respectively, calculates the asymmetry index through the ratio of the difference value and the sum value of the left and right areas, and determines the peak shape complexity coefficient through high-order derivative zero point statistics and inflection point distribution analysis. Finally, these indicators are normalized to provide accurate feature parameters for subsequent kernel function generation.

[0014] According to the asymmetry index and the peak shape complexity coefficient, an adaptive distance calculation kernel function is generated to process the differentiated boundary features of shoulder peaks, sub-peaks and main peaks. This step identifies the peak shape skew direction through the asymmetry index, constructs a directional weight gradient field, converts the peak shape complexity coefficient into an adaptive window scale parameter, constructs a distance sensitivity decay function, generates differentiated spatial influence domains for peak sites of different hierarchical types, performs anisotropic diffusion and boundary constraint optimization, and finally generates an adaptive distance calculation kernel function through global optimization of the variational method, so that it can effectively process the peak boundary features in complex spectra.

[0015] Based on the adaptive distance calculation kernel function, the weighted distance of each spectral point to its left and right effective valleys is calculated to generate a hierarchical-aware distance vector. This step identifies the valley candidate points through local minimum value detection, evaluates their effectiveness score to select the optimal valley, calculates the weighted distance using the adaptive distance calculation kernel function, and encodes and fuses the weighted distance and the hierarchical information of the peak site to generate a distance vector containing hierarchical-aware information, which provides important spatial structure information for subsequent segmentation decision.

[0016] Feature extraction is performed on standardized spectral sequences using a deep neural network to output an initial probability vector, which is then combined with a hierarchical distance vector for probability distribution correction. This step constructs a deep neural network containing multiple one-dimensional convolutional layers and an attention mechanism. Skip connections are used to preserve feature information at different levels of abstraction to generate the initial probability vector. Then, differentiated probability correction coefficients are set based on the hierarchical distance vector. The corrected probability vector is obtained through pointwise multiplication and local smoothing, providing a probability estimate of peak attributes.

[0017] Based on the corrected probability vector and the hierarchical sensing distance vector, a joint segmentation decision function for multi-level peak structures is constructed. This step involves performing continuity analysis on the probability vector to identify local maxima and their influence domains, extracting the directional derivative of the distance vector to calculate segmentation tendency indicators, constructing a region affiliation probability transition matrix, generating a probability-distance coupled feature tensor, extracting candidate segmentation lines through singular value decomposition, calculating the energy functional to determine the optimal boundary, and constructing the joint segmentation decision function to achieve accurate identification and segmentation of multi-level peak structures.

[0018] Based on a joint segmentation decision function, precise segmentation and hierarchical labeling of the main peak, shoulder peak, and sub-peaks in Raman spectra are achieved. This is the final execution step of the entire method. The optimized decision function is applied to the actual spectral data, outputting the peak assignment label and its confidence level for each spectral point. Through a hierarchical propagation mechanism, the recursive identification and precise segmentation of the main peak, shoulder peak, and sub-peaks are achieved, ultimately generating analytical results containing complete peak positions, boundaries, types, and hierarchical relationships, providing a precise foundation for subsequent substance identification and quantitative analysis.

[0019] In this embodiment of the invention, the detailed implementation steps for identifying potential peak sites and their hierarchical affiliations based on the spectral multi-level structure characterization matrix and by calculating the local curvature change rate within a sliding window include: An adaptively sized sliding window is set at each scale level of the spectral multi-level structure characterization matrix. The sliding window represents the spatial range for local feature analysis, and its size directly affects the accuracy and sensitivity of peak identification. An adaptive strategy is employed in setting the window size, which is proportional to the feature scale of the current scale level, typically one-third to one-half of the average peak width at that scale. The formula for calculating the window size is: ; in, For scale The window size below, For scale The average peak width below This is an adjustment factor, typically ranging from 0.3 to 0.5. Smaller windows are used for lower-scale layers to capture detailed changes, while larger windows are used for higher-scale layers to capture overall trends, ensuring the adaptability and accuracy of the analysis.

[0020] The second derivative sequence of the spectral curve within each sliding window is calculated, and the points of sign change in the second derivative sequence are extracted as candidate peak locations. The second derivative reflects the concavity and convexity of the curve and is an important feature for identifying peaks and troughs. The calculation uses the central difference method, and the formula is: ; in, Indicates the function at the point The second derivative at a given point. In Raman spectroscopy, the second derivative reflects the concavity and convexity of the spectral curve and is used to identify peaks (negative second derivative) and troughs (positive second derivative). Indicates at point The function value at that point, i.e., the spectral intensity value of the point adjacent to the right of the current point; Indicates at point The function value at that point, i.e., the spectral intensity value of the point adjacent to the left of the current point; Indicates the current point The function value at that point, i.e., the spectral intensity value at the point being analyzed; The sampling interval is typically a fixed interval between adjacent wavenumber points. The sign change point refers to the position where the second derivative changes from positive to negative or from negative to positive, corresponding to the peak and trough, respectively. Threshold filtering is applied during the extraction process to ignore spurious changes caused by minor fluctuations, improving the reliability of the identification.

[0021] For each candidate peak location, its significance score is calculated at different scale levels. The significance score is determined by the ratio of the absolute value of curvature at that point to the average curvature of its neighborhood. The significance score quantifies the prominence of the peak location relative to its surrounding region and is a key indicator for evaluating peak authenticity. The calculation formula is as follows: ; in, For point In scale The significance score on For point In scale The absolute value of curvature on, For With center radius The average curvature within the neighborhood of the peak. Curvature is calculated using a normalized second derivative expression, independent of spectral intensity, ensuring consistency across scale comparisons. A significance score is typically greater than 1; a higher score indicates a more significant peak location.

[0022] According to the distribution pattern of the saliency scores in each scale layer, the hierarchical type of the candidate peak site is determined, including a main peak candidate point, a shoulder peak candidate point or a sub-peak candidate point. The hierarchical type reflects the performance characteristics of the peak in the multi-scale space and is the basis for constructing the hierarchical structure. The determination rule is based on the distribution pattern of the saliency scores in each scale: the main peak candidate point has high saliency scores in multiple scale layers (usually the scores of more than 3 scale layers are greater than 2.0); the shoulder peak candidate point has medium saliency scores in low and medium scale layers, but the saliency is reduced in high scale layers (usually the scores of 1-2 low scale layers are greater than 1.5, and the score of the high scale layer is less than 1.0); and the sub-peak candidate point only has local high saliency scores in the lowest scale layer (usually only the score of the lowest scale layer is greater than 1.2, and the scores of other scale layers are low). This determination method based on multi-scale analysis can effectively distinguish different types of peak structures.

[0023] Based on the determined hierarchical type, the hierarchical attribution relationship of the potential peak sites is determined by cross-scale peak site association analysis to establish a dependency graph between different hierarchical peak sites. The dependency graph is a hierarchical peak structure representation that describes the dependency relationship between the main peak, the shoulder peak and the sub-peak. The construction process first calculates the spatial position similarity and intensity correlation between the peak sites of adjacent scale layers, establishes a cross-scale connection to form a multi-scale association network, identifies the main peak nodes that stably exist in multiple scales, determines the shoulder peak and the sub-peak according to the path relationship with the main peak node, and finally forms a complete dependency graph. This structured representation provides hierarchical prior knowledge for subsequent segmentation, which helps to solve the problems of peak overlap and weak signal.

[0024] In the embodiment of the present application, for each potential peak site, the neighborhood topology centered on the site is constructed, and the detailed implementation steps of calculating the asymmetry index and the peak shape complexity coefficient in the neighborhood include: The neighborhood radius is dynamically determined according to the hierarchical type of each potential peak site. The neighborhood radius determines the spatial range of feature analysis, and its size should be adapted to the scale of the peak. The determination process adopts a hierarchical adaptive strategy, and the neighborhood radius of the main peak candidate point is set to 0.8-1.2 times the half-width of the peak, the neighborhood radius of the shoulder peak candidate point is 0.6-0.8 times the estimated peak width, and the neighborhood radius of the sub-peak candidate point is 0.4-0.6 times the estimated peak width. This dynamic adjustment ensures that the neighborhood range can completely cover the peak shape characteristics, while avoiding the inclusion of too much irrelevant area, improving the accuracy and pertinence of the analysis.

[0025] In the determined neighborhood, the integral areas of the spectral curve of the left and right intervals are calculated respectively to obtain the left area value and the right area value. The integral area reflects the distribution characteristics of the peak shape on the left and right sides and is the basic data for evaluating the peak asymmetry. The calculation adopts the numerical integral method, usually using the trapezoidal rule or Simpson's rule, the left interval is defined as [peak site-neighborhood radius, peak site], and the right interval is defined as [peak site, peak site+neighborhood radius]. The integral calculation considers the influence of baseline correction, and ensures that the integral value accurately reflects the peak shape distribution rather than background interference.

[0026] According to the ratio of the difference value and the sum value of the left area value and the right area value, the asymmetry index is calculated . The asymmetry index quantifies the skew degree of the peak shape and is a key indicator for judging the symmetry of the peak shape. The index value range is [-1, 1], 0 indicates complete symmetry, a positive value indicates right skew (the peak shape is tailing in the high wavenumber direction), and a negative value indicates left skew (the peak shape is tailing in the low wavenumber direction). The size of the asymmetry index reflects the skew degree, and the larger the absolute value, the stronger the asymmetry.

[0027] By calculating the number of zero points of the high-order derivative of the spectral curve in the neighborhood, combined with the inflection point distribution density of the spectral curve, the peak shape complexity coefficient is determined. The peak shape complexity coefficient reflects the complexity of the peak shape structure and is an important indicator for distinguishing simple single peaks from complex multi-component peaks. The determination process first calculates the third derivative and the fourth derivative sequence, counts the number of sign changes of the third derivative as an estimated value of the number of inflection points, calculates the number of zero points of the fourth derivative as a complexity supplement index, then calculates the inflection point distribution uniformity coefficient, and finally generates a comprehensive peak shape complexity coefficient through weighted combination. The coefficient usually takes a value range of [0, 5], and the larger the value, the more complex the peak shape, which may contain multiple overlapping components.

[0028] The asymmetry index and the peak shape complexity coefficient are normalized. The normalization processing eliminates the influence of different dimensions and value ranges, making the indicators comparable and consistent. The processing adopts the Min-Max normalization method, maps the asymmetry index to the [0, 1] interval (the original value [-1, 1] is transformed ), and the peak shape complexity coefficient is mapped to the [0, 1] interval (scaled by setting an upper limit value). The normalized indicators retain the relative relationship of the original characteristics, and improve the stability and reliability of the subsequent processing, providing standardized parameter input for generating an adaptive distance calculation kernel function.

[0029] In the embodiment of the present application, the detailed implementation steps of generating an adaptive distance calculation kernel function according to the asymmetry index and the peak shape complexity coefficient include: The skew direction of the peak shape is identified based on the sign characteristic of the asymmetry index, and the correlation coefficient between the degree of skewness and the peak position offset is calculated. The skew direction reflects the asymmetric characteristics of the peak shape and is the basis for constructing the directional weighted gradient field. The identification process determines the skew direction by the sign of the asymmetry index; a positive value indicates right skewness, and a negative value indicates left skewness. The correlation coefficient is calculated using the following formula: ; in, The correlation coefficient, It is an asymmetric index. This is the theoretical peak position. The apparent peak position, The half-width at half-maximum (WHM) of the peak. The correlation coefficient quantifies the strength of the relationship between the degree of skewness and the shift in peak position, and typically ranges from [0, 0.5]. A larger value indicates a more significant impact of skewness on peak position.

[0030] Based on the correlation coefficient, a directional weight gradient field is constructed, generating a dense weight distribution on the steep side of the peak and a sparse weight distribution on the gentle side. The directional weight gradient field is a spatially varying weight distribution that reflects the contribution of different locations to distance calculation. The construction process employs an asymmetric Gaussian kernel function, generating a smaller standard deviation parameter on the opposite side of the skew direction (the steep side), resulting in a dense weight distribution; and generating a larger standard deviation parameter on the same side of the skew direction (the gentle side), resulting in a sparse weight distribution. This design can adapt to the boundary characteristics of an asymmetric peak, providing more refined boundary localization capabilities on the steep side and tolerating greater boundary ambiguity on the gentle side.

[0031] The peak complexity coefficients are transformed into adaptive window scale parameters through a nonlinear mapping function, where higher complexity corresponds to a finer window scale. The adaptive window scale parameter determines the spatial resolution of the kernel function, directly affecting the accuracy of boundary recognition. The mapping function adopts an exponential decay form: ; in, For adaptive window scaling parameters, The reference window size is (usually set to 1 / 3 of the peak half-width). This is the attenuation coefficient (typically ranging from 0.5 to 1.0). denoted as the peak shape complexity coefficient. This nonlinear mapping ensures that high-complexity peak regions receive a finer window scale, improving sensitivity to subtle structural changes.

[0032] In the window scale determined by the adaptive window scale parameter, a distance sensitivity decay function is constructed according to the geodesic distance of the spectral point to the window center, and the decay rate is negatively correlated with the peak shape complexity coefficient. The distance sensitivity decay function describes the decay law of the influence of spatial distance on weight, and is a key component of the kernel function. The construction adopts the form of generalized Gaussian function: ; wherein, is the sensitivity value at the distance , is the adaptive window scale parameter, is the shape parameter, and is negatively correlated with the peak shape complexity coefficient: (when , take ). This design makes the complex peak shape obtain a slower decay rate, expanding the effective analysis range, while the simple peak shape obtains a faster decay rate, improving the local specificity.

[0033] For different levels of peak points, based on the peak shape complexity coefficient, a differentiated spatial influence domain is generated through hierarchical feature coding, wherein the influence domain of the main peak is determined by the convex hull algorithm, the influence domain of the shoulder peak is determined by the local tangent method, and the influence domain of the sub-peak is determined by the minimum circumscribed rectangle. The spatial influence domain defines the effective range of the kernel function, and considers the feature differences of different levels of peaks. The main peak influence domain uses the convex hull algorithm to enclose the overall contour of the peak; the shoulder peak influence domain uses the local tangent method to identify the boundary area with the main peak, emphasizing the accurate description of the boundary area; the sub-peak influence domain uses the minimum circumscribed rectangle method to ensure complete coverage of small-scale features. The size of each influence domain is also adjusted by the peak shape complexity coefficient, and the peak with high complexity obtains a relatively expanded influence domain, enhancing the adaptability to complex structures.

[0034] The directional weight gradient field is anisotropically diffused in the differentiated spatial influence domain, and the diffusion coefficient is modulated by the distance sensitivity decay function. Anisotropic diffusion is a spatial smoothing technique that can maintain boundary features while reducing noise effects. The diffusion process uses a nonlinear partial differential equation model to perform strong diffusion in the boundary direction and weak diffusion in the boundary normal direction, maintaining the sharpness of the boundary. The diffusion coefficient is modulated by the distance sensitivity decay function, ensuring that the window center region obtains small diffusion to preserve fine structures, and the edge region obtains large diffusion to achieve smooth transition. This diffusion strategy significantly improves the boundary positioning ability of the kernel function in complex peak shapes.

[0035] ​The boundary constraint optimization is performed on the diffused directional weight gradient field, and the smooth transition of the adaptive distance calculation kernel function at the peak boundary is ensured by solving the Poisson equation. ; wherein, is the kernel function to be optimized, and is the unknown function to be solved in the Poisson equation. In Raman spectrum analysis, determines how to calculate the "distance" between spectral points, especially how to handle the boundary characteristics of different levels of peaks (main peak, shoulder peak, and sub-peak). is the Laplacian operator of the diffused directional weight gradient field, which defines how the kernel function K changes in space, thereby guiding the kernel function to form appropriate gradient characteristics in the peak boundary region. is the Laplacian operator, which is a second-order differential operator representing the sum of the second-order partial derivatives of the function K in each spatial direction.

[0036] The global optimization of the adaptive distance calculation kernel function is performed by the variational method, which minimizes the total variation of the kernel function while maintaining its local feature response capability, thereby generating the final adaptive distance calculation kernel function. ; wherein, represents the gradient of the kernel function K, i.e. the rate of change of K in each direction in space; the first term is the total variation term to promote smoothing, and the second term is the fidelity term to maintain local features, is the kernel function before optimization, is the balance parameter, which is usually dynamically adjusted according to the complexity of the peak shape. The optimization uses gradient descent or ADMM algorithm to solve, and obtains the final kernel function with both smoothing and local response capability, which provides an accurate and reliable measurement tool for distance calculation.

[0037] In the embodiments of the present application, based on the adaptive distance calculation kernel function, the weighted distance of each spectral point to its left and right effective trough is calculated, and the detailed implementation steps of generating a hierarchical-aware distance vector include: For each spectral point, all the valley candidate points on its left and right sides are identified by a local minimum detection algorithm. The valley candidate point is a potential peak boundary position and is the basis for calculating the distance vector. The detection algorithm uses a local minimum search strategy to find the points that meet the first derivative of zero and the second derivative of positive on the left and right sides of the spectral point. To improve the detection reliability, threshold filtering is applied to ignore the false valleys caused by small fluctuations, usually requiring the valley depth to be greater than a certain proportion (such as 15-25%) of the average intensity of the surrounding area. For areas with high noise, local smoothing is performed before detection to ensure the stability of the identification results.

[0038] According to the depth value of the valley candidate point and the spectral distance from the current spectral point, the effectiveness score of each valley candidate point is calculated. The effectiveness score quantifies the reliability of the valley as a peak boundary and is the basis for selecting the optimal valley. The calculation formula is: ; wherein, is the effectiveness score, is the valley depth (normalized depth value relative to the local baseline), is the spectral distance from the valley to the current spectral point, is the scale parameter (usually set to 1 / 3 of the average peak width of the current region). This formula considers both the depth and distance of the valley, with higher depth and lower distance resulting in higher scores, which conforms to the physical characteristics of the true peak boundary.

[0039] The left and right valleys with the highest effectiveness scores are selected as the effective valleys, denoted as the left effective valley and the right effective valley. The effective valley is the reference point for distance calculation and represents the most likely peak boundary position. The selection process compares the effectiveness scores of all candidate points on the left and right sides and selects the valleys corresponding to the highest scores. For some special cases, such as no candidate points on one side or all candidate points with too low scores, fixed distance extrapolation or estimation of valley position based on statistical characteristics of adjacent regions can be used to ensure that each spectral point can obtain reasonable left and right effective valleys.

[0040] An adaptive distance calculation kernel function is used to calculate the weighted distance from the current spectral point to the left and right effective valleys. The weighted distance is an improved form of the traditional Euclidean distance, taking into account the influence of peak shape characteristics on distance measurement. The calculation formula is: ; wherein, is the weighted distance from point to valley , is the Euclidean distance from point to valley , Calculate the kernel function for adaptive distance along the path The integral average over the peaks is used. This weighting strategy enables distance calculation to adapt to peak characteristics, providing a more accurate distance metric in complex boundary regions and effectively addressing the limitations of traditional distance metrics in areas of peak overlap.

[0041] The weighted distance is encoded and fused with hierarchical information of potential peak points to generate a distance vector containing hierarchical awareness information. This hierarchical awareness distance vector not only contains spatial distance information but also incorporates peak hierarchy structure information, providing richer feature representations for segmentation decisions. The fusion employs a hierarchical encoding function: ; in, For point The hierarchical perception distance vector, and These are the weighted distances to the left and right effective troughs, respectively. For hierarchical coding items, reflecting points The peak hierarchy type (main peak, shoulder peak, or sub-peak) and its confidence level are determined. The hierarchy coding term is determined by its association with the nearest potential peak location, enabling the distance vector to effectively distinguish peak structures at different levels and providing hierarchical prior information for subsequent segmentation.

[0042] In this embodiment of the invention, the detailed implementation steps for feature extraction of a standardized spectral sequence using a deep neural network, outputting an initial probability vector, and combining it with a hierarchical perception distance vector for probability distribution correction include: A deep neural network containing multiple one-dimensional convolutional layers and an attention mechanism module is constructed to perform end-to-end feature learning on standardized spectral sequences. Deep neural networks are powerful tools for extracting complex spectral features and can automatically learn hidden patterns in spectral data. The network structure contains 3-5 one-dimensional convolutional layers, each followed by batch normalization and ReLU activation functions. The kernel size increases progressively (3, 5, 7, 9, 11) layer by layer to capture features at different scales. The attention mechanism module employs a self-attention design, enhancing the expressive power of important features by calculating the correlation between different positions in the spectrum. The network is trained using a labeled spectral dataset, employing a cross-entropy loss function and the Adam optimizer, with a cosine annealing learning rate strategy to ensure the model converges to the optimal solution.

[0043] Skip connections are introduced in the middle layers of the network to preserve spectral feature information at different levels of abstraction. Skip connections are an effective technique for solving the gradient vanishing problem in deep networks and preserving multi-level features. The implementation employs a residual connection structure, directly adding the output of the previous layer to the output of the next layer through short-circuit connections, forming a residual learning mode. Specific designs include: long skip connections from shallow to deep layers to preserve original detail information; short skip connections between adjacent layers to enhance local feature transfer; and parallel fusion of features at different scales to integrate multi-scale information. This multi-level feature preservation mechanism significantly improves the network's ability to recognize complex peak shapes, especially its ability to distinguish easily confused structures such as shoulder peaks and sub-peaks.

[0044] The output layer of the network generates an initial probability vector, representing the probability of each spectral point belonging to a feature peak. This initial probability vector is the neural network's raw judgment of the spectral peak structure, reflecting the data-driven feature recognition result. The output layer uses a sigmoid activation function to convert the feature mapping into probability values ​​in the [0,1] interval, representing the likelihood of each spectral point belonging to the peak region. To improve the reliability of the probability estimation, an attention gating mechanism is added before the output layer, dynamically adjusting the output weights at different positions based on local context information. This enhances the accuracy of probability judgment in high signal-to-noise ratio regions and reduces the uncertainty impact in noisy regions. The initial probability vector, as a purely data-driven result, provides the foundation for subsequent fusion with prior knowledge.

[0045] Based on the hierarchical information in the distance vector perceived by hierarchy, differentiated probability correction coefficients are set for peak regions at different levels. These probability correction coefficients are key parameters that integrate prior knowledge with data-driven results, allowing for targeted adjustments based on the hierarchical characteristics of the peaks. The setting process first extracts the peak hierarchy identifier corresponding to each spectral point from the distance vector, and then assigns different correction coefficients according to the hierarchy type: a baseline coefficient of 1.0 is set for the main peak region to maintain its original probability value; a correction coefficient of 0.7-0.9 is set for the shoulder peak region based on its relative height ratio to the main peak; and a correction coefficient of 0.5-0.7 is set for the sub-peak region based on its degree of independence. At the boundaries between hierarchical regions, a Gaussian kernel function is used to achieve a smooth transition of the correction coefficients, avoiding abrupt changes in the probability distribution. This differentiated setting reflects the differences in the difficulty and importance of identifying peaks at different levels, helping to balance the accuracy of identifying main and secondary peaks.

[0046] The corrected probability vector is obtained by performing pointwise multiplication of the initial probability vector with the probability correction coefficient and then applying local smoothing. The corrected probability vector integrates data-driven results and prior knowledge, providing a more accurate estimate of peak attribute probability. The pointwise multiplication operation directly applies the correction coefficient to the initial probability: ; in, For point the modified probability value of the probability vector, is an initial probability value, is a probability correction coefficient. The local smoothing process adopts an adaptive window average method, and the window size is proportional to the local peak width, ensuring that the smoothing process does not destroy the basic morphological characteristics of the peak. This fusion strategy not only retains the data features extracted by the neural network, but also introduces prior constraints based on physical and chemical knowledge, significantly improving the accuracy and reliability of the probability estimation, providing higher quality input for subsequent segmentation decisions.

[0047] In the embodiments of the present application, the detailed implementation steps of constructing the joint segmentation decision function of the multi-level peak structure according to the modified probability vector and the hierarchical perception distance vector include: Performing continuity analysis on the modified probability vector, identifying local maximum points of the probability value and their influence domains, and marking the overlapping region of adjacent influence domains as a region to be decided. The local maximum point usually corresponds to the center position of the peak and is the starting point for constructing the segmentation region. The identification adopts a sliding window maximum value detection to ensure the local significance of the maximum point. The influence domain is determined by expanding from the maximum point to both sides until the probability value decreases to a threshold or another rising trend is encountered, reflecting the coverage of the peak. The overlapping region of adjacent influence domains is a region with fuzzy peak boundaries, which needs to be accurately decided to achieve accurate segmentation. This analysis method based on probability continuity can effectively identify the multi-peak structure in complex spectra and provide initial division for subsequent boundary optimization.

[0048] In each region to be decided, the directional derivative of the hierarchical perception distance vector is extracted, and the segmentation tendency index of the region is determined by calculating the ratio of the left derivative to the right derivative. The directional derivative reflects the trend of distance change and is an important basis for judging point attribution. The left derivative and the right derivative are calculated as the rate of change of the distance vector in the left and right directions, respectively.

[0049] The segmentation tendency index is calculated as: ; The index greater than 1 indicates that the point is more inclined to belong to the right peak, less than 1 indicates that it is more inclined to belong to the left peak, and close to 1 indicates that it is at the boundary position. This analysis based on distance gradient provides a segmentation basis from the perspective of spatial structure, supplementing the judgment information of probability distribution.

[0050] Based on the segmentation tendency index, a region attribution probability transition matrix is constructed, and the matrix elements represent the transition probability of each point in the region to be decided to belong to adjacent peaks. The transition matrix is a mathematical representation of the possibility of points belonging to different peaks, providing a probability framework for segmentation decisions. The matrix construction adopts Sigmoid transformation of the segmentation tendency index: ; where, is the point from peak to peak , the probability, is the steepness parameter, is the offset parameter (usually set to 1). The transition matrix satisfies the constraint that the row sum is 1, ensuring the rationality of probability interpretation. This probabilistic transition model can handle fuzzy boundary cases, allowing soft segmentation results, which are more consistent with the physical reality of spectral peak overlap.

[0051] The local curvature information of the probability vector and the second-order difference information of the distance vector are tensor product operated to generate a probability-distance coupling feature tensor. The coupling feature tensor fuses two complementary information of probability distribution and spatial structure, providing a more comprehensive segmentation feature representation. The calculation process first extracts the local curvature (second derivative) of the probability vector and the second-order difference of the distance vector, and then correlates them through tensor product operation: ; where, is the coupling feature tensor of point , the probability curvature vector , the distance second-order difference vector , and the tensor product operation is denoted by . The coupling feature tensor contains the correlation information of probability change and distance change, which can more effectively describe the peak boundary features, especially in complex overlapping regions.

[0052] By singular value decomposition of the probability-distance coupling feature tensor, the principal component direction is extracted as the candidate segmentation line of the peak boundary. Singular value decomposition is a mathematical tool for extracting the main variation direction of data, used to determine the best segmentation direction. The decomposition process processes the coupling feature tensor of each region to be decided: ; where, and contain left and right singular vectors, is a diagonal matrix of singular values, is the transpose. The singular vector corresponding to the largest singular value indicates the direction of the most significant data variation, which usually corresponds to the best segmentation direction of the peak boundary. On this basis, combined with the geometric characteristics of the region to be decided, a set of candidate segmentation lines are generated, each line representing a possible boundary position. This segmentation line generation method based on data variation direction can adapt to complex peak shapes and provide boundary candidates with clear physical meaning.

[0053] The energy functional is calculated along each candidate segmentation line. The energy functional consists of a probability gradient term, a distance continuity term, and a hierarchy consistency term. The segmentation line that minimizes the energy functional is identified using the variational principle and is considered the optimal boundary. The energy functional is a mathematical measure of segmentation quality, comprehensively considering multiple segmentation criteria. The energy formula is: ; in, Candidate dividing line, This represents the total energy functional calculated along the candidate dividing line C; The probability gradient term ensures that the boundary lies at the point of maximum probability change. To ensure the continuity of the distance term, the boundary and distance field structure must be consistent. To ensure the consistency of the hierarchical terms, the boundaries and peak hierarchical structure must be aligned. , , The weighting coefficients are used. The curve that minimizes energy is found using the variational method, which serves as the optimal segmentation boundary, achieving accurate segmentation through multi-criteria collaborative optimization.

[0054] Based on the determined optimal boundary and region assignment probability transition matrix, a joint segmentation decision function for multi-level peak structures is constructed. This function outputs the peak assignment label and its confidence score for each spectral point. The joint segmentation decision function is the mathematical model for the final segmentation task, comprehensively considering all the aforementioned analytical results. The function form is: ; in, For point Peak attribution label, The corresponding confidence level is used. The decision-making process directly applies the influence domain label of the local maxima point to non-decision regions; for decision regions, it combines the optimal boundary location and the transition matrix probability for judgment, while simultaneously calculating the decision confidence level. This joint decision-making mechanism considers both the accuracy of hard boundaries and the uncertainty information of soft probabilities, providing a more comprehensive segmentation result for subsequent analysis.

[0055] By employing a hierarchical propagation mechanism using a joint segmentation decision function, recursive identification and accurate segmentation of the main peak, shoulder peaks, and sub-peaks are achieved. For example... Figure 3 The diagram shows the final segmentation result of this method. The hierarchical propagation mechanism is a key technology for handling multi-level peak structures, achieving hierarchical segmentation through top-down recursive processing. The mechanism first identifies and segments the main peak, then searches for shoulder peak features within the main peak region, further identifying sub-peak structures within the shoulder or main peak regions. Each level of segmentation utilizes the result of the previous level as a constraint, ensuring the consistency of the hierarchical structure. This recursive segmentation strategy is consistent with the physical mechanism of spectral peak formation, effectively handling complex multi-level peak structures and providing both accurate and hierarchical segmentation results.

[0056] In the embodiments of the present application, the dependent relationship map between different hierarchical peak sites is established through cross-scale peak site correlation analysis. The detailed implementation steps include: The spatial position similarity and intensity correlation of the candidate peak sites are calculated between adjacent scale layers. The spatial position similarity and intensity correlation are key indicators for judging whether the peak sites of different scale layers correspond to the same physical feature. The spatial position similarity is calculated by normalized Euclidean distance: ; wherein is the spatial position similarity between the peak site in the scale and the peak site in the scale , is the wave number position difference between the peak site in the scale and the peak site in the scale , is the scale parameter (usually set to 1 / 5 of the average peak width). The intensity correlation is calculated by the intensity distribution correlation coefficient in the neighborhood of the peak site, reflecting the similarity of the peak shape. The two indicators comprehensively evaluate the corresponding relationship of the peak sites in the multi-scale space, providing a quantitative basis for establishing cross-scale connection.

[0057] The cross-scale connection is established for the peak site pairs that meet the similarity threshold, forming a multi-scale correlation network of peak sites. The multi-scale correlation network is a graph structure that describes the connection relationship of the peak sites between different scales. The connection establishment process sets a comprehensive similarity threshold, usually requiring that the spatial position similarity is greater than 0.7 and the intensity correlation is greater than 0.5. The directed connection is established between the peak site pairs that meet the conditions, pointing from the low scale to the high scale. The network construction adopts a bottom-up strategy, first connecting adjacent scale layers, and then establishing indirect connections across multiple layers through transmission relationship. This multi-scale correlation network comprehensively describes the evolution relationship of the peak features in the scale space, providing a topological basis for subsequent hierarchical analysis.

[0058] The connectivity of the multi-scale correlation network is analyzed by graph theory algorithm, and the main peak nodes that stably exist in multiple scales are identified. The main peak node is a significant feature that stably exists across multiple scales, representing the main component peak in the spectrum. The identification process adopts connected component analysis and node centrality measurement, and calculates the cross-scale persistence index of each node: ; wherein, is the cross-scale persistence index of the node , is the cross-scale persistence index of the node In scale An indicator function for existence (1 if it exists, 0 otherwise). For scale The weights of peaks are determined (usually higher at higher scales). Peaks with a persistence index greater than a preset threshold (usually 70% of the total number of scales) and high node centrality are identified as main peak nodes. This main peak identification method based on multi-scale stability can effectively distinguish between primary features and noise or secondary features, providing a reliable basis for peak hierarchy division.

[0059] For peak locations appearing only at certain scales, they are determined as shoulder peaks or sub-peaks based on the shortest path length to the main peak node. The shortest path length reflects the degree of connection between the peak location and the main peak node and is an important basis for determining the hierarchical type of secondary peaks. The Dijkstra algorithm is used to find the shortest path in a multi-scale interconnected network, with path length considering connection strength as a weight. The determination rules are as follows: peak locations directly connected to the main peak node (path length of 1) and appearing at the intermediate scale layer are determined as shoulder peaks; peak locations connected to the main peak or shoulder peak node through multiple steps (path length greater than 1) or appearing only at the lowest scale layer are determined as sub-peaks. This hierarchical determination method based on topological relationships considers the scale characteristics and spatial correlation of peaks, and can accurately distinguish different types of secondary peak structures.

[0060] Based on the spatial proximity and intensity inclusion relationships between peak locations, a hierarchical dependency graph is constructed. The dependency graph is a tree-like structure describing the hierarchical dependencies between the main peak, shoulder peaks, and sub-peaks. The construction process first sets the main peak node as the root node, and then establishes dependency connections based on spatial proximity (wavenumber position difference less than a preset threshold) and intensity inclusion relationships (lower-level peaks are within the influence range of higher-level peaks). Each edge in the graph represents a dependency pair; for example, a shoulder peak belongs to a specific main peak, and a sub-peak belongs to a specific shoulder peak or main peak. The resulting dependency graph comprehensively describes the hierarchical organization of the peak structure in the spectrum, providing structured prior knowledge for subsequent segmentation, and is particularly helpful in solving the boundary delineation problem of overlapping peak regions.

[0061] In this embodiment of the invention, the detailed implementation steps for determining the peak shape complexity coefficient by calculating the number of zeros of the higher-order derivatives of the spectral curve within the neighborhood and combining this with the inflection point distribution density of the spectral curve include: The third and fourth derivative sequences are calculated for the spectral curves within the neighborhood. Higher-order derivatives contain fine-grained structural information about the curve shape and are important tools for evaluating peak complexity. The calculation employs the finite-difference method. Considering the influence of noise, the spectral curves are first appropriately smoothed (typically using Savitzky-Golay filtering) before calculating the third derivative. To improve computational stability, the higher-order derivative sequences are smoothed again to eliminate artificial fluctuations caused by numerical calculations and preserve the true physical characteristics.

[0062] The number of sign changes in the third derivative sequence is counted as an estimate of the number of inflection points. The zeros of the third derivative correspond to the positions of the inflection points of the original curve, which are the key feature points of the curve shape change. The statistical process first identifies the sign change points in the third derivative sequence (from positive to negative or from negative to positive), and then applies a threshold to filter out the false change points caused by small fluctuations, usually requiring the absolute values before and after the change to be greater than a certain multiple (such as 1.5 times) of the standard deviation of the sequence. The number of inflection points is a direct indicator of peak complexity, and a simple and single Gaussian peak usually has only 2 inflection points (one on each side of the peak), while a complex multi-component overlapping peak may have 4 or more inflection points, reflecting the complexity of the peak structure.

[0063] The number of zeros of the fourth derivative sequence is calculated as a supplementary indicator of curve complexity. The zeros of the fourth derivative correspond to the extreme points of the curvature of the original curve, providing additional information about the peak shape structure. The calculation process is similar to that of the third derivative, identifying the zeros and performing filtering to ensure the reliability of the results. The number of zeros of the fourth derivative reflects the complexity of the peak profile, especially for the shape characteristics of asymmetric peaks and overlapping peaks, and is a effective supplement to the analysis of inflection points of the third derivative. By combining the information of the third and fourth derivatives, the complexity of the peak shape can be more comprehensively evaluated.

[0064] According to the ratio of the minimum distance and the average distance between the inflection points, the uniformity coefficient of the inflection point distribution is determined. The uniformity coefficient reflects the spatial characteristics of the inflection point distribution and is an important indicator for distinguishing different types of complex peaks. The calculation formula is: ; where, is the distance between adjacent inflection points, is the minimum distance, is the average distance. The uniformity coefficient has a value range of [0, 1], and the closer the value is to 1, the more uniform the inflection point distribution, which usually corresponds to a single wide peak; the smaller the value, the more uneven the distribution, which usually corresponds to a multi-peak overlapping structure. This index can effectively distinguish between wide single peaks and multi-peak overlapping structures, providing morphological information that traditional kurtosis and skewness indicators cannot capture.

[0065] The number of inflection points, the number of zeros, and the uniformity coefficient are combined to generate a comprehensive peak shape complexity coefficient. The peak shape complexity coefficient is a dimensionless index that comprehensively evaluates the complexity of the peak shape structure, integrating multiple morphological characteristics. The combination formula is: ; where, is the peak shape complexity coefficient, is the number of inflection points, is the number of zeros of the fourth derivative, For uniformity coefficient, , , For weight coefficient (usually set to 0.5, 0.3, 0.2). The formula design considers the reference state of normal single peak (2 inflection points, 2 fourth derivative zero points, uniformity close to 1), normalizes the complexity coefficient to the interval [0, 1], and the larger the value, the more complex the peak shape. This comprehensive evaluation method can accurately reflect the structural characteristics of various complex peak shapes and provide reliable complexity quantification indicators for subsequent processing.

[0066] In the embodiment of the application, the detailed implementation steps for setting different probability correction coefficients for peak regions of different levels according to the level information in the level-aware distance vector include: The peak level identifier corresponding to each spectral point is extracted from the level-aware distance vector. The peak level identifier is the level information encoded in the distance vector, which directly reflects the peak level type to which the spectral point belongs. The extraction process is usually located in a specific dimension of the vector or obtained by a specific decoding function according to the structure design of the distance vector. The level identifier usually uses discrete values to represent different types: for example, value 1 represents the main peak region, value 2 represents the shoulder peak region, and value 3 represents the sub-peak region, or uses continuous values to represent the probability distribution of level attribution. The extracted level identifier provides a partition basis for subsequent differential processing, ensuring that different types of peak regions obtain appropriate processing strategies.

[0067] Based on the peak level identifier, the reference correction coefficient for the main peak region is set to 1.0, keeping its original probability value. The main peak is the most prominent and reliable feature in the spectrum, and the neural network usually has high accuracy in identifying it, so keeping the original probability value is a reasonable strategy. The setting process sets the correction coefficient of all spectral points with peak level identifier as the main peak to 1.0, ensuring that the probability judgment of the main peak region is not affected by human adjustment. This processing reflects the trust in the neural network's ability to identify the main peak, and also serves as a reference for other level corrections, ensuring the consistency and interpretability of the correction process.

[0068] For the shoulder peak region, a correction coefficient between 0.7 and 0.9 is set according to its relative height ratio to the main peak. The shoulder peak is a secondary peak structure attached to the side of the main peak, and its identification difficulty is greater than that of the main peak but less than that of the sub-peak, requiring moderate probability enhancement. The correction coefficient calculation formula is: ; Where, is the correction coefficient of point , is the height of the shoulder peak at point , The relative height ratio is the height of the associated main peak. The greater the relative height ratio, the more significant the shoulder peak, and the closer the correction coefficient is to 1; the smaller the relative height ratio, the less obvious the shoulder peak, and the closer the correction coefficient is to 0.7. This dynamic adjustment based on physical characteristics ensures that the correction coefficient matches the actual significance of the shoulder peak, improving the relevance and effectiveness of probability correction.

[0069] For the sub-peak region, a correction coefficient between 0.5 and 0.7 is set according to its degree of independence. Sub-peak is a small-scale feature in the spectrum, usually with low signal-to-noise ratio or serious overlap with other peaks, and is the structure most easily missed by the neural network, requiring strong probability enhancement. The correction coefficient calculation formula is: ; wherein, is the independence index of the sub-peak where point p is located, calculated by the separation degree of the sub-peak from the surrounding peaks, and the index of a completely separated independent sub-peak is close to 1, and the index of a seriously overlapped sub-peak is close to 0. This design makes sub-peaks with strong independence obtain a higher correction coefficient (close to 0.7) to enhance their probability of being correctly identified; while sub-peaks with serious overlap obtain a lower correction coefficient (close to 0.5) to reflect their inherent uncertainty of identification. This differential strategy balances the relationship between enhancing identification rate and maintaining physical rationality.

[0070] At the junction of different hierarchical regions, the smoothing transition of the correction coefficient is realized by the Gaussian kernel function to avoid the mutation of the probability distribution. The smoothing transition at the junction of the regions is an important step to ensure the continuity of the probability distribution, which helps to generate physically reasonable segmentation results. The implementation adopts spatial weighted average: ; wherein, is the final correction coefficient of point , is the original correction coefficient of each hierarchical region, is the spatial weight, calculated by the Gaussian kernel function: ; wherein, is the distance from point to the boundary of region , is the smoothing parameter (usually set to 1 / 3 of the width of the junction region). This smoothing process ensures the gradual transition of the correction coefficient at the junction of the regions, avoids the discontinuity of the probability distribution caused by the hard threshold switching, and generates a smoother probability field that conforms to the physical reality, providing a continuous and reliable probability basis for subsequent segmentation decisions.

[0071] The present application obtains the original intensity sequence data of Raman spectrum and carries out multi-scale wavelet decomposition, combines with the local curvature change rate calculation to identify potential peak sites, constructs accurate neighborhood topology structure and adaptive distance calculation kernel function, generates hierarchical perception distance vector and probability vector, realizes accurate segmentation and hierarchical labeling of main peak, shoulder peak and sub-peak in Raman spectrum. It has high adaptability, can effectively deal with complex situations such as peak overlap, weak signal and background noise, and improves the accuracy and reliability of Raman spectrum analysis.

[0072] The above are only preferred embodiments of the present application and are not used to limit the present application, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments or replace some technical features with equivalent ones. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

[0073] It should be noted that the formula in the present specification is a value calculated by dimensionless, the formula is obtained by software simulation of a large number of data to obtain the most real situation, and the preset parameters and threshold in the formula are set by those skilled in the art according to the actual situation.

[0074] Although the embodiments of the present application have been shown and described, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to these embodiments without departing from the principles and purposes of the present application, and the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for segmenting Raman spectral characteristic peaks based on distance vector and probability vector outputs, characterized in that, include: The raw intensity sequence data of the Raman spectrum to be analyzed is obtained, and the raw intensity sequence data is preprocessed to obtain a standardized spectral sequence; The standardized spectral sequence is subjected to multi-scale wavelet decomposition to extract spectral detail features under different frequency components and construct a multi-level spectral structure representation matrix. Based on the aforementioned spectral multi-level structure characterization matrix, potential peak sites and their hierarchical affiliations are identified by calculating the local curvature change rate within a sliding window. For each potential peak point, a neighborhood topology centered on that point is constructed, and the asymmetry index and peak shape complexity coefficient within that neighborhood are calculated. An adaptive distance calculation kernel function is generated based on the asymmetry index and the peak shape complexity coefficient. Based on the adaptive distance calculation kernel function, the weighted distance from each spectral point to its left and right effective valleys is calculated to generate a hierarchical sensing distance vector. Feature extraction is performed on the standardized spectral sequence using a deep neural network to output an initial probability vector, which is then combined with the distance vector of the hierarchical perception to correct the probability distribution. Based on the corrected probability vector and the distance vector of the hierarchical perception, a joint segmentation decision function with a multi-level peak structure is constructed. Based on the joint segmentation decision function, accurate segmentation and hierarchical labeling of the main peak, shoulder peak, and sub-peaks in the Raman spectrum are achieved.

2. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, The process of identifying potential peak sites and their hierarchical affiliations based on the spectral multi-level structure characterization matrix, through calculation of the local curvature change rate within a sliding window, includes: An adaptively sized sliding window is set at each scale level of the spectral multi-level structure characterization matrix; Calculate the second derivative sequence of the spectral curve within each sliding window, and extract the sign change points of the second derivative sequence as candidate peak locations; For each candidate peak location, its significance score at different scale levels is calculated, and the significance score is determined by the ratio of the absolute value of curvature at that point to the average curvature of the neighborhood. Based on the distribution pattern of the significance score at each scale level, the hierarchical type of the candidate peak site is determined; Based on the determined hierarchical type, a hierarchy map of peak sites at different levels is established through cross-scale peak site correlation analysis to determine the hierarchical affiliation of the potential peak sites.

3. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, For each potential peak point, a neighborhood topology is constructed centered on that point, and the asymmetry index and peak complexity coefficient within that neighborhood are calculated, including: The neighborhood radius is dynamically determined based on the hierarchical type of each potential peak point. Within a defined neighborhood, calculate the area integral of the spectral curves for the left and right intervals respectively to obtain the area values ​​for the left and right sides. The asymmetry index is calculated based on the ratio of the difference between the area values ​​on the left and the right to the sum of their values. The peak shape complexity coefficient is determined by calculating the number of zeros of the higher-order derivatives of the spectral curve in the neighborhood and combining this with the inflection point distribution density of the spectral curve. The asymmetry index and the peak complexity coefficient are normalized.

4. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, The step of generating an adaptive distance calculation kernel function based on the asymmetric exponent and the peak complexity coefficient includes: The skew direction of the peak shape is identified based on the sign characteristics of the asymmetry index, and the correlation coefficient between the degree of skew and the offset of the peak position is calculated. Based on the correlation coefficient, a directional weight gradient field is constructed, generating a dense weight distribution on the steep side of the peak and a sparse weight distribution on the flat side. The peak-shaped complexity coefficient is converted into an adaptive window scale parameter through a nonlinear mapping function; Within the window scale determined by the adaptive window scale parameter, a distance sensitivity attenuation function is constructed based on the geodesic distance from the spectral point to the center of the window; For peak locations of different levels, a differentiated spatial influence domain is generated through hierarchical feature encoding based on the peak shape complexity coefficient. The directional weight gradient field is anisotropically diffused within the differentiated spatial influence domain; Boundary constraint optimization is performed on the diffused directional weight gradient field, and the smooth transition of the adaptive distance calculation kernel function at the peak boundary is ensured by solving the Poisson equation. The adaptive distance calculation kernel function is globally optimized using a variational method to minimize the total variation of the kernel function while preserving its local feature response capability, thereby generating the final adaptive distance calculation kernel function.

5. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, The step of calculating the weighted distance from each spectral point to its left and right effective valleys based on the adaptive distance calculation kernel function, and generating a hierarchical sensing distance vector, includes: For each spectral point, all candidate valley points on its left and right sides are identified using a local minimum detection algorithm; Calculate the effectiveness score of each trough candidate point based on its depth value and spectral distance from the current spectral point; Select the left and right troughs with the highest validity scores as valid troughs, and denote them as left valid troughs and right valid troughs; Using the adaptive distance calculation kernel function, the weighted distances from the current spectral point to the left effective valley and the right effective valley are calculated respectively. The weighted distance is encoded and fused with the hierarchical information of the potential peak points to generate a distance vector containing hierarchical perception information.

6. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, The step of extracting features from the standardized spectral sequence using a deep neural network, outputting an initial probability vector, and then correcting the probability distribution by combining it with the distance vector from the hierarchical perception includes: A deep neural network containing multiple one-dimensional convolutional layers and an attention mechanism module is constructed to perform end-to-end feature learning on the standardized spectral sequence; Skip connections are introduced in the middle layer of the network to preserve spectral feature information at different levels of abstraction; The output layer of the network generates an initial probability value for each spectral point belonging to a feature peak, forming an initial probability vector; Based on the hierarchical information in the distance vector perceived by the hierarchy, differentiated probability correction coefficients are set for peak regions of different levels. The corrected probability vector is obtained by performing point-by-point product operation between the initial probability vector and the probability correction coefficient, followed by local smoothing.

7. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 1, characterized in that, The step of constructing a joint segmentation decision function with a multi-level peak structure based on the corrected probability vector and the distance vector perceived at each level includes: A continuity analysis is performed on the corrected probability vector to identify the local maxima of the probability values ​​and their influence domains, and the overlapping areas of adjacent influence domains are marked as the decision-making areas. Within each region to be decided, the directional derivative of the distance vector perceived by the hierarchy is extracted, and the segmentation tendency index of the region is determined by calculating the ratio of the left derivative to the right derivative. Based on the aforementioned segmentation tendency index, a region affiliation probability transition matrix is ​​constructed; The local curvature information of the probability vector is multiplied by the second-order difference information of the distance vector to generate a probability-distance coupled feature tensor. By performing singular value decomposition on the probability-distance coupled feature tensor, the principal component directions are extracted as candidate segmentation lines for peak boundaries; The energy functional is calculated along each candidate dividing line. The energy functional consists of a probability gradient term, a distance continuity term, and a hierarchy consistency term. The dividing line that minimizes the energy functional is obtained by using the variational principle and is taken as the optimal boundary. Based on the determined optimal boundary and the region assignment probability transition matrix, a joint segmentation decision function for multi-level peak structures is constructed. This function outputs the peak assignment label and its confidence level for each spectral point.

8. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 2, characterized in that, The method involves establishing a hierarchy map of peak sites at different levels through cross-scale peak site correlation analysis, including: Between adjacent scale layers, the spatial similarity and intensity correlation of candidate peak sites are calculated; Cross-scale connections are established for peak point pairs that meet the similarity threshold, forming a multi-scale association network of peak points; The connectivity of the multi-scale interconnected network is analyzed using graph theory algorithms to identify the main peak nodes that are stable across multiple scales. For peak locations that appear only at certain scales, they are determined to be either shoulder peaks or sub-peaks based on the shortest path length between them and the main peak node. Based on the spatial proximity and intensity inclusion relationship between peak sites, a hierarchical subordinate relationship map is constructed.

9. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 3, characterized in that, The process of determining the peak shape complexity coefficient by calculating the number of zeros of the higher-order derivatives of the spectral curve within the neighborhood and combining this with the inflection point distribution density of the curve includes: Calculate the third and fourth derivative sequences for the spectral curves in the neighborhood; The number of sign changes in the third derivative sequence is counted to estimate the number of inflection points; Calculate the number of zeros in the fourth derivative sequence; The uniformity coefficient of the inflection point distribution is determined based on the ratio of the minimum spacing to the average spacing between inflection points. The number of inflection points, the number of zero points, and the uniformity coefficient are weighted and combined to generate a comprehensive peak shape complexity coefficient.

10. The Raman spectral characteristic peak segmentation method based on distance vector and probability vector output according to claim 6, characterized in that, The step of setting differentiated probability correction coefficients for peak regions at different levels based on the hierarchical information in the hierarchically perceived distance vector includes: Extract the peak level identifier corresponding to each spectral point from the distance vector perceived by the hierarchy; Based on the peak level identifier, a baseline correction coefficient of 1.0 is set for the main peak region to maintain its original probability value; For the shoulder peak region, a correction factor between 0.7 and 0.9 is set based on its relative height ratio to the main peak; For sub-peak regions, a correction factor between 0.5 and 0.7 is set according to their degree of independence; At the boundaries of different hierarchical regions, a smooth transition of the correction coefficients is achieved through a Gaussian kernel function.

Citation Information

Patent Citations

  • Robust Raman spectrum peak identification method

    CN109283169A

  • Raman spectrum peak fitting method, medium, equipment and device

    CN117150387A

  • High-precision spectral signal peak detection method and system

    CN120354155A

  • Public area microbial pollution risk assessment system based on spectral analysis

    CN120727112A

  • Apparatus and Method For Identifying Peaks In Liquid Chromatography / Mass Spectrometry And For Forming Spectra And Chromatograms

    US20070278395A1

Cited By

  • Mycotoxin non-targeted screening mass spectrum data processing method based on deep learning

    CN121617459A

  • Multi-scale fiber bragg grating multi-peak demodulation method fusing attention mechanism

    CN122023834A

  • A multi-scale fiber grating multi-peak demodulation method fusing an attention mechanism

    CN122023834B