A safflower seed oil glyceride oil quality detection method based on spectral analysis
By combining spectral preprocessing and absorption peak matching models, the problems of noise interference and data alignment in the detection of safflower seed oil diglyceride were solved, achieving efficient and accurate quality judgment, adapting to changes in environment and equipment, and meeting the needs of rapid detection.
Patent Information
- Application Number
- CN202511785563.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-12-01
AI Technical Summary
Existing spectroscopic analysis techniques suffer from problems such as noise interference, unclear characteristic absorption peaks, difficulty in data alignment, and limited ability of absorption peak matching models to identify quality in safflower seed oil diglyceride oil, resulting in inaccurate test results.
Noise is removed through spectral preprocessing, effective detection ranges are defined, and an absorption peak matching model is constructed. Convolutional neural networks are used to identify features, impurities, and abnormal peaks. Combined with real-time monitoring of equipment status and environmental parameters, correction parameters are dynamically adjusted to achieve data alignment and quality judgment.
This improved the accuracy and reliability of spectral data, enabling accurate, efficient, and real-time detection of safflower seed oil diglyceride.
Smart Images

Figure CN121207902B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral analysis technology, specifically to a method for quality detection of safflower seed oil diglyceride oil based on spectral analysis. Background Technology
[0002] In the field of oil and fat testing, the quality testing of safflower seed oil diglyceride oil is crucial due to its unique physiological functions and nutritional value. Traditional oil and fat quality testing methods, such as gas chromatography and high-performance liquid chromatography, while possessing a certain degree of accuracy, suffer from drawbacks such as long testing cycles, complex operations, high costs, and the consumption of large amounts of chemical reagents, making it difficult to meet the demands for rapid, real-time, and online testing.
[0003] With the development of spectroscopic analysis technology, its application in oil and fat detection has gradually attracted attention. Spectroscopic analysis technology has advantages such as speed, non-destructive nature, and high efficiency, enabling rapid detection of oil and fat components and quality. However, in practical applications, due to the complex composition of safflower seed oil diglyceride, its spectral data is easily interfered with by various factors, such as the light source parameters of the spectral acquisition equipment, detector sensitivity, and ambient temperature and humidity. This results in noise in the raw spectral data, indistinct characteristic absorption peaks, and difficulty in accurately identifying the characteristic markers and quality anomalies of diglyceride oil, affecting the accuracy and reliability of the detection results.
[0004] Furthermore, the distribution of spectral data from different samples varies in the wavelength coordinate system, making it difficult for traditional spectral analysis methods to effectively align the data, thus increasing the difficulty of analyzing multi-dimensional spectral data. At the same time, existing absorption peak matching models have limited ability to identify characteristic peaks, impurity peaks, and anomalous peaks when processing complex spectral data, making it difficult to accurately determine the quality of safflower seed oil diglyceride oil.
[0005] Therefore, improving the accuracy and reliability of spectral analysis technology in the quality detection of safflower seed oil diglyceride has become an urgent problem for those skilled in the art. A quality detection method is needed that can effectively handle noise in spectral data, accurately delineate the effective detection range, achieve data alignment, and construct an efficient absorption peak matching model to meet the requirements of safflower seed oil diglyceride quality detection. Summary of the Invention
[0006] The purpose of this invention is to provide a method for quality detection of safflower seed oil diglyceride based on spectral analysis, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, this invention provides a method for quality detection of safflower seed oil diglyceride oil based on spectral analysis, the method comprising:
[0008] Acquire the spectral acquisition parameters and the corresponding raw spectral data of the safflower seed oil diglyceride sample to be tested; the raw spectral data includes the band information of the characteristic absorption peaks and is acquired according to a preset scanning mode.
[0009] The original spectral data is preprocessed to extract the characteristic absorption difference points between each band, and a feature mapping set is generated based on the distribution pattern of the characteristic absorption difference points.
[0010] Based on the feature mapping set, an effective detection interval is divided for each sample's detection band, and the spectral acquisition parameters are adjusted according to the division results to form a correction parameter set;
[0011] The adjusted spectral data of each sample are aligned according to the correction parameter group to generate aligned multidimensional spectral data.
[0012] The multidimensional spectral data is subjected to characteristic absorption peak matching processing to identify the characteristic markers and quality anomaly markers of diglyceride oil, and a quality judgment result is generated.
[0013] Preferably, spectral preprocessing of the raw spectral data includes:
[0014] The initial noise parameters for each band are calculated based on the light source parameters and detector sensitivity of the spectral acquisition device.
[0015] Based on the distribution density of the characteristic absorption difference points, points with absorption deviations exceeding a threshold on both sides are selected from the entire band as deviation boundary points.
[0016] The spectral transformation coefficients of the deviation boundary point are calculated based on the initial noise parameters, and the center band is used as the reference transformation band.
[0017] Noise data is interpolated based on the spectral transformation coefficients, the reference transformation band, and the position of the deviation boundary point to generate spectral data after spectral preprocessing.
[0018] Preferably, noise data interpolation based on the spectral transformation coefficients, the reference transformation band, and the position of the deviation boundary point includes:
[0019] The region between the reference transformation band and the deviation boundary point is taken as the main processing region, and the other regions are taken as auxiliary processing regions.
[0020] A spectral noise compensation function is constructed based on the initial noise parameters; the spectral noise compensation function is the correspondence between the spectral signal intensity and the actual detected value.
[0021] The first correction signal is generated by interpolating the main processing region according to the spectral noise compensation function, and the second correction signal is generated by interpolating the auxiliary processing region.
[0022] By combining the characteristic absorption point distribution of the second correction signal, and using the noise attenuation function and the spectral noise compensation function together, the second correction signal is corrected to generate the third correction signal;
[0023] The first and third correction signals are combined to form the spectral data after spectral preprocessing.
[0024] Preferably, dividing the effective detection interval for each sample based on the detection band of the feature mapping set includes:
[0025] The detection coverage area corresponding to the reference transformation band is calculated in the wavelength coordinate system based on the scanning angle of the spectral acquisition device and used as the reference range.
[0026] The interval coordinates of each sample spectrum in the wavelength coordinate system are determined based on the reference range and the spectral transformation coefficient.
[0027] The scanning step size and integration time of the spectral acquisition device are adjusted according to the coordinate interval to form a set of calibration parameters.
[0028] Preferably, the characteristic absorption peak matching processing of the multidimensional spectral data includes:
[0029] The multidimensional spectral data is input into the absorption peak matching model, and the output of the absorption peak matching model is used as the quality judgment result.
[0030] Preferably, the establishment of the absorption peak matching model includes:
[0031] Spectral samples of safflower seed oil diglyceride oil of various purity grades were collected and the samples were divided into characteristic peak samples, impurity peak samples and abnormal peak samples.
[0032] Establish characteristic peak matching standards, impurity peak matching standards, and abnormal peak matching standards in the absorbance-wavelength space, respectively.
[0033] Construct a matching weight allocation model based on the matching criteria;
[0034] The convolutional neural network is trained based on the classified spectral samples to form a feature peak matching sub-model, an impurity peak matching sub-model, and an anomaly peak matching sub-model.
[0035] The matching weight allocation model, the feature peak matching sub-model, the impurity peak matching sub-model, and the abnormal peak matching sub-model are combined into an absorption peak matching model.
[0036] Preferably, the multi-dimensional spectral data is input into the absorption peak matching model, and the output of the absorption peak matching model is used as the quality judgment result, including:
[0037] The matching weight allocation model assigns characteristic weights, impurity weights, and anomaly weights to the absorption peaks of each band.
[0038] The band regions assigned to feature weights are processed for feature identification through the feature peak matching sub-model;
[0039] The band regions assigned to impurity weights are used for impurity component identification through the impurity peak matching sub-model.
[0040] The band regions assigned to abnormal weights are processed for quality anomaly identification through the abnormal peak matching sub-model;
[0041] The outputs of each sub-model are combined into a quality assessment result.
[0042] Preferably, the characteristic peak matching standard, impurity peak matching standard, and anomalous peak matching standard are established in the absorbance-wavelength space, including:
[0043] The average absorbance of the characteristic peaks in the spectral sample is calculated as the reference absorbance, the average wavelength of the characteristic peaks is calculated as the reference wavelength, and the average wavelength of the impurity peaks is calculated as the impurity reference wavelength.
[0044] The characteristic peak matching standard is that the fluctuation range of absorbance value in the characteristic peak region does not exceed a preset proportion of the reference absorbance, and the wavelength fluctuation range is less than a first threshold.
[0045] The impurity peak matching standard is that the distribution variance of wavelength values within the impurity peak region is less than a second threshold, and the difference between the absorbance value and the reference absorbance is less than a third threshold.
[0046] The abnormal peak matching criteria are that the wavelength gradient change rate of adjacent bands within the abnormal peak region is less than the fourth threshold, and the absorbance gradient change rate is less than the fifth threshold.
[0047] Preferably, after generating the quality assessment result, the method further includes:
[0048] Real-time monitoring of the operating status of the spectral acquisition equipment and environmental temperature and humidity parameters;
[0049] The scanning step size, integration time, and matching weight in the calibration parameter group are dynamically adjusted based on the monitoring results to adapt to environmental changes.
[0050] Preferably, dynamically adjusting the scan step size, integration time, and matching weight in the correction parameter group based on the monitoring results includes:
[0051] The working status parameters are compared with preset equipment status thresholds, and the ambient temperature and humidity parameters are compared with preset environmental thresholds.
[0052] When the device status parameters exceed the device status threshold, adjust the scan step size to a preset multiple of the initial step size.
[0053] When the ambient temperature and humidity parameters exceed the environmental threshold, the integration time is adjusted to a preset multiple of the initial time;
[0054] The matching weights are redistributed based on the adjusted scan step size and integration time to form a dynamic correction parameter set.
[0055] Compared with the prior art, the beneficial effects of the present invention are:
[0056] The safflower seed oil diglyceride quality detection method based on spectral analysis provided by this invention has several advantages. In the spectral preprocessing stage, by calculating the initial noise parameters of each band, screening deviation boundary points, calculating the spectral transformation coefficient using the center band as the reference band, and then performing noise data interpolation, noise in the original spectral data can be effectively removed, improving the quality of the spectral data. Specifically, the area between the reference transformation band and the deviation boundary point is designated as the main processing region, while other areas are designated as auxiliary processing regions. A spectral noise compensation function is constructed for interpolation, and the correction signal in the auxiliary processing region is further corrected using a noise attenuation function, making the preprocessed spectral data more accurately reflect the sample characteristics.
[0057] In terms of detection interval division, the detection coverage of the reference transformation band is calculated based on the scanning angle of the spectral acquisition equipment as the reference range. The coordinates of the spectral interval of each sample are determined by combining the spectral transformation coefficient. Then, the scanning step size and integration time are adjusted to form a set of correction parameters. This can accurately divide the effective detection interval for each sample's detection band, so that subsequent detection focuses on the key band, improving detection efficiency and targeting.
[0058] In terms of data alignment, the adjusted sample spectral data are processed according to the correction parameter group to generate aligned multi-dimensional spectral data. This solves the problem of differences in the distribution of different sample spectral data in the wavelength coordinate system, making the multi-dimensional spectral data more comparable and valuable for analysis, and laying a good foundation for subsequent characteristic absorption peak matching.
[0059] In the characteristic absorption peak matching process, multi-dimensional spectral data is input into the absorption peak matching model. The model is rigorously developed, collecting and classifying samples of various purity levels, establishing matching criteria in the absorbance-wavelength space, constructing a matching weight allocation model, and training a convolutional neural network to form sub-models which are then combined. In application, the matching weight allocation model assigns weights to absorption peaks in each band. Each sub-model separately identifies feature characteristics, impurities, and quality anomalies. Finally, the results are merged, enabling accurate identification of the characteristic features and quality anomalies of diglyceride oil, thus improving the accuracy of quality assessment.
[0060] Furthermore, after generating the quality assessment results, the system monitors the equipment's operating status and environmental temperature and humidity parameters in real time. Based on the monitoring results, it dynamically adjusts the scanning step size, integration time, and matching weights in the calibration parameter set. When equipment status parameters exceed thresholds, the scanning step size is adjusted; when environmental temperature and humidity parameters exceed thresholds, the integration time is adjusted. The matching weights are then reallocated to form a dynamic calibration parameter set, enabling the detection method to adapt to changes in equipment status and environment. This ensures the stability and reliability of the detection results, achieving accurate, efficient, and real-time detection of safflower seed oil diglyceride quality. Attached Figure Description
[0061] Figure 1 This is a schematic diagram illustrating the working principle of the safflower seed oil diglyceride oil quality detection method based on spectral analysis described in this invention.
[0062] Figure 2 A flowchart for interpolating noise data;
[0063] Figure 3 Flowchart for establishing the absorption peak matching model;
[0064] Figure 4 A flowchart illustrating the application of the absorption peak matching model. Detailed Implementation
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] Please see Figures 1-4 This invention provides a method for quality detection of safflower seed oil diglyceride oil based on spectral analysis, and the specific implementation steps are as follows:
[0067] The spectral acquisition parameters and raw spectral data of the safflower seed oil diglyceride sample to be tested were obtained. The raw spectral data includes the band information of characteristic absorption peaks and was acquired according to a preset scanning mode.
[0068] The raw spectral data undergoes spectral preprocessing. First, initial noise parameters for each band are calculated based on the light source parameters and detector sensitivity of the spectral acquisition equipment. Then, points with absorption deviations exceeding a threshold on both sides are selected from the entire band as deviation boundary points based on the distribution density of characteristic absorption difference points. Next, the spectral transformation coefficients of the deviation boundary points are calculated based on the initial noise parameters, with the center band serving as the reference transformation band. Finally, noise data interpolation is performed based on the spectral transformation coefficients, the reference transformation band, and the location of the deviation boundary points to generate the preprocessed spectral data. During noise data interpolation, the region between the reference transformation band and the deviation boundary points is designated as the main processing region, while other regions are designated as auxiliary processing regions. A spectral noise compensation function is constructed based on the initial noise parameters, representing the correspondence between spectral signal intensity and actual detected values. The main processing region is interpolated using the spectral noise compensation function to generate a first correction signal, and the auxiliary processing region is interpolated to generate a second correction signal. Combining the characteristic absorption point distribution of the second correction signal with the noise attenuation function and the spectral noise compensation function, the second correction signal is corrected to generate a third correction signal. The first and third correction signals are then merged to form the preprocessed spectral data.
[0069] The effective detection interval is divided for each sample based on the feature mapping set. First, the detection coverage area corresponding to the reference transformation band is calculated in the wavelength coordinate system according to the scanning angle of the spectral acquisition device, which serves as the reference range. Then, the interval coordinates of each sample spectrum in the wavelength coordinate system are determined based on the reference range and the spectral transformation coefficient. Finally, the scanning step size and integration time of the spectral acquisition device are adjusted according to the interval coordinates to form a set of calibration parameters.
[0070] The adjusted spectral data of each sample are aligned according to the correction parameter group to generate aligned multidimensional spectral data.
[0071] Feature absorption peak matching processing is performed on multi-dimensional spectral data to identify characteristic markers and quality anomalies in safflower seed oil, generating quality assessment results. Specifically, the multi-dimensional spectral data is input into an absorption peak matching model, and the output of the model is the quality assessment result. The process of establishing the absorption peak matching model is as follows: Spectral samples of safflower seed oil glycerol at various purity levels are collected and categorized into characteristic peak samples, impurity peak samples, and anomalous peak samples. Matching standards for characteristic peaks, impurity peaks, and anomalous peaks are established in the absorbance-wavelength space. The average absorbance of the characteristic peaks in the spectral samples is calculated as the baseline absorbance, the average wavelength of the characteristic peaks is calculated as the baseline wavelength, and the average wavelength of the impurity peaks is calculated as the impurity baseline wavelength. The matching criteria for characteristic peaks are as follows: the fluctuation range of absorbance values within the characteristic peak region does not exceed a preset proportion of the baseline absorbance, and the wavelength fluctuation range is less than a first threshold. The matching criteria for impurity peaks are as follows: the distribution variance of wavelength values within the impurity peak region is less than a second threshold, and the difference between the absorbance value and the baseline absorbance is less than a third threshold. The matching criteria for abnormal peaks are as follows: the rate of change of wavelength gradient between adjacent bands within the abnormal peak region is less than a fourth threshold, and the rate of change of absorbance gradient is less than a fifth threshold. A matching weight allocation model is constructed based on the matching criteria. A convolutional neural network is trained based on the classified spectral samples to form a characteristic peak matching sub-model, an impurity peak matching sub-model, and an abnormal peak matching sub-model. The matching weight allocation model, characteristic peak matching sub-model, impurity peak matching sub-model, and abnormal peak matching sub-model are combined into an absorption peak matching model. When multi-dimensional spectral data is input into the absorption peak matching model to generate quality judgment results, a matching weight allocation model is used to assign characteristic weights, impurity weights, and anomalous weights to the absorption peaks of each band. The band regions assigned to characteristic weights are processed for feature identification through the characteristic peak matching sub-model; the band regions assigned to impurity weights are processed for impurity component identification through the impurity peak matching sub-model; the band regions assigned to anomalous weights are processed for quality anomaly identification through the anomalous peak matching sub-model; and the output results of each sub-model are merged into the quality judgment result.
[0072] After generating the quality assessment results, the operating status of the spectral acquisition equipment and the ambient temperature and humidity parameters are monitored in real time. Based on the monitoring results, the scanning step size, integration time, and matching weights in the calibration parameter set are dynamically adjusted to adapt to environmental changes. Specifically, the operating status parameters are compared with preset equipment status thresholds, and the ambient temperature and humidity parameters are compared with preset environmental thresholds. When the equipment status parameters exceed the equipment status thresholds, the scanning step size is adjusted to a preset multiple of the initial step size; when the ambient temperature and humidity parameters exceed the environmental thresholds, the integration time is adjusted to a preset multiple of the initial time. The matching weights are then redistributed based on the adjusted scanning step size and integration time to form a dynamic calibration parameter set.
[0073] Example 1: Spectral preprocessing of raw spectral data requires a series of specific steps. Initial noise parameters for each band must be calculated based on the light source parameters and detector sensitivity of the spectral acquisition equipment. The light source parameters include specific information such as the wavelength range and intensity of the light source; different light source parameters will have different effects on noise during spectral acquisition. Detector sensitivity reflects the detector's ability to respond to light signals of different wavelengths and is one of the important bases for calculating the initial noise parameters. Through specific calculation logic, these parameters are substituted into the calculation to obtain the initial noise parameters corresponding to each band. These parameters reflect the possible noise level in each band during spectral data acquisition, providing basic data for subsequent noise processing.
[0074] Deviation boundary points are selected from the entire spectral band based on the distribution density of characteristic absorption difference points. Characteristic absorption difference points are points in the spectral data where the absorption degree differs between different bands; the distribution of these points reflects the characteristic changes in the spectrum. By statistically analyzing the distribution density of these points across the entire spectral band, a reasonable threshold is set, and points whose absorption deviations exceed this threshold are selected and identified as deviation boundary points. The purpose of these deviation boundary points is to divide the entire spectral band into different regions, allowing for targeted processing based on the characteristics of different regions, making the processing more accurate.
[0075] The spectral transformation coefficients at the deviation boundary point are calculated based on the initial noise parameters, and the center band is determined as the reference transformation band. The calculation of the spectral transformation coefficients involves both the initial noise parameters and the spectral characteristics at the deviation boundary point. The initial noise parameters reflect the basic noise situation, while the spectral characteristics at the deviation boundary point include the spectral variation characteristics in the vicinity of that point. Through a specific calculation method, these factors are considered comprehensively to obtain the spectral transformation coefficients at the deviation boundary point. These coefficients are used to transform the spectral data to reduce the impact of noise. Simultaneously, the center band is selected as the reference transformation band across the entire spectral range. The center band has a certain representativeness across the entire spectral range and can serve as a reference in subsequent processing, ensuring that the processing of other bands revolves around this reference, guaranteeing consistency and accuracy.
[0076] Noise data interpolation is performed. In this process, the region between the reference transform band and the deviation boundary point is designated as the main processing region, while other regions are designated as auxiliary processing regions. The main processing region contains the most critical characteristic absorption information in the spectrum and is the focus of processing; the accurate processing of this region directly affects the quality of the final spectral data. The auxiliary processing regions play a supplementary role; although their importance is relatively lower than that of the main processing region, they still require appropriate processing to ensure the integrity and accuracy of the entire spectral data.
[0077] A spectral noise compensation function is constructed based on initial noise parameters. This function establishes a correspondence between the spectral signal intensity and the actual detected value. During spectral acquisition, due to the presence of noise, there may be a deviation between the actual detected value and the spectral signal intensity. The spectral noise compensation function can compensate for this deviation, making the detected value closer to the true spectral signal intensity.
[0078] Based on the constructed spectral noise compensation function, interpolation is performed on the main processing region to generate the first correction signal. The interpolation process calculates reasonable values for other points based on existing data points within the main processing region using a specific algorithm, thereby correcting the spectral data of the main processing region, reducing the impact of noise, and making the characteristic absorption information more prominent. Simultaneously, interpolation is performed on the auxiliary processing region to generate the second correction signal. This also uses an interpolation algorithm to correct the data in the auxiliary processing region, making the data in that region smoother and more accurate.
[0079] After generating the second correction signal, the distribution of its characteristic absorption points is considered, and the noise attenuation function and spectral noise compensation function are used to further correct the second correction signal, generating the third correction signal. The noise attenuation function further reduces the noise level in the auxiliary processing area. By combining it with the spectral noise compensation function, the second correction signal can be corrected more effectively, improving the quality of the data in the auxiliary processing area.
[0080] The first and third correction signals are combined to form the spectral data after spectral preprocessing. Through this series of processing steps, noise in the original spectral data is effectively suppressed, and characteristic absorption information is enhanced and clarified, providing a high-quality data foundation for subsequent spectral analysis and quality assessment.
[0081] Example 2: When dividing the effective detection range for each sample's detection band based on the feature mapping set, a specific logical order and operational steps must be followed. The detection coverage area corresponding to the reference transformation band must be calculated in the wavelength coordinate system based on the scanning angle of the spectral acquisition device, and this range is used as the reference range. The scanning angle of the spectral acquisition device determines the wavelength region that the device can cover when acquiring the spectrum; different scanning angles result in different covered wavelength ranges. Through geometric relationships and the principle of wavelength-angle conversion, the scanning angle parameter is converted into a specific numerical range in the wavelength coordinate system, thereby determining the detection coverage area of the reference transformation band. This reference range is an important reference for subsequent processing, defining the effective operating area of the reference transformation band in the wavelength space.
[0082] Based on the established reference range and the previously calculated spectral transformation coefficients, the interval coordinates of each sample spectrum in the wavelength coordinate system are determined. The spectral transformation coefficients, obtained during spectral preprocessing, reflect the proportional relationship and transformation characteristics of the spectral data during the transformation process. The reference range and spectral transformation coefficients are combined to perform coordinate transformation and positioning on the spectral data of each sample. The wavelength information of the sample spectra is adjusted according to the spectral transformation coefficients so that it can be compared and processed in the same coordinate system as the reference range, thereby determining the specific start and end positions of each sample spectrum in the wavelength coordinate system, i.e., the interval coordinates. These interval coordinates clearly define the actual wavelength range corresponding to each sample spectrum; however, due to differences in their own characteristics, the interval coordinates of different samples may vary.
[0083] The scanning step size and integration time of the spectral acquisition equipment are adjusted based on the determined interval coordinates to form a set of calibration parameters. The scanning step size refers to the interval between two adjacent wavelength points when the spectral acquisition equipment acquires a spectrum; it directly affects the resolution of the spectral data. The integration time is the length of time the equipment spends acquiring the signal at each wavelength point; it relates to the acquired signal strength and noise level. By analyzing the interval coordinates of each sample spectrum, its wavelength range and data characteristics are understood, thus determining the appropriate scanning step size and integration time. For example, if the wavelength range covered by the interval coordinates of a sample spectrum is narrow, a smaller scanning step size may be needed to improve resolution and more accurately capture spectral features; conversely, when environmental conditions or equipment status change, the integration time may need to be adjusted to ensure signal stability. The adjusted scanning step size and integration time together constitute the calibration parameter set, which guides subsequent spectral acquisition work, enabling the equipment to acquire data according to the optimized parameters, thereby improving the quality of spectral data and the accuracy of detection.
[0084] Throughout the process, accurate calculation of the scanning angle is fundamental to determining the reference range, requiring consideration of the specific parameters of the equipment and optical principles. The appropriate application of the spectral transformation coefficient ensures that the sample spectrum can be positioned within a unified coordinate system, enabling comparison and processing between different samples. Adjustments to the scanning step size and integration time are made based on the actual needs of the samples and the operating status of the equipment, aiming to optimize the spectral acquisition process and obtain more reliable spectral data. These three steps are interconnected and mutually influential; the accurate execution of each step is crucial for the final effective detection range division and the formation of the calibration parameter set.
[0085] Example 3: In the process of performing feature absorption peak matching processing on multi-dimensional spectral data to generate quality assessment results, the establishment of the absorption peak matching model is a key step, and its specific implementation method is as follows:
[0086] It is necessary to collect spectral samples of safflower seed oil diglyceride at various purity levels. These spectral samples cover safflower seed oil diglyceride at different purity levels. Spectral data of these samples will be acquired using specific spectral acquisition equipment according to a preset scanning mode. During the acquisition process, it is essential to ensure the representativeness of the samples to cover various possible quality conditions, including samples with high purity, samples containing different impurities, and samples with quality abnormalities.
[0087] After collecting the spectral samples, these samples were divided into three categories: characteristic peak samples, impurity peak samples, and abnormal peak samples. Characteristic peak samples refer to samples that can reflect the inherent characteristic absorption peaks of safflower seed oil diglyceride oil itself, and their spectral data mainly contain the absorption peak information unique to this substance. Impurity peak samples refer to samples in which impurities are mixed in, resulting in impurity-related absorption peaks in the spectral data. These impurities may come from different factors such as the production process and storage environment. Abnormal peak samples refer to samples whose spectral data show abnormal absorption characteristics. The position, intensity, or shape of their absorption peaks are significantly different from those of normal samples, which may reflect quality changes that have occurred during the production, storage, or transportation of the samples.
[0088] In the absorbance-wavelength space, matching standards for characteristic peaks, impurity peaks, and anomalous peaks are established respectively. First, the average absorbance of the characteristic peaks in the spectral sample is calculated as the reference absorbance, denoted as . ,in This represents a reference value calculated by averaging the absorbance of all characteristic peak samples. It reflects the typical absorbance level of the characteristic peaks in safflower seed oil diglyceride oil. Simultaneously, the average wavelength of the characteristic peaks is calculated as a reference wavelength, denoted as [reference wavelength]. , This is obtained by averaging the wavelengths of the characteristic peak samples, representing the typical wavelength positions of the characteristic peaks; additionally, the average wavelength of the impurity peaks is calculated as the impurity reference wavelength, denoted as... , It is the average wavelength of the impurity peak sample, used to characterize the typical wavelength of the impurity peak.
[0089] The characteristic peak matching standard is set as follows: the fluctuation range of absorbance values within the characteristic peak region does not exceed the reference absorbance. The preset ratio is a constant set according to actual detection needs and experience, used to measure the allowable range of absorbance fluctuation; the first threshold is the maximum allowable value of wavelength fluctuation, used to judge the stability of the characteristic peak wavelength.
[0090] The impurity peak matching criteria are: the variance of the wavelength distribution within the impurity peak region is less than the second threshold, and the absorbance value is similar to the reference absorbance. The difference is less than the third threshold. The second threshold is a standard for measuring the dispersion of wavelength distribution. When the wavelength distribution variance is less than this threshold, it indicates that the wavelengths of the impurity peaks are relatively concentrated. The third threshold is used to limit the range of difference between the absorbance of the impurity peak and the reference absorbance in order to determine whether there is significant impurity absorption.
[0091] The matching criteria for abnormal peaks are: the rate of change of wavelength gradient in adjacent bands within the abnormal peak region is less than the fourth threshold, and the rate of change of absorbance gradient is less than the fifth threshold. The rate of change of wavelength gradient reflects the speed of change of wavelength in adjacent bands, and the calculation formula is as follows: ,in This represents the wavelength difference between adjacent bands. The difference in band numbers indicates the difference in absorbance gradient; the rate of change of absorbance gradient is... , It is the absorbance difference between adjacent wavelength bands. The fourth and fifth thresholds are used to determine whether the changes in wavelength and absorbance gradient are abnormal.
[0092] After establishing the aforementioned matching criteria, a matching weight allocation model is constructed based on these criteria. This model assigns characteristic weights, impurity weights, and anomaly weights to absorption peaks in different bands. The weight allocation is based on the degree of conformity between each band and the corresponding matching criteria. For example, the closer a band's characteristics are to the characteristic peak matching criteria, the higher its assigned characteristic weight, and vice versa.
[0093] The convolutional neural network (CNN) is trained based on classified spectral samples to form sub-models for matching feature peaks, impurity peaks, and anomalous peaks. A CNN is a multi-layered neural network that learns from a large number of classified spectral samples, automatically extracting features from the spectral data and establishing a mapping between spectral features and sample categories. During training, the network parameters are adjusted to continuously improve the accuracy of identifying feature peaks, impurity peaks, and anomalous peaks, ultimately forming sub-models capable of accurately identifying various peak types.
[0094] The matching weight allocation model, characteristic peak matching sub-model, impurity peak matching sub-model, and abnormal peak matching sub-model are combined into an absorption peak matching model. This combined model has the ability to comprehensively analyze the input multi-dimensional spectral data. It can determine the weight of each band through the matching weight allocation model, and then use each sub-model to perform corresponding feature identification, impurity detection, and anomaly judgment for the band regions with different weights, thereby achieving accurate determination of the quality of safflower seed oil diglyceride oil.
[0095] The entire process of establishing the absorption peak matching model, from sample collection to model combination, is closely linked. Through the reasonable classification of spectral samples, the scientific formulation of matching standards, the construction of weight allocation models, and the training of convolutional neural networks, the model is able to accurately identify characteristic absorption peaks, impurity peaks, and abnormal peaks in spectral data, providing a reliable basis for subsequent quality judgment.
[0096] Example 4: When inputting multi-dimensional spectral data into the absorption peak matching model to generate quality assessment results, a series of specific operational procedures must be followed. A matching weight allocation model assigns characteristic weights, impurity weights, and anomaly weights to the absorption peaks of each band. For example, assuming that a sample spectrum exhibits absorption characteristics near 500nm that closely match the characteristic peak matching standard for safflower seed oil diglyceride oil, the model will assign a higher characteristic weight based on the degree of conformity between this band and the characteristic peak matching standard. If the band near 600nm exhibits absorption characteristics related to the impurity peak matching standard, then the corresponding impurity weight is assigned. And if the band near 700nm shows absorption characteristics consistent with the anomaly peak matching standard, then an anomaly weight is assigned. The allocation logic of the matching weight allocation model is based on the degree of conformity of each band to different matching standards. Through pre-set algorithm rules, the weight of each band is quantified and determined, allowing bands with different properties to be treated differently in subsequent processing.
[0097] The spectral regions assigned to feature weights are processed for feature identification using a feature peak matching sub-model. Taking a spectral region with a high feature weight as an example, the feature peak matching sub-model analyzes the spectral data of that region. During training, this sub-model learns the spectral characteristics of a large number of feature peak samples and can identify absorption patterns similar to those of safflower seed oil diglyceride oil. During processing, the sub-model compares the absorbance-wavelength data of the spectral region with the learned feature peak standards to determine whether a feature absorption peak exists in the region and whether the position, intensity, and other parameters of the absorption peak meet the requirements of a feature peak. For example, if the absorbance fluctuation range of the spectral region is within a preset proportion of the baseline absorbance and the wavelength fluctuation range is less than a first threshold, the sub-model will identify a valid feature identifier in the region and record the relevant feature parameters.
[0098] The spectral regions assigned to impurity weights are processed for impurity component identification using an impurity peak matching sub-model. Assuming a certain spectral region is assigned an impurity weight, the impurity peak matching sub-model processes the spectral data of that region. Based on learning from impurity peak samples during training, this sub-model understands the absorption peak characteristics that different impurities may produce. The sub-model analyzes whether the wavelength distribution variance of this spectral region is less than a second threshold, and whether the difference between the absorbance value and the reference absorbance is less than a third threshold. If these conditions are met, the sub-model further compares the wavelength position with established impurity reference wavelengths to attempt to determine the possible types of impurity components. For example, if the wavelength distribution variance of this spectral region is small, and the difference between the absorbance and the reference absorbance is within an acceptable range, and the wavelength position is close to the reference wavelength of a known impurity, the sub-model will identify that such impurity may exist in this region and provide the corresponding impurity component identifier.
[0099] The band regions assigned to anomalous weights are processed for quality anomaly identification using an anomaly peak matching sub-model. Taking a band region assigned anomaly weights as an example, the anomaly peak matching sub-model calculates and analyzes the wavelength gradient change rate and absorbance gradient change rate of adjacent bands in that region. The wavelength gradient change rate is obtained by the ratio of the wavelength difference between adjacent bands to the band number difference, while the absorbance gradient change rate is the ratio of the absorbance difference between adjacent bands to the band number difference. The sub-model compares these gradient change rates with a fourth threshold and a fifth threshold. If the wavelength gradient change rate is less than the fourth threshold and the absorbance gradient change rate is less than the fifth threshold, the sub-model will determine that the region has quality anomaly characteristics. For example, if the wavelength change of adjacent bands in a certain band region is slow and the absorbance change is also relatively gradual, which does not conform to the change pattern of normal spectra, the sub-model will identify that the region has quality anomalies and give a preliminary judgment on the anomaly type, such as possible oxidation or deterioration.
[0100] The outputs of each sub-model are combined into a single quality assessment result. During this process, the results of feature identification, impurity component identification, and quality anomaly identification are comprehensively considered. For example, if the feature peak matching sub-model identifies multiple valid feature identifiers, it indicates that the safflower seed oil diglyceride oil in the sample has relatively obvious characteristics; if the impurity peak matching sub-model identifies a small amount of a certain impurity, it indicates that a certain amount of that impurity is present in the sample; and if the anomaly peak matching sub-model does not identify any obvious anomaly peaks, then, considering these results, the quality assessment result may be that the sample quality is basically acceptable, but the influence of impurities should be noted. Conversely, if there are few feature identifiers, many impurity components, and obvious anomaly peaks, the quality assessment result may be that the sample quality is unacceptable. When merging the output results, information from all aspects is integrated according to a certain logic and format to form a comprehensive and clear quality assessment conclusion, providing a direct basis for the quality evaluation of safflower seed oil diglyceride oil.
[0101] Throughout the process, the allocation of matching weights forms the basis for subsequent processing in each sub-model, determining the processing priority and importance of different band regions within each sub-model. Based on its own training results, each sub-model performs professional analysis and identification of the corresponding weighted band regions, ensuring the accuracy of feature, impurity, and anomaly detection.
[0102] Example 5: After generating the quality assessment results, it is necessary to monitor the operating status of the spectral acquisition equipment and the ambient temperature and humidity parameters in real time, and dynamically adjust the calibration parameter set according to the monitoring results to adapt to environmental changes. The specific implementation method is as follows:
[0103] Real-time monitoring of the operating status parameters of the spectral acquisition equipment is crucial. These parameters include temperature, voltage, and current during operation. For example, it's important to monitor whether the internal light source temperature is within the normal range; excessively high temperatures can affect luminous intensity and stability. The stability of the power input voltage is also critical; large voltage fluctuations can cause malfunctions. Furthermore, the current value during operation must meet the rated standards; abnormal current may indicate a fault in internal components. Simultaneously, real-time monitoring of ambient temperature and humidity is essential. Changes in ambient temperature can affect the physicochemical properties of samples during spectral acquisition, leading to spectral data drift. Changes in ambient humidity can cause internal components to become damp, impacting equipment performance and the accuracy of spectral acquisition.
[0104] The monitored operating status parameters are compared with preset equipment status thresholds, and the ambient temperature and humidity parameters are also compared with preset environmental thresholds. The preset equipment status thresholds are pre-set based on the equipment's technical specifications and normal operating requirements. For example, the normal operating temperature threshold might be set to 20℃-30℃, the voltage threshold to ±5% of the rated voltage, and the current threshold to ±10% of the rated current. The preset environmental thresholds are set based on the environmental conditions required for spectral detection. For example, the ambient temperature threshold might be 18℃-25℃, and the humidity threshold to 40%-60%RH.
[0105] When device status parameters exceed device status thresholds, the scan step size needs to be adjusted. For example, if the monitored device operating temperature exceeds a preset temperature threshold, it may cause wavelength drift of the light source, affecting the accuracy of spectral acquisition. In this case, the scan step size should be adjusted to a preset multiple of the initial step size. For instance, if the initial step size is 1 nm and the preset multiple is 1.5 times, the adjusted scan step size will be 1.5 nm. Increasing the scan step size can, to some extent, reduce the impact of abnormal device operating conditions on spectral acquisition resolution, ensuring that the acquired spectral data reflects the main characteristics of the sample.
[0106] When ambient temperature and humidity parameters exceed environmental thresholds, the integration time needs to be adjusted. For example, if the ambient humidity exceeds a preset humidity threshold, the detector sensitivity may decrease, leading to a reduction in the strength of the acquired signal. In this case, the integration time is adjusted to a preset multiple of the initial time. For instance, if the initial integration time is 0.5 seconds and the preset multiple is 2, the adjusted integration time is 1 second. Increasing the integration time increases the amount of light signal collected by the detector, improving signal strength and thus compensating for the impact of changes in ambient temperature and humidity on the quality of spectral data.
[0107] After adjusting the scan step size and integration time, the matching weights need to be reallocated based on the adjusted parameters to form a dynamic calibration parameter set. The allocation of matching weights is related to the scan step size and integration time; different scan step sizes and integration times affect the resolution and signal intensity of the spectral data, thus altering the characteristics of absorption peaks in each band. Therefore, it is necessary to recalculate the feature weights, impurity weights, and anomaly weights for each band based on the new scan step size and integration time. For example, increasing the scan step size reduces the resolution of the spectral data, which may cause some adjacent absorption peaks to merge. In this case, it is necessary to reassess the feature matching degree of each band and adjust the feature weights. Similarly, extending the integration time increases the signal intensity, and the noise level may change, requiring a re-analysis of the impurity and anomaly characteristics in each band and adjustment of the impurity and anomaly weights.
[0108] The process of reallocating matching weights is based on the matching weight allocation model in the absorption peak matching model. This model recalculates the degree of conformity between each band and the matching standards for characteristic peaks, impurity peaks, and anomalous peaks, according to the adjusted scan step size and integration time, as well as changes in the spectral data, thereby determining new weight values. The adjusted scan step size, integration time, and matching weights together constitute a dynamic calibration parameter set. This parameter set can adapt to changes in equipment operating conditions and environmental temperature and humidity, ensuring that subsequent spectral acquisition and quality assessment processes can be performed accurately under new conditions.
[0109] Throughout the implementation process, real-time monitoring is fundamental. Continuous monitoring of equipment status and environmental parameters allows for the timely detection of anomalies. Parameter comparison is crucial for determining whether adjustments are needed. By comparing measured parameters with preset thresholds, it is determined whether adjustments to the scan step size, integration time, and matching weights are required. Parameter adjustment is the core step. Based on the type and severity of the anomaly, the scan step size and integration time are adjusted appropriately, and the matching weights are reallocated, enabling the detection system to adapt to changing conditions. The ultimate goal is to create a dynamic calibration parameter set that responds in real-time to changes in equipment and the environment, ensuring the accuracy and reliability of spectral detection and ensuring that the quality assessment results truly reflect the quality status of safflower seed oil diglyceride oil.
[0110] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0111] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for quality detection of safflower seed oil diglyceride oil based on spectral analysis, characterized in that, include: Obtain the spectral acquisition parameters and the corresponding raw spectral data of the safflower seed oil diglyceride sample to be tested; The raw spectral data contains band information of characteristic absorption peaks and is acquired according to a preset scanning mode; The original spectral data is preprocessed to extract the characteristic absorption difference points between each band, and a feature mapping set is generated based on the distribution pattern of the characteristic absorption difference points. Based on the feature mapping set, an effective detection interval is divided for each sample's detection band, and the spectral acquisition parameters are adjusted according to the division results to form a correction parameter set; The adjusted spectral data of each sample are aligned according to the correction parameter group to generate aligned multidimensional spectral data. The multidimensional spectral data is subjected to characteristic absorption peak matching processing to identify the characteristic markers and quality anomaly markers of diglyceride oil, and a quality judgment result is generated. Spectral preprocessing of the raw spectral data includes: The initial noise parameters for each band are calculated based on the light source parameters and detector sensitivity of the spectral acquisition device. Based on the distribution density of the characteristic absorption difference points, points with absorption deviations exceeding a threshold on both sides are selected from the entire band as deviation boundary points. The spectral transformation coefficients of the deviation boundary point are calculated based on the initial noise parameters, and the center band is used as the reference transformation band. Noise data interpolation is performed based on the spectral transformation coefficients, the reference transformation band, and the position of the deviation boundary point, specifically including: The region between the reference transformation band and the deviation boundary point is taken as the main processing region, and the other regions are taken as auxiliary processing regions. A spectral noise compensation function is constructed based on the initial noise parameters; the spectral noise compensation function is the correspondence between the spectral signal intensity and the actual detected value. The first correction signal is generated by interpolating the main processing region according to the spectral noise compensation function, and the second correction signal is generated by interpolating the auxiliary processing region. By combining the characteristic absorption point distribution of the second correction signal, and using the noise attenuation function and the spectral noise compensation function together, the second correction signal is corrected to generate the third correction signal; The first and third correction signals are combined to form the spectral data after spectral preprocessing.
2. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 1, characterized in that, Based on the feature mapping set, the effective detection interval for each sample is divided into detection bands, including: The detection coverage area corresponding to the reference transformation band is calculated in the wavelength coordinate system based on the scanning angle of the spectral acquisition device and used as the reference range. The interval coordinates of each sample spectrum in the wavelength coordinate system are determined based on the reference range and the spectral transformation coefficient. The scanning step size and integration time of the spectral acquisition device are adjusted according to the coordinate interval to form a set of calibration parameters.
3. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 2, characterized in that, The characteristic absorption peak matching process for the multidimensional spectral data includes: The multidimensional spectral data is input into the absorption peak matching model, and the output of the absorption peak matching model is used as the quality judgment result.
4. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 3, characterized in that, The establishment of the absorption peak matching model includes: Spectral samples of safflower seed oil diglyceride oil of various purity grades were collected and the samples were divided into characteristic peak samples, impurity peak samples and abnormal peak samples. Establish characteristic peak matching standards, impurity peak matching standards, and abnormal peak matching standards in the absorbance-wavelength space, respectively. Construct a matching weight allocation model based on the matching criteria; The convolutional neural network is trained based on the classified spectral samples to form a feature peak matching sub-model, an impurity peak matching sub-model, and an anomaly peak matching sub-model. The matching weight allocation model, the feature peak matching sub-model, the impurity peak matching sub-model, and the abnormal peak matching sub-model are combined into an absorption peak matching model.
5. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 4, characterized in that, The multidimensional spectral data is input into the absorption peak matching model, and the output of the absorption peak matching model is used as the quality judgment result, including: The matching weight allocation model assigns characteristic weights, impurity weights, and anomaly weights to the absorption peaks of each band. The band regions assigned to feature weights are processed for feature identification through the feature peak matching sub-model; The band regions assigned to impurity weights are used for impurity component identification through the impurity peak matching sub-model. The band regions assigned to abnormal weights are processed for quality anomaly identification through the abnormal peak matching sub-model; The outputs of each sub-model are combined into a quality assessment result.
6. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 5, characterized in that, In the absorbance-wavelength space, characteristic peak matching criteria, impurity peak matching criteria, and anomalous peak matching criteria are established respectively, including: The average absorbance of the characteristic peaks in the spectral sample is calculated as the reference absorbance, the average wavelength of the characteristic peaks is calculated as the reference wavelength, and the average wavelength of the impurity peaks is calculated as the impurity reference wavelength. The characteristic peak matching standard is that the fluctuation range of absorbance value in the characteristic peak region does not exceed a preset proportion of the reference absorbance, and the wavelength fluctuation range is less than a first threshold. The impurity peak matching standard is that the distribution variance of wavelength values within the impurity peak region is less than a second threshold, and the difference between the absorbance value and the reference absorbance is less than a third threshold. The abnormal peak matching criteria are that the wavelength gradient change rate of adjacent bands within the abnormal peak region is less than the fourth threshold, and the absorbance gradient change rate is less than the fifth threshold.
7. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 1, characterized in that, After generating the quality assessment results, the following are also included: Real-time monitoring of the operating status of the spectral acquisition equipment and environmental temperature and humidity parameters; The scanning step size, integration time, and matching weight in the calibration parameter group are dynamically adjusted based on the monitoring results to adapt to environmental changes.
8. The method for quality detection of safflower seed oil diglyceride oil based on spectral analysis according to claim 7, characterized in that, Dynamically adjusting the scan step size, integration time, and matching weight in the calibration parameter group based on monitoring results includes: The working status parameters are compared with preset equipment status thresholds, and the ambient temperature and humidity parameters are compared with preset environmental thresholds. When the device status parameters exceed the device status threshold, adjust the scan step size to a preset multiple of the initial step size. When the ambient temperature and humidity parameters exceed the environmental threshold, the integration time is adjusted to a preset multiple of the initial time; The matching weights are redistributed based on the adjusted scan step size and integration time to form a dynamic correction parameter set.
Citation Information
Patent Citations
A system and method for evaluating Xanthoceras sorbifolia oil quality based on spectral analysis
CN119760321A