Raman imaging-based rapid detection method for illegal additives in food

By using sparse Raman imaging and evidence heatmap analysis, detection wavenumber intervals are generated and the sampling queue is updated in a rolling manner, which solves the problem of rapid and accurate detection of illegal food additives in complex matrices and improves detection efficiency and consistency.

CN122171514APending Publication Date: 2026-06-09SHANDONG TIANAN TESTING SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610255222.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing Raman imaging-based methods for detecting illegal food additives struggle to achieve rapid and accurate localization and determination in complex matrices, and the consistency of detection is significantly affected by the matrix and conditions.

Method used

The target pixel spectrum set is generated by sparse Raman imaging scanning, a reference spectrum set is constructed, a detection wavenumber interval is generated, the evidence heat map is analyzed and the sampling queue is updated continuously, and finally the suspicious area is output.

Benefits of technology

It improves the detection efficiency and consistency of illegal food additives in complex matrices, shortens the detection time, and enhances the effectiveness of spatial coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122171514A_ABST
    Figure CN122171514A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of imaging analysis technology and discloses a rapid detection method for illegal food additives based on Raman imaging. The method includes: at the start of the detection task, performing sparse Raman imaging scanning on the boundary of the target region of the sample to be tested to obtain a target pixel spectrum set; constructing a reference spectrum set, and generating a detection wavenumber interval by analyzing the stability changes of the wavenumber highlight ratio in the reference spectrum set and the spatial thermal variation characteristics of different wavenumbers in the sample to be tested; obtaining an evidence heatmap by analyzing the similarity of the detection intensity of candidate gratings in the reference spectrum set and the target pixel spectrum set within the detection wavenumber interval; continuously updating the target pixel spectrum set by analyzing the correlation between the change attributes of evidence gain and the growth of connected regions in the evidence heatmap; and outputting suspicious regions by analyzing the convergence change attributes of the evidence coverage heat increment and the stability characteristics of the region to be matched. This invention generates spatial evidence and location results for suspicious regions more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of imaging analysis technology, and more specifically, to a rapid detection method for illegal food additives based on Raman imaging. Background Technology

[0002] Rapid screening and localization of illegal food additives is a crucial aspect of food safety supervision and enterprise quality control. Raman spectroscopy can characterize the molecular vibrational information of substances, and combined with imaging scanning, it can obtain the spectral distribution at different locations within a target area, thereby achieving component identification and spatial localization simultaneously within the same field of view. Therefore, Raman imaging-based detection methods are used for non-contact, visual, rapid detection and verification of suspicious chemical components in complex food matrices, guiding sample collection.

[0003] Current Raman imaging-based methods for detecting illegal additives in food still face constraints in engineering applications: to obtain spatial evidence usable for judgment, dense or fixed-density imaging scans are often required within a large field of view; when the sample matrix is ​​complex and the additives are locally aggregated or sparsely distributed, a fixed scanning strategy may lead to delayed appearance of valid evidence, thus requiring a trade-off between detection timeliness and sufficient spatial coverage; furthermore, the selection of detection bands or characteristic peaks is easily affected by background fluorescence, superposition of principal component spectral lines in the matrix, and local scattering differences under different matrices, batches, and measurement conditions, causing fluctuations in the stable reuse and weighting of usable bands, which in turn affects the consistency of judgments across batches and matrix conditions. Therefore, a rapid detection method for illegal food additives based on Raman imaging is urgently needed 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 detection method for illegal food additives based on Raman imaging, comprising: At the start of the detection task, sparse Raman imaging scans are performed on the boundary of the detection target region of the sample to be tested to obtain the target pixel spectrum set; A reference spectrum set is constructed, and the detection wavenumber range is generated by analyzing the stability change of the wavenumber high brightness ratio in the reference spectrum set and the spatial thermal variation characteristics of different wavenumbers in the sample to be tested. An evidence heatmap is obtained by analyzing the similarity of the detection intensity of candidate gratings in the detection wavenumber range between the reference spectrum set and the target pixel spectrum set. By analyzing the correlation between the change attributes of evidence gain and the growth of connected regions in the evidence heatmap, a queue of priority sampling pixels for the next batch is generated, and the target pixel spectrum set is updated on a rolling basis. For the evidence heatmaps obtained from different iterations, the final heatmap is obtained by analyzing the convergence change properties of the evidence coverage heat increment and the stability characteristics of the region to be matched, and the suspicious region is output.

[0005] Preferably, the method for obtaining the target pixel spectrum set includes: The batch identifier of the sample to be tested and the boundary of the target area are received to form a sampling instruction; Obtain the vertex coordinate sequence of the target region boundary, identify the minimum and maximum x and y coordinates in the vertex coordinate sequence, and construct the circumscribed rectangle accordingly; The outer matrix of the detected target region boundary is rasterized to obtain several candidate raster cells sorted by rows and columns; Based on the sampling command, the first round of sparse sampling is performed on the candidate grids within the boundary of the target area to obtain the sampled grid set; The center point of each candidate grid is used as the first sampling point. The first sampling queue is generated according to the row and column arrangement order of the candidate grids in which the first sampling points are located within the boundary of the detection target area. Raman sampling is performed on each sampling point in the first round of sampling queue to obtain the corresponding wavenumber and Raman intensity, and a pixel spectrum is generated. By integrating the pixel spectra of each initial sampling point, a set of target pixel spectra of the sample under test is obtained below the boundary of the target detection area.

[0006] Preferably, the method for generating the detection wavenumber interval includes: Construct a wavenumber index sequence based on the wavenumber interval of the pixel spectrum, and read the wavenumber index sequence and Raman intensity sequence of a single pixel spectrum from the target pixel spectrum set according to the sampling sequence number; Obtain blank matrix control samples from the same batch, and denote the area of ​​the control sample within the boundary of the target detection area as the reference area; Obtain the pixel spectrum under different candidate grids in the reference region, and denote it as the reference spectrum; integrate the reference spectra under different sampling points to obtain the reference spectrum set; Wavenumber stability analysis was performed on the reference spectrum set to obtain the stable search wavenumber; By statistically analyzing the spatial distribution heat of local extrema in the target pixel spectrum set of samples in the same batch, a set of highly variable wavenumbers is obtained. The set of detection wavenumbers is obtained by calculating the union of the stable search wavenumber set and the highly variable wavenumber set; A series of consecutive detection wavenumbers in the detection wavenumber set are aggregated to construct a detection wavenumber interval.

[0007] Preferably, the method for performing wavenumber stability analysis on a reference spectrum set includes: The wavenumber index sequence of the reference spectrum is divided into sliding windows, and the Raman intensity corresponding to each wavenumber within the sliding window is combined to obtain the Raman intensity range. In the same reference spectrum, the Raman intensity corresponding to the center wavenumber of each sliding window is marked as the center intensity, and it is determined whether the center intensity is the maximum value in the Raman intensity range; If the central intensity is the maximum value within the Raman intensity range, then the central wavenumber is marked as the candidate wavenumber. The occurrence count of each candidate wavelet and the total occurrence count of all candidate wavelets are recorded as the candidate highlight count and the candidate highlight count, respectively. Calculate the ratio of the number of times each candidate highlight is given to the total number of candidate highlights, and record the result as the candidate highlight ratio for the corresponding candidate wavenumber; Candidate wavenumbers with a candidate highlight ratio not lower than a preset highlight threshold are marked as stable search wavenumbers. Each stable search wavenumber in the reference spectrum set is integrated to obtain a stable search set.

[0008] Preferably, the method for analyzing the similarity of detected intensities between candidate gratings in the reference spectral set and the target pixel spectral set within the detection wavenumber range includes: The Raman intensity sequence of each pixel spectrum in the target pixel spectrum set and the reference spectrum set is extracted based on the detection wavenumber interval and denoted as the detection intensity sequence; Candidate grids in the boundary of the target area are indexed by row and column number. The detection intensity sequences of the test sample and the control sample in the same candidate grid in different detection wavenumber intervals are matched sequentially to obtain detection intensity sequence pairs. Construct detection intensity vector pairs corresponding to the detection intensity sequence, perform similarity measurement on the detection intensity vector pairs, and record the results of the similarity measurement as the similarity of the corresponding candidate grid in the wavenumber interval; The interval length of each detection wavenumber interval is calculated, and the interval lengths of different detection wavenumber intervals are normalized. The normalization result is used as the fusion weight of the detection wavenumber intervals. The similarity of the same candidate raster in different detection wavenumber intervals is weighted and fused according to the fusion weight, and the result of the weighted fusion is used as the evidence heat of the candidate raster. The evidence heatmap is obtained by aggregating the evidence heatmap by sorting the candidate grids by rows and columns.

[0009] Preferably, the method for generating the next batch of priority sampling pixel queues and continuously updating the target pixel spectrum set includes: Unsampled candidate rasters are retrieved within the boundary of the target area and denoted as unsampled rasters; A fixed radius neighborhood is preset, and each unsampled grid cell is sequentially designated as the center grid cell. The grid neighborhood of the center grid cell is constructed based on the fixed radius neighborhood. Count the number of candidate grids within the neighboring grid, and calculate the average evidence value and maximum evidence heat value of the candidate grids; Construct a four-adjacent topology of the central neighborhood within the grid neighborhood to obtain the central adjacency topology structure; Construct an evidence heat gradient sequence by sorting the evidence heat of candidate grids within the central adjacent topology in descending order, and calculate the difference in the heat of every two adjacent evidence in the evidence heat gradient sequence, which is denoted as the evidence heat difference. Calculate the maximum value and the mean value of the evidence heat difference, and denot them as the gradient maximum and the gradient mean, respectively; Calculate the grid distance between the center grid and each candidate grid in the grid's neighborhood, compare the grid distances between the center grid and different candidate grids in the grid's neighborhood, and record the minimum grid distance as the nearest neighbor sampling distance; For each central grid cell, the mean heat value of evidence, the maximum heat value of evidence, the number of candidate grid cells, the nearest neighbor sampling distance, the reciprocal of the maximum and minimum gradient values, and the reciprocal of the mean gradient value are weighted and fused. The weighted fusion result is denoted as the expected evidence gain of the unsampled grid, and the expected evidence gain of each unsampled grid in the evidence heatmap is calculated. The expected evidence gains of different unsampled graticules are sorted in descending order, and a priority sampling queue is constructed based on the center point corresponding to each unsampled graticule. The next batch of sampling points is obtained by dequeuing from the priority sampling queue. Raman sampling is performed on the sampling point set to obtain the Raman sampling results. The target pixel spectrum set is updated based on the Raman sampling results. Iterative Raman sampling is performed on unsampled gratings according to the priority sampling queue, and the target pixel spectrum set is updated on a rolling basis based on the iterative Raman sampling results.

[0010] Preferably, the method for analyzing the convergence change properties of evidence coverage heat increments and the stability characteristics of the region to be matched includes: For each sampled evidence heatmap, candidate grids with evidence heat greater than a preset heat threshold are marked as high evidence grids. The proportion of high-evidence grids to candidate grids is calculated to obtain the evidence coverage rate. The evidence coverage rate increment is calculated based on the sampling results of every two iterations. The evidence coverage increments obtained from every two iterations are combined in an ordered manner according to the iteration number to generate an evidence coverage increment sequence. When the evidence coverage increment sequence converges within a preset window, a converged iteration segment is generated based on the iteration number of the preset window. The evidence heatmap obtained from each iteration of Raman sampling is updated on a rolling basis to construct the region to be matched; Spatial overlap matching is performed between the current iteration and the regions to be matched in the evidence heatmap obtained from the previous iteration to generate stable region pairs; In the evidence heatmap obtained from adjacent iterations, stable iteration segments are generated by analyzing the differences in matching degree between stable region pairs. The intersection of the convergent iteration segment and the stable iteration segment is calculated, and the result is recorded as the detection iteration segment. The priority sampling queue is terminated and dequeued and iterated according to the detection iteration segment. The evidence heatmap corresponding to the final iteration number in the detection iteration segment is marked as the final heatmap, and the high-heat connected regions in the final heatmap are marked as suspicious regions and output.

[0011] Preferably, the method for constructing the region to be matched includes: Connectivity analysis is performed on the high evidence grids in the evidence heatmap obtained from each Raman iteration to obtain several high evidence grid connected regions, which are denoted as high heat connected regions. Traverse the high-evidence grids in each high-heat connected component, and integrate the adjacent grids of the high-evidence grids obtained from the traversal to obtain a list of adjacent grids. For each high-evidence raster, perform boundary checks on the adjacent raster list to determine whether all adjacent rasters in the adjacent raster list belong to high-hotness connected regions. If there are adjacent graticles in the adjacent graticle list that do not belong to the high-heat connected domain, then mark the high-evidence graticles obtained by traversal as boundary graticles. The high-evidence raster and boundary raster within the same high-heat connectivity region are combined to obtain the region to be matched.

[0012] Preferably, the method for spatially overlapping the regions to be matched in the current iteration and the evidence heatmap obtained in the previous iteration includes: Obtain the center coordinates of the hottest connected components in the current iteration's region to be matched, and denote them as the region center coordinates; Traverse the current iteration of the region to be matched, and mark the current iteration of the region to be matched as the target region; Calculate the distance between the center of the target region and the center of the region to be matched in each previous iteration; The center distances of regions whose center distances are less than the preset matching radius are retained. Based on the center distances of the regions whose center distances are retained, the regions to be matched in the previous iteration are marked as candidate reachable regions, and a set of candidate reachable regions is constructed. Calculate the intersection of the boundary raster with the high-evidence raster with the target region and each candidate reachable region in the candidate reachable region set in turn; The ratio of the number of intersections of boundary grids to the number of boundary grids in the target region is denoted as the boundary similarity. The ratio of the number of intersections of boundary grids to the number of high-evidence grids in the target region is denoted as the core similarity. The sum of boundary similarity and core similarity is calculated to obtain the matching similarity between the target region and the candidate reachable region; The candidate reachable region corresponding to the maximum matching similarity is marked as the matching region of the target region, and a stable region pair is constructed based on the target region and the matching region.

[0013] Preferably, the method for generating stable iterative fragments includes: The matching similarity between stable region pairs is accumulated, and the accumulated result is recorded as the heatmap similarity. When the heatmap similarity converges within a preset window, a stable iterative segment is generated based on the iteration sequence number of the preset window.

[0014] The technical effects and advantages of the rapid detection method for illegal food additives based on Raman imaging in this invention are as follows: (1) The present invention first performs sparse Raman imaging on the target area to obtain the target pixel spectrum set, then constructs the evidence heat map, and generates the next batch of priority sampling pixel queues based on evidence gain and connected region growth. Finally, the final heat map is determined by the convergence of coverage heat increment and regional stability and the suspicious area is output, so that the sampling resources are concentrated in the position with higher information gain, and spatial evidence and positioning results of the suspicious area are formed faster under the limited sampling amount.

[0015] (2) The present invention constructs a reference spectrum set by using blank matrix control of the same batch, and generates a detection wavenumber interval by combining the stability of the high brightness ratio of the reference spectrum wavenumber and the spatial thermal variation of the wavenumber of the sample to be tested; then, under the detection wavenumber interval, the reference spectrum and the target pixel spectrum are matched and similarity measured at the candidate grid level, and converged into an evidence heat map by the fusion weight normalized according to the interval length, which improves the consistency of judgment under different matrix and batch conditions. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the method flow for the rapid detection of illegal food additives based on Raman imaging according to the present invention.

[0017] Figure 2 This is a schematic diagram of the method for generating the detection wavenumber interval in the rapid detection method for illegal food additives based on Raman imaging of the present invention.

[0018] Figure 3 This is a schematic diagram of the process in the rapid detection method for illegal food additives based on Raman imaging of the present invention, which analyzes the convergence change properties of the heat increment of evidence coverage and the stability characteristics of the region to be matched. Detailed Implementation

[0019] 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.

[0020] This application provides a rapid detection method for illegal food additives based on Raman imaging. The method acquires pixel spectra by performing sparse Raman imaging on the test area, and determines the detection wavenumber interval by combining the wavenumber stability of the blank matrix reference spectrum with the spatial thermal variation of the wavenumber of the test sample. Within this interval, the intensity similarity between the reference and the candidate raster is calculated to generate an evidence heatmap. Iterative sampling is performed by actively selecting points based on evidence gain and connected component growth. The method stops when the coverage increment converges and the region matching stabilizes, outputting the suspicious connected components in the final heatmap. This allows for faster generation of spatial evidence and location results for suspicious areas.

[0021] Please see Figure 1 , Figure 2 and Figure 3 In this embodiment of the invention, the rapid detection method for illegal food additives based on Raman imaging is implemented in detail through the following steps: At the start of the detection task, sparse Raman imaging scans are performed on the boundary of the detection target region of the sample to be tested to obtain the target pixel spectrum set; Methods for obtaining the target pixel spectrum set include: The batch identifier of the sample to be tested and the boundary of the target area are received to form a sampling instruction; In this embodiment, before generating the sampling command, the scanning time budget is set to 30 seconds; the number of sampling points is budgeted to 8000 points; the dwell time is 2 milliseconds per point; the step limit is 0.02 milliseconds, indicating that the maximum step distance between adjacent sampling points in any axis does not exceed this value; the minimum point spacing multiple is 2; the spectral range is set to a wavenumber range of 400 to 1800 per centimeter, meaning that the acquisition and output of the Raman signal only covers the spectral lines within this wavenumber range; and the sampling command is stored using structured fields. Among them, the product of the minimum point spacing multiple and the step upper limit is calculated to obtain the minimum point spacing threshold of 40 micrometers; Obtain the vertex coordinate sequence of the target region boundary, identify the minimum and maximum x and y coordinates in the vertex coordinate sequence, and construct the circumscribed rectangle accordingly; The outer matrix of the detected target region boundary is rasterized to obtain several candidate raster cells sorted by rows and columns; The rasterization process specifically includes: determining whether the center point of a candidate raster is within the boundary of the target detection area; if the center point is within the target detection area boundary, the candidate raster is retained; otherwise, it is discarded; when the area of ​​the center point exceeds 80% of the boundary of the target detection area, the center point of the candidate raster is also determined to be within the target detection area boundary; the x and y coordinates of the center point are obtained by taking the minimum and maximum x coordinates and the median of the minimum and maximum y coordinates, respectively; the area of ​​the center point and the width of the target detection area boundary are set by the debugging personnel; and generating candidate raster by row and column indexing of the circumscribed rectangle based on the minimum point distance threshold. Based on the sampling command, the first round of sparse sampling is performed on the candidate grids within the boundary of the target area to obtain the sampled grid set; The center point of each candidate grid is used as the first sampling point. The first sampling queue is generated according to the row and column arrangement order of the candidate grids in which the first sampling points are located within the boundary of the detection target area. Raman sampling is performed on each sampling point in the first round of sampling queue to obtain the corresponding wavenumber and Raman intensity, and a pixel spectrum is generated. The pixel spectrum is a spectral curve composed of the Raman intensity corresponding to each wavenumber, with the wavenumber as the index. The wavenumber index determines the wavenumber interval according to the spectral range. In this embodiment, the wavenumber interval is 400 to 1800, and the wavenumber step size is 2 per centimeter. The wavenumber interval is discretized into each wavenumber index value according to the wavenumber step size. By integrating the pixel spectra of each initial sampling point, a set of target pixel spectra of the sample under test is obtained below the boundary of the target detection area. The wavenumber index sequence is sorted in the order of [400, 402, 404, ..., 1798, 1800]. A reference spectrum set is constructed, and the detection wavenumber range is generated by analyzing the stability change of the wavenumber high brightness ratio in the reference spectrum set and the spatial thermal variation characteristics of different wavenumbers in the sample to be tested. Methods for detecting wavenumber intervals include: Construct a wavenumber index sequence based on the wavenumber interval of the pixel spectrum, and read the wavenumber index sequence and Raman intensity sequence of a single pixel spectrum from the target pixel spectrum set according to the sampling sequence number; Obtain blank matrix control samples from the same batch, and denote the area of ​​the control sample within the boundary of the target detection area as the reference area; Obtain the pixel spectrum under different candidate grids in the reference region, and denote it as the reference spectrum; integrate the reference spectra under different sampling points to obtain the reference spectrum set; Wavenumber stability analysis was performed on the reference spectrum set to obtain the stable search wavenumber; Methods for wavenumber stability analysis of reference spectrum sets include: The wavenumber index sequence of the reference spectrum is divided into sliding windows, and the Raman intensity corresponding to each wavenumber within the sliding window is combined to obtain the Raman intensity range. In this embodiment, the length of the sliding window is 19 and the number of sliding steps is 5. In the same reference spectrum, the Raman intensity corresponding to the center wavenumber of each sliding window is marked as the center intensity, and it is determined whether the center intensity is the maximum value in the Raman intensity range; If the central intensity is the maximum value within the Raman intensity range, then the central wavenumber is marked as the candidate wavenumber. The occurrence count of each candidate wavelet and the total occurrence count of all candidate wavelets are recorded as the candidate highlight count and the candidate highlight count, respectively. Calculate the ratio of the number of times each candidate highlight is given to the total number of candidate highlights, and record the result as the candidate highlight ratio for the corresponding candidate wavenumber; Candidate wavenumbers with a candidate highlight ratio not lower than a preset highlight threshold are marked as stable search wavenumbers. Each stable search wavenumber in the reference spectrum set is integrated to obtain a stable search set. The high-brightness ratio threshold is determined by the upper quantile of the candidate high-brightness ratio of the same batch of blank matrix control. In this embodiment, the upper quantile is 80%. By statistically analyzing the spatial distribution heat of local extrema in the target pixel spectrum set of samples in the same batch, a set of highly variable wavenumbers is obtained. Methods for statistically analyzing the spatial distribution heat of local extrema in the target pixel spectrum set of samples from the same batch of tests include: For the pixel spectrum of each candidate raster, the candidate wavenumber identification is determined on the corresponding wavenumber index sequence; If a candidate wavenumber exists, the corresponding candidate grid is marked as a wavenumber-dependent grid of the candidate wavenumber; For example, if there is a candidate wavenumber with a wavenumber of 500 in the wavenumber index sequence of the candidate raster pixel spectrum, then the candidate raster is marked as a wavenumber-subordinate raster with a wavenumber of 500. The wavenumber-attached grids of the same candidate wavenumber within the boundary of the detection target area are integrated and their numbers are counted. The resulting set of wavenumber-attached grids is recorded as the number of associated grids. Among them, the candidate wavenumber identification adopts the same method as the above-mentioned method of obtaining candidate wavenumbers based on the reference spectrum; Calculate the ratio of the number of attached grates to the total number of candidate grates at the boundary of the target area, and record the result as the grating influence of the stable search wavenumber at the boundary of the target area. Traverse each set of wavenumber-dependent grids in row and column order, designate the obtained wavenumber-dependent grids as the central grid, and construct the four-neighbor topology of the central grid. In the four-neighbor topology, the four neighborhoods are the candidate grates that are adjacent to the center grates above, below, left, and right. The number of wavenumber-attached grids in the four-neighbor topology is counted and denoted as the number of topology-attached grids of the center wavenumber. The proportion of the number of topologically attached graticles to the total number of graticles in the four-neighbor topology is denoted as the clustering degree of the central graticle. The aggregation degree of different central grids within the same effective grid set is accumulated, and the calculation result is used as the regional aggregation degree of candidate wavenumbers at the boundary of the detection target area. Within the boundary of the target detection area, the raster influence of candidate wavenumbers and the regional clustering are weighted and fused to obtain spatial heat. In this embodiment, the weights of grid influence and region clustering are set to 0.35 and 0.65, respectively; A candidate wavenumber index sequence is constructed based on consecutive candidate wavenumbers. The spatial heat is then combined and spliced ​​according to the arrangement order of the candidate wavenumbers in the candidate wavenumber index sequence to obtain the spatial heat sequence. A sliding window analysis is performed on the spatial heat series to calculate the mean spatial heat within the sliding window, which is denoted as the local baseline heat. For each candidate wavenumber in the spatial heat series, the difference between the spatial heat and the local reference heat within the corresponding sliding window is calculated and denoted as the heat variation coefficient. Candidate wavenumbers with a heat variation coefficient greater than a preset variation threshold are marked as high variation wavenumbers, and a set of high variation wavenumbers is constructed. The preset variation threshold is determined by the upper quantile of the high variation wavenumber of historical batches of samples to be tested; in this embodiment, the upper quantile is set to 80%. The set of detection wavenumbers is obtained by calculating the union of the stable search wavenumber set and the highly variable wavenumber set; Aggregate several consecutive detection wavenumbers in the detection wavenumber set to construct a detection wavenumber interval; An evidence heatmap is obtained by analyzing the similarity of the detection intensity of candidate gratings in the detection wavenumber range between the reference spectrum set and the target pixel spectrum set. Methods that analyze the similarity of detected intensities between candidate gratings in the reference spectral set and the target pixel spectral set within the detection wavenumber range include: The Raman intensity sequence of each pixel spectrum in the target pixel spectrum set and the reference spectrum set is extracted based on the detection wavenumber interval and denoted as the detection intensity sequence; Candidate grids in the boundary of the target area are indexed by row and column number. The detection intensity sequences of the test sample and the control sample in the same candidate grid in different detection wavenumber intervals are matched sequentially to obtain detection intensity sequence pairs. Construct detection intensity vector pairs corresponding to the detection intensity sequence, perform similarity measurement on the detection intensity vector pairs, and record the results of the similarity measurement as the similarity of the corresponding candidate grid in the wavenumber interval; In this embodiment, the similarity measure of the detection intensity vector pairs is the average of cosine similarity and Euclidean distance; The interval length of each detection wavenumber interval is calculated, and the interval lengths of different detection wavenumber intervals are normalized. The normalization result is used as the fusion weight of the detection wavenumber intervals. The similarity of the same candidate raster in different detection wavenumber intervals is weighted and fused according to the fusion weight, and the result of the weighted fusion is used as the evidence heat of the candidate raster. The evidence heat map is obtained by aggregating the evidence heat map by sorting the candidate grids by rows and columns. By analyzing the correlation between the change attributes of evidence gain and the growth of connected regions in the evidence heatmap, a queue of priority sampling pixels for the next batch is generated, and the target pixel spectrum set is updated on a rolling basis. Methods for generating the next batch of priority sampling pixel queues and continuously updating the target pixel spectrum set include: Unsampled candidate rasters are retrieved within the boundary of the target area and denoted as unsampled rasters; A fixed radius neighborhood is preset, and each unsampled grid cell is sequentially designated as the center grid cell. The grid neighborhood of the center grid cell is constructed based on the fixed radius neighborhood. In this embodiment, the fixed radius is set to 4 grid lengths; Count the number of candidate grids within the neighboring grid, and calculate the average evidence value and maximum evidence heat value of the candidate grids; Construct a four-adjacent topology of the central neighborhood within the grid neighborhood to obtain the central adjacency topology structure; Construct an evidence heat gradient sequence by sorting the evidence heat of candidate grids within the central adjacent topology in descending order, and calculate the difference in the heat of every two adjacent evidence in the evidence heat gradient sequence, which is denoted as the evidence heat difference. Calculate the maximum value and the mean value of the evidence heat difference, and denot them as the gradient maximum and the gradient mean, respectively; Calculate the grid distance between the center grid and each candidate grid in the grid's neighborhood, compare the grid distances between the center grid and different candidate grids in the grid's neighborhood, and record the minimum grid distance as the nearest neighbor sampling distance; Among them, the grid distance is calculated based on the coordinates of the center point of the central grid and the candidate grid, and the calculation result is used as the grid distance; For each central grid cell, the mean heat value of evidence, the maximum heat value of evidence, the number of candidate grid cells, the nearest neighbor sampling distance, the reciprocal of the maximum and minimum gradient values, and the reciprocal of the mean gradient value are weighted and fused. The weighted fusion result is denoted as the expected evidence gain of the unsampled grid, and the expected evidence gain of each unsampled grid in the evidence heatmap is calculated. The expected evidence gains of different unsampled graticules are sorted in descending order, and a priority sampling queue is constructed based on the center point corresponding to each unsampled graticule. The number of outputs from the priority sampling queue can be converted into a maximum number of outputs by the upper limit of the remaining sampling points in the sampling budget token. For example, the output in each round shall not exceed half of the remaining sampling points, thus ensuring that the priority sampling queue is consistent with the budget constraint. The next batch of sampling points is obtained by dequeuing from the priority sampling queue. Raman sampling is performed on the sampling point set to obtain the Raman sampling results. The target pixel spectrum set is updated based on the Raman sampling results. Iterative Raman sampling is performed on unsampled graticles according to the priority sampling queue, and the target pixel spectrum set is updated on a rolling basis based on the iterative Raman sampling results. In existing technologies, Raman imaging for screening illegal food additives often requires dense scanning within a large field of view to obtain stable spatial distribution evidence. When the sample matrix is ​​complex and the illegal additives are locally aggregated or sparsely distributed, fixed-density scanning often requires longer scanning times to cover key micro-areas, making it difficult to balance detection efficiency with sufficient spatial coverage. This invention improves the effective information output per sampling point through a closed loop of initial sparse scanning, evidence heat assessment, and priority sampling iteration: First, sparse Raman imaging is performed at the boundary of the target area to obtain the target pixel spectrum set. Then, a detection wavenumber interval is generated based on the reference spectrum set, and an evidence heat map is constructed. Subsequently, by analyzing the evidence gain change attributes and connectivity growth characteristics in the evidence heat map, the next batch of priority sampling pixel queues is generated and continuously updated. This mechanism prioritizes sampling resources to spatial locations with higher evidence gain and continuously strengthens the spatial evidence of suspicious areas during iteration, thereby improving screening efficiency without increasing hardware complexity. It also outputs results with heat maps and suspicious area locations for easy verification and retesting. For the evidence heatmaps obtained from different iterations, the final heatmap is obtained by analyzing the convergence change attributes of the evidence coverage heat increment and the stability characteristics of the region to be matched, and the suspicious region is output. Methods that analyze the convergence properties of evidence-covered heat increments and the stability characteristics of the regions to be matched include: For each sampled evidence heatmap, candidate grids with evidence heat greater than a preset heat threshold are marked as high evidence grids. The preset heat threshold is determined by the upper quantile of the evidence heat map corresponding to the evidence heat map of historical batches of samples to be tested. In this embodiment, the upper quantile is set to 90%. The proportion of high-evidence grids to candidate grids is calculated to obtain the evidence coverage rate. The evidence coverage rate increment is calculated based on the sampling results of every two iterations. The evidence coverage increments obtained from every two iterations are combined in an ordered manner according to the iteration number to generate an evidence coverage increment sequence. Among them, the coverage increment sequence is used to describe the change in coverage between two adjacent evidence rounds; When the evidence coverage increment sequence converges within a preset window, a converged iteration segment is generated based on the iteration number of the preset window. In this embodiment, the method for performing convergence analysis on the evidence coverage increment sequence includes: The maximum increment, average increment, and percentage of zero increment are calculated by sliding the window across the increment sequence with a preset window length; the preset window length is a 5-iteration window. The maximum increment, average increment, and zero increment percentage of the combined window, along with the start and end iteration numbers of the window, are used to generate a set of convergent candidate segments. An example illustrating the generation of this set of convergent candidate segments is provided below: The evidence coverage rates for a certain batch in iteration numbers 11 to 15 are: 8.0%, 18.1%, 18.1%, 18.2%, 18.2%; then the corresponding coverage rate increment sequence is [+0.1%, +0.0%, +0.1%, +0.0%]. The maximum increment within the window is 0.1%, the average increment per round is 0.05%, and the percentage of zero increments is [missing information]. The maximum increment within the combined window is 0.1%, the average increment per round is 0.05%, and the percentage of zero increment is [not specified]. By iterating through the window from start to end indices 11 to 15, a set of convergent candidate segments is obtained. The convergence rule is determined for the convergence candidate segment set, and convergence markers are added to the convergence candidate segment set that satisfy the convergence rule to obtain the convergence segment set; In this embodiment, the convergence rules include setting the maximum window increment to not exceed an increment threshold, the average window increment to not exceed an average increment threshold, and the proportion of zero increments to not exceed a zero growth ratio threshold. Specifically, a maximum window increment of 0.2% per round indicates that if the "maximum growth per round" within the window is still less than 0.2%, it is considered that there is no significant new evidence. An average increment threshold of 0.2% per round indicates that if the average "new coverage per round" within the window is less than 0.6%, it is considered that growth is weak. A zero growth ratio threshold of 0.6% per round indicates that if the proportion of rounds with "almost no growth" within the window exceeds 60%, it is considered that growth is stagnating. The following is an example illustrating the convergence rule determination for the above set of convergent candidate segments: For the convergence candidate fragment set in the above example, the average window increment is 0.05% per round, which is lower than the average increment threshold of 0.6% per round. The proportion of zero increment is 50%, which is not higher than the growth ratio threshold of 60%. Furthermore, the maximum increment is 0.1%, which is less than the maximum increment threshold of 0.2%. Therefore, the convergence rule is triggered, and convergence markers are added to iteration numbers 11 to 15 to obtain converged iteration fragments. The evidence heatmap obtained from each iteration of Raman sampling is updated on a rolling basis to construct the region to be matched; Methods for constructing regions to be matched include: Connectivity analysis is performed on the high evidence grids in the evidence heatmap obtained from each Raman iteration to obtain several high evidence grid connected regions, which are denoted as high heat connected regions. Traverse the high-evidence grids in each high-heat connected component, and integrate the adjacent grids of the high-evidence grids obtained from the traversal to obtain a list of adjacent grids. For each high-evidence raster, perform boundary checks on the adjacent raster list to determine whether all adjacent rasters in the adjacent raster list belong to high-hotness connected regions. If there are adjacent graticles in the adjacent graticle list that do not belong to the high-heat connected domain, then mark the high-evidence graticles obtained by traversal as boundary graticles. The high-evidence raster and boundary raster within the same high-heat connectivity region are combined to obtain the region to be matched; Spatial overlap matching is performed between the current iteration and the regions to be matched in the evidence heatmap obtained from the previous iteration to generate stable region pairs; Methods for spatially overlapping the regions to be matched in the current iteration and the evidence heatmap obtained in the previous iteration include: Obtain the center coordinates of the hottest connected components in the current iteration's region to be matched, and denote them as the region center coordinates; The method for obtaining the center coordinates of the high-heat connected domain is as follows: calculate the bounding rectangle of the boundary grid, obtain the vertex coordinate sequence of the bounding rectangle, calculate the minimum and maximum horizontal and vertical coordinates based on the vertex coordinate sequence, and take the median value of the minimum and maximum horizontal coordinates and the minimum and maximum vertical coordinates as the center coordinates of the high-heat connected domain. Traverse the current iteration of the region to be matched, and mark the current iteration of the region to be matched as the target region; Calculate the distance between the center of the target region and the center of the region to be matched in each previous iteration; The center distances of regions whose center distances are less than the preset matching radius are retained. Based on the center distances of the regions whose center distances are retained, the regions to be matched in the previous iteration are marked as candidate reachable regions, and a set of candidate reachable regions is constructed. In this embodiment, the preset matching radius is 2 grid lengths; Calculate the intersection of the boundary raster with the high-evidence raster with the target region and each candidate reachable region in the candidate reachable region set in turn; The ratio of the number of intersections of boundary grids to the number of boundary grids in the target region is denoted as the boundary similarity. The ratio of the number of intersections of boundary grids to the number of high-evidence grids in the target region is denoted as the core similarity. Among them, boundary similarity represents the degree of similarity of the same spatial object, which is used for the same micro-region suspected of illegal additives, and the probability that it is still the same place in two rounds of iteration; The sum of boundary similarity and core similarity is calculated to obtain the matching similarity between the target region and the candidate reachable region; Among them, matching similarity is used to describe the probability that high-evidence grids in the region will be completely retained in two rounds of iteration; Mark the candidate reachable region corresponding to the maximum matching similarity as the matching region of the target region, and construct stable region pairs based on the target region and the matching region; In the evidence heatmap obtained from adjacent iterations, stable iteration segments are generated by analyzing the differences in matching degree between stable region pairs. Methods for generating stable iterative fragments include: The matching similarity between stable region pairs is accumulated, and the accumulated result is recorded as the heatmap similarity. When the heatmap similarity converges within a preset window, a stable iteration segment is generated based on the iteration sequence number of the preset window. The convergence rule for determining the similarity of heatmaps is the same as the convergence rule used in this embodiment. The intersection of the convergent iteration segment and the stable iteration segment is calculated, and the result is recorded as the detection iteration segment. The priority sampling queue is terminated and dequeued and iterated according to the detection iteration segment. The evidence heatmap corresponding to the final iteration number in the detection iteration segment is marked as the final heatmap, and the high-heat connected regions in the final heatmap are marked as suspicious regions for output. In existing technologies, the detection of illegal additives based on Raman spectroscopy typically requires the selection of several characteristic peaks or bands for comparison. However, under different food matrices, batches, or measurement conditions, variations in background fluorescence, matrix principal component spectral line superposition, and local scattering can cause fluctuations in the selection and weighting of available bands, thus affecting the consistency of results. This invention introduces a set of reference spectra using a blank matrix control from the same batch. The selection of bands is constrained by the stability of the high brightness ratio of the reference spectrum wavenumbers. Simultaneously, the most discriminative detection wavenumber intervals are selected by combining the wavenumber spatial thermal variation in the sample to be tested. First, wavenumber stability analysis is performed on the reference spectrum set to obtain stable search wavenumbers. Then, the spatial distribution heat of local extrema is statistically analyzed from the target pixel spectrum set of the test sample to obtain a set of highly variable wavenumbers, which are then aggregated into detection wavenumber intervals. Subsequently, within the detection wavenumber intervals, the detection intensity sequence matching and similarity measurement of the reference spectrum and the target pixel spectrum are performed at the candidate raster level, and the interval length is normalized to form a fusion weight, generating an evidence heatmap. This band generation and evidence construction method, which combines stability constraints and spatial variation-driven approaches, makes detection no longer dependent on single-point judgment of fixed characteristic peaks. Instead, it uses the stability of the control and spatial differences to jointly support the evidence output, improving the consistency of judgment under different matrices and batch conditions, and providing more interpretable spectral interval basis and spatial evidence support for the final suspicious areas.

[0022] The above description is merely a preferred embodiment of the present invention and is 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.

[0023] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0024] All formulas in this manual are dimensionless and calculated numerically. 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.

[0025] 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 detection method for illegal food additives based on Raman imaging, characterized in that, include: At the start of the detection task, sparse Raman imaging scans are performed on the boundary of the detection target region of the sample to be tested to obtain the target pixel spectrum set; A reference spectrum set is constructed, and the detection wavenumber range is generated by analyzing the stability change of the wavenumber high brightness ratio in the reference spectrum set and the spatial thermal variation characteristics of different wavenumbers in the sample to be tested. An evidence heatmap is obtained by analyzing the similarity of the detection intensity of candidate gratings in the detection wavenumber range between the reference spectrum set and the target pixel spectrum set. By analyzing the correlation between the change attributes of evidence gain and the growth of connected regions in the evidence heatmap, a queue of priority sampling pixels for the next batch is generated, and the target pixel spectrum set is updated on a rolling basis. For the evidence heatmaps obtained from different iterations, the final heatmap is obtained by analyzing the convergence change properties of the evidence coverage heat increment and the stability characteristics of the region to be matched, and the suspicious region is output.

2. The rapid detection method for illegal food additives based on Raman imaging according to claim 1, characterized in that, The method for obtaining the target pixel spectrum set includes: The batch identifier of the sample to be tested and the boundary of the target area are received to form a sampling instruction; Obtain the vertex coordinate sequence of the target region boundary, identify the minimum and maximum x and y coordinates in the vertex coordinate sequence, and construct the circumscribed rectangle accordingly; The outer matrix of the detected target region boundary is rasterized to obtain several candidate raster cells sorted by rows and columns; Based on the sampling command, the first round of sparse sampling is performed on the candidate grids within the boundary of the target area to obtain the sampled grid set; The center point of each candidate grid is used as the first sampling point. The first sampling queue is generated according to the row and column arrangement order of the candidate grids in which the first sampling points are located within the boundary of the detection target area. Raman sampling is performed on each sampling point in the first round of sampling queue to obtain the corresponding wavenumber and Raman intensity, and a pixel spectrum is generated. By integrating the pixel spectra of each initial sampling point, a set of target pixel spectra of the sample under test is obtained below the boundary of the target detection area.

3. The rapid detection method for illegal food additives based on Raman imaging according to claim 2, characterized in that, The method for generating the detection wavenumber interval includes: Construct a wavenumber index sequence based on the wavenumber interval of the pixel spectrum, and read the wavenumber index sequence and Raman intensity sequence of a single pixel spectrum from the target pixel spectrum set according to the sampling sequence number; Obtain blank matrix control samples from the same batch, and denote the area of ​​the control sample within the boundary of the target detection area as the reference area; Obtain the pixel spectrum under different candidate grids in the reference region, and denote it as the reference spectrum; integrate the reference spectra under different sampling points to obtain the reference spectrum set; Wavenumber stability analysis was performed on the reference spectrum set to obtain the stable search wavenumber; By statistically analyzing the spatial distribution heat of local extrema in the target pixel spectrum set of samples in the same batch, a set of highly variable wavenumbers is obtained. The set of detection wavenumbers is obtained by calculating the union of the stable search wavenumber set and the highly variable wavenumber set; A series of consecutive detection wavenumbers in the detection wavenumber set are aggregated to construct a detection wavenumber interval.

4. The rapid detection method for illegal food additives based on Raman imaging according to claim 3, characterized in that, The method for wavenumber stability analysis of the reference spectrum set includes: The wavenumber index sequence of the reference spectrum is divided into sliding windows, and the Raman intensity corresponding to each wavenumber within the sliding window is combined to obtain the Raman intensity range. In the same reference spectrum, the Raman intensity corresponding to the center wavenumber of each sliding window is marked as the center intensity, and it is determined whether the center intensity is the maximum value in the Raman intensity range; If the central intensity is the maximum value within the Raman intensity range, then the central wavenumber is marked as the candidate wavenumber. The occurrence count of each candidate wavelet and the total occurrence count of all candidate wavelets are recorded as the candidate highlight count and the candidate highlight count, respectively. Calculate the ratio of the number of times each candidate highlight is given to the total number of candidate highlights, and record the result as the candidate highlight ratio for the corresponding candidate wavenumber; Candidate wavenumbers with a candidate highlight ratio not lower than a preset highlight threshold are marked as stable search wavenumbers. Each stable search wavenumber in the reference spectrum set is integrated to obtain a stable search set.

5. The rapid detection method for illegal food additives based on Raman imaging according to claim 4, characterized in that, The method for analyzing the similarity of detected intensities between candidate gratings in the reference spectral set and the target pixel spectral set within the detection wavenumber range includes: The Raman intensity sequence of each pixel spectrum in the target pixel spectrum set and the reference spectrum set is extracted based on the detection wavenumber interval and denoted as the detection intensity sequence; Candidate grids in the boundary of the target area are indexed by row and column number. The detection intensity sequences of the test sample and the control sample in the same candidate grid in different detection wavenumber intervals are matched sequentially to obtain detection intensity sequence pairs. Construct detection intensity vector pairs corresponding to the detection intensity sequence, perform similarity measurement on the detection intensity vector pairs, and record the results of the similarity measurement as the similarity of the corresponding candidate grid in the wavenumber interval; The interval length of each detection wavenumber interval is calculated, and the interval lengths of different detection wavenumber intervals are normalized. The normalization result is used as the fusion weight of the detection wavenumber intervals. The similarity of the same candidate raster in different detection wavenumber intervals is weighted and fused according to the fusion weight, and the result of the weighted fusion is used as the evidence heat of the candidate raster. The evidence heatmap is obtained by aggregating the evidence heatmap by sorting the candidate grids by rows and columns.

6. The rapid detection method for illegal food additives based on Raman imaging according to claim 5, characterized in that, The method for generating the next batch of priority sampling pixel queues and continuously updating the target pixel spectrum set includes: Unsampled candidate rasters are retrieved within the boundary of the target area and denoted as unsampled rasters; A fixed radius neighborhood is preset, and each unsampled grid cell is sequentially designated as the center grid cell. The grid neighborhood of the center grid cell is constructed based on the fixed radius neighborhood. Count the number of candidate grids within the neighboring grid, and calculate the average evidence value and maximum evidence heat value of the candidate grids; Construct a four-adjacent topology of the central neighborhood within the grid neighborhood to obtain the central adjacency topology structure; Construct an evidence heat gradient sequence by sorting the evidence heat of candidate grids within the central adjacent topology in descending order, and calculate the difference in the heat of every two adjacent evidence in the evidence heat gradient sequence, which is denoted as the evidence heat difference. Calculate the maximum value and the mean value of the evidence heat difference, and denot them as the gradient maximum and the gradient mean, respectively; Calculate the grid distance between the center grid and each candidate grid in the grid's neighborhood, compare the grid distances between the center grid and different candidate grids in the grid's neighborhood, and record the minimum grid distance as the nearest neighbor sampling distance; For each central grid cell, the mean heat value of evidence, the maximum heat value of evidence, the number of candidate grid cells, the nearest neighbor sampling distance, the reciprocal of the maximum and minimum gradient values, and the reciprocal of the mean gradient value are weighted and fused. The weighted fusion result is denoted as the expected evidence gain of the unsampled grid, and the expected evidence gain of each unsampled grid in the evidence heatmap is calculated. The expected evidence gains of different unsampled graticules are sorted in descending order, and a priority sampling queue is constructed based on the center point corresponding to each unsampled graticule. The next batch of sampling points is obtained by dequeuing from the priority sampling queue. Raman sampling is performed on the sampling point set to obtain the Raman sampling results. The target pixel spectrum set is updated based on the Raman sampling results. Iterative Raman sampling is performed on unsampled gratings according to the priority sampling queue, and the target pixel spectrum set is updated on a rolling basis based on the iterative Raman sampling results.

7. The rapid detection method for illegal food additives based on Raman imaging according to claim 1, characterized in that, The method for analyzing the convergence change properties of evidence covering heat increments and the stability characteristics of the region to be matched includes: For each sampled heatmap, candidate grids with evidence heat greater than a preset heat threshold are marked as high evidence grids. The proportion of high-evidence grids to candidate grids is calculated to obtain the evidence coverage rate. The evidence coverage rate increment is calculated based on the sampling results of every two iterations. The evidence coverage increments obtained from every two iterations of sampling are combined in an ordered manner according to the iteration number to generate an evidence coverage increment sequence. When the evidence coverage increment sequence converges within a preset window, a convergence iteration segment is generated based on the iteration number of the preset window. The evidence heatmap obtained from each iteration of Raman sampling is updated on a rolling basis to construct the region to be matched; Spatial overlap matching is performed between the current iteration and the regions to be matched in the evidence heatmap obtained from the previous iteration to generate stable region pairs; In the evidence heatmap obtained from adjacent iterations, stable iteration segments are generated by analyzing the differences in matching degree between stable region pairs. The intersection of the convergent iteration segment and the stable iteration segment is calculated, and the result is recorded as the detection iteration segment. The priority sampling queue is terminated and dequeued and iterated according to the detection iteration segment. The evidence heatmap corresponding to the final iteration number in the detection iteration segment is marked as the final heatmap, and the high-heat connected regions in the final heatmap are marked as suspicious regions and output.

8. The rapid detection method for illegal food additives based on Raman imaging according to claim 4, characterized in that, The method for constructing the region to be matched includes: Connectivity analysis is performed on the high evidence grids in the evidence heatmap obtained from each Raman iteration to obtain several high evidence grid connected regions, which are denoted as high heat connected regions. Traverse the high-evidence grids in each high-heat connected component, and integrate the adjacent grids of the high-evidence grids obtained from the traversal to obtain a list of adjacent grids. For each high-evidence raster, perform boundary checks on the adjacent raster list to determine whether all adjacent rasters in the adjacent raster list belong to high-hotness connected regions. If there are adjacent graticles in the adjacent graticle list that do not belong to the high-heat connected domain, then mark the high-evidence graticles obtained by traversal as boundary graticles. The high-evidence raster and boundary raster within the same high-heat connectivity region are combined to obtain the region to be matched.

9. The rapid detection method for illegal food additives based on Raman imaging according to claim 1, characterized in that, The method for spatially overlapping the regions to be matched in the current iteration and the evidence heatmap obtained in the previous iteration includes: Obtain the center coordinates of the hottest connected components in the current iteration's region to be matched, and denote them as the region center coordinates; Traverse the current iteration of the region to be matched, and mark the current iteration of the region to be matched as the target region; Calculate the distance between the center of the target region and the center of the region to be matched in each previous iteration; The center distances of regions whose center distances are less than the preset matching radius are retained. Based on the center distances of the regions whose center distances are retained, the regions to be matched in the previous iteration are marked as candidate reachable regions, and a set of candidate reachable regions is constructed. Calculate the intersection of the boundary raster with the high-evidence raster with the target region and each candidate reachable region in the candidate reachable region set in turn; The ratio of the number of intersections of boundary grids to the number of boundary grids in the target region is denoted as the boundary similarity. The ratio of the number of intersections of boundary grids to the number of high-evidence grids in the target region is denoted as the core similarity. The sum of boundary similarity and core similarity is calculated to obtain the matching similarity between the target region and the candidate reachable region; The candidate reachable region corresponding to the maximum matching similarity is marked as the matching region of the target region, and a stable region pair is constructed based on the target region and the matching region.

10. The rapid detection method for illegal food additives based on Raman imaging according to claim 7, characterized in that, The method for generating stable iterative fragments includes: The matching similarity between stable region pairs is accumulated, and the accumulated result is recorded as the heatmap similarity. When the heatmap similarity converges within a preset window, a stable iterative segment is generated based on the iteration sequence number of the preset window.