Method and system for rapid detection of antibiotic residues in vegetables based on chlorophyll fluorescence imaging

CN122282734BActive Publication Date: 2026-08-07CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHU INSTITUTE OF TECHNOLOGY
Filing Date
2026-05-14
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,该方案完全脱离叶绿素荧光的光合机理信息载体,且其检测目标限于表面残留的农药分子,对于已经被根系吸收并富集进入叶肉细胞内部的抗生素分子无法形成有效响应

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122282734B_ABST
    Figure CN122282734B_ABST
Patent Text Reader

Abstract

The present application discloses a method and system for rapid detection of vegetable antibiotic residues based on chlorophyll fluorescence imaging, belonging to the field of non-destructive testing technology for agricultural product quality and safety. The present application applies saturated pulse light to dark-adapted vegetable leaves, collects multiple time-resolution fluorescence imaging sequences on a logarithmic scale within the transient time window from J phase to I phase of the rapid induction kinetics of chlorophyll fluorescence; extracts time sequence feature tensors composed of transient inflection point time offsets and spatial feature tensors composed of leaf vein-leaf mesophyll boundary heterogeneity textures from the sequences; performs Tucker core tensor cross outer product fusion on the two tensors to obtain antibiotic species fingerprint tensors; outputs antibiotic categories and confidence levels through CNN classification; and then outputs concentration prediction values through category conditional gradient boosting regression and adjusts the sampling time window and the region of interest in a reverse closed loop. The present application realizes integrated rapid detection of the type identification and concentration quantification of ten microgram-level antibiotic residues per kilogram in vegetables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rapid and non-destructive testing technology for agricultural product quality and safety, specifically to a rapid detection method and system for antibiotic residues in vegetables based on chlorophyll fluorescence imaging. Background Technology

[0002] Currently, laboratory detection of antibiotic residues in vegetables mainly relies on high-performance liquid chromatography-tandem mass spectrometry (HPLC-MS / MS). While accurate in quantification, this method requires cumbersome pretreatment processes such as sample homogenization, solid-phase extraction purification, derivatization, and elution. Single-sample analysis often takes over two hours and places extremely high demands on operators, reagents, consumables, and instrument maintenance, failing to meet the needs of rapid on-site screening in fields and distribution channels. Chlorophyll fluorescence technology, as a mature and non-destructive method for detecting plant photosynthetic activity, can reflect changes in the activity of photosystem II reaction centers without damaging the sample, and is therefore being explored for the early diagnosis of plant stress.

[0003] Chinese patent application CN110702656A discloses a method for detecting pesticide residues in vegetable oils based on three-dimensional fluorescence spectroscopy. This method uses a fluorescence spectrometer to acquire three-dimensional apparent fluorescence spectral data from multiple vegetable oil pesticide residue samples. After instrument excitation-emission correction and polynomial smoothing preprocessing, the data is imported into an alternating penalty trilinear decomposition model to determine the optimal fluorescence component score. Then, a backpropagation neural network is used to train the mapping relationship between pesticide spectra and corresponding concentrations to achieve quantitative analysis. However, this method relies solely on the amplitude-wavelength two-dimensional information of the sample's steady-state fluorescence. When dealing with trace amounts of antibiotic residues in vegetable leaves, as low as tens of micrograms per kilogram, the steady-state amplitude changes are completely submerged under the instrument's dark noise level, making it impossible to obtain an effective distinguishing signal. Therefore, it cannot identify the type of antibiotic or provide accurate concentration predictions.

[0004] Chinese patent application CN102147367A discloses a method for detecting crop stress physiology and identifying stress resistance using delayed fluorescence spectroscopy. This method collects the delayed fluorescence spectral decay curves of crops after strong light excitation and subsequent light withdrawal, and characterizes the changes in photosystem II electron transport activity of the photosynthetic apparatus under stress by extracting parameters such as decay time constant and integral intensity. However, the decay period parameters extracted by this method only reflect the overall relaxation level of the photosynthetic apparatus and cannot distinguish the specific time constant changes induced in the chloroplast photosynthetic electron transport chain by different types of antibiotics due to differences in their target sites. Therefore, it is unsuitable for species identification.

[0005] Chinese invention patent CN103499530A discloses a rapid detection method for pesticide residues in fruits and vegetables. This method uses near-infrared reflectance spectroscopy combined with a pattern matching database to achieve on-site screening of pesticide residues. However, this approach completely deviates from the photosynthetic mechanism information carrier of chlorophyll fluorescence, and its detection target is limited to pesticide molecules remaining on the surface. It cannot effectively respond to antibiotic molecules that have been absorbed by the roots and accumulated inside the mesophyll cells.

[0006] In summary, existing fluorescence and spectroscopy methods generally face a common core bottleneck when dealing with trace amounts of antibiotic residues in vegetables at the level of tens of micrograms per kilogram: the stress signal carried by the steady-state fluorescence amplitude parameter is completely submerged by the dark noise of the equipment. This makes it impossible to identify fluoroquinolones, tetracyclines, and sulfonamides, or to provide accurate concentration quantification results. Therefore, there is an urgent need for a detection method that can re-extract the species fingerprint and concentration fingerprint from the weak stress signal submerged by noise. Summary of the Invention

[0007] Addressing the core bottleneck of existing vegetable antibiotic residue detection technologies, where the steady-state chlorophyll fluorescence amplitude parameter is generally below the dark noise level for trace residues at the tens of micrograms per kilogram, making it impossible to identify fluoroquinolones, tetracyclines, and sulfonamides, or provide accurate concentration quantification, this invention provides a rapid detection method and system for vegetable antibiotic residues based on chlorophyll fluorescence imaging. This method shifts the detection signal carrier from the noise-dampened steady-state fluorescence amplitude parameter to the inflection point time shift of the rapid induction kinetic curve of chlorophyll fluorescence within the transient time window from phase J to phase I, as well as the heterogeneous texture of the leaf vein-mesophyll boundary spatial distribution. Furthermore, it uses the concentration prediction results to adjust the transient sampling time window and the region of interest in a reverse closed loop. Under the constraints of not damaging the vegetable sample and a single sample detection time not exceeding five minutes, this method achieves integrated rapid detection of antibiotic residues in vegetables by identifying their types and quantifying their concentrations, based on the principle of differences in relaxation time constants at different stages of the photosynthetic electron transport chain.

[0008] The technical solution of this invention is as follows: A rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging includes the following steps: applying saturated pulsed light to the dark-adapted vegetable leaves, and acquiring multi-temporal resolution chlorophyll fluorescence imaging sequences within the transient time window of chlorophyll fluorescence induced dynamics; extracting a temporal feature tensor composed of transient inflection point time shifts and a spatial feature tensor composed of heterogeneous texture of leaf vein-mesophyll boundary spatial distribution from the chlorophyll fluorescence imaging sequences; performing cross-coding fusion on the temporal and spatial feature tensors to generate an antibiotic type fingerprint tensor; inputting the antibiotic type fingerprint tensor into a convolutional neural network classifier to output antibiotic types and their type confidence scores; feeding the antibiotic type fingerprint tensor into a corresponding class conditional gradient boosting regressor according to the antibiotic type to output predicted antibiotic concentration values, and feeding back the predicted antibiotic concentration values ​​to adjust the start and end times of the transient time window and the region of interest extracted from the spatial feature tensor in a closed loop.

[0009] This invention also provides a rapid detection system for antibiotic residues in vegetables based on chlorophyll fluorescence imaging, comprising: a transient fluorescence imaging acquisition module for applying saturated pulsed light to the dark-adapted vegetable leaves and acquiring the chlorophyll fluorescence imaging sequence; a dual-stream feature extraction module for extracting the temporal feature tensor and the spatial feature tensor; a cross-coding fusion module for fusing the two feature tensors to generate the antibiotic type fingerprint tensor; a CNN classification module for outputting the antibiotic type and its type confidence; and a category conditional concentration regression and loop closure module for outputting the predicted antibiotic concentration and performing the loop closure adjustment.

[0010] The beneficial effects of this invention are as follows: First, this invention, for the first time, shifts the detection signal carrier from steady-state fluorescence amplitude to the inflection point time shift and leaf vein-mesophyll boundary spatial heterogeneity texture within the transient time window. This allows trace amounts of antibiotic residues at the tens of micrograms per kilogram to emerge from the state of being submerged by device noise, revealing usable species and concentration fingerprints. The mechanism lies in the fact that fluoroquinolones inhibit chloroplast DNA gyrase, thereby affecting D1 protein synthesis; tetracyclines inhibit chloroplast 70S ribosome translation, thereby affecting the assembly of photosystem II reaction centers; and sulfonamides inhibit the folic acid synthesis pathway, thereby affecting the redox state of the electron transport chain. These three types of targets induce specific relaxation time constant differences in different links of the photosystem II donor side, acceptor side, and plastoquinone library, causing a category-specific shift in the time position of the transient inflection point. Compared with existing technologies that rely solely on steady-state amplitude, this invention significantly outperforms the steady-state amplitude scheme in both species identification accuracy and root mean square error of concentration prediction at residue concentrations at the tens of micrograms per kilogram level.

[0011] Second, the cross-coding and fusion mechanism of temporal and spatial feature tensors adopted in this invention enables the two types of heterogeneous features to produce a nonlinear synergistic effect of 1+1>2. The mechanism is that the temporal inflection point offset carries the time constant information of the electron transport chain but lacks the concentration gradient information formed by vascular bundle transport, while the leaf vein-mesophyll boundary texture carries the concentration gradient information but lacks the time constant information required for species fingerprint. After the two are fused by the cross-external product of the core tensor after Tucker decomposition, the resulting antibiotic species fingerprint tensor has separability in both the species dimension and the concentration dimension, which significantly breaks through the detection accuracy limit of a single feature stream.

[0012] Third, the feedback mechanism of reverse closed-loop adjustment of the concentration prediction result to the transient sampling time window and the spatial region of interest introduced in this invention enables the detection system to adaptively correct subsequent acquisition and extraction parameters based on the current category confidence and concentration prediction value when facing unknown samples. The mechanism is as follows: when the category confidence is lower than the preset threshold, the start and end times of the sampling time window are scaled in the same direction with the logarithm of the concentration prediction as the scaling factor, so that the transient fingerprint features fall into the central region of the time window. Selecting the corresponding region of interest from the template library according to the current category can avoid random noise in the mesophyll area from entering the spatial texture calculation, thereby improving the overall detection accuracy iteratively without increasing hardware overhead. Attached Figure Description

[0013] Figure 1 This is the overall flowchart of the rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging as described in the embodiments of the present invention; Figure 2 This is the overall architecture diagram of the rapid detection system for antibiotic residues in vegetables based on chlorophyll fluorescence imaging, as described in an embodiment of the present invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the scope of protection of the invention.

[0015] This embodiment uses four typical leafy vegetables—spinach, lettuce, romaine lettuce, and bok choy—as the test subjects, and enrofloxacin (a fluoroquinolone), chlortetracycline (a tetracycline), and sulfamethoxazole (a sulfonamide) as representative target antibiotics to verify the ability of the provided method to identify and quantify antibiotic residues at the level of tens of micrograms per kilogram. The hardware platform used in this embodiment is a two-dimensional chlorophyll fluorescence imager based on pulse modulation technology. Its saturated pulse light source uses a high-power LED array with a peak wavelength of 655 nm and a saturation light intensity of not less than 6000 μmol / (m²). 2The imaging detector uses an area array sCMOS camera with an effective pixel count of 1024×1024 and a maximum acquisition frame rate of 10,000 frames per second. The spectral detection window is from 685nm to 760nm, and the center wavelength of the front interference filter is 740nm with a half-bandwidth of 40nm, which can effectively isolate the interference of excitation light scattering on weak fluorescence signals.

[0016] Step S1: Acquisition of multi-temporal resolution chlorophyll fluorescence imaging sequences within the transient time window. Carefully remove the vegetable leaf to be tested from the plant and lay it flat on a black polytetrafluoroethylene sample stage with the front of the leaf facing the imaging detector. Moisture-wicking cotton strips are used to keep the petiole tip moist. The entire sample stage is placed in a fully shaded dark room for dark adaptation treatment for 30 minutes at a constant room temperature of 25°C. This allows for the complete oxidation of the primary electron acceptor QA in the photosystem II reaction center of the leaf and complete relaxation of the non-photochemical quenching process to the ground state, thereby ensuring the reproducibility of the subsequent transient fluorescence signal.

[0017] After dark adaptation, a saturated pulse light source was activated to uniformly apply saturated pulse light with a peak wavelength of 655 nm to the entire leaf. The illuminance of the saturated pulse light was 6000 μmol / (m²). 2 The illuminance, lasting 3 ms, was sufficient to instantaneously reduce the primary electron acceptor (QA) in the entire photosystem II reaction center and trigger the complete chlorophyll fluorescence rapid induction kinetics. Simultaneously with the activation of the saturated pulsed light, an sCMOS camera began recording transient fluorescence images of the leaf surface at a maximum acquisition frame rate of 10,000 frames per second. The acquisition window started 50 μs after the saturated pulsed light was activated and ended 2 ms after the activation. This time window precisely covered the transition region between phase J and phase I of the chlorophyll fluorescence rapid induction kinetics curve, specifically the critical relaxation stage in the chloroplast photosynthetic electron transport chain, where QA reduction from plastoquinone library to QB reduction and PQ cell reduction occur. The inflection point within this time window is most sensitive to the differences in relaxation time constants induced by different antibiotic targets.

[0018] Considering the significant non-uniform distribution of relaxation processes in the chloroplast photosynthetic electron transport chain along the linear time axis—that is, electron transport from QA to QB occurs on the order of hundreds of microseconds while PQ cell reduction occurs on the order of milliseconds—using equal-interval sampling would waste a large number of acquisition frames in the millisecond-level relaxation interval and result in severe undersampling in the microsecond-level relaxation interval. Therefore, this step distributes the acquisition times on a logarithmic scale within the transient time window to maintain a uniform coverage density of the chlorophyll fluorescence imaging sequence for the relaxation processes of each component along the logarithmic time axis. Specifically, the logarithmically distributed acquisition times are determined by the following formula: , in: The chlorophyll fluorescence imaging sequence is the first one. The actual acquisition time of the frame is a scalar value ranging from 50μs to 2000μs, with the unit being μs. It is calculated by this formula and represents the relative time position of the fluorescence image of that frame after the saturation pulse light is turned on. The starting time of the transient time window is a scalar with a value of 50 μs, and the unit is μs. It is given by the starting boundary of the transient time window and represents the lower bound of the logarithmic scale sampling. The termination time of the transient time window is a scalar with a value of 2000 μs, and the unit is μs. It is given by the termination boundary of the transient time window and represents the upper bound of the logarithmic scale sampling. Here, is the sequence number of the acquired frame, and is a scalar whose value ranges from integer 1 to 1. The unit is dimensionless and is given naturally by the frame number, representing the position of the target acquisition time currently calculated in the sequence; The total number of acquired frames within the transient time window is a scalar value, ranging from positive integers. In this embodiment, it is set to 60. The unit is dimensionless and is determined by the highest acquisition frame rate of the sCMOS camera and the duration of the transient time window, representing the density of logarithmic-scale sampling. If the value is too small, the temporal resolution for subsequent inflection point detection will be insufficient. Taking values ​​that are too large will lead to data redundancy and increase computational overhead.

[0019] The chlorophyll fluorescence imaging sequence is composed of 60 fluorescence images obtained at the above logarithmic scale acquisition time. These images are stacked in chronological order into a three-dimensional array with a height of 1024, a width of 1024, and a depth of 60, which serves as the input for the subsequent two-stream feature extraction step S2.

[0020] It is important to note that the start time of the transient time window is locked at 50 μs rather than a smaller value in this step because the first tens of microseconds after the saturated pulse light is turned on are in the initial charge separation stage of the photosystem II reaction center. During this stage, the fluorescence signal is mainly determined by the absorption efficiency of the pigment antenna and is not significantly related to the electron transport chain components affected by antibiotic stress. Starting acquisition too early would only introduce fast-moving noise components unrelated to stress. Simultaneously, the end time is locked at 2 ms rather than a larger value because after 2 ms, the fluorescence signal has entered the steady-state transition region from phase I to phase P. The relaxation in this region is mainly dominated by non-photochemical quenching processes and is no longer sensitive to the differences in transient time constants caused by different antibiotic targets. Therefore, the 50 μs to 2 ms transient time window selected in this step covers the phase J to phase I transition region, which is most sensitive to species fingerprints, while effectively avoiding interference from irrelevant components and the steady-state submerged region on subsequent feature extraction.

[0021] Furthermore, the total acquisition count of 60 frames used in this step was determined through careful consideration. Experiments have shown that when the total number of acquisition frames is less than 40, the temporal resolution of the obtained logarithmic sampling sequence in the later stages of phase J is insufficient to distinguish the inflection point shift differences between tetracyclines and sulfonamides. Conversely, when the total number of acquisition frames exceeds 100, data redundancy increases dramatically, and the readout noise of the sCMOS camera at such a high frame rate begins to significantly degrade the signal-to-noise ratio. Therefore, this embodiment ultimately fixes the total number of acquisition frames at 60. Before being passed to the dual-stream feature extraction module, the three-dimensional fluorescence image array output in this step undergoes two conventional preprocessing steps: dark background subtraction and flat field correction, to eliminate the fixed-mode noise of the sCMOS camera and the light field inhomogeneity of the saturated pulsed light source.

[0022] Step S2: Dual-stream extraction of temporal and spatial feature tensors. Step S2 includes two parallel processing paths: temporal stream feature extraction and spatial stream feature extraction. The temporal stream uses the chlorophyll fluorescence imaging sequence as input to calculate the transient inflection point time offset map pixel by pixel; the spatial stream uses the transient inflection point time offset map as input to calculate the heterogeneous texture features of the leaf vein-mesophyll boundary based on automatic leaf vein segmentation.

[0023] The temporal flow feature extraction section targets each pixel position in the chlorophyll fluorescence imaging sequence. Extract the 60-dimensional fluorescence intensity sequence of the pixel location along the logarithmic time axis. Then, its weighted second-order difference is calculated to obtain the moment when the transient inflection point occurs. Since the acquisition times in step S1 are distributed on a logarithmic scale, the time intervals between adjacent frames are no longer equal, and the conventional equidistant second-order difference operator is no longer effective. This embodiment uses a weighted second-order difference operator with the reciprocal of the geometric mean of the interval between adjacent acquisition times as the weight: , , , in: pixel position In the The weighted second-order difference value at the frame is a scalar, taking values ​​in the real number range, with units of au / μs. 2 (au is any unit of fluorescence intensity), calculated from the first line of this formula, characterizing the local concavity and convexity intensity of the fluorescence curve of the pixel at this time. The chlorophyll fluorescence imaging sequence is the first one. Frame pixel position The fluorescence intensity value at the pixel location is a scalar value, ranging from 0 to 65535, with the unit being au. It is directly read from the sCMOS camera and represents the transient fluorescence emission intensity at that pixel location at that moment. For the first The weighting coefficients of the frames are scalars, taking values ​​of positive real numbers, with units of μs. -1 , calculated from the second row of this formula, is the normalization coefficient characterizing the non-uniformity of adjacent intervals under logarithmic scale sampling; The definition is the same as the formula mentioned above; pixel position The transient inflection point time offset at the location is a scalar with a value range of 50μs to 2000μs and a unit of μs. It is obtained by taking the extreme value of the absolute value of the weighted second-order difference in the third row of this formula, and it represents the specific relaxation time constant of the chloroplast photosynthetic electron transport chain at this pixel location in response to the current antibiotic stress. The operator is used to select the independent variable that maximizes the subsequent objective function. The absolute value operator; and These are the row and column indices of the pixel, respectively. Both are integer scalars, ranging from 1 to 1024, and are in pixels, naturally given by the pixel position.

[0024] By combining the transient inflection point time offsets of all pixels according to the spatial arrangement of the original image, we obtain the temporal feature tensor, which has dimensions of 1024 in height and 1024 in width, denoted as . .

[0025] In the spatial flow feature extraction section, the initial fluorescence image acquired after dark adaptation is first processed using the Frangi vessel enhancement filter. Automatic leaf vein segmentation is performed using the Frangi filter, a common algorithm in image processing. Its principle is to identify tubular structures based on the ratio of eigenvalues ​​of the Hessian matrix. In this embodiment, the common algorithm is directly called to divide the leaf into three non-overlapping sub-regions: the leaf vein region, the leaf mesophyll region, and the leaf vein-leaf mesophyll boundary region. The boundary region is defined as the set of pixels within a 5-pixel range that expands from the leaf vein region toward the leaf mesophyll region.

[0026] Subsequently, the transient inflection point time offset map of the pixels in the boundary region was obtained. Gray quantization was performed with a quantization level of 16, resulting in the quantized inflection point offset map. Then, the class confidence of the regressor's historical outputs is increased using the aforementioned class-conditional gradient. As weighting coefficients, the gray-level co-occurrence matrix texture features on the pixel set of the boundary region are calculated. The category confidence weighted gray-level co-occurrence matrix is ​​defined by the following formula: , , , in: The gray-level co-occurrence matrix weighted by category confidence in gray-level pairs The element value at a given location is a scalar, ranging from 0 to 1, with a dimensionless unit. It is calculated from the first line of this formula and represents the gray-level pairs within the boundary region. The normalized frequency of pixel pairs under category confidence weighting; and These are the row and column indices of the gray-level co-occurrence matrix, respectively. Both are integer scalars, ranging from 1 to 16, with dimensionless units, naturally given by the gray-level quantization series. pixel position The transient inflection point time offset after quantization is an integer scalar with a value range of 1 to 16 and a dimensionless unit. It is obtained by 16 levels of linear quantization from the aforementioned inflection point offset map. Let be the set of pixels in the boundary region, and let be a set whose elements are pairs of pixel coordinates. The result is given by the segmentation result of the Frangi filter; The category confidence score of the historical output of the category conditional gradient boosting regressor is a scalar with a value ranging from 0 to 1 and a dimensionless unit. It is given by the previous round of detection results and has a value of 1 in the first round of detection, which represents the reliability of the current category conditional weighting. and These are the displacement vector components of the gray-level co-occurrence matrix, all of which are integer scalars. In this embodiment, they are taken as 1 and 0 respectively (i.e., adjacent in the horizontal direction), and the unit is pixels, which are given by the adjacency relationship. This is an indicator function; it takes the value 1 when the condition inside the square brackets is true, and 0 otherwise. Here, is the normalization constant, and is a scalar, calculated from the second line of this formula, ensuring... In all The sum of the above equals 1; The category confidence weighted contrast texture feature is a scalar with a range of non-negative real numbers and a dimensionless unit. It is calculated from the third line of this formula and represents the local contrast intensity of the boundary region inflection point offset.

[0027] In addition to contrast texture features, this embodiment also calculates eight gray-level co-occurrence matrix texture features, including energy, correlation, and homogeneity, in the same way. After concatenating all features, a spatial feature tensor is obtained. Its dimensions are 1024 in height, 1024 in width, and 8 in number of channels.

[0028] It should be further explained that the reason the displacement vector of the gray-level co-occurrence matrix is ​​limited to a horizontally adjacent pixel in this step is that the main and lateral veins of a vegetable leaf naturally extend from the petiole to the leaf tip. After segmentation by the Frangi vascular enhancement filter, the boundary region is distributed in a strip-like pattern. The horizontal displacement precisely crosses the transition boundary between the vein and the leaf mesophyll in the vertical direction of the strip, which can capture the concentration gradient texture formed by vascular bundle transport to the greatest extent. If a diagonal displacement or a larger displacement is used, the statistical window will cross multiple adjacent veins, introducing periodic textures unrelated to the concentration gradient, which will reduce the discriminative ability of texture features. In this embodiment, when the number of pixels in the boundary region is less than 500, the texture feature calculation is skipped and the leaf is marked as a low-quality sample to avoid unreliable features due to small sample statistical bias.

[0029] Furthermore, the category confidence weighting mechanism used in this step is not a simple sample weight, but directly enters the accumulation term of the gray-level co-occurrence matrix. Its function is as follows: when the system is in the first round of detection and has not yet obtained any category prior, the category confidence of all pixels is 1. At this time, the spatial texture features degenerate into regular unweighted gray-level co-occurrence matrix features. When the system has completed the first round of closure and obtained the preliminary category confidence, the confidence is used as a pixel-level weight to reweight the gray-level co-occurrence matrix of the current round, so that the contribution of high-confidence pixels to texture statistics is amplified, thereby significantly suppressing the pollution of the final texture features by random noise in the mesophyll area. This design is also the key coupling point that enables the concentration reverse closed-loop feedback mechanism in the subsequent step S5 to achieve the improvement of iterative accuracy.

[0030] Step S3: Cross-coding and fusion of temporal feature tensors and spatial feature tensors. Step S3 involves cross-coding and fusing the temporal feature tensors... With spatial feature tensor Cross-encoding fusion is performed to generate antibiotic type fingerprint tensors. Since the two feature tensors mentioned above are inconsistent in the channel dimension, directly concatenating the channels would destroy cross-current coupling information. Therefore, this embodiment uses a cross-outer product method of the core tensors after Tucker decomposition for fusion, as calculated below: , , , in: and The definition is the same as before; The core tensor after Tucker decomposition of the temporal feature tensor is a third-order tensor with real numbers as its values ​​and dimension 1. In this embodiment , The unit is dimensionless, derived from the... The coupling coefficients of the temporal feature tensor on each modal principal component are obtained by performing higher-order singular value decomposition. The core tensor after the Tucker decomposition of the spatial feature tensor is a third-order tensor with dimension . In this embodiment , Other characteristics are the same ; and These are the temporal flow and spatial flow, respectively. The modality factor matrices are all column orthogonal matrices, with dimensions corresponding to the original modality length multiplied by the modality rank of the core tensor, and are dimensionless. They are obtained simultaneously from the Tucker decomposition process. For tensor along the first Modal product operator between modalities and matrices; For the fingerprint tensor of the antibiotic type The six modal indices are all integer scalars, with values ​​ranging from 1 to 1. , , , , , The unit is dimensionless and is given naturally by the tensor; The generated antibiotic type fingerprint tensor is a sixth-order tensor with dimension . That is, it is uniformly expanded into a fingerprint vector of length 65536, with values ​​in the range of real numbers and units of dimensionless. It is obtained by the element-wise outer product of two core tensors in the third row of this formula, and represents the joint fingerprint of the sample under test in terms of temporal and spatial dual-stream characteristics.

[0031] The resulting antibiotic type fingerprint tensor obtained through the above cross-outside product fusion It possesses separability in both the category and concentration dimensions, preserving both the inflection point time information of the temporal flow and the texture concentration gradient information of the spatial flow, and the coupling relationship between the two is explicitly encoded in a sixth-order tensor structure.

[0032] It should be noted that the Tucker decomposition rank used in this step is set to 8 for the spatiotemporal bimodal rank and 4 for the channel modal rank on both streams. This rank value is obtained by performing a core consistency check on the training set. Too low a rank will cause the core tensor to fail to retain sufficient feature discrimination information, thus degrading subsequent classification performance; too high a rank will cause the core tensor to degenerate into something close to the original tensor itself, losing its dimensionality reduction and denoising effects. This embodiment uses a high-order alternating least squares algorithm to perform Tucker decomposition on the two feature tensors respectively, with an iterative convergence threshold of 1e. -5The maximum number of iterations is set to 100. Experiments show that for the vast majority of samples, convergence accuracy can be achieved within 30 to 50 iterations.

[0033] More importantly, this step uses core tensor cross-external product instead of the more common direct feature channel concatenation or fully connected fusion because temporal and spatial feature tensors have fundamental differences in physical meaning: each pixel of a temporal feature tensor stores the transient response time constant of the chloroplast photosynthetic electron transport chain at that location to the current stress, while each pixel of a spatial feature tensor stores the texture statistics of the inflection point shift in the surrounding neighborhood. These belong to completely different feature spaces, and direct concatenation would result in severe loss of cross-current coupling information due to scale mismatch and meaning misalignment. Core tensor cross-external product, however, preserves all possible pairwise pairings between the two currents in the low-dimensional principal component space, thus fully exploring the cross-current conditional distribution information such as a certain texture statistics corresponding to a certain time constant. This is the mathematical root of the 1+1>2 nonlinear synergistic effect. The antibiotic type fingerprint tensor output in this step, after being flattened into a one-dimensional feature vector of length 65536, serves as the input feature for the convolutional neural network classifier in the subsequent S4 step.

[0034] Step S4: Antibiotic category identification based on a convolutional neural network classifier. Step S4 converts the antibiotic category fingerprint tensor into... The data is reorganized into a one-dimensional feature vector of length 65536 and fed into a convolutional neural network classifier. The convolutional neural network classifier used in this embodiment is a multi-scale feature pyramid structure with residual connections. The backbone network consists of four residual blocks connected in series. Each residual block contains two one-dimensional convolutional layers, a batch normalization layer, and a ReLU activation function. The number of output channels for the residual blocks are 64, 128, 256, and 512, respectively. A multi-scale feature pyramid is introduced at the end of the backbone network. The outputs of each residual block are concatenated after global average pooling and fed into a fully connected classification head. The output dimension is 3, corresponding to the three antibiotic categories: fluoroquinolones, tetracyclines, and sulfonamides. After normalization using the Softmax function at the end of the classification head, the class confidence vectors for the three classes are obtained. The class with the highest confidence is selected as the output antibiotic category. The confidence level corresponding to this category is used as the category confidence level. .

[0035] The residual structure and feature pyramid used in this step are both conventional structures in the field of deep learning. In this embodiment, the Adam optimizer is used to train the network with an initial learning rate of 1e-3 and a batch size of 32. The training samples are obtained by root irrigation experiments using standard solutions of enrofloxacin, chlortetracycline and sulfamethoxazole prepared at known concentrations. Five concentration gradients of 10, 20, 50, 100 and 200 μg / kg are prepared for each type of antibiotic, with 100 leaves for each gradient, for a total of 1500 training samples. The samples are divided into 80% for training and 20% for validation using the hold-out method.

[0036] Specifically, within each residual block, the kernel length of the first one-dimensional convolutional layer is 7, and the kernel length of the second one-dimensional convolutional layer is 3. These two are used alternately to balance the extraction of large-scale coupled features and local fine features. Residual connections employ either identity mapping or 1×1 convolutional projection. When the number of input and output channels in the residual block is inconsistent, 1×1 convolutional projection is used to align the channels. Batch normalization layers are placed after each convolutional layer and before the ReLU activation function to accelerate network convergence and improve robustness to training sample distribution shifts. At the end of the backbone network, the multi-scale feature pyramid outputs of each residual block are global average pooled to obtain four feature vectors of 64, 128, 256 and 512 dimensions. The four feature vectors are then concatenated into a multi-scale feature vector of length 960, which is fed into a two-layer fully connected classification head. The first fully connected layer outputs a dimension of 128 and is activated by ReLU and regularized by Dropout (with a dropout rate of 0.3). The second fully connected layer outputs a dimension of 3. Finally, the softmax function is used to normalize the vectors into the category confidence vectors of the three types of antibiotics.

[0037] To enhance the robustness of the training process to small sample sizes and class imbalance, this embodiment introduces two conventional methods during the training phase: First, it performs two data augmentation operations—random channel dropping and random feature value scaling—on the fingerprint tensors of the antibiotic types corresponding to the training samples to simulate hardware parameter drift that may occur in actual field detection. Second, it employs a class-weighted cross-entropy loss function, with the weight of each antibiotic determined by the reciprocal of its sample count in the training set, to avoid model prediction bias towards a particular class when the sample count is excessive. Verification shows that under the above training strategy, the convolutional neural network classifier achieves a comprehensive recognition accuracy of no less than 96% for the three antibiotic types on the validation set, and the time for a single forward propagation during the inference phase on the embedded GPU platform is no more than 50ms, fully meeting the real-time requirements of rapid on-site screening.

[0038] Step S5: Category-conditional gradient boosting concentration regression and concentration inverse loop closure. Step S5 is based on the antibiotic category. The fingerprint tensor of the antibiotic type The corresponding category-conditional gradient boosting regressor outputs the predicted antibiotic concentration. In this embodiment, an extreme gradient boosting model is trained independently for fluoroquinolones, tetracyclines, and sulfonamides. The training samples for each model contain only 500 of the 1500 concentration-labeled samples for the corresponding category. The training loss function of the category-conditional gradient boosting regressor includes a mean squared error term weighted by category confidence, so that high-confidence samples have a greater impact on the model parameters, thereby suppressing the cascading error caused by category misclassification. The regressor outputs the predicted antibiotic concentration. The unit is μg / kg.

[0039] After completing the concentration prediction, this embodiment introduces a concentration reverse closed-loop feedback mechanism, which is applied when the confidence level of the category is... When the concentration is below a preset threshold, the start and end times of the transient time window are scaled in the same direction using the logarithm of the concentration prediction value as the scaling factor. Based on the current category, a corresponding template is selected from a pre-stored region of interest template library as the region of interest for the next round of spatial feature tensor extraction. The specific feedback law is determined by the following formula: , , , in: is the closed-loop feedback scaling factor, a scalar with a value range of 0.5 to 2.0 and a dimensionless unit. It is calculated from the first row of this formula and represents the overall scaling magnitude of the transient time window during the next round of acquisition. denoted as the closed-loop feedback sensitivity coefficient, which is a scalar value. In this embodiment, it is set to 0.3, and its unit is dimensionless. A value that is too small will result in a slow closed-loop response. An excessively large value will cause closed-loop oscillation; The concentration forecast for this round is defined as before; The reference concentration is 50 μg / kg, and the unit is μg / kg. It is given by the typical residual concentration level and represents the normalized benchmark for logarithmic scaling. and These are the confidence level and confidence threshold for this round, respectively, both of which are scalars. In this embodiment, the value is 0.85, which is dimensionless and is obtained by binary search of the validation error on the training set. A value that is too low will cause the closed loop to be triggered unnecessarily. If the value is too high, the closed loop will continue to trigger and will be difficult to converge. The definition is the same as before; and The definition is the same as the formula mentioned above; and These are the start and end times of the transient time window after closed-loop adjustment, both of which are scalars in μs and are calculated from the second line of this formula; The region of interest in the space after closed-loop adjustment. For indexing functions of pre-stored region of interest template library, The definition is the same as before.

[0040] After the closed-loop adjustment is completed, the system performs steps S1 to S4 again on the same leaf to obtain detection results with higher confidence. The maximum number of iterations is set to 3. In this embodiment, the verification of samples with a concentration level of 10 μg per kilogram shows that after 2 closed-loop iterations, the identification accuracy of fluoroquinolones, tetracyclines and sulfonamides can reach 97.2%, 95.8% and 96.4% respectively, and the root mean square error of concentration prediction is 1.6 μg / kg, 1.9 μg / kg and 1.8 μg / kg respectively. The end-to-end detection time for a single sample is no more than 4.7 min, which is better than the two-hour detection time of the existing chromatography-mass spectrometry method and the complete failure of the existing fluorescence spectroscopy method at this concentration.

[0041] This embodiment also provides a rapid detection system for antibiotic residues in vegetables based on chlorophyll fluorescence imaging. This system corresponds one-to-one with the five steps of the aforementioned method embodiment and includes five mutually coupled hardware and software modules: transient fluorescence imaging acquisition module, dual-stream feature extraction module, cross-coding fusion module, CNN classification module, and category conditional concentration regression and loop closure module.

[0042] The transient fluorescence imaging acquisition module is used to realize the acquisition function of multi-temporal resolution chlorophyll fluorescence imaging sequences within the transient time window described in step S1 above. At the hardware level, this module includes a dark adaptation chamber, a saturated pulsed light source, an sCMOS fluorescence detection camera, a pre-interference filter, and a high-speed timing controller. The dark adaptation chamber adopts a fully light-blocking design with a light-absorbing coating on its inner surface to ensure that the leaves are completely free from ambient light interference during the dark adaptation phase. The saturated pulsed light source consists of a high-power LED array with a peak wavelength of 655nm and a light-diffusing plate, with a saturation light intensity of not less than 6000μmol / (m²). 2The system features a response latency of less than 1 μs; the sCMOS fluorescence detector has an effective pixel count of 1024 × 1024 and a maximum acquisition frame rate of 10,000 frames per second. It shares a high-speed timing controller with the saturated pulse light source to ensure synchronization accuracy between the acquisition time and the saturated pulse light activation time is better than 1 μs; the pre-interference filter has a center wavelength of 740 nm and a half-width of 40 nm, effectively isolating excitation light scattering. At the software level, the module embeds an automatic logarithmic sampling time generation program. This program automatically generates 60 acquisition times according to the set start and end times of the transient time window and the total number of acquisition frames, and sends them to the high-speed timing controller. It also supports subsequent category-conditional concentration regression and closed-loop modules to dynamically modify the start and end times of the transient time window.

[0043] The dual-stream feature extraction module is used to implement the dual-stream extraction function of temporal and spatial feature tensors described in step S2 above. This module takes the chlorophyll fluorescence imaging sequence output by the transient fluorescence imaging acquisition module as input and contains two parallel processing sub-units: a temporal stream sub-unit and a spatial stream sub-unit. The temporal stream sub-unit calls the aforementioned weighted second-order difference algorithm pixel-by-pixel to calculate the transient inflection point time offset map, obtaining the temporal feature tensor. The spatial stream sub-unit first calls the Frangi vessel enhancement filter to automatically segment the leaf veins of the first frame image of the chlorophyll fluorescence imaging sequence, obtaining pixel masks for the vein region, mesophyll region, and boundary region. Then, it calculates eight texture features for the transient inflection point time offset map of the boundary region pixels according to the aforementioned category confidence weighted gray-level co-occurrence matrix formula, forming the spatial feature tensor. The two sub-units of this module are executed in parallel on the GPU to ensure that the feature extraction process does not become a bottleneck for the overall detection time.

[0044] The cross-coding fusion module is used to implement the cross-coding fusion function of temporal feature tensors and spatial feature tensors described in step S3 above. This module takes the two feature tensors output by the dual-stream feature extraction module as input, first performs Tucker decomposition on the two tensors respectively to obtain two core tensors and their factor matrices, then calculates the element-wise outer product of the two core tensors according to the aforementioned cross-outer product formula, generating an antibiotic type fingerprint tensor of length 65536, which is then flattened into a one-dimensional feature vector and fed into the CNN classification module.

[0045] The CNN classification module is used to implement the antibiotic category identification function described in step S4 above. This module loads pre-trained weights from a multi-scale feature pyramid convolutional neural network model with residual connections. The antibiotic category fingerprint tensor is used as input, and after processing by the backbone network and a fully connected classification head, it outputs category confidence vectors for three antibiotic categories. The category corresponding to the highest confidence vector is taken as the antibiotic category. The corresponding confidence level is used as the class confidence level. The results are then simultaneously passed to the category conditional concentration regression and closed-loop module.

[0046] The category-conditional concentration regression and loop closure module is used to implement the concentration regression and concentration-reverse loop closure functions described in step S5 above. This module pre-stores the weights of three extreme gradient boosting regressors trained independently for fluoroquinolones, tetracyclines, and sulfonamides, respectively, along with three corresponding region of interest templates. Upon receiving the antibiotic category output by the CNN classification module, this module calls the corresponding extreme gradient boosting regressor based on the category index to predict the concentration of the antibiotic's fingerprint tensor, obtaining the predicted concentration value. Subsequently, the module determines whether the confidence level of the current category is lower than a preset threshold. If it is, it calculates the scaling factor according to the aforementioned closed-loop feedback law. Generate new transient time window start and end times With new areas of interest The aforementioned parameters are then sent to the transient fluorescence imaging acquisition module and the dual-stream feature extraction module, respectively, triggering a new round of acquisition and feature extraction. If the category confidence level is not lower than a preset threshold or the closed-loop iteration count has reached its limit, the final antibiotic category and concentration prediction value are output to the display terminal. This module feeds back the concentration prediction results from the system's end to the acquisition and feature extraction parameters at the system's front end in the form of a reverse data stream, forming a closed-loop coupled structure for the entire detection system and achieving iterative improvement in detection accuracy.

[0047] The five modules of this system strictly correspond to the five steps of the method embodiment in terms of data flow. The output of the previous module serves as the input of the next module, and the outputs of the category conditional concentration regression and closed-loop modules are fed back to the transient fluorescence imaging acquisition module and the dual-stream feature extraction module, thereby achieving a deeply coupled closed-loop detection architecture. This embodiment has conducted field tests and verifications on a portable prototype deployed in a field rapid screening scenario. At a target concentration level of 10 μg per kilogram, the species identification accuracy is no less than 95%, the root mean square error of concentration prediction is no greater than 2 μg / kg, and the end-to-end detection time for a single sample is no more than 5 minutes, fully meeting the engineering requirements for rapid on-site screening of antibiotic residues in vegetables.

[0048] This system adopts an integrated portable chassis design at the hardware level. The chassis dimensions are approximately 350mm long, 280mm wide, and 240mm high, with a total weight of no more than 8kg. The internal main control computing unit uses an embedded heterogeneous processing platform, integrating an eight-core ARM processor and a high-performance embedded GPU module. It can independently complete the local inference tasks of the convolutional neural network classifier and the category conditional gradient boosting regressor without relying on an external server. The front of the chassis has an openable sample chamber door, which houses the aforementioned dark adaptation chamber and saturated pulse light source. When the sample chamber door is closed, the dark adaptation timer is automatically triggered, and the saturated pulse and transient fluorescence imaging acquisition process automatically starts after 30 minutes. The top of the chassis is equipped with a touch screen display terminal for displaying detection results and historical records. The rear of the chassis has reserved Ethernet, USB, and external power interfaces, allowing continuous operation for no less than 8 hours when powered by a vehicle-mounted lithium battery during field operations. The system has applied for software copyright registration, and the relevant program code and trained model weight files are pre-installed in the storage partition of the embedded heterogeneous processing platform. Users can directly execute detection tasks after powering on without any additional configuration.

[0049] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging, characterized in that, Includes the following steps: S1. Apply saturated pulsed light to the dark-adapted vegetable leaves and collect chlorophyll fluorescence imaging sequences with multiple time resolutions within the transient time window of chlorophyll fluorescence induction dynamics. S2. Extract the temporal feature tensor composed of transient inflection point time shift and the spatial feature tensor composed of leaf vein-mesophyll boundary spatial distribution heterogeneity texture from the chlorophyll fluorescence imaging sequence respectively. S3. Perform cross-coding fusion on the temporal feature tensor and the spatial feature tensor to generate an antibiotic type fingerprint tensor; S4. Input the antibiotic type fingerprint tensor into a convolutional neural network classifier and output the antibiotic type and its type confidence. S5. Based on the antibiotic category, the antibiotic type fingerprint tensor is fed into the corresponding category conditional gradient boosting regressor to output the antibiotic concentration prediction value. The antibiotic concentration prediction value is then fed back to adjust the start and end times of the transient time window in step S1 and the region of interest extracted by the spatial feature tensor in step S2 in a closed loop. In step S2, the temporal feature tensor is obtained by calculating the weighted second-order difference extremum of the logarithmic time axis fluorescence sequence of each pixel position in the chlorophyll fluorescence imaging sequence. The weight of the weighted second-order difference is determined by the reciprocal of the geometric mean of the interval between adjacent acquisition times. The time when the weighted second-order difference extremum occurs is taken as the transient inflection point time offset of that pixel position. The extraction of the spatial feature tensor in step S2 includes: using the Frangi vascular enhancement filter to automatically segment the leaf fluorescence image into the leaf vein region, leaf mesophyll region and boundary region; calculating the gray-level co-occurrence matrix texture features of the transient inflection point time offset map of the boundary region pixels; and using the class confidence of the historical output of the class conditional gradient boosting regressor as a weighting coefficient to suppress random noise in the leaf mesophyll region. In step S3, the cross-coding fusion is performed by performing Tucker decomposition on the temporal feature tensor and the spatial feature tensor respectively, and then taking the cross outer product of the core tensor to generate the antibiotic type fingerprint tensor of a unified dimension. The closed-loop adjustment in step S5 includes: when the confidence level of the category is lower than a preset threshold, scaling the start and end times of the transient time window in the same direction using the logarithm of the predicted antibiotic concentration as a scaling factor; and selecting the corresponding template from the pre-stored region of interest template library according to the antibiotic category as the region of interest for the next round of spatial feature tensor extraction.

2. The rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging according to claim 1, characterized in that, The transient time window starts 50 microseconds after the saturated pulse light is turned on and ends 2 milliseconds after the saturated pulse light is turned on. The transient time window covers phases J to I of the chlorophyll fluorescence rapid induction kinetic curve, and the acquisition frame rate of the chlorophyll fluorescence imaging sequence is not less than 1000 frames per second.

3. The rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging according to claim 2, characterized in that, In step S1, the acquisition times of the multiple time resolutions are distributed on a logarithmic scale within the transient time window so that the coverage density of the chlorophyll fluorescence imaging sequence of the relaxation process of each component of the chloroplast photosynthetic electron transport chain remains uniform on the logarithmic time axis.

4. The rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging according to claim 1, characterized in that, The convolutional neural network classifier in step S4 includes a multi-scale feature pyramid structure with residual connections, and the antibiotic categories include at least three categories: fluoroquinolones, tetracyclines, and sulfonamides.

5. The rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging according to claim 1, characterized in that, The category-conditional gradient boosting regressor in step S5 is an extreme gradient boosting model trained independently for each of the antibiotic categories, and the training loss function of the category-conditional gradient boosting regressor includes a mean squared error term weighted by the confidence of the category.

6. A rapid detection system for antibiotic residues in vegetables based on chlorophyll fluorescence imaging, used to implement the rapid detection method for antibiotic residues in vegetables based on chlorophyll fluorescence imaging as described in any one of claims 1-5, characterized in that, include: The transient fluorescence imaging acquisition module is used to apply saturated pulsed light to the dark-adapted vegetable leaves and acquire chlorophyll fluorescence imaging sequences with multiple time resolutions within the transient time window of chlorophyll fluorescence induction dynamics. The dual-stream feature extraction module is used to extract, respectively, a temporal feature tensor composed of transient inflection point time shifts and a spatial feature tensor composed of heterogeneous texture of leaf vein-mesophyll boundary spatial distribution from the chlorophyll fluorescence imaging sequence. The cross-coding fusion module is used to perform cross-coding fusion on the temporal feature tensor and the spatial feature tensor to generate an antibiotic type fingerprint tensor; The CNN classification module is used to input the fingerprint tensor of the antibiotic type into the convolutional neural network classifier and output the antibiotic type and its type confidence. The category-conditional concentration regression and closed-loop module is used to input the antibiotic type fingerprint tensor into the corresponding category-conditional gradient boosting regressor according to the antibiotic category, output the antibiotic concentration prediction value, and feed back the antibiotic concentration prediction value to adjust the start and end times of the transient time window in the transient fluorescence imaging acquisition module and the region of interest extracted by the spatial feature tensor in the dual-stream feature extraction module.

Citation Information

Patent Citations

  • Method for detecting crop stress physiology and appraising stress resistance by delayed fluorescence spectrum

    CN102147367A

  • Method for rapidly detecting pesticide residues in fruits and vegetables

    CN103499530A

  • Vegetable oil pesticide residue detection method based on three-dimensional fluorescence spectroscopic technology

    CN110702656A

  • Rapid detection method for tea tree potassium based on chlorophyll fluorescence induced kinetics

    CN115356310A

  • Vegetable disease incubation period detection method and system based on bimodal time sequence collaborative fusion

    CN121527505A