Spectral detection method and system for impurities in wormwood essential oil
By constructing a spectral baseline through multi-scale wavelet decomposition and cubic spline interpolation, and combining the differential spectral integral area and feature point density, the problem of single model input information is solved, thereby improving the accuracy and stability of impurity detection in Artemisia argyi essential oil.
Patent Information
- Application Number
- CN202610008316.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-02-03
AI Technical Summary
Existing methods for the spectral detection of impurities in Artemisia argyi essential oil rely on limited model input information, resulting in low prediction accuracy. Furthermore, the spectral signals are susceptible to interference from instrument background, sample scattering, and environmental factors, leading to poor baseline correction.
Multi-scale wavelet decomposition is used to identify candidate feature points at key scales. A spectral baseline is constructed by combining cubic spline interpolation. The impurity content prediction model is established by using the differential spectral integral area, the average curvature of the spectral baseline, and the average density of feature points as multi-dimensional input variables.
The model improved the stability and anti-interference ability of the prediction of impurity content in Artemisia argyi essential oil, thus enhancing the prediction effect. The model can more accurately identify and remove complex background interference, thereby improving the prediction accuracy.
Smart Images

Figure CN121453804A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of testing materials by optical means, and particularly relates to a wormwood essential oil impurity spectrum detection method and system. BACKGROUND
[0002] The quality of wormwood essential oil is a core factor determining its use effect and safety, and the impurity content is a key indicator for measuring the purity and quality of the product. In the production, storage and transportation of wormwood essential oil, impurities may be introduced due to oxidation, degradation or adulteration, etc., thereby causing changes in the composition of the wormwood essential oil.
[0003] In order to quickly and accurately monitor the quality, spectral analysis technology, especially near-infrared spectroscopy and Raman spectroscopy, has become a powerful tool for analyzing the composition of complex mixtures due to its advantages of rapidity, non-destructiveness and no need for complex sample pretreatment.
[0004] However, in the process of collecting spectral signals, the data is easily disturbed by various factors such as instrument background, sample scattering, changes in environmental temperature and humidity. These disturbances will cause the baseline of the spectrum to drift, tilt or even bend, accompanied by random noise. If not effectively processed, these disturbances will seriously affect the identification of spectral characteristic peaks and the accuracy of quantitative analysis, and thus reduce the stability of the impurity content prediction model.
[0005] Traditional baseline correction methods include polynomial fitting, first or second derivative, wherein the polynomial fitting is often difficult to determine the appropriate order when dealing with complex nonlinear baselines, and is prone to underfitting or overfitting; the derivative method can eliminate additive baseline drift, but it will amplify the noise signal and reduce the signal-to-noise ratio of the spectrum.
[0006] In recent years, wavelet transform has become popular for baseline correction. Wavelet transform can decompose the spectral signal into different scales, and correct the baseline by identifying and removing the low-frequency wavelet coefficients representing the baseline. However, the existing methods based on wavelet transform have some shortcomings: most of the existing methods rely on threshold processing or modulus maximum detection of specific scale coefficients to identify characteristic peaks or baseline points, and after baseline correction, the existing quantitative analysis models usually only use single information such as peak height and peak area of the corrected spectrum for modeling, ignoring the morphological features of the baseline itself, the distribution of the characteristic points of the full spectrum, and other useful information related to the state of the sample, resulting in single input information of the model and further improvement of the prediction accuracy. SUMMARY
[0007] The present application provides a wormwood essential oil impurity spectrum detection method and system to solve the technical problems of single input information and low prediction accuracy of the existing model.
[0008] In a first aspect, the present application provides a method for detecting impurities in artemisia vulgaris essential oil by spectrum, comprising the following steps: S1, obtaining the original spectrum data of the artemisia vulgaris essential oil sample to be tested, and performing multi-scale wavelet decomposition to obtain the wavelet coefficients at each scale; calculating the energy of the wavelet coefficients at each scale, and determining the scale with the maximum energy as the key scale; at the key scale, identifying candidate feature points that meet the cross-scale modulus maximum value connection condition; S2, estimating the standard deviation of spectral noise according to the wavelet coefficients at scale 1, setting a preset multiple, and defining the product of the two as a threshold value; when the absolute value of the wavelet coefficient of the candidate feature point at the key scale is greater than the threshold value, the candidate feature point is determined as a feature point, and a feature point set is formed; S3, using the feature point set as a node, and using a cubic spline interpolation method to construct a spectrum baseline; subtracting the spectrum baseline from the original spectrum data to obtain a differential spectrum, and calculating the integral area of a preset impurity characteristic peak in the differential spectrum; S4, taking the integral area, the average curvature of the spectrum baseline in the preset impurity characteristic peak corresponding wave number interval, and the average density of the feature point set in the full spectrum range as input variables, and substituting them into the impurity content prediction model established by a multivariate correction method in advance, so as to obtain the impurity content index.
[0009] Further, in step S1, the original spectrum data of the artemisia vulgaris essential oil sample to be tested is obtained, and multi-scale wavelet decomposition is performed, comprising: Selecting Daubechies4 wavelet basis function, decomposing the original spectrum data at 5 scales to obtain wavelet coefficients at scale 1 to scale 5.
[0010] Further, in step S1, the energy of the wavelet coefficients at each scale is calculated, and the scale with the maximum energy is determined as the key scale, comprising: For the wavelet coefficients at the i-th scale , its energy is calculated by the formula , and the scale with the maximum energy value is taken as the key scale.
[0011] Further, in step S2, the standard deviation of spectral noise is estimated according to the wavelet coefficients at scale 1, a preset multiple is set, and the product of the two is defined as a threshold value, comprising: Calculating the median absolute deviation of the wavelet coefficients at scale 1 , and the standard deviation of spectral noise ; The preset multiple is , and the threshold value .
[0012] Further, the preset multiple is 3.
[0013] Further, in step S3, the integral area of the preset impurity characteristic peak in the differential spectrum is calculated, including: determining the wave number interval corresponding to the preset impurity characteristic peak, and using the trapezoidal rule to perform numerical integration on the differential spectrum intensity values in the wave number interval to obtain the integral area.
[0014] Further, in step S4, the second derivative of the spectral baseline in the wave number interval corresponding to the preset impurity characteristic peak is performed to obtain the curvature value of each discrete data point of the spectral baseline, and the absolute values of all curvature values are added and divided by the number of discrete data points in the wave number interval to obtain the average curvature.
[0015] Further, in step S4, the total number of feature points in the feature point set ; The width of the full spectral range is the maximum wave number minus the minimum wave number; The average density .
[0016] Further, in step S4, the multivariate correction method is a partial least squares regression method, and the integral area, average curvature and average density of the spectral data of a group of artemisia vulgaris essential oil samples with known impurity content are extracted as independent variables, and the corresponding known impurity content is used as the dependent variable to establish the impurity content prediction model.
[0017] In a second aspect, the present application provides an artemisia vulgaris essential oil impurity spectrum detection system, comprising a memory and a processor, and the memory stores computer program instructions, which realize the above-mentioned artemisia vulgaris essential oil impurity spectrum detection method when executed by the processor.
[0018] The beneficial effects are as follows: This invention calculates the energy of wavelet coefficients at each scale through multi-scale wavelet decomposition and determines the scale with the highest energy as the key scale. It then uses a threshold set based on the standard deviation of spectral noise estimated using wavelet coefficients at scale 1 to screen feature points. A spectral baseline is constructed using cubic spline interpolation with the feature point set, thereby identifying and constructing a spectral baseline that closely matches the real-world situation and eliminating complex background interference. The intermediate information from the baseline correction process—the average curvature of the spectral baseline in the wavenumber interval corresponding to the preset impurity characteristic peaks and the average density of the feature point set across the entire spectrum—is combined with the integral area of the preset impurity characteristic peaks in the corrected differential spectrum, serving as input variables for the prediction model. The fusion of multi-dimensional information such as integral area, average curvature, and average density allows the model to integrate direct chemical information, indirect background interference information, and overall sample state information, improving the stability and anti-interference ability of the Artemisia argyi essential oil impurity content prediction model and enhancing prediction accuracy. Attached Figure Description
[0019] Figure 1 A flowchart for the spectral detection method of impurities in Artemisia argyi essential oil; Figure 2 This is a schematic diagram of the differential spectrum and the integral region of the impurity characteristic peaks; Figure 3 This is a schematic diagram of the input-output relationship of the impurity content prediction model; Figure 4 This is a schematic diagram of a spectroscopic detection system for impurities in Artemisia argyi essential oil. Detailed Implementation
[0020] An embodiment of the method for spectroscopic detection of impurities in Artemisia argyi essential oil provided by the present invention: like Figure 1 As shown, a method for spectroscopic detection of impurities in Artemisia argyi essential oil includes: S1. Obtain the original spectral data of the Artemisia argyi essential oil sample to be tested, and perform multi-scale wavelet decomposition to obtain the wavelet coefficients at each scale; calculate the energy of the wavelet coefficients at each scale, and determine the scale with the largest energy as the key scale; on the key scale, identify candidate feature points that satisfy the cross-scale modulus maxima connection condition.
[0021] Specifically, near-infrared spectrometers were used to collect spectral data of the Artemisia argyi essential oil samples in the range of 4000 to 400 wavenumber units.
[0022] At the defined key scale, local maxima (also known as modulus maxima) of wavelet coefficients are searched. For each local maximum, it is checked whether there are local maximums with the same sign near the corresponding position at an adjacent coarser scale. If such a modulus maxima correspondence spanning multiple scales exists, the position of the local maximum at the key scale is marked as a candidate feature point.
[0023] In an optional embodiment, in step S1, the original spectrum data of the sample of the wormwood essential oil to be tested is acquired, and multi-scale wavelet decomposition is performed, including: A Daubechies4 wavelet basis function is selected, and the original spectrum data is decomposed at 5 scales to obtain wavelet coefficients at scale 1 to scale 5.
[0024] Specifically, a suitable wavelet basis function is selected for signal decomposition. In this embodiment, a Daubechies4 wavelet basis function with good regularity and compact support is selected, which can detect transient characteristics in the spectrum signal. The level or scale of decomposition is determined, which is set to 5 scales in this embodiment. The original spectrum data is decomposed into subbands of different frequencies, which correspond to scale 1 to scale 5 from high frequency to low frequency.
[0025] When performing decomposition, the original spectrum data is taken as input. The first level decomposition obtains high-frequency detail coefficients D1 and low-frequency approximation coefficients A1 of scale 1 by passing the original spectrum data through the low-pass and high-pass filters of the Daubechies4 wavelet. The low-frequency approximation coefficients A1 of the first level are again input into the same low-pass and high-pass filters for second level decomposition to obtain high-frequency detail coefficients D2 and new low-frequency approximation coefficients A2 of scale 2. This process is repeated until the decomposition at 5 scales is completed, obtaining five vectors, i.e., wavelet coefficients D1, D2, D3, D4, and D5 of scale 1 to scale 5, and a low-frequency approximation coefficient A5. For example, the original spectrum data contains 1024 data points.
[0026] In an optional embodiment, in step S1, the energy of the wavelet coefficients at each scale is calculated, and the scale with the maximum energy is determined as the key scale, including: For the wavelet coefficients at the i-th scale, the energy of the wavelet coefficients is calculated by the formula The scale with the maximum energy value is taken as the key scale.
[0027] Specifically, the obtained wavelet coefficients D1 to D5 are used. For scale 1, each coefficient value in the wavelet coefficient D1 is squared, and the sum of all squared values is added to obtain the total energy of scale 1 . For example, if the coefficient values in the wavelet coefficient D1 of scale 1 are 0.2, -0.1, and 0.3, respectively, the energy .
[0028] This calculation process iterates through all five scales to sequentially calculate the energy of scale 2 , energy of scale 3 , energy of scale 4 , and energy of scale 5 . After the calculation, a set of energy values are obtained, by comparing the five energy values, it is found that the value of scale 3 is the largest. Therefore, scale 3 is determined as the key scale, and the energy of the key scale is the highest, indicating that the baseline drift and other major low-frequency change information of the spectrum are most concentrated on the scale.
[0029] S2, estimate the standard deviation of the spectrum noise according to the wavelet coefficients of scale 1, set a preset multiple, and define the product of the two as a threshold value; when the absolute value of the wavelet coefficient of the candidate feature point on the key scale is greater than the threshold value, the candidate feature point is determined as a feature point, and a feature point set is formed.
[0030] Specifically, all candidate feature points are traversed, the absolute value of the corresponding wavelet coefficient on the key scale is calculated, if the absolute value is greater than the threshold value, the candidate feature point is retained as a feature point; otherwise, it is excluded, and all retained feature points constitute a feature point set.
[0031] In an optional embodiment, in step S2, the standard deviation of the spectrum noise is estimated according to the wavelet coefficients of scale 1, a preset multiple is set, and the product of the two is defined as a threshold value, including: calculating the median absolute deviation of the wavelet coefficients of scale 1 , the standard deviation of the spectrum noise ; the preset multiple is , and the threshold value is .
[0032] For example, the preset multiple is 3. The preset multiple is usually initially set based on experience, and then the model performance is tested and optimized on a sample set to find the preset multiple that can best balance the denoising effect and information retention.
[0033] Specifically, the wavelet coefficients D1 of scale 1 are used, because scale 1 mainly contains the high-frequency noise in the original spectrum data. First, the median absolute deviation of the wavelet coefficients D1 is calculated: first, the median of all coefficients in the wavelet coefficients D1 is calculated, the absolute value of the difference between each coefficient and the median is calculated to form a new set of values. The median of the new set of values is calculated, which is the median absolute deviation . For example, if the coefficients in the wavelet coefficients D1 are 1.1, 1.2, 0.9, 1.3, and 1.0, the median is 1.1, the calculated absolute value of the difference is 0, 0.1, 0.2, 0.2, and 0.1, respectively, a new set of values is formed, and the median of the new set of values is 0.1, which is the median absolute deviation is 0.1.
[0034] In the second step, the median absolute deviation is calculated according to the formula : the constant 0.6745 is a statistical correction factor used to make the median absolute deviation an unbiased estimate of the spectral noise standard deviation. The spectral noise standard deviation is 0.148. The obtained spectral noise standard deviation is multiplied by a preset multiple , so as to determine a threshold value . The threshold value = 0.444. The threshold value will be used in the subsequent step for screening of candidate feature points.
[0035] S3, taking the set of feature points as nodes, a cubic spline interpolation method is used to construct a spectral baseline; the spectral baseline is subtracted from the original spectral data to obtain a differential spectrum, and the integral area of a preset impurity characteristic peak in the differential spectrum is calculated.
[0036] Specifically, the wavenumber corresponding to each point in the set of feature points is taken as the horizontal coordinate, and the absorbance value corresponding to the point in the original spectral data is taken as the vertical coordinate, to form a series of two-dimensional coordinate nodes. Subsequently, a cubic spline interpolation algorithm is used to fit the nodes to generate a piecewise cubic polynomial curve, ensuring that the curve maintains first and second order derivative continuity at each node, thereby generating a smooth spectral baseline covering the full spectral range.
[0037] The absorbance value of the original spectral data at each wavenumber point is subtracted from the absorbance value of the spectral baseline constructed by cubic spline interpolation at the corresponding wavenumber point to obtain a baseline-corrected differential spectrum. Assuming that a certain impurity has a characteristic absorption in the wavenumber interval of 1720 to 1750, the trapezoidal rule is used to numerically integrate the curve in the wavenumber interval to obtain the integral area of the impurity characteristic peak corresponding to the characteristic impurity.
[0038] In an optional embodiment, in step S3, calculating the integral area of the preset impurity characteristic peak in the differential spectrum comprises: determining the wavenumber interval corresponding to the preset impurity characteristic peak, and using the trapezoidal rule to numerically integrate the differential spectral intensity values in the wavenumber interval to obtain the integral area.
[0039] For example, the wavenumber interval here is the interval from 1750 to 1730 .
[0040] Specifically, a wave number interval is defined in relation to a specific impurity, in this embodiment determined to be 1750 to 1730 , which corresponds to a vibration absorption peak of a specific chemical bond (e.g. carbonyl). All data points within this wave number interval are extracted from the differential spectrum data, each data point consisting of a wave number value and a corresponding intensity value.
[0041] A numerical integration method (i.e. the trapezoidal rule) is used to estimate the area under the characteristic peak: for any two adjacent data points within the wave number interval, e.g. a data point with wave number 1745 and intensity 0.08 and a data point with wave number 1744 and intensity 0.09, can be regarded as two vertices of a tiny trapezoid. The area of the trapezoid is the average of the two intensity values multiplied by the difference of the two wave number values, i.e. By repeating this calculation for all adjacent data point pairs within the entire wave number interval from 1750 to 1730, and adding up the areas of all tiny trapezoids, the sum is obtained as the integrated area of the impurity characteristic peak, as shown in Figure 2
[0042] S4, the integrated area, the average curvature of the spectral baseline within the wave number interval corresponding to the preset impurity characteristic peak, and the average density of the set of feature points within the full spectral range are taken as input variables, and are substituted into an impurity content prediction model previously established by a multivariate calibration method, so as to obtain an impurity content index.
[0043] In an optional embodiment, in step S4, the spectral baseline within the wave number interval corresponding to the preset impurity characteristic peak is subjected to second-order derivation, so as to obtain the curvature values of the discrete data points of the spectral baseline. The absolute values of all curvature values are added and divided by the number of discrete data points within the wave number interval, so as to obtain the average curvature.
[0044] Specifically, the spectral baseline data within the wave number interval is subjected to second-order derivation. Since the spectral baseline data is discrete, a finite difference method is preferably used to approximate the calculation of the second-order derivative. For a certain discrete data point within the wave number interval, the second-order derivative value can be estimated by the data of adjacent discrete data points, e.g. using the intensity value of the discrete data point minus twice the intensity value of the discrete data point plus the intensity value of the discrete data point . This operation is performed for each discrete data point within the wave number interval, so as to obtain a series of second-order derivative values, which approximately represent the curvature values of the discrete data points on the spectral baseline.
[0045] After obtaining the curvature values of each discrete data point, in order to represent the overall bending degree without caring about the bending direction, the absolute value of each curvature value needs to be calculated. The absolute values of the curvature values of all the discrete data points in the wave number interval are added to obtain a sum. The calculated sum is divided by the total number of the discrete data points in the wave number interval, so as to calculate the average curvature. For example, if the wave number interval contains 21 discrete data points, the sum of the absolute values of the calculated curvature values is 12.6, then the average curvature is 0.6.
[0046] In an optional embodiment, in step S4, the total number of feature points in the feature point set is counted ; The width of the full spectral range is the maximum wave number minus the minimum wave number; The average density .
[0047] Specifically, after a series of screening and identification processes, a feature point set containing all the feature points in the spectrum that are considered to carry important information will be obtained. By counting the feature points in the feature point set, the total number of feature points can be obtained. For example, after all the processing steps, 180 feature points are retained, then = 180. Assuming that the measurement range of an infrared spectrum is from 4000 wave numbers to 400 wave numbers, then the width of the full spectral range is 3600 wave numbers. According to the formula, the total number of feature points is divided by the width of the full spectral range , and the average density is obtained. Using the above example data, the average density , and the unit of the average density is the number of feature points per wave number.
[0048] In an optional embodiment, in step S4, the multivariate correction method is a partial least squares regression method. Using the partial least squares regression method, the integral area, the average curvature and the average density of the spectrum data of a group of artemisia oil samples with known impurity content are extracted as independent variables, and the corresponding known impurity content is taken as the dependent variable, to establish the impurity content prediction model.
[0049] Specifically, a calibration sample set is prepared, which contains a plurality of wormwood essential oil samples, and the impurity content of each wormwood essential oil sample has been accurately determined by a high-precision chemical analysis method (such as gas chromatography). For example, 50 wormwood essential oil samples are prepared, and the impurity content ranges from 0.05% to 2.0%. For each of the 50 wormwood essential oil samples, spectral data is collected, and three key characteristic parameters are calculated according to the foregoing method: the integral area of the characteristic peak, the average curvature of the baseline, and the average density of the characteristic points. A table containing 50 rows of data is obtained, each row representing a wormwood essential oil sample, wherein three columns are the numerical values of the three key characteristic parameters, which are used as the independent variables X of the model; another column is the corresponding known impurity content, which is used as the dependent variable Y of the model. The partial least squares regression method is used to process these data. The partial least squares regression method can handle the case where there is correlation between the independent variables. Through data dimension reduction and regression analysis, a linear equation is established to associate the three key characteristic parameters with the impurity content, which is in the form: predicted value of impurity content = a + b1X1+ b2X2+ b3X3 , wherein a is a constant term, , , b1, b2 and b3 are regression coefficients corresponding to the characteristic parameters.
[0050] The constructed linear equation is the impurity content prediction model, as shown in the following formula: Figure 3
[0051] Embodiments of the wormwood essential oil impurity spectral detection system provided by the present application: As shown in the following formula, the wormwood essential oil impurity spectral detection system includes a processor and a memory, and the memory stores computer program instructions, which, when executed by the processor, implement the above-mentioned wormwood essential oil impurity spectral detection method. Figure 4
[0052] The wormwood essential oil impurity spectral detection system also includes a communication interface and other components familiar to those skilled in the art, the settings and functions of which are known in the art, and therefore will not be described here.
[0053] In addition, in the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three or more, etc., unless otherwise explicitly and specifically limited.
Claims
1. A method for spectroscopic detection of impurities in Artemisia argyi essential oil, characterized in that, include: S1. Obtain the original spectral data of the Artemisia argyi essential oil sample to be tested, and perform multi-scale wavelet decomposition to obtain the wavelet coefficients at each scale. Calculate the energy of wavelet coefficients at each scale and determine the scale with the highest energy as the key scale; At the key scale, candidate feature points that satisfy the cross-scale modulus maxima connection condition are identified; S2, estimate the standard deviation of spectral noise based on the wavelet coefficients of scale 1, set a preset multiple, and define the product of the two as the threshold; When the absolute value of the wavelet coefficient of a candidate feature point at the key scale is greater than the threshold, the candidate feature point is determined as a feature point, and a set of feature points is formed. S3, using the set of feature points as nodes, construct a spectral baseline using cubic spline interpolation; subtract the spectral baseline from the original spectral data to obtain a differential spectrum, and calculate the integral area of the preset impurity characteristic peaks in the differential spectrum; S4. The integral area, the average curvature of the spectral baseline in the wavenumber interval corresponding to the preset impurity characteristic peak, and the average density of the feature point set in the full spectrum are used as input variables and substituted into the impurity content prediction model established in advance by the multivariate correction method to obtain the impurity content index.
2. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 1, characterized in that, In step S1, the raw spectral data of the Artemisia argyi essential oil sample to be tested are obtained and multi-scale wavelet decomposition is performed, including: The Daubechies4 wavelet basis function was selected to decompose the original spectral data into five scales, yielding wavelet coefficients at scales 1 to 5.
3. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 2, characterized in that, In step S1, the energy of the wavelet coefficients at each scale is calculated, and the scale with the highest energy is determined as the key scale, including: For the Under each scale wavelet coefficients Its energy Through formula Perform calculations, traversing all scales, and converting energy... The scale with the largest numerical value is used as the critical scale.
4. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 1, characterized in that, In step S2, the standard deviation of spectral noise is estimated based on the wavelet coefficients of scale 1, a preset multiplier is set, and the product of the two is defined as a threshold, including: Calculate the median absolute deviation of wavelet coefficients at scale 1 Spectral noise standard deviation ; The preset multiple is threshold .
5. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 4, characterized in that, The preset multiple The value is 3.
6. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 1, characterized in that, In step S3, the integral area of the preset impurity characteristic peak in the differential spectrum is calculated, including: The wavenumber interval corresponding to the preset impurity characteristic peak is determined, and the differential spectral intensity values within the wavenumber interval are numerically integrated using the trapezoidal rule to obtain the integration area.
7. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to any one of claims 1-6, characterized in that, In step S4, the second derivative of the spectral baseline is performed within the wavenumber interval corresponding to the preset impurity characteristic peak to obtain the curvature value of each discrete data point of the spectral baseline. The absolute values of all curvature values are added together and divided by the number of discrete data points in the wavenumber interval to obtain the average curvature.
8. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 7, characterized in that, In step S4, the total number of feature points in the feature point set is counted. ; The width of the full spectrum range Subtract the minimum wavenumber from the maximum wavenumber; The average density .
9. The method for spectroscopic detection of impurities in Artemisia argyi essential oil according to claim 8, characterized in that, In step S4, the multivariate correction method is the partial least squares regression method. Using the partial least squares regression method, the integral area, average curvature, and average density extracted from the spectral data of a set of Artemisia argyi essential oil samples with known impurity content are used as independent variables, and the corresponding known impurity content is used as the dependent variable to establish the impurity content prediction model.
10. A spectroscopic detection system for impurities in Artemisia argyi essential oil, characterized in that, The method includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for spectroscopic detection of impurities in Artemisia argyi essential oil as described in any one of claims 1-9 is implemented.