A spectrum analysis method, device, apparatus and storage medium
By using an iterative residual peak-finding fitting algorithm to preprocess and fit multiple peaks in Raman spectral data, the problems of interference and noise in spectral analysis are solved, high-precision spectral analysis results are generated, and the degree of automation and accuracy of analysis results are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU YANQU INFORMATION TECH CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-05-26
AI Technical Summary
In existing Raman spectroscopy analysis, the raw spectral data is easily affected by background fluorescence, random noise, cosmic rays, etc., resulting in low signal-to-noise ratio, blurred peak characteristics, low accuracy of multi-peak fitting, reliance on manual intervention, and low degree of automation, leading to inaccurate analysis results.
An iterative residual peak-finding fitting algorithm is used to preprocess and fit multiple peaks in the spectral data, including data truncation, cosmic ray removal, baseline correction and smoothing. Combined with the iterative residual peak-finding fitting algorithm, the fitting model is gradually optimized to generate the final fitted spectrum and residual spectrum.
It effectively eliminates background interference and noise, improves the signal-to-noise ratio, accurately identifies multiple spectral peaks, avoids underfitting or overfitting, generates accurate spectral analysis results, and improves the automation level and reliability of the analysis results.
Smart Images

Figure CN122084597A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral analysis, and more particularly to a spectral analysis method, apparatus, device, and storage medium. Background Technology
[0002] Raman spectroscopy, as a rapid and non-destructive analytical technique, is widely used in the structural characterization of carbon materials and other materials. By analyzing the parameters and intensity ratios of characteristic spectral peaks such as the D peak and G peak, key structural information such as the degree of graphitization and defect density of materials can be accurately obtained, making it an important characterization method in the field of materials science.
[0003] In existing technologies, the analysis of Raman spectra usually requires simple preprocessing of the raw spectral data, followed by a one-time fitting of the spectral peaks in the target region using a curve fitting method based on the least squares method. Finally, relevant characteristic parameters are calculated based on the fitting results to obtain analytical conclusions. The preprocessing stage often uses manual or semi-automatic methods to select baseline correction and smoothing filtering. During the fitting process, the number, position, and shape of the spectral peaks also need to be assumed in advance, and then a function is used to complete the one-time fitting solution of the entire spectrum peaks.
[0004] In current Raman spectroscopy analysis, raw spectral data is easily affected by background fluorescence, random noise, cosmic rays, and other interferences. Simple preprocessing methods are insufficient to effectively eliminate these interferences, resulting in low signal-to-noise ratios and blurred peak characteristics. Furthermore, one-time fitting methods are highly dependent on model assumptions, and when faced with complex spectra containing overlapping peaks or hidden weak peaks, underfitting or overfitting problems are likely to occur, significantly reducing the accuracy of multi-peak fitting. Moreover, the entire analysis process requires a large amount of manual intervention, from the selection of preprocessing methods to the setting of initial fitting parameters, all of which rely on the operator's experience. The degree of automation is low, which reduces analysis efficiency and easily introduces subjective errors, affecting the accuracy and reliability of the analysis results. Summary of the Invention
[0005] This invention provides a spectral analysis method, apparatus, device, and storage medium. By proposing a spectral analysis method based on iterative residual peak finding, it solves the technical problems of strong background interference, high noise, low accuracy of multi-peak fitting, and low degree of automation in existing spectral analysis methods.
[0006] According to one aspect of the present invention, a spectral analysis method is provided, the method comprising: Obtain the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain the preprocessed spectral data; An iterative residual peak-finding fitting algorithm is used to perform multi-peak fitting on the preprocessed spectral data to obtain the final fitted spectrum and the final residual spectrum; Spectral analysis results are generated based on the final fitted spectrum and the final residual spectrum.
[0007] Optionally, the original spectral data is preprocessed to obtain preprocessed spectral data, including: truncating the original spectral data within a preset wavenumber range to obtain truncated spectral data; removing cosmic rays from the truncated spectral data to obtain removed spectral data; performing baseline correction on the removed spectral data to obtain corrected spectral data; and smoothing the corrected spectral data using a filter with a specified window size to obtain preprocessed spectral data.
[0008] Optionally, cosmic ray removal is performed on the truncated spectral data to obtain the removed spectral data, including: determining the deviation of each data point in the truncated spectral data from the local median, and identifying data pairs with deviations exceeding a preset threshold as cosmic ray noise points; using the cosmic ray noise points as points to be filled, and calculating the interpolation value of each point to be filled using a local interpolation method; and filling each interpolation value into the corresponding position of each point to be filled to obtain the removed spectral data.
[0009] Optionally, baseline correction is performed on the removed spectral data to obtain corrected spectral data. This includes: using a rubber band algorithm to calculate the convex hull of the removed spectral data to determine the convex hull vertices; determining whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data. If so, the vertex is taken as the target convex hull vertex and removed. The remaining convex hull vertices are then recalculated. Otherwise, the curve formed by fitting the remaining convex hull vertices is used as the estimated baseline curve. The original spectral data is subtracted from the estimated baseline curve to obtain the corrected spectral data.
[0010] Optionally, an iterative residual peak-finding fitting algorithm is used to perform multi-peak fitting on the preprocessed spectral data to obtain the final fitted spectrum and the final residual spectrum. This includes: using a peak-finding algorithm to locate peaks in the preprocessed spectral data and determine significant spectral peaks, where significant spectral peaks include a first significant main peak and a second significant main peak; fitting the first and second significant main peaks based on preset physical constraints to obtain an initial fitted spectrum; subtracting the initial fitted spectrum from the original spectral data to obtain an initial residual spectrum; and performing iterative residual peak-finding and fitting based on the initial fitted spectrum and the initial residual spectrum to obtain the final fitted spectrum and the final residual spectrum.
[0011] Optionally, iterative residual peak finding and fitting are performed based on the initial fitted spectrum and the initial residual spectrum to obtain the final fitted spectrum and the final residual spectrum. This includes: determining whether the initial residual spectrum meets the iteration termination condition; if so, using the initial fitted spectrum as the final fitted spectrum and the initial residual spectrum as the final residual spectrum; otherwise, searching for new significant spectral peaks in the initial residual spectrum, refitting based on the new significant spectral peaks to obtain updated fitted spectral data and residual spectra, and using the updated fitted spectrum and residual spectra as the new iteration basis for iteration until the residual spectrum meets the iteration termination condition to obtain the final fitted spectrum and the final residual spectrum.
[0012] Optionally, spectral analysis results are generated based on the final fitted spectrum and the final residual spectrum, including: extracting characteristic parameters of two final significant spectral peaks from the final fitted spectrum, wherein the characteristic parameters include the peak height and integral area of the final significant spectral peaks; using the characteristic parameters as peak intensities and calculating the ratio of the peak intensities of the two final significant spectral peaks to obtain the intensity ratio; performing quality verification through the final residual spectrum, and when the quality verification passes, integrating the characteristic parameters and intensity ratio as the spectral analysis results.
[0013] According to another aspect of the present invention, a spectral analysis apparatus is provided, the apparatus comprising: The spectral data preprocessing module is used to acquire the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain the preprocessed spectral data. The spectral data residual fitting module is used to perform multi-peak fitting on the preprocessed spectral data using an iterative residual peak-finding fitting algorithm to obtain the final fitted spectrum and the final residual spectrum. The spectral analysis module is used to generate spectral analysis results based on the final fitted spectrum and the final residual spectrum.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform a spectral analysis method according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement a spectral analysis method according to any embodiment of the present invention.
[0016] The technical solution of this invention, through preprocessing the original spectral data, effectively eliminates background interference, cosmic ray spurious signals, and random noise, thereby improving the signal-to-noise ratio of the spectral data. Employing an iterative residual peak-finding fitting algorithm for multi-peak fitting accurately identifies and fits all significant spectral peaks, avoiding underfitting and overfitting problems and improving the accuracy of multi-peak fitting. The generated spectral analysis results can accurately extract core feature indicators, and the fitting quality can be verified through residual spectroscopy, ensuring that the analysis results are accurate and reliable, truly reflecting the structural characteristics of the material.
[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a spectral analysis method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of another spectral analysis method provided in Embodiment 1 of the present invention; Figure 3 This is a flowchart of another spectral analysis method provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of a spectral analysis device according to Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements a spectral analysis method according to an embodiment of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] Example 1 Figure 1 This document provides a flowchart of a spectral analysis method according to Embodiment 1 of the present invention. This embodiment is applicable to Raman spectroscopy analysis scenarios. The method can be executed by a spectral analysis device, which can be implemented in hardware and / or software and can be configured in a computer controller. Figure 1 As shown, the method includes: S110. Obtain the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain the preprocessed spectral data.
[0023] Raw spectral data refers to unprocessed spectral detection data directly acquired from the detection equipment. Raw spectral data can be Raman spectra, containing a set of raw data points including Raman shifts and corresponding photon counts. Preprocessed spectral data refers to the spectral data obtained after a series of interference elimination and quality optimization operations, such as data truncation, cosmic ray removal, baseline correction, and data smoothing. It serves as the foundation for subsequent multi-peak fitting, significantly improving its signal-to-noise ratio and data validity.
[0024] Figure 2 A flowchart of a spectral analysis method is provided for Embodiment 1 of the present invention. Step S130 mainly includes the following steps S110 to S114: S111. Obtain the original spectral data to be analyzed, and truncate the original spectral data within the preset wavenumber range to obtain the truncated spectral data.
[0025] Data extraction refers to the process of selecting a spectral data segment within a preset wavenumber range according to the analysis requirements and removing irrelevant wavenumber regions from the original spectral data. This can reduce the amount of computation and eliminate interference signals from non-target regions.
[0026] Specifically, the system will extract data from the original spectral data within a preset wavenumber range. The horizontal axis of the Raman spectrum represents the wavenumber, with units of [missing information]. The characteristic spectral peaks of different materials are distributed in specific wavenumber ranges. For example, the D and G peaks of carbon materials are mainly distributed in the 1000-2000 wavenumber range. Therefore, the system will preset the wavenumber range according to the analysis target, retain only the original data points of Raman shift and corresponding signal intensity within the range, and remove all data in irrelevant wavenumber regions. By data truncation, the computational load of subsequent data processing can be reduced, and stray signal interference from non-target regions can be eliminated. Finally, the truncation spectral data containing only the target wavenumber range information is obtained.
[0027] S112. Perform cosmic ray removal on the extracted spectral data to obtain the removed spectral data.
[0028] Specifically, cosmic ray particles occasionally bombard the charge-coupled device (CCD) of a spectral detection device, forming sharp pseudo-signals with extremely high intensity and narrow width in the data. These pseudo-signals are easily misidentified as characteristic spectral peaks. This step uses an algorithm based on an improved Z-score to remove them. By calculating the deviation of data points from the local median, data points that deviate from the local median by more than a preset threshold are identified as cosmic ray noise points. Then, local interpolation is used to fill in the data at the positions of these noise points, completing the data repair and finally obtaining the spectral data after the removal of cosmic ray pseudo-signals.
[0029] Optionally, cosmic ray removal is performed on the truncated spectral data to obtain the removed spectral data, including: determining the deviation of each data point in the truncated spectral data from the local median, and identifying data pairs with deviations exceeding a preset threshold as cosmic ray noise points; using the cosmic ray noise points as points to be filled, and calculating the interpolation value of each point to be filled using a local interpolation method; and filling each interpolation value into the corresponding position of each point to be filled to obtain the removed spectral data.
[0030] Specifically, the system employs an improved Z-score algorithm for calculation. First, a local data window is defined centered on each data point. The local median of all data points within this window is calculated. The median effectively avoids interference from extreme values and better reflects the local characteristics of the spectral data. Then, the deviation between the detected value of each data point and its corresponding local median is calculated, yielding the specific deviation value for each data point. This deviation value accurately reflects the difference between a single data point and the surrounding normal spectral data. Next, the system identifies data points with deviation values exceeding a preset threshold as cosmic ray noise points. The pseudo-signals generated by cosmic ray bombardment of the detector manifest as anomalous data points with extremely high intensity and extremely narrow width. Their deviation values relative to the local median are much greater than those of normal spectral data points. Therefore, a reasonable deviation threshold is preset. This threshold can be adjusted according to the actual Raman spectroscopy detection scenario and data characteristics, generally around three standard deviations of the local data fluctuation. The system then filters out all data points with deviation values exceeding this preset threshold as cosmic ray noise points caused by cosmic ray interference. Then, cosmic ray noise points are used as the points to be filled. Local interpolation is employed to calculate the interpolation value for each point. Local interpolation utilizes the variation patterns of normal spectral data surrounding the point to fit a value that conforms to the overall spectral trend, replacing the outlier values of the noise points. Specifically, a suitable local effective data region is selected centered on each point to be filled. This region contains only normal data points not identified as noise points. Linear or polynomial interpolation is then used to calculate an interpolation value consistent with the trend of the surrounding spectral data, based on the coordinates and signal intensity of the normal data points within this region. This interpolation accurately matches the normal spectral signal characteristics of the point to be filled without disrupting the overall continuity of the spectral data. Finally, the interpolated values are filled into the corresponding positions of the points to be filled, resulting in the removed spectral data. The interpolated value calculated using local interpolation replaces the outlier values of the corresponding cosmic ray noise points in the original spectral data, completing the data repair for all noise point positions. The spectral data after interpolation and filling eliminates the sharp pseudo-signals from cosmic rays while preserving the normal characteristics and overall variation trend of the truncated spectral data.
[0031] S113. Perform baseline correction on the removed spectral data to obtain the corrected spectral data.
[0032] Specifically, the spectral data after correction still contains a broad and gradually changing background baseline signal generated by the fluorescence of the sample itself or impurities, the sample background, etc. This signal can mask the true Raman characteristic peaks and affect peak identification and intensity calculation. This step uses a rubber band algorithm for correction. By performing convex hull calculation on the spectral data, the convex hull will wrap around all spectral data points. Then, by iteratively removing vertices in the convex hull that are higher than the spectral data points, after multiple iterations, the remaining convex hull curve is an accurate estimate of the background baseline. Finally, the original spectral data is subtracted from this baseline curve to remove the background baseline signal, and finally, the corrected spectral data with only Raman characteristic signals and a small amount of random noise is obtained.
[0033] Optionally, baseline correction is performed on the removed spectral data to obtain corrected spectral data. This includes: using a rubber band algorithm to calculate the convex hull of the removed spectral data to determine the convex hull vertices; determining whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data. If so, the vertex is taken as the target convex hull vertex and removed. The remaining convex hull vertices are then recalculated. Otherwise, the curve formed by fitting the remaining convex hull vertices is used as the estimated baseline curve. The original spectral data is subtracted from the estimated baseline curve to obtain the corrected spectral data.
[0034] Specifically, the system uses a rubber band algorithm to calculate the convex hull of the removed spectral data to determine the convex hull vertices. A convex hull is the smallest convex polygon that can completely enclose all data points of the removed spectral data; its corresponding vertices are the convex hull vertices. Performing convex hull calculation on the spectral data essentially utilizes the enclosing property of the convex hull to initially delineate the outer contour of the spectral data. The convex hull vertices will include the trend characteristics of the background baseline and also the high-value data points corresponding to Raman characteristic spectral peaks. Then, the system will determine whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data. This is done by comparing the signal intensity value of each convex hull vertex with the actual signal intensity value of the removed spectral data point at the corresponding wavenumber position. If the intensity value of a convex hull vertex is higher than the intensity of the actual spectral data point at its corresponding position, it indicates that the vertex is not part of the background baseline but is an invalid vertex formed by high-signal points of Raman characteristic spectral peaks. In this case, the system will use this invalid vertex as the target convex hull vertex and remove it directly. After removal, the remaining convex hull vertices that were not removed will be recalculated to obtain a new convex hull and new convex hull vertices. By gradually eliminating the high-value interference vertices caused by Raman spectral peaks, the remaining convex hull vertices are made to better fit the actual changing trend of the background baseline, similar to the process of a rubber band gradually shrinking to fit the baseline.
[0035] Furthermore, the system continues to perform the aforementioned judgment, target vertex removal, and convex hull recalculation operations until no vertex in the convex hull is higher than the corresponding data point in the removed spectral data. At this point, all remaining convex hull vertices are valid vertices that can truly reflect the trend of the background baseline, and the convex hull formed by these vertices completely fits the contour of the background baseline, no longer containing interference from Raman peaks. The remaining convex hull vertices are then curve-fitted according to wavenumber order, and the resulting continuous smooth curve is the estimated baseline curve. This curve accurately matches the overall change characteristics of the background baseline in the removed spectral data, providing an accurate quantification of background interference such as fluorescence. Finally, the system subtracts the estimated baseline curve from the original spectral data to obtain the corrected spectral data.
[0036] S114. Smooth the corrected spectral data using a filter with a specified window size to obtain preprocessed spectral data.
[0037] It is known that the corrected spectral data still contains high-frequency random noise introduced by detector dark current, circuit noise, etc., which reduces the signal-to-noise ratio of the data. This step uses a Savitzky-Golay filter with a specified window size of 15 points, and is used in conjunction with a third-order polynomial. During processing, polynomial fitting is performed on local data points, and the fitted polynomial values are used to replace the original data point values. Compared with ordinary filtering methods, it can effectively filter out high-frequency random noise while preserving key physical characteristics such as the shape, width, and height of Raman spectral peaks to the greatest extent. After processing by this filter, the preprocessed spectral data with various interferences eliminated, high signal-to-noise ratio, and clear spectral peak characteristics is finally obtained, which can be directly used for subsequent iterative residual peak finding and fitting.
[0038] S120. The iterative residual peak-finding fitting algorithm is used to perform multi-peak fitting on the preprocessed spectral data to obtain the final fitted spectrum and the final residual spectrum.
[0039] The final fitted spectrum refers to the simulated spectral curve generated by the final cumulative peak model after all iterative fitting steps using the iterative residual peak-finding fitting algorithm. This curve highly matches the preprocessed spectral data, and is formed by superimposing the fitted curves of all identified characteristic peaks. The final residual spectrum refers to the difference spectral data obtained by subtracting the final fitted spectrum from the original spectral data after iterative fitting, reflecting the degree of deviation between the fitted curve and the actual data. The iterative residual peak-finding fitting algorithm refers to the process of iteratively searching for unfitted peaks from the residual spectrum and gradually improving the fitting model until the termination condition is met. Unlike the traditional one-time guessing fitting method, this algorithm first fits the main spectral peak, then searches for new peaks in the residual, updates the model, and refits, achieving high-precision multi-peak fitting through repeated iterations. Multi-peak fitting refers to the process of curve fitting multiple characteristic peaks in a spectrum using a specific function model, such as the Voigt function. By solving the fitting parameters of each peak through multi-peak fitting, quantitative analysis of each independent characteristic peak in a complex spectrum can be achieved.
[0040] S130. Generate spectral analysis results based on the final fitted spectrum and the final residual spectrum.
[0041] The spectral analysis results refer to the comprehensive analytical conclusions generated based on the final fitted spectrum and the final residual spectrum, including quantitative indicators and qualitative / visual results. For Raman spectroscopy analysis of carbon materials, the quantitative indicator is the intensity ratio of the D peak to the G peak, and the fitting parameter report for each spectral peak is also included. The visualization results include comparison charts of the original data, fitted curves, individual spectral peaks, and residual spectra, as well as auxiliary results such as fitting accuracy assessment.
[0042] Optionally, spectral analysis results are generated based on the final fitted spectrum and the final residual spectrum, including: extracting characteristic parameters of two final significant spectral peaks from the final fitted spectrum, wherein the characteristic parameters include the peak height and integral area of the final significant spectral peaks; using the characteristic parameters as peak intensities and calculating the ratio of the peak intensities of the two final significant spectral peaks to obtain the intensity ratio; performing quality verification through the final residual spectrum, and when the quality verification passes, integrating the characteristic parameters and intensity ratio as the spectral analysis results.
[0043] Specifically, the system extracts the characteristic parameters of two final significant spectral peaks from the final fitted spectrum, namely the D peak and G peak in the Raman spectrum of carbon materials. These are also the core analysis objects in the entire iterative residual peak finding and fitting process. The final fitted spectrum is a simulated curve that is highly matched with the preprocessed spectral data, generated by the cumulative fitting model containing the D peak, G peak, and other identified spectral peaks. It contains the precise physical characteristic information of all fitted spectral peaks. The characteristic parameters of the D peak and G peak are extracted from this curve, specifically including peak height and integral area. The peak height refers to the signal intensity value corresponding to the peak apex of the fitted spectrum, and the integral area refers to the area enclosed by the fitted spectrum curve and the wavenumber coordinate axis.
[0044] Furthermore, the system uses characteristic parameters as peak intensities and calculates the ratio of the intensities of the two final significant peaks to obtain the intensity ratio. In Raman spectroscopy analysis of carbon materials, the individual D and G peak intensities do not have direct characterization significance; their intensity ratio is needed to assess the degree of graphitization and defect density of the material. Therefore, the system uses the extracted peak height or integral area as the peak intensities of the D and G peaks, respectively, and calculates the ratio, ID / IG, according to the corresponding calculation method. Here, ID is the intensity of the D peak, and IG is the intensity of the G peak. The magnitude of this ratio is directly related to the material properties; a smaller ratio indicates a higher degree of graphitization and a lower defect density in the carbon material, while a larger ratio indicates a higher defect density and a lower degree of graphitization. Finally, the system performs quality verification through the final residual spectrum. The final residual spectrum is the difference spectrum obtained by subtracting the final fitted spectrum from the preprocessed spectral data, reflecting the degree of deviation between the final fitted curve and the actual spectral data. Quality verification assesses the accuracy and reliability of the fit by judging the characteristics of the residual spectrum. Specifically, the verification checks whether there are significant unfit peaks in the residual spectrum. If the residual spectrum does not have obvious peak structure and only shows random low-amplitude noise fluctuations, and the root mean square error and sum of squares of the residuals are below the preset thresholds, it means that the final fitted spectrum can closely match the actual spectral data, and the fitting model has no underfitting or overfitting. At this time, the quality verification is considered to be passed. However, if there are still significant unfit peaks in the residual spectrum, or the deviation index exceeds the threshold, it means that the fitting effect is not good and the fitting model needs to be re-optimized. Finally, when the quality verification is passed, the characteristic parameters and intensity ratio are integrated as the spectral analysis results. At this time, the characteristic parameters include all the precisely extracted physical parameters such as the center position, peak height, integral area, Gaussian width, and Lorentz width of the D and G peaks, which can reflect the specific characteristics of the two core spectral peaks in detail. The system will integrate the characteristic parameters and intensity ratio, and at the same time, it will also be paired with a visualization comparison chart of the original spectral data, the final fitted spectrum, and the final residual spectrum to form a complete spectral analysis result. This result contains both accurate quantitative data and intuitive visualization content, which can comprehensively and clearly reflect the structural characteristics of carbon materials and provide a reliable basis for the characterization and analysis of materials.
[0045] The technical solution of this invention, through preprocessing the original spectral data, effectively eliminates background interference, cosmic ray spurious signals, and random noise, thereby improving the signal-to-noise ratio of the spectral data. Employing an iterative residual peak-finding fitting algorithm for multi-peak fitting accurately identifies and fits all significant spectral peaks, avoiding underfitting and overfitting problems and improving the accuracy of multi-peak fitting. The generated spectral analysis results can accurately extract core feature indicators, and the fitting quality can be verified through residual spectroscopy, ensuring that the analysis results are accurate and reliable, truly reflecting the structural characteristics of the material.
[0046] Example 2 Figure 3 This is a flowchart of a spectral analysis method provided in Embodiment 2 of the present invention. This embodiment adds a specific process to Embodiment 1, which uses an iterative residual peak-finding fitting algorithm to perform multi-peak fitting on the preprocessed spectral data to obtain the final fitted spectrum and the final residual spectrum. The specific content of steps S210 and S250 is largely the same as steps S110 and S130 in Embodiment 1, and therefore will not be repeated in this embodiment. Figure 3 As shown, the method includes: S210. Obtain the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain the preprocessed spectral data.
[0047] Optionally, the original spectral data is preprocessed to obtain preprocessed spectral data, including: truncating the original spectral data within a preset wavenumber range to obtain truncated spectral data; removing cosmic rays from the truncated spectral data to obtain removed spectral data; performing baseline correction on the removed spectral data to obtain corrected spectral data; and smoothing the corrected spectral data using a filter with a specified window size to obtain preprocessed spectral data.
[0048] Optionally, cosmic ray removal is performed on the truncated spectral data to obtain the removed spectral data, including: determining the deviation of each data point in the truncated spectral data from the local median, and identifying data pairs with deviations exceeding a preset threshold as cosmic ray noise points; using the cosmic ray noise points as points to be filled, and calculating the interpolation value of each point to be filled using a local interpolation method; and filling each interpolation value into the corresponding position of each point to be filled to obtain the removed spectral data.
[0049] Optionally, baseline correction is performed on the removed spectral data to obtain corrected spectral data. This includes: using a rubber band algorithm to calculate the convex hull of the removed spectral data to determine the convex hull vertices; determining whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data. If so, the vertex is taken as the target convex hull vertex and removed. The remaining convex hull vertices are then recalculated. Otherwise, the curve formed by fitting the remaining convex hull vertices is used as the estimated baseline curve. The original spectral data is subtracted from the estimated baseline curve to obtain the corrected spectral data.
[0050] S220. A peak-finding algorithm is used to locate the peaks in the preprocessed spectral data and determine the significant spectral peaks, including the first significant main peak and the second significant main peak.
[0051] Specifically, peak-finding algorithms can identify the most prominent spectral peaks, or significant peaks, from preprocessed spectral data with high signal-to-noise ratio and clear peak characteristics by setting reasonable parameters such as peak height and peak spacing. In Raman spectroscopy analysis of carbon materials, the two significant peaks are the first significant main peak, D, and the second significant main peak, G. Peak-finding algorithms can screen out the core main peaks that are most representative in the spectrum, thus determining the target for subsequent initial fitting, while avoiding interference from irrelevant weak peaks on the fitting of the core main peak.
[0052] S230. Fit the first and second significant main peaks based on preset physical constraints to obtain the initial fitted spectrum. Subtract the initial fitted spectrum from the original spectral data to obtain the initial residual spectrum.
[0053] Among them, the preset physical constraints refer to the parameter boundary restrictions set for spectral peak fitting that conform to the physical properties of the material.
[0054] Specifically, the system can use the Voigt function model as the basic fitting model. This model can accurately fit the actual peak shape characteristics of the Raman spectrum. At the same time, in order to ensure that the fitting parameters conform to the physical properties of carbon materials, a preset physical constraint will be applied, specifically limiting the center position of the D peak to 1330-1370. Within this range, the center of peak G is limited to 1570-1600. Within the range, and with both peak width parameters greater than 0, physical constraints can prevent the fitting from producing parameter values that have no practical significance, thus improving the reliability of the initial fitting.
[0055] S240. Based on the initial fitted spectrum and the initial residual spectrum, perform iterative residual peak finding and fitting to obtain the final fitted spectrum and the final residual spectrum.
[0056] Optionally, iterative residual peak finding and fitting are performed based on the initial fitted spectrum and the initial residual spectrum to obtain the final fitted spectrum and the final residual spectrum. This includes: determining whether the initial residual spectrum meets the iteration termination condition; if so, using the initial fitted spectrum as the final fitted spectrum and the initial residual spectrum as the final residual spectrum; otherwise, searching for new significant spectral peaks in the initial residual spectrum, refitting based on the new significant spectral peaks to obtain updated fitted spectral data and residual spectra, and using the updated fitted spectrum and residual spectra as the new iteration basis for iteration until the residual spectrum meets the iteration termination condition to obtain the final fitted spectrum and the final residual spectrum.
[0057] The iteration termination conditions specifically include the absence of significant unfitted peaks in the residual spectrum, an improvement in the fitting result below a preset threshold, and the number of iterations reaching a preset maximum limit. In practice, these conditions are considered in conjunction with the characteristics of the spectral data and the analysis requirements. For example, it might first check if there are still unfitted peaks in the residual spectrum with obvious peak shapes and meeting the requirements for peak height and signal-to-noise ratio. If not, the termination condition is directly met. If so, further judgment is made based on the degree of fitting improvement and the number of iterations. If the initial residual spectrum meets the iteration termination condition, it means that the initial fitting model that only fits the D and G peaks can accurately match the preprocessed spectral data, and there is no need to add new peaks for fitting. In this case, the initial fitted spectrum is directly used as the final fitted spectrum, and the initial residual spectrum is used as the final residual spectrum, thus ending the iteration process.
[0058] Specifically, if the initial residual spectrum does not meet the iteration termination condition, it means that the initial fitting model failed to cover all the significant spectral peaks in the spectrum. There are still unfitted weak peaks, overlapping peaks, and other effective signals in the residual spectrum, and the fitting model needs to be further improved. Next, the system will search for new significant spectral peaks in the initial residual spectrum. At this time, the deviation signal of the residual spectrum is essentially the true spectral signal that was not covered by the initial fitting. Peak searching can accurately locate other effective spectral peaks that are covered by the main peak, avoiding the omission of key spectral features. After finding a new significant spectral peak, the system refits the model based on this peak, obtaining updated fitted and residual spectra. Specifically, the newly found significant peak is added to the initial fitting model, which only contained the D and G peaks, forming a cumulative peak fitting model that includes both the original main peak and the new peak. Simultaneously, physical constraints are set for the new peak. Then, a parameter optimization method with physical constraints is used to refit the entire cumulative model with all parameters. This not only optimizes the parameters of the new peak but also simultaneously adjusts the center position, amplitude, peak width, and other parameters of all peaks, making the fitting result of the entire model more realistic. After refitting, the simulated spectral curve corresponding to the cumulative model is generated, i.e., the updated fitted spectrum. Finally, the updated residual spectrum is obtained by subtracting the updated fitted spectrum from the preprocessed spectral data. Then, the system uses the updated fitted spectrum and residual spectrum as the basis for the next iteration. The updated fitted spectrum and residual spectrum replace the initial fitted spectrum and initial residual spectrum from the previous round, repeating the iterative process. In each iteration, new significant spectral peaks are added to the fitting model based on the signal characteristics of the residual spectrum, and the entire model is refitted. Each optimized fitting model covers more effective spectral signals, and the deviation in the residual spectrum decreases accordingly, continuously improving the accuracy of the fitting results. This iterative process continues until the residual spectrum obtained in a certain round meets the preset iteration termination condition. At this point, all iterations are immediately stopped, and the fitted spectrum obtained in that round is taken as the final fitted spectrum, and the corresponding residual spectrum is taken as the final residual spectrum. The final fitted spectrum contains all significant spectral peaks in the preprocessed spectral data, highly matching the true characteristics of the spectrum. The final residual spectrum only exhibits random low-amplitude noise fluctuations without obvious peak shapes, accurately reflecting the small deviation between the final fitting result and the actual spectral data, providing a reliable basis for subsequent spectral analysis results generation and fitting quality verification.
[0059] S250. Generate spectral analysis results based on the final fitted spectrum and the final residual spectrum.
[0060] Optionally, spectral analysis results are generated based on the final fitted spectrum and the final residual spectrum, including: extracting characteristic parameters of two final significant spectral peaks from the final fitted spectrum, wherein the characteristic parameters include the peak height and integral area of the final significant spectral peaks; using the characteristic parameters as peak intensities and calculating the ratio of the peak intensities of the two final significant spectral peaks to obtain the intensity ratio; performing quality verification through the final residual spectrum, and when the quality verification passes, integrating the characteristic parameters and intensity ratio as the spectral analysis results.
[0061] The technical solution of this invention employs a peak-finding algorithm to locate peaks in preprocessed spectral data, accurately identifying the core, significant main peaks. This provides a clear target for subsequent fitting and ensures the accuracy of the initial fitting object. Fitting the two main peaks based on preset physical constraints yields an initial fitted spectrum, and calculating the initial residual spectrum ensures that the initial fitting parameters conform to physical characteristics, avoiding meaningless values. Simultaneously, residual data reflecting the initial fitting deviation is obtained, providing a foundation for iterative peak-finding. Iterative residual peak-finding and fitting based on the initial fitted spectrum and residual spectrum gradually identifies and fits uncovered spectral peaks, continuously optimizing the fitting model, ultimately obtaining a high-precision final fitted spectrum, while simultaneously acquiring a final residual spectrum reflecting the final fitting deviation.
[0062] Example 3 Figure 4 This is a schematic diagram of a spectral analysis device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a spectral data preprocessing module 310, used to acquire the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain preprocessed spectral data; The spectral data residual fitting module 320 is used to perform multi-peak fitting on the preprocessed spectral data using an iterative residual peak-finding fitting algorithm to obtain the final fitted spectrum and the final residual spectrum. The spectral analysis module 330 is used to generate spectral analysis results based on the final fitted spectrum and the final residual spectrum.
[0063] Optionally, the spectral data preprocessing module 310 specifically includes: a data truncation unit, used to: truncate the original spectral data within a preset wavenumber range to obtain truncated spectral data; a cosmic ray removal unit, used to: remove cosmic rays from the truncated spectral data to obtain removed spectral data; a baseline correction unit, used to: perform baseline correction on the removed spectral data to obtain corrected spectral data; and a data smoothing unit, used to: smooth the corrected spectral data using a filter with a specified window size to obtain preprocessed spectral data.
[0064] Optionally, the cosmic ray removal unit is used to: determine the deviation of each data point in the truncated spectral data from the local median, and identify data pairs with deviations exceeding a preset threshold as cosmic ray noise points; identify the cosmic ray noise points as points to be filled, and calculate the interpolation value of each point to be filled using a local interpolation method; and fill each interpolation value into the corresponding position of each point to be filled to obtain the removed spectral data.
[0065] Optionally, the baseline correction unit is used to: perform convex hull calculation on the removed spectral data using a rubber band algorithm to determine the convex hull vertices; determine whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data; if so, take the vertex as the target convex hull vertex and remove the target convex hull vertex, and recalculate the convex hull for the remaining convex hull vertices; otherwise, take the curve formed by fitting the remaining convex hull vertices as the estimated baseline curve, and subtract the estimated baseline curve from the original spectral data to obtain the corrected spectral data.
[0066] Optionally, the spectral data residual fitting module 320 specifically includes: a significant peak localization unit, used to: use a peak-finding algorithm to locate the preprocessed spectral data and determine significant peaks, wherein the significant peaks include a first significant main peak and a second significant main peak; an initial fitting unit, used to: fit the first significant main peak and the second significant main peak based on preset physical constraints to obtain an initial fitted spectrum, and subtract the initial fitted spectrum from the original spectral data to obtain an initial residual spectrum; and an iterative fitting unit, used to: perform iterative residual peak finding and fitting based on the initial fitted spectrum and the initial residual spectrum to obtain a final fitted spectrum and a final residual spectrum.
[0067] Optionally, the iterative fitting unit is specifically used to: determine whether the initial residual spectrum meets the iteration termination condition; if so, use the initial fitted spectrum as the final fitted spectrum and the initial residual spectrum as the final residual spectrum; otherwise, find new significant spectral peaks in the initial residual spectrum, refit based on the new significant spectral peaks to obtain updated fitted spectral data and residual spectra, use the updated fitted spectrum and residual spectra as the new iteration basis for iteration, until the residual spectrum meets the iteration termination condition, and obtain the final fitted spectrum and final residual spectrum.
[0068] Optionally, the spectral analysis module 330 is specifically used for: extracting characteristic parameters of two final significant spectral peaks from the final fitted spectrum, wherein the characteristic parameters include the peak height and integral area of the final significant spectral peaks; using the characteristic parameters as spectral peak intensities and calculating the ratio of the spectral peak intensities of the two final significant spectral peaks to obtain the intensity ratio; performing quality verification through the final residual spectrum, and when the quality verification passes, integrating the characteristic parameters and intensity ratio as the spectral analysis result.
[0069] The technical solution of this invention, through preprocessing the original spectral data, effectively eliminates background interference, cosmic ray spurious signals, and random noise, thereby improving the signal-to-noise ratio of the spectral data. Employing an iterative residual peak-finding fitting algorithm for multi-peak fitting accurately identifies and fits all significant spectral peaks, avoiding underfitting and overfitting problems and improving the accuracy of multi-peak fitting. The generated spectral analysis results can accurately extract core feature indicators, and the fitting quality can be verified through residual spectroscopy, ensuring that the analysis results are accurate and reliable, truly reflecting the structural characteristics of the material.
[0070] The spectral analysis device provided in this embodiment of the invention can execute a spectral analysis method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0071] Example 4 Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0072] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0073] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0074] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a spectral analysis method.
[0075] In some embodiments, a spectral analysis method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of a spectral analysis method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform a spectral analysis method by any other suitable means (e.g., by means of firmware).
[0076] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0077] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0078] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0079] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0080] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0081] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0082] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0083] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A spectral analysis method, characterized in that, include: Obtain the raw spectral data to be analyzed, and preprocess the raw spectral data to obtain preprocessed spectral data; The preprocessed spectral data is fitted with multiple peaks using an iterative residual peak-finding fitting algorithm to obtain the final fitted spectrum and the final residual spectrum. Spectral analysis results are generated based on the final fitted spectrum and the final residual spectrum.
2. The method according to claim 1, characterized in that, The preprocessing of the original spectral data to obtain preprocessed spectral data includes: The original spectral data is truncated within a preset wavenumber range to obtain truncated spectral data; The truncated spectral data is subjected to cosmic ray removal to obtain the removed spectral data; Baseline correction is performed on the removed spectral data to obtain corrected spectral data; The corrected spectral data is smoothed using a filter with a specified window size to obtain preprocessed spectral data.
3. The method according to claim 2, characterized in that, The step of removing cosmic rays from the truncated spectral data to obtain the removed spectral data includes: Determine the deviation of each data point from the local median in the truncated spectral data, and identify data pairs whose deviation exceeds a preset threshold as cosmic ray noise points. The cosmic ray noise points are used as points to be filled, and the interpolation of each point to be filled is calculated using the local interpolation method. The interpolation values are then filled into the corresponding positions of the points to be filled, resulting in the removed spectral data.
4. The method according to claim 2, characterized in that, The baseline correction of the removed spectral data to obtain corrected spectral data includes: The rubber band algorithm is used to perform convex hull calculation on the removed spectral data to determine the convex hull vertices; Determine whether there are any vertices in the convex hull that are higher than the data points in the removed spectral data. If so, take the vertex as the target convex hull vertex, remove the target convex hull vertex, and recalculate the convex hull for the remaining convex hull vertices. Otherwise, the curve formed by fitting the remaining convex hull vertices is used as the estimated baseline curve, and the original spectral data is subtracted from the estimated baseline curve to obtain the corrected spectral data.
5. The method according to claim 1, characterized in that, The step of using an iterative residual peak-finding fitting algorithm to perform multi-peak fitting on the preprocessed spectral data to obtain the final fitted spectrum and the final residual spectrum includes: A peak-finding algorithm is used to locate the peaks in the preprocessed spectral data and determine the significant spectral peaks, wherein the significant spectral peaks include a first significant main peak and a second significant main peak. The first and second significant main peaks are fitted based on preset physical constraints to obtain an initial fitted spectrum. The initial residual spectrum is obtained by subtracting the initial fitted spectrum from the original spectral data. Based on the initial fitted spectrum and the initial residual spectrum, iterative residual peak finding and fitting are performed to obtain the final fitted spectrum and the final residual spectrum.
6. The method according to claim 5, characterized in that, The step of iteratively finding peaks and fitting residuals based on the initial fitted spectrum and the initial residual spectrum to obtain the final fitted spectrum and the final residual spectrum includes: Determine whether the initial residual spectrum satisfies the iteration termination condition. If so, use the initial fitted spectrum as the final fitted spectrum and the initial residual spectrum as the final residual spectrum. Otherwise, new significant spectral peaks are searched in the initial residual spectrum, and the spectrum is refitted based on the new significant spectral peaks to obtain updated fitted spectral data and residual spectra. The updated fitted spectrum and residual spectrum are used as the new iterative basis for iteration until the residual spectrum meets the iteration termination condition to obtain the final fitted spectrum and final residual spectrum.
7. The method according to claim 1, characterized in that, The step of generating spectral analysis results based on the final fitted spectrum and the final residual spectrum includes: The feature parameters of two final significant spectral peaks are extracted from the final fitted spectrum, wherein the feature parameters include the peak height and integral area of the final significant spectral peaks; The characteristic parameters are used as spectral peak intensities, and the ratio of the spectral peak intensities of the two final significant spectral peaks is calculated to obtain the intensity ratio. The quality is verified by the final residual spectrum. When the quality verification is successful, the characteristic parameters and the intensity ratio are integrated as the spectral analysis result.
8. A spectral analysis device, characterized in that, include: The spectral data preprocessing module is used to acquire the raw spectral data to be analyzed, preprocess the raw spectral data, and obtain preprocessed spectral data. The spectral data residual fitting module is used to perform multi-peak fitting on the preprocessed spectral data using an iterative residual peak-finding fitting algorithm to obtain the final fitted spectrum and the final residual spectrum. The spectral analysis module is used to generate spectral analysis results based on the final fitted spectrum and the final residual spectrum.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-7.