Rapid raman detection system and method for illegal additives in food
By employing dispersed liquid-liquid microextraction and differentiated Raman spectroscopy acquisition techniques, the fluorescence interference problem in the detection of illegal additives in food has been solved, achieving highly sensitive and accurate Raman detection, suitable for rapid detection of various food matrices.
Patent Information
- Application Number
- CN202610509696.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-08-25
AI Technical Summary
Existing Raman detection technologies for illegal additives in food face severe fluorescence interference, leading to detector saturation and signal flooding. This is particularly problematic in samples with high fluorescence matrices, where the false negative rate is high, making it difficult to effectively identify illegal additives.
The solution to be tested was obtained by dispersive liquid-liquid microextraction pretreatment, and fluorescence emission spectrum data were collected by a low-power broadband excitation source. The weak fluorescence and strong fluorescence acquisition windows were divided by intensity gradient analysis. Raman spectra were obtained by differential detector parameters and offset excitation technology. A fluorescence envelope baseline model was constructed, and baseline subtraction and spectral stitching were performed. Finally, Raman characteristic peaks were identified by second derivative calculation and template matching.
It effectively suppresses fluorescence background, improves the accuracy and sensitivity of Raman detection, reduces false positive and false negative rates, and can efficiently identify trace amounts of illegal additives. It is suitable for rapid detection of various food matrices.
Smart Images

Figure CN122631614A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food safety testing technology, and more specifically, to a rapid Raman detection system and method for illegal additives in food. Background Technology
[0002] Existing Raman detection technologies for illegal additives in food face serious fluorescence interference problems, especially in the field of rapid detection. Food matrices themselves commonly contain strongly fluorescent substances, such as chlorophyll, flavonoids, carotene, and various phenolic compounds abundant in plant-derived foods. These endogenous fluorescent substances produce strong broadband fluorescence emission under laser excitation. Traditional rapid detection methods, in order to improve efficiency and on-site applicability, often simplify or completely omit the time-consuming column chromatography purification step, resulting in these fluorescent substances remaining in the sample. In actual detection, the fluorescence signal intensity generated by these residual substances is often several orders of magnitude higher than the Raman scattering signal, forming a broad "bulge" background on the spectrum, completely obscuring key Raman characteristic peaks. Although existing technologies have developed various baseline correction algorithms, such as polynomial fitting, wavelet transform, and adaptive iterative algorithms, when the fluorescence intensity reaches the detector saturation level, these mathematical processing methods are essentially unable to recover the truncated signal information, leading to the loss of true Raman characteristics. Fluorescence distribution is highly uneven across different food matrices. Excessive fluorescence in certain bands leads to detector saturation, while other areas suffer from weak Raman signals, making effective detection impossible. In practical regulatory work, inspectors often face the dilemma of "seeing the fluorescence but being unable to measure it accurately," especially for brightly colored processed foods, herbal seasonings, and plant extracts—samples with high fluorescence matrices. Existing rapid detection methods suffer from persistently high false-negative rates, severely hindering regulatory efficiency and food safety assurance.
[0003] In view of this, the present invention proposes a rapid Raman detection system and method for illegal additives in food to solve the above problems. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a rapid Raman detection method for illegal additives in food, comprising: The food sample was subjected to dispersion liquid-liquid microextraction pretreatment to obtain the test solution. The fluorescence emission spectrum data of the test solution was collected under a low-power broadband excitation light source. The fluorescence emission spectrum data includes the distribution curve of fluorescence intensity along the spectral axis. Intensity gradient analysis is performed on the distribution curve along the spectral axis to identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and these segments are marked as fluorescence saturation risk segments. Based on the position and width of the fluorescence saturation risk region on the spectral axis, the target Raman spectrum acquisition range is divided into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows, and differentiated detector acquisition parameters are assigned to each acquisition window. Within the strong fluorescence acquisition window, Raman spectroscopy acquisition is performed at two excitation wavelengths with a preset wavenumber offset, to obtain two sets of offset excitation spectra. Wavelength-by-wavelength subtraction and integral restoration are then performed on the two sets of offset excitation spectra to generate the offset difference spectrum of the window. The raw Raman spectrum is acquired within the weak fluorescence acquisition window according to the assigned acquisition parameters. A local fluorescence envelope baseline model is constructed based on the fluorescence emission spectrum data. The local fluorescence envelope baseline model is used to perform baseline subtraction on the raw Raman spectrum to generate the baseline-subtracted spectrum. The baseline subtracted spectrum of each weak fluorescence acquisition window and the offset difference spectrum of each strong fluorescence acquisition window are spliced along the spectral axis. Intensity normalization connection processing is performed in the overlapping area of adjacent windows to generate a composite purified Raman spectrum. The candidate peaks are identified by performing second derivative operations on the composite purified Raman spectrum. The true Raman peaks and residual fluorescence pseudo-peaks are distinguished according to the peak shape symmetry index of each candidate peak. The final detection spectrum is generated after removing the residual fluorescence pseudo-peaks. Feature peak position combinations and peak intensity ratios are extracted from the final detected spectrum and matched with a pre-built Raman standard spectrum library of illegal additives. The detection results are output based on the matching similarity.
[0005] A rapid Raman detection system for illegal additives in food, which implements a rapid Raman detection method for illegal additives in food, including: The pretreatment acquisition module is used to perform dispersion liquid-liquid microextraction pretreatment on food samples to obtain the test solution. It acquires the fluorescence emission spectrum data of the test solution under a low-power broadband excitation light source. The fluorescence emission spectrum data includes the distribution curve of fluorescence intensity along the spectral axis. The risk analysis module is used to perform intensity gradient analysis on the distribution curve along the spectral axis, identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and mark them as fluorescence saturation risk segments. The window division module is used to divide the target Raman spectrum acquisition range into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows based on the position and width of the fluorescence saturation risk region on the spectral axis, and to assign differentiated detector acquisition parameters to each acquisition window. The strong window processing module is used to perform Raman spectroscopy acquisition at two excitation wavelengths with a preset wavenumber offset within the strong fluorescence acquisition window, obtain two sets of offset excitation spectra, and perform wavelength-by-wavelength subtraction and integral restoration on the two sets of offset excitation spectra to generate the offset difference spectrum of the window. The weak window processing module is used to acquire the original Raman spectrum according to the allocated acquisition parameters within the weak fluorescence acquisition window, construct a local fluorescence envelope baseline model based on the fluorescence emission spectrum data, and perform baseline subtraction on the original Raman spectrum using the local fluorescence envelope baseline model to generate the baseline-subtracted spectrum. The spectral splicing and integration module is used to splice the baseline subtraction spectrum of each weak fluorescence acquisition window with the offset difference spectrum of each strong fluorescence acquisition window along the spectral axis, and perform intensity normalization connection processing in the overlapping area of adjacent windows to generate a composite purified Raman spectrum. The peak identification and purification module is used to perform second derivative operations on the composite purified Raman spectrum to identify candidate peaks. Based on the peak shape symmetry index of each candidate peak, it distinguishes between true Raman peaks and residual fluorescence pseudo-peaks. After removing residual fluorescence pseudo-peaks, the final detection spectrum is generated. The matching result output module is used to extract characteristic peak position combinations and peak intensity ratio features from the final detection spectrum, perform template matching with the pre-built Raman standard spectrum library of illegal additives, and output the detection results based on the matching similarity. The modules are connected via wired and / or wireless means to enable data transmission between them.
[0006] The technical effects and advantages of the rapid Raman detection system and method for illegal additives in food of this invention are as follows: This invention improves the Raman detection capability of illegal additives in food under strong fluorescence backgrounds, solving the signal submersion problem caused by fluorescence interference, and enabling the effective extraction and identification of previously masked Raman characteristic peaks. This invention improves detection quality under conditions of uneven fluorescence distribution, overcoming the dual challenges of detector saturation and weak signal in traditional technologies. By effectively suppressing the fluorescence background while preserving the Raman signal, this invention improves the accuracy of characteristic peak identification, reduces false positive and false negative rates, and enhances the reliability of detection results. The high sensitivity of this invention makes it possible to detect trace amounts of illegal additives, meeting stringent food safety regulatory requirements. The detection process is simplified and efficient, avoiding cumbersome pretreatment steps, and is suitable for rapid screening and on-site testing scenarios. This invention has good detection effects on illegal additives in various food matrices, especially for high-fluorescence matrix samples that are difficult to handle with traditional methods, significantly improving detection capabilities. Attached Figure Description
[0007] Figure 1 This is a schematic diagram of the rapid Raman detection method for illegal additives in food according to the present invention; Figure 2 This is a schematic diagram of the rapid Raman detection system for illegal additives in food according to the present invention. Detailed Implementation
[0008] 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.
[0009] This application provides a rapid Raman detection system and method for illegal additives in food. The system's execution entities include, but are not limited to, those equipped with the system: food safety testing platforms, mobile on-site testing equipment, multispectral food analyzers, etc., which can be considered general detection equipment in this application. The detection system includes, but is not limited to, at least one of: a Raman spectral acquisition device, a fluorescence-Raman dual-mode detector, and intelligent spectral analysis software.
[0010] Please see Figure 1 In this embodiment of the invention, the rapid Raman detection method for illegal additives in food includes the following steps: Dispersion-liquid microextraction (DLME) is a highly efficient sample pretreatment technique that uses food samples mixed with an extraction solvent and dispersant to form an emulsion of fine droplets. This increases the contact area and rapidly enriches the target illicit additives. The process involves homogenizing the food sample, accurately weighing 1-5 grams, adding an appropriate amount of extraction solvent (such as acetonitrile, methanol, or ethyl acetate) and dispersant (usually water), and mixing at high speed in a vortex mixer for 30-60 seconds to form an emulsion. After centrifugation, the upper organic phase is collected, and secondary extraction may be performed if necessary to improve recovery. A low-power broadband excitation source (typically a 20-50 mW xenon lamp or LED) is used to excite any fluorescent substances present in the test solution, obtaining complete fluorescence emission spectral data to provide a basis for subsequent fluorescence interference assessment. Fluorescence emission spectra typically cover the wavelength range of 300-800 nm, recording a complete curve of fluorescence intensity as a function of wavelength at a resolution of 0.5-2 nm.
[0011] Intensity gradient analysis is performed along the spectral axis of the distribution curve to identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, marking these segments as fluorescence saturation risk areas. Intensity gradient analysis is a crucial step in assessing the degree of fluorescence interference, identifying high-risk regions that may lead to detector saturation by analyzing the rate of change in fluorescence intensity. The analysis process first involves sampling the fluorescence distribution curve at equal intervals to obtain discrete fluorescence intensity sequences; then, the first-order difference between adjacent sampling points is calculated to construct a fluorescence intensity gradient sequence; next, transition points where the gradient sign changes from positive to negative are identified and marked as candidate positions for fluorescence peaks; finally, the intensity value at the candidate fluorescence peak position is compared with a preset proportion (usually 70%-80%) of the upper limit of the detector's linear dynamic range. When this proportion is exceeded, the search continues outwards from the peak until the intensity drops below the preset proportion, marking this segment as a fluorescence saturation risk area. These segments will face severe fluorescence interference problems during subsequent Raman spectroscopy acquisition and require special handling strategies.
[0012] Based on the position and width of the fluorescence saturation risk region on the spectral axis, the target Raman spectral acquisition range is divided into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows, and differentiated detector acquisition parameters are assigned to each acquisition window. This windowed differentiated acquisition strategy is an innovative method to solve the problem of uneven fluorescence distribution. It involves dividing the target spectral range into windows with different characteristics and optimizing the acquisition parameters for each window. The division process first involves extending the identified fluorescence saturation risk region outwards along both sides of the spectral axis by a preset margin (typically 20-50 cm). -1 This forms a strong fluorescence acquisition window covering the area; then the target Raman spectrum acquisition area (typically 200-3600 cm⁻¹) is acquired. -1 The continuous segment not covered by the strong fluorescence window is designated as the weak fluorescence acquisition window. For the weak fluorescence acquisition window, the detector integration time is set according to the ratio of the average fluorescence intensity within the window to the upper limit of the detector's linear dynamic range. The smaller the ratio, the longer the integration time, ensuring sufficient signal intensity is obtained. For the strong fluorescence acquisition window, the integration time is shortened to a preset reduction ratio (usually 10%-30%) of the weak fluorescence window integration time, while the detector gain is reduced to keep the acquired signal within the detector's linear response range, avoiding saturation distortion. This differentiated acquisition parameter allocation strategy ensures the acquisition of the highest quality raw spectral data in samples with drastic changes in fluorescence intensity.
[0013] Within the strong fluorescence acquisition window, Raman spectroscopy is performed at two excitation wavelengths with a preset wavenumber offset, acquiring two sets of offset excitation spectra. Wavelength-by-wavelength subtraction and integral restoration are then performed on these two sets of offset excitation spectra to generate the offset difference spectrum for the window. Offset excitation technology is an effective method for suppressing strong fluorescence interference, based on the principle that the Raman scattering wavenumber remains constant regardless of the fluorescence emission wavelength. The process involves first acquiring the first Raman spectrum of the strong fluorescence window at a reference excitation wavelength (e.g., 785 nm); then shifting the excitation wavelength by a preset wavenumber (typically 30-50 cm⁻¹). -1 A second Raman spectrum was acquired within the same window after a wavelength shift of approximately 1-2 nm. The two spectra were then aligned in absolute wavelength coordinates and subtracted point-by-point to obtain the original difference spectrum. In the difference spectrum, the fluorescence background is canceled out during subtraction due to its fixed absolute wavelength position, while the Raman signal exhibits a derivative-type double-peak characteristic due to the synchronous shift with the excitation wavelength. To restore the original shape of the Raman peaks, a cumulative integration operation is performed on the difference spectrum. The integration process starts from the low wavenumber end and accumulates point-by-point to obtain the integrated restored spectrum. Then, a linear fit is performed on the first and last points of the integrated restored spectrum, and the fitted linear component is subtracted to eliminate the baseline drift introduced by the integration. Finally, using half of the preset wavenumber shift as compensation, the drift-free spectrum is shifted along the spectral axis to compensate for the peak position system deviation caused by the excitation wavelength shift, and the output is the final shift difference spectrum. This process can be expressed by the following formula: ; in, For the offset difference spectral intensity, and These are the original spectral intensities at the two excitation wavelengths. The initial integration wavenumber, For linear drift correction, is the wavenumber compensation constant.
[0014] Raw Raman spectra are acquired within weak fluorescence acquisition windows according to assigned acquisition parameters. A local fluorescence envelope baseline model is constructed based on the fluorescence emission spectral data. Baseline subtraction is then performed on the raw Raman spectra using this model to generate the baseline-subtracted spectrum. Baseline subtraction is a standard method for eliminating weak fluorescence interference, highlighting the Raman signal through accurate modeling and background subtraction. The process begins by extracting fluorescence intensity data corresponding to the spectral regions of each weak fluorescence acquisition window from the fluorescence emission spectral data. Then, the extracted fluorescence intensity data is fitted with a smooth curve using asymmetric least squares (ALS) to obtain the fluorescence envelope baseline curve for that window. Next, the fluorescence envelope baseline curve is scaled according to the power ratio between the low-power broadband excitation source and the Raman excitation source to obtain the equivalent fluorescence baseline under Raman acquisition conditions. Finally, the scaling factor of the equivalent fluorescence baseline is calibrated using the blank regions without Raman peaks in the raw Raman spectrum as anchor points. The calibrated equivalent fluorescence baseline is then subtracted from the raw Raman spectrum wavelength by wavelength to generate the baseline-subtracted spectrum. The key to asymmetric least squares (ALS) lies in the asymmetry of its weight function. Points above the baseline are assigned smaller weights, while points below the baseline are assigned larger weights. This process is iterated until convergence. The objective function for ALS baseline fitting can be expressed as: ; in, For the original spectral data points, Representing each point in the spectral data, To fit the baseline points, For asymmetric weights (when Take the smaller value Otherwise, take the larger value. ), The smoothing parameter controls the smoothness of the baseline. It is minimized through iterative optimization. The value is used to obtain an accurately fitted fluorescence baseline model.
[0015] The baseline subtracted spectra of each weak fluorescence acquisition window and the offset difference spectrum of each strong fluorescence acquisition window are stitched together along the spectral axis. Intensity normalization is performed on the overlapping region of adjacent windows to generate a composite purified Raman spectrum. Spectral stitching is a key step in integrating the results of different processing strategies, forming a complete purified spectrum by seamlessly connecting spectral fragments from different windows. The stitching process first sets a preset wavenumber width (usually 20-40 cm⁻¹) between adjacent weak fluorescence acquisition windows and strong fluorescence acquisition windows. -1The spectral overlap region is carefully selected to ensure a smooth transition. Then, intensity curve segments of the baseline-subtracted spectrum and the offset difference spectrum are extracted within the overlap region. Next, the ratio of the means of the two intensity curve segments is calculated as an intensity normalization scaling factor. The offset difference spectrum is then scaled overall based on the baseline-subtracted spectrum intensity to ensure consistent intensity levels. Finally, a linear weighted transition is applied to the scaled two spectra within the overlap region, with the weights gradually changing along the spectral axis to achieve a smooth connection. The weighted transition function can be expressed as: ; in, The composite spectral intensity of the overlapping region, Subtract spectral intensity from baseline. The scaled offset difference spectral intensity. The weighting function linearly changes from 1 to 0 within the overlapping interval. This smooth transition splicing process achieves seamless integration of spectra from different windows, resulting in a composite purified Raman spectrum covering the entire wavenumber range.
[0016] Second-order derivative calculations are performed on the composite purified Raman spectrum to identify candidate peaks. Based on the peak shape symmetry index of each candidate peak, true Raman peaks are distinguished from residual fluorescence spurious peaks. After removing residual fluorescence spurious peaks, the final detection spectrum is generated. Peak identification and spurious peak removal are crucial steps to ensure the accuracy of the detection results. Mathematical features are used to distinguish between the true Raman signal and residual fluorescence interference. The process first applies Savitzky-Golay smoothing filtering (typically using a 9-15 point window width and a 3rd-5th order polynomial) to reduce noise levels in the composite purified Raman spectrum. Then, the second-order derivative spectrum is calculated, and negative extrema points are identified in the derivative spectrum and marked as candidate peaks. Second-order derivative calculation effectively highlights peak positions and suppresses slowly varying backgrounds. Next, the peak shape profiles of each candidate peak are extracted from the composite purified Raman spectrum, and the ratio of the half-peak widths on both sides of the peak is calculated as the asymmetry factor. Finally, the true Raman peaks and residual fluorescence spurious peaks are distinguished based on a joint criterion of the asymmetry factor and the signal-to-noise ratio. When the absolute value of the difference between the asymmetry factor and 1.0 is greater than the preset asymmetry threshold (usually 0.2-0.3), the candidate peak is determined to be a residual fluorescence spurious peak and discarded; when the asymmetry factor is close to 1.0 and the absolute value of the extreme value of the candidate peak in the second derivative spectrum is greater than the preset signal-to-noise ratio threshold, it is determined to be a true Raman peak and retained. The formula for calculating the asymmetry factor is: ; in, It is an asymmetric factor. and These are the half-peak widths on the right and left sides of the peak, respectively. Raman peaks typically exhibit good symmetry. The value is close to 1.0, while the residual fluorescence spurious peaks exhibit obvious asymmetric characteristics. This peak-shape-based screening method effectively eliminates residual interference in the composite purified spectrum, generating a final detection spectrum containing only the true Raman signal.
[0017] Feature peak position combinations and peak intensity ratios are extracted from the final detected spectrum and matched with a pre-built Raman standard spectral library of illegal additives. The detection results are output based on the matching similarity. Feature extraction and template matching are the core steps for qualitative identification of illegal additives, determining sample composition through multi-dimensional feature comparison. The process first extracts the peak position wavenumbers of all retained true Raman peaks from the final detected spectrum to construct peak position feature vectors, and simultaneously calculates the relative intensity ratios between peaks to construct intensity ratio feature vectors. Then, the wavenumber deviation mean is calculated between the peak position feature vectors and the reference peak position vectors of each standard substance in the standard spectral library. When the wavenumber deviation mean is less than the preset wavenumber tolerance (usually 2-5 cm⁻¹), the wavenumber deviation is considered acceptable. -1 When the intensity ratio feature vector is compared with the reference intensity ratio vector of the corresponding standard substance, the cosine similarity is further calculated. Finally, the matching result is determined based on the magnitude of the cosine similarity. When the similarity is greater than a preset matching threshold (usually 0.85-0.95), it is determined that the food sample contains the illegal additive corresponding to the standard substance, and the similarity is output as a confidence index. The formula for calculating cosine similarity is: ; in, For vectors and cosine similarity, and These are the intensity ratio eigenvectors of the sample to be tested and the standard substance, respectively. and For each vector, the first... Each element has a value. The cosine similarity ranges from -1 to 1, with values closer to 1 indicating a higher degree of matching. By employing a dual matching strategy of peak position and intensity ratio, the accuracy and reliability of illegal additive detection are significantly improved, effectively avoiding misjudgments that may result from single-feature matching.
[0018] In this embodiment of the invention, intensity gradient analysis is performed on the distribution curve along the spectral axis to identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and these segments are marked as fluorescence saturation risk segments, including: The distribution curve is sampled at equal intervals according to a preset spectral resolution to obtain a discrete fluorescence intensity sequence. Equal-interval sampling is a fundamental step in the digital processing of continuous spectral signals, converting them into a discrete data sequence by uniformly sampling points along the spectral axis. The sampling process first determines an appropriate spectral resolution (typically 0.5-2 nm) to meet the accuracy requirements of subsequent analysis while avoiding data redundancy. Then, sampling points are uniformly set at this resolution across the entire fluorescence emission spectrum, and the fluorescence intensity value corresponding to each sampling point is recorded to form a discrete sequence. For fluorescence signals with a high dynamic range, logarithmic pre-amplification or multi-gain segmented acquisition techniques are used to extend the dynamic range, ensuring that signals in both weak and strong fluorescence regions are accurately recorded. The discretized fluorescence intensity sequence retains the main characteristics of the original distribution curve, laying the data foundation for subsequent gradient analysis.
[0019] The first-order difference between adjacent sampling points in a discrete fluorescence intensity sequence is calculated to construct a fluorescence intensity gradient sequence. First-order differencing is a fundamental method for quantifying the rate of change of a signal, reflecting the local slope of the curve through the intensity difference between adjacent points. The calculation process performs subtraction on each pair of adjacent points in the discrete fluorescence intensity sequence, obtaining a series of difference values that constitute the fluorescence intensity gradient sequence. To reduce the influence of random noise, in practical applications, the center difference method or a Savitzky-Golay derivative filter with smoothing effects is usually used to calculate the gradient, improving the stability of the results. The gradient sequence intuitively reflects the rate and direction of fluorescence intensity change; positive values indicate an increase in intensity, negative values indicate a decrease in intensity, and the absolute value reflects the drasticness of the change. This sequence is a key basis for identifying fluorescence peak positions and assessing saturation risk.
[0020] In fluorescence intensity gradient sequences, transition points where the gradient sign changes from positive to negative are identified and marked as candidate positions for fluorescence peaks. Sign transition point detection is an effective strategy for locating extrema, based on the mathematical property that the derivative is zero at extrema and the signs of the derivatives before and after are opposite. The detection process traverses the entire gradient sequence, searching for positions where the gradient sign changes from positive to negative between adjacent points. These positions correspond to local maxima of the original curve, i.e., candidate positions for fluorescence peaks. To improve detection robustness, a threshold filtering strategy is employed in practical applications. Only when the absolute values of both the positive gradient before and the negative gradient after the transition exceed a preset noise threshold are they confirmed as valid sign transition points, effectively avoiding false peak identification caused by noise fluctuations. For flat peaks with gradients close to zero but not strictly crossing zero, local fitting and interpolation techniques are used to accurately locate the peak position. This sign transition detection method can accurately identify all peak positions in the fluorescence spectrum, providing a basis for fluorescence saturation risk assessment.
[0021] The fluorescence intensity values corresponding to each candidate position of the fluorescence peak are read and compared with a preset proportion of the upper limit of the detector's linear dynamic range. Peak intensity comparison is a direct method for assessing saturation risk, judging potential risks by comparing the ratio of actual signal intensity to the detector's tolerance. The comparison process first determines the upper limit of the detector's linear dynamic range (usually 80%-90% of full scale), then sets a warning proportion threshold (usually 70%-80%) as the trigger point for risk warning; next, the fluorescence intensity value corresponding to each candidate position of the fluorescence peak is read and compared with this threshold. When the peak intensity exceeds the threshold, it means that during actual Raman spectroscopy acquisition, the fluorescence background at that wavelength position may cause detector saturation, requiring special attention and handling. For peak positions close to but not exceeding the threshold, a secondary warning mechanism is set up, flexibly adjusting the processing strategy according to sample change sensitivity and detection requirements. This risk assessment method based on peak intensity proportion provides a scientific basis for subsequent differentiated acquisition strategies.
[0022] When the fluorescence intensity at a candidate position of a fluorescence peak exceeds a preset proportion, the search continues along the spectral axis from that position to both sides, identifying boundary positions where the fluorescence intensity drops below the preset proportion. Boundary search is a crucial step in determining the range of risk zones, defining the boundaries of regions requiring special treatment by finding the intensity drop points. The search process employs a bisection strategy, starting from the peak position and iteratively searching towards lower and higher wavelengths until the position where the fluorescence intensity first drops below the preset proportion is found. To improve search efficiency, a large-step coarse search is first performed to lock in an approximate region, followed by a small-step fine search to determine the precise boundary. For complex fluorescence spectra with multiple overlapping peaks, a local minimum constraint strategy is used to ensure that the boundary does not cross the valley points between adjacent peaks, avoiding excessive expansion of risk zones. Through this search method that expands from the peak to both sides, the influence range of each high-risk fluorescence peak is accurately determined.
[0023] The spectral segment between two boundary locations is marked as a fluorescence saturation risk segment. Segment marking is the final step in risk area definition, enclosing the determined boundaries into complete processing units. The marking process first records each pair of boundary locations and their corresponding wavelength / wavelength values to construct a risk segment descriptor; then, priority flags are assigned to segments with different risk levels, and the risk level is determined based on the difference between peak intensity and threshold; finally, this risk segment information is stored in a temporary data structure for use in subsequent windowing steps. For multiple risk segments that are close together, a merging strategy is used to simplify the processing flow. When the distance between adjacent segments is less than the preset minimum window width, they are merged into a single large segment. This segment marking method organizes discrete peak points and boundary points into structured risk area information, laying the foundation for subsequent differentiated acquisition window division.
[0024] In this embodiment of the invention, the target Raman spectrum acquisition range is divided into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows, and differentiated detector acquisition parameters are assigned to each acquisition window, including: Each fluorescence saturation risk segment is extended outwards along both sides of the spectral axis by a predetermined margin width to form the coverage area of the strong fluorescence acquisition window. Margin extension is a conservative strategy to ensure complete coverage of the risk area, improving the robustness of the method by expanding the processing range. The extension process is based on the marked fluorescence saturation risk segments, extending the margin width (typically 20-50 cm) along both the low and high wavenumber directions of the spectral axis. -1 This creates an expanded, high-fluorescence acquisition window. The margin width is chosen considering factors such as the typical full width at half maximum (FWHM) of the fluorescence peak, the wavelength accuracy of the spectrometer, and spectral drift between samples, ensuring that even with slight spectral shifts, high-risk regions are completely contained within the processing window. For particularly wide fluorescence peaks, the margin width can be dynamically adjusted according to the proportion of the fluorescence FWHM, ensuring adaptability of the processing range. This margin expansion strategy effectively avoids the possibility of risky regions being incorrectly included in the regular processing window, enhancing the method's safety margin.
[0025] The continuous spectral region within the target Raman spectral acquisition range not covered by the strong fluorescence acquisition window is designated as the weak fluorescence acquisition window. Complementary region delineation is a simple and effective method for window definition, and the range of the low-risk region is determined through an elimination method. The delineation process first clarifies the entire target Raman spectral acquisition range (typically the fingerprint region, 200-1800 cm⁻¹). -1 CH telescopic area 2800-3200cm -1 Then, all areas covered by strong fluorescence acquisition windows are removed, leaving a continuous spectral range that naturally forms a weak fluorescence acquisition window. To avoid excessive window switching affecting acquisition efficiency, a minimum window width threshold is set (typically 100-150 cm). -1 When the interval between adjacent strong fluorescence windows is less than the threshold, this narrow region is also included in the strong fluorescence window processing range. The window division result forms a series of alternating strong and weak fluorescence segments, covering the entire target spectral range, providing a spatial division basis for differentiated acquisition parameter allocation.
[0026] For each weak fluorescence acquisition window, the detector integration time is set based on the ratio of the average fluorescence intensity within that window to the upper limit of the detector's linear dynamic range; the smaller the ratio, the longer the integration time. Adaptive integration time is a key strategy for optimizing signal quality, achieving the optimal signal-to-noise ratio by dynamically adjusting the exposure time. The setting process first calculates the average fluorescence intensity within each weak fluorescence acquisition window as an estimate of the fluorescence background level; then, it calculates the ratio of this average to the upper limit of the detector's linear dynamic range to assess the safety margin of the signal from saturation; finally, it adjusts the integration time based on the reciprocal of this ratio to ensure sufficient signal intensity while avoiding saturation. The integration time calculation typically uses a piecewise function model, setting different calculation parameters for different ratio ranges: a longer integration time (usually 3-5 times the baseline time) is used for low ratio regions (representing weak fluorescence), a medium integration time is used for medium ratio regions, and a shorter integration time is used for high ratio regions. Through this adaptive integration time adjustment based on fluorescence intensity, signal enhancement in weak fluorescence regions is achieved, improving the detection capability of weak Raman peaks.
[0027] For each strong fluorescence acquisition window, the detector integration time is shortened to a preset reduction ratio compared to the integration time of the weak fluorescence acquisition window, and the detector gain is simultaneously reduced until the acquired signal is within the detector's linear response range. Anti-saturation parameter adjustment is a protective strategy for handling high fluorescence regions, actively reducing the signal level to avoid detector nonlinear distortion. The adjustment process first determines an appropriate reduction ratio (usually 10%-30%), setting the integration time of the strong fluorescence window to this ratio of the integration time of the adjacent weak fluorescence window; then, the acquired signal level is estimated based on the product of fluorescence intensity and integration time. If the estimated signal may still exceed the linear range, the detector gain is further reduced, typically by 0.5-1 orders of magnitude; finally, the rationality of the parameter settings is verified through short-term trial acquisition, with fine-tuning as necessary. For particularly strong fluorescence regions, a multiple short-integration accumulation strategy is used instead of a single long integration, effectively avoiding the risk of instantaneous saturation. This dual adjustment of integration time and detector gain ensures signal quality in strong fluorescence regions, laying the foundation for subsequent applications of offset excitation technology.
[0028] In this embodiment of the invention, wavelength-by-wavelength subtraction and integral restoration are performed on two sets of offset excitation spectra to generate the offset difference spectrum of the window, including: The first Raman spectrum of the strong fluorescence acquisition window is acquired using a reference excitation wavelength. Reference spectrum acquisition is the starting point for the migration excitation technique, providing benchmark data for comparison. The acquisition process uses a standard Raman laser (e.g., 785nm, 633nm, or 532nm) as the reference excitation source, and performs spectral acquisition according to the aforementioned strong fluorescence window acquisition parameters to obtain the first set of Raman spectral data. To ensure data quality, a multiple short integral accumulation strategy is employed to reduce random noise, while a cosmic ray filtering algorithm is implemented to remove occasional spike interference. The reference spectrum contains complete Raman and fluorescence information of the sample under standard excitation conditions, serving as a reference point for subsequent differential processing. For temperature-sensitive samples, a temperature control system is set up to ensure that the sample state remains consistent between the two acquisitions, avoiding spectral differences caused by temperature variations. Reference spectrum acquisition lays the data foundation for the migration excitation technique.
[0029] After shifting the excitation wavelength by a preset wavenumber, a second Raman spectrum is acquired within the same strong fluorescence acquisition window. Shift spectroscopy is a crucial operation for eliminating fluorescence background, creating conditions where the Raman peak shifts while the fluorescence remains stationary through a small change in the excitation wavelength. The shift process begins by adjusting the excitation laser wavelength to be longer or shorter than the reference wavelength by a preset amount (typically 30-50 cm⁻¹). -1 The corresponding wavelength shift (approximately 1-2 nm) can be achieved through direct laser wavelength tuning, frequency selection using an acousto-optic tunable filter (AOTF), or temperature control. A second spectral acquisition is then performed under identical sample locations and acquisition parameters to obtain Raman spectra under the shifted excitation conditions. The choice of shift balances Raman peak separation and spectral overlap; an excessively large shift reduces the comparable region between the two sets of spectra, while an excessively small shift results in insignificant differential effects. After the second acquisition, the two sets of Raman spectral data contain the same fluorescence background information and Raman signals at different locations, creating conditions for subsequent differential fluorescence elimination.
[0030] After aligning the first and second Raman spectra in absolute wavelength coordinates, a point-by-point subtraction operation is performed to obtain the original difference spectrum. The fluorescence component is canceled out during subtraction because its emission wavelength position does not shift with the excitation wavelength, while the Raman component exhibits a derivative-type bimodal characteristic due to its synchronous shift with the excitation wavelength. Difference spectrum calculation is the core step in eliminating the fluorescence background, separating the Raman signal from the fluorescence background through subtraction. The calculation process first transforms the two sets of spectra to an absolute wavelength coordinate system (usually in nanometer units) to ensure the consistency of the comparison benchmark; then, interpolation is performed on the two sets of data to generate a data sequence at the same wavelength points; finally, point-by-point subtraction is performed to obtain the original difference spectrum. In the difference spectrum, the fluorescence background is effectively eliminated because its absolute emission wavelength position is fixed, while the Raman signal, due to its constant relative wavenumber (i.e., the absolute wavelength changes with the excitation wavelength), has different positions in the two acquisitions, resulting in a characteristic derivative-type bimodal structure after subtraction—one positive peak and one negative peak. This bimodal characteristic is a typical output of the shift excitation method, reflecting the positional difference of the Raman peak before and after the shift, but further processing is required to restore it to the normal Raman peak shape.
[0031] The original difference spectrum is subjected to cumulative integration along the spectral axis, and the linear trend is removed to restore the derivative-type bimodal characteristics to a single-peak shape, generating the shift difference spectrum. Integral restoration is the mathematical process for recovering the original shape of the Raman peaks; it transforms the derivative characteristics back to the original signal form through integration. The restoration process first performs cumulative integration calculations along the spectral axis (usually from low wavenumber to high wavenumber), with the integration formula as follows: ; in, The spectral intensity after integration, The original difference spectrum intensity, The initial wave number for integration. It is the integration variable (also known as a "dummy variable"), which represents the integral from the lower limit of integration. Reaching the maximum points limit The wavenumber variable between the peaks is addressed by the integration operation, which restores the derivative-type bimodal peaks to a single peak shape close to the original Raman peaks. However, this introduces an integration constant and linear drift. To eliminate these integration effects, a linear fit is then performed on the integration result to identify the trend line. The fitted linear component is then subtracted from the integrated spectrum to eliminate baseline drift. Finally, considering the systematic peak position deviation caused by the excitation wavelength shift, the spectrum is shifted along the wavenumber axis with half of the preset wavenumber shift as compensation, ensuring precise alignment between the restored peak position and the theoretical position. Through this series of processes, a shift difference spectrum with a flat baseline and accurate peak position is obtained, effectively eliminating the interference of strong fluorescence background and highlighting the Raman signal characteristics that were originally masked by fluorescence.
[0032] In this embodiment of the invention, a local fluorescence envelope baseline model is constructed based on fluorescence emission spectral data, and baseline subtraction is performed on the original Raman spectrum using the local fluorescence envelope baseline model, including: Fluorescence intensity data for spectral segments corresponding to each weak fluorescence acquisition window are extracted from fluorescence emission spectral data. Segment extraction is a preparatory step for building a directional baseline model, ensuring the model's relevance through precise correspondence. The extraction process first establishes a wavelength / wavenumber conversion mapping relationship, converting the Raman wavenumber range of the weak fluorescence acquisition window into the corresponding absolute wavelength range; then, the intensity data of this wavelength segment is precisely extracted from the complete fluorescence emission spectral data; for cases of wavelength resolution mismatch, resampling is performed using interpolation methods to match the data point density of the Raman spectrum. The extracted segment data retains the precise morphological characteristics of the fluorescence background in the target window, providing targeted raw data for subsequent baseline modeling and avoiding overfitting or underfitting problems that may arise from full-spectrum modeling.
[0033] The captured fluorescence intensity data were fitted with a smooth curve using asymmetric least squares to obtain the fluorescence envelope baseline curve for this weak fluorescence acquisition window. Asymmetric fitting is a preferred method for handling complex backgrounds, accurately capturing the baseline profile through weight asymmetry. The fitting process is based on an iterative optimization strategy. First, an initial baseline is set as a linear or polynomial fit of the original data. Then, in each iteration, weights are assigned according to the relative position of the current data point to the baseline: points above the baseline (which may contain Raman peaks) are given smaller weights, and points below the baseline are given larger weights. Next, a new baseline estimate is calculated using weighted least squares. Finally, the weight assignment and baseline update steps are repeated until convergence. Key parameters include the smoothing factor. (Controlling baseline smoothness) and asymmetric weighting coefficients (Controlling the difference in upper and lower weights) is usually determined through cross-validation optimization. The asymmetric least squares method is particularly suitable for baseline fitting of Raman spectra, accurately tracking the natural contour of the fluorescence background while being unaffected by Raman peaks. The generated fluorescence envelope baseline curve provides an accurate model for subsequent background subtraction.
[0034] The fluorescence envelope baseline curve is intensity scaled according to the power ratio between the low-power broadband excitation source and the Raman excitation source to obtain the equivalent fluorescence baseline under Raman acquisition conditions. Intensity scaling is a necessary step in cross-mode data conversion, establishing the signal correspondence under different excitation conditions through power correction. The scaling process first determines the effective power ratio between the low-power broadband excitation source and the Raman excitation source. This ratio comprehensively considers factors such as source power, spectral irradiance distribution, optical path transmission efficiency, and detector response. Then, the intensity value of the fluorescence envelope baseline curve is multiplied by this ratio to obtain the expected fluorescence intensity level under Raman excitation conditions. Since the wavelength distribution and power density of different excitation sources vary significantly, in practical applications, the response ratio of a standard fluorescence sample under the two excitation conditions is usually used as a calibration factor to ensure the accuracy of scaling. Through this physical principle-based intensity scaling, the fluorescence characteristics obtained under low-intensity conditions are accurately converted into the equivalent response under high-power Raman excitation, laying the foundation for accurate baseline subtraction.
[0035] After calibrating the scaling factor of the equivalent fluorescence baseline using blank regions without Raman peaks in the original Raman spectrum as anchor points, the calibrated equivalent fluorescence baseline is subtracted from the original Raman spectrum wavelength by wavelength to generate the baseline-subtracted spectrum. Baseline calibration and subtraction are the final steps in signal purification, finely adjusting the theoretical model using actual control points and applying it to the entire spectrum. The calibration process first identifies blank regions without Raman peaks in the original Raman spectrum (usually regions outside the characteristic wavenumber range of the sample or known peak-free intervals); then, the average ratio of the original spectrum to the equivalent fluorescence baseline in these regions is calculated as a fine-tuning factor for the scaling factor; next, the entire equivalent fluorescence baseline is multiplied by this factor to generate the final calibrated fluorescence baseline model; finally, the calibrated baseline is subtracted from the original Raman spectrum wavelength by wavelength to obtain the pure Raman signal. This calibration strategy based on measured data effectively compensates for factors not considered in the theoretical model, such as changes in sample absorption and scattering efficiency, significantly improving the accuracy of baseline subtraction. The subtracted spectrum has a flat baseline and enhanced Raman peak contrast, creating ideal conditions for subsequent peak identification and feature extraction.
[0036] In this embodiment of the invention, intensity normalization connection processing is performed in the overlapping area of adjacent windows, including: A spectral overlap region with a preset wavenumber width is set between adjacent weak fluorescence acquisition windows and strong fluorescence acquisition windows. Setting this overlap region is a crucial preparation for achieving seamless stitching, avoiding stitching breaks by creating a transition band. The setting process is planned in advance during the window division stage, typically extending 10-20 cm at the boundaries of adjacent windows. -1 Forming 20-40cm -1The width of the overlap region ensures sufficient data points for a smooth transition. The choice of overlap region width balances data redundancy and transition smoothness; too small a width may result in an unnatural transition, while too large a width increases acquisition time and data processing burden. To ensure the reliability of the data in the overlap region, special attention is paid to parameter optimization in these areas during the acquisition design to ensure the signal-to-noise ratio meets the stitching requirements. Dual acquisition within the overlap region provides the data foundation for subsequent intensity calibration and smooth transition, and is a prerequisite for high-quality spectral stitching.
[0037] Intensity curve segments within the spectral overlap region of the baseline-subtracted spectrum and the offset difference spectrum were extracted separately. Overlap segment extraction is a crucial step in data preparation, ensuring consistency of the comparison benchmark through precise location. The extraction process first determines the precise wavenumber range of the overlap region, then extracts data point sequences within the corresponding wavenumber ranges from both the baseline-subtracted spectrum and the offset difference spectrum, forming two directly comparable intensity curve segments. To ensure accurate correspondence of data points, fine interpolation is performed on the wavenumber axis to ensure that the two curve segments have the same sampling point distribution. For overlap segments with low signal-to-noise ratios, appropriate smoothing filters can be applied to improve data quality, but care must be taken to prevent over-smoothing of the original features. This precise data extraction provides a paired data foundation for subsequent intensity ratio calculations.
[0038] The ratio of the means of the two intensity curve segments is calculated as an intensity normalization scaling factor, and the offset difference spectrum is scaled based on the baseline-subtracted spectral intensity. Intensity calibration is a crucial step in resolving differences in output signal amplitude caused by different processing methods. Statistical mean comparison ensures consistent overall intensity levels. The calculation process first calculates the average intensity value for each of the two extracted intensity curve segments; then, the ratio of the baseline-subtracted spectral mean to the offset difference spectrum mean is calculated as the intensity normalization scaling factor; finally, all intensity values in the entire offset difference spectrum are multiplied by this factor to achieve full-spectrum intensity normalization. To improve calibration accuracy, outliers and noise peaks are typically excluded before mean calculation, using only stable background regions or common characteristic peak regions for mean calculation. This intensity calibration based on measured data effectively solves the problem of signal amplitude inconsistency caused by different processing methods, ensuring the intensity continuity of the spliced spectrum.
[0039] Within the spectral overlap region, a linear weighted transition is performed on the scaled two spectra, with the weights gradually changing along the spectral axis to generate a smoothly joined composite purified Raman spectrum. Linear weighted transition is the core technology for achieving smooth splicing, avoiding the abrupt effects of hard splicing through gradual weighting. The implementation process first designs a weighting function, with a weight of 1 at the starting point of the overlap region (using the baseline subtracted spectrum) and a weight of 0 at the ending point (using the offset difference spectrum), followed by a linear transition in the intermediate region. Then, based on this weighting function, a weighted average of the two spectral values at each wavenumber point is calculated using the linear weighted mixing formula described above. This gradual transition ensures the first-order continuity of the spectrum at the splicing point, avoiding the step effects that may occur with traditional hard splicing. For particularly complex spectral regions, higher-order smoothing transition functions such as cosine transition or spline interpolation can be used to further improve the splicing quality. Through this smoothing process, the final generated composite purified Raman spectrum exhibits a continuous and smooth curve across the entire wavenumber range, combining the advantages of both processing methods—high signal-to-noise ratio in weak fluorescence regions and effective background suppression in strong fluorescence regions—providing an ideal data foundation for subsequent peak identification and feature extraction.
[0040] In this embodiment of the invention, second-derivative operations are performed on the composite purified Raman spectrum to identify candidate peaks, and the true Raman peaks are distinguished from residual fluorescence pseudo-peaks based on the peak shape symmetry index of each candidate peak, including: After applying Savitzky-Golay smoothing filtering to the composite purified Raman spectrum, the second derivative spectrum is calculated. Negative extrema points in the second derivative spectrum are identified and marked as candidate peaks. Smoothing and derivative transformation are preparatory steps for peak identification, enhancing peak characteristics and suppressing noise interference through mathematical processing. The process first applies a Savitzky-Golay smoothing filter to reduce noise levels. This filter achieves signal smoothing while preserving peak shape characteristics through local polynomial fitting. Key parameters include window width (typically 9-15 points) and polynomial order (typically 3-5). Then, the second derivative is calculated on the smoothed spectrum. The derivative calculation also uses the Savitzky-Golay method to achieve smooth differentiation, effectively suppressing the noise amplification effect in derivative calculation. In the second derivative spectrum, the original peaks correspond to negative extrema points, while the background approaches zero. This characteristic greatly simplifies the peak identification process. By setting an appropriate threshold (typically 3-5 times the noise standard deviation), negative extrema points below this threshold are searched in the second derivative spectrum and marked as candidate peak positions. The advantage of the second derivative method lies in its high insensitivity to complex backgrounds and its enhancement effect on weak peaks, which can effectively identify inconspicuous small peaks and shoulder peaks in the original spectrum.
[0041] Returning to the composite purified Raman spectrum, the peak shape profiles of each candidate peak are extracted, and the ratio of the half-peak widths (HWW) on both sides of the peak is calculated as the asymmetry factor. Peak shape analysis is a key method for distinguishing true and false peaks, revealing their physical nature by quantitatively evaluating the geometric characteristics of the peak. The analysis process first locates the precise position of each candidate peak in the original spectrum; then, the peak shape profile is extracted with the peak position as the center, typically within 3-5 HWWs on both sides of the peak position; next, the HWWs on both sides of the peak are calculated, defined as the wavenumber width where the peak intensity drops to half the peak height; finally, the ratio of the right HWW to the left HWW is calculated as the peak shape asymmetry factor. True Raman peaks usually exhibit symmetrical or nearly symmetrical peak shapes (derived from the physical characteristics of molecular vibrational energy level structure), with an asymmetry factor close to 1.0; while residual fluorescence false peaks or background fluctuations usually exhibit asymmetric profiles, with an asymmetry factor significantly deviating from 1.0. Through this morphological analysis based on physical principles, the true Raman signal is effectively distinguished from residual interference, improving the accuracy of feature extraction.
[0042] When the absolute value of the difference between the asymmetry factor and 1.0 is greater than the preset asymmetry threshold, the candidate peak is determined to be a residual fluorescence spurious peak and is removed. The threshold determination is a quantitative standard for distinguishing true and false peaks, and automated screening is achieved by setting a tolerance range. The determination process first calculates the absolute value of the difference between the asymmetry factor of the candidate peak and the ideal value of 1.0. The value is then compared with a preset asymmetry threshold (typically 0.2-0.3). When the difference exceeds the threshold, it indicates a significant deviation from the symmetrical shape of the peak, which is identified as a residual fluorescence spurious peak or background fluctuation and removed from the candidate peak list. The threshold setting takes into account the natural asymmetry (such as certain lattice modes or macromolecular vibrations) and measurement errors that may exist in actual Raman peaks, reserving a reasonable asymmetry tolerance space for true Raman peaks. For specific sample types, the threshold parameters can be optimized through testing with known standard samples to improve the targeting and accuracy of screening. This automated screening based on morphological characteristics greatly improves the efficiency and reliability of feature extraction.
[0043] When the asymmetry factor is near 1.0 and the absolute value of the extreme value of the candidate peak in the second derivative spectrum is greater than the preset signal-to-noise ratio threshold, the candidate peak is determined to be a true Raman peak and retained. Dual-criteria confirmation is a conservative strategy to improve the reliability of the judgment, comprehensively evaluating the authenticity of the peak by combining morphological and intensity characteristics. The confirmation process first verifies whether the asymmetry factor is within an acceptable range (usually 0.7-1.3); then checks whether the absolute value of the extreme value of the peak in the second derivative spectrum exceeds the preset signal-to-noise ratio threshold (usually 5-8 times the noise standard deviation); only when both conditions are met simultaneously can it be determined as a credible true Raman peak and retained. This dual-criteria setting effectively avoids misjudgments that may be caused by a single indicator, and is particularly suitable for handling weak characteristic peaks or partially overlapping peaks in complex samples. The retained true peaks constitute an effective information carrier of the final detected spectrum, providing a reliable data foundation for subsequent feature extraction and template matching.
[0044] In this embodiment of the invention, characteristic peak position combinations and peak intensity ratio features are extracted from the final detected spectrum, and template matching is performed with a pre-built Raman standard spectral library of illegal additives, including: Peak position feature vectors are constructed by extracting the peak position wavenumber values of all retained Raman true peaks from the final detected spectrum, and intensity ratio feature vectors are constructed by calculating the relative intensity ratios among the Raman true peaks. Feature vector construction is a fundamental step in quantitatively characterizing spectral features, enabling objective comparisons through numerical description. The construction process first extracts the peak position wavenumber values of all labeled Raman true peaks from the final detected spectrum and arranges them in ascending order of wavenumber to form peak position feature vectors. This directly reflects the vibrational mode distribution of the molecular structure; then, the intensity values of each peak are measured, the strongest characteristic peak is selected as a reference, and the intensity ratios of the other peaks relative to the reference peak are calculated to form an intensity ratio eigenvector. This reflects the relative activity of each vibration mode. Using relative intensity ratios instead of absolute intensity values eliminates the influence of variations in sample concentration and instrument sensitivity, improving the stability and comparability of feature representation. For complex mixed samples, peak intensity ratio combinations can be used to calculate the intensity ratio between specific peak pairs, forming a more targeted feature description. These feature vectors collectively constitute the Raman "fingerprint" of the sample, providing an objective basis for subsequent similarity matching.
[0045] The mean wavenumber deviation is calculated by comparing the peak position feature vector with the reference peak position vectors of each standard substance in the Raman standard spectral library of illegal additives. Peak position matching is a rapid initial screening method that narrows down the candidate range through skeleton feature comparison. The matching process first loads a pre-built Raman standard spectral library of illegal additives, which contains standard Raman spectral data and characteristic peak position information of common illegal food additives; then, the peak position feature vector of the sample is compared with the reference peak position vector of each substance in the library, the wavenumber deviation between corresponding peak positions is calculated, and the mean is taken as an overall matching degree index. The wavenumber deviation calculation adopts an optimal matching strategy, allowing for limited fluctuations in peak positions and the absence of some peaks, thus enhancing the fault tolerance of the matching. The mean wavenumber deviation intuitively reflects the overall similarity between the two sets of peak positions; the smaller the value, the higher the matching degree. This feature skeleton-based initial screening method is computationally efficient and can quickly identify standard substances that may be related to the sample, providing a candidate set for further fine matching.
[0046] When the mean wavenumber deviation is less than the preset wavenumber tolerance, the cosine similarity between the intensity ratio eigenvector and the reference intensity ratio vector of the corresponding standard material is further calculated. Intensity ratio matching is the second step in fine-grained verification, improving identification specificity through peak intensity pattern comparison. The verification process first screens out wavenumbers with a mean wavenumber deviation less than the preset wavenumber tolerance (usually 2-5 cm⁻¹). -1 The process involves identifying candidate standard materials for a sample intensity ratio feature vector and then calculating the cosine similarity between the sample intensity ratio feature vector and the reference intensity ratio vectors of these candidate materials to quantify their directional consistency. The cosine similarity calculation formula, as previously described, uses the cosine value of the angle between the vectors to represent the degree of similarity, effectively capturing the similarity of peak intensity distribution patterns without being affected by the absolute magnitude of the vectors. This two-stage matching strategy combines information from two complementary dimensions—peak position skeleton and intensity distribution—significantly improving the accuracy and specificity of material identification and effectively avoiding misjudgments that may result from single-feature matching.
[0047] When the cosine similarity exceeds a preset matching threshold, the food sample is determined to contain an illegal additive corresponding to the standard substance, and the cosine similarity is output as a confidence index. Threshold determination is the final quantitative standard for decision-making; setting an acceptable similarity baseline ensures the reliability of the results. The determination process compares the calculated cosine similarity with a preset matching threshold (usually 0.85-0.95). When the similarity exceeds the threshold, the sample is determined to contain an illegal additive corresponding to the standard substance, and the specific similarity value is output as the confidence index for user reference. The matching threshold balances sensitivity and specificity; an excessively high threshold may lead to missed detections, while an excessively low threshold may cause false positives. In practical applications, the optimal threshold is usually determined through testing a large number of known samples. Sometimes, multiple threshold ranges are set, such as above 0.95 for "high match" and 0.85-0.95 for "possible match," providing more detailed judgment criteria. For multi-component mixed samples, the system can output multiple matching results exceeding the threshold, sorted by similarity from highest to lowest, reflecting the various possible illegal additives. This objective judgment method based on quantitative thresholds provides reliable technical support for food safety testing.
[0048] In this embodiment of the invention, performing cumulative integration along the spectral axis on the original difference spectrum and removing the linear trend includes: Starting from the low wavenumber end of the original difference spectrum, a point-by-point cumulative summation operation is performed to obtain the integral-reconstructed spectrum. Cumulative integration is a fundamental method for reconstructing differential signals, restoring the original signal shape through inverse operations. The operation begins at the low wavenumber end of the difference spectrum (usually the lower limit of the window) and calculates the cumulative sum point-by-point along the positive direction of the spectral axis. For discrete data sequences, numerical integration methods are used; specifically, the trapezoidal rule or Simpson's rule can be used to improve accuracy. The basic cumulative summation formula is: ; in, For the first The integral value of a point, For the difference spectrum The intensity value of the point. The interval between adjacent wavenumber points. For spectra sampled at equal intervals, The constant value further simplifies the calculation. The cumulative integral transforms the derivative-type bimodal characteristics in the original difference spectrum into a single-peak shape close to a conventional Raman peak, but it also introduces an integration constant and cumulative error, which manifests as baseline drift and requires further correction.
[0049] Linear fitting is performed on the first and last points of the integrated reconstructed spectrum. The fitted linear component is then subtracted from the integrated reconstructed spectrum to eliminate baseline drift introduced by the integral. Linear correction is an effective method for eliminating the integral effect, identifying and removing drift trends through endpoint fitting. The correction process first selects the first and last points of the integrated reconstructed spectrum (usually averaging 10-20 points each to reduce noise influence); then, a straight line is drawn using these two points, denoted as... ,in and The fitting coefficients are used; finally, this linear component is subtracted point by point from the entire integrated spectrum to obtain a corrected spectrum with a flat baseline. For cases with high noise or unstable endpoints, multi-point linear regression or weighted fitting methods can be used to improve the stability of the correction. Linear correction effectively eliminates the systematic bias accumulated during integration, restores the true relative intensity relationship of the signal, and lays the foundation for subsequent wavenumber compensation and spectral analysis.
[0050] Using half of the preset wavenumber offset as the compensation amount, the drift-removed spectrum is wavenumber-shifted along the spectral axis to compensate for the systematic peak position deviation caused by the excitation wavelength shift, outputting a shift difference spectrum. Wavenumber compensation is the final step in restoring the peak position, correcting the shift effect through systematic shifting. The compensation process first determines the compensation amount, theoretically half of the preset wavenumber offset (derived from the fact that the distance between positive and negative peaks in the differential spectrum is approximately equal to the offset); then, the entire drift-removed spectrum is shifted along the wavenumber axis by this compensation amount, which can be achieved through data sequence reindexing or interpolation resampling; finally, the edges of the shifted spectrum are processed, such as by zero padding or extrapolation, to ensure data integrity. Wavenumber compensation ensures that the position of the restored peak corresponds precisely to the theoretical Raman peak position, eliminating the systematic shift caused by the change in excitation wavelength, so that the final shift difference spectrum accurately reflects the true Raman characteristics of the sample in terms of peak position and shape, facilitating accurate comparison with standard spectral libraries.
[0051] The rapid Raman detection method for illegal additives in food in the embodiments of this application has been described above. The rapid Raman detection system for illegal additives in food in the embodiments of this application is described below. Please refer to [link to relevant documentation]. Figure 2 One embodiment of the rapid Raman detection system for illegal additives in food in this application includes: The pretreatment acquisition module is used to perform dispersion liquid-liquid microextraction pretreatment on food samples to obtain the test solution. It acquires the fluorescence emission spectrum data of the test solution under a low-power broadband excitation light source. The fluorescence emission spectrum data includes the distribution curve of fluorescence intensity along the spectral axis. The risk analysis module is used to perform intensity gradient analysis on the distribution curve along the spectral axis, identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and mark them as fluorescence saturation risk segments. The window division module is used to divide the target Raman spectrum acquisition range into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows based on the position and width of the fluorescence saturation risk region on the spectral axis, and to assign differentiated detector acquisition parameters to each acquisition window. The strong window processing module is used to perform Raman spectroscopy acquisition at two excitation wavelengths with a preset wavenumber offset within the strong fluorescence acquisition window, obtain two sets of offset excitation spectra, and perform wavelength-by-wavelength subtraction and integral restoration on the two sets of offset excitation spectra to generate the offset difference spectrum of the window. The weak window processing module is used to acquire the original Raman spectrum according to the allocated acquisition parameters within the weak fluorescence acquisition window, construct a local fluorescence envelope baseline model based on the fluorescence emission spectrum data, and perform baseline subtraction on the original Raman spectrum using the local fluorescence envelope baseline model to generate the baseline-subtracted spectrum. The spectral splicing and integration module is used to splice the baseline subtraction spectrum of each weak fluorescence acquisition window with the offset difference spectrum of each strong fluorescence acquisition window along the spectral axis, and perform intensity normalization connection processing in the overlapping area of adjacent windows to generate a composite purified Raman spectrum. The peak identification and purification module is used to perform second derivative operations on the composite purified Raman spectrum to identify candidate peaks. Based on the peak shape symmetry index of each candidate peak, it distinguishes between true Raman peaks and residual fluorescence pseudo-peaks. After removing residual fluorescence pseudo-peaks, the final detection spectrum is generated. The matching result output module is used to extract characteristic peak position combinations and peak intensity ratio features from the final detection spectrum, perform template matching with the pre-built Raman standard spectrum library of illegal additives, and output the detection results based on the matching similarity. The modules are connected via wired and / or wireless means to enable data transmission between them.
[0052] This invention achieves highly sensitive detection of illegal additives in food samples under strong fluorescence interference through pretreatment of dispersive liquid-liquid microextraction, fluorescence emission spectroscopy acquisition, fluorescence intensity gradient analysis, windowed differential acquisition strategy, shift excitation spectral processing, baseline subtraction, spectral stitching, and peak identification verification. The windowed differential acquisition and processing method of this invention can accurately handle different levels of fluorescence interference, effectively purify Raman signals by combining shift excitation and baseline subtraction techniques, and accurately distinguish between true and false peaks through peak shape analysis.
[0053] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0054] It should be noted that all formulas in this manual are calculated by removing dimensions and taking their numerical values. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0055] Although embodiments of the invention have been shown and described, those skilled in the art will understand 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 claims and their equivalents.
Claims
1. A rapid Raman detection method for illegal additives in food, characterized in that, include: A pretreatment of dispersive liquid-liquid microextraction is performed on a food sample to obtain a test solution. Fluorescence emission spectrum data of the test solution are collected under a low-power broadband excitation light source. The fluorescence emission spectrum data includes the distribution curve of fluorescence intensity along the spectral axis. Intensity gradient analysis is performed on the distribution curve along the spectral axis to identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and these segments are marked as fluorescence saturation risk segments. Based on the position and width of the fluorescence saturation risk region on the spectral axis, the target Raman spectrum acquisition range is divided into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows, and differentiated detector acquisition parameters are assigned to each acquisition window. Within the strong fluorescence acquisition window, Raman spectroscopy acquisition is performed at two excitation wavelengths with a preset wavenumber offset, respectively, to obtain two sets of offset excitation spectra. Wavelength-by-wavelength subtraction and integral restoration are then performed on the two sets of offset excitation spectra to generate the offset difference spectrum of the window. The raw Raman spectrum is acquired within the weak fluorescence acquisition window according to the assigned acquisition parameters. A local fluorescence envelope baseline model is constructed based on the fluorescence emission spectrum data. The local fluorescence envelope baseline model is used to perform baseline subtraction on the raw Raman spectrum to generate a baseline-subtracted spectrum. The baseline subtracted spectrum of each weak fluorescence acquisition window and the offset difference spectrum of each strong fluorescence acquisition window are spliced along the spectral axis, and intensity normalization connection processing is performed in the overlapping area of adjacent windows to generate a composite purified Raman spectrum. The candidate peaks are identified by performing second derivative operations on the composite purified Raman spectrum. The true Raman peaks and residual fluorescence pseudo-peaks are distinguished according to the peak shape symmetry index of each candidate peak. The final detection spectrum is generated after removing the residual fluorescence pseudo-peaks. Feature peak position combinations and peak intensity ratios are extracted from the final detected spectrum and matched with a pre-built Raman standard spectrum library of illegal additives. The detection results are output based on the matching similarity.
2. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The intensity gradient analysis of the distribution curve along the spectral axis, identifying spectral regions where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and marking them as fluorescence saturation risk regions, includes: The distribution curve is sampled at equal intervals according to a preset spectral resolution to obtain a discrete fluorescence intensity sequence; The first-order difference between adjacent sampling points is calculated for the discrete fluorescence intensity sequence to construct a fluorescence intensity gradient sequence; In the fluorescence intensity gradient sequence, the transition point where the gradient sign changes from positive to negative is identified and marked as a candidate position for the fluorescence peak. Read the fluorescence intensity value corresponding to each candidate position of the fluorescence peak and compare it with a preset ratio value of the upper limit of the linear dynamic range of the detector; When the fluorescence intensity value at a candidate position of a certain fluorescence peak exceeds the preset ratio value, the fluorescence intensity is searched along both sides of the spectral axis with that position as the center until the boundary position where the fluorescence intensity drops below the preset ratio value is searched. The spectral segment between the two boundary locations is marked as the fluorescence saturation risk segment.
3. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The process of dividing the target Raman spectrum acquisition range into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows, and assigning differentiated detector acquisition parameters to each acquisition window, includes: Each fluorescence saturation risk segment is extended outward by a preset margin width along both sides of the spectral axis to form the coverage area of the strong fluorescence acquisition window; The continuous spectral region within the target Raman spectrum acquisition range that is not covered by the strong fluorescence acquisition window is defined as the weak fluorescence acquisition window; For each of the weak fluorescence acquisition windows, the detector integration time is set according to the ratio of the average fluorescence intensity within the window to the upper limit of the detector's linear dynamic range; the smaller the ratio, the longer the integration time. For each of the strong fluorescence acquisition windows, the detector integration time is shortened to a preset reduction ratio of the integration time of the weak fluorescence acquisition window, and the detector gain is simultaneously reduced until the acquired signal is within the detector's linear response range.
4. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The step of performing wavelength-by-wavelength subtraction and integral restoration on the two sets of offset excitation spectra to generate the offset difference spectrum of the window includes: The first Raman spectrum of the strong fluorescence acquisition window is acquired at the reference excitation wavelength; After shifting the excitation wavelength by the preset wavenumber shift, a second Raman spectrum is acquired within the same strong fluorescence acquisition window. After aligning the first Raman spectrum and the second Raman spectrum in absolute wavelength coordinates, subtraction is performed point by point to obtain the original difference spectrum. The fluorescence component is canceled out in the subtraction because the emission wavelength position does not shift with the excitation wavelength, while the Raman component exhibits derivative-type bimodal characteristics because it shifts synchronously with the excitation wavelength. The original difference spectrum is subjected to cumulative integration along the spectral axis and the linear trend is removed to restore the derivative-type bimodal feature to a single-peak shape, thereby generating the offset difference spectrum.
5. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The step of constructing a local fluorescence envelope baseline model based on the fluorescence emission spectral data, and performing baseline subtraction on the original Raman spectrum using the local fluorescence envelope baseline model, includes: Fluorescence intensity data of the spectral segment corresponding to each of the weak fluorescence acquisition windows is extracted from the fluorescence emission spectrum data; The intercepted fluorescence intensity data were fitted with a smooth curve using the asymmetric least squares method to obtain the fluorescence envelope baseline curve of the weak fluorescence acquisition window. The fluorescence envelope baseline curve is intensity scaled according to the power ratio between the low-power broadband excitation source and the Raman excitation source to obtain the equivalent fluorescence baseline under Raman acquisition conditions. After calibrating the scaling factor of the equivalent fluorescence baseline using the blank region without Raman peaks in the original Raman spectrum as the anchor point, the calibrated equivalent fluorescence baseline is subtracted from the original Raman spectrum wavelength by wavelength to generate the baseline subtraction spectrum.
6. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The process of performing intensity normalization and connection processing in the overlapping area of adjacent windows includes: A spectral overlap region with a preset wavenumber width is set between adjacent weak fluorescence acquisition windows and strong fluorescence acquisition windows; The intensity curve segments of the baseline subtracted spectrum and the offset difference spectrum are extracted respectively within the spectral overlap region; The ratio of the mean values of the two intensity curve segments is calculated as an intensity normalization scaling factor, and the offset difference spectrum is scaled based on the baseline subtracted spectral intensity. A linear weighted transition is performed on the two scaled spectra within the spectral overlap region, with the weights gradually changing along the spectral axis to generate the composite purified Raman spectrum.
7. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The step of performing second-order derivative operations on the composite purified Raman spectrum to identify candidate peaks, and distinguishing true Raman peaks from residual fluorescence spurious peaks based on the peak shape symmetry index of each candidate peak, includes: After performing Savitzky-Golay smoothing filtering on the composite purified Raman spectrum, the second derivative spectrum is calculated, and negative extreme points in the second derivative spectrum are identified and marked as candidate peaks. Returning to the composite purified Raman spectrum, extract the peak shape profile of each candidate peak, and calculate the ratio of the half-peak width on both sides of the peak top as the asymmetry factor. When the absolute value of the difference between the asymmetry factor and 1.0 is greater than the preset asymmetry threshold, the candidate peak is determined to be the residual fluorescence pseudo-peak and is removed. When the asymmetry factor is near 1.0 and the absolute value of the extreme value of the candidate peak in the second derivative spectrum is greater than the preset signal-to-noise ratio threshold, the candidate peak is determined to be the true Raman peak and is retained.
8. The rapid Raman detection method for illegal additives in food according to claim 1, characterized in that, The step of extracting characteristic peak position combinations and peak intensity ratios from the final detected spectrum and performing template matching with a pre-built Raman standard spectral library of illegal additives includes: The peak position feature vector is constructed by extracting the peak position wave values of all retained Raman true peaks from the final detection spectrum, and the intensity ratio feature vector is constructed by calculating the relative intensity ratio between each Raman true peak. The mean wavenumber deviation between the peak position feature vector and the reference peak position vector of each standard substance in the Raman standard spectral library of the illegal additive is calculated. When the mean wavenumber deviation is less than the preset wavenumber tolerance, the cosine similarity between the intensity ratio feature vector and the reference intensity ratio vector of the corresponding standard material is further calculated. When the cosine similarity is greater than a preset matching threshold, it is determined that the food sample contains an illegal additive corresponding to the standard substance, and the cosine similarity is output as a confidence index.
9. The rapid Raman detection method for illegal additives in food according to claim 4, characterized in that, The step of performing cumulative integration along the spectral axis on the original difference spectrum and removing the linear trend includes: Starting from the low wavenumber end of the original difference spectrum, perform a cumulative summation operation point by point to obtain the integral restored spectrum; Linear fitting is performed on the first and last points of the integrated restored spectrum, and the fitted linear component is subtracted from the integrated restored spectrum to eliminate the baseline drift introduced by the integration. Using half of the preset wavenumber offset as the compensation amount, the drift-free spectrum is shifted along the spectral axis by wavenumber to compensate for the peak position system deviation caused by the excitation wavelength shift, and the output is the offset difference spectrum.
10. A rapid Raman detection system for illegal additives in food, used to implement the rapid Raman detection method for illegal additives in food as described in any one of claims 1 to 9, characterized in that, include: The pretreatment acquisition module is used to perform dispersion liquid-liquid microextraction pretreatment on food samples to obtain the test solution, and to acquire the fluorescence emission spectrum data of the test solution under a low-power broadband excitation light source. The fluorescence emission spectrum data includes the distribution curve of fluorescence intensity along the spectral axis. The risk analysis module is used to perform intensity gradient analysis on the distribution curve along the spectral axis, identify spectral segments where the fluorescence intensity exceeds a preset proportion of the detector's linear dynamic range, and mark them as fluorescence saturation risk segments. The window division module is used to divide the target Raman spectrum acquisition range into alternating weak fluorescence acquisition windows and strong fluorescence acquisition windows based on the position and width of the fluorescence saturation risk region on the spectral axis, and to assign differentiated detector acquisition parameters to each acquisition window. The strong window processing module is used to perform Raman spectroscopy acquisition at two excitation wavelengths with a preset wavenumber offset within the strong fluorescence acquisition window, acquire two sets of offset excitation spectra, and perform wavelength-by-wavelength subtraction and integral restoration on the two sets of offset excitation spectra to generate the offset difference spectrum of the window. The weak window processing module is used to acquire the original Raman spectrum according to the allocated acquisition parameters within the weak fluorescence acquisition window, construct a local fluorescence envelope baseline model based on the fluorescence emission spectrum data, and perform baseline subtraction on the original Raman spectrum using the local fluorescence envelope baseline model to generate a baseline-subtracted spectrum. The spectral splicing and integration module is used to splice the baseline subtraction spectrum of each weak fluorescence acquisition window and the offset difference spectrum of each strong fluorescence acquisition window along the spectral axis, and perform intensity normalization connection processing in the overlapping area of adjacent windows to generate a composite purified Raman spectrum. The peak identification and purification module is used to perform second derivative operations on the composite purified Raman spectrum to identify candidate peaks, distinguish true Raman peaks from residual fluorescence pseudo-peaks based on the peak shape symmetry index of each candidate peak, and generate the final detection spectrum after removing the residual fluorescence pseudo-peaks. The matching result output module is used to extract characteristic peak position combinations and peak intensity ratio features from the final detection spectrum, perform template matching with the pre-built Raman standard spectrum library of illegal additives, and output the detection results based on the matching similarity.