Method and system for rapidly determining nicotine content in tobacco tar by using near infrared spectrum
Through multi-angle and multi-deep near-infrared spectral acquisition and feature band screening optimization, the complexity and interference problems of traditional nicotine detection methods are solved, and the rapid and accurate detection of nicotine content in e-liquid is achieved, and the quality control efficiency in the production process is improved.
Patent Information
- Application Number
- CN202510704162.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional nicotine content detection methods have complex operation, long time, and are prone to introduce artificial errors in the production of e-liquid, which is difficult to meet the needs of fast and real-time detection. In the near-infrared spectroscopy technology, the nicotine spectral characteristics in e-liquid are easily masked by other components, resulting in insufficient stability and accuracy of the detection model.
A complete nicotine content prediction model is constructed using multi-angle and multi-deep near-infrared spectral acquisition combined with tensor fusion and feature band screening optimization, including the fusion of multi-angle spectral data and depth spectral data, competitive screening of spectral fragments, stability evaluation and optimization of feature bands.
It realizes rapid and accurate detection of nicotine content in e-liquid, reduces sample pretreatment time, improves the stability and anti-interference ability of the detection model, and meets the real-time monitoring needs of e-liquid production.
Smart Images

Figure CN120232836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of infrared light analysis, and in particular, to a method and system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy. Background Art
[0002] Currently, traditional methods for detecting nicotine content mainly rely on chemical analysis means, such as high-performance liquid chromatography (HPLC) and gas chromatography (GC). Although these methods can provide relatively accurate detection results, they have obvious limitations. First of all, these chemical analysis methods require complex sample pretreatment processes, such as sample extraction, purification, and concentration. This not only takes time and effort but also easily introduces human errors.
[0003] In actual production scenarios, the production process of e-liquid places higher requirements on the real-time monitoring of nicotine content. For example, during the blending process of e-liquid, the rapid determination of nicotine content can help technicians timely adjust the formulation ratio to ensure the stability of product quality. However, due to the complexity of operation and long detection time of traditional detection methods, it is difficult to meet the requirements of rapid and real-time detection on the production line. In addition, the composition of e-liquid is complex, containing various additives and flavoring agents, and these components will interfere with traditional chemical analysis methods, affecting the accuracy of detection results.
[0004] When applying near-infrared spectroscopy technology to the detection of nicotine content in e-liquid, there are still some technical problems. For example, the selection of near-infrared spectral bands is crucial for the accuracy of detection results, but the screening of characteristic bands in current research is not systematic and optimized enough. In addition, the spectral characteristics of nicotine in e-liquids with different flavors will be masked by other components, resulting in insufficient stability and accuracy of the detection model. Summary of the Invention
[0005] Based on this, it is necessary for the present invention to provide a method and system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy to solve at least one of the above technical problems.
[0006] To achieve the above object, a method for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy includes the following steps: Step S1: Collect near-infrared spectra of the e-liquid sample from multiple angles and at multiple depths to obtain preferred angle spectral data and preferred depth spectral data, and perform tensor fusion on the preferred angle spectral data and the preferred depth spectral data to obtain a complete e-liquid spectral data set; Step S2: Divide the complete e-liquid spectral data set to obtain an e-liquid window spectral fragment data set, and perform competitive screening on the e-liquid window spectral fragment data set to obtain a primary e-liquid characteristic window set; Step S3: screening the primary e-liquid characteristic window set for stable e-liquid characteristic bands to obtain a stable e-liquid characteristic band set; performing characteristic band optimization verification on the stable e-liquid characteristic band set to obtain an optimized nicotine characteristic band set; Step S4: constructing a complete nicotine content prediction model based on the complete e-liquid spectral data set and the optimized nicotine characteristic band set; Step S5: using the complete nicotine content prediction model to perform real-time prediction of the nicotine content of the target e-liquid to obtain a final nicotine content detection result.
[0007] The present invention can effectively overcome the limitations of traditional chemical analysis methods in nicotine content detection through multi-angle and multi-depth near-infrared spectral acquisition, combined with tensor fusion and characteristic band screening optimization. First, this avoids the complex sample pre-treatment process, significantly reduces the detection time and human errors, and meets the demand for real-time monitoring of nicotine content in the e-liquid production process. Secondly, through characteristic band screening and optimization verification, the stability and accuracy of the detection model under the interference of complex components are improved, and the problem of nicotine spectral characteristics being masked in e-liquids of different flavors is solved, thereby providing a fast, accurate and stable means of nicotine content detection for e-liquid production, which helps to improve product quality control efficiency.
[0008] Preferably, the multi-angle near-infrared spectrum acquisition in step S1 includes: Connect a near-infrared light source to a fiber coupler, adjust the optical path branching angles to eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°, set the optical fiber length parameters to 1.2 meters, and the optical fiber numerical aperture to 0.22, respectively, and record the attenuation coefficient and incident angle of each optical path to form a complete analysis optical path parameter set; The e-liquid sample was placed at the center of the rotating sample stage, the rotation step was set to 45°, and the sample stayed at each angle in the eight directions for 5 seconds. The spectrum was collected 20 times with a sampling interval of 0.25 seconds, a wavelength range of 800-2500nm, and a spectral resolution of 2nm to obtain complete initial angular spectral data; Perform signal-to-noise ratio evaluation on the complete initial angular spectrum data to obtain angular signal-to-noise ratio data; The signal-to-noise ratio threshold is set to 15:1, and the angle spectrum data with a signal-to-noise ratio higher than the signal-to-noise ratio threshold is screened out from the complete initial angle spectrum data based on the angle signal-to-noise ratio data, and the screened angle spectrum data is merged into the preferred angle spectrum data.
[0009] Through multi-angle near-infrared spectroscopy acquisition, the present invention realizes the acquisition of comprehensive spectral information of e-liquid samples, effectively improving the comprehensiveness and accuracy of detection. By collecting spectral data at multiple preset angles and combining signal-to-noise ratio evaluation and screening, the interference of low-quality spectral data can be excluded, ensuring that the obtained spectral data has a high signal-to-noise ratio and reliability. This can more comprehensively reflect the spectral characteristics of nicotine in e-liquid, especially in e-liquid systems with complex components, which helps to avoid important information missed by single-angle acquisition.
[0010] Preferably, the multi-depth spectroscopy acquisition in step S1 includes: Setting a thickness grading standard for the e-liquid sample to obtain a sequence of e-liquid sample thickness parameters; Controlling the probe focal length through a stepper motor, setting the focal length adjustment range to 5 - 25 mm, the step size to 5 mm, recording the spot diameter, depth of field, and resolution parameters at each focal length, with the focusing position error less than ±0.1 mm, and calculating the e-liquid depth penetration ability corresponding to each focal length to form a multi-focal length acquisition parameter table; According to the settings in the multi-focal length acquisition parameter table, sequentially adjust the stepper motor to control the probe focal length, and perform near-infrared spectroscopy scanning on each depth layer of the e-liquid sample. Collect 30 spectra for each depth, set the spectral integration time to 100 ms, and the sampling interval to 0.2 seconds to form the original depth spectral data, where the depth layer is the depth corresponding to each e-liquid sample thickness parameter in the sequence of e-liquid sample thickness parameters; Perform a depth resolution evaluation on the original depth spectral data to obtain depth resolution score data; Based on the depth resolution score data, perform depth selection on the original depth spectral data to obtain preferred depth spectral data.
[0011] Through the multi-depth spectroscopy acquisition technology, the present invention can comprehensively obtain the spectral information of different depth layers of e-liquid samples, effectively solving the problem of missing key information in traditional spectral detection methods when dealing with samples with thickness gradients. By precisely controlling the probe focal length and depth scanning parameters, combined with depth resolution evaluation and screening, the high quality and representativeness of the collected spectral data are ensured. This multi-depth acquisition method can deeply reflect the component distribution characteristics at different depths inside the e-liquid, especially having higher detection sensitivity for the change of nicotine content in the e-liquid thickness direction. At the same time, by optimizing the selection of depth spectral data, the anti-interference ability and detection accuracy of the detection system are further improved, providing more reliable depth dimension data support for the accurate prediction of nicotine content, and enhancing the applicability and accuracy of the detection method in complex samples.
[0012] Preferably, the division of the complete e-liquid spectral data set in step S2 includes: A mobile window optimization strategy for constructing a complete e - liquid spectral dataset, where the mobile window optimization strategy includes window types and window parameters; According to the window types and window parameters, slide the window at a preset step size across the entire spectral range of the complete e - liquid spectral dataset, and extract the spectral data segments corresponding to each window position to form an e - liquid window spectral segment dataset.
[0013] Through the mobile window optimization strategy and the competitive screening mechanism, the present invention can efficiently extract representative and discriminative feature windows from the complete e - liquid spectral dataset. By constructing mobile windows and sliding to extract spectral segments, it realizes the refined processing of spectral data and avoids the loss of key information caused by global analysis in traditional methods.
[0014] Preferably, the competitive screening of e - liquid windows for the e - liquid window spectral segment dataset in step S2 includes: Let the e - liquid window spectral segment dataset be , where is the spectral data matrix within the i - th window, N represents the total number of e - liquid window spectral segment data, each row in the spectral data matrix represents the spectral segment of a sample, and each column represents the spectral intensity of a wavelength point; For the spectral data matrix within each window, calculate its covariance matrix using the following formula: ; where is the covariance matrix of , n is the number of rows in , is the transpose of , and is the normalization factor of the covariance; Specifically, the spectral segment data divided according to the mobile window strategy can be extracted from the stored complete e - liquid spectral data, and each segment data forms a matrix , each row of the matrix represents the spectral segment of a sample, and each column represents the spectral intensity of a wavelength point.
[0015] Perform eigenvalue decomposition on the covariance matrix, that is, find the eigenvalues and eigenvectors v that satisfy the following equation: ; Solve the following characteristic polynomial: ; where I is the identity matrix, represents the determinant of the matrix; The eigenvalues obtained by solving the characteristic polynomial are , , …, , …, , where p is the number of features; For each eigenvalue , the corresponding eigenvector can be solved by the following equation : ; Arrange the eigenvalues in descending order, and arrange the corresponding eigenvectors in the same order. Select the first k eigenvalues and the corresponding eigenvectors as the projection direction vectors for each window, and combine the projection direction vectors of all windows to form a local projection matrix: Perform a dot product operation on the spectral data within each window and the corresponding local projection vector to obtain the projection score matrix for each window; Select the dataset of spectral segments of the e-liquid window according to the projection score matrix of the window and a preset characteristic window score threshold to obtain a primary e-liquid characteristic window set.
[0016] By using the eigenvalue decomposition of the covariance matrix and the screening of the projection score matrix, the present invention can effectively identify the spectral windows that are most sensitive to the change of nicotine content, thereby significantly improving the accuracy and pertinence of feature extraction. This enhances the stability and anti-interference ability of the detection model.
[0017] Preferably, the screening of the stable e-liquid characteristic wavelength bands for the primary e-liquid characteristic window set in step S3 includes: Calculate the gradient change rate of each primary e-liquid characteristic window in the primary e-liquid characteristic window set, and determine the best start and end wavelength points of each primary e-liquid characteristic window according to a preset boundary positioning strategy and the gradient change rate to form a candidate set of primary e-liquid characteristic wavelength bands, and the candidate set of primary e-liquid characteristic wavelength bands contains several primary e-liquid characteristic wavelength bands; Calculate the average spectral intensity, signal-to-noise ratio within the wavelength band range of each primary e-liquid characteristic wavelength band and the Pearson correlation coefficient between each primary e-liquid characteristic wavelength band and the nicotine content within the wavelength band range; Perform weight assignment to each primary e-liquid characteristic wavelength band according to the average spectral intensity, the signal-to-noise ratio and the Pearson correlation coefficient to obtain a set of e-liquid wavelength band weight vectors; Evaluate the band stability of each primary e-liquid characteristic wavelength band according to the set of e-liquid wavelength band weight vectors to obtain band stability scoring data; Perform stability threshold screening on the candidate set of primary e-liquid characteristic wavelength bands based on the band stability scoring data to obtain a set of stable e-liquid characteristic wavelength bands.
[0018] By comprehensively considering multi-dimensional parameters such as the gradient change rate, average spectral intensity, signal-to-noise ratio, and Pearson correlation coefficient with nicotine content, the present invention finely screens the primary e-liquid characteristic window, thereby effectively identifying stable and highly correlated characteristic bands. This can accurately eliminate the disturbed or unstable parts, ensuring that the selected characteristic bands can still stably reflect the change of nicotine content in complex e-liquid components. The threshold screening mechanism based on the band stability score further improves the quality and reliability of the characteristic bands, provides a more accurate and stable spectral feature basis for subsequent model construction and nicotine content prediction, significantly enhances the adaptability and accuracy of the detection system, and enables it to better cope with e-liquid samples with different flavors and complex components.
[0019] Preferably, before the optimization and verification of the characteristic bands for the stable e-liquid characteristic band set in step S3, it further includes: Construct a nicotine concentration gradient sequence, collect the spectra of nicotine solutions at each concentration gradient according to the nicotine concentration gradient sequence, and record the spectral responses of the nicotine solutions at each concentration gradient within the stable characteristic bands according to the stable e-liquid characteristic band set to obtain a nicotine concentration gradient spectral response data set; Determine the types of interfering substances in the e-liquid sample, prepare multiple negative control samples according to the types of interfering substances in the e-liquid sample, collect the spectra of each negative control sample, and record the spectral responses of each negative control sample within the stable characteristic bands according to the stable e-liquid characteristic band set to obtain an interfering substance spectral response data set; Record the nicotine concentration gradient spectral response data set and the interfering substance spectral response data set as the nicotine concentration gradient verification data set.
[0020] By constructing the spectral response data sets of the nicotine concentration gradient sequence and the interfering substance negative control samples, the present invention provides a comprehensive and rigorous experimental basis for the optimization and verification of the characteristic bands. The nicotine concentration gradient spectral response data set can clearly reflect the spectral change law of the characteristic bands at different concentrations, thereby providing a verification basis for the quantitative analysis ability of the characteristic bands; while the interfering substance spectral response data set is used to evaluate the anti-interference ability of the characteristic bands in actual complex samples. This can effectively screen out characteristic bands with high accuracy and stability in a variety of actual application scenarios, ensuring that the constructed nicotine content prediction model can still maintain good detection performance and reliability when facing e-liquid samples with complex components.
[0021] Preferably, the optimization and verification of the characteristic bands for the stable e-liquid characteristic band set in step S3 includes: Obtain the nicotine concentration gradient verification data set; Extract the spectral response data within each stable e-liquid characteristic band from the nicotine concentration gradient verification dataset. For each stable e-liquid characteristic band, the spectral response data includes the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples. Perform feature band optimization verification on the stable e-liquid characteristic band set based on the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples to obtain an optimized nicotine feature band set.
[0022] Through the optimization verification of the stable e-liquid characteristic band set, the present invention further improves the accuracy and anti-interference ability of the feature bands. By combining the spectral responses of the standard solutions and negative control samples in the nicotine concentration gradient verification dataset, it is possible to comprehensively evaluate the quantitative analysis ability of the feature bands at different concentration levels and their specificity in complex backgrounds. This ensures that the finally selected optimized nicotine feature band set is not only highly sensitive to changes in nicotine content but also effectively excludes the influence of interfering substances, thereby significantly enhancing the stability and reliability of the detection model.
[0023] Preferably, step S4 includes the following steps: Step S41: Reorganize the corresponding e-liquid spectral data in the optimized nicotine feature band set based on the complete e-liquid spectral dataset in three dimensions: sample ID, wavelength, and time series to generate nicotine feature three-dimensional feature tensor data. Step S42: Use a preset tensor decomposition method to decompose the nicotine feature three-dimensional feature tensor data into a set of low-dimensional factor matrices. Each factor matrix represents the latent features in the sample ID / wavelength / time series dimensions, generating a nicotine tensor decomposition factor matrix set containing sample patterns, wavelength patterns, and time patterns. Step S43: Identify the interaction patterns in the sample-wavelength, wavelength-time, and sample-time dimensions in the nicotine tensor decomposition factor matrix set to obtain nicotine multi-dimensional interaction relationship data. Step S44: Reconstruct and integrate the nicotine tensor decomposition factor matrix set and the nicotine multi-dimensional interaction relationship data through bilinear mapping to obtain a nicotine multi-dimensional feature matrix. Step S45: Perform heterogeneous spectral data fusion on the nicotine multi-dimensional feature matrix to obtain a heterogeneous nicotine spectral fusion dataset. Step S46: Build a complete nicotine content prediction model based on the heterogeneous nicotine spectral fusion dataset.
[0024] Through the introduction of tensor decomposition and multi-dimensional feature analysis, the present invention realizes the in-depth mining and efficient integration of e-liquid spectral data. By reorganizing the optimized nicotine characteristic band data into a three-dimensional feature tensor, multi-dimensional information such as sample ID, wavelength, and time series can be fully retained, avoiding information loss caused by dimensionality reduction in traditional methods. Through tensor decomposition, implicit features in the sample, wavelength, and time dimensions are further extracted, revealing the complex interaction relationship between nicotine content and spectral data. This can more comprehensively capture the spectral variation law of nicotine under different conditions, significantly improving the accuracy and depth of feature extraction. The construction of the feature matrix is further optimized through steps of bilinear mapping and heterogeneous spectral data fusion, enhancing the adaptability and generalization ability of the model to complex spectral data.
[0025] Preferably, the present invention also provides a system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy, which is used to execute the method for rapidly determining the nicotine content in e-liquid as described above. The system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy includes: A spectral acquisition module, which is used to perform multi-angle near-infrared spectral acquisition and multi-depth spectral acquisition on the e-liquid sample to obtain preferred angle spectral data and preferred depth spectral data, and perform tensor fusion on the preferred angle spectral data and the preferred depth spectral data to obtain a complete e-liquid spectral data set; A feature window extraction module, which is used to divide the complete e-liquid spectral data set to obtain an e-liquid window spectral segment data set, and perform competitive screening on the e-liquid window spectral segment data set to obtain a primary e-liquid feature window set; A feature band screening module, which is used to perform stable e-liquid feature band screening on the primary e-liquid feature window set to obtain a stable e-liquid feature band set; and perform feature band optimization verification on the stable e-liquid feature band set to obtain an optimized nicotine feature band set; A prediction model construction module, which is used to construct a complete nicotine content prediction model based on the complete e-liquid spectral data set and the optimized nicotine feature band set; A nicotine content prediction module, which is used to use the complete nicotine content prediction model to perform real-time prediction of the nicotine content of the target e-liquid to obtain a final nicotine content detection result.
[0026] Through the spectral acquisition module of the present invention, multi-angle and multi-depth spectral information of the e-liquid sample can be comprehensively obtained; the feature window extraction module and the feature band screening module ensure the stability and representativeness of the feature bands through precise screening and optimization, thereby effectively improving the accuracy and anti-interference ability of the detection model. The prediction model construction module and the nicotine content prediction module further realize the efficient conversion from data to results, and can quickly and real-time output the nicotine content detection result. Description of the Drawings
[0027] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings: Figure 1 FIG. is a schematic flow chart showing the steps of a method for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy according to an embodiment.
[0028] Figure 2 FIG. shows a detailed schematic flow chart of step S4 according to an embodiment. Detailed Embodiments
[0029] The technical method of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0030] In addition, the drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0031] It should be understood that although terms such as "first" and "second" may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit can be called the second unit, and similarly the second unit can be called the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed related items.
[0032] To achieve the above object, please refer to Figures 1 to 2 , the present invention provides a method for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy, including the following steps: Step S1: Collect multi-angle near-infrared spectra and multi-depth spectra of the e-liquid sample to obtain preferred angle spectral data and preferred depth spectral data, and perform tensor fusion on the preferred angle spectral data and the preferred depth spectral data to obtain a complete e-liquid spectral data set; Step S2: Divide the complete e-liquid spectral dataset to obtain the e-liquid window spectral segment dataset, and perform competitive screening on the e-liquid window spectral segment dataset to obtain the primary e-liquid characteristic window set; Step S3: Screen the stable e-liquid characteristic bands from the primary e-liquid characteristic window set to obtain the stable e-liquid characteristic band set; perform optimization verification on the stable e-liquid characteristic band set to obtain the optimized nicotine characteristic band set; Step S4: Construct a complete nicotine content prediction model based on the complete e-liquid spectral dataset and the optimized nicotine characteristic band set; Step S5: Use the complete nicotine content prediction model to perform real-time prediction of the nicotine content of the target e-liquid to obtain the final nicotine content detection result.
[0033] In this embodiment, a BrukermPA near-infrared spectrometer is used to collect multi-angle and multi-depth spectra of the cigarette oil sample. First, a near-infrared light source is connected to a fiber coupler, and the optical path branching angles are set to eight directions of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. The fiber length is 1.2 meters and the numerical aperture is 0.22. The cigarette oil sample is placed at the center of the rotating sample stage, the rotation step is set to 45°, stay at each angle for 5 seconds, collect 20 spectra, the sampling interval is 0.25 seconds, the wavelength range is 800-2500nm, and the spectral resolution is 2nm. At the same time, the probe focal length is controlled by a stepper motor, the focal length adjustment range is set to 5-25mm, the step length is 5mm, 30 spectra are collected for each depth level, the spectral integration time is 100ms, and the sampling interval is 0.2 seconds. After the acquisition is completed, the spectral data is processed using Python's Pandas library. The preferred angle spectral data and the preferred depth spectral data are screened out according to the signal-to-noise ratio threshold (15:1), and the two are merged through tensor fusion technology to obtain a complete smoke oil spectral data set. Next, the complete smoke oil spectral data set is divided using Python's NumPy library, and a moving window optimization strategy is constructed. The window is slid according to the preset step size to extract the spectral data fragments corresponding to each window position to form a smoke oil window spectral fragment data set. Then, the smoke oil window spectral fragment data set is competitively screened, the covariance matrix and eigenvalue of each window are calculated, and the eigenvectors corresponding to the first k eigenvalues are selected as the projection direction vector to obtain the primary smoke oil feature window set. The primary smoke oil feature window set is further screened for stable smoke oil feature bands, and the gradient change rate, average spectral intensity, signal-to-noise ratio and Pearson correlation coefficient of each band are calculated. The band stability is evaluated according to the weight distribution to obtain a stable smoke oil feature band set. The characteristic band set of stable e-liquid was optimized and verified. The optimized nicotine characteristic band set was screened out through the nicotine concentration gradient spectral response data set and the interfering substance spectral response data set, combined with the preset spectral feature matching threshold and signal discrimination standard. Based on the complete e-liquid spectral data set and the optimized nicotine characteristic band set, a complete nicotine content prediction model was constructed using Python's Scikit-learn library. Partial least squares regression (PLS) was selected as the regression model, and the model parameters were optimized through cross-validation to evaluate the model performance (such as RMSE and R²). The trained model was saved as a file for subsequent predictions. Finally, the target e-liquid was spectrally collected and preprocessed to obtain real-time preprocessed spectral data, which was input into the robust nicotine content prediction model for prediction calculation, and the final nicotine content detection result was output.
[0034] It is particularly important that step S5 further comprises the following steps: Step S51: Construct a time series monitoring dataset for the complete nicotine content prediction model to obtain the time series data of model performance; Specifically, the Python programming language and its Pandas library can be used to process the monitoring data of the complete nicotine content prediction model. First, extract the predicted values and actual values at each time point from the model's prediction results, arrange these data in chronological order to form a time series monitoring dataset. Use the DataFrame structure of the Pandas library to store these data, where the columns include timestamps, predicted values, and actual values. Then, calculate the model performance metrics at each time point, such as the root mean square error (RMSE) and coefficient of determination (R²), and store these metrics as the time series data of model performance. For example, use the mean_squared_error function in the Scikit-learn library to calculate RMSE and the r2_score function to calculate R².
[0035] Step S52: Conduct trend analysis and change point detection based on the time series data of model performance to obtain the model drift feature data; Specifically, the Statsmodels library and ruptures library in Python can be used to conduct trend analysis and change point detection on the time series data of model performance. First, use the tsa module in the Statsmodels library to conduct trend analysis on the time series data of RMSE and R² to determine whether there is a long-term change trend in model performance. Then, use the Binseg algorithm in the ruptures library to conduct change point detection on the time series data to identify the time points at which the model performance changes significantly. For example, set the penalty term for change point detection to 10 and the maximum number of splits to 5, and the detected change points will be used as the feature points of model drift. Finally, integrate the trend analysis results and the change point positions into the model drift feature data.
[0036] Step S53: Construct a drift impact factor matrix based on the model drift feature data; conduct principal component analysis and causal relationship inference on the drift impact factor matrix to obtain the key drift factor data; Specifically, based on the model drift feature data, the NumPy library in Python can be used to construct a drift impact factor matrix. The rows of this matrix represent time points, and the columns represent different drift features (such as the change rate of RMSE, the change rate of R², etc.). Then, use the PCA class in the Scikit-learn library to conduct principal component analysis on the drift impact factor matrix to extract the main drift impact factors. For example, select the principal components with a cumulative variance contribution rate reaching 85% as the key drift factors. Then, use a causal relationship inference tool (such as the DoWhy library) to analyze the causal relationship between these principal components and model drift. The final key drift factor data will include the variance contribution rate of the principal components and the causal relationship inference results.
[0037] Step S54: Based on the key drift factor data and the model drift feature data, comprehensively evaluate the complete nicotine content prediction model to obtain model drift evaluation data; Specifically, the complete nicotine content prediction model can be comprehensively evaluated by combining the key drift factor data and the model drift feature data and using the Matplotlib library and Scikit-learn library of Python. First, plot the relationship between the principal component scores of the key drift factors and the model performance metrics (such as RMSE and R²) to analyze the influence degree of the drift factors on the model performance. Then, use the cross_val_score function in the Scikit-learn library to perform cross-validation on the model to evaluate the generalization ability of the model under different drift conditions. For example, set the number of folds of cross-validation to 5, and calculate the average RMSE and R² of the model. Finally, integrate the change trend of the model performance, the influence degree of the key drift factors, and the cross-validation results into the model drift evaluation data.
[0038] Step S55: Calibrate the complete nicotine content prediction model according to the model drift evaluation data to obtain a robust nicotine content prediction model; Specifically, the complete nicotine content prediction model can be calibrated using the Scikit-learn library of Python according to the model drift evaluation data. First, adjust the parameters of the model according to the influence degree of the drift factors. For example, if a certain principal component is significantly correlated with the increase in RMSE, appropriately increase the regularization parameter corresponding to this principal component to suppress the influence of the drift. Then, retrain the model with the calibrated parameters and evaluate the performance of the model on the validation set. If the model performance is significantly improved, use the calibrated model as the robust nicotine content prediction model. Finally, use the joblib library to save the robust model as a file.
[0039] Step S56: Perform spectral acquisition and preprocessing on the target e-liquid to obtain real-time preprocessed spectral data; perform prediction calculations according to the real-time preprocessed spectral data and the robust nicotine content prediction model to obtain the final nicotine content detection result.
[0040] Specifically, a BrukermPA near-infrared spectrometer can be used to collect spectra of the target e-liquid sample. Set the wavelength range of the spectrometer to 800-2500nm, the spectral resolution to 2nm, and the number of scans to 32 times. After the acquisition is completed, use Python's Pandas library and Scikit-learn library to preprocess the spectral data. First, use the StandardScaler class to standardize the spectral data. Then, use the SavitzkyGolay filter to smooth the spectral data. The final real-time preprocessed spectral data will be used as input data and input into the robust nicotine content prediction model. Use the model's predict method to predict and calculate the real-time preprocessed spectral data to obtain the final nicotine content detection result.
[0041] Preferably, the multi-angle near-infrared spectrum acquisition in step S1 includes: Connect a near-infrared light source to a fiber coupler, adjust the optical path branching angles to eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°, set the optical fiber length parameters to 1.2 meters, and the optical fiber numerical aperture to 0.22, respectively, and record the attenuation coefficient and incident angle of each optical path to form a complete analysis optical path parameter set; Specifically, a near-infrared spectrometer (such as a Brukerm PA near-infrared spectrometer) equipped with an adjustable angle fiber coupler can be used. The near-infrared light source of the spectrometer is connected to the fiber coupler. The optical fiber uses a standard multimode optical fiber, the length of which is set to 1.2 meters and the numerical aperture is 0.22. Through the adjustment device of the fiber coupler, the optical path branching angle is adjusted to eight directions of 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315° in sequence. In each direction, an optical power meter (such as Thorlabs PM100D) is used to measure the attenuation coefficient of the optical path, and the incident angle is recorded to finally form a complete set of analytical optical path parameters.
[0042] The e-liquid sample was placed at the center of the rotating sample stage, the rotation step was set to 45°, and the sample stayed at each angle in the eight directions for 5 seconds. The spectrum was collected 20 times with a sampling interval of 0.25 seconds, a wavelength range of 800-2500nm, and a spectral resolution of 2nm to obtain complete initial angular spectral data; Specifically, the e-liquid sample to be tested can be placed on a rotatable sample stage equipped with a stepper motor (such as Nanotec STM32 series). Align the center of the sample stage with the output end of the fiber coupler, and set the rotation step to 45°. During the rotation of the sample stage, when the sample is at each angle in the above eight directions, it stays for 5 seconds. Use the acquisition software of the spectrometer (such as Bruker OPUS software) to set the spectral acquisition parameters: wavelength range of 800-2500nm, spectral resolution of 2nm, sampling interval of 0.25 seconds, and collect 20 spectral data at each angle. Through the above steps, the complete initial angle spectral data of the e-liquid sample at different angles can be obtained.
[0043] Perform signal-to-noise ratio evaluation on the complete initial angular spectrum data to obtain angular signal-to-noise ratio data; Specifically, the collected complete initial angle spectrum data can be imported into the spectrum analysis software (such as Grams / AI software). Use the signal-to-noise ratio analysis tool in the software to evaluate the signal-to-noise ratio of the spectrum data at each angle. The specific method is to determine the signal-to-noise ratio by calculating the ratio of the standard deviation of the spectral signal to the standard deviation of the background noise. The software will automatically generate a signal-to-noise ratio curve for the spectrum data at each angle and output a detailed signal-to-noise ratio data report.
[0044] The signal-to-noise ratio threshold is set to 15:1, and the angle spectrum data with a signal-to-noise ratio higher than the signal-to-noise ratio threshold is screened out from the complete initial angle spectrum data based on the angle signal-to-noise ratio data, and the screened angle spectrum data is merged into the preferred angle spectrum data.
[0045] Specifically, the signal-to-noise ratio threshold can be set to 15:1 based on the angle signal-to-noise ratio data. In the spectrum analysis software, use the data screening tool to screen the complete initial angle spectrum data. The specific operation is to remove the spectrum data with a signal-to-noise ratio lower than 15:1 and retain the angle spectrum data with a signal-to-noise ratio higher than the threshold. The screened data will be merged into the preferred angle spectrum data and saved in the form of a data file.
[0046] Preferably, the multi-depth spectrum acquisition in step S1 includes: Setting thickness classification standards for the e-liquid samples to obtain a thickness parameter sequence of the e-liquid samples; Specifically, a digital caliper (such as a Mitutoyo digital caliper with an accuracy of 0.01mm) can be used to measure the container of the e-liquid sample to determine its internal thickness. Assuming that the thickness of the e-liquid sample container is 10mm, based on the assumption of the uniformity of the e-liquid, its thickness is divided into several equally spaced depth levels, for example, a depth level is set every 1mm, thereby obtaining a sequence of e-liquid sample thickness parameters: 1mm, 2mm, 3mm...10mm. These depth parameters will serve as the target depth levels for subsequent multi-depth spectral acquisition.
[0047] The probe focal length is controlled by a stepper motor, and the focal length adjustment range is set to 5-25mm with a step length of 5mm. The spot diameter, depth of field and resolution parameters at each focal length are recorded. At the same time, the focus position error is less than ±0.1mm. The depth penetration ability of the smoke oil corresponding to each focal length is calculated to form a multi-focal length acquisition parameter table; Specifically, a near-infrared spectrometer equipped with an adjustable focal length probe (such as a BrukerTensor 37 spectrometer) can be used, and the probe focal length can be precisely controlled by a stepper motor (such as the Nanotec STM32 series). The probe focal length adjustment range is set to 5-25mm, with a step length of 5mm. At each focal length, the spot diameter is measured using a spot analyzer (such as Thorlabs' BEAM'R series), and the depth of field and resolution parameters are recorded using the spectrometer's built-in software (such as Bruker OPUS software). At the same time, a displacement sensor (such as Keyence's LK-G series) is used to ensure that the focus position error is less than ±0.1mm. According to the parameters at each focal length, the corresponding smoke oil depth penetration ability is calculated using the formula: penetration depth = focal length × spot diameter / depth of field. All data are organized into a multi-focal length acquisition parameter table.
[0048] According to the settings in the multi-focal length acquisition parameter table, the stepper motor is adjusted in sequence to control the probe focal length, and near-infrared spectral scanning is performed on each depth level of the e-liquid sample. 30 spectra are collected at each depth, and the spectral integration time is set to 100ms and the sampling interval is set to 0.2 seconds to form original depth spectral data, wherein the depth level is the depth corresponding to each e-liquid sample thickness parameter in the e-liquid sample thickness parameter sequence; Specifically, according to the settings in the multi-focal length acquisition parameter table, the stepper motor can be adjusted to control the probe focal length in sequence, so that it corresponds to each depth level (1mm, 2mm...10mm) in the smoke oil sample thickness parameter sequence. Place the smoke oil sample on the sample stage of the spectrometer to ensure that its surface is flat and aligned with the probe. At each depth level, use the spectrometer to perform a near-infrared spectrum scan, set the spectral integration time to 100ms, the sampling interval to 0.2 seconds, and collect 30 spectral data to ensure the reliability of the data. The spectral data collected by the spectrometer will be automatically stored as the original deep spectral data file, recording the spectral characteristics of each depth level.
[0049] Performing depth resolution evaluation on the original depth spectrum data to obtain depth resolution score data; Specifically, the original depth spectral data can be imported into spectral analysis software (such as Grams / AI software). Use the depth resolution evaluation tool in the software to analyze the spectral data at each depth level. The specific method is to evaluate the resolution of the spectral data in the depth direction by calculating the rate of change of spectral intensity between adjacent depth levels. The software will output the depth resolution score data for each depth level, with a score range of 0-100, and the higher the value, the higher the resolution. For example, the depth resolution score shows that the spectral data at some depth levels has a higher resolution, while some levels have a lower resolution.
[0050] The original depth spectral data is depth-selected based on the depth-resolution score data to obtain the preferred depth spectral data.
[0051] Specifically, a depth resolution threshold, such as 80 points, can be set based on the depth resolution score data. In the spectral analysis software, the data screening function is used to remove the spectral data of the depth layer with a score lower than 80 points, and the spectral data with a score higher than the threshold is retained as the preferred depth spectral data. These preferred data will be merged and saved as a new data file.
[0052] Preferably, the division of the complete e-liquid spectrum data set in step S2 includes: Constructing a moving window optimization strategy for a complete smoke oil spectrum data set, wherein the moving window optimization strategy includes a window type and a window parameter; Specifically, spectral analysis software (such as OriginLab or MATLAB) can be used to construct a moving window optimization strategy. Select the window type as "rectangular window". Next, set the window parameters, including the window width and step size. According to the characteristics of the e-liquid spectral data, select a window width of 20 wavelength units (e.g., 20 nm) and a step size of 5 wavelength units (e.g., 5 nm). The selection of these parameters is based on the resolution of the e-liquid spectrum and the expected width of the nicotine characteristic band. Through the custom script function of the software, these parameters are embedded into the moving window strategy.
[0053] According to the window type and window parameters, slide the window across the entire spectral range of the complete e-liquid spectral dataset at a preset step size, and extract the spectral data segments corresponding to each window position to form an e-liquid window spectral segment dataset.
[0054] Specifically, in the spectral analysis software, load the complete e-liquid spectral dataset with a wavelength range of 800 - 2500 nm. Starting from a wavelength of 800 nm, slide the rectangular window step by step according to the preset window width of 20 nm and step size of 5 nm. At each window position, extract the spectral data segment within that window range. For example, the first window extracts the spectral data in the range of 800 - 820 nm, the second window extracts the spectral data in the range of 805 - 825 nm, and so on. In this way, gradually cover the entire spectral range (800 - 2500 nm), and finally form an e-liquid window spectral segment dataset. These segment data will be saved as independent files or data structures.
[0055] Preferably, the competitive screening of the e-liquid window spectral segment dataset in step S2 includes: Let the e-liquid window spectral segment dataset be , where is the spectral data matrix within the i-th window, N represents the total number of e-liquid window spectral segment data, each row in the spectral data matrix represents the spectral segment of a sample, and each column represents the spectral intensity at a wavelength point; Specifically, the spectral segment data divided according to the moving window strategy can be extracted from the stored complete e-liquid spectral data, and each segment data forms a matrix , each row of the matrix represents the spectral segment of a sample, and each column represents the spectral intensity at a wavelength point.
[0056] For the spectral data matrix within each window, calculate its covariance matrix using the following formula: ; where is The covariance matrix, where n is the number of rows in and is the transpose of ; is the normalization factor of the covariance; Specifically, for the spectral data matrix within each window , its number of rows n and number of columns m can be determined, where n is the number of samples and m is the number of wavelength points. The dimensional information of each matrix Xi can be obtained through array operation functions in programming languages (such as Python) to ensure clear data structure.
[0057] Perform eigenvalue decomposition on the covariance matrix, that is, find the eigenvalues and eigenvectors v that satisfy the following equation: ; Solve the following characteristic polynomial: ; where I is the identity matrix, represents the determinant of the matrix; The eigenvalues obtained by solving the characteristic polynomial are , , …, , …, , where p is the number of eigenvalues; For each eigenvalue , the corresponding eigenvector can be solved through the following equation: ; Arrange the eigenvalues in descending order, and arrange the corresponding eigenvectors in the same order. Select the first k eigenvalues and the corresponding eigenvectors as the projection direction vectors for each window, and combine the projection direction vectors of all windows to form a local projection matrix: Specifically, eigenvalue decomposition can be performed on the covariance matrix to solve the eigenvalues and eigenvectors v that satisfy the equation . Using the eigenvalue decomposition function of numerical calculation tools (such as NumPy), input the covariance matrix , and output the eigenvalues and the corresponding eigenvector v. By performing matrix subtraction and determinant calculation, a characteristic polynomial is constructed, providing a mathematical basis for solving eigenvalues. Use a numerical calculation tool to solve the roots of the characteristic polynomial, obtain all eigenvalues, and store them as an array. Substitute each eigenvalue into the equation to solve the corresponding eigenvector, and pair and store the eigenvalues and eigenvectors. Use a sorting algorithm to sort the eigenvalue array in descending order and synchronously adjust the order of the corresponding eigenvectors. According to the set k value, extract the top k from the sorted eigenvalues and eigenvectors to form a set of projection direction vectors. Arrange the projection direction vectors of each window in columns to form a matrix, which serves as the local projection matrix.
[0058] Perform a dot product operation on the spectral data within each window and the corresponding local projection vector to obtain the projection score matrix for each window; Specifically, through matrix dot product operation, multiply the spectral data matrix by the projection direction vector to obtain the projection score matrix.
[0059] Select the e-liquid window spectral segment dataset based on the projection score matrix of the window and a preset characteristic window score threshold to obtain the primary e-liquid characteristic window set.
[0060] Specifically, a score threshold can be set to screen windows with significant features. Perform threshold judgment on the projection score matrix of each window, and screen out the windows with scores higher than the threshold to form the primary e-liquid characteristic window set.
[0061] Preferably, the screening of stable e-liquid characteristic bands for the primary e-liquid characteristic window set in step S3 includes: Calculate the gradient change rate of each primary e-liquid characteristic window in the primary e-liquid characteristic window set, and determine the best start and end wavelength points of each primary e-liquid characteristic window according to the preset boundary positioning strategy and the gradient change rate to form a candidate set of primary e-liquid characteristic bands, where the candidate set of primary e-liquid characteristic bands contains several primary e-liquid characteristic bands; Specifically, the Python programming language and its scientific computing libraries NumPy and Pandas can be used to process the spectral data of the primary e-liquid characteristic windows. First, the spectral intensity data of each window are sequentially read from the stored primary e-liquid characteristic window set according to the window number to form a two-dimensional matrix, where the rows represent samples and the columns represent wavelength points. Then, the np.gradient function of NumPy is used to numerically differentiate the spectral intensity at each wavelength point to calculate the gradient change rate, obtaining a gradient change rate matrix. The distribution of the gradient change rate matrix is statistically analyzed, and the mean of the gradient change rate plus twice the standard deviation is selected as the threshold for screening significantly changing wavelength points. The wavelength points in the gradient change rate matrix that are greater than the threshold are marked as significantly changing points, and their wavelength positions are recorded. Adopting a "peak detection" strategy, the find_peaks function in the SciPy library is used to take the local peaks of the significantly changing points as the candidate positions for the start and end wavelength points. The two most significant peaks are selected from the significantly changing points as the start and end wavelength points to form a band range. Finally, the band range of each window is stored as a list to form a candidate set of primary e-liquid characteristic bands.
[0062] Calculate the average spectral intensity, signal-to-noise ratio of each primary e-liquid characteristic band within the band range, and the Pearson correlation coefficient between each primary e-liquid characteristic band within the band range and the nicotine content; Specifically, for each band in the candidate set of primary e-liquid characteristic bands, the Pandas library in Python can be used to calculate the average of the corresponding columns of the spectral intensity matrix to obtain the average spectral intensity within each band. Using the signal processing module in the SciPy library of Python, the signal-to-noise ratio of each band is evaluated by calculating the ratio of the signal mean to the noise standard deviation. At the same time, the Pandas library is used to calculate the Pearson correlation coefficient between the spectral intensity within the band and the known nicotine content to evaluate the correlation between the band and the nicotine content. The calculated average spectral intensity, signal-to-noise ratio, and Pearson correlation coefficient are stored as a structured data table. Through the above steps, a set of spectral characteristic parameters is generated for each primary e-liquid characteristic band.
[0063] Weight assignment is performed on each primary e-liquid characteristic band according to the average spectral intensity, the signal-to-noise ratio, and the Pearson correlation coefficient to obtain a set of e-liquid band weight vectors; Specifically, according to the average spectral intensity, signal-to-noise ratio, and Pearson correlation coefficient, a weight assignment rule can be set. The weight assignment formula is defined as: Weight = × average spectral intensity + × signal-to-noise ratio + × Pearson correlation coefficient, where 、 、 are weight coefficients, which are set to 0.4, 0.3, and 0.3 respectively to balance the importance of each characteristic parameter. Substitute the spectral characteristic parameters of each band into the weight formula to calculate the weight value of each primary e-liquid characteristic band. Summarize the weight values of all bands to form an e-liquid band weight vector set, and store the weight vector set as a Pandas DataFrame.
[0064] Evaluate the band stability of each primary e-liquid characteristic band according to the e-liquid band weight vector set to obtain band stability score data; Specifically, the band stability evaluation standard can be set according to the e-liquid band weight vector set. The band stability scoring formula is defined as: stability score = weight value × band length. Substitute the weight value and band length of each band into the stability scoring formula to calculate the stability score of each primary e-liquid characteristic band. Statistically analyze the distribution of stability scores and select the mean score plus two times the standard deviation as the stability threshold.
[0065] Based on the band stability score data, the primary e-liquid characteristic band candidate set is screened by stability threshold to obtain a stable e-liquid characteristic band set.
[0066] Specifically, the primary e-liquid characteristic band candidate set can be screened according to the stability score and threshold, and the bands with scores higher than the threshold can be screened out to form a stable e-liquid characteristic band set. Finally, the screened stable e-liquid characteristic band set is saved as a CSV file or Pandas DataFrame.
[0067] Preferably, before the characteristic band optimization verification of the stable e-liquid characteristic band set in step S3, the method further includes: Constructing a nicotine concentration gradient sequence, collecting spectra of the nicotine solution of each concentration gradient according to the nicotine concentration gradient sequence, and recording the spectral response of the nicotine solution of each concentration gradient within the stable characteristic band according to the stable cigarette oil characteristic band set, to obtain a nicotine concentration gradient spectral response data set; Specifically, an electronic balance (such as the AL204 model of Mettler Toledo) can be used to accurately weigh different masses of nicotine standards, which are respectively dissolved in an appropriate amount of deionized water to prepare a series of nicotine solutions with different concentrations. The concentration gradients are set to 0.1 mg / mL, 0.2 mg / mL, 0.5 mg / mL, 1.0 mg / mL, and 2.0 mg / mL. The Bruker mPA near-infrared spectrometer is used to collect the spectra of the nicotine solutions at each concentration gradient. During the collection process, the solution is placed in a standard cuvette, and the wavelength range of the spectrometer is set to 800 - 2500 nm, the spectral resolution is 2 nm, and the number of scans is 32 times to ensure the reliability of the data. According to the selected stable e-liquid characteristic band set, the spectral responses of the nicotine solutions at each concentration gradient within these characteristic bands are recorded, and finally a nicotine concentration gradient spectral response data set is formed.
[0068] Determine the types of interfering substances in the e-liquid sample. Prepare multiple negative control samples according to the types of interfering substances in the e-liquid sample. Collect the spectra of each negative control sample, and record the spectral responses of each negative control sample within the stable characteristic bands according to the stable e-liquid characteristic band set to obtain an interfering substance spectral response data set; Specifically, the composition of the e-liquid sample can be analyzed by chemical analysis methods (such as gas chromatography - mass spectrometry, GC - MS) to determine the types of interfering substances present, such as glycerol, propylene glycol, and flavors. According to these types of interfering substances, prepare multiple negative control samples that do not contain nicotine but contain the same interfering substance components as the e-liquid sample. Use the same near-infrared spectrometer (Bruker mPA type) as for the nicotine solution to collect the spectra of each negative control sample. Similarly, set the wavelength range to 800 - 2500 nm, the spectral resolution to 2 nm, and the number of scans to 32 times. According to the stable e-liquid characteristic band set, record the spectral responses of each negative control sample within these characteristic bands to form an interfering substance spectral response data set, and save the data as a CSV file.
[0069] Record the nicotine concentration gradient spectral response data set and the interfering substance spectral response data set as the nicotine concentration gradient verification data set.
[0070] Specifically, the Python programming language and its Pandas library can be used to merge the two data sets to ensure that the spectral response data in each data set accurately corresponds to the corresponding concentration or sample type. The finally generated nicotine concentration gradient verification data set consists of two parts: one part is the spectral response data of nicotine solutions at different concentration gradients, and the other part is the spectral response data of interfering substances.
[0071] Preferably, the feature band optimization verification of the stable e-liquid characteristic band set in step S3 includes: Obtain the nicotine concentration gradient verification dataset; Specifically, the Python programming language and its Pandas library can be used to load the pre - saved nicotine concentration gradient verification dataset. This dataset consists of two parts: one part is the spectral response data of nicotine standard solutions at different concentration gradients, and the other part is the spectral response data of negative control samples. Through the read_csv function of the Pandas library, the data stored in the CSV file is read into the Python environment and stored as a structured DataFrame. Each row of the dataset represents the spectral response of a sample, each column represents the spectral intensity at a wavelength point, and it also includes sample type (nicotine standard solution or negative control sample) and concentration information (for nicotine standard solutions). By checking the integrity of the dataset, ensure that all necessary information (such as wavelength range, concentration gradient, and sample type) is accurately loaded.
[0072] Extract the spectral response data within each stable e - liquid characteristic band from the nicotine concentration gradient verification dataset. For each stable e - liquid characteristic band, the spectral response data includes the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples; Specifically, according to the set of stable e - liquid characteristic bands that have been screened out, extract the spectral response data within each characteristic band from the nicotine concentration gradient verification dataset. Use the Pandas library in Python to operate on the dataset. First, screen out the wavelength range corresponding to each stable e - liquid characteristic band. For each band, extract the spectral response data of nicotine standard solutions and negative control samples within this band. The specific operation is to use the boolean indexing function of Pandas to filter out the corresponding spectral intensity data according to the wavelength range and sample type, and store it as a new DataFrame. Finally, a sub - dataset containing the spectral response data of nicotine standard solutions and negative control samples at different concentration gradients will be generated for each stable e - liquid characteristic band.
[0073] Perform feature band optimization verification on the set of stable e - liquid characteristic bands based on the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples to obtain an optimized set of nicotine characteristic bands.
[0074] Of particular importance, the feature band optimization verification includes: For each stable e-liquid characteristic band, based on the spectral response data of nicotine standard solutions at different concentration gradients, the spectral response data of negative control samples, and a preset spectral feature matching threshold, determine whether the characteristic absorption peak of nicotine in the corresponding stable e-liquid characteristic band is obvious and unique. If so, mark the corresponding stable e-liquid characteristic band as having the specific response ability to nicotine; if not, mark the corresponding stable e-liquid characteristic band as not having the specific response ability to nicotine. Specifically, the Python programming language and its Pandas and NumPy libraries can be used to process the nicotine concentration gradient verification dataset. For each stable e-liquid characteristic band, extract the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples. Calculate the spectral absorption peak intensity of the nicotine standard solution within each band and compare it with the spectral background of the negative control samples. Set the preset spectral feature matching threshold to be more than 3 times higher than the background noise in terms of absorption peak intensity. If the absorption peak intensity of the nicotine standard solution in a certain band exceeds the threshold and there is no obvious absorption peak in this band for the negative control sample, then judge that the characteristic absorption peak of nicotine in this band is obvious and unique, and mark this band as having the specific response ability to nicotine; otherwise, mark it as not having the specific response ability. For example, for the characteristic band with a wavelength range of 1200 - 1300 nm, the absorption peak intensity of the nicotine standard solution is 0.5, while the background noise intensity of the negative control sample is 0.1, and the absorption peak intensity is 5 times that of the background noise, exceeding the threshold, so this band is marked as having the specific response ability.
[0075] For each stable e-liquid characteristic band, identify the trend of the nicotine signal changing with concentration in the spectral response data of nicotine at different concentration gradients, and identify the background noise index of the spectral response data of the negative control samples. According to the trend of the nicotine signal changing with concentration, the background noise index, and a preset judgment criterion, determine whether the signal discrimination degree of nicotine in the corresponding stable e-liquid characteristic band is significant. If so, mark the corresponding stable e-liquid characteristic band as having strong signal discrimination ability; if not, mark the corresponding stable e-liquid characteristic band as having weak signal discrimination ability. Specifically, for each stable e-liquid characteristic band, the spectral response data of nicotine standard solutions at different concentration gradients can be analyzed to identify the trend of nicotine signal variation with concentration. Use the Matplotlib library in Python to plot the relationship between nicotine signal intensity and concentration, and observe whether the signal intensity increases linearly with concentration. At the same time, calculate the background noise index of the spectral response data of negative control samples, such as the standard deviation. Set the preset judgment criteria as follows: the linear correlation coefficient of nicotine signal intensity varying with concentration is greater than 0.9, and the standard deviation of background noise is less than 0.05. If a certain band meets these criteria, it is judged that the nicotine signal discrimination of this band is significant and marked as having strong signal discrimination ability; otherwise, it is marked as having weak signal discrimination ability. For example, in the 1400 - 1500 nm band, the linear correlation coefficient of nicotine signal intensity varying with concentration is 0.92, and the standard deviation of background noise is 0.03, meeting the criteria, so this band is marked as having strong signal discrimination ability.
[0076] The corresponding stable e-liquid characteristic bands marked as having specific response ability to nicotine and strong signal discrimination ability are denoted as the optimized nicotine characteristic band set.
[0077] Specifically, the stable e-liquid characteristic bands marked through the above two steps can be summarized. Select the bands that are simultaneously marked as having specific response ability to nicotine and strong signal discrimination ability, and denote them as the optimized nicotine characteristic band set. For example, after analysis, both the 1200 - 1300 nm and 1400 - 1500 nm bands meet the conditions of specific response and strong signal discrimination ability, so these two bands are included in the optimized nicotine characteristic band set. Use the Pandas library in Python to organize the information of the optimized nicotine characteristic band set into a data table, including the band range, the marking results of specific response ability and signal discrimination ability.
[0078] Preferably, step S4 includes the following steps: Step S41: Based on the complete e-liquid spectral data set, reorganize the corresponding e-liquid spectral data in the optimized nicotine characteristic band set according to three dimensions: sample ID, wavelength, and time series to generate nicotine characteristic three-dimensional feature tensor data; Specifically, the Python programming language and its NumPy library can be used to process the complete e-liquid spectral dataset. First, extract the spectral data corresponding to the optimized nicotine characteristic bands from the stored spectral data. According to the three dimensions of sample ID, wavelength, and time series, reorganize this data into a three-dimensional tensor structure. The specific operation is as follows: taking the sample ID as the first dimension, the wavelength as the second dimension, and the time series as the third dimension, construct a three-dimensional array. For example, assume there are 100 samples in the dataset, each sample has 50 wavelength points within the optimized band, and the spectral data of each sample is collected at 10 time points. Then the shape of the generated three-dimensional feature tensor data is 100×50×10. Using the array operation function of NumPy, fill these data into the three-dimensional tensor to form the three-dimensional feature tensor data of nicotine characteristics.
[0079] Step S42: Use a preset tensor decomposition method to decompose the three-dimensional feature tensor data of nicotine characteristics into a set of low-dimensional factor matrices. Each factor matrix represents the latent features in the sample ID / wavelength / time series dimensions, generating a set of nicotine tensor decomposition factor matrices containing sample patterns, wavelength patterns, and time patterns; Specifically, the Tensorly library in Python can be used to perform tensor decomposition on the generated three-dimensional feature tensor data of nicotine characteristics. Select a preset tensor decomposition method, such as CP decomposition (CanDecomp / Parafac decomposition). Through the cp function in the Tensorly library, decompose the three-dimensional feature tensor into a set of low-dimensional factor matrices. Each factor matrix represents the latent features in the sample ID, wavelength, and time series dimensions respectively. For example, for a 100×50×10 three-dimensional tensor, after decomposition, three factor matrices are obtained: the sample pattern matrix (100×R), the wavelength pattern matrix (50×R), and the time pattern matrix (10×R), where R is the rank of the decomposition, representing the number of latent features. These factor matrices jointly describe the multi-dimensional features of the nicotine characteristic tensor data.
[0080] Step S43: Identify the interaction patterns in the sample-wavelength, wavelength-time, and sample-time dimensions in the set of nicotine tensor decomposition factor matrices to obtain nicotine multi-dimensional interaction relationship data; Specifically, based on the set of nicotine tensor decomposition factor matrices obtained by decomposition, the Matplotlib library and NumPy library of Python can be used to analyze the interaction patterns in the sample-wavelength, wavelength-time, and sample-time dimensions. First, calculate the dot product between each factor matrix to obtain the interaction matrix between different dimensions. For example, calculate the dot product of the sample pattern matrix and the wavelength pattern matrix to obtain the sample-wavelength interaction matrix; calculate the dot product of the wavelength pattern matrix and the time pattern matrix to obtain the wavelength-time interaction matrix; calculate the dot product of the sample pattern matrix and the time pattern matrix to obtain the sample-time interaction matrix. By visualizing these interaction matrices, significant interaction patterns can be identified, such as the strong correlation of certain samples at specific wavelengths and time points. Quantify these interaction patterns into nicotine multi-dimensional interaction relationship data.
[0081] Step S44: Reconstruct and integrate the set of nicotine tensor decomposition factor matrices and the nicotine multi-dimensional interaction relationship data through bilinear mapping to obtain a nicotine multi-dimensional feature matrix; Specifically, the Tensorly library and NumPy library of Python can be used to perform bilinear mapping on the set of nicotine tensor decomposition factor matrices and the multi-dimensional interaction relationship data. The specific operation is: perform matrix multiplication on each factor matrix and the corresponding interaction relationship data to obtain the reconstructed feature matrix. For example, multiply the sample pattern matrix by the sample-wavelength interaction matrix to obtain the reconstructed sample-wavelength feature matrix; multiply the wavelength pattern matrix by the wavelength-time interaction matrix to obtain the reconstructed wavelength-time feature matrix; multiply the sample pattern matrix by the sample-time interaction matrix to obtain the reconstructed sample-time feature matrix. Integrate these reconstructed feature matrices into a complete nicotine multi-dimensional feature matrix, which can more comprehensively reflect the characteristic information of nicotine in different dimensions.
[0082] Step S45: Perform heterogeneous spectral data fusion on the nicotine multi-dimensional feature matrix to obtain a heterogeneous nicotine spectral fusion data set; Specifically, the Scikit-learn library of Python can be used to perform heterogeneous spectral data fusion on the nicotine multi-dimensional feature matrix. Select a suitable data fusion method, such as principal component analysis (PCA) or linear discriminant analysis (LDA). Taking PCA as an example, use the PCA class in the Scikit-learn library to perform dimensionality reduction on the nicotine multi-dimensional feature matrix and extract the main components. Select the appropriate number of main components according to the cumulative variance contribution rate, for example, select the main components with a cumulative variance contribution rate reaching 85%. Use these main components as the fused features to form a heterogeneous nicotine spectral fusion data set.
[0083] Step S46: Build a complete nicotine content prediction model based on the heterogeneous nicotine spectral fusion data set.
[0084] Specifically, the fused feature data and the corresponding actual nicotine content values can be loaded from the stored heterogeneous nicotine spectral fusion dataset. Use the Pandas library in Python to read the data to ensure the correct correspondence between the feature data and the target variable (nicotine content). Standardize the feature data. Use the StandardScaler class in the Scikit-learn library to adjust the mean of the feature data to 0 and the standard deviation to 1. Select partial least squares regression (PLS) as the nicotine content prediction model. Initialize the model through the PLSRegression class in the Scikit-learn library and set the number of principal components to an initial value (e.g., 5). Use the train_test_split function in the Scikit-learn library to divide the dataset into a training set and a test set, with a ratio of 80% for the training set and 20% for the test set. Use the cross-validation method to optimize the parameters of the PLS model. Through the GridSearchCV class in the Scikit-learn library, set the search range of the number of principal components (e.g., from 1 to 10), and combine cross-validation (such as 5-fold cross-validation) to evaluate the model performance under different parameter combinations. Select the root mean square error (RMSE) as the optimization objective to find the number of principal components that minimizes the RMSE. At the same time, adjust other parameters (such as the regularization parameter) as needed to prevent overfitting of the model. Retrain the PLS model with the optimized parameters and evaluate the prediction performance of the model on the test set. Calculate the root mean square error (RMSE) and the coefficient of determination (R²) of the model. RMSE is used to measure the error size between the model prediction value and the actual value, and R² is used to evaluate the data interpretation ability of the model. Ideally, RMSE should be as small as possible and R² should be close to 1. If the model performance is not ideal, further adjust the parameters or try other regression models (such as support vector regression SVR). Save the trained PLS model as a file. Use the joblib library in Python to serialize the model object and save it as a.pkl file. In this way, the model can be directly loaded and used in subsequent prediction tasks without retraining.
[0085] Preferably, the present invention further provides a system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy, which is used to execute the method for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy as described above. The system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy includes: A spectral acquisition module, which is used to perform multi-angle near-infrared spectral acquisition and multi-depth spectral acquisition on the e-liquid sample to obtain preferred angle spectral data and preferred depth spectral data, and perform tensor fusion on the preferred angle spectral data and the preferred depth spectral data to obtain a complete e-liquid spectral dataset; A feature window extraction module, which is used to divide the complete e-liquid spectral data set to obtain an e-liquid window spectral segment data set, and perform competitive screening on the e-liquid window spectral segment data set to obtain a primary e-liquid feature window set; A feature band screening module, which is used to screen stable e-liquid feature bands from the primary e-liquid feature window set to obtain a stable e-liquid feature band set; and perform feature band optimization verification on the stable e-liquid feature band set to obtain an optimized nicotine feature band set; A prediction model construction module, which is used to construct a complete nicotine content prediction model based on the complete e-liquid spectral data set and the optimized nicotine feature band set; A nicotine content prediction module, which is used to use the complete nicotine content prediction model to perform real-time prediction of the nicotine content of the target e-liquid to obtain the final nicotine content detection result.
[0086] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application document are intended to be included in the present invention.
[0087] The above are only specific embodiments of the present invention, which enable those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy, characterized in that, The following steps are involved: Step S1: performing multi-angle near-infrared spectrum acquisition and multi-depth spectrum acquisition on the e-liquid sample to obtain preferred angle spectrum data and preferred depth spectrum data, and performing tensor fusion on the preferred angle spectrum data and the preferred depth spectrum data to obtain a complete e-liquid spectrum data set; Step S2: dividing the complete smoke oil spectrum data set to obtain a smoke oil window spectrum fragment data set, performing smoke oil window competitive screening on the smoke oil window spectrum fragment data set to obtain a primary smoke oil feature window set; Step S3: screening the primary smoke oil feature window set for a stable smoke oil feature band to obtain a stable smoke oil feature band set; The characteristic band set of the stable e-liquid is optimized and verified to obtain the optimized nicotine characteristic band set; Step S4: constructing a complete nicotine content prediction model based on the complete e-liquid spectral data set and the optimized nicotine characteristic band set; Step S5: using the complete nicotine content prediction model to perform real-time prediction of the nicotine content of the target e-liquid to obtain a final nicotine content detection result.
2. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, wherein The multi-angle near-infrared spectrum acquisition in step S1 includes: Connect the near-infrared light source to the fiber coupler, adjust the optical path branching angle to eight directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°, set the optical fiber length parameter to 1.2 meters, and the optical fiber numerical aperture to 0.22, and record the attenuation coefficient and incident angle of each optical path to form a complete analysis optical path parameter set; Place the e-liquid sample at the center of the rotating sample stage, set the rotation step to 45°, stay at each angle in eight directions for 5 seconds, collect 20 spectra, the sampling interval is 0.25 seconds, the wavelength range is set to 800-2500nm, the spectral resolution is 2nm, and obtain complete initial angle spectrum data; Perform signal-to-noise ratio evaluation on the complete initial angular spectrum data to obtain angular signal-to-noise ratio data; The signal-to-noise ratio threshold is set to 15:1, and the angle spectrum data with a signal-to-noise ratio higher than the signal-to-noise ratio threshold is screened out from the complete initial angle spectrum data based on the angle signal-to-noise ratio data, and the screened angle spectrum data is merged into the preferred angle spectrum data.
3. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, wherein The multi-depth spectrum acquisition in step S1 includes: Setting thickness classification standards for the e-liquid samples to obtain a thickness parameter sequence of the e-liquid samples; The probe focal length is controlled by a stepper motor, and the focal length adjustment range is set to 5-25mm with a step length of 5mm. The spot diameter, depth of field and resolution parameters at each focal length are recorded. At the same time, the focus position error is less than ±0.1mm. The depth penetration ability of the smoke oil corresponding to each focal length is calculated to form a multi-focal length acquisition parameter table; According to the settings in the multi-focal length acquisition parameter table, the stepper motor is adjusted in sequence to control the probe focal length, and near-infrared spectrum scanning is performed on each depth level of the e-liquid sample. 30 spectra are collected at each depth, and the spectrum integration time is set to 100ms and the sampling interval is set to 0.2 seconds to form the original depth spectrum data, where the depth level is the depth corresponding to each e-liquid sample thickness parameter in the e-liquid sample thickness parameter sequence; Performing depth resolution evaluation on the original depth spectrum data to obtain depth resolution score data; Based on the depth resolution score data, the original depth spectral data is depth-selected to obtain the optimized depth spectral data.
4. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, characterized in that, The division of the complete e-liquid spectral dataset in step S2 includes: Construct a moving window optimization strategy for the complete e-liquid spectral dataset. The moving window optimization strategy includes window types and window parameters; According to the window types and window parameters, slide the window at a preset step size across the entire spectral range of the complete e-liquid spectral dataset, and extract the spectral data segments corresponding to each window position to form an e-liquid window spectral segment dataset.
5. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, characterized in that The competitive screening of the e-liquid window spectral segment dataset in step S2 includes: Let the spectral segment dataset of the e-liquid window be , where is the spectral data matrix within the i-th window, N represents the total number of spectral segment data of the e-liquid window, each row in the spectral data matrix represents the spectral segment of a sample, and each column represents the spectral intensity at a wavelength point; For the spectral data matrix within each window , calculate its covariance matrix using the following formula: ; Among them, is 's covariance matrix, where n is the number of rows in is 's transpose, is the normalization factor of the covariance; Perform an eigen - decomposition on the covariance matrix to find the eigenvalues that satisfy the following equation and eigen - vectors v: ; Solve the following characteristic polynomial: ; where I is the identity matrix, denotes the determinant of the matrix; The characteristic polynomial is solved to obtain the eigenvalues as , , …, , …, , where p is the number of characteristics; For each eigenvalue , the corresponding eigenvector can be solved by the following equation : ; Arrange the eigenvalues in descending order, and arrange the corresponding eigenvectors in the same order. Select the first k eigenvalues and the corresponding eigenvectors as the projection direction vectors for each window, and combine the projection direction vectors of all windows to form a local projection matrix: Perform a dot product operation on the spectral data within each window and the corresponding local projection vector to obtain a projection score matrix for each window; Select the e-liquid window spectral segment dataset according to the projection score matrix of the window and a preset characteristic window score threshold to obtain a primary e-liquid characteristic window set.
6. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, characterized in that, The screening of stable e-liquid characteristic bands for the primary e-liquid characteristic window set in step S3 includes: Calculate the gradient change rate of each primary e-liquid characteristic window in the primary e-liquid characteristic window set, and determine the best start and end wavelength points of each primary e-liquid characteristic window according to a preset boundary localization strategy and the gradient change rate to form a primary e-liquid characteristic band candidate set. The primary e-liquid characteristic band candidate set contains several primary e-liquid characteristic bands; Calculate the average spectral intensity, signal-to-noise ratio within the band range of each primary e-liquid characteristic band and the Pearson correlation coefficient between each primary e-liquid characteristic band and the nicotine content within the band range; Assign weights to each primary e-liquid characteristic band according to the average spectral intensity, signal-to-noise ratio and Pearson correlation coefficient to obtain an e-liquid band weight vector set; Evaluate the band stability of each primary e-liquid characteristic band according to the e-liquid band weight vector set to obtain band stability score data; Based on the band stability score data, perform a stability threshold screening on the primary e-liquid characteristic band candidate set to obtain a stable e-liquid characteristic band set.
7. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, wherein Before performing the characteristic band optimization verification on the stable e-liquid characteristic band set in step S3, it also includes: Construct a nicotine concentration gradient sequence, collect the spectra of nicotine solutions at each concentration gradient according to the nicotine concentration gradient sequence, and record the spectral responses of the nicotine solutions at each concentration gradient within the stable characteristic bands according to the stable e-liquid characteristic band set to obtain a nicotine concentration gradient spectral response dataset; Determine the types of interfering substances in the e-liquid sample, prepare multiple negative control samples according to the types of interfering substances in the e-liquid sample, collect the spectra of each negative control sample, and record the spectral responses of each negative control sample within the stable characteristic bands according to the stable e-liquid characteristic band set to obtain an interfering substance spectral response dataset; Record the nicotine concentration gradient spectral response dataset and the interfering substance spectral response dataset as the nicotine concentration gradient verification dataset.
8. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, wherein The characteristic band optimization verification of the stable e-liquid characteristic band set in step S3 includes: Obtain the nicotine concentration gradient verification dataset; Extract the spectral response data within each stable e-liquid characteristic band from the nicotine concentration gradient verification dataset. For each stable e-liquid characteristic band, the spectral response data includes the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples. Based on the spectral response data of nicotine standard solutions at different concentration gradients and the spectral response data of negative control samples, perform feature band optimization verification on the stable e-liquid characteristic band set to obtain an optimized nicotine feature band set.
9. The method for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy according to claim 1, wherein Step S4 includes the following steps: Step S41: Based on the complete e-liquid spectral dataset, reorganize the corresponding e-liquid spectral data in the optimized nicotine feature band set according to the three dimensions of sample ID, wavelength, and time series to generate nicotine feature three-dimensional feature tensor data. Step S42: Use a preset tensor decomposition method to decompose the nicotine feature three-dimensional feature tensor data into a set of low-dimensional factor matrices. Each factor matrix represents the latent features in the sample ID / wavelength / time series dimension, generating a set of nicotine tensor decomposition factor matrices containing sample patterns, wavelength patterns, and time patterns. Step S43: Identify the interaction patterns in the sample-wavelength, wavelength-time, and sample-time dimensions in the set of nicotine tensor decomposition factor matrices to obtain nicotine multi-dimensional interaction relationship data. Step S44: Through bilinear mapping, reconstruct and integrate the set of nicotine tensor decomposition factor matrices and the nicotine multi-dimensional interaction relationship data to obtain a nicotine multi-dimensional feature matrix. Step S45: Perform heterogeneous spectral data fusion on the nicotine multi-dimensional feature matrix to obtain a heterogeneous nicotine spectral fusion dataset. Step S46: Based on the heterogeneous nicotine spectral fusion dataset, construct a complete nicotine content prediction model.
10. A system for rapidly determining the nicotine content in e-liquid by using near-infrared spectroscopy, characterized in that, A system for rapidly determining the nicotine content in e-liquid using near-infrared spectroscopy, which is used to execute the method for rapidly determining the nicotine content in e-liquid as described in claim 1, includes: A spectral acquisition module for performing multi-angle near-infrared spectral acquisition and multi-depth spectral acquisition on an e-liquid sample to obtain preferred angle spectral data and preferred depth spectral data, and performing tensor fusion on the preferred angle spectral data and the preferred depth spectral data to obtain a complete e-liquid spectral dataset. A feature window extraction module for dividing the complete e-liquid spectral dataset to obtain an e-liquid window spectral segment dataset, and performing competitive screening on the e-liquid window spectral segment dataset to obtain a primary e-liquid feature window set. A feature band screening module for screening stable e-liquid characteristic bands from the primary e-liquid feature window set to obtain a stable e-liquid characteristic band set; performing feature band optimization verification on the stable e-liquid characteristic band set to obtain an optimized nicotine feature band set. A prediction model construction module for constructing a complete nicotine content prediction model based on the complete e-liquid spectral dataset and the optimized nicotine feature band set. A nicotine content prediction module for using the complete nicotine content prediction model to perform real-time prediction of the nicotine content in a target e-liquid to obtain a final nicotine content detection result.
Citation Information
Cited By
Water pollution real-time detection and early warning method based on self-adaptive spectral feature fusion
CN120721661A
Method for detecting content of salidroside in rhodiola rosea extracting solution based on artificial intelligence
CN120741405A
Tobacco leaf nicotine content monitoring method and system based on unmanned aerial vehicle
CN121656153A